]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/implied_lifetime_wf_check3.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / type-alias-impl-trait / implied_lifetime_wf_check3.stderr
1 warning: unnecessary lifetime parameter `'a`
2   --> $DIR/implied_lifetime_wf_check3.rs:6:22
3    |
4 LL |     fn assert_static<'a: 'static>() {}
5    |                      ^^
6    |
7    = help: you can use the `'static` lifetime directly, in place of `'a`
8
9 warning: unnecessary lifetime parameter `'a`
10   --> $DIR/implied_lifetime_wf_check3.rs:15:22
11    |
12 LL |     fn assert_static<'a: 'static>() {}
13    |                      ^^
14    |
15    = help: you can use the `'static` lifetime directly, in place of `'a`
16
17 warning: unnecessary lifetime parameter `'a`
18   --> $DIR/implied_lifetime_wf_check3.rs:22:22
19    |
20 LL |     fn assert_static<'a: 'static>() {}
21    |                      ^^
22    |
23    = help: you can use the `'static` lifetime directly, in place of `'a`
24
25 error: lifetime may not live long enough
26   --> $DIR/implied_lifetime_wf_check3.rs:8:43
27    |
28 LL |     fn test<'a>() where Ty<'a>: 'static { assert_static::<'a>() }
29    |             -- lifetime `'a` defined here ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
30
31 error: lifetime may not live long enough
32   --> $DIR/implied_lifetime_wf_check3.rs:17:46
33    |
34 LL |     fn test<'a>() where for<'b> Ty<'b>: 'a { assert_static::<'a>() }
35    |             -- lifetime `'a` defined here    ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
36
37 error: lifetime may not live long enough
38   --> $DIR/implied_lifetime_wf_check3.rs:24:21
39    |
40 LL |     fn test<'a>() { assert_static::<'a>() }
41    |             --      ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
42    |             |
43    |             lifetime `'a` defined here
44
45 error[E0310]: the parameter type `A` may not live long enough
46   --> $DIR/implied_lifetime_wf_check3.rs:32:41
47    |
48 LL |     fn test<A>() where Ty<A>: 'static { assert_static::<A>() }
49    |                                         ^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
50    |
51 help: consider adding an explicit lifetime bound...
52    |
53 LL |     fn test<A: 'static>() where Ty<A>: 'static { assert_static::<A>() }
54    |              +++++++++
55
56 error: aborting due to 4 previous errors; 3 warnings emitted
57
58 For more information about this error, try `rustc --explain E0310`.