summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/capture-parent-arg.stderr
blob: 13aaa9997073d5932cbf50f6a93f5952d5e3eaba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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