From e87bec8fce75d7bf8dfe0749d926ee6be19f640e Mon Sep 17 00:00:00 2001 From: Oneirical Date: Sun, 13 Jul 2025 16:25:27 -0400 Subject: [PATCH] Rehome tests/ui/issues/ tests [3/?] --- .../extern-c-identity-two-doubles-5754.rs} | 2 +- ...fixed-size-arrays-zero-size-types-8898.rs} | 1 + .../trait-associated-const-usage-43483.rs} | 1 + ...cursive-associated-type-overflow-21946.rs} | 1 + ...ive-associated-type-overflow-21946.stderr} | 2 +- .../mismatched-pointer-type-in-self-7061.rs} | 1 + ...smatched-pointer-type-in-self-7061.stderr} | 2 +- .../region-checker-map-closure-13665.rs} | 1 + ...asability-violation-with-closure-21600.rs} | 1 + ...ility-violation-with-closure-21600.stderr} | 4 ++-- .../const-pattern-rewrite-error-32086.rs} | 1 + .../const-pattern-rewrite-error-32086.stderr} | 4 ++-- .../auxiliary/aux-5521.rs} | 0 .../cross-crate-map-usage-5521.rs} | 7 +++--- .../typo-suggestion-improvement-46332.rs} | 1 + .../typo-suggestion-improvement-46332.stderr} | 2 +- .../destructor-run-for-let-ignore-6892.rs} | 1 + .../drop-count-assertion-16151.rs} | 1 + ...object-safe-trait-implementation-20939.rs} | 1 + ...ct-safe-trait-implementation-20939.stderr} | 2 +- ...unused-type-parameter-regression-36075.rs} | 1 + tests/ui/issues/issue-9188.rs | 11 --------- .../fold-iterator-errorrs-23966.rs} | 1 + .../fold-iterator-errorrs-23966.stderr} | 2 +- .../lifetime-inference-miss-15735.rs} | 1 + .../infinite-loop-simplify-cfg-75704.rs} | 1 + ...ttern-if-variant-not-imported-19100.fixed} | 1 + ...-pattern-if-variant-not-imported-19100.rs} | 1 + ...tern-if-variant-not-imported-19100.stderr} | 4 ++-- ...-method-resolution-over-inherent-22684.rs} | 1 + ...hod-resolution-over-inherent-22684.stderr} | 2 +- .../float-integer-subtraction-error-24352.rs} | 1 + ...at-integer-subtraction-error-24352.stderr} | 2 +- .../for-loop-in-vec-type-mismatchrs-50585.rs} | 1 + ...-loop-in-vec-type-mismatchrs-50585.stderr} | 2 +- ...s-with-stringify-type-mismatchrs-48364.rs} | 1 + ...th-stringify-type-mismatchrs-48364.stderr} | 2 +- .../circular-module-imports-32797.rs} | 1 + .../matching-partially-moved-value-17385.rs} | 1 + ...tching-partially-moved-value-17385.stderr} | 8 +++---- .../f32-literal-roundingrs-32805.rs} | 1 + .../private-field-access-violation-3763.rs} | 1 + ...rivate-field-access-violation-3763.stderr} | 10 ++++---- .../cannot-find-value-in-scope-22811.rs} | 1 + .../cannot-find-value-in-scope-22811.stderr} | 2 +- .../unresolved-module-error-33293.rs} | 1 + .../unresolved-module-error-33293.stderr} | 2 +- .../tuple-struct-field-naming-47073.rs} | 1 + .../tuple-struct-field-naming-47073.stderr} | 4 ++-- .../auxiliary/aux-9188.rs} | 0 ...same-symbol-name-for-inner-statics-9188.rs | 11 +++++++++ ...it-selection-overflow-prevention-72839.rs} | 1 + ...election-overflow-prevention-72839.stderr} | 2 +- ...trait-object-lifetime-conversion-47638.rs} | 1 + ...-impl-overflow-with-where-clause-20413.rs} | 1 + ...l-overflow-with-where-clause-20413.stderr} | 24 +++++++++---------- ...patible-types-with-question-mark-51632.rs} | 1 + ...ble-types-with-question-mark-51632.stderr} | 2 +- 58 files changed, 89 insertions(+), 58 deletions(-) rename tests/ui/{issues/issue-5754.rs => abi/extern-c-identity-two-doubles-5754.rs} (81%) rename tests/ui/{issues/issue-8898.rs => array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs} (91%) rename tests/ui/{issues/issue-43483.rs => associated-consts/trait-associated-const-usage-43483.rs} (79%) rename tests/ui/{issues/issue-21946.rs => associated-types/recursive-associated-type-overflow-21946.rs} (80%) rename tests/ui/{issues/issue-21946.stderr => associated-types/recursive-associated-type-overflow-21946.stderr} (82%) rename tests/ui/{issues/issue-7061.rs => borrowck/mismatched-pointer-type-in-self-7061.rs} (85%) rename tests/ui/{issues/issue-7061.stderr => borrowck/mismatched-pointer-type-in-self-7061.stderr} (90%) rename tests/ui/{issues/issue-13665.rs => borrowck/region-checker-map-closure-13665.rs} (86%) rename tests/ui/{issues/issue-21600.rs => closures/aliasability-violation-with-closure-21600.rs} (89%) rename tests/ui/{issues/issue-21600.stderr => closures/aliasability-violation-with-closure-21600.stderr} (89%) rename tests/ui/{issues/issue-32086.rs => consts/const-pattern-rewrite-error-32086.rs} (82%) rename tests/ui/{issues/issue-32086.stderr => consts/const-pattern-rewrite-error-32086.stderr} (85%) rename tests/ui/{issues/auxiliary/issue-5521.rs => cross-crate/auxiliary/aux-5521.rs} (100%) rename tests/ui/{issues/issue-5521.rs => cross-crate/cross-crate-map-usage-5521.rs} (59%) rename tests/ui/{issues/issue-46332.rs => did_you_mean/typo-suggestion-improvement-46332.rs} (84%) rename tests/ui/{issues/issue-46332.stderr => did_you_mean/typo-suggestion-improvement-46332.stderr} (88%) rename tests/ui/{issues/issue-6892.rs => drop/destructor-run-for-let-ignore-6892.rs} (96%) rename tests/ui/{issues/issue-16151.rs => drop/drop-count-assertion-16151.rs} (92%) rename tests/ui/{issues/issue-20939.rs => dyn-compatibility/object-safe-trait-implementation-20939.rs} (74%) rename tests/ui/{issues/issue-20939.stderr => dyn-compatibility/object-safe-trait-implementation-20939.stderr} (85%) rename tests/ui/{issues/issue-36075.rs => generics/unused-type-parameter-regression-36075.rs} (81%) delete mode 100644 tests/ui/issues/issue-9188.rs rename tests/ui/{issues/issue-23966.rs => iterators/fold-iterator-errorrs-23966.rs} (58%) rename tests/ui/{issues/issue-23966.stderr => iterators/fold-iterator-errorrs-23966.stderr} (92%) rename tests/ui/{issues/issue-15735.rs => lifetimes/lifetime-inference-miss-15735.rs} (81%) rename tests/ui/{issues/issue-75704.rs => loops/infinite-loop-simplify-cfg-75704.rs} (71%) rename tests/ui/{issues/issue-19100.fixed => match/unreachable-pattern-if-variant-not-imported-19100.fixed} (91%) rename tests/ui/{issues/issue-19100.rs => match/unreachable-pattern-if-variant-not-imported-19100.rs} (91%) rename tests/ui/{issues/issue-19100.stderr => match/unreachable-pattern-if-variant-not-imported-19100.stderr} (80%) rename tests/ui/{issues/issue-22684.rs => methods/trait-method-resolution-over-inherent-22684.rs} (87%) rename tests/ui/{issues/issue-22684.stderr => methods/trait-method-resolution-over-inherent-22684.stderr} (82%) rename tests/ui/{issues/issue-24352.rs => mismatched_types/float-integer-subtraction-error-24352.rs} (55%) rename tests/ui/{issues/issue-24352.stderr => mismatched_types/float-integer-subtraction-error-24352.stderr} (92%) rename tests/ui/{issues/issue-50585.rs => mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs} (63%) rename tests/ui/{issues/issue-50585.stderr => mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr} (89%) rename tests/ui/{issues/issue-48364.rs => mismatched_types/starts-with-stringify-type-mismatchrs-48364.rs} (67%) rename tests/ui/{issues/issue-48364.stderr => mismatched_types/starts-with-stringify-type-mismatchrs-48364.stderr} (88%) rename tests/ui/{issues/issue-32797.rs => modules/circular-module-imports-32797.rs} (74%) rename tests/ui/{issues/issue-17385.rs => moves/matching-partially-moved-value-17385.rs} (90%) rename tests/ui/{issues/issue-17385.stderr => moves/matching-partially-moved-value-17385.stderr} (83%) rename tests/ui/{issues/issue-32805.rs => numbers-arithmetic/f32-literal-roundingrs-32805.rs} (85%) rename tests/ui/{issues/issue-3763.rs => privacy/private-field-access-violation-3763.rs} (94%) rename tests/ui/{issues/issue-3763.stderr => privacy/private-field-access-violation-3763.stderr} (80%) rename tests/ui/{issues/issue-2281-part1.rs => resolve/cannot-find-value-in-scope-22811.rs} (64%) rename tests/ui/{issues/issue-2281-part1.stderr => resolve/cannot-find-value-in-scope-22811.stderr} (84%) rename tests/ui/{issues/issue-33293.rs => resolve/unresolved-module-error-33293.rs} (74%) rename tests/ui/{issues/issue-33293.stderr => resolve/unresolved-module-error-33293.stderr} (87%) rename tests/ui/{issues/issue-47073-zero-padded-tuple-struct-indices.rs => structs/tuple-struct-field-naming-47073.rs} (86%) rename tests/ui/{issues/issue-47073-zero-padded-tuple-struct-indices.stderr => structs/tuple-struct-field-naming-47073.stderr} (81%) rename tests/ui/{issues/auxiliary/issue-9188.rs => symbol-names/auxiliary/aux-9188.rs} (100%) create mode 100644 tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs rename tests/ui/{issues/issue-72839-error-overflow.rs => trait-bounds/trait-selection-overflow-prevention-72839.rs} (89%) rename tests/ui/{issues/issue-72839-error-overflow.stderr => trait-bounds/trait-selection-overflow-prevention-72839.stderr} (80%) rename tests/ui/{issues/issue-47638.rs => trait-objects/trait-object-lifetime-conversion-47638.rs} (78%) rename tests/ui/{issues/issue-20413.rs => traits/trait-impl-overflow-with-where-clause-20413.rs} (93%) rename tests/ui/{issues/issue-20413.stderr => traits/trait-impl-overflow-with-where-clause-20413.stderr} (92%) rename tests/ui/{issues/issue-51632-try-desugar-incompatible-types.rs => try-trait/incompatible-types-with-question-mark-51632.rs} (81%) rename tests/ui/{issues/issue-51632-try-desugar-incompatible-types.stderr => try-trait/incompatible-types-with-question-mark-51632.stderr} (92%) diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/abi/extern-c-identity-two-doubles-5754.rs similarity index 81% rename from tests/ui/issues/issue-5754.rs rename to tests/ui/abi/extern-c-identity-two-doubles-5754.rs index 0aa0988295948..7f44ef9c68535 100644 --- a/tests/ui/issues/issue-5754.rs +++ b/tests/ui/abi/extern-c-identity-two-doubles-5754.rs @@ -1,8 +1,8 @@ +// https://github.com/rust-lang/rust/issues/5754 //@ build-pass #![allow(dead_code)] #![allow(improper_ctypes)] - struct TwoDoubles { r: f64, i: f64 diff --git a/tests/ui/issues/issue-8898.rs b/tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs similarity index 91% rename from tests/ui/issues/issue-8898.rs rename to tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs index 4447704f059c2..fe627b00f53bc 100644 --- a/tests/ui/issues/issue-8898.rs +++ b/tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/8898 //@ run-pass fn assert_repr_eq(obj : T, expected : String) { diff --git a/tests/ui/issues/issue-43483.rs b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs similarity index 79% rename from tests/ui/issues/issue-43483.rs rename to tests/ui/associated-consts/trait-associated-const-usage-43483.rs index 2c62671d0c711..c24157d45e776 100644 --- a/tests/ui/issues/issue-43483.rs +++ b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/43483 //@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-21946.rs b/tests/ui/associated-types/recursive-associated-type-overflow-21946.rs similarity index 80% rename from tests/ui/issues/issue-21946.rs rename to tests/ui/associated-types/recursive-associated-type-overflow-21946.rs index d0c052cb2fd39..ba84ea1130080 100644 --- a/tests/ui/issues/issue-21946.rs +++ b/tests/ui/associated-types/recursive-associated-type-overflow-21946.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/21946 trait Foo { type A; } diff --git a/tests/ui/issues/issue-21946.stderr b/tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr similarity index 82% rename from tests/ui/issues/issue-21946.stderr rename to tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr index d1b4a808d2ec6..37fb0ed7eb882 100644 --- a/tests/ui/issues/issue-21946.stderr +++ b/tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `::A == _` - --> $DIR/issue-21946.rs:8:14 + --> $DIR/recursive-associated-type-overflow-21946.rs:9:14 | LL | type A = ::A; | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/issues/issue-7061.rs b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs similarity index 85% rename from tests/ui/issues/issue-7061.rs rename to tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs index c5d5a9d9498df..521a5ee9c37ec 100644 --- a/tests/ui/issues/issue-7061.rs +++ b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/7061 //@ dont-require-annotations: NOTE struct BarStruct; diff --git a/tests/ui/issues/issue-7061.stderr b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr similarity index 90% rename from tests/ui/issues/issue-7061.stderr rename to tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr index b4c0ebfbdd537..39b9072dc3031 100644 --- a/tests/ui/issues/issue-7061.stderr +++ b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-7061.rs:6:46 + --> $DIR/mismatched-pointer-type-in-self-7061.rs:7:46 | LL | fn foo(&'a mut self) -> Box { self } | -------------- ^^^^ expected `Box`, found `&mut BarStruct` diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/borrowck/region-checker-map-closure-13665.rs similarity index 86% rename from tests/ui/issues/issue-13665.rs rename to tests/ui/borrowck/region-checker-map-closure-13665.rs index e1d8be16f4500..72efa42fe3835 100644 --- a/tests/ui/issues/issue-13665.rs +++ b/tests/ui/borrowck/region-checker-map-closure-13665.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/13665 //@ run-pass fn foo<'r>() { diff --git a/tests/ui/issues/issue-21600.rs b/tests/ui/closures/aliasability-violation-with-closure-21600.rs similarity index 89% rename from tests/ui/issues/issue-21600.rs rename to tests/ui/closures/aliasability-violation-with-closure-21600.rs index 2e22e5e6fa2e0..d4c658319abb4 100644 --- a/tests/ui/issues/issue-21600.rs +++ b/tests/ui/closures/aliasability-violation-with-closure-21600.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/21600 fn call_it(f: F) where F: Fn() { f(); } struct A; diff --git a/tests/ui/issues/issue-21600.stderr b/tests/ui/closures/aliasability-violation-with-closure-21600.stderr similarity index 89% rename from tests/ui/issues/issue-21600.stderr rename to tests/ui/closures/aliasability-violation-with-closure-21600.stderr index f79059344245c..2d2397a2141d9 100644 --- a/tests/ui/issues/issue-21600.stderr +++ b/tests/ui/closures/aliasability-violation-with-closure-21600.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/issue-21600.rs:14:20 + --> $DIR/aliasability-violation-with-closure-21600.rs:15:20 | LL | fn call_it(f: F) where F: Fn() { f(); } | - change this to accept `FnMut` instead of `Fn` @@ -11,7 +11,7 @@ LL | call_it(|| x.gen_mut()); | expects `Fn` instead of `FnMut` error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/issue-21600.rs:14:17 + --> $DIR/aliasability-violation-with-closure-21600.rs:15:17 | LL | fn call_it(f: F) where F: Fn() { f(); } | - change this to accept `FnMut` instead of `Fn` diff --git a/tests/ui/issues/issue-32086.rs b/tests/ui/consts/const-pattern-rewrite-error-32086.rs similarity index 82% rename from tests/ui/issues/issue-32086.rs rename to tests/ui/consts/const-pattern-rewrite-error-32086.rs index d595d1dd7e6d1..d35dfe576879e 100644 --- a/tests/ui/issues/issue-32086.rs +++ b/tests/ui/consts/const-pattern-rewrite-error-32086.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/32086 struct S(u8); const C: S = S(10); diff --git a/tests/ui/issues/issue-32086.stderr b/tests/ui/consts/const-pattern-rewrite-error-32086.stderr similarity index 85% rename from tests/ui/issues/issue-32086.stderr rename to tests/ui/consts/const-pattern-rewrite-error-32086.stderr index e566dea89088d..47616b0663214 100644 --- a/tests/ui/issues/issue-32086.stderr +++ b/tests/ui/consts/const-pattern-rewrite-error-32086.stderr @@ -1,5 +1,5 @@ error[E0532]: expected tuple struct or tuple variant, found constant `C` - --> $DIR/issue-32086.rs:5:9 + --> $DIR/const-pattern-rewrite-error-32086.rs:6:9 | LL | struct S(u8); | ------------- similarly named tuple struct `S` defined here @@ -8,7 +8,7 @@ LL | let C(a) = S(11); | ^ help: a tuple struct with a similar name exists: `S` error[E0532]: expected tuple struct or tuple variant, found constant `C` - --> $DIR/issue-32086.rs:6:9 + --> $DIR/const-pattern-rewrite-error-32086.rs:7:9 | LL | struct S(u8); | ------------- similarly named tuple struct `S` defined here diff --git a/tests/ui/issues/auxiliary/issue-5521.rs b/tests/ui/cross-crate/auxiliary/aux-5521.rs similarity index 100% rename from tests/ui/issues/auxiliary/issue-5521.rs rename to tests/ui/cross-crate/auxiliary/aux-5521.rs diff --git a/tests/ui/issues/issue-5521.rs b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs similarity index 59% rename from tests/ui/issues/issue-5521.rs rename to tests/ui/cross-crate/cross-crate-map-usage-5521.rs index 45896ae81284d..ffce846be2c13 100644 --- a/tests/ui/issues/issue-5521.rs +++ b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs @@ -1,10 +1,9 @@ +// https://github.com/rust-lang/rust/issues/5521 //@ run-pass #![allow(dead_code)] -//@ aux-build:issue-5521.rs +//@ aux-build:aux-5521.rs - - -extern crate issue_5521 as foo; +extern crate aux_5521 as foo; fn bar(a: foo::map) { if false { diff --git a/tests/ui/issues/issue-46332.rs b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs similarity index 84% rename from tests/ui/issues/issue-46332.rs rename to tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs index bed74e3138a66..3dd686a66b0e7 100644 --- a/tests/ui/issues/issue-46332.rs +++ b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/46332 // Original Levenshtein distance for both of this is 1. We improved accuracy with // additional case insensitive comparison. diff --git a/tests/ui/issues/issue-46332.stderr b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr similarity index 88% rename from tests/ui/issues/issue-46332.stderr rename to tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr index 8c0c1dfa6ee86..502f81518785c 100644 --- a/tests/ui/issues/issue-46332.stderr +++ b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr @@ -1,5 +1,5 @@ error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope - --> $DIR/issue-46332.rs:9:5 + --> $DIR/typo-suggestion-improvement-46332.rs:10:5 | LL | struct TyUint {} | ------------- similarly named struct `TyUint` defined here diff --git a/tests/ui/issues/issue-6892.rs b/tests/ui/drop/destructor-run-for-let-ignore-6892.rs similarity index 96% rename from tests/ui/issues/issue-6892.rs rename to tests/ui/drop/destructor-run-for-let-ignore-6892.rs index 7d99aef4ac5c1..0fcf133c2b188 100644 --- a/tests/ui/issues/issue-6892.rs +++ b/tests/ui/drop/destructor-run-for-let-ignore-6892.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/6892 //@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "let _ = e;" diff --git a/tests/ui/issues/issue-16151.rs b/tests/ui/drop/drop-count-assertion-16151.rs similarity index 92% rename from tests/ui/issues/issue-16151.rs rename to tests/ui/drop/drop-count-assertion-16151.rs index b18108e0a8ad8..ede6bc23e733a 100644 --- a/tests/ui/issues/issue-16151.rs +++ b/tests/ui/drop/drop-count-assertion-16151.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/16151 //@ run-pass // FIXME(static_mut_refs): Do not allow `static_mut_refs` lint diff --git a/tests/ui/issues/issue-20939.rs b/tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.rs similarity index 74% rename from tests/ui/issues/issue-20939.rs rename to tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.rs index c0c222978970d..c7938b275e944 100644 --- a/tests/ui/issues/issue-20939.rs +++ b/tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/20939 trait Foo {} impl<'a> Foo for dyn Foo + 'a {} diff --git a/tests/ui/issues/issue-20939.stderr b/tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.stderr similarity index 85% rename from tests/ui/issues/issue-20939.stderr rename to tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.stderr index 00357155c8a90..bd5a7536622c2 100644 --- a/tests/ui/issues/issue-20939.stderr +++ b/tests/ui/dyn-compatibility/object-safe-trait-implementation-20939.stderr @@ -1,5 +1,5 @@ error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trait `Foo` - --> $DIR/issue-20939.rs:3:1 + --> $DIR/object-safe-trait-implementation-20939.rs:4:1 | LL | impl<'a> Foo for dyn Foo + 'a {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo` diff --git a/tests/ui/issues/issue-36075.rs b/tests/ui/generics/unused-type-parameter-regression-36075.rs similarity index 81% rename from tests/ui/issues/issue-36075.rs rename to tests/ui/generics/unused-type-parameter-regression-36075.rs index a563332ad78e9..4d6eb617b599a 100644 --- a/tests/ui/issues/issue-36075.rs +++ b/tests/ui/generics/unused-type-parameter-regression-36075.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/36075 //@ check-pass #![allow(dead_code)] trait DeclarationParser { diff --git a/tests/ui/issues/issue-9188.rs b/tests/ui/issues/issue-9188.rs deleted file mode 100644 index df2f90a0f16bb..0000000000000 --- a/tests/ui/issues/issue-9188.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ run-pass -//@ aux-build:issue-9188.rs - - -extern crate issue_9188; - -pub fn main() { - let a = issue_9188::bar(); - let b = issue_9188::foo::(); - assert_eq!(*a, *b); -} diff --git a/tests/ui/issues/issue-23966.rs b/tests/ui/iterators/fold-iterator-errorrs-23966.rs similarity index 58% rename from tests/ui/issues/issue-23966.rs rename to tests/ui/iterators/fold-iterator-errorrs-23966.rs index 5fdec28ac2cd2..970c943da0b92 100644 --- a/tests/ui/issues/issue-23966.rs +++ b/tests/ui/iterators/fold-iterator-errorrs-23966.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/23966 fn main() { "".chars().fold(|_, _| (), ()); //~^ ERROR E0277 diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/iterators/fold-iterator-errorrs-23966.stderr similarity index 92% rename from tests/ui/issues/issue-23966.stderr rename to tests/ui/iterators/fold-iterator-errorrs-23966.stderr index 3f7a4fa312f12..0ec07de730f22 100644 --- a/tests/ui/issues/issue-23966.stderr +++ b/tests/ui/iterators/fold-iterator-errorrs-23966.stderr @@ -1,5 +1,5 @@ error[E0277]: expected a `FnMut(_, char)` closure, found `()` - --> $DIR/issue-23966.rs:2:32 + --> $DIR/fold-iterator-errorrs-23966.rs:3:32 | LL | "".chars().fold(|_, _| (), ()); | ---- ^^ expected an `FnMut(_, char)` closure, found `()` diff --git a/tests/ui/issues/issue-15735.rs b/tests/ui/lifetimes/lifetime-inference-miss-15735.rs similarity index 81% rename from tests/ui/issues/issue-15735.rs rename to tests/ui/lifetimes/lifetime-inference-miss-15735.rs index f5b3803f1553f..c75d59a2f4b4f 100644 --- a/tests/ui/issues/issue-15735.rs +++ b/tests/ui/lifetimes/lifetime-inference-miss-15735.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/15735 //@ check-pass #![allow(dead_code)] struct A<'a> { diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/loops/infinite-loop-simplify-cfg-75704.rs similarity index 71% rename from tests/ui/issues/issue-75704.rs rename to tests/ui/loops/infinite-loop-simplify-cfg-75704.rs index 1672bf0b4c338..8bc5fba7a6833 100644 --- a/tests/ui/issues/issue-75704.rs +++ b/tests/ui/loops/infinite-loop-simplify-cfg-75704.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/75704 // Caused an infinite loop during SimlifyCfg MIR transform previously. // //@ build-pass diff --git a/tests/ui/issues/issue-19100.fixed b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed similarity index 91% rename from tests/ui/issues/issue-19100.fixed rename to tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed index 1162490048cd2..40c92322519fa 100644 --- a/tests/ui/issues/issue-19100.fixed +++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/19100 //@ run-rustfix #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-19100.rs b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs similarity index 91% rename from tests/ui/issues/issue-19100.rs rename to tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs index fefed0daa72bb..9ef6fd77b50c3 100644 --- a/tests/ui/issues/issue-19100.rs +++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/19100 //@ run-rustfix #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-19100.stderr b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr similarity index 80% rename from tests/ui/issues/issue-19100.stderr rename to tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr index ebbf083b7dea8..7356a4a003b45 100644 --- a/tests/ui/issues/issue-19100.stderr +++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr @@ -1,5 +1,5 @@ error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:17:1 + --> $DIR/unreachable-pattern-if-variant-not-imported-19100.rs:18:1 | LL | Bar if true | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` @@ -7,7 +7,7 @@ LL | Bar if true = note: `#[deny(bindings_with_variant_name)]` on by default error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:21:1 + --> $DIR/unreachable-pattern-if-variant-not-imported-19100.rs:22:1 | LL | Baz if false | ^^^ help: to match on the variant, qualify the path: `Foo::Baz` diff --git a/tests/ui/issues/issue-22684.rs b/tests/ui/methods/trait-method-resolution-over-inherent-22684.rs similarity index 87% rename from tests/ui/issues/issue-22684.rs rename to tests/ui/methods/trait-method-resolution-over-inherent-22684.rs index a5b042706ed1c..9f317b576e69f 100644 --- a/tests/ui/issues/issue-22684.rs +++ b/tests/ui/methods/trait-method-resolution-over-inherent-22684.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/22684 mod foo { pub struct Foo; impl Foo { diff --git a/tests/ui/issues/issue-22684.stderr b/tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr similarity index 82% rename from tests/ui/issues/issue-22684.stderr rename to tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr index e2ca54caeac05..0ab7701fa9e6e 100644 --- a/tests/ui/issues/issue-22684.stderr +++ b/tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-22684.rs:17:17 + --> $DIR/trait-method-resolution-over-inherent-22684.rs:18:17 | LL | let _: () = foo::Foo.bar(); | -- ^^^^^^^^^^^^^^ expected `()`, found `bool` diff --git a/tests/ui/issues/issue-24352.rs b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs similarity index 55% rename from tests/ui/issues/issue-24352.rs rename to tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs index 5c8246d179f9d..eb632398c62b4 100644 --- a/tests/ui/issues/issue-24352.rs +++ b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/24352 fn main() { 1.0f64 - 1.0; 1.0f64 - 1 //~ ERROR E0277 diff --git a/tests/ui/issues/issue-24352.stderr b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr similarity index 92% rename from tests/ui/issues/issue-24352.stderr rename to tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr index 3e0f812b5c757..7dc1fa777fc7b 100644 --- a/tests/ui/issues/issue-24352.stderr +++ b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr @@ -1,5 +1,5 @@ error[E0277]: cannot subtract `{integer}` from `f64` - --> $DIR/issue-24352.rs:3:12 + --> $DIR/float-integer-subtraction-error-24352.rs:4:12 | LL | 1.0f64 - 1 | ^ no implementation for `f64 - {integer}` diff --git a/tests/ui/issues/issue-50585.rs b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs similarity index 63% rename from tests/ui/issues/issue-50585.rs rename to tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs index ca2ece8d53bec..4abef0bee81bd 100644 --- a/tests/ui/issues/issue-50585.rs +++ b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/50585 fn main() { |y: Vec<[(); for x in 0..2 {}]>| {}; //~^ ERROR mismatched types diff --git a/tests/ui/issues/issue-50585.stderr b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr similarity index 89% rename from tests/ui/issues/issue-50585.stderr rename to tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr index 7e83ea35fbbda..d60d97a02ab12 100644 --- a/tests/ui/issues/issue-50585.stderr +++ b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-50585.rs:2:18 + --> $DIR/for-loop-in-vec-type-mismatchrs-50585.rs:3:18 | LL | |y: Vec<[(); for x in 0..2 {}]>| {}; | ^^^^^^^^^^^^^^^^ expected `usize`, found `()` diff --git a/tests/ui/issues/issue-48364.rs b/tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.rs similarity index 67% rename from tests/ui/issues/issue-48364.rs rename to tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.rs index 14ee75e7c9cb6..13ba8b1e59c09 100644 --- a/tests/ui/issues/issue-48364.rs +++ b/tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/48364 fn foo() -> bool { b"".starts_with(stringify!(foo)) //~^ ERROR mismatched types diff --git a/tests/ui/issues/issue-48364.stderr b/tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.stderr similarity index 88% rename from tests/ui/issues/issue-48364.stderr rename to tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.stderr index 74bfa1e06933f..7d4a5a4db69bd 100644 --- a/tests/ui/issues/issue-48364.stderr +++ b/tests/ui/mismatched_types/starts-with-stringify-type-mismatchrs-48364.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-48364.rs:2:21 + --> $DIR/starts-with-stringify-type-mismatchrs-48364.rs:3:21 | LL | b"".starts_with(stringify!(foo)) | ----------- ^^^^^^^^^^^^^^^ expected `&[u8]`, found `&str` diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/modules/circular-module-imports-32797.rs similarity index 74% rename from tests/ui/issues/issue-32797.rs rename to tests/ui/modules/circular-module-imports-32797.rs index 470d661cb2851..5a2f29907957d 100644 --- a/tests/ui/issues/issue-32797.rs +++ b/tests/ui/modules/circular-module-imports-32797.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/32797 //@ check-pass pub use bar::*; diff --git a/tests/ui/issues/issue-17385.rs b/tests/ui/moves/matching-partially-moved-value-17385.rs similarity index 90% rename from tests/ui/issues/issue-17385.rs rename to tests/ui/moves/matching-partially-moved-value-17385.rs index 7400aadb059f7..c50fe048bfbb8 100644 --- a/tests/ui/issues/issue-17385.rs +++ b/tests/ui/moves/matching-partially-moved-value-17385.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/17385 struct X(isize); enum Enum { diff --git a/tests/ui/issues/issue-17385.stderr b/tests/ui/moves/matching-partially-moved-value-17385.stderr similarity index 83% rename from tests/ui/issues/issue-17385.stderr rename to tests/ui/moves/matching-partially-moved-value-17385.stderr index 3c451a859e94c..906f7868bccbf 100644 --- a/tests/ui/issues/issue-17385.stderr +++ b/tests/ui/moves/matching-partially-moved-value-17385.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `foo` - --> $DIR/issue-17385.rs:18:5 + --> $DIR/matching-partially-moved-value-17385.rs:19:5 | LL | let foo = X(1); | --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait @@ -9,7 +9,7 @@ LL | match foo { | ^^^^^^^^^ value used here after move | note: if `X` implemented `Clone`, you could clone the value - --> $DIR/issue-17385.rs:1:1 + --> $DIR/matching-partially-moved-value-17385.rs:2:1 | LL | struct X(isize); | ^^^^^^^^ consider implementing `Clone` for this type @@ -18,7 +18,7 @@ LL | drop(foo); | --- you could clone this value error[E0382]: use of moved value: `e` - --> $DIR/issue-17385.rs:25:11 + --> $DIR/matching-partially-moved-value-17385.rs:26:11 | LL | let e = Enum::Variant2; | - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait @@ -28,7 +28,7 @@ LL | match e { | ^ value used here after move | note: if `Enum` implemented `Clone`, you could clone the value - --> $DIR/issue-17385.rs:3:1 + --> $DIR/matching-partially-moved-value-17385.rs:4:1 | LL | enum Enum { | ^^^^^^^^^ consider implementing `Clone` for this type diff --git a/tests/ui/issues/issue-32805.rs b/tests/ui/numbers-arithmetic/f32-literal-roundingrs-32805.rs similarity index 85% rename from tests/ui/issues/issue-32805.rs rename to tests/ui/numbers-arithmetic/f32-literal-roundingrs-32805.rs index 717c00a248ad4..59efdb9a1aaf3 100644 --- a/tests/ui/issues/issue-32805.rs +++ b/tests/ui/numbers-arithmetic/f32-literal-roundingrs-32805.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/32805 //@ run-pass fn const_mir() -> f32 { 9007199791611905.0 } diff --git a/tests/ui/issues/issue-3763.rs b/tests/ui/privacy/private-field-access-violation-3763.rs similarity index 94% rename from tests/ui/issues/issue-3763.rs rename to tests/ui/privacy/private-field-access-violation-3763.rs index 893009a2cd9d2..3fc2337086d75 100644 --- a/tests/ui/issues/issue-3763.rs +++ b/tests/ui/privacy/private-field-access-violation-3763.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/3763 // Regression test for #3763 mod my_mod { diff --git a/tests/ui/issues/issue-3763.stderr b/tests/ui/privacy/private-field-access-violation-3763.stderr similarity index 80% rename from tests/ui/issues/issue-3763.stderr rename to tests/ui/privacy/private-field-access-violation-3763.stderr index d101e4c33add7..6ba83dc4d784f 100644 --- a/tests/ui/issues/issue-3763.stderr +++ b/tests/ui/privacy/private-field-access-violation-3763.stderr @@ -1,17 +1,17 @@ error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:17:32 + --> $DIR/private-field-access-violation-3763.rs:18:32 | LL | let _woohoo = (&my_struct).priv_field; | ^^^^^^^^^^ private field error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:20:41 + --> $DIR/private-field-access-violation-3763.rs:21:41 | LL | let _woohoo = (Box::new(my_struct)).priv_field; | ^^^^^^^^^^ private field error[E0624]: method `happyfun` is private - --> $DIR/issue-3763.rs:23:18 + --> $DIR/private-field-access-violation-3763.rs:24:18 | LL | fn happyfun(&self) {} | ------------------ private method defined here @@ -20,7 +20,7 @@ LL | (&my_struct).happyfun(); | ^^^^^^^^ private method error[E0624]: method `happyfun` is private - --> $DIR/issue-3763.rs:25:27 + --> $DIR/private-field-access-violation-3763.rs:26:27 | LL | fn happyfun(&self) {} | ------------------ private method defined here @@ -29,7 +29,7 @@ LL | (Box::new(my_struct)).happyfun(); | ^^^^^^^^ private method error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:26:26 + --> $DIR/private-field-access-violation-3763.rs:27:26 | LL | let nope = my_struct.priv_field; | ^^^^^^^^^^ private field diff --git a/tests/ui/issues/issue-2281-part1.rs b/tests/ui/resolve/cannot-find-value-in-scope-22811.rs similarity index 64% rename from tests/ui/issues/issue-2281-part1.rs rename to tests/ui/resolve/cannot-find-value-in-scope-22811.rs index 8340ade2239d1..fc07ae5e60ef4 100644 --- a/tests/ui/issues/issue-2281-part1.rs +++ b/tests/ui/resolve/cannot-find-value-in-scope-22811.rs @@ -1 +1,2 @@ +// https://github.com/rust-lang/rust/issues/22811 fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope diff --git a/tests/ui/issues/issue-2281-part1.stderr b/tests/ui/resolve/cannot-find-value-in-scope-22811.stderr similarity index 84% rename from tests/ui/issues/issue-2281-part1.stderr rename to tests/ui/resolve/cannot-find-value-in-scope-22811.stderr index 47a1ef8cc0277..529fd7e8f495f 100644 --- a/tests/ui/issues/issue-2281-part1.stderr +++ b/tests/ui/resolve/cannot-find-value-in-scope-22811.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `foobar` in this scope - --> $DIR/issue-2281-part1.rs:1:28 + --> $DIR/cannot-find-value-in-scope-22811.rs:2:28 | LL | fn main() { println!("{}", foobar); } | ^^^^^^ not found in this scope diff --git a/tests/ui/issues/issue-33293.rs b/tests/ui/resolve/unresolved-module-error-33293.rs similarity index 74% rename from tests/ui/issues/issue-33293.rs rename to tests/ui/resolve/unresolved-module-error-33293.rs index 115ae3aad204c..354f9914d4431 100644 --- a/tests/ui/issues/issue-33293.rs +++ b/tests/ui/resolve/unresolved-module-error-33293.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/33293 fn main() { match 0 { aaa::bbb(_) => () diff --git a/tests/ui/issues/issue-33293.stderr b/tests/ui/resolve/unresolved-module-error-33293.stderr similarity index 87% rename from tests/ui/issues/issue-33293.stderr rename to tests/ui/resolve/unresolved-module-error-33293.stderr index a82813194d77b..28528148387fb 100644 --- a/tests/ui/issues/issue-33293.stderr +++ b/tests/ui/resolve/unresolved-module-error-33293.stderr @@ -1,5 +1,5 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `aaa` - --> $DIR/issue-33293.rs:3:9 + --> $DIR/unresolved-module-error-33293.rs:4:9 | LL | aaa::bbb(_) => () | ^^^ use of unresolved module or unlinked crate `aaa` diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs b/tests/ui/structs/tuple-struct-field-naming-47073.rs similarity index 86% rename from tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs rename to tests/ui/structs/tuple-struct-field-naming-47073.rs index 6cd1f144359ba..6cf27e55c4bbb 100644 --- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs +++ b/tests/ui/structs/tuple-struct-field-naming-47073.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/47073 type Guilty = bool; type FineDollars = u32; diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr b/tests/ui/structs/tuple-struct-field-naming-47073.stderr similarity index 81% rename from tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr rename to tests/ui/structs/tuple-struct-field-naming-47073.stderr index 0a6fe24d5e349..efbdaeca4ea03 100644 --- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr +++ b/tests/ui/structs/tuple-struct-field-naming-47073.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `00` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:8:30 + --> $DIR/tuple-struct-field-naming-47073.rs:9:30 | LL | let _condemned = justice.00; | ^^ unknown field @@ -11,7 +11,7 @@ LL + let _condemned = justice.0; | error[E0609]: no field `001` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:10:31 + --> $DIR/tuple-struct-field-naming-47073.rs:11:31 | LL | let _punishment = justice.001; | ^^^ unknown field diff --git a/tests/ui/issues/auxiliary/issue-9188.rs b/tests/ui/symbol-names/auxiliary/aux-9188.rs similarity index 100% rename from tests/ui/issues/auxiliary/issue-9188.rs rename to tests/ui/symbol-names/auxiliary/aux-9188.rs diff --git a/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs b/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs new file mode 100644 index 0000000000000..a1014bb813fbe --- /dev/null +++ b/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs @@ -0,0 +1,11 @@ +// https://github.com/rust-lang/rust/issues/9188 +//@ run-pass +//@ aux-build:aux-9188.rs + +extern crate aux_9188 as lib; + +pub fn main() { + let a = lib::bar(); + let b = lib::foo::(); + assert_eq!(*a, *b); +} diff --git a/tests/ui/issues/issue-72839-error-overflow.rs b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs similarity index 89% rename from tests/ui/issues/issue-72839-error-overflow.rs rename to tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs index 6562d228409f3..436657e3de5ee 100644 --- a/tests/ui/issues/issue-72839-error-overflow.rs +++ b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/72839 // Regression test for issue #72839 // Tests that we do not overflow during trait selection after // a type error occurs diff --git a/tests/ui/issues/issue-72839-error-overflow.stderr b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr similarity index 80% rename from tests/ui/issues/issue-72839-error-overflow.stderr rename to tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr index 35be632f57975..da7500f77e1a8 100644 --- a/tests/ui/issues/issue-72839-error-overflow.stderr +++ b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `missing_var` in this scope - --> $DIR/issue-72839-error-overflow.rs:18:8 + --> $DIR/trait-selection-overflow-prevention-72839.rs:19:8 | LL | if missing_var % 8 == 0 {} | ^^^^^^^^^^^ not found in this scope diff --git a/tests/ui/issues/issue-47638.rs b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs similarity index 78% rename from tests/ui/issues/issue-47638.rs rename to tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs index e5a51ce0c06f0..c70dc74f3e551 100644 --- a/tests/ui/issues/issue-47638.rs +++ b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/47638 //@ run-pass #![allow(unused_variables)] fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) { diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs similarity index 93% rename from tests/ui/issues/issue-20413.rs rename to tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs index 138a235e675e3..e8c27ff5cc895 100644 --- a/tests/ui/issues/issue-20413.rs +++ b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/20413 trait Foo { fn answer(self); } diff --git a/tests/ui/issues/issue-20413.stderr b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr similarity index 92% rename from tests/ui/issues/issue-20413.stderr rename to tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr index 42f3cd2d06274..72aff1b9ee8b7 100644 --- a/tests/ui/issues/issue-20413.stderr +++ b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr @@ -1,5 +1,5 @@ error[E0392]: type parameter `T` is never used - --> $DIR/issue-20413.rs:5:15 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:6:15 | LL | struct NoData; | ^ unused type parameter @@ -8,14 +8,14 @@ LL | struct NoData; = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead error[E0275]: overflow evaluating the requirement `NoData>>>>>>: Foo` - --> $DIR/issue-20413.rs:8:36 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:9:36 | LL | impl Foo for T where NoData: Foo { | ^^^ | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) + = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`) note: required for `NoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Foo` - --> $DIR/issue-20413.rs:8:9 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:9:9 | LL | impl Foo for T where NoData: Foo { | ^^^ ^ --- unsatisfied trait bound introduced here @@ -23,19 +23,19 @@ LL | impl Foo for T where NoData: Foo { = note: required for `NoData` to implement `Foo` error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>: Bar` - --> $DIR/issue-20413.rs:27:42 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:42 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) + = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`) note: required for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz` - --> $DIR/issue-20413.rs:34:9 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:9 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ ^ --- unsatisfied trait bound introduced here note: required for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar` - --> $DIR/issue-20413.rs:27:9 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:9 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ ^ --- unsatisfied trait bound introduced here @@ -43,19 +43,19 @@ LL | impl Bar for T where EvenLessData: Baz { = note: required for `EvenLessData` to implement `Baz` error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>: Baz` - --> $DIR/issue-20413.rs:34:42 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:42 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) + = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`) note: required for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar` - --> $DIR/issue-20413.rs:27:9 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:9 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ ^ --- unsatisfied trait bound introduced here note: required for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz` - --> $DIR/issue-20413.rs:34:9 + --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:9 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ ^ --- unsatisfied trait bound introduced here diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs similarity index 81% rename from tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs rename to tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs index 35402dff67553..4b2081d14d089 100644 --- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs +++ b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/51632 #![allow(dead_code)] fn missing_discourses() -> Result { diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr similarity index 92% rename from tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr rename to tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr index 99fce1eeea6f6..c624605d76ac2 100644 --- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr @@ -1,5 +1,5 @@ error[E0308]: `?` operator has incompatible types - --> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5 + --> $DIR/incompatible-types-with-question-mark-51632.rs:9:5 | LL | fn forbidden_narratives() -> Result { | ----------------- expected `Result` because of return type