From e668e1be8439fbe641e716261c4780926c84a519 Mon Sep 17 00:00:00 2001 From: danieljofficial Date: Mon, 8 Jun 2026 15:05:46 +0100 Subject: [PATCH 1/2] move drop and dropck tests out of tests/ui/issues --- .../drop-with-trait-bound-calls-method-on-self.rs} | 0 .../drop-impl-for-type-param-with-trait-bound.rs} | 0 .../drop-impl-for-type-param-with-trait-bound.stderr} | 0 .../dropck-resolves-associated-type-in-field.rs} | 0 .../self-referential-struct-with-boxed-closure.rs} | 0 .../method-with-self-trait-bound-not-dyn-safe.rs} | 0 .../method-with-self-trait-bound-not-dyn-safe.stderr} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename tests/ui/{issues/issue-4252.rs => drop/drop-with-trait-bound-calls-method-on-self.rs} (100%) rename tests/ui/{issues/issue-41974.rs => dropck/drop-impl-for-type-param-with-trait-bound.rs} (100%) rename tests/ui/{issues/issue-41974.stderr => dropck/drop-impl-for-type-param-with-trait-bound.stderr} (100%) rename tests/ui/{issues/issue-48132.rs => dropck/dropck-resolves-associated-type-in-field.rs} (100%) rename tests/ui/{issues/issue-26641.rs => dropck/self-referential-struct-with-boxed-closure.rs} (100%) rename tests/ui/{issues/issue-50781.rs => dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs} (100%) rename tests/ui/{issues/issue-50781.stderr => dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr} (100%) diff --git a/tests/ui/issues/issue-4252.rs b/tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs similarity index 100% rename from tests/ui/issues/issue-4252.rs rename to tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs diff --git a/tests/ui/issues/issue-41974.rs b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs similarity index 100% rename from tests/ui/issues/issue-41974.rs rename to tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs diff --git a/tests/ui/issues/issue-41974.stderr b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr similarity index 100% rename from tests/ui/issues/issue-41974.stderr rename to tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr diff --git a/tests/ui/issues/issue-48132.rs b/tests/ui/dropck/dropck-resolves-associated-type-in-field.rs similarity index 100% rename from tests/ui/issues/issue-48132.rs rename to tests/ui/dropck/dropck-resolves-associated-type-in-field.rs diff --git a/tests/ui/issues/issue-26641.rs b/tests/ui/dropck/self-referential-struct-with-boxed-closure.rs similarity index 100% rename from tests/ui/issues/issue-26641.rs rename to tests/ui/dropck/self-referential-struct-with-boxed-closure.rs diff --git a/tests/ui/issues/issue-50781.rs b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs similarity index 100% rename from tests/ui/issues/issue-50781.rs rename to tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs diff --git a/tests/ui/issues/issue-50781.stderr b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr similarity index 100% rename from tests/ui/issues/issue-50781.stderr rename to tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr From 2e4d8c9d49679f71d56d9e60f36e26b9acfc1534 Mon Sep 17 00:00:00 2001 From: danieljofficial Date: Mon, 8 Jun 2026 15:32:52 +0100 Subject: [PATCH 2/2] add issue links and bless --- .../ui/drop/drop-with-trait-bound-calls-method-on-self.rs | 1 + .../dropck/drop-impl-for-type-param-with-trait-bound.rs | 1 + .../drop-impl-for-type-param-with-trait-bound.stderr | 4 ++-- .../ui/dropck/dropck-resolves-associated-type-in-field.rs | 1 + .../dropck/self-referential-struct-with-boxed-closure.rs | 1 + .../method-with-self-trait-bound-not-dyn-safe.rs | 1 + .../method-with-self-trait-bound-not-dyn-safe.stderr | 8 ++++---- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs b/tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs index 1939ad15f143a..7032a6bc5e759 100644 --- a/tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs +++ b/tests/ui/drop/drop-with-trait-bound-calls-method-on-self.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/4252 //@ run-pass trait X { fn call(&self, x: &T); diff --git a/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs index 10c363479a374..9e046dee42cf7 100644 --- a/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs +++ b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/41974 #[derive(Copy, Clone)] struct Flags; diff --git a/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr index 2ae073dd1ba82..cc3488aaca0cf 100644 --- a/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr +++ b/tests/ui/dropck/drop-impl-for-type-param-with-trait-bound.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as an argument to some local type (e.g., `MyStruct`) - --> $DIR/issue-41974.rs:7:6 + --> $DIR/drop-impl-for-type-param-with-trait-bound.rs:8:6 | LL | impl Drop for T where T: A { | ^ uncovered type parameter @@ -8,7 +8,7 @@ LL | impl Drop for T where T: A { = note: only traits defined in the current crate can be implemented for a type parameter error[E0120]: the `Drop` trait may only be implemented for local structs, enums, and unions - --> $DIR/issue-41974.rs:7:18 + --> $DIR/drop-impl-for-type-param-with-trait-bound.rs:8:18 | LL | impl Drop for T where T: A { | ^ must be a struct, enum, or union in the current crate diff --git a/tests/ui/dropck/dropck-resolves-associated-type-in-field.rs b/tests/ui/dropck/dropck-resolves-associated-type-in-field.rs index d8d7167a4ce82..16a44cd0d6de4 100644 --- a/tests/ui/dropck/dropck-resolves-associated-type-in-field.rs +++ b/tests/ui/dropck/dropck-resolves-associated-type-in-field.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/48132 // Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. diff --git a/tests/ui/dropck/self-referential-struct-with-boxed-closure.rs b/tests/ui/dropck/self-referential-struct-with-boxed-closure.rs index 983bcbea92731..f78f3907de9a2 100644 --- a/tests/ui/dropck/self-referential-struct-with-boxed-closure.rs +++ b/tests/ui/dropck/self-referential-struct-with-boxed-closure.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/26641 //@ run-pass struct Parser<'a>(#[allow(dead_code)] Box); diff --git a/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs index d837b848591f2..39eee9129e1dd 100644 --- a/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs +++ b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/50781 trait Trait {} trait X { diff --git a/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr index 4ba3166b6c581..81f031a2123fd 100644 --- a/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr +++ b/tests/ui/dyn-compatibility/method-with-self-trait-bound-not-dyn-safe.stderr @@ -1,12 +1,12 @@ error[E0038]: the trait `X` is not dyn compatible - --> $DIR/issue-50781.rs:11:16 + --> $DIR/method-with-self-trait-bound-not-dyn-safe.rs:12:16 | LL | impl Trait for dyn X {} | ^^^^^ `X` is not dyn compatible | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/issue-50781.rs:4:8 + --> $DIR/method-with-self-trait-bound-not-dyn-safe.rs:5:8 | LL | trait X { | - this trait is not dyn compatible... @@ -16,14 +16,14 @@ LL | fn foo(&self) where Self: Trait; = help: only type `()` implements `X`; consider using it directly instead. error[E0038]: the trait `X` is not dyn compatible - --> $DIR/issue-50781.rs:16:10 + --> $DIR/method-with-self-trait-bound-not-dyn-safe.rs:17:10 | LL | ::foo(&()); | ^ `X` is not dyn compatible | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/issue-50781.rs:4:8 + --> $DIR/method-with-self-trait-bound-not-dyn-safe.rs:5:8 | LL | trait X { | - this trait is not dyn compatible...