Skip to content

Commit 4f90eac

Browse files
committed
Updating tests to remove all "undeclared lifetime" errors (since those should no longer occur)
1 parent 8cfaf1b commit 4f90eac

6 files changed

+12
-33
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
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

1516
trait Foo {
1617
type Bar<'a, 'b>;
@@ -22,8 +23,7 @@ trait Baz {
2223

2324
impl<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

2929
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
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-
71
error[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

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

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
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-
1816
use std::fmt::{Display, Debug};
1917

2018
trait 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 numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
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-
71
error: cannot continue compilation due to previous error
82

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
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

1516
trait 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 numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
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-
71
error[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

137
error[E0110]: lifetime parameters are not allowed on this type
@@ -16,5 +10,5 @@ error[E0110]: lifetime parameters are not allowed on this type
1610
21 | 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

0 commit comments

Comments
 (0)