From 1efb7479ef95657a02d120356d35decaa163f9cc Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 22 Feb 2024 16:56:26 +0000 Subject: [PATCH] Remove some annotations that just specify the default --- .../impl-trait/higher-ranked-regions-diag.rs | 2 -- .../higher-ranked-regions-diag.stderr | 2 +- .../higher-ranked-regions-basic.rs | 2 -- .../higher-ranked-regions-basic.stderr | 24 +++++++++---------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.rs b/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.rs index 470022565f6da..02ed08bd6567b 100644 --- a/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.rs +++ b/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.rs @@ -1,8 +1,6 @@ // Regression test for #97099. // This was an ICE because `impl Sized` captures the lifetime 'a. -// check-fail - trait Trait { type Assoc; } diff --git a/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.stderr b/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.stderr index 8e6724fb9011f..c177c3bbf00be 100644 --- a/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.stderr +++ b/tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds - --> $DIR/higher-ranked-regions-diag.rs:21:5 + --> $DIR/higher-ranked-regions-diag.rs:19:5 | LL | fn bar() -> impl for<'a> Trait<&'a (), Assoc = impl Sized> { | -- ---------- opaque type defined here diff --git a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs index 7a2fddbd2ba69..34b94f2e1c782 100644 --- a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs +++ b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs @@ -1,7 +1,5 @@ // Basic tests for opaque type inference under for<_> binders. -// check-fail - #![feature(type_alias_impl_trait)] trait Trait<'a> { diff --git a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr index 9db437c902c0f..fb1e4cca3f40b 100644 --- a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr +++ b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr @@ -1,5 +1,5 @@ error[E0792]: expected generic lifetime parameter, found `'a` - --> $DIR/higher-ranked-regions-basic.rs:17:55 + --> $DIR/higher-ranked-regions-basic.rs:15:55 | LL | type Opq<'a> = impl Sized + 'a; | -- this generic parameter must be used with a generic lifetime parameter @@ -7,7 +7,7 @@ LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq<'a>> {} | ^^ error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds - --> $DIR/higher-ranked-regions-basic.rs:23:58 + --> $DIR/higher-ranked-regions-basic.rs:21:58 | LL | fn test() -> impl for<'a> Trait<'a, Ty = impl Sized> {} | -- ---------- ^^ @@ -16,7 +16,7 @@ LL | fn test() -> impl for<'a> Trait<'a, Ty = impl Sized> {} | hidden type `&'a ()` captures the lifetime `'a` as defined here error[E0700]: hidden type for `capture_tait::Opq0` captures lifetime that does not appear in bounds - --> $DIR/higher-ranked-regions-basic.rs:32:23 + --> $DIR/higher-ranked-regions-basic.rs:30:23 | LL | type Opq0 = impl Sized; | ---------- opaque type defined here @@ -27,7 +27,7 @@ LL | fn test() -> Opq2 {} | ^^ error[E0792]: expected generic lifetime parameter, found `'a` - --> $DIR/higher-ranked-regions-basic.rs:41:23 + --> $DIR/higher-ranked-regions-basic.rs:39:23 | LL | type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'b>>; // <- Note 'b | -- this generic parameter must be used with a generic lifetime parameter @@ -36,7 +36,7 @@ LL | fn test() -> Opq2 {} | ^^ error[E0700]: hidden type for `capture_tait_complex_fail::Opq0<'a>` captures lifetime that does not appear in bounds - --> $DIR/higher-ranked-regions-basic.rs:51:23 + --> $DIR/higher-ranked-regions-basic.rs:49:23 | LL | type Opq0<'a> = impl Sized; | ---------- opaque type defined here @@ -47,19 +47,19 @@ LL | fn test() -> Opq2 {} | ^^ error[E0792]: non-defining opaque type use in defining scope - --> $DIR/higher-ranked-regions-basic.rs:59:41 + --> $DIR/higher-ranked-regions-basic.rs:57:41 | LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {} | ^^^^^^^^^^^^^^^^^^^^^^ argument `'static` is not a generic parameter | note: for this opaque type - --> $DIR/higher-ranked-regions-basic.rs:58:25 + --> $DIR/higher-ranked-regions-basic.rs:56:25 | LL | type Opq0<'a, 'b> = impl Sized; | ^^^^^^^^^^ error[E0792]: expected generic lifetime parameter, found `'a` - --> $DIR/higher-ranked-regions-basic.rs:59:65 + --> $DIR/higher-ranked-regions-basic.rs:57:65 | LL | type Opq0<'a, 'b> = impl Sized; | -- this generic parameter must be used with a generic lifetime parameter @@ -67,19 +67,19 @@ LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {} | ^^ error: non-defining opaque type use in defining scope - --> $DIR/higher-ranked-regions-basic.rs:68:41 + --> $DIR/higher-ranked-regions-basic.rs:66:41 | LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {} | ^^^^^^^^^^^^^^^^^ generic argument `'a` used twice | note: for this opaque type - --> $DIR/higher-ranked-regions-basic.rs:67:25 + --> $DIR/higher-ranked-regions-basic.rs:65:25 | LL | type Opq0<'a, 'b> = impl Sized; | ^^^^^^^^^^ error[E0792]: expected generic lifetime parameter, found `'a` - --> $DIR/higher-ranked-regions-basic.rs:68:60 + --> $DIR/higher-ranked-regions-basic.rs:66:60 | LL | type Opq0<'a, 'b> = impl Sized; | -- this generic parameter must be used with a generic lifetime parameter @@ -87,7 +87,7 @@ LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {} | ^^ error[E0792]: expected generic lifetime parameter, found `'a` - --> $DIR/higher-ranked-regions-basic.rs:78:23 + --> $DIR/higher-ranked-regions-basic.rs:76:23 | LL | type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a, 'b>>; | -- this generic parameter must be used with a generic lifetime parameter