about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-10 15:43:52 -0400
committerGitHub <noreply@github.com>2025-08-10 15:43:52 -0400
commit5bd4e832d3608a4b06e3bc0b0bf348e664e961ec (patch)
tree7c1d1b40c6f63cb455a916c690f9f1d7cb8a27b1
parent18eeac04fc5c2a4c4a8020dbdf1c652077ad0e4e (diff)
parentaa543963c68061d9ca46037071d66a028626ff3f (diff)
downloadrust-5bd4e832d3608a4b06e3bc0b0bf348e664e961ec.tar.gz
rust-5bd4e832d3608a4b06e3bc0b0bf348e664e961ec.zip
Rollup merge of #144553 - Oneirical:uncountable-integer-4, r=jieyouxu
Rehome 32 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang/rust#143902 divided into smaller, easier to review chunks.

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
-rw-r--r--tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs (renamed from tests/ui/issues/issue-23442.rs)1
-rw-r--r--tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs (renamed from tests/ui/issues/issue-91489.rs)1
-rw-r--r--tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs (renamed from tests/ui/issues/issue-9725.rs)1
-rw-r--r--tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr (renamed from tests/ui/issues/issue-9725.stderr)4
-rw-r--r--tests/ui/cast/constant-expression-cast-9942.rs (renamed from tests/ui/issues/issue-9942.rs)1
-rw-r--r--tests/ui/closures/closure-type-inference-in-context-9129.rs (renamed from tests/ui/issues/issue-9129.rs)1
-rw-r--r--tests/ui/coercion/trait-object-coercion-distribution-9951.rs (renamed from tests/ui/issues/issue-9951.rs)1
-rw-r--r--tests/ui/coercion/trait-object-coercion-distribution-9951.stderr (renamed from tests/ui/issues/issue-9951.stderr)2
-rw-r--r--tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs (renamed from tests/ui/issues/issue-98299.rs)1
-rw-r--r--tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr (renamed from tests/ui/issues/issue-98299.stderr)12
-rw-r--r--tests/ui/cross-crate/auxiliary/aux-9155.rs (renamed from tests/ui/issues/auxiliary/issue-9155.rs)0
-rw-r--r--tests/ui/cross-crate/auxiliary/aux-9906.rs (renamed from tests/ui/issues/auxiliary/issue-9906.rs)0
-rw-r--r--tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs11
-rw-r--r--tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs10
-rw-r--r--tests/ui/deref/dereferenceable-type-behavior-22992.rs (renamed from tests/ui/issues/issue-22992.rs)2
-rw-r--r--tests/ui/drop/multiple-drop-safe-code-25549.rs (renamed from tests/ui/issues/issue-25549-multiple-drop.rs)1
-rw-r--r--tests/ui/drop/static-variable-with-drop-trait-9243.rs (renamed from tests/ui/issues/issue-9243.rs)1
-rw-r--r--tests/ui/editions/edition-specific-identifier-shadowing-53333.rs (renamed from tests/ui/issues/issue-53333.rs)1
-rw-r--r--tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs (renamed from tests/ui/issues/issue-9837.rs)1
-rw-r--r--tests/ui/enum/single-variant-enum-deref-error-9814.rs (renamed from tests/ui/issues/issue-9814.rs)1
-rw-r--r--tests/ui/enum/single-variant-enum-deref-error-9814.stderr (renamed from tests/ui/issues/issue-9814.stderr)2
-rw-r--r--tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs (renamed from tests/ui/issues/issue-3037.rs)1
-rw-r--r--tests/ui/imports/auxiliary/aux-9968.rs (renamed from tests/ui/issues/auxiliary/issue-9968.rs)0
-rw-r--r--tests/ui/imports/pub-use-link-errors-9968.rs12
-rw-r--r--tests/ui/issues/issue-9155.rs11
-rw-r--r--tests/ui/issues/issue-9906.rs10
-rw-r--r--tests/ui/issues/issue-9968.rs12
-rw-r--r--tests/ui/iterators/for-loop-over-mut-iterator-21655.rs (renamed from tests/ui/issues/issue-21655.rs)1
-rw-r--r--tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs (renamed from tests/ui/issues/issue-9259.rs)1
-rw-r--r--tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs (renamed from tests/ui/issues/issue-29710.rs)1
-rw-r--r--tests/ui/loops/loop-with-label-9047.rs (renamed from tests/ui/issues/issue-9047.rs)1
-rw-r--r--tests/ui/macros/macro-expansion-module-structure-9110.rs (renamed from tests/ui/issues/issue-9110.rs)1
-rw-r--r--tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs (renamed from tests/ui/issues/issue-9737.rs)1
-rw-r--r--tests/ui/macros/private-struct-member-macro-access-25386.rs (renamed from tests/ui/issues/issue-25386.rs)1
-rw-r--r--tests/ui/macros/private-struct-member-macro-access-25386.stderr (renamed from tests/ui/issues/issue-25386.stderr)2
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed (renamed from tests/ui/issues/issue-92741.fixed)1
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs (renamed from tests/ui/issues/issue-92741.rs)1
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr (renamed from tests/ui/issues/issue-92741.stderr)6
-rw-r--r--tests/ui/packed/misaligned-reference-drop-field-99838.rs (renamed from tests/ui/issues/issue-99838.rs)1
-rw-r--r--tests/ui/pattern/unit-variant-pattern-matching-29383.rs (renamed from tests/ui/issues/issue-pr29383.rs)1
-rw-r--r--tests/ui/pattern/unit-variant-pattern-matching-29383.stderr (renamed from tests/ui/issues/issue-pr29383.stderr)4
-rw-r--r--tests/ui/static/static-string-slice-9249.rs (renamed from tests/ui/issues/issue-9249.rs)1
-rw-r--r--tests/ui/structs/struct-field-access-errors-24365.rs (renamed from tests/ui/issues/issue-24365.rs)1
-rw-r--r--tests/ui/structs/struct-field-access-errors-24365.stderr (renamed from tests/ui/issues/issue-24365.stderr)6
-rw-r--r--tests/ui/thread-local/thread-local-with-attributes-30756.rs (renamed from tests/ui/issues/issue-30756.rs)1
-rw-r--r--tests/ui/typeck/unused-type-parameter-span-30236.rs (renamed from tests/ui/issues/issue-30236.rs)1
-rw-r--r--tests/ui/typeck/unused-type-parameter-span-30236.stderr (renamed from tests/ui/issues/issue-30236.stderr)2
-rw-r--r--tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs (renamed from tests/ui/issues/issue-88150.rs)1
48 files changed, 83 insertions, 54 deletions
diff --git a/tests/ui/issues/issue-23442.rs b/tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs
index 883c5bb511a..89a2d0177a3 100644
--- a/tests/ui/issues/issue-23442.rs
+++ b/tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/23442
 //@ check-pass
 #![allow(dead_code)]
 use std::marker::PhantomData;
diff --git a/tests/ui/issues/issue-91489.rs b/tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs
index 0566302c481..929e98ad719 100644
--- a/tests/ui/issues/issue-91489.rs
+++ b/tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/91489
 //@ check-pass
 
 // regression test for #91489
diff --git a/tests/ui/issues/issue-9725.rs b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs
index 360effbd119..6b0b8e37b8c 100644
--- a/tests/ui/issues/issue-9725.rs
+++ b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9725
 struct A { foo: isize }
 
 fn main() {
diff --git a/tests/ui/issues/issue-9725.stderr b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr
index 687e0cc0f3e..f4d19bed419 100644
--- a/tests/ui/issues/issue-9725.stderr
+++ b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr
@@ -1,11 +1,11 @@
 error[E0416]: identifier `foo` is bound more than once in the same pattern
-  --> $DIR/issue-9725.rs:4:18
+  --> $DIR/struct-destructuring-repeated-bindings-9725.rs:5:18
    |
 LL |     let A { foo, foo } = A { foo: 3 };
    |                  ^^^ used in a pattern more than once
 
 error[E0025]: field `foo` bound multiple times in the pattern
-  --> $DIR/issue-9725.rs:4:18
+  --> $DIR/struct-destructuring-repeated-bindings-9725.rs:5:18
    |
 LL |     let A { foo, foo } = A { foo: 3 };
    |             ---  ^^^ multiple uses of `foo` in pattern
diff --git a/tests/ui/issues/issue-9942.rs b/tests/ui/cast/constant-expression-cast-9942.rs
index 6332d9b3e08..d0a6f27b7e3 100644
--- a/tests/ui/issues/issue-9942.rs
+++ b/tests/ui/cast/constant-expression-cast-9942.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9942
 //@ run-pass
 
 pub fn main() {
diff --git a/tests/ui/issues/issue-9129.rs b/tests/ui/closures/closure-type-inference-in-context-9129.rs
index 3856cd133e8..53ee8faab85 100644
--- a/tests/ui/issues/issue-9129.rs
+++ b/tests/ui/closures/closure-type-inference-in-context-9129.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9129
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/issues/issue-9951.rs b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs
index 2cd7cd4f430..526d6561510 100644
--- a/tests/ui/issues/issue-9951.rs
+++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9951
 //@ run-pass
 
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-9951.stderr b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr
index 62ed9f3e0cc..0c672aa9b33 100644
--- a/tests/ui/issues/issue-9951.stderr
+++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr
@@ -1,5 +1,5 @@
 warning: method `noop` is never used
-  --> $DIR/issue-9951.rs:6:6
+  --> $DIR/trait-object-coercion-distribution-9951.rs:7:6
    |
 LL | trait Bar {
    |       --- method in this trait
diff --git a/tests/ui/issues/issue-98299.rs b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
index ba63d963475..49c88856bc9 100644
--- a/tests/ui/issues/issue-98299.rs
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/98299
 use std::convert::TryFrom;
 
 pub fn test_usage(p: ()) {
diff --git a/tests/ui/issues/issue-98299.stderr b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
index b645267e3b9..1557b83b00e 100644
--- a/tests/ui/issues/issue-98299.stderr
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
@@ -1,5 +1,5 @@
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     ------------                   ^^^^
@@ -7,7 +7,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required by a const generic parameter in `SmallCString`
-  --> $DIR/issue-98299.rs:10:25
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:11:25
    |
 LL | pub struct SmallCString<const N: usize> {}
    |                         ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString`
@@ -17,7 +17,7 @@ LL |     SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
    |                                        +++++++++++++++++
 
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     ------------                   ^^^^
@@ -25,7 +25,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required for `SmallCString<_>` to implement `TryFrom<()>`
-  --> $DIR/issue-98299.rs:12:22
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
    |
 LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
    |      --------------  ^^^^^^^^^^^     ^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL |     SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
    |                                        +++++++++++++++++
 
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     -------------------------      ^^^^
@@ -45,7 +45,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required for `SmallCString<_>` to implement `TryFrom<()>`
-  --> $DIR/issue-98299.rs:12:22
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
    |
 LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
    |      --------------  ^^^^^^^^^^^     ^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/auxiliary/issue-9155.rs b/tests/ui/cross-crate/auxiliary/aux-9155.rs
index 049a96a655a..049a96a655a 100644
--- a/tests/ui/issues/auxiliary/issue-9155.rs
+++ b/tests/ui/cross-crate/auxiliary/aux-9155.rs
diff --git a/tests/ui/issues/auxiliary/issue-9906.rs b/tests/ui/cross-crate/auxiliary/aux-9906.rs
index 8a3eea790a2..8a3eea790a2 100644
--- a/tests/ui/issues/auxiliary/issue-9906.rs
+++ b/tests/ui/cross-crate/auxiliary/aux-9906.rs
diff --git a/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs
new file mode 100644
index 00000000000..35286615980
--- /dev/null
+++ b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs
@@ -0,0 +1,11 @@
+// https://github.com/rust-lang/rust/issues/9155
+//@ run-pass
+//@ aux-build:aux-9155.rs
+
+extern crate aux_9155;
+
+struct Baz;
+
+pub fn main() {
+    aux_9155::Foo::new(Baz);
+}
diff --git a/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs
new file mode 100644
index 00000000000..b49951bd1f9
--- /dev/null
+++ b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs
@@ -0,0 +1,10 @@
+// https://github.com/rust-lang/rust/issues/9906
+//@ run-pass
+//@ aux-build:aux-9906.rs
+
+extern crate aux_9906 as testmod;
+
+pub fn main() {
+    testmod::foo();
+    testmod::FooBar::new(1);
+}
diff --git a/tests/ui/issues/issue-22992.rs b/tests/ui/deref/dereferenceable-type-behavior-22992.rs
index 3bc15cc948a..19fc2e7eb0b 100644
--- a/tests/ui/issues/issue-22992.rs
+++ b/tests/ui/deref/dereferenceable-type-behavior-22992.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/22992
 //@ run-pass
 
 struct X { val: i32 }
@@ -6,7 +7,6 @@ impl std::ops::Deref for X {
     fn deref(&self) -> &i32 { &self.val }
 }
 
-
 trait            M                   { fn m(self); }
 impl             M for i32           { fn m(self) { println!("i32::m()"); } }
 impl             M for X             { fn m(self) { println!("X::m()"); } }
diff --git a/tests/ui/issues/issue-25549-multiple-drop.rs b/tests/ui/drop/multiple-drop-safe-code-25549.rs
index 1eec15a4aa2..dcf7a3fc79c 100644
--- a/tests/ui/issues/issue-25549-multiple-drop.rs
+++ b/tests/ui/drop/multiple-drop-safe-code-25549.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/25549
 //@ run-pass
 #![allow(unused_variables)]
 struct Foo<'r>(&'r mut i32);
diff --git a/tests/ui/issues/issue-9243.rs b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
index 34ae944d1d8..0ae32c983e9 100644
--- a/tests/ui/issues/issue-9243.rs
+++ b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9243
 //@ build-pass
 #![allow(dead_code)]
 // Regression test for issue 9243
diff --git a/tests/ui/issues/issue-53333.rs b/tests/ui/editions/edition-specific-identifier-shadowing-53333.rs
index 468b7d8075f..dd973bb8439 100644
--- a/tests/ui/issues/issue-53333.rs
+++ b/tests/ui/editions/edition-specific-identifier-shadowing-53333.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/53333
 //@ run-pass
 #![allow(unused_imports)]
 //@ edition:2018
diff --git a/tests/ui/issues/issue-9837.rs b/tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs
index 33152a5d077..8768d81b93f 100644
--- a/tests/ui/issues/issue-9837.rs
+++ b/tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9837
 //@ run-pass
 const C1: i32 = 0x12345678;
 const C2: isize = C1 as i16 as isize;
diff --git a/tests/ui/issues/issue-9814.rs b/tests/ui/enum/single-variant-enum-deref-error-9814.rs
index a87478e221b..f10d665299c 100644
--- a/tests/ui/issues/issue-9814.rs
+++ b/tests/ui/enum/single-variant-enum-deref-error-9814.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9814
 // Verify that single-variant enums can't be de-referenced
 // Regression test for issue #9814
 
diff --git a/tests/ui/issues/issue-9814.stderr b/tests/ui/enum/single-variant-enum-deref-error-9814.stderr
index fa23fb7c176..5e069f4c21d 100644
--- a/tests/ui/issues/issue-9814.stderr
+++ b/tests/ui/enum/single-variant-enum-deref-error-9814.stderr
@@ -1,5 +1,5 @@
 error[E0614]: type `Foo` cannot be dereferenced
-  --> $DIR/issue-9814.rs:7:13
+  --> $DIR/single-variant-enum-deref-error-9814.rs:8:13
    |
 LL |     let _ = *Foo::Bar(2);
    |             ^^^^^^^^^^^^ can't be dereferenced
diff --git a/tests/ui/issues/issue-3037.rs b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs
index 933b450ac8e..7a7abb1c67c 100644
--- a/tests/ui/issues/issue-3037.rs
+++ b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/3037
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/issues/auxiliary/issue-9968.rs b/tests/ui/imports/auxiliary/aux-9968.rs
index 8d795b59ea8..8d795b59ea8 100644
--- a/tests/ui/issues/auxiliary/issue-9968.rs
+++ b/tests/ui/imports/auxiliary/aux-9968.rs
diff --git a/tests/ui/imports/pub-use-link-errors-9968.rs b/tests/ui/imports/pub-use-link-errors-9968.rs
new file mode 100644
index 00000000000..517a0049ce0
--- /dev/null
+++ b/tests/ui/imports/pub-use-link-errors-9968.rs
@@ -0,0 +1,12 @@
+// https://github.com/rust-lang/rust/issues/9968
+//@ run-pass
+//@ aux-build:aux-9968.rs
+
+extern crate aux_9968 as lib;
+
+use lib::{Trait, Struct};
+
+pub fn main()
+{
+    Struct::init().test();
+}
diff --git a/tests/ui/issues/issue-9155.rs b/tests/ui/issues/issue-9155.rs
deleted file mode 100644
index dfd9dea2009..00000000000
--- a/tests/ui/issues/issue-9155.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9155.rs
-
-
-extern crate issue_9155;
-
-struct Baz;
-
-pub fn main() {
-    issue_9155::Foo::new(Baz);
-}
diff --git a/tests/ui/issues/issue-9906.rs b/tests/ui/issues/issue-9906.rs
deleted file mode 100644
index 50417d3e456..00000000000
--- a/tests/ui/issues/issue-9906.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9906.rs
-
-
-extern crate issue_9906 as testmod;
-
-pub fn main() {
-    testmod::foo();
-    testmod::FooBar::new(1);
-}
diff --git a/tests/ui/issues/issue-9968.rs b/tests/ui/issues/issue-9968.rs
deleted file mode 100644
index 89e60ba5ac7..00000000000
--- a/tests/ui/issues/issue-9968.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9968.rs
-
-
-extern crate issue_9968 as lib;
-
-use lib::{Trait, Struct};
-
-pub fn main()
-{
-    Struct::init().test();
-}
diff --git a/tests/ui/issues/issue-21655.rs b/tests/ui/iterators/for-loop-over-mut-iterator-21655.rs
index 1068b28b338..b5c9826bd45 100644
--- a/tests/ui/issues/issue-21655.rs
+++ b/tests/ui/iterators/for-loop-over-mut-iterator-21655.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/21655
 //@ run-pass
 
 fn test(it: &mut dyn Iterator<Item=i32>) {
diff --git a/tests/ui/issues/issue-9259.rs b/tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs
index c45288f7d65..7e39fdc3f10 100644
--- a/tests/ui/issues/issue-9259.rs
+++ b/tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9259
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-29710.rs b/tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs
index 906ffe9e77b..51702f69c20 100644
--- a/tests/ui/issues/issue-29710.rs
+++ b/tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/29710
 //@ check-pass
 #![deny(unused_results)]
 #![allow(dead_code)]
diff --git a/tests/ui/issues/issue-9047.rs b/tests/ui/loops/loop-with-label-9047.rs
index 97733588d51..29e6dba0b9e 100644
--- a/tests/ui/issues/issue-9047.rs
+++ b/tests/ui/loops/loop-with-label-9047.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9047
 //@ run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-9110.rs b/tests/ui/macros/macro-expansion-module-structure-9110.rs
index 47533dc43b5..b6241a7c18e 100644
--- a/tests/ui/issues/issue-9110.rs
+++ b/tests/ui/macros/macro-expansion-module-structure-9110.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9110
 //@ check-pass
 #![allow(dead_code)]
 #![allow(non_snake_case)]
diff --git a/tests/ui/issues/issue-9737.rs b/tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs
index a8a17e58dd6..957c2e3f103 100644
--- a/tests/ui/issues/issue-9737.rs
+++ b/tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9737
 //@ run-pass
 #![allow(unused_variables)]
 macro_rules! f {
diff --git a/tests/ui/issues/issue-25386.rs b/tests/ui/macros/private-struct-member-macro-access-25386.rs
index b26cc77680d..88e5a22a699 100644
--- a/tests/ui/issues/issue-25386.rs
+++ b/tests/ui/macros/private-struct-member-macro-access-25386.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/25386
 mod stuff {
     pub struct Item {
         c_object: Box<CObj>,
diff --git a/tests/ui/issues/issue-25386.stderr b/tests/ui/macros/private-struct-member-macro-access-25386.stderr
index 720b77866a5..d02a41848f4 100644
--- a/tests/ui/issues/issue-25386.stderr
+++ b/tests/ui/macros/private-struct-member-macro-access-25386.stderr
@@ -1,5 +1,5 @@
 error[E0616]: field `c_object` of struct `Item` is private
-  --> $DIR/issue-25386.rs:19:16
+  --> $DIR/private-struct-member-macro-access-25386.rs:20:16
    |
 LL |         (*$var.c_object).$member.is_some()
    |                ^^^^^^^^ private field
diff --git a/tests/ui/issues/issue-92741.fixed b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed
index cb37d25273f..c165779e402 100644
--- a/tests/ui/issues/issue-92741.fixed
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/92741
 //@ run-rustfix
 fn main() {}
 fn _foo() -> bool {
diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs
index 1c5d5810a57..b3fa5f77308 100644
--- a/tests/ui/issues/issue-92741.rs
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/92741
 //@ run-rustfix
 fn main() {}
 fn _foo() -> bool {
diff --git a/tests/ui/issues/issue-92741.stderr b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr
index 49315e7a8bf..60917d9a63e 100644
--- a/tests/ui/issues/issue-92741.stderr
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:4:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:5:5
    |
 LL |   fn _foo() -> bool {
    |                ---- expected `bool` because of return type
@@ -15,7 +15,7 @@ LL -     mut
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:10:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:11:5
    |
 LL |   fn _bar() -> bool {
    |                ---- expected `bool` because of return type
@@ -31,7 +31,7 @@ LL +     if true { true } else { false }
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:15:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:16:5
    |
 LL |   fn _baz() -> bool {
    |                ---- expected `bool` because of return type
diff --git a/tests/ui/issues/issue-99838.rs b/tests/ui/packed/misaligned-reference-drop-field-99838.rs
index 687b47fbe71..58e168162cb 100644
--- a/tests/ui/issues/issue-99838.rs
+++ b/tests/ui/packed/misaligned-reference-drop-field-99838.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/99838
 //@ run-pass
 
 use std::hint;
diff --git a/tests/ui/issues/issue-pr29383.rs b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs
index 2bcc0aa2782..e339dc01f46 100644
--- a/tests/ui/issues/issue-pr29383.rs
+++ b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/29383
 enum E {
     A,
     B,
diff --git a/tests/ui/issues/issue-pr29383.stderr b/tests/ui/pattern/unit-variant-pattern-matching-29383.stderr
index 57783d75ba1..e30837568a5 100644
--- a/tests/ui/issues/issue-pr29383.stderr
+++ b/tests/ui/pattern/unit-variant-pattern-matching-29383.stderr
@@ -1,5 +1,5 @@
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::A`
-  --> $DIR/issue-pr29383.rs:9:14
+  --> $DIR/unit-variant-pattern-matching-29383.rs:10:14
    |
 LL |     A,
    |     - `E::A` defined here
@@ -8,7 +8,7 @@ LL |         Some(E::A(..)) => {}
    |              ^^^^^^^^ help: use this syntax instead: `E::A`
 
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::B`
-  --> $DIR/issue-pr29383.rs:11:14
+  --> $DIR/unit-variant-pattern-matching-29383.rs:12:14
    |
 LL |     B,
    |     - `E::B` defined here
diff --git a/tests/ui/issues/issue-9249.rs b/tests/ui/static/static-string-slice-9249.rs
index b98ba050521..da099117bd4 100644
--- a/tests/ui/issues/issue-9249.rs
+++ b/tests/ui/static/static-string-slice-9249.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9249
 //@ check-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-24365.rs b/tests/ui/structs/struct-field-access-errors-24365.rs
index da195116047..13a95cd1cca 100644
--- a/tests/ui/issues/issue-24365.rs
+++ b/tests/ui/structs/struct-field-access-errors-24365.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/24365
 pub enum Attribute {
     Code {attr_name_idx: u16},
 }
diff --git a/tests/ui/issues/issue-24365.stderr b/tests/ui/structs/struct-field-access-errors-24365.stderr
index 3f6ed0231d8..65275af4701 100644
--- a/tests/ui/issues/issue-24365.stderr
+++ b/tests/ui/structs/struct-field-access-errors-24365.stderr
@@ -1,17 +1,17 @@
 error[E0609]: no field `b` on type `Foo`
-  --> $DIR/issue-24365.rs:10:22
+  --> $DIR/struct-field-access-errors-24365.rs:11:22
    |
 LL |     println!("{}", a.b);
    |                      ^ unknown field
 
 error[E0609]: no field `attr_name_idx` on type `&Attribute`
-  --> $DIR/issue-24365.rs:17:18
+  --> $DIR/struct-field-access-errors-24365.rs:18:18
    |
 LL |     let z = (&x).attr_name_idx;
    |                  ^^^^^^^^^^^^^ unknown field
 
 error[E0609]: no field `attr_name_idx` on type `Attribute`
-  --> $DIR/issue-24365.rs:18:15
+  --> $DIR/struct-field-access-errors-24365.rs:19:15
    |
 LL |     let y = x.attr_name_idx;
    |               ^^^^^^^^^^^^^ unknown field
diff --git a/tests/ui/issues/issue-30756.rs b/tests/ui/thread-local/thread-local-with-attributes-30756.rs
index d103776406c..fcf7bb813c8 100644
--- a/tests/ui/issues/issue-30756.rs
+++ b/tests/ui/thread-local/thread-local-with-attributes-30756.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/30756
 //@ run-pass
 #![forbid(unsafe_code)]
 
diff --git a/tests/ui/issues/issue-30236.rs b/tests/ui/typeck/unused-type-parameter-span-30236.rs
index 08d08a54402..bcdc922a71b 100644
--- a/tests/ui/issues/issue-30236.rs
+++ b/tests/ui/typeck/unused-type-parameter-span-30236.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/30236
 type Foo<
     Unused //~ ERROR type parameter `Unused` is never used
     > = u8;
diff --git a/tests/ui/issues/issue-30236.stderr b/tests/ui/typeck/unused-type-parameter-span-30236.stderr
index bfe374a653f..038bd1ebd28 100644
--- a/tests/ui/issues/issue-30236.stderr
+++ b/tests/ui/typeck/unused-type-parameter-span-30236.stderr
@@ -1,5 +1,5 @@
 error[E0091]: type parameter `Unused` is never used
-  --> $DIR/issue-30236.rs:2:5
+  --> $DIR/unused-type-parameter-span-30236.rs:3:5
    |
 LL |     Unused
    |     ^^^^^^ unused type parameter
diff --git a/tests/ui/issues/issue-88150.rs b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs
index 1dadba307c0..1387c5b6c10 100644
--- a/tests/ui/issues/issue-88150.rs
+++ b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/88150
 //@ run-pass
 //@ compile-flags:-C debuginfo=2
 //@ edition:2018