-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #130249 - compiler-errors:sad-new-solver-coherence, r=lcnr
Revert "Stabilize `-Znext-solver=coherence`" This is a clean revert of #121848, prepared by running: ``` $ git revert 17b322f -m1 ``` Which effectively reverts: * a138a92, 69fdd14, d93e047, 1a893ac see: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/nalgebra.20hang Closes #130056 r? lcnr
- Loading branch information
Showing
104 changed files
with
578 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//@ known-bug: #118987 | ||
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete | ||
|
||
trait Assoc { | ||
type Output; | ||
} | ||
|
||
default impl<T: Clone> Assoc for T { | ||
type Output = bool; | ||
} | ||
|
||
impl Assoc for u8 {} | ||
|
||
trait Foo {} | ||
|
||
impl Foo for <u8 as Assoc>::Output {} | ||
impl Foo for <u16 as Assoc>::Output {} |
4 changes: 1 addition & 3 deletions
4
...ness/coherence-bikeshed-intrinsic-from.rs → tests/crashes/124207.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
//@ known-bug: #124207 | ||
#![feature(transmutability)] | ||
#![feature(type_alias_impl_trait)] | ||
trait OpaqueTrait {} | ||
type OpaqueType = impl OpaqueTrait; | ||
//~^ ERROR unconstrained opaque type | ||
trait AnotherTrait {} | ||
impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {} | ||
//~^ ERROR type provided when a constant was expected | ||
impl AnotherTrait for OpaqueType {} | ||
//~^ ERROR conflicting implementations of trait `AnotherTrait` | ||
pub fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/ui/associated-types/associated-types-coherence-failure.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! used to ICE: #119272 | ||
|
||
//@ check-pass | ||
|
||
#![feature(type_alias_impl_trait)] | ||
mod defining_scope { | ||
use super::*; | ||
pub type Alias<T> = impl Sized; | ||
|
||
pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> { | ||
x | ||
} | ||
} | ||
|
||
struct Container<T: Trait<U>, U> { | ||
x: <T as Trait<U>>::Assoc, | ||
} | ||
|
||
trait Trait<T> { | ||
type Assoc; | ||
} | ||
|
||
impl<T> Trait<T> for T { | ||
type Assoc = Box<u32>; | ||
} | ||
impl<T> Trait<T> for defining_scope::Alias<T> { | ||
type Assoc = usize; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/ui/coherence/coherence-overlap-downstream-inherent.old.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0592]: duplicate definitions with name `dummy` | ||
--> $DIR/coherence-overlap-downstream-inherent.rs:10:26 | ||
| | ||
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } } | ||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy` | ||
LL | | ||
LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } } | ||
| --------------- other definition for `dummy` | ||
|
||
error[E0592]: duplicate definitions with name `f` | ||
--> $DIR/coherence-overlap-downstream-inherent.rs:16:38 | ||
| | ||
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } | ||
| ^^^^^^^^^^^ duplicate definitions for `f` | ||
LL | | ||
LL | impl<X> A<i32, X> { fn f(&self) {} } | ||
| ----------- other definition for `f` | ||
| | ||
= note: downstream crates may implement trait `Bar<_>` for type `i32` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0592`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rence/coherence-overlap-downstream.stderr → .../coherence-overlap-downstream.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/ui/coherence/coherence-overlap-downstream.old.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
error[E0119]: conflicting implementations of trait `Sweet` | ||
--> $DIR/coherence-overlap-downstream.rs:11:1 | ||
| | ||
LL | impl<T:Sugar> Sweet for T { } | ||
| ------------------------- first implementation here | ||
LL | impl<T:Fruit> Sweet for T { } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation | ||
|
||
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32` | ||
--> $DIR/coherence-overlap-downstream.rs:17:1 | ||
| | ||
LL | impl<X, T> Foo<X> for T where T: Bar<X> {} | ||
| --------------------------------------- first implementation here | ||
LL | impl<X> Foo<X> for i32 {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | ||
| | ||
= note: downstream crates may implement trait `Bar<_>` for type `i32` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rence-overlap-issue-23516-inherent.stderr → ...-overlap-issue-23516-inherent.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0592]: duplicate definitions with name `dummy` | ||
--> $DIR/coherence-overlap-issue-23516-inherent.rs:12:25 | ||
| | ||
LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } } | ||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy` | ||
LL | | ||
LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } } | ||
| --------------- other definition for `dummy` | ||
| | ||
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0592`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ence/coherence-overlap-issue-23516.stderr → ...coherence-overlap-issue-23516.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>` | ||
--> $DIR/coherence-overlap-issue-23516.rs:11:1 | ||
| | ||
LL | impl<T:Sugar> Sweet for T { } | ||
| ------------------------- first implementation here | ||
LL | impl<U:Sugar> Sweet for Box<U> { } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>` | ||
| | ||
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.