]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelix
[rust.git] / src / test / ui / nll / closure-requirements / propagate-from-trait-match.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/propagate-from-trait-match.rs:55:9
3    |
4 LL |         require(value);
5    |         ^^^^^^^
6
7 note: External requirements
8   --> $DIR/propagate-from-trait-match.rs:42:36
9    |
10 LL |       establish_relationships(value, |value| {
11    |  ____________________________________^
12 LL | |         //~^ ERROR the parameter type `T` may not live long enough
13 LL | |
14 LL | |         // This function call requires that
15 ...  |
16 LL | |         //~^ WARNING not reporting region error due to nll
17 LL | |     });
18    | |_____^
19    |
20    = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [
21                '_#1r,
22                T,
23                i32,
24                extern "rust-call" fn((T,))
25            ]
26    = note: number of external vids: 3
27    = note: where T: '_#1r
28
29 note: No external requirements
30   --> $DIR/propagate-from-trait-match.rs:38:1
31    |
32 LL | / fn supply<'a, T>(value: T)
33 LL | | where
34 LL | |     T: Trait<'a>,
35 LL | | {
36 ...  |
37 LL | |     });
38 LL | | }
39    | |_^
40    |
41    = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [
42                '_#1r,
43                T
44            ]
45
46 error[E0309]: the parameter type `T` may not live long enough
47   --> $DIR/propagate-from-trait-match.rs:42:36
48    |
49 LL |       establish_relationships(value, |value| {
50    |  ____________________________________^
51 LL | |         //~^ ERROR the parameter type `T` may not live long enough
52 LL | |
53 LL | |         // This function call requires that
54 ...  |
55 LL | |         //~^ WARNING not reporting region error due to nll
56 LL | |     });
57    | |_____^
58    |
59    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
60
61 error: aborting due to previous error
62
63 For more information about this error, try `rustc --explain E0309`.