]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
Rollup merge of #66013 - nnethercote:avoid-hashing-twice-in-get_query, r=Zoxc
[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:24:24
3    |
4 LL |     twice(cell, value, |a, b| invoke(a, b));
5    |                        ^^^^^^^^^^^^^^^^^^^
6    |
7    = note: defining type: DefId(0:11 ~ 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), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)),
11            ]
12    = note: number of external vids: 2
13    = note: where T: '_#1r
14
15 note: No external requirements
16   --> $DIR/ty-param-closure-approximate-lower-bound.rs:22: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:9 ~ 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:29:24
30    |
31 LL |     twice(cell, value, |a, b| invoke(a, b));
32    |                        ^^^^^^^^^^^^^^^^^^^
33    |
34    = note: defining type: DefId(0:15 ~ 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), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)),
38            ]
39    = note: late-bound region is '_#2r
40    = note: number of external vids: 3
41    = note: where T: '_#1r
42
43 note: No external requirements
44   --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
45    |
46 LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
47 LL | |     twice(cell, value, |a, b| invoke(a, b));
48 LL | |
49 LL | | }
50    | |_^
51    |
52    = note: defining type: DefId(0:12 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
53                T,
54            ]
55
56 error[E0309]: the parameter type `T` may not live long enough
57   --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
58    |
59 LL |     twice(cell, value, |a, b| invoke(a, b));
60    |                        ^^^^^^^^^^^^^^^^^^^
61    |
62    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:12 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(13), 'a))`...
63
64 error: aborting due to previous error
65
66 For more information about this error, try `rustc --explain E0309`.