11error[E0310]: the parameter type `T` may not live long enough
2- --> $DIR/static-lifetime-tip-with-default-type.rs:7 :24
2+ --> $DIR/static-lifetime-tip-with-default-type.rs:3 :24
33 |
44LL | struct Foo<T, K = i32>(&'static T, &'static K);
55 | ^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | struct Foo<T: 'static, K = i32>(&'static T, &'static K);
1313 | +++++++++
1414
1515error[E0310]: the parameter type `K` may not live long enough
16- --> $DIR/static-lifetime-tip-with-default-type.rs:7 :36
16+ --> $DIR/static-lifetime-tip-with-default-type.rs:3 :36
1717 |
1818LL | struct Foo<T, K = i32>(&'static T, &'static K);
1919 | ^^^^^^^^^^
@@ -27,7 +27,7 @@ LL | struct Foo<T, K: 'static = i32>(&'static T, &'static K);
2727 | +++++++++
2828
2929error[E0310]: the parameter type `T` may not live long enough
30- --> $DIR/static-lifetime-tip-with-default-type.rs:11 :28
30+ --> $DIR/static-lifetime-tip-with-default-type.rs:7 :28
3131 |
3232LL | struct Bar<r#T, r#K = i32>(&'static r#T, &'static r#K);
3333 | ^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | struct Bar<r#T: 'static, r#K = i32>(&'static r#T, &'static r#K);
4141 | +++++++++
4242
4343error[E0310]: the parameter type `K` may not live long enough
44- --> $DIR/static-lifetime-tip-with-default-type.rs:11 :42
44+ --> $DIR/static-lifetime-tip-with-default-type.rs:7 :42
4545 |
4646LL | struct Bar<r#T, r#K = i32>(&'static r#T, &'static r#K);
4747 | ^^^^^^^^^^^^
@@ -55,7 +55,7 @@ LL | struct Bar<r#T, r#K: 'static = i32>(&'static r#T, &'static r#K);
5555 | +++++++++
5656
5757error[E0310]: the parameter type `T` may not live long enough
58- --> $DIR/static-lifetime-tip-with-default-type.rs:15 :20
58+ --> $DIR/static-lifetime-tip-with-default-type.rs:11 :20
5959 |
6060LL | struct Boo<T= i32>(&'static T);
6161 | ^^^^^^^^^^
@@ -69,7 +69,7 @@ LL | struct Boo<T: 'static= i32>(&'static T);
6969 | +++++++++
7070
7171error[E0310]: the parameter type `T` may not live long enough
72- --> $DIR/static-lifetime-tip-with-default-type.rs:19 :8
72+ --> $DIR/static-lifetime-tip-with-default-type.rs:15 :8
7373 |
7474LL | = i32>(&'static T);
7575 | ^^^^^^^^^^
@@ -83,15 +83,15 @@ LL | struct Far<T: 'static
8383 | +++++++++
8484
8585error[E0392]: lifetime parameter `'a` is never used
86- --> $DIR/static-lifetime-tip-with-default-type.rs:22 :10
86+ --> $DIR/static-lifetime-tip-with-default-type.rs:18 :10
8787 |
8888LL | struct S<'a, K: 'a = i32>(&'static K);
8989 | ^^ unused lifetime parameter
9090 |
9191 = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
9292
9393error[E0310]: the parameter type `K` may not live long enough
94- --> $DIR/static-lifetime-tip-with-default-type.rs:22 :27
94+ --> $DIR/static-lifetime-tip-with-default-type.rs:18 :27
9595 |
9696LL | struct S<'a, K: 'a = i32>(&'static K);
9797 | ^^^^^^^^^^
0 commit comments