File tree Expand file tree Collapse file tree 6 files changed +12
-33
lines changed
src/test/ui/rfc1598-generic-associated-types Expand file tree Collapse file tree 6 files changed +12
-33
lines changed Original file line number Diff line number Diff line change 1010
1111#![ feature( generic_associated_types) ]
1212
13- //FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR
13+ //FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
14+ //follow-up PR
1415
1516trait Foo {
1617 type Bar < ' a , ' b > ;
@@ -22,8 +23,7 @@ trait Baz {
2223
2324impl < T > Baz for T where T : Foo {
2425 type Quux < ' a > = <T as Foo >:: Bar < ' a , ' static > ;
25- //~^ ERROR undeclared lifetime
26- //~| ERROR lifetime parameters are not allowed on this type [E0110]
26+ //~^ ERROR lifetime parameters are not allowed on this type [E0110]
2727}
2828
2929fn main ( ) { }
Original file line number Diff line number Diff line change 1- error[E0261]: use of undeclared lifetime name `'a`
2- --> $DIR/construct_with_other_type.rs:24:37
3- |
4- 24 | type Quux<'a> = <T as Foo>::Bar<'a, 'static>;
5- | ^^ undeclared lifetime
6-
71error[E0110]: lifetime parameters are not allowed on this type
8- --> $DIR/construct_with_other_type.rs:24 :37
2+ --> $DIR/construct_with_other_type.rs:25 :37
93 |
10- 24 | type Quux<'a> = <T as Foo>::Bar<'a, 'static>;
4+ 25 | type Quux<'a> = <T as Foo>::Bar<'a, 'static>;
115 | ^^ lifetime parameter not allowed on this type
126
13- error: aborting due to 2 previous errors
7+ error: aborting due to previous error
148
Original file line number Diff line number Diff line change 1313// Checking the interaction with this other feature
1414#![ feature( associated_type_defaults) ]
1515
16- //FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR
17-
1816use std:: fmt:: { Display , Debug } ;
1917
2018trait Foo {
@@ -32,7 +30,6 @@ impl Foo for Bar {
3230 type Assoc2 < T > = Vec < T > ;
3331 type Assoc3 < T > where T : Iterator = Vec < T > ;
3432 type WithDefault < ' a , T > = & ' a Iterator < T > ;
35- //~^ ERROR undeclared lifetime
3633 type NoGenerics = :: std:: cell:: Cell < i32 > ;
3734}
3835
Original file line number Diff line number Diff line change 1- error[E0261]: use of undeclared lifetime name `'a`
2- --> $DIR/generic-associated-types-where.rs:34:32
3- |
4- 34 | type WithDefault<'a, T> = &'a Iterator<T>;
5- | ^^ undeclared lifetime
6-
71error: cannot continue compilation due to previous error
82
Original file line number Diff line number Diff line change 1010
1111#![ feature( generic_associated_types) ]
1212
13- //FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR
13+ //FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
14+ //follow-up PR
1415
1516trait Iterable {
1617 type Item < ' a > ;
1718 type Iter < ' a > : Iterator < Item = Self :: Item < ' a > > ;
18- //~^ ERROR undeclared lifetime
19- //~| ERROR lifetime parameters are not allowed on this type [E0110]
19+ //~^ ERROR lifetime parameters are not allowed on this type [E0110]
2020
2121 fn iter < ' a > ( & ' a self ) -> Self :: Iter < ' a > ;
2222 //~^ ERROR lifetime parameters are not allowed on this type [E0110]
Original file line number Diff line number Diff line change 1- error[E0261]: use of undeclared lifetime name `'a`
2- --> $DIR/iterable.rs:17:47
3- |
4- 17 | type Iter<'a>: Iterator<Item = Self::Item<'a>>;
5- | ^^ undeclared lifetime
6-
71error[E0110]: lifetime parameters are not allowed on this type
8- --> $DIR/iterable.rs:17 :47
2+ --> $DIR/iterable.rs:18 :47
93 |
10- 17 | type Iter<'a>: Iterator<Item = Self::Item<'a>>;
4+ 18 | type Iter<'a>: Iterator<Item = Self::Item<'a>>;
115 | ^^ lifetime parameter not allowed on this type
126
137error[E0110]: lifetime parameters are not allowed on this type
@@ -16,5 +10,5 @@ error[E0110]: lifetime parameters are not allowed on this type
161021 | fn iter<'a>(&'a self) -> Self::Iter<'a>;
1711 | ^^ lifetime parameter not allowed on this type
1812
19- error: aborting due to 3 previous errors
13+ error: aborting due to 2 previous errors
2014
You can’t perform that action at this time.
0 commit comments