rust/tests/ui/nll/ty-outlives/wf-unreachable.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
2.3 KiB
Plaintext
Raw Normal View History

error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:6:12
|
LL | fn uninit<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let x: &'static &'a ();
| ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:11:12
|
LL | fn var_type<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let x: &'static &'a () = &&();
| ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:15:12
|
LL | fn uninit_infer<'a>() {
| -- lifetime `'a` defined here
2019-03-09 12:03:44 +00:00
LL | let x: &'static &'a _;
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:21:12
|
LL | fn infer<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let x: &'static &'a _ = &&();
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:26:12
|
LL | fn uninit_no_var<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let _: &'static &'a ();
| ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:31:12
|
LL | fn no_var<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let _: &'static &'a () = &&();
| ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:36:12
|
LL | fn infer_no_var<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let _: &'static &'a _ = &&();
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/wf-unreachable.rs:49:12
|
LL | fn required_substs<'a>() {
| -- lifetime `'a` defined here
LL | return;
2019-03-09 12:03:44 +00:00
LL | let _: C<'static, 'a, _> = C((), &(), &());
| ^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
2018-11-28 21:05:36 +00:00
error: aborting due to 8 previous errors