-
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.
Erase **all** regions when probing for associated types in astconv
- Loading branch information
1 parent
31f858d
commit cb9852b
Showing
3 changed files
with
21 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pub struct Bar<S>(S); | ||
|
||
pub trait Foo {} | ||
|
||
impl<S> Foo for Bar<S> where for<'a> <&'a S>::Item: Foo {} | ||
//~^ ERROR ambiguous associated type | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0223]: ambiguous associated type | ||
--> $DIR/suggest-trait-in-ufcs-in-hrtb.rs:5:38 | ||
| | ||
LL | impl<S> Foo for Bar<S> where for<'a> <&'a S>::Item: Foo {} | ||
| ^^^^^^^^^^^^^ help: use the fully-qualified path: `<&'a S as IntoIterator>::Item` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0223`. |