forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address rust-lang#49287
- Loading branch information
Showing
3 changed files
with
71 additions
and
34 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,2 @@ | ||
fn f(_: impl Iterator<Item = &'_ ()>) {} //~ ERROR missing lifetime specifier | ||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/suggestions/impl-trait-missing-lifetime.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[E0106]: missing lifetime specifier | ||
--> $DIR/impl-trait-missing-lifetime.rs:1:31 | ||
| | ||
LL | fn f(_: impl Iterator<Item = &'_ ()>) {} | ||
| ^^ expected named lifetime parameter | ||
| | ||
help: consider introducing a named lifetime parameter | ||
| | ||
LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {} | ||
| ^^^^ ^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0106`. |