Skip to content

Commit bc8cead

Browse files
committed
Account for warning in existing GAT tests
1 parent d305f68 commit bc8cead

18 files changed

+115
-47
lines changed

src/test/ui/rfc1598-generic-associated-types/collections.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
// except according to those terms.
1010

1111
#![feature(generic_associated_types)]
12+
//~^ WARNING the feature `generic_associated_types` is incomplete
1213
#![feature(associated_type_defaults)]
1314

14-
//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
15-
//follow-up PR
15+
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
16+
// follow-up PR.
1617

1718
// A Collection trait and collection families. Based on
1819
// http://smallcultfollowing.com/babysteps/blog/2016/11/03/

src/test/ui/rfc1598-generic-associated-types/collections.stderr

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1+
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
2+
--> $DIR/collections.rs:11:12
3+
|
4+
LL | #![feature(generic_associated_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+
17
error[E0109]: type parameters are not allowed on this type
2-
--> $DIR/collections.rs:65:90
8+
--> $DIR/collections.rs:66:90
39
|
410
LL | fn floatify<C>(ints: &C) -> <<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>
511
| ^^^ type parameter not allowed
612

713
error[E0109]: type parameters are not allowed on this type
8-
--> $DIR/collections.rs:77:69
14+
--> $DIR/collections.rs:78:69
915
|
1016
LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
1117
| ^^^ type parameter not allowed
1218

1319
error[E0109]: type parameters are not allowed on this type
14-
--> $DIR/collections.rs:26:71
20+
--> $DIR/collections.rs:27:71
1521
|
1622
LL | <<Self as Collection<T>>::Family as CollectionFamily>::Member<U>;
1723
| ^ type parameter not allowed
1824

1925
error[E0110]: lifetime parameters are not allowed on this type
20-
--> $DIR/collections.rs:33:50
26+
--> $DIR/collections.rs:34:50
2127
|
2228
LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter>;
2329
| ^^^^^ lifetime parameter not allowed
2430

2531
error[E0110]: lifetime parameters are not allowed on this type
26-
--> $DIR/collections.rs:59:50
32+
--> $DIR/collections.rs:60:50
2733
|
2834
LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter> {
2935
| ^^^^^ lifetime parameter not allowed

src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
// except according to those terms.
1010

1111
#![feature(generic_associated_types)]
12+
//~^ WARNING the feature `generic_associated_types` is incomplete
1213

1314
use std::ops::Deref;
1415

15-
//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
16-
//follow-up PR
16+
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
17+
// follow-up PR.
1718

1819
trait Foo {
1920
type Bar<'a, 'b>;

src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
2+
--> $DIR/construct_with_other_type.rs:11:12
3+
|
4+
LL | #![feature(generic_associated_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+
17
error[E0110]: lifetime parameters are not allowed on this type
2-
--> $DIR/construct_with_other_type.rs:26:46
8+
--> $DIR/construct_with_other_type.rs:27:46
39
|
410
LL | type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
511
| ^^ lifetime parameter not allowed
612

713
error[E0110]: lifetime parameters are not allowed on this type
8-
--> $DIR/construct_with_other_type.rs:26:63
14+
--> $DIR/construct_with_other_type.rs:27:63
915
|
1016
LL | type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
1117
| ^^ lifetime parameter not allowed
1218

1319
error[E0110]: lifetime parameters are not allowed on this type
14-
--> $DIR/construct_with_other_type.rs:34:40
20+
--> $DIR/construct_with_other_type.rs:35:40
1521
|
1622
LL | type Baa<'a> = &'a <T as Foo>::Bar<'a, 'static>;
1723
| ^^ lifetime parameter not allowed

src/test/ui/rfc1598-generic-associated-types/empty_generics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(generic_associated_types)]
12+
//~^ WARNING the feature `generic_associated_types` is incomplete
1213

1314
trait Foo {
1415
type Bar<,>;
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
error: expected one of `>`, identifier, or lifetime, found `,`
2-
--> $DIR/empty_generics.rs:14:14
2+
--> $DIR/empty_generics.rs:15:14
33
|
44
LL | type Bar<,>;
55
| ^ expected one of `>`, identifier, or lifetime here
66

7+
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
8+
--> $DIR/empty_generics.rs:11:12
9+
|
10+
LL | #![feature(generic_associated_types)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^
12+
713
error: aborting due to previous error
814

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
2+
--> $DIR/generic-associated-types-where.rs:11:12
3+
|
4+
LL | #![feature(generic_associated_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+

src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
// except according to those terms.
1010

1111
#![feature(generic_associated_types)]
12+
//~^ WARNING the feature `generic_associated_types` is incomplete
1213

1314
use std::ops::Deref;
1415

15-
//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
16-
//follow-up PR
16+
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
17+
// follow-up PR.
1718

1819
trait Iterable {
1920
type Item<'a>;

src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1+
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
2+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:12
3+
|
4+
LL | #![feature(generic_associated_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+
17
error[E0261]: use of undeclared lifetime name `'b`
2-
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37
8+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:23:37
39
|
410
LL | + Deref<Target = Self::Item<'b>>;
511
| ^^ undeclared lifetime
612

713
error[E0261]: use of undeclared lifetime name `'undeclared`
8-
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41
14+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:27:41
915
|
1016
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
1117
| ^^^^^^^^^^^ undeclared lifetime
1218

1319
error[E0110]: lifetime parameters are not allowed on this type
14-
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:20:47
20+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:21:47
1521
|
1622
LL | type Iter<'a>: Iterator<Item = Self::Item<'a>>
1723
| ^^ lifetime parameter not allowed
1824

1925
error[E0110]: lifetime parameters are not allowed on this type
20-
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37
26+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:23:37
2127
|
2228
LL | + Deref<Target = Self::Item<'b>>;
2329
| ^^ lifetime parameter not allowed
2430

2531
error[E0110]: lifetime parameters are not allowed on this type
26-
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41
32+
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:27:41
2733
|
2834
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
2935
| ^^^^^^^^^^^ lifetime parameter not allowed

src/test/ui/rfc1598-generic-associated-types/iterable.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
// except according to those terms.
1010

1111
#![feature(generic_associated_types)]
12+
//~^ WARNING the feature `generic_associated_types` is incomplete
1213

1314
use std::ops::Deref;
1415

15-
//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
16-
//follow-up PR
16+
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
17+
// follow-up PR.
1718

1819
trait Iterable {
1920
type Item<'a>;

0 commit comments

Comments
 (0)