diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/underscore-lifetime | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/underscore-lifetime')
30 files changed, 0 insertions, 468 deletions
diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs deleted file mode 100644 index e1deab736..000000000 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Check that the `'_` in `dyn Trait + '_` acts like ordinary elision, -// and not like an object lifetime default. -// -// cc #48468 - -use std::fmt::Debug; - -struct Foo { - x: Box<dyn Debug + '_>, //~ ERROR missing lifetime specifier -} - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr deleted file mode 100644 index fd0860028..000000000 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0106]: missing lifetime specifier - --> $DIR/dyn-trait-underscore-in-struct.rs:9:24 - | -LL | x: Box<dyn Debug + '_>, - | ^^ expected named lifetime parameter - | -help: consider introducing a named lifetime parameter - | -LL ~ struct Foo<'a> { -LL ~ x: Box<dyn Debug + 'a>, - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs b/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs deleted file mode 100644 index fa6e65c7d..000000000 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Check that the `'_` in `dyn Trait + '_` acts like ordinary elision, -// and not like an object lifetime default. -// -// cc #48468 - -fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> { - // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` - Box::new(items.iter()) - //~^ ERROR lifetime may not live long enough -} - -fn b<T>(items: &[T]) -> Box<dyn Iterator<Item=&T> + '_> { - Box::new(items.iter()) // OK, equivalent to c -} - -fn c<'a, T>(items: &'a [T]) -> Box<dyn Iterator<Item=&'a T> + 'a> { - Box::new(items.iter()) // OK, equivalent to b -} - -fn main() { } diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr deleted file mode 100644 index 60b0b3ee7..000000000 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: lifetime may not live long enough - --> $DIR/dyn-trait-underscore.rs:8:5 - | -LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> { - | - let's call the lifetime of this reference `'1` -LL | // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` -LL | Box::new(items.iter()) - | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static` - | -help: to declare that the trait object captures data from argument `items`, you can add an explicit `'_` lifetime bound - | -LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T> + '_> { - | ++++ - -error: aborting due to previous error - diff --git a/src/test/ui/underscore-lifetime/in-binder.rs b/src/test/ui/underscore-lifetime/in-binder.rs deleted file mode 100644 index 74dc331b0..000000000 --- a/src/test/ui/underscore-lifetime/in-binder.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Check that we error when `'_` appears as the name of a lifetime parameter. -// -// Regression test for #52098. - -struct IceCube<'a> { - v: Vec<&'a char> -} - -impl<'_> IceCube<'_> {} -//~^ ERROR `'_` cannot be used here - -struct Struct<'_> { - //~^ ERROR `'_` cannot be used here - v: Vec<&'static char> -} - -enum Enum<'_> { - //~^ ERROR `'_` cannot be used here - Variant -} - -union Union<'_> { - //~^ ERROR `'_` cannot be used here - a: u32 -} - -trait Trait<'_> { - //~^ ERROR `'_` cannot be used here -} - -fn foo<'_>() { - //~^ ERROR `'_` cannot be used here -} - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/in-binder.stderr b/src/test/ui/underscore-lifetime/in-binder.stderr deleted file mode 100644 index fcd7eddb5..000000000 --- a/src/test/ui/underscore-lifetime/in-binder.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:9:6 - | -LL | impl<'_> IceCube<'_> {} - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:12:15 - | -LL | struct Struct<'_> { - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:17:11 - | -LL | enum Enum<'_> { - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:22:13 - | -LL | union Union<'_> { - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:27:13 - | -LL | trait Trait<'_> { - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/in-binder.rs:31:8 - | -LL | fn foo<'_>() { - | ^^ `'_` is a reserved lifetime name - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/in-fn-return-illegal.rs b/src/test/ui/underscore-lifetime/in-fn-return-illegal.rs deleted file mode 100644 index a46ece7d4..000000000 --- a/src/test/ui/underscore-lifetime/in-fn-return-illegal.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Check that the `'_` used in structs/enums gives an error. - -use std::fmt::Debug; - -fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR missing lifetime specifier - -fn main() { } diff --git a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr deleted file mode 100644 index 6a104e8f9..000000000 --- a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0106]: missing lifetime specifier - --> $DIR/in-fn-return-illegal.rs:5:30 - | -LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } - | ---- ---- ^^ expected named lifetime parameter - | - = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y` -help: consider introducing a named lifetime parameter - | -LL | fn foo<'a>(x: &'a u32, y: &'a u32) -> &'a u32 { loop { } } - | ++++ ++ ++ ~~ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/in-struct.rs b/src/test/ui/underscore-lifetime/in-struct.rs deleted file mode 100644 index bed89c7dc..000000000 --- a/src/test/ui/underscore-lifetime/in-struct.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Check that the `'_` used in structs/enums gives an error. - -use std::fmt::Debug; - -struct Foo { - x: &'_ u32, //~ ERROR missing lifetime specifier -} - -enum Bar { - Variant(&'_ u32), //~ ERROR missing lifetime specifier -} - -fn main() { } diff --git a/src/test/ui/underscore-lifetime/in-struct.stderr b/src/test/ui/underscore-lifetime/in-struct.stderr deleted file mode 100644 index 84183f61e..000000000 --- a/src/test/ui/underscore-lifetime/in-struct.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error[E0106]: missing lifetime specifier - --> $DIR/in-struct.rs:6:9 - | -LL | x: &'_ u32, - | ^^ expected named lifetime parameter - | -help: consider introducing a named lifetime parameter - | -LL ~ struct Foo<'a> { -LL ~ x: &'a u32, - | - -error[E0106]: missing lifetime specifier - --> $DIR/in-struct.rs:10:14 - | -LL | Variant(&'_ u32), - | ^^ expected named lifetime parameter - | -help: consider introducing a named lifetime parameter - | -LL ~ enum Bar<'a> { -LL ~ Variant(&'a u32), - | - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs deleted file mode 100644 index 3d049cc56..000000000 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs +++ /dev/null @@ -1,22 +0,0 @@ -struct Foo<'a>(&'a u8); -struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier - -fn foo<'_> //~ ERROR cannot be used here -(_: Foo<'_>) {} - -trait Meh<'a> {} -impl<'a> Meh<'a> for u8 {} - -fn meh() -> Box<dyn for<'_> Meh<'_>> //~ ERROR cannot be used here -//~^ ERROR missing lifetime specifier -{ - Box::new(5u8) -} - -fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } //~ ERROR missing lifetime specifier - -fn main() { - let x = 5; - foo(Foo(&x)); - let _ = meh(); -} diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr deleted file mode 100644 index 50401791e..000000000 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr +++ /dev/null @@ -1,51 +0,0 @@ -error[E0106]: missing lifetime specifier - --> $DIR/underscore-lifetime-binders.rs:2:17 - | -LL | struct Baz<'a>(&'_ &'a u8); - | ^^ expected named lifetime parameter - | -help: consider using the `'a` lifetime - | -LL | struct Baz<'a>(&'a &'a u8); - | ~~ - -error[E0637]: `'_` cannot be used here - --> $DIR/underscore-lifetime-binders.rs:4:8 - | -LL | fn foo<'_> - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/underscore-lifetime-binders.rs:10:25 - | -LL | fn meh() -> Box<dyn for<'_> Meh<'_>> - | ^^ `'_` is a reserved lifetime name - -error[E0106]: missing lifetime specifier - --> $DIR/underscore-lifetime-binders.rs:10:33 - | -LL | fn meh() -> Box<dyn for<'_> Meh<'_>> - | ^^ expected named lifetime parameter - | - = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime - | -LL | fn meh() -> Box<dyn for<'_> Meh<'static>> - | ~~~~~~~ - -error[E0106]: missing lifetime specifier - --> $DIR/underscore-lifetime-binders.rs:16:35 - | -LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } - | ------ ------ ^^ expected named lifetime parameter - | - = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or `y` -help: consider introducing a named lifetime parameter - | -LL | fn foo2<'a>(_: &'a u8, y: &'a u8) -> &'a u8 { y } - | ++++ ~~ ~~ ~~ - -error: aborting due to 5 previous errors - -Some errors have detailed explanations: E0106, E0637. -For more information about an error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.rs b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.rs deleted file mode 100644 index c61126884..000000000 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } -//~^ ERROR lifetime may not live long enough - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr deleted file mode 100644 index 2b34f0c55..000000000 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: lifetime may not live long enough - --> $DIR/underscore-lifetime-elison-mismatch.rs:1:42 - | -LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } - | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2` - | | | - | | let's call the lifetime of this reference `'1` - | let's call the lifetime of this reference `'2` - | -help: consider introducing a named lifetime parameter - | -LL | fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } - | ++++ ~~ ~~ - -error: aborting due to previous error - diff --git a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs deleted file mode 100644 index 567cc7a3f..000000000 --- a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Regression test to check that `'b: '_` gets an error, because it's -// basically useless. -// -// #54902 - -trait Foo<'a> {} -impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here -fn main() { } diff --git a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr deleted file mode 100644 index 4b38a26f9..000000000 --- a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/underscore-outlives-bounds.rs:7:10 - | -LL | impl<'b: '_> Foo<'b> for i32 {} - | ^^ `'_` is a reserved lifetime name - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs deleted file mode 100644 index 43de30944..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs +++ /dev/null @@ -1,18 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType<T> {} -trait WithRegion<'a> { } - -struct Foo<T> { - t: T -} - -impl<T> Foo<T> -where - T: WithType<&u32> -//[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here -//[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here -{ } - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr deleted file mode 100644 index fe726cb49..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr deleted file mode 100644 index fe726cb49..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs deleted file mode 100644 index 38189816d..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs +++ /dev/null @@ -1,17 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType<T> {} -trait WithRegion<'a> { } - -struct Foo<T> { - t: T -} - -impl<T> Foo<T> -where - T: WithRegion<'_> -//[rust2015,rust2018]~^ ERROR `'_` cannot be used here -{ } - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr deleted file mode 100644 index 95939fd6b..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/where-clause-inherent-impl-underscore.rs:13:19 - | -LL | T: WithRegion<'_> - | ^^ `'_` is a reserved lifetime name - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr deleted file mode 100644 index 95939fd6b..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/where-clause-inherent-impl-underscore.rs:13:19 - | -LL | T: WithRegion<'_> - | ^^ `'_` is a reserved lifetime name - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs deleted file mode 100644 index 09e5bbd84..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs +++ /dev/null @@ -1,15 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType<T> {} -trait WithRegion<'a> { } - -trait Foo { } - -impl<T> Foo for Vec<T> -where - T: WithType<&u32> -//[rust2015,rust2018]~^ ERROR `&` without an explicit lifetime name cannot be used here -{ } - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr deleted file mode 100644 index fbd14de21..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-trait-impl-region.rs:11:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr deleted file mode 100644 index fbd14de21..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-trait-impl-region.rs:11:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs deleted file mode 100644 index 371d2e4ba..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs +++ /dev/null @@ -1,15 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType<T> {} -trait WithRegion<'a> { } - -trait Foo { } - -impl<T> Foo for Vec<T> -where - T: WithRegion<'_> -//[rust2015,rust2018]~^ ERROR `'_` cannot be used here -{ } - -fn main() {} diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr deleted file mode 100644 index 92caff0dc..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/where-clause-trait-impl-underscore.rs:11:19 - | -LL | T: WithRegion<'_> - | ^^ `'_` is a reserved lifetime name - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr deleted file mode 100644 index 92caff0dc..000000000 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/where-clause-trait-impl-underscore.rs:11:19 - | -LL | T: WithRegion<'_> - | ^^ `'_` is a reserved lifetime name - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clauses.rs b/src/test/ui/underscore-lifetime/where-clauses.rs deleted file mode 100644 index ee6823b80..000000000 --- a/src/test/ui/underscore-lifetime/where-clauses.rs +++ /dev/null @@ -1,7 +0,0 @@ -trait Foo<'a> {} - -impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here - -impl<T: '_> Foo<'static> for Vec<T> {} //~ ERROR `'_` cannot be used here - -fn main() { } diff --git a/src/test/ui/underscore-lifetime/where-clauses.stderr b/src/test/ui/underscore-lifetime/where-clauses.stderr deleted file mode 100644 index 1a3ea4af7..000000000 --- a/src/test/ui/underscore-lifetime/where-clauses.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0637]: `'_` cannot be used here - --> $DIR/where-clauses.rs:3:10 - | -LL | impl<'b: '_> Foo<'b> for i32 {} - | ^^ `'_` is a reserved lifetime name - -error[E0637]: `'_` cannot be used here - --> $DIR/where-clauses.rs:5:9 - | -LL | impl<T: '_> Foo<'static> for Vec<T> {} - | ^^ `'_` is a reserved lifetime name - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0637`. |