From c7cb441c303d09d99987f167f2cadfc31a5c6c33 Mon Sep 17 00:00:00 2001 From: danieljofficial Date: Tue, 14 Jul 2026 17:03:48 +0100 Subject: [PATCH 1/2] move tests out of ui/issues --- .../hrtb-with-assoc-type-projection.rs} | 0 .../hrtb-with-assoc-type-projection.stderr} | 0 .../unbound-hrtb-lifetime.rs} | 0 .../unbound-hrtb-lifetime.stderr} | 0 .../reexport-from-multiple-namespaces.rs} | 0 ...projection-cache-registers-obligations.rs} | 0 .../steps-between-respects-pointer-width.rs} | 0 .../keyword-as-label-name.rs} | 0 .../keyword-as-label-name.stderr} | 0 .../underscores-in-unicode-escapes.rs} | 0 .../closure-must-return-bound-lifetime.rs} | 0 ...closure-must-return-bound-lifetime.stderr} | 0 .../unconstrained-lifetime-in-impl-bound.rs} | 0 tests/ui/lub-glb/if-else-arms-use-lub.rs | 25 +++++++++++++++++++ .../repeated-macro-expansion-error.rs} | 0 .../repeated-macro-expansion-error.stderr} | 0 .../write-volatile-zst.rs} | 0 17 files changed, 25 insertions(+) rename tests/ui/{issues/issue-60218.rs => higher-ranked/hrtb-with-assoc-type-projection.rs} (100%) rename tests/ui/{issues/issue-60218.stderr => higher-ranked/hrtb-with-assoc-type-projection.stderr} (100%) rename tests/ui/{issues/issue-49919.rs => higher-ranked/unbound-hrtb-lifetime.rs} (100%) rename tests/ui/{issues/issue-49919.stderr => higher-ranked/unbound-hrtb-lifetime.stderr} (100%) rename tests/ui/{issues/issue-50187.rs => imports/reexport-from-multiple-namespaces.rs} (100%) rename tests/ui/{issues/issue-42552.rs => inference/projection-cache-registers-obligations.rs} (100%) rename tests/ui/{issues/issue-48006.rs => iterators/steps-between-respects-pointer-width.rs} (100%) rename tests/ui/{issues/issue-46311.rs => label/keyword-as-label-name.rs} (100%) rename tests/ui/{issues/issue-46311.stderr => label/keyword-as-label-name.stderr} (100%) rename tests/ui/{issues/issue-43692.rs => lexer/underscores-in-unicode-escapes.rs} (100%) rename tests/ui/{issues/issue-52533.rs => lifetimes/closure-must-return-bound-lifetime.rs} (100%) rename tests/ui/{issues/issue-52533.stderr => lifetimes/closure-must-return-bound-lifetime.stderr} (100%) rename tests/ui/{issues/issue-42467.rs => lifetimes/unconstrained-lifetime-in-impl-bound.rs} (100%) create mode 100644 tests/ui/lub-glb/if-else-arms-use-lub.rs rename tests/ui/{issues/issue-53251.rs => macros/repeated-macro-expansion-error.rs} (100%) rename tests/ui/{issues/issue-53251.stderr => macros/repeated-macro-expansion-error.stderr} (100%) rename tests/ui/{issues/issue-42148.rs => zero-sized/write-volatile-zst.rs} (100%) diff --git a/tests/ui/issues/issue-60218.rs b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs similarity index 100% rename from tests/ui/issues/issue-60218.rs rename to tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs diff --git a/tests/ui/issues/issue-60218.stderr b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr similarity index 100% rename from tests/ui/issues/issue-60218.stderr rename to tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr diff --git a/tests/ui/issues/issue-49919.rs b/tests/ui/higher-ranked/unbound-hrtb-lifetime.rs similarity index 100% rename from tests/ui/issues/issue-49919.rs rename to tests/ui/higher-ranked/unbound-hrtb-lifetime.rs diff --git a/tests/ui/issues/issue-49919.stderr b/tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr similarity index 100% rename from tests/ui/issues/issue-49919.stderr rename to tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr diff --git a/tests/ui/issues/issue-50187.rs b/tests/ui/imports/reexport-from-multiple-namespaces.rs similarity index 100% rename from tests/ui/issues/issue-50187.rs rename to tests/ui/imports/reexport-from-multiple-namespaces.rs diff --git a/tests/ui/issues/issue-42552.rs b/tests/ui/inference/projection-cache-registers-obligations.rs similarity index 100% rename from tests/ui/issues/issue-42552.rs rename to tests/ui/inference/projection-cache-registers-obligations.rs diff --git a/tests/ui/issues/issue-48006.rs b/tests/ui/iterators/steps-between-respects-pointer-width.rs similarity index 100% rename from tests/ui/issues/issue-48006.rs rename to tests/ui/iterators/steps-between-respects-pointer-width.rs diff --git a/tests/ui/issues/issue-46311.rs b/tests/ui/label/keyword-as-label-name.rs similarity index 100% rename from tests/ui/issues/issue-46311.rs rename to tests/ui/label/keyword-as-label-name.rs diff --git a/tests/ui/issues/issue-46311.stderr b/tests/ui/label/keyword-as-label-name.stderr similarity index 100% rename from tests/ui/issues/issue-46311.stderr rename to tests/ui/label/keyword-as-label-name.stderr diff --git a/tests/ui/issues/issue-43692.rs b/tests/ui/lexer/underscores-in-unicode-escapes.rs similarity index 100% rename from tests/ui/issues/issue-43692.rs rename to tests/ui/lexer/underscores-in-unicode-escapes.rs diff --git a/tests/ui/issues/issue-52533.rs b/tests/ui/lifetimes/closure-must-return-bound-lifetime.rs similarity index 100% rename from tests/ui/issues/issue-52533.rs rename to tests/ui/lifetimes/closure-must-return-bound-lifetime.rs diff --git a/tests/ui/issues/issue-52533.stderr b/tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr similarity index 100% rename from tests/ui/issues/issue-52533.stderr rename to tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr diff --git a/tests/ui/issues/issue-42467.rs b/tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs similarity index 100% rename from tests/ui/issues/issue-42467.rs rename to tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs diff --git a/tests/ui/lub-glb/if-else-arms-use-lub.rs b/tests/ui/lub-glb/if-else-arms-use-lub.rs new file mode 100644 index 0000000000000..c75421fb82f15 --- /dev/null +++ b/tests/ui/lub-glb/if-else-arms-use-lub.rs @@ -0,0 +1,25 @@ +//@ check-pass +#![allow(dead_code)] +#![allow(unused_mut)] +/* +# if b { x } else { y } requires identical types for x and y +*/ + +fn print1(b: bool, s1: &str, s2: &str) { + println!("{}", if b { s1 } else { s2 }); +} +fn print2<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) { + println!("{}", if b { s1 } else { s2 }); +} +fn print3(b: bool, s1: &str, s2: &str) { + let mut s: &str; + if b { s = s1; } else { s = s2; } + println!("{}", s); +} +fn print4<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) { + let mut s: &str; + if b { s = s1; } else { s = s2; } + println!("{}", s); +} + +pub fn main() {} diff --git a/tests/ui/issues/issue-53251.rs b/tests/ui/macros/repeated-macro-expansion-error.rs similarity index 100% rename from tests/ui/issues/issue-53251.rs rename to tests/ui/macros/repeated-macro-expansion-error.rs diff --git a/tests/ui/issues/issue-53251.stderr b/tests/ui/macros/repeated-macro-expansion-error.stderr similarity index 100% rename from tests/ui/issues/issue-53251.stderr rename to tests/ui/macros/repeated-macro-expansion-error.stderr diff --git a/tests/ui/issues/issue-42148.rs b/tests/ui/zero-sized/write-volatile-zst.rs similarity index 100% rename from tests/ui/issues/issue-42148.rs rename to tests/ui/zero-sized/write-volatile-zst.rs From c8efb5c3d544fdfacd89e80ed56a3ab6415e4516 Mon Sep 17 00:00:00 2001 From: danieljofficial Date: Tue, 14 Jul 2026 22:43:46 +0100 Subject: [PATCH 2/2] add issue links and bless --- .../hrtb-with-assoc-type-projection.rs | 5 ++-- .../hrtb-with-assoc-type-projection.stderr | 6 ++--- .../ui/higher-ranked/unbound-hrtb-lifetime.rs | 1 + .../unbound-hrtb-lifetime.stderr | 2 +- .../reexport-from-multiple-namespaces.rs | 1 + .../projection-cache-registers-obligations.rs | 3 ++- .../steps-between-respects-pointer-width.rs | 1 + tests/ui/label/keyword-as-label-name.rs | 1 + tests/ui/label/keyword-as-label-name.stderr | 2 +- .../lexer/underscores-in-unicode-escapes.rs | 1 + .../closure-must-return-bound-lifetime.rs | 1 + .../closure-must-return-bound-lifetime.stderr | 2 +- .../unconstrained-lifetime-in-impl-bound.rs | 1 + tests/ui/lub-glb/if-else-arms-use-lub.rs | 25 ------------------- .../macros/repeated-macro-expansion-error.rs | 1 + .../repeated-macro-expansion-error.stderr | 8 +++--- tests/ui/zero-sized/write-volatile-zst.rs | 1 + 17 files changed, 23 insertions(+), 39 deletions(-) delete mode 100644 tests/ui/lub-glb/if-else-arms-use-lub.rs diff --git a/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs index 4926691f3b568..e9d2ef0bfbe53 100644 --- a/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs +++ b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.rs @@ -1,6 +1,5 @@ -// Regression test for #60218 -// -// This was reported to cause ICEs. +//! Regression test for https://github.com/rust-lang/rust/issues/60218 +//! This was reported to cause ICEs. use std::iter::Map; diff --git a/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr index b9317621b77ac..bb54da98c2333 100644 --- a/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr +++ b/tests/ui/higher-ranked/hrtb-with-assoc-type-projection.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&u32: Foo` is not satisfied - --> $DIR/issue-60218.rs:18:19 + --> $DIR/hrtb-with-assoc-type-projection.rs:17:19 | LL | trigger_error(vec![], |x: &u32| x) | ------------- ^^^^^^ the trait `Foo` is not implemented for `&u32` @@ -7,12 +7,12 @@ LL | trigger_error(vec![], |x: &u32| x) | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/issue-60218.rs:7:1 + --> $DIR/hrtb-with-assoc-type-projection.rs:6:1 | LL | pub trait Foo {} | ^^^^^^^^^^^^^ note: required by a bound in `trigger_error` - --> $DIR/issue-60218.rs:13:72 + --> $DIR/hrtb-with-assoc-type-projection.rs:12:72 | LL | pub fn trigger_error(iterable: I, functor: F) | ------------- required by a bound in this function diff --git a/tests/ui/higher-ranked/unbound-hrtb-lifetime.rs b/tests/ui/higher-ranked/unbound-hrtb-lifetime.rs index 780f338681dd3..3de571a2d30da 100644 --- a/tests/ui/higher-ranked/unbound-hrtb-lifetime.rs +++ b/tests/ui/higher-ranked/unbound-hrtb-lifetime.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/49919 fn foo<'a, T: 'a>(t: T) -> Box &'a T + 'a> { let foo: Box Fn() -> &'c T> = Box::new(move || &t); //~^ ERROR: binding for associated type diff --git a/tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr b/tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr index 597d76fc27b38..252e024e7d5b7 100644 --- a/tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr +++ b/tests/ui/higher-ranked/unbound-hrtb-lifetime.stderr @@ -1,5 +1,5 @@ error[E0582]: binding for associated type `Output` references lifetime `'c`, which does not appear in the trait input types - --> $DIR/issue-49919.rs:2:39 + --> $DIR/unbound-hrtb-lifetime.rs:3:39 | LL | let foo: Box Fn() -> &'c T> = Box::new(move || &t); | ^^^^^ diff --git a/tests/ui/imports/reexport-from-multiple-namespaces.rs b/tests/ui/imports/reexport-from-multiple-namespaces.rs index 478416f86dcbe..75b1831720b07 100644 --- a/tests/ui/imports/reexport-from-multiple-namespaces.rs +++ b/tests/ui/imports/reexport-from-multiple-namespaces.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/50187 //@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/inference/projection-cache-registers-obligations.rs b/tests/ui/inference/projection-cache-registers-obligations.rs index 734921d9b012a..f565bfcce54b9 100644 --- a/tests/ui/inference/projection-cache-registers-obligations.rs +++ b/tests/ui/inference/projection-cache-registers-obligations.rs @@ -1,5 +1,6 @@ +//! Regression test for an obscure issue with the projection cache. +//! https://github.com/rust-lang/rust/issues/42552 //@ run-pass -// Regression test for an obscure issue with the projection cache. fn into_iter(a: &I) -> Groups<'_, I> { Groups { _a: a } diff --git a/tests/ui/iterators/steps-between-respects-pointer-width.rs b/tests/ui/iterators/steps-between-respects-pointer-width.rs index 1adc76f2a2641..44b5fdb9a2538 100644 --- a/tests/ui/iterators/steps-between-respects-pointer-width.rs +++ b/tests/ui/iterators/steps-between-respects-pointer-width.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/48006 //@ run-pass #![feature(step_trait)] diff --git a/tests/ui/label/keyword-as-label-name.rs b/tests/ui/label/keyword-as-label-name.rs index 2443566550128..a6f93fec6c566 100644 --- a/tests/ui/label/keyword-as-label-name.rs +++ b/tests/ui/label/keyword-as-label-name.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/46311 fn main() { 'break: loop { //~ ERROR labels cannot use keyword names } diff --git a/tests/ui/label/keyword-as-label-name.stderr b/tests/ui/label/keyword-as-label-name.stderr index f040ba2c026a2..e0bf3ce222a39 100644 --- a/tests/ui/label/keyword-as-label-name.stderr +++ b/tests/ui/label/keyword-as-label-name.stderr @@ -1,5 +1,5 @@ error: labels cannot use keyword names - --> $DIR/issue-46311.rs:2:5 + --> $DIR/keyword-as-label-name.rs:3:5 | LL | 'break: loop { | ^^^^^^ diff --git a/tests/ui/lexer/underscores-in-unicode-escapes.rs b/tests/ui/lexer/underscores-in-unicode-escapes.rs index abd1f56d4223b..a89d38e05c867 100644 --- a/tests/ui/lexer/underscores-in-unicode-escapes.rs +++ b/tests/ui/lexer/underscores-in-unicode-escapes.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/43692 //@ run-pass fn main() { assert_eq!('\u{10__FFFF}', '\u{10FFFF}'); diff --git a/tests/ui/lifetimes/closure-must-return-bound-lifetime.rs b/tests/ui/lifetimes/closure-must-return-bound-lifetime.rs index bb9a1911fdda4..e1bd967c622ca 100644 --- a/tests/ui/lifetimes/closure-must-return-bound-lifetime.rs +++ b/tests/ui/lifetimes/closure-must-return-bound-lifetime.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/52533 fn foo(_: impl for<'a> FnOnce(&'a u32, &u32) -> &'a u32) { } diff --git a/tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr b/tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr index 8b56b36d39b78..639a7f0bef348 100644 --- a/tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr +++ b/tests/ui/lifetimes/closure-must-return-bound-lifetime.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-52533.rs:5:16 + --> $DIR/closure-must-return-bound-lifetime.rs:6:16 | LL | foo(|a, b| b) | - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` diff --git a/tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs b/tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs index 6e0f294d802e7..75a47ad02773b 100644 --- a/tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs +++ b/tests/ui/lifetimes/unconstrained-lifetime-in-impl-bound.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/42467 //@ check-pass #![allow(dead_code)] struct Foo(T); diff --git a/tests/ui/lub-glb/if-else-arms-use-lub.rs b/tests/ui/lub-glb/if-else-arms-use-lub.rs deleted file mode 100644 index c75421fb82f15..0000000000000 --- a/tests/ui/lub-glb/if-else-arms-use-lub.rs +++ /dev/null @@ -1,25 +0,0 @@ -//@ check-pass -#![allow(dead_code)] -#![allow(unused_mut)] -/* -# if b { x } else { y } requires identical types for x and y -*/ - -fn print1(b: bool, s1: &str, s2: &str) { - println!("{}", if b { s1 } else { s2 }); -} -fn print2<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) { - println!("{}", if b { s1 } else { s2 }); -} -fn print3(b: bool, s1: &str, s2: &str) { - let mut s: &str; - if b { s = s1; } else { s = s2; } - println!("{}", s); -} -fn print4<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) { - let mut s: &str; - if b { s = s1; } else { s = s2; } - println!("{}", s); -} - -pub fn main() {} diff --git a/tests/ui/macros/repeated-macro-expansion-error.rs b/tests/ui/macros/repeated-macro-expansion-error.rs index da3ba63ef67d1..86ef405d1b983 100644 --- a/tests/ui/macros/repeated-macro-expansion-error.rs +++ b/tests/ui/macros/repeated-macro-expansion-error.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/53251 struct S; impl S { diff --git a/tests/ui/macros/repeated-macro-expansion-error.stderr b/tests/ui/macros/repeated-macro-expansion-error.stderr index 981966354b972..f820fac144842 100644 --- a/tests/ui/macros/repeated-macro-expansion-error.stderr +++ b/tests/ui/macros/repeated-macro-expansion-error.stderr @@ -1,5 +1,5 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied - --> $DIR/issue-53251.rs:11:20 + --> $DIR/repeated-macro-expansion-error.rs:12:20 | LL | S::f::(); | ^------- help: remove the unnecessary generics @@ -10,14 +10,14 @@ LL | impl_add!(a b); | -------------- in this macro invocation | note: associated function defined here, with 0 generic parameters - --> $DIR/issue-53251.rs:4:8 + --> $DIR/repeated-macro-expansion-error.rs:5:8 | LL | fn f() {} | ^ = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied - --> $DIR/issue-53251.rs:11:20 + --> $DIR/repeated-macro-expansion-error.rs:12:20 | LL | S::f::(); | ^------- help: remove the unnecessary generics @@ -28,7 +28,7 @@ LL | impl_add!(a b); | -------------- in this macro invocation | note: associated function defined here, with 0 generic parameters - --> $DIR/issue-53251.rs:4:8 + --> $DIR/repeated-macro-expansion-error.rs:5:8 | LL | fn f() {} | ^ diff --git a/tests/ui/zero-sized/write-volatile-zst.rs b/tests/ui/zero-sized/write-volatile-zst.rs index f2c4e484e5b37..725eb68e288c9 100644 --- a/tests/ui/zero-sized/write-volatile-zst.rs +++ b/tests/ui/zero-sized/write-volatile-zst.rs @@ -1,3 +1,4 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/42148 //@ run-pass struct Zst;