forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
157 additions
and
429 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,59 @@ | ||
error[E0275]: overflow evaluating the requirement `String: Copy` | ||
error[E0276]: impl has stricter requirements than trait | ||
--> $DIR/alias-bound-unsound.rs:18:38 | ||
| | ||
LL | type Item = String where String: Copy; | ||
| ^^^^ | ||
| | ||
note: the requirement `String: Copy` appears on the `impl`'s associated type `Item` but not on the corresponding trait's associated type | ||
--> $DIR/alias-bound-unsound.rs:8:10 | ||
| | ||
LL | trait Foo { | ||
| --- in this trait | ||
LL | type Item: Copy | ||
| ^^^^ this trait's associated type doesn't have the requirement `String: Copy` | ||
| --------------- definition of `Item` from trait | ||
... | ||
LL | type Item = String where String: Copy; | ||
| ^^^^ impl has extra requirement `String: Copy` | ||
|
||
error[E0275]: overflow evaluating the requirement `String <: <() as Foo>::Item` | ||
error[E0271]: type mismatch resolving `<() as Foo>::Item normalizes-to String` | ||
--> $DIR/alias-bound-unsound.rs:24:31 | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^ | ||
|
||
error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _` | ||
--> $DIR/alias-bound-unsound.rs:24:10 | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _` | ||
--> $DIR/alias-bound-unsound.rs:24:10 | ||
| ^^ types differ | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
note: required by a bound in `Foo::Item` | ||
--> $DIR/alias-bound-unsound.rs:10:30 | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
LL | type Item: Copy | ||
| ---- required by a bound in this associated type | ||
LL | where | ||
LL | <Self as Foo>::Item: Copy; | ||
| ^^^^ required by this bound in `Foo::Item` | ||
|
||
error[E0275]: overflow evaluating the requirement `&<() as Foo>::Item well-formed` | ||
error[E0308]: mismatched types | ||
--> $DIR/alias-bound-unsound.rs:24:31 | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^ | ||
|
||
error[E0275]: overflow evaluating the requirement `<() as Foo>::Item well-formed` | ||
--> $DIR/alias-bound-unsound.rs:24:10 | ||
| -------------------- ^^ types differ | ||
| | | ||
| arguments to this function are incorrect | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: expected reference `&<() as Foo>::Item` | ||
found reference `&String` | ||
note: associated function defined here | ||
--> $DIR/alias-bound-unsound.rs:12:8 | ||
| | ||
LL | fn copy_me(x: &Self::Item) -> Self::Item { | ||
| ^^^^^^^ -------------- | ||
|
||
error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _` | ||
error[E0271]: type mismatch resolving `<() as Foo>::Item normalizes-to String` | ||
--> $DIR/alias-bound-unsound.rs:24:10 | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ types differ | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _` | ||
--> $DIR/alias-bound-unsound.rs:24:31 | ||
note: required by a bound in `Foo::Item` | ||
--> $DIR/alias-bound-unsound.rs:10:30 | ||
| | ||
LL | drop(<() as Foo>::copy_me(&x)); | ||
| ^^ | ||
LL | type Item: Copy | ||
| ---- required by a bound in this associated type | ||
LL | where | ||
LL | <Self as Foo>::Item: Copy; | ||
| ^^^^ required by this bound in `Foo::Item` | ||
|
||
error: aborting due to 8 previous errors | ||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0275`. | ||
Some errors have detailed explanations: E0271, E0276, E0308. | ||
For more information about an error, try `rustc --explain E0271`. |
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
14 changes: 4 additions & 10 deletions
14
tests/ui/traits/next-solver/cycles/cycle-modulo-ambig-aliases.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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
error[E0275]: overflow evaluating the requirement `&_: Typed` | ||
--> $DIR/cycle-modulo-ambig-aliases.rs:87:11 | ||
error[E0282]: type annotations needed | ||
--> $DIR/cycle-modulo-ambig-aliases.rs:87:5 | ||
| | ||
LL | foo::<&_>(); | ||
| ^^ | ||
| | ||
note: required by a bound in `foo` | ||
--> $DIR/cycle-modulo-ambig-aliases.rs:84:11 | ||
| | ||
LL | fn foo<T: Typed>() {} | ||
| ^^^^^ required by this bound in `foo` | ||
| ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `foo` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0275`. | ||
For more information about this error, try `rustc --explain E0282`. |
37 changes: 0 additions & 37 deletions
37
tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.