Open estebank opened 6 years ago
Current output:
error[E0637]: `'_` cannot be used here
--> src/lib.rs:2:25
|
2 | fn meh() -> Box<dyn for<'_> Meh<'_>> {panic!()}
| ^^ `'_` is a reserved lifetime name
error[E0106]: missing lifetime specifier
--> src/lib.rs:2:33
|
2 | fn meh() -> Box<dyn for<'_> Meh<'_>> {panic!()}
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
2 | fn meh() -> Box<dyn for<'_> Meh<'static>> {panic!()}
| ~~~~~~~
When encountering the following case
emit a more targeted diagnostic, along the lines of
Without emitting the E0106.