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.
Always make inductive cycles as ambig during typeck
- Loading branch information
1 parent
4b7fdb3
commit 35865b3
Showing
8 changed files
with
68 additions
and
28 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
15 changes: 15 additions & 0 deletions
15
tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.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,15 @@ | ||
error[E0277]: `<Self as Case1>::C` is not an iterator | ||
--> $DIR/bad-bounds-on-assoc-in-trait.rs:25:21 | ||
| | ||
LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<Self as Case1>::C` is not an iterator | ||
| | ||
= help: the trait `Iterator` is not implemented for `<Self as Case1>::C` | ||
help: consider further restricting the associated type | ||
| | ||
LL | trait Case1 where <Self as Case1>::C: Iterator { | ||
| ++++++++++++++++++++++++++++++++++ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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,12 +1,27 @@ | ||
error[E0119]: conflicting implementations of trait `TraitWithAssoc` for type `((&str,),)` | ||
--> $DIR/unsound-overlap.rs:20:1 | ||
--> $DIR/unsound-overlap.rs:21:1 | ||
| | ||
LL | impl<T: A> TraitWithAssoc for T { | ||
| ------------------------------- first implementation here | ||
... | ||
LL | impl TraitWithAssoc for ((&str,),) { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `((&str,),)` | ||
|
||
error: aborting due to 1 previous error | ||
error[E0283]: type annotations needed: cannot satisfy `&str: A` | ||
--> $DIR/unsound-overlap.rs:10:12 | ||
| | ||
LL | impl A for &str {} | ||
| ^^^^ | ||
| | ||
note: multiple `impl`s satisfying `&str: A` found | ||
--> $DIR/unsound-overlap.rs:9:1 | ||
| | ||
LL | impl<T: B> A for T {} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
LL | impl A for &str {} | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0119`. | ||
Some errors have detailed explanations: E0119, E0283. | ||
For more information about an 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
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