Closed
Description
struct Nested<K>(K);
trait X<'a, K: 'a> {
fn foo<'b, L: X<&'b Nested<K>>>();
}
produces:
error[E0637]: `&` without an explicit lifetime name cannot be used here
--> src/lib.rs:4:19
|
4 | fn foo<'b, L: X<&'b Nested<K>>>();
| ^^^^^^^^^^^^^^^^ explicit lifetime name needed here
despite there being no unnamed &
.
Activity
Phosphorus15 commentedon Oct 11, 2019
This error report is obviously incorrect, maybe we should elide this for the lifetime inferencer to check ? Or should we simply report an error with different message here, which means a new error code should be created?
Rollup merge of rust-lang#65307 - Phosphorus15:master, r=varkor
Rollup merge of rust-lang#65307 - Phosphorus15:master, r=varkor
Rollup merge of rust-lang#65307 - Phosphorus15:master, r=varkor