]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
Auto merge of #53830 - davidtwco:issue-53228, r=nikomatsakis
[rust.git] / src / test / ui / nll / ty-outlives / ty-param-closure-approximate-lower-bound.stderr
1 note: External requirements
2   --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24
3    |
4 LL |     twice(cell, value, |a, b| invoke(a, b));
5    |                        ^^^^^^^^^^^^^^^^^^^
6    |
7    = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
8                T,
9                i16,
10                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
11            ]
12    = note: number of external vids: 3
13    = note: where T: '_#1r
14
15 note: No external requirements
16   --> $DIR/ty-param-closure-approximate-lower-bound.rs:32:1
17    |
18 LL | / fn generic<T>(value: T) {
19 LL | |     let cell = Cell::new(&());
20 LL | |     twice(cell, value, |a, b| invoke(a, b));
21 LL | | }
22    | |_^
23    |
24    = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
25                T
26            ]
27
28 note: External requirements
29   --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24
30    |
31 LL |     twice(cell, value, |a, b| invoke(a, b));
32    |                        ^^^^^^^^^^^^^^^^^^^
33    |
34    = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
35                T,
36                i16,
37                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
38            ]
39    = note: number of external vids: 4
40    = note: where T: '_#1r
41
42 note: No external requirements
43   --> $DIR/ty-param-closure-approximate-lower-bound.rs:38:1
44    |
45 LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
46 LL | |     twice(cell, value, |a, b| invoke(a, b));
47 LL | |     //~^ ERROR the parameter type `T` may not live long enough
48 LL | | }
49    | |_^
50    |
51    = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
52                T
53            ]
54
55 error[E0309]: the parameter type `T` may not live long enough
56   --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24
57    |
58 LL |     twice(cell, value, |a, b| invoke(a, b));
59    |                        ^^^^^^^^^^^^^^^^^^^
60    |
61    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`...
62
63 error: aborting due to previous error
64
65 For more information about this error, try `rustc --explain E0309`.