From de3857e553b0bfaff2a6bc42a03fc9c8df9f777b 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: Sun, 7 Apr 2024 16:36:44 +0000 Subject: [PATCH] tests/ui: remove workaround for broken revisioned run-rustfix test --- .../ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed | 2 -- .../ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr | 2 +- .../ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr | 6 +++--- tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs | 2 -- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed index aee05f5e51211..4f5310082e18d 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed @@ -2,8 +2,6 @@ //@[old] edition:2015 //@[new] edition:2021 //@[new] run-rustfix -// FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` -#![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] fn ord_prefer_dot(s: String) -> impl Ord { //~^ ERROR the trait `Ord` cannot be made into an object diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr index 52db31d620c3d..efddab6dff63d 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Ord` cannot be made into an object - --> $DIR/bare-trait-dont-suggest-dyn.rs:8:33 + --> $DIR/bare-trait-dont-suggest-dyn.rs:6:33 | LL | fn ord_prefer_dot(s: String) -> Ord { | ^^^ `Ord` cannot be made into an object diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr index f795e910d2152..0545a1afcc143 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr @@ -1,5 +1,5 @@ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/bare-trait-dont-suggest-dyn.rs:8:33 + --> $DIR/bare-trait-dont-suggest-dyn.rs:6:33 | LL | fn ord_prefer_dot(s: String) -> Ord { | ^^^ @@ -7,7 +7,7 @@ LL | fn ord_prefer_dot(s: String) -> Ord { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see note: the lint level is defined here - --> $DIR/bare-trait-dont-suggest-dyn.rs:7:9 + --> $DIR/bare-trait-dont-suggest-dyn.rs:5:9 | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | fn ord_prefer_dot(s: String) -> dyn Ord { | +++ error[E0038]: the trait `Ord` cannot be made into an object - --> $DIR/bare-trait-dont-suggest-dyn.rs:8:33 + --> $DIR/bare-trait-dont-suggest-dyn.rs:6:33 | LL | fn ord_prefer_dot(s: String) -> Ord { | ^^^ `Ord` cannot be made into an object diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs index e927b510b9da8..cb5a305eab087 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs @@ -2,8 +2,6 @@ //@[old] edition:2015 //@[new] edition:2021 //@[new] run-rustfix -// FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` -#![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] fn ord_prefer_dot(s: String) -> Ord { //~^ ERROR the trait `Ord` cannot be made into an object