]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
Move `{core,std}::stream::Stream` to `{core,std}::async_iter::AsyncIterator`.
[rust.git] / src / test / ui / nll / ty-outlives / ty-param-closure-outlives-from-return-type.stderr
1 note: external requirements
2   --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:23
3    |
4 LL |     with_signature(x, |y| y)
5    |                       ^^^^^
6    |
7    = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
8                i32,
9                extern "rust-call" fn((std::boxed::Box<T, std::alloc::Global>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r), std::alloc::Global>,
10                (),
11            ]
12    = note: number of external vids: 3
13    = note: where T: '_#2r
14
15 note: no external requirements
16   --> $DIR/ty-param-closure-outlives-from-return-type.rs:15:1
17    |
18 LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
19 LL | | where
20 LL | |     T: Debug,
21 LL | | {
22 ...  |
23 LL | |
24 LL | | }
25    | |_^
26    |
27    = note: defining type: no_region::<'_#1r, T>
28
29 error[E0309]: the parameter type `T` may not live long enough
30   --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:23
31    |
32 LL |     with_signature(x, |y| y)
33    |                       ^^^^^
34    |
35    = help: consider adding an explicit lifetime bound `T: 'a`...
36
37 error[E0309]: the parameter type `T` may not live long enough
38   --> $DIR/ty-param-closure-outlives-from-return-type.rs:41:5
39    |
40 LL |     x
41    |     ^
42    |
43    = help: consider adding an explicit lifetime bound `T: 'a`...
44
45 error: aborting due to 2 previous errors
46
47 For more information about this error, try `rustc --explain E0309`.