]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / ty-param-closure-approximate-lower-bound.stderr
CommitLineData
ff7c6d11
XL
1warning: not reporting region error due to -Znll
2 --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:31
3 |
435 | twice(cell, value, |a, b| invoke(a, b));
5 | ^^^^^^^^^^^^
6
7warning: not reporting region error due to -Znll
8 --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31
9 |
1043 | twice(cell, value, |a, b| invoke(a, b));
11 | ^^^^^^
12
13warning: not reporting region error due to -Znll
14 --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31
15 |
1643 | twice(cell, value, |a, b| invoke(a, b));
17 | ^^^^^^^^^^^^
18
19note: External requirements
20 --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:24
21 |
2235 | twice(cell, value, |a, b| invoke(a, b));
23 | ^^^^^^^^^^^^^^^^^^^
24 |
25 = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
26 T,
27 i16,
28 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) T))
29 ]
30 = note: number of external vids: 2
31 = note: where T: '_#1r
32
33note: External requirements
34 --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24
35 |
3643 | twice(cell, value, |a, b| invoke(a, b));
37 | ^^^^^^^^^^^^^^^^^^^
38 |
39 = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
40 T,
41 i16,
42 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) T))
43 ]
44 = note: number of external vids: 2
45 = note: where T: '_#1r
46
47note: No external requirements
48 --> $DIR/ty-param-closure-approximate-lower-bound.rs:33:1
49 |
5033 | / fn generic<T>(value: T) {
5134 | | let cell = Cell::new(&());
5235 | | twice(cell, value, |a, b| invoke(a, b));
5336 | | //~^ WARNING not reporting region error
5437 | | //
5538 | | // This error from the old region solver looks bogus.
5639 | | }
57 | |_^
58 |
59 = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
60 T
61 ]
62
63error[E0309]: the parameter type `T` may not live long enough
64 --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24
65 |
6643 | twice(cell, value, |a, b| invoke(a, b));
67 | ^^^^^^^^^^^^^^^^^^^
68 |
69 = 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))`...
70
71note: No external requirements
72 --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:1
73 |
7442 | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
7543 | | twice(cell, value, |a, b| invoke(a, b));
7644 | | //~^ WARNING not reporting region error
7745 | | //~| WARNING not reporting region error
7846 | | //~| ERROR the parameter type `T` may not live long enough
7947 | | }
80 | |_^
81 |
82 = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
83 T
84 ]
85
86error: aborting due to previous error
87