]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / ty-param-closure-approximate-lower-bound.stderr
CommitLineData
dfeec247 1note: external requirements
0731742a 2 --> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
ff7c6d11 3 |
0531ce1d 4LL | twice(cell, value, |a, b| invoke(a, b));
064997fb 5 | ^^^^^^
ff7c6d11 6 |
1b1a35ee 7 = note: defining type: generic::<T>::{closure#0} with closure substs [
ff7c6d11 8 i16,
2b03887a 9 for<'a, 'b> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) T)),
ba9703b0 10 (),
ff7c6d11 11 ]
b7449926 12 = note: number of external vids: 2
ff7c6d11
XL
13 = note: where T: '_#1r
14
dfeec247 15note: no external requirements
0731742a 16 --> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
0531ce1d 17 |
f2b60f7d
FG
18LL | fn generic<T>(value: T) {
19 | ^^^^^^^^^^^^^^^^^^^^^^^
0531ce1d 20 |
60c5eb7d 21 = note: defining type: generic::<T>
0531ce1d 22
dfeec247 23note: external requirements
0731742a 24 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
ff7c6d11 25 |
0531ce1d 26LL | twice(cell, value, |a, b| invoke(a, b));
064997fb 27 | ^^^^^^
ff7c6d11 28 |
1b1a35ee 29 = note: defining type: generic_fail::<T>::{closure#0} with closure substs [
ff7c6d11 30 i16,
2b03887a 31 for<'a, 'b> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) T)),
ba9703b0 32 (),
ff7c6d11 33 ]
b7449926
XL
34 = note: late-bound region is '_#2r
35 = note: number of external vids: 3
ff7c6d11
XL
36 = note: where T: '_#1r
37
dfeec247 38note: no external requirements
0731742a 39 --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
ff7c6d11 40 |
f2b60f7d
FG
41LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ff7c6d11 43 |
60c5eb7d 44 = note: defining type: generic_fail::<T>
ff7c6d11 45
b7449926 46error[E0309]: the parameter type `T` may not live long enough
0731742a 47 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
b7449926
XL
48 |
49LL | twice(cell, value, |a, b| invoke(a, b));
04454e1e
FG
50 | ^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
51 |
52help: consider adding an explicit lifetime bound...
b7449926 53 |
04454e1e
FG
54LL | fn generic_fail<'a, T: 'a>(cell: Cell<&'a ()>, value: T) {
55 | ++++
b7449926 56
ff7c6d11
XL
57error: aborting due to previous error
58
0531ce1d 59For more information about this error, try `rustc --explain E0309`.