mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Clarify implicit captures for RPITIT
This commit is contained in:
committed by
Jubilee Young
parent
a7dc98733d
commit
36076ecdc7
@@ -2,9 +2,9 @@ error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use
|
||||
--> $DIR/rpitit.rs:11:19
|
||||
|
|
||||
LL | trait TraitLt<'a: 'a> {
|
||||
| -- this lifetime parameter is captured
|
||||
| -- all lifetime parameters originating from a trait are captured implicitly
|
||||
LL | fn hello() -> impl Sized + use<Self>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ lifetime captured due to being mentioned in the bounds of the `impl Trait`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/rpitit.rs:15:5
|
||||
|
||||
Reference in New Issue
Block a user