From ee8e80991155436014b7173346132d6cd55d188c Mon Sep 17 00:00:00 2001 From: Oneirical Date: Sun, 13 Jul 2025 16:06:48 -0400 Subject: [PATCH] Rehome tests/ui/issues/ tests [2/?] --- ...t-trait-item-reference-selection-26095.rs} | 2 +- .../cold-attribute-application-54044.rs} | 1 + .../cold-attribute-application-54044.stderr} | 6 ++--- .../autoderef-vec-box-fn-36786.rs} | 1 + .../borrow-checker-lifetime-error-46471.rs} | 1 + ...orrow-checker-lifetime-error-46471.stderr} | 2 +- ...tring-borrowing-pattern-matching-11869.rs} | 1 + .../u8-to-char-cast-9918.rs} | 1 + ...miscompile-metadata-invalidation-36023.rs} | 1 + ...herence-error-for-undefined-type-18058.rs} | 1 + ...nce-error-for-undefined-type-18058.stderr} | 2 +- ...lution-error-with-const-generics-77919.rs} | 1 + ...on-error-with-const-generics-77919.stderr} | 6 ++--- .../destructor-run-for-expression-4734.rs} | 1 + .../unnecessary-path-disambiguator-36116.rs} | 1 + .../collection-type-copy-behavior-12909.rs} | 1 + tests/ui/issues/auxiliary/issue-25185-2.rs | 3 --- tests/ui/issues/issue-25185.rs | 12 --------- tests/ui/issues/issue-32655.rs | 19 -------------- tests/ui/issues/issue-32655.stderr | 25 ------------------- .../iterator-type-inference-sum-15673.rs} | 1 + .../auxiliary/aux-25185-1.rs} | 0 tests/ui/linking/auxiliary/aux-25185-2.rs | 3 +++ ...ib-to-dylib-native-deps-inclusion-25185.rs | 13 ++++++++++ .../invalid-assignment-in-macro-26093.rs} | 1 + .../invalid-assignment-in-macro-26093.stderr} | 4 +-- ...ern-matching-in-function-argument-7519.rs} | 1 + ...-associated-type-in-trait-object-22434.rs} | 1 + ...ociated-type-in-trait-object-22434.stderr} | 2 +- ...ncorrect-self-type-in-trait-impl-48276.rs} | 1 + ...rect-self-type-in-trait-impl-48276.stderr} | 6 ++--- ...enthesized-type-parameters-error-32995.rs} | 1 + ...esized-type-parameters-error-32995.stderr} | 6 ++--- ...pace-conflict-in-unboxed-closure-18685.rs} | 2 +- 34 files changed, 52 insertions(+), 78 deletions(-) rename tests/ui/{issues/issue-26095.rs => associated-consts/constant-trait-item-reference-selection-26095.rs} (85%) rename tests/ui/{issues/issue-54044.rs => attributes/cold-attribute-application-54044.rs} (91%) rename tests/ui/{issues/issue-54044.stderr => attributes/cold-attribute-application-54044.stderr} (82%) rename tests/ui/{issues/issue-36786-resolve-call.rs => autoref-autoderef/autoderef-vec-box-fn-36786.rs} (77%) rename tests/ui/{issues/issue-46471-1.rs => borrowck/borrow-checker-lifetime-error-46471.rs} (75%) rename tests/ui/{issues/issue-46471-1.stderr => borrowck/borrow-checker-lifetime-error-46471.stderr} (87%) rename tests/ui/{issues/issue-11869.rs => borrowck/string-borrowing-pattern-matching-11869.rs} (81%) rename tests/ui/{issues/issue-9918.rs => cast/u8-to-char-cast-9918.rs} (59%) rename tests/ui/{issues/issue-36023.rs => codegen/llvm-miscompile-metadata-invalidation-36023.rs} (91%) rename tests/ui/{issues/issue-18058.rs => coherence/impl-coherence-error-for-undefined-type-18058.rs} (63%) rename tests/ui/{issues/issue-18058.stderr => coherence/impl-coherence-error-for-undefined-type-18058.stderr} (78%) rename tests/ui/{issues/issue-77919.rs => const-generics/trait-resolution-error-with-const-generics-77919.rs} (88%) rename tests/ui/{issues/issue-77919.stderr => const-generics/trait-resolution-error-with-const-generics-77919.stderr} (84%) rename tests/ui/{issues/issue-4734.rs => drop/destructor-run-for-expression-4734.rs} (94%) rename tests/ui/{issues/issue-36116.rs => generics/unnecessary-path-disambiguator-36116.rs} (86%) rename tests/ui/{issues/issue-12909.rs => inference/collection-type-copy-behavior-12909.rs} (90%) delete mode 100644 tests/ui/issues/auxiliary/issue-25185-2.rs delete mode 100644 tests/ui/issues/issue-25185.rs delete mode 100644 tests/ui/issues/issue-32655.rs delete mode 100644 tests/ui/issues/issue-32655.stderr rename tests/ui/{issues/issue-15673.rs => iterators/iterator-type-inference-sum-15673.rs} (76%) rename tests/ui/{issues/auxiliary/issue-25185-1.rs => linking/auxiliary/aux-25185-1.rs} (100%) create mode 100644 tests/ui/linking/auxiliary/aux-25185-2.rs create mode 100644 tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs rename tests/ui/{issues/issue-26093.rs => macros/invalid-assignment-in-macro-26093.rs} (83%) rename tests/ui/{issues/issue-26093.stderr => macros/invalid-assignment-in-macro-26093.stderr} (90%) rename tests/ui/{issues/issue-7519-match-unit-in-arg.rs => pattern/unit-pattern-matching-in-function-argument-7519.rs} (72%) rename tests/ui/{issues/issue-22434.rs => type-alias/missing-associated-type-in-trait-object-22434.rs} (75%) rename tests/ui/{issues/issue-22434.stderr => type-alias/missing-associated-type-in-trait-object-22434.stderr} (84%) rename tests/ui/{issues/issue-48276.rs => typeck/incorrect-self-type-in-trait-impl-48276.rs} (93%) rename tests/ui/{issues/issue-48276.stderr => typeck/incorrect-self-type-in-trait-impl-48276.stderr} (83%) rename tests/ui/{issues/issue-32995-2.rs => typeck/parenthesized-type-parameters-error-32995.rs} (89%) rename tests/ui/{issues/issue-32995-2.stderr => typeck/parenthesized-type-parameters-error-32995.stderr} (79%) rename tests/ui/{issues/issue-18685.rs => unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs} (85%) diff --git a/tests/ui/issues/issue-26095.rs b/tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs similarity index 85% rename from tests/ui/issues/issue-26095.rs rename to tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs index 34c617dc495a7..f0fe2db432bc9 100644 --- a/tests/ui/issues/issue-26095.rs +++ b/tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs @@ -1,8 +1,8 @@ +// https://github.com/rust-lang/rust/issues/26095 //@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] - trait HasNumber { const Number: usize; } diff --git a/tests/ui/issues/issue-54044.rs b/tests/ui/attributes/cold-attribute-application-54044.rs similarity index 91% rename from tests/ui/issues/issue-54044.rs rename to tests/ui/attributes/cold-attribute-application-54044.rs index 809ea7a87dbea..2e644b91c0774 100644 --- a/tests/ui/issues/issue-54044.rs +++ b/tests/ui/attributes/cold-attribute-application-54044.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/54044 #![deny(unused_attributes)] //~ NOTE lint level is defined here #[cold] diff --git a/tests/ui/issues/issue-54044.stderr b/tests/ui/attributes/cold-attribute-application-54044.stderr similarity index 82% rename from tests/ui/issues/issue-54044.stderr rename to tests/ui/attributes/cold-attribute-application-54044.stderr index 8bd94a041d0c2..efdf5e0de527f 100644 --- a/tests/ui/issues/issue-54044.stderr +++ b/tests/ui/attributes/cold-attribute-application-54044.stderr @@ -1,5 +1,5 @@ error: attribute should be applied to a function definition - --> $DIR/issue-54044.rs:3:1 + --> $DIR/cold-attribute-application-54044.rs:4:1 | LL | #[cold] | ^^^^^^^ @@ -9,13 +9,13 @@ LL | struct Foo; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! note: the lint level is defined here - --> $DIR/issue-54044.rs:1:9 + --> $DIR/cold-attribute-application-54044.rs:2:9 | LL | #![deny(unused_attributes)] | ^^^^^^^^^^^^^^^^^ error: attribute should be applied to a function definition - --> $DIR/issue-54044.rs:9:5 + --> $DIR/cold-attribute-application-54044.rs:10:5 | LL | #[cold] | ^^^^^^^ diff --git a/tests/ui/issues/issue-36786-resolve-call.rs b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs similarity index 77% rename from tests/ui/issues/issue-36786-resolve-call.rs rename to tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs index de7b0e18d5210..e16929bf48acc 100644 --- a/tests/ui/issues/issue-36786-resolve-call.rs +++ b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/36786 //@ run-pass // Ensure that types that rely on obligations are autoderefed // correctly diff --git a/tests/ui/issues/issue-46471-1.rs b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs similarity index 75% rename from tests/ui/issues/issue-46471-1.rs rename to tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs index aa161d40f702d..020b02aa34df7 100644 --- a/tests/ui/issues/issue-46471-1.rs +++ b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/46471 fn main() { let y = { let mut z = 0; diff --git a/tests/ui/issues/issue-46471-1.stderr b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr similarity index 87% rename from tests/ui/issues/issue-46471-1.stderr rename to tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr index d45172239820d..2c16a6ed7e625 100644 --- a/tests/ui/issues/issue-46471-1.stderr +++ b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr @@ -1,5 +1,5 @@ error[E0597]: `z` does not live long enough - --> $DIR/issue-46471-1.rs:4:9 + --> $DIR/borrow-checker-lifetime-error-464711.rs:5:9 | LL | let mut z = 0; | ----- binding `z` declared here diff --git a/tests/ui/issues/issue-11869.rs b/tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs similarity index 81% rename from tests/ui/issues/issue-11869.rs rename to tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs index dd752227bbec7..fe3d1bf6e8a30 100644 --- a/tests/ui/issues/issue-11869.rs +++ b/tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/11869 //@ check-pass #![allow(dead_code)] diff --git a/tests/ui/issues/issue-9918.rs b/tests/ui/cast/u8-to-char-cast-9918.rs similarity index 59% rename from tests/ui/issues/issue-9918.rs rename to tests/ui/cast/u8-to-char-cast-9918.rs index 017e833aefb25..2b8be1f0fc9b9 100644 --- a/tests/ui/issues/issue-9918.rs +++ b/tests/ui/cast/u8-to-char-cast-9918.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/9918 //@ run-pass pub fn main() { diff --git a/tests/ui/issues/issue-36023.rs b/tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs similarity index 91% rename from tests/ui/issues/issue-36023.rs rename to tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs index 32e8af65c7d11..efa31a51881a4 100644 --- a/tests/ui/issues/issue-36023.rs +++ b/tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/36023 //@ run-pass #![allow(unused_variables)] use std::ops::Deref; diff --git a/tests/ui/issues/issue-18058.rs b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs similarity index 63% rename from tests/ui/issues/issue-18058.rs rename to tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs index cced66717e1bf..52baf9871c3bc 100644 --- a/tests/ui/issues/issue-18058.rs +++ b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/18058 impl Undefined {} //~^ ERROR cannot find type `Undefined` in this scope diff --git a/tests/ui/issues/issue-18058.stderr b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr similarity index 78% rename from tests/ui/issues/issue-18058.stderr rename to tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr index c880bb0029192..07dce0b04fd53 100644 --- a/tests/ui/issues/issue-18058.stderr +++ b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `Undefined` in this scope - --> $DIR/issue-18058.rs:1:6 + --> $DIR/impl-coherence-error-for-undefined-type-18058.rs:2:6 | LL | impl Undefined {} | ^^^^^^^^^ not found in this scope diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs similarity index 88% rename from tests/ui/issues/issue-77919.rs rename to tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs index bf603314977f9..5ab443422df7a 100644 --- a/tests/ui/issues/issue-77919.rs +++ b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/77919 fn main() { [1; >::VAL]; } diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr similarity index 84% rename from tests/ui/issues/issue-77919.stderr rename to tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr index dbbe70ff06990..bac8abf46dce9 100644 --- a/tests/ui/issues/issue-77919.stderr +++ b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `PhantomData` in this scope - --> $DIR/issue-77919.rs:9:9 + --> $DIR/trait-resolution-error-with-const-generics-77919.rs:10:9 | LL | _n: PhantomData, | ^^^^^^^^^^^ not found in this scope @@ -10,7 +10,7 @@ LL + use std::marker::PhantomData; | error[E0412]: cannot find type `VAL` in this scope - --> $DIR/issue-77919.rs:11:63 + --> $DIR/trait-resolution-error-with-const-generics-77919.rs:12:63 | LL | impl TypeVal for Multiply where N: TypeVal {} | ^^^ not found in this scope @@ -21,7 +21,7 @@ LL | impl TypeVal for Multiply where N: TypeVal {} | +++++ error[E0046]: not all trait items implemented, missing: `VAL` - --> $DIR/issue-77919.rs:11:1 + --> $DIR/trait-resolution-error-with-const-generics-77919.rs:12:1 | LL | const VAL: T; | ------------ `VAL` from trait diff --git a/tests/ui/issues/issue-4734.rs b/tests/ui/drop/destructor-run-for-expression-4734.rs similarity index 94% rename from tests/ui/issues/issue-4734.rs rename to tests/ui/drop/destructor-run-for-expression-4734.rs index 58aa0179693e7..57971ee5ef76e 100644 --- a/tests/ui/issues/issue-4734.rs +++ b/tests/ui/drop/destructor-run-for-expression-4734.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/4734 //@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "e;" where diff --git a/tests/ui/issues/issue-36116.rs b/tests/ui/generics/unnecessary-path-disambiguator-36116.rs similarity index 86% rename from tests/ui/issues/issue-36116.rs rename to tests/ui/generics/unnecessary-path-disambiguator-36116.rs index 2313e189aff7d..c2dab605f5923 100644 --- a/tests/ui/issues/issue-36116.rs +++ b/tests/ui/generics/unnecessary-path-disambiguator-36116.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/36116 // Unnecessary path disambiguator is ok //@ check-pass diff --git a/tests/ui/issues/issue-12909.rs b/tests/ui/inference/collection-type-copy-behavior-12909.rs similarity index 90% rename from tests/ui/issues/issue-12909.rs rename to tests/ui/inference/collection-type-copy-behavior-12909.rs index f2c33806aae88..83536e8875cad 100644 --- a/tests/ui/issues/issue-12909.rs +++ b/tests/ui/inference/collection-type-copy-behavior-12909.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/12909 //@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/issues/auxiliary/issue-25185-2.rs b/tests/ui/issues/auxiliary/issue-25185-2.rs deleted file mode 100644 index 7ce3df255a331..0000000000000 --- a/tests/ui/issues/auxiliary/issue-25185-2.rs +++ /dev/null @@ -1,3 +0,0 @@ -extern crate issue_25185_1; - -pub use issue_25185_1::rust_dbg_extern_identity_u32; diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs deleted file mode 100644 index 7dc06ad96df66..0000000000000 --- a/tests/ui/issues/issue-25185.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ run-pass -//@ aux-build:issue-25185-1.rs -//@ aux-build:issue-25185-2.rs - -extern crate issue_25185_2; - -fn main() { - let x = unsafe { - issue_25185_2::rust_dbg_extern_identity_u32(1) - }; - assert_eq!(x, 1); -} diff --git a/tests/ui/issues/issue-32655.rs b/tests/ui/issues/issue-32655.rs deleted file mode 100644 index f52e092312968..0000000000000 --- a/tests/ui/issues/issue-32655.rs +++ /dev/null @@ -1,19 +0,0 @@ -macro_rules! foo ( - () => ( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope - struct T; - ); -); - -macro_rules! bar ( - ($e:item) => ($e) -); - -foo!(); - -bar!( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope - struct S; -); - -fn main() {} diff --git a/tests/ui/issues/issue-32655.stderr b/tests/ui/issues/issue-32655.stderr deleted file mode 100644 index b8362499b2d0a..0000000000000 --- a/tests/ui/issues/issue-32655.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error: cannot find attribute `derive_Clone` in this scope - --> $DIR/issue-32655.rs:3:11 - | -LL | #[derive_Clone] - | ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const` -... -LL | foo!(); - | ------ in this macro invocation - --> $SRC_DIR/core/src/macros/mod.rs:LL:COL - | - = note: similarly named attribute macro `derive_const` defined here - | - = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: cannot find attribute `derive_Clone` in this scope - --> $DIR/issue-32655.rs:15:7 - | -LL | #[derive_Clone] - | ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const` - --> $SRC_DIR/core/src/macros/mod.rs:LL:COL - | - = note: similarly named attribute macro `derive_const` defined here - -error: aborting due to 2 previous errors - diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/iterators/iterator-type-inference-sum-15673.rs similarity index 76% rename from tests/ui/issues/issue-15673.rs rename to tests/ui/iterators/iterator-type-inference-sum-15673.rs index bb61c24627643..aee027927f2f7 100644 --- a/tests/ui/issues/issue-15673.rs +++ b/tests/ui/iterators/iterator-type-inference-sum-15673.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/15673 //@ run-pass #![allow(stable_features)] diff --git a/tests/ui/issues/auxiliary/issue-25185-1.rs b/tests/ui/linking/auxiliary/aux-25185-1.rs similarity index 100% rename from tests/ui/issues/auxiliary/issue-25185-1.rs rename to tests/ui/linking/auxiliary/aux-25185-1.rs diff --git a/tests/ui/linking/auxiliary/aux-25185-2.rs b/tests/ui/linking/auxiliary/aux-25185-2.rs new file mode 100644 index 0000000000000..96c73f623e4d0 --- /dev/null +++ b/tests/ui/linking/auxiliary/aux-25185-2.rs @@ -0,0 +1,3 @@ +extern crate aux_25185_1; + +pub use aux_25185_1::rust_dbg_extern_identity_u32; diff --git a/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs b/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs new file mode 100644 index 0000000000000..bbcfcb75106f6 --- /dev/null +++ b/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs @@ -0,0 +1,13 @@ +// https://github.com/rust-lang/rust/issues/25185 +//@ run-pass +//@ aux-build:aux-25185-1.rs +//@ aux-build:aux-25185-2.rs + +extern crate aux_25185_2; + +fn main() { + let x = unsafe { + aux_25185_2::rust_dbg_extern_identity_u32(1) + }; + assert_eq!(x, 1); +} diff --git a/tests/ui/issues/issue-26093.rs b/tests/ui/macros/invalid-assignment-in-macro-26093.rs similarity index 83% rename from tests/ui/issues/issue-26093.rs rename to tests/ui/macros/invalid-assignment-in-macro-26093.rs index c838515caf997..686a13a3eec36 100644 --- a/tests/ui/issues/issue-26093.rs +++ b/tests/ui/macros/invalid-assignment-in-macro-26093.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/26093 macro_rules! not_a_place { ($thing:expr) => { $thing = 42; diff --git a/tests/ui/issues/issue-26093.stderr b/tests/ui/macros/invalid-assignment-in-macro-26093.stderr similarity index 90% rename from tests/ui/issues/issue-26093.stderr rename to tests/ui/macros/invalid-assignment-in-macro-26093.stderr index 1a08d0fef4118..99f188c718361 100644 --- a/tests/ui/issues/issue-26093.stderr +++ b/tests/ui/macros/invalid-assignment-in-macro-26093.stderr @@ -1,5 +1,5 @@ error[E0070]: invalid left-hand side of assignment - --> $DIR/issue-26093.rs:3:16 + --> $DIR/invalid-assignment-in-macro-26093.rs:4:16 | LL | $thing = 42; | ^ @@ -13,7 +13,7 @@ LL | not_a_place!(99); = note: this error originates in the macro `not_a_place` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0067]: invalid left-hand side of assignment - --> $DIR/issue-26093.rs:5:16 + --> $DIR/invalid-assignment-in-macro-26093.rs:6:16 | LL | $thing += 42; | ^^ diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs similarity index 72% rename from tests/ui/issues/issue-7519-match-unit-in-arg.rs rename to tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs index a7cea577b2248..7bfa9ee66256a 100644 --- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs +++ b/tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs @@ -2,6 +2,7 @@ /* #7519 ICE pattern matching unit in function argument +https://github.com/rust-lang/rust/issues/7519 */ fn foo(():()) { } diff --git a/tests/ui/issues/issue-22434.rs b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs similarity index 75% rename from tests/ui/issues/issue-22434.rs rename to tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs index d9f7b987c64fe..35b30374c15cc 100644 --- a/tests/ui/issues/issue-22434.rs +++ b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/22434 pub trait Foo { type A; } diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr similarity index 84% rename from tests/ui/issues/issue-22434.stderr rename to tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr index 172ae386c3e4a..73afefa5a1fdb 100644 --- a/tests/ui/issues/issue-22434.stderr +++ b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr @@ -1,5 +1,5 @@ error[E0191]: the value of the associated type `A` in `Foo` must be specified - --> $DIR/issue-22434.rs:5:23 + --> $DIR/missing-associated-type-in-trait-object-22434.rs:6:23 | LL | type A; | ------ `A` defined here diff --git a/tests/ui/issues/issue-48276.rs b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs similarity index 93% rename from tests/ui/issues/issue-48276.rs rename to tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs index f55c056fa67d2..1cff20787550c 100644 --- a/tests/ui/issues/issue-48276.rs +++ b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/48276 // Regression test for issue #48276 - ICE when self type does not match what is // required by a trait and regions are involved. diff --git a/tests/ui/issues/issue-48276.stderr b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr similarity index 83% rename from tests/ui/issues/issue-48276.stderr rename to tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr index 370905ee0dfb1..124dc45923764 100644 --- a/tests/ui/issues/issue-48276.stderr +++ b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr @@ -1,5 +1,5 @@ error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:11:5 + --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:12:5 | LL | fn from(a: A) -> Self; | ---------------------- trait method declared without `&self` @@ -8,7 +8,7 @@ LL | fn from(self: &'a Self) -> &'b str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:20:5 + --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:21:5 | LL | fn from(&self) -> B { | ^^^^^^^^^^^^^^^^^^^ `&self` used in impl @@ -16,7 +16,7 @@ LL | fn from(&self) -> B { = note: `from` from trait: `fn(T) -> Self` error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:27:5 + --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:28:5 | LL | fn from(&self) -> &'static str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl diff --git a/tests/ui/issues/issue-32995-2.rs b/tests/ui/typeck/parenthesized-type-parameters-error-32995.rs similarity index 89% rename from tests/ui/issues/issue-32995-2.rs rename to tests/ui/typeck/parenthesized-type-parameters-error-32995.rs index e713a64d3f5a6..e0c2ab5f303a3 100644 --- a/tests/ui/issues/issue-32995-2.rs +++ b/tests/ui/typeck/parenthesized-type-parameters-error-32995.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/32995 fn main() { { fn f() {} } //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait diff --git a/tests/ui/issues/issue-32995-2.stderr b/tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr similarity index 79% rename from tests/ui/issues/issue-32995-2.stderr rename to tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr index 6c2d772a23332..a5e9515ebe581 100644 --- a/tests/ui/issues/issue-32995-2.stderr +++ b/tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr @@ -1,17 +1,17 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:2:22 + --> $DIR/parenthesized-type-parameters-error-329952.rs:3:22 | LL | { fn f() {} } | ^^^^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:5:29 + --> $DIR/parenthesized-type-parameters-error-329952.rs:6:29 | LL | { fn f() -> impl ::std::marker()::Send { } } | ^^^^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:12:13 + --> $DIR/parenthesized-type-parameters-error-329952.rs:13:13 | LL | impl ::std::marker()::Copy for X {} | ^^^^^^^^ only `Fn` traits may use parentheses diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs similarity index 85% rename from tests/ui/issues/issue-18685.rs rename to tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs index 3dab341f615c7..38cf26c277709 100644 --- a/tests/ui/issues/issue-18685.rs +++ b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs @@ -1,8 +1,8 @@ +// https://github.com/rust-lang/rust/issues/18685 //@ run-pass // Test that the self param space is not used in a conflicting // manner by unboxed closures within a default method on a trait - trait Tr { fn foo(&self);