11error[E0637]: `'_` cannot be used here
2- --> $DIR/underscore-lifetime-binders.rs:18 :8
2+ --> $DIR/underscore-lifetime-binders.rs:14 :8
33 |
44LL | fn foo<'_> //~ ERROR cannot be used here
55 | ^^ `'_` is a reserved lifetime name
66
77error[E0637]: `'_` cannot be used here
8- --> $DIR/underscore-lifetime-binders.rs:24 :21
8+ --> $DIR/underscore-lifetime-binders.rs:20 :21
99 |
1010LL | fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR cannot be used here
1111 | ^^ `'_` is a reserved lifetime name
@@ -17,13 +17,7 @@ LL | struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier
1717 | ^^ expected lifetime parameter
1818
1919error[E0106]: missing lifetime specifier
20- --> $DIR/underscore-lifetime-binders.rs:14:10
21- |
22- LL | impl Foo<'_> { //~ ERROR missing lifetime specifier
23- | ^^ expected lifetime parameter
24-
25- error[E0106]: missing lifetime specifier
26- --> $DIR/underscore-lifetime-binders.rs:24:29
20+ --> $DIR/underscore-lifetime-binders.rs:20:29
2721 |
2822LL | fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR cannot be used here
2923 | ^^ expected lifetime parameter
@@ -32,14 +26,14 @@ LL | fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR cannot be used here
3226 = help: consider giving it a 'static lifetime
3327
3428error[E0106]: missing lifetime specifier
35- --> $DIR/underscore-lifetime-binders.rs:30 :35
29+ --> $DIR/underscore-lifetime-binders.rs:26 :35
3630 |
3731LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } //~ ERROR missing lifetime specifier
3832 | ^^ expected lifetime parameter
3933 |
4034 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_` or `y`
4135
42- error: aborting due to 6 previous errors
36+ error: aborting due to 5 previous errors
4337
4438Some errors occurred: E0106, E0637.
4539For more information about an error, try `rustc --explain E0106`.
0 commit comments