From 046c28f086b93dda26514cc6c924fcf6db29acf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Sat, 24 Feb 2024 17:04:37 +0000 Subject: [PATCH] Fix invalid compiletest directives in tests - Fix invalid directive in `normalize-hidden-types` - Update legacy directive in `two-phase-reservation-sharing-interference` --- .../two-phase-reservation-sharing-interference.rs | 2 +- .../normalize-hidden-types.current.stderr | 12 ++++++------ .../type-alias-impl-trait/normalize-hidden-types.rs | 6 +----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs index ac0d4f6e09975..b6bcf7b66173e 100644 --- a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs +++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs @@ -2,7 +2,7 @@ // The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs //@[nll_beyond]compile-flags: -Z two-phase-beyond-autoref -//[nll_beyond]should-fail +//@[nll_beyond]should-fail // This is a corner case that the current implementation is (probably) // treating more conservatively than is necessary. But it also does diff --git a/tests/ui/type-alias-impl-trait/normalize-hidden-types.current.stderr b/tests/ui/type-alias-impl-trait/normalize-hidden-types.current.stderr index dd2737c706d6b..d9d5dd4ece3b1 100644 --- a/tests/ui/type-alias-impl-trait/normalize-hidden-types.current.stderr +++ b/tests/ui/type-alias-impl-trait/normalize-hidden-types.current.stderr @@ -5,25 +5,25 @@ LL | fn define() -> Opaque { | ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(::Gat<'a>)` | note: previous use here - --> $DIR/normalize-hidden-types.rs:27:9 + --> $DIR/normalize-hidden-types.rs:26:9 | LL | dyn_hoops::<_>(0) | ^^^^^^^^^^^^^^^^^ error: concrete type differs from previous defining opaque type use - --> $DIR/normalize-hidden-types.rs:34:22 + --> $DIR/normalize-hidden-types.rs:33:22 | LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) } | ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(::Gat<'a>)` | note: previous use here - --> $DIR/normalize-hidden-types.rs:34:31 + --> $DIR/normalize-hidden-types.rs:33:31 | LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) } | ^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/normalize-hidden-types.rs:44:25 + --> $DIR/normalize-hidden-types.rs:42:25 | LL | type Opaque = impl Sized; | ---------- the expected opaque type @@ -39,13 +39,13 @@ LL | let _: Opaque = dyn_hoops::(0); = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error: concrete type differs from previous defining opaque type use - --> $DIR/normalize-hidden-types.rs:54:25 + --> $DIR/normalize-hidden-types.rs:51:25 | LL | let _: Opaque = dyn_hoops::<_>(0); | ^^^^^^^^^^^^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(::Gat<'a>)` | note: previous use here - --> $DIR/normalize-hidden-types.rs:56:9 + --> $DIR/normalize-hidden-types.rs:52:9 | LL | None | ^^^^ diff --git a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs index e78e6cf7690e7..d6800694e5133 100644 --- a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs +++ b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs @@ -3,7 +3,7 @@ //@ revisions: current next //@ [next] compile-flags: -Znext-solver //@ [next] check-pass -//@ [current]: known-bug: #112691 +//@ [current] known-bug: #112691 #![feature(type_alias_impl_trait)] @@ -23,7 +23,6 @@ mod typeof_1 { use super::*; type Opaque = impl Sized; fn define() -> Opaque { - //[current]~^ ERROR concrete type differs dyn_hoops::<_>(0) } } @@ -32,7 +31,6 @@ mod typeof_2 { use super::*; type Opaque = impl Sized; fn define_1() -> Opaque { dyn_hoops::<_>(0) } - //[current]~^ ERROR concrete type differs fn define_2() -> Opaque { dyn_hoops::(0) } } @@ -42,7 +40,6 @@ mod typeck { fn define() -> Option { let _: Opaque = dyn_hoops::<_>(0); let _: Opaque = dyn_hoops::(0); - //[current]~^ ERROR mismatched types None } } @@ -52,7 +49,6 @@ mod borrowck { type Opaque = impl Sized; fn define() -> Option { let _: Opaque = dyn_hoops::<_>(0); - //[current]~^ ERROR concrete type differs None } }