mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
23 lines
836 B
Plaintext
23 lines
836 B
Plaintext
|
error: lifetime may not live long enough
|
||
|
--> $DIR/issue-102209.rs:10:29
|
||
|
|
|
||
|
LL | impl NfaBuilder<'_> {
|
||
|
| -- lifetime `'2` appears in the `impl`'s self type
|
||
|
LL | pub fn with<R, F: FnOnce(NfaBuilder<'_>) -> R>(f: F) -> R {
|
||
|
LL | Brand::with(|brand| {
|
||
|
| ----- has type `Brand<'1>`
|
||
|
LL | f(Self { brand: brand.lt })
|
||
|
| ^^^^^^^^ this usage requires that `'1` must outlive `'2`
|
||
|
|
||
|
error: lifetime may not live long enough
|
||
|
--> $DIR/issue-102209.rs:10:29
|
||
|
|
|
||
|
LL | impl NfaBuilder<'_> {
|
||
|
| -- lifetime `'1` appears in the `impl`'s self type
|
||
|
...
|
||
|
LL | f(Self { brand: brand.lt })
|
||
|
| ^^^^^^^^ this usage requires that `'1` must outlive `'static`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|