]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
Use assert_eq! in copy_from_slice
[rust.git] / src / test / ui / nll / ty-outlives / ty-param-closure-outlives-from-return-type.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27
3    |
4 LL |     with_signature(x, |y| y)
5    |                           ^
6
7 warning: not reporting region error due to nll
8   --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5
9    |
10 LL |     x
11    |     ^
12
13 note: External requirements
14   --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
15    |
16 LL |     with_signature(x, |y| y)
17    |                       ^^^^^
18    |
19    = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
20                '_#1r,
21                T,
22                i32,
23                extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<std::fmt::Debug + '_#2r>
24            ]
25    = note: number of external vids: 3
26    = note: where T: '_#2r
27
28 error[E0309]: the parameter type `T` may not live long enough
29   --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
30    |
31 LL |     with_signature(x, |y| y)
32    |                       ^^^^^
33    |
34    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
35
36 note: No external requirements
37   --> $DIR/ty-param-closure-outlives-from-return-type.rs:25:1
38    |
39 LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
40 LL | | where
41 LL | |     T: Debug,
42 LL | | {
43 ...  |
44 LL | |     //~| ERROR the parameter type `T` may not live long enough
45 LL | | }
46    | |_^
47    |
48    = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
49                '_#1r,
50                T
51            ]
52
53 error[E0309]: the parameter type `T` may not live long enough
54   --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5
55    |
56 LL |     x
57    |     ^
58    |
59    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
60
61 error: aborting due to 2 previous errors
62
63 For more information about this error, try `rustc --explain E0309`.