From 4f90eacbfecb2a994532ff4ff3beb3cbda40d622 Mon Sep 17 00:00:00 2001 From: Sunjay Varma Date: Wed, 13 Dec 2017 18:27:53 -0500 Subject: [PATCH] Updating tests to remove all "undeclared lifetime" errors (since those should no longer occur) --- .../construct_with_other_type.rs | 6 +++--- .../construct_with_other_type.stderr | 12 +++--------- .../generic-associated-types-where.rs | 3 --- .../generic-associated-types-where.stderr | 6 ------ .../ui/rfc1598-generic-associated-types/iterable.rs | 6 +++--- .../rfc1598-generic-associated-types/iterable.stderr | 12 +++--------- 6 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.rs b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.rs index 208fc2ea089..0d9b487876e 100644 --- a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.rs +++ b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.rs @@ -10,7 +10,8 @@ #![feature(generic_associated_types)] -//FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR +//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a +//follow-up PR trait Foo { type Bar<'a, 'b>; @@ -22,8 +23,7 @@ trait Baz { impl Baz for T where T: Foo { type Quux<'a> = ::Bar<'a, 'static>; - //~^ ERROR undeclared lifetime - //~| ERROR lifetime parameters are not allowed on this type [E0110] + //~^ ERROR lifetime parameters are not allowed on this type [E0110] } fn main() {} diff --git a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr index 6a2047d10e6..e74592fa9ff 100644 --- a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr @@ -1,14 +1,8 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/construct_with_other_type.rs:24:37 - | -24 | type Quux<'a> = ::Bar<'a, 'static>; - | ^^ undeclared lifetime - error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/construct_with_other_type.rs:24:37 + --> $DIR/construct_with_other_type.rs:25:37 | -24 | type Quux<'a> = ::Bar<'a, 'static>; +25 | type Quux<'a> = ::Bar<'a, 'static>; | ^^ lifetime parameter not allowed on this type -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs index eec061bc96b..9b59b24b105 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs +++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs @@ -13,8 +13,6 @@ // Checking the interaction with this other feature #![feature(associated_type_defaults)] -//FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR - use std::fmt::{Display, Debug}; trait Foo { @@ -32,7 +30,6 @@ impl Foo for Bar { type Assoc2 = Vec; type Assoc3 where T: Iterator = Vec; type WithDefault<'a, T> = &'a Iterator; - //~^ ERROR undeclared lifetime type NoGenerics = ::std::cell::Cell; } diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr index b99cb2a1830..bb55d86f620 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr @@ -1,8 +1,2 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/generic-associated-types-where.rs:34:32 - | -34 | type WithDefault<'a, T> = &'a Iterator; - | ^^ undeclared lifetime - error: cannot continue compilation due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.rs b/src/test/ui/rfc1598-generic-associated-types/iterable.rs index 219554b587a..94b2fc4062f 100644 --- a/src/test/ui/rfc1598-generic-associated-types/iterable.rs +++ b/src/test/ui/rfc1598-generic-associated-types/iterable.rs @@ -10,13 +10,13 @@ #![feature(generic_associated_types)] -//FIXME(#44265): "undeclared lifetime" errors will be addressed in a follow-up PR +//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a +//follow-up PR trait Iterable { type Item<'a>; type Iter<'a>: Iterator>; - //~^ ERROR undeclared lifetime - //~| ERROR lifetime parameters are not allowed on this type [E0110] + //~^ ERROR lifetime parameters are not allowed on this type [E0110] fn iter<'a>(&'a self) -> Self::Iter<'a>; //~^ ERROR lifetime parameters are not allowed on this type [E0110] diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr index fb91d38ba7a..9d325cb0855 100644 --- a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr @@ -1,13 +1,7 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/iterable.rs:17:47 - | -17 | type Iter<'a>: Iterator>; - | ^^ undeclared lifetime - error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:17:47 + --> $DIR/iterable.rs:18:47 | -17 | type Iter<'a>: Iterator>; +18 | type Iter<'a>: Iterator>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type @@ -16,5 +10,5 @@ error[E0110]: lifetime parameters are not allowed on this type 21 | fn iter<'a>(&'a self) -> Self::Iter<'a>; | ^^ lifetime parameter not allowed on this type -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors