You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggest using anonymous lifetime in impl Trait return without hacks
Fallback to `static_impl_trait` for nice error message by peeking at the
return type and the lifetime type. Point at the return type instead of
the return expr/stmt in NLL mode.
help: you can add a constraint to the return type to make it last less than `'static` and match the anonymous lifetime #1 defined on the function body at 3:1
7
15
|
8
16
LL | fn elided(x: &i32) -> impl Copy + '_ { x }
9
17
| ^^^^^^^^^^^^^^
10
-
help: otherwise, add explicit lifetime `'static` to the type of `x`
0 commit comments