]> git.proxmox.com Git - rustc.git/blame - tests/ui/type-alias-impl-trait/implied_lifetime_wf_check3.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / type-alias-impl-trait / implied_lifetime_wf_check3.stderr
CommitLineData
2b03887a 1error: lifetime may not live long enough
9ffffee4 2 --> $DIR/implied_lifetime_wf_check3.rs:7:43
2b03887a
FG
3 |
4LL | fn test<'a>() where Ty<'a>: 'static { assert_static::<'a>() }
5 | -- lifetime `'a` defined here ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
6
7error: lifetime may not live long enough
9ffffee4 8 --> $DIR/implied_lifetime_wf_check3.rs:15:46
2b03887a
FG
9 |
10LL | fn test<'a>() where for<'b> Ty<'b>: 'a { assert_static::<'a>() }
11 | -- lifetime `'a` defined here ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
12
13error: lifetime may not live long enough
9ffffee4 14 --> $DIR/implied_lifetime_wf_check3.rs:21:21
2b03887a
FG
15 |
16LL | fn test<'a>() { assert_static::<'a>() }
17 | -- ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
18 | |
19 | lifetime `'a` defined here
20
21error[E0310]: the parameter type `A` may not live long enough
9ffffee4 22 --> $DIR/implied_lifetime_wf_check3.rs:29:41
2b03887a
FG
23 |
24LL | fn test<A>() where Ty<A>: 'static { assert_static::<A>() }
25 | ^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
26 |
27help: consider adding an explicit lifetime bound...
28 |
29LL | fn test<A: 'static>() where Ty<A>: 'static { assert_static::<A>() }
30 | +++++++++
31
9ffffee4 32error: aborting due to 4 previous errors
2b03887a
FG
33
34For more information about this error, try `rustc --explain E0310`.