From a7219132bd832ee861d4ccf7fc7beab974797ba9 Mon Sep 17 00:00:00 2001 From: zedddie Date: Mon, 15 Jun 2026 22:10:21 +0200 Subject: [PATCH 1/2] move batch --- .../hashmap-send-requires-send-contents.rs} | 0 .../hashmap-send-requires-send-contents.stderr} | 0 .../issue-21922.rs => binop/add-ref-operand-method-lookup.rs} | 0 tests/ui/{issues/issue-21634.rs => binop/infer-rhs-type.rs} | 0 .../{issues/issue-22034.rs => cast/raw-ptr-to-dyn-fn-raw-ptr.rs} | 0 .../issue-22034.stderr => cast/raw-ptr-to-dyn-fn-raw-ptr.stderr} | 0 .../issue-22008.rs => match/match-str-proper-optimization.rs} | 0 .../nested-fn-call-shadowed-assoc-fn-variable.rs} | 0 .../issue-2150.rs => reachable/unreachable-ret-after-panic.rs} | 0 .../unreachable-ret-after-panic.stderr} | 0 .../issue-21546.rs => resolve/module-type-name-conflict.rs} | 0 .../module-type-name-conflict.stderr} | 0 .../ambiguous-trait-matching-distinct-lifetimes.rs} | 0 .../ambiguous-trait-matching-distinct-lifetimes.stderr} | 0 .../{issues/issue-21701.rs => typeck/call-non-fn-type-param.rs} | 0 .../issue-21701.stderr => typeck/call-non-fn-type-param.stderr} | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename tests/ui/{issues/issue-21763.rs => auto-traits/hashmap-send-requires-send-contents.rs} (100%) rename tests/ui/{issues/issue-21763.stderr => auto-traits/hashmap-send-requires-send-contents.stderr} (100%) rename tests/ui/{issues/issue-21922.rs => binop/add-ref-operand-method-lookup.rs} (100%) rename tests/ui/{issues/issue-21634.rs => binop/infer-rhs-type.rs} (100%) rename tests/ui/{issues/issue-22034.rs => cast/raw-ptr-to-dyn-fn-raw-ptr.rs} (100%) rename tests/ui/{issues/issue-22034.stderr => cast/raw-ptr-to-dyn-fn-raw-ptr.stderr} (100%) rename tests/ui/{issues/issue-22008.rs => match/match-str-proper-optimization.rs} (100%) rename tests/ui/{issues/issue-21622.rs => methods/nested-fn-call-shadowed-assoc-fn-variable.rs} (100%) rename tests/ui/{issues/issue-2150.rs => reachable/unreachable-ret-after-panic.rs} (100%) rename tests/ui/{issues/issue-2150.stderr => reachable/unreachable-ret-after-panic.stderr} (100%) rename tests/ui/{issues/issue-21546.rs => resolve/module-type-name-conflict.rs} (100%) rename tests/ui/{issues/issue-21546.stderr => resolve/module-type-name-conflict.stderr} (100%) rename tests/ui/{issues/issue-21974.rs => traits/ambiguous-trait-matching-distinct-lifetimes.rs} (100%) rename tests/ui/{issues/issue-21974.stderr => traits/ambiguous-trait-matching-distinct-lifetimes.stderr} (100%) rename tests/ui/{issues/issue-21701.rs => typeck/call-non-fn-type-param.rs} (100%) rename tests/ui/{issues/issue-21701.stderr => typeck/call-non-fn-type-param.stderr} (100%) diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/auto-traits/hashmap-send-requires-send-contents.rs similarity index 100% rename from tests/ui/issues/issue-21763.rs rename to tests/ui/auto-traits/hashmap-send-requires-send-contents.rs diff --git a/tests/ui/issues/issue-21763.stderr b/tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr similarity index 100% rename from tests/ui/issues/issue-21763.stderr rename to tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr diff --git a/tests/ui/issues/issue-21922.rs b/tests/ui/binop/add-ref-operand-method-lookup.rs similarity index 100% rename from tests/ui/issues/issue-21922.rs rename to tests/ui/binop/add-ref-operand-method-lookup.rs diff --git a/tests/ui/issues/issue-21634.rs b/tests/ui/binop/infer-rhs-type.rs similarity index 100% rename from tests/ui/issues/issue-21634.rs rename to tests/ui/binop/infer-rhs-type.rs diff --git a/tests/ui/issues/issue-22034.rs b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs similarity index 100% rename from tests/ui/issues/issue-22034.rs rename to tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs diff --git a/tests/ui/issues/issue-22034.stderr b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr similarity index 100% rename from tests/ui/issues/issue-22034.stderr rename to tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr diff --git a/tests/ui/issues/issue-22008.rs b/tests/ui/match/match-str-proper-optimization.rs similarity index 100% rename from tests/ui/issues/issue-22008.rs rename to tests/ui/match/match-str-proper-optimization.rs diff --git a/tests/ui/issues/issue-21622.rs b/tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs similarity index 100% rename from tests/ui/issues/issue-21622.rs rename to tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs diff --git a/tests/ui/issues/issue-2150.rs b/tests/ui/reachable/unreachable-ret-after-panic.rs similarity index 100% rename from tests/ui/issues/issue-2150.rs rename to tests/ui/reachable/unreachable-ret-after-panic.rs diff --git a/tests/ui/issues/issue-2150.stderr b/tests/ui/reachable/unreachable-ret-after-panic.stderr similarity index 100% rename from tests/ui/issues/issue-2150.stderr rename to tests/ui/reachable/unreachable-ret-after-panic.stderr diff --git a/tests/ui/issues/issue-21546.rs b/tests/ui/resolve/module-type-name-conflict.rs similarity index 100% rename from tests/ui/issues/issue-21546.rs rename to tests/ui/resolve/module-type-name-conflict.rs diff --git a/tests/ui/issues/issue-21546.stderr b/tests/ui/resolve/module-type-name-conflict.stderr similarity index 100% rename from tests/ui/issues/issue-21546.stderr rename to tests/ui/resolve/module-type-name-conflict.stderr diff --git a/tests/ui/issues/issue-21974.rs b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs similarity index 100% rename from tests/ui/issues/issue-21974.rs rename to tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs diff --git a/tests/ui/issues/issue-21974.stderr b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr similarity index 100% rename from tests/ui/issues/issue-21974.stderr rename to tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr diff --git a/tests/ui/issues/issue-21701.rs b/tests/ui/typeck/call-non-fn-type-param.rs similarity index 100% rename from tests/ui/issues/issue-21701.rs rename to tests/ui/typeck/call-non-fn-type-param.rs diff --git a/tests/ui/issues/issue-21701.stderr b/tests/ui/typeck/call-non-fn-type-param.stderr similarity index 100% rename from tests/ui/issues/issue-21701.stderr rename to tests/ui/typeck/call-non-fn-type-param.stderr From 05b0947f257042e1773f0cf338eb0d206432aed2 Mon Sep 17 00:00:00 2001 From: zedddie Date: Mon, 15 Jun 2026 22:10:43 +0200 Subject: [PATCH 2/2] bless batch --- .../hashmap-send-requires-send-contents.rs | 3 ++- .../hashmap-send-requires-send-contents.stderr | 4 ++-- tests/ui/binop/add-ref-operand-method-lookup.rs | 7 +++++++ tests/ui/binop/infer-rhs-type.rs | 1 + tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs | 2 ++ tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr | 2 +- tests/ui/match/match-str-proper-optimization.rs | 5 +++++ .../nested-fn-call-shadowed-assoc-fn-variable.rs | 2 ++ tests/ui/reachable/unreachable-ret-after-panic.rs | 2 ++ .../ui/reachable/unreachable-ret-after-panic.stderr | 4 ++-- tests/ui/resolve/module-type-name-conflict.rs | 5 ++++- tests/ui/resolve/module-type-name-conflict.stderr | 12 ++++++------ .../ambiguous-trait-matching-distinct-lifetimes.rs | 10 ++++++---- ...mbiguous-trait-matching-distinct-lifetimes.stderr | 8 ++++---- tests/ui/typeck/call-non-fn-type-param.rs | 2 ++ tests/ui/typeck/call-non-fn-type-param.stderr | 4 ++-- 16 files changed, 50 insertions(+), 23 deletions(-) diff --git a/tests/ui/auto-traits/hashmap-send-requires-send-contents.rs b/tests/ui/auto-traits/hashmap-send-requires-send-contents.rs index 5f236a25e9944..b543929642f3f 100644 --- a/tests/ui/auto-traits/hashmap-send-requires-send-contents.rs +++ b/tests/ui/auto-traits/hashmap-send-requires-send-contents.rs @@ -1,4 +1,5 @@ -// Regression test for HashMap only impl'ing Send/Sync if its contents do +//! Regression test for . +//! Test HashMap only impl Send/Sync if its contents do //@ normalize-stderr: "(?:[A-Za-z]:[/\\]|/).*[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION" diff --git a/tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr b/tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr index 135b705eeeff2..db37db925b00a 100644 --- a/tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr +++ b/tests/ui/auto-traits/hashmap-send-requires-send-contents.stderr @@ -1,5 +1,5 @@ error[E0277]: `Rc<()>` cannot be sent between threads safely - --> $DIR/issue-21763.rs:11:11 + --> $DIR/hashmap-send-requires-send-contents.rs:12:11 | LL | foo::, Rc<()>>>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely @@ -12,7 +12,7 @@ note: required because it appears within the type `hashbrown::map::HashMap, Rc<()>>` --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL note: required by a bound in `foo` - --> $DIR/issue-21763.rs:8:11 + --> $DIR/hashmap-send-requires-send-contents.rs:9:11 | LL | fn foo() {} | ^^^^ required by this bound in `foo` diff --git a/tests/ui/binop/add-ref-operand-method-lookup.rs b/tests/ui/binop/add-ref-operand-method-lookup.rs index 6404ab8b7aa0f..b4573fc7658b6 100644 --- a/tests/ui/binop/add-ref-operand-method-lookup.rs +++ b/tests/ui/binop/add-ref-operand-method-lookup.rs @@ -1,3 +1,10 @@ +//! Regression test for . +//! +//! Ensure Add works with all value/reference operand combinations, +//! both via the + operator and ufcs. +//! +//! Originally method lookup failed only for x + &y. + //@ run-pass use std::ops::Add; fn show(z: i32) { diff --git a/tests/ui/binop/infer-rhs-type.rs b/tests/ui/binop/infer-rhs-type.rs index 475a33eca58ec..41ad829141c63 100644 --- a/tests/ui/binop/infer-rhs-type.rs +++ b/tests/ui/binop/infer-rhs-type.rs @@ -1,3 +1,4 @@ +//! Regression test for . //@ run-pass #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))] diff --git a/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs index 3631c2368fe82..6572140786d2e 100644 --- a/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs +++ b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.rs @@ -1,3 +1,5 @@ +//! Regression test for . + fn main() { let ptr: *mut () = core::ptr::null_mut(); let _: &mut dyn Fn() = unsafe { diff --git a/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr index 68202085e77db..d0f0bcb201425 100644 --- a/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr +++ b/tests/ui/cast/raw-ptr-to-dyn-fn-raw-ptr.stderr @@ -1,5 +1,5 @@ error[E0277]: expected a `Fn()` closure, found `()` - --> $DIR/issue-22034.rs:4:16 + --> $DIR/raw-ptr-to-dyn-fn-raw-ptr.rs:6:16 | LL | &mut *(ptr as *mut dyn Fn()) | ^^^ expected an `Fn()` closure, found `()` diff --git a/tests/ui/match/match-str-proper-optimization.rs b/tests/ui/match/match-str-proper-optimization.rs index b537ce8c2721c..79c56b22d0569 100644 --- a/tests/ui/match/match-str-proper-optimization.rs +++ b/tests/ui/match/match-str-proper-optimization.rs @@ -1,3 +1,8 @@ +//! Regression test for . +//! Ensure matching against `str` doesn't cause segfault when compiled +//! with `opt-level` >= 2. +// +//@ compile-flags: -C opt-level=2 //@ run-pass pub fn main() { let command = "a"; diff --git a/tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs b/tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs index 8dbc2c21ba951..65059cf38cd3c 100644 --- a/tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs +++ b/tests/ui/methods/nested-fn-call-shadowed-assoc-fn-variable.rs @@ -1,3 +1,5 @@ +//! Regression test for . + //@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/reachable/unreachable-ret-after-panic.rs b/tests/ui/reachable/unreachable-ret-after-panic.rs index baa1dde0fc2e8..db8673e5fd59b 100644 --- a/tests/ui/reachable/unreachable-ret-after-panic.rs +++ b/tests/ui/reachable/unreachable-ret-after-panic.rs @@ -1,3 +1,5 @@ +//! Regression test for . + #![deny(unreachable_code)] #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/ui/reachable/unreachable-ret-after-panic.stderr b/tests/ui/reachable/unreachable-ret-after-panic.stderr index a9268646edfcb..7b73ddc723042 100644 --- a/tests/ui/reachable/unreachable-ret-after-panic.stderr +++ b/tests/ui/reachable/unreachable-ret-after-panic.stderr @@ -1,5 +1,5 @@ error: unreachable statement - --> $DIR/issue-2150.rs:8:5 + --> $DIR/unreachable-ret-after-panic.rs:10:5 | LL | panic!(); | -------- any code following this expression is unreachable @@ -7,7 +7,7 @@ LL | for x in &v { i += 1; } | ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | note: the lint level is defined here - --> $DIR/issue-2150.rs:1:9 + --> $DIR/unreachable-ret-after-panic.rs:3:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/resolve/module-type-name-conflict.rs b/tests/ui/resolve/module-type-name-conflict.rs index 9f3974b431470..b054fead6bc1f 100644 --- a/tests/ui/resolve/module-type-name-conflict.rs +++ b/tests/ui/resolve/module-type-name-conflict.rs @@ -1,4 +1,7 @@ -// Also works as a test for #14564 +//! Regression test for . +//! Ensure structs, enums and modules cannot share name in namespace. +//! +//! Also works as a test for . #[allow(non_snake_case)] mod Foo { } diff --git a/tests/ui/resolve/module-type-name-conflict.stderr b/tests/ui/resolve/module-type-name-conflict.stderr index 5fd06fc673361..fd5649cfc4512 100644 --- a/tests/ui/resolve/module-type-name-conflict.stderr +++ b/tests/ui/resolve/module-type-name-conflict.stderr @@ -1,5 +1,5 @@ error[E0428]: the name `Foo` is defined multiple times - --> $DIR/issue-21546.rs:7:1 + --> $DIR/module-type-name-conflict.rs:10:1 | LL | mod Foo { } | ------- previous definition of the module `Foo` here @@ -10,7 +10,7 @@ LL | struct Foo; = note: `Foo` must be defined only once in the type namespace of this module error[E0428]: the name `Bar` is defined multiple times - --> $DIR/issue-21546.rs:14:1 + --> $DIR/module-type-name-conflict.rs:17:1 | LL | mod Bar { } | ------- previous definition of the module `Bar` here @@ -21,7 +21,7 @@ LL | struct Bar(i32); = note: `Bar` must be defined only once in the type namespace of this module error[E0428]: the name `Baz` is defined multiple times - --> $DIR/issue-21546.rs:22:1 + --> $DIR/module-type-name-conflict.rs:25:1 | LL | struct Baz(i32); | ---------------- previous definition of the type `Baz` here @@ -32,7 +32,7 @@ LL | mod Baz { } = note: `Baz` must be defined only once in the type namespace of this module error[E0428]: the name `Qux` is defined multiple times - --> $DIR/issue-21546.rs:30:1 + --> $DIR/module-type-name-conflict.rs:33:1 | LL | struct Qux { x: bool } | ---------- previous definition of the type `Qux` here @@ -43,7 +43,7 @@ LL | mod Qux { } = note: `Qux` must be defined only once in the type namespace of this module error[E0428]: the name `Quux` is defined multiple times - --> $DIR/issue-21546.rs:38:1 + --> $DIR/module-type-name-conflict.rs:41:1 | LL | struct Quux; | ------------ previous definition of the type `Quux` here @@ -54,7 +54,7 @@ LL | mod Quux { } = note: `Quux` must be defined only once in the type namespace of this module error[E0428]: the name `Corge` is defined multiple times - --> $DIR/issue-21546.rs:46:1 + --> $DIR/module-type-name-conflict.rs:49:1 | LL | enum Corge { A, B } | ---------- previous definition of the type `Corge` here diff --git a/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs index 24e92ce7b9177..d5cf73b42f561 100644 --- a/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs +++ b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.rs @@ -1,7 +1,9 @@ -// Test that (for now) we report an ambiguity error here, because -// specific trait relationships are ignored for the purposes of trait -// matching. This behavior should likely be improved such that this -// test passes. See #21974 for more details. +//! . +//! +//! Test that (for now) we report an ambiguity error here, because +//! specific trait relationships are ignored for the purposes of trait +//! matching. This behavior should likely be improved such that this +//! test passes. trait Foo { fn foo(self); diff --git a/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr index cc9164e5621b8..d2d7df466512d 100644 --- a/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr +++ b/tests/ui/traits/ambiguous-trait-matching-distinct-lifetimes.stderr @@ -1,11 +1,11 @@ error[E0283]: type annotations needed: cannot satisfy `&'a T: Foo` - --> $DIR/issue-21974.rs:11:19 + --> $DIR/ambiguous-trait-matching-distinct-lifetimes.rs:13:19 | LL | where &'a T : Foo, | ^^^ | note: multiple `impl`s or `where` clauses satisfying `&'a T: Foo` found - --> $DIR/issue-21974.rs:11:19 + --> $DIR/ambiguous-trait-matching-distinct-lifetimes.rs:13:19 | LL | where &'a T : Foo, | ^^^ @@ -13,13 +13,13 @@ LL | &'b T : Foo | ^^^ error[E0283]: type annotations needed: cannot satisfy `&T: Foo` - --> $DIR/issue-21974.rs:14:7 + --> $DIR/ambiguous-trait-matching-distinct-lifetimes.rs:16:7 | LL | x.foo(); | ^^^ | note: multiple `impl`s or `where` clauses satisfying `&T: Foo` found - --> $DIR/issue-21974.rs:11:19 + --> $DIR/ambiguous-trait-matching-distinct-lifetimes.rs:13:19 | LL | where &'a T : Foo, | ^^^ diff --git a/tests/ui/typeck/call-non-fn-type-param.rs b/tests/ui/typeck/call-non-fn-type-param.rs index bfa03c5e42f8d..993d585bd2185 100644 --- a/tests/ui/typeck/call-non-fn-type-param.rs +++ b/tests/ui/typeck/call-non-fn-type-param.rs @@ -1,3 +1,5 @@ +//! Regression test for . + fn foo(t: U) { let y = t(); //~^ ERROR: expected function, found `U` diff --git a/tests/ui/typeck/call-non-fn-type-param.stderr b/tests/ui/typeck/call-non-fn-type-param.stderr index 9f1fe7dde735a..f62b571a5d9ad 100644 --- a/tests/ui/typeck/call-non-fn-type-param.stderr +++ b/tests/ui/typeck/call-non-fn-type-param.stderr @@ -1,5 +1,5 @@ error[E0618]: expected function, found `U` - --> $DIR/issue-21701.rs:2:13 + --> $DIR/call-non-fn-type-param.rs:4:13 | LL | fn foo(t: U) { | - `t` has type `U` @@ -9,7 +9,7 @@ LL | let y = t(); | call expression requires function error[E0618]: expected function, found struct `Bar` - --> $DIR/issue-21701.rs:9:13 + --> $DIR/call-non-fn-type-param.rs:11:13 | LL | struct Bar; | ---------- struct `Bar` defined here