rust/tests/ui/associated-inherent-types/regionck-2.stderr

28 lines
794 B
Plaintext

error[E0308]: mismatched types
--> $DIR/regionck-2.rs:12:12
|
LL | fn test(_: Lexer::Cursor) {}
| ^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected struct `Lexer<'static>`
found struct `Lexer<'_>`
note: the anonymous lifetime defined here...
--> $DIR/regionck-2.rs:12:12
|
LL | fn test(_: Lexer::Cursor) {}
| ^^^^^
= note: ...does not necessarily outlive the static lifetime
error: lifetime may not live long enough
--> $DIR/regionck-2.rs:12:1
|
LL | fn test(_: Lexer::Cursor) {}
| ^^^^^^^^-^^^^^^^^^^^^^^^^
| | |
| | has type `Lexer<'1>::Cursor`
| requires that `'1` must outlive `'static`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.