-
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.
Suggest assoc ty bound on lifetime in eq constraint
- Loading branch information
Showing
5 changed files
with
49 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#[cfg(FALSE)] | ||
fn syntax() { | ||
bar::<Item = 'a>(); //~ ERROR associated lifetimes are not supported | ||
bar::<Item = 'a>(); //~ ERROR lifetimes are not permitted in this context | ||
} | ||
|
||
fn main() {} |
17 changes: 11 additions & 6 deletions
17
tests/ui/parser/recover/recover-assoc-lifetime-constraint.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,12 +1,17 @@ | ||
error: associated lifetimes are not supported | ||
--> $DIR/recover-assoc-lifetime-constraint.rs:3:11 | ||
error: lifetimes are not permitted in this context | ||
--> $DIR/recover-assoc-lifetime-constraint.rs:3:18 | ||
| | ||
LL | bar::<Item = 'a>(); | ||
| ^^^^^^^-- | ||
| | | ||
| the lifetime is given here | ||
| -------^^ | ||
| | | | ||
| | lifetime is not allowed here | ||
| this introduces an associated item binding | ||
| | ||
= help: if you meant to specify a trait object, write `dyn Trait + 'lifetime` | ||
= help: if you meant to specify a trait object, write `dyn /* Trait */ + 'a` | ||
help: you might have meant to write a bound here | ||
| | ||
LL | bar::<Item: 'a>(); | ||
| ~ | ||
|
||
error: aborting due to 1 previous error | ||
|