rust/tests/ui/impl-trait/precise-capturing/capture-parent-arg.stderr

28 lines
1.3 KiB
Plaintext

warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/capture-parent-arg.rs:1:12
|
LL | #![feature(precise_capturing)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information
= note: `#[warn(incomplete_features)]` on by default
error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
--> $DIR/capture-parent-arg.rs:28:37
|
LL | impl<'a> W<'a> {
| -- this lifetime parameter is captured
LL | fn bad1() -> impl use<> Into<<W<'a> as Tr>::Assoc> {}
| -------------------^^---------------- lifetime captured due to being mentioned in the bounds of the `impl Trait`
error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
--> $DIR/capture-parent-arg.rs:34:18
|
LL | impl<'a> W<'a> {
| -- this lifetime parameter is captured
LL | fn bad2() -> impl use<> Into<<Self as Tr>::Assoc> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime captured due to being mentioned in the bounds of the `impl Trait`
error: aborting due to 2 previous errors; 1 warning emitted