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