mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
22 lines
845 B
Plaintext
22 lines
845 B
Plaintext
error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from `dyn` type
|
|
--> $DIR/implicit-capture-late.rs:10:55
|
|
|
|
|
LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
|
|
| ^^^^^^^^^^^ `impl Trait` implicitly captures all lifetimes in scope
|
|
|
|
|
note: lifetime declared here
|
|
--> $DIR/implicit-capture-late.rs:10:36
|
|
|
|
|
LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
|
|
| ^^
|
|
|
|
error: [o]
|
|
--> $DIR/implicit-capture-late.rs:10:55
|
|
|
|
|
LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
|
|
| ^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0657`.
|