]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
Rollup merge of #52824 - varkor:fix-llvm-ret-move-warnings, r=rkruppe
[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 error[E0309]: the parameter type `T` may not live long enough
30   --> $DIR/propagate-from-trait-match.rs:42:36
31    |
32 LL |       establish_relationships(value, |value| {
33    |  ____________________________________^
34 LL | |         //~^ ERROR the parameter type `T` may not live long enough
35 LL | |
36 LL | |         // This function call requires that
37 ...  |
38 LL | |         //~^ WARNING not reporting region error due to nll
39 LL | |     });
40    | |_____^
41    |
42    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
43
44 note: No external requirements
45   --> $DIR/propagate-from-trait-match.rs:38:1
46    |
47 LL | / fn supply<'a, T>(value: T)
48 LL | | where
49 LL | |     T: Trait<'a>,
50 LL | | {
51 ...  |
52 LL | |     });
53 LL | | }
54    | |_^
55    |
56    = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [
57                '_#1r,
58                T
59            ]
60
61 error: aborting due to previous error
62
63 For more information about this error, try `rustc --explain E0309`.