fdd8a0dde5
Fixes #73159 This is similar to #69350 - if the user didn't initially write out a 'static lifetime, adding 'static in response to a lifetime error is usually the wrong thing to do.
11 lines
271 B
Plaintext
11 lines
271 B
Plaintext
error: lifetime may not live long enough
|
|
--> $DIR/issue-26217.rs:4:5
|
|
|
|
|
LL | fn bar<'a>() {
|
|
| -- lifetime `'a` defined here
|
|
LL | foo::<&'a i32>();
|
|
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
|
|
|
|
error: aborting due to previous error
|
|
|