rust/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr

19 lines
784 B
Plaintext

error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
--> $DIR/redundant.rs:16:35
|
LL | fn in_trait() -> impl Sized + use<'a, Self>;
| ^^^^^^^^^^^^^
|
= note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
--> $DIR/redundant.rs:21:35
|
LL | fn in_trait() -> impl Sized + use<'a> {}
| ^^^^^^^
|
= note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
error: aborting due to 2 previous errors