fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
2.3 KiB60 linesraw
1note: External requirements
2  --> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
3   |
4LL |     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
14note: No external requirements
15  --> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
16   |
17LL | / fn generic<T>(value: T) {
18LL | |     let cell = Cell::new(&());
19LL | |     twice(cell, value, |a, b| invoke(a, b));
20LL | | }
21   | |_^
22   |
23   = note: defining type: generic::<T>
24
25note: External requirements
26  --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
27   |
28LL |     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
39note: No external requirements
40  --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
41   |
42LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
43LL | |     twice(cell, value, |a, b| invoke(a, b));
44LL | |
45LL | | }
46   | |_^
47   |
48   = note: defining type: generic_fail::<T>
49
50error[E0309]: the parameter type `T` may not live long enough
51  --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
52   |
53LL |     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
58error: aborting due to previous error
59
60For more information about this error, try `rustc --explain E0309`.