about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKivooeo <Kivooeo123@gmail.com>2025-07-14 02:19:24 +0500
committerKivooeo <Kivooeo123@gmail.com>2025-07-17 15:51:32 +0500
commitc0597fbd80acdc23434ed8f59c41f0728a2d9ba6 (patch)
tree12196fed39f67f6cb65205c3ba3adaf7cee74115
parentb7d024b05622702df0b8f0eb7d67c9e7b534b9ea (diff)
downloadrust-c0597fbd80acdc23434ed8f59c41f0728a2d9ba6.tar.gz
rust-c0597fbd80acdc23434ed8f59c41f0728a2d9ba6.zip
cleaned up some tests
Reverting file name weird-exprs.rs due to its historical use, recognition in community and references
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr4
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr10
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.rs2
-rw-r--r--tests/ui/expr/weird-exprs.rs (renamed from tests/ui/expr/syntax-edge-cases-lint-clean.rs)0
-rw-r--r--tests/ui/fmt/println-debug-different-types.rs4
-rw-r--r--tests/ui/linking/ld64-cross-compilation.rs8
-rw-r--r--tests/ui/shadowed/shadowing-generic-item.rs2
-rw-r--r--tests/ui/shadowed/shadowing-generic-item.stderr4
-rw-r--r--tests/ui/symbol-names/struct-constructor-mangling.rs4
9 files changed, 22 insertions, 16 deletions
diff --git a/tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr b/tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr
index 5df2c687bdd..c0d568eb538 100644
--- a/tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr
+++ b/tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr
@@ -1,11 +1,11 @@
 error[E0452]: malformed lint attribute input
-  --> $DIR/deduplicate-diagnostics.rs:8:8
+  --> $DIR/deduplicate-diagnostics.rs:10:8
    |
 LL | #[deny("literal")]
    |        ^^^^^^^^^ bad attribute argument
 
 error: cannot find derive macro `Unresolved` in this scope
-  --> $DIR/deduplicate-diagnostics.rs:4:10
+  --> $DIR/deduplicate-diagnostics.rs:6:10
    |
 LL | #[derive(Unresolved)]
    |          ^^^^^^^^^^
diff --git a/tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr b/tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr
index 48e2ba7b86a..74d7066293f 100644
--- a/tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr
+++ b/tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr
@@ -1,17 +1,17 @@
 error[E0452]: malformed lint attribute input
-  --> $DIR/deduplicate-diagnostics.rs:8:8
+  --> $DIR/deduplicate-diagnostics.rs:10:8
    |
 LL | #[deny("literal")]
    |        ^^^^^^^^^ bad attribute argument
 
 error: cannot find derive macro `Unresolved` in this scope
-  --> $DIR/deduplicate-diagnostics.rs:4:10
+  --> $DIR/deduplicate-diagnostics.rs:6:10
    |
 LL | #[derive(Unresolved)]
    |          ^^^^^^^^^^
 
 error: cannot find derive macro `Unresolved` in this scope
-  --> $DIR/deduplicate-diagnostics.rs:4:10
+  --> $DIR/deduplicate-diagnostics.rs:6:10
    |
 LL | #[derive(Unresolved)]
    |          ^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | #[derive(Unresolved)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0452]: malformed lint attribute input
-  --> $DIR/deduplicate-diagnostics.rs:8:8
+  --> $DIR/deduplicate-diagnostics.rs:10:8
    |
 LL | #[deny("literal")]
    |        ^^^^^^^^^ bad attribute argument
@@ -27,7 +27,7 @@ LL | #[deny("literal")]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0452]: malformed lint attribute input
-  --> $DIR/deduplicate-diagnostics.rs:8:8
+  --> $DIR/deduplicate-diagnostics.rs:10:8
    |
 LL | #[deny("literal")]
    |        ^^^^^^^^^ bad attribute argument
diff --git a/tests/ui/diagnostic-flags/deduplicate-diagnostics.rs b/tests/ui/diagnostic-flags/deduplicate-diagnostics.rs
index 299c1f5f461..48705266e35 100644
--- a/tests/ui/diagnostic-flags/deduplicate-diagnostics.rs
+++ b/tests/ui/diagnostic-flags/deduplicate-diagnostics.rs
@@ -1,3 +1,5 @@
+//! Test that `-Z deduplicate-diagnostics` flag properly deduplicates diagnostic messages.
+
 //@ revisions: duplicate deduplicate
 //@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes
 
diff --git a/tests/ui/expr/syntax-edge-cases-lint-clean.rs b/tests/ui/expr/weird-exprs.rs
index 7db92d46067..7db92d46067 100644
--- a/tests/ui/expr/syntax-edge-cases-lint-clean.rs
+++ b/tests/ui/expr/weird-exprs.rs
diff --git a/tests/ui/fmt/println-debug-different-types.rs b/tests/ui/fmt/println-debug-different-types.rs
index 64994a55817..9e21be1f03f 100644
--- a/tests/ui/fmt/println-debug-different-types.rs
+++ b/tests/ui/fmt/println-debug-different-types.rs
@@ -1,8 +1,10 @@
+//! Smoke test for println!() with debug format specifiers.
+
 //@ run-pass
 
 #[derive(Debug)]
 enum Numbers {
-    Three
+    Three,
 }
 
 pub fn main() {
diff --git a/tests/ui/linking/ld64-cross-compilation.rs b/tests/ui/linking/ld64-cross-compilation.rs
index 75acc07a002..d6c6d1ff91d 100644
--- a/tests/ui/linking/ld64-cross-compilation.rs
+++ b/tests/ui/linking/ld64-cross-compilation.rs
@@ -1,11 +1,11 @@
+//! This is a regression test for https://github.com/rust-lang/rust/issues/140686.
+//! Although this is a ld64(ld-classic) bug, we still need to support it
+//! due to cross-compilation and support for older Xcode.
+
 //@ compile-flags: -Copt-level=3 -Ccodegen-units=256 -Clink-arg=-ld_classic
 //@ run-pass
 //@ only-x86_64-apple-darwin
 
-// This is a regression test for https://github.com/rust-lang/rust/issues/140686.
-// Although this is a ld64(ld-classic) bug, we still need to support it
-// due to cross-compilation and support for older Xcode.
-
 fn main() {
     let dst: Vec<u8> = Vec::new();
     let len = broken_func(std::hint::black_box(2), dst);
diff --git a/tests/ui/shadowed/shadowing-generic-item.rs b/tests/ui/shadowed/shadowing-generic-item.rs
index 46cfdf1efa8..c3a0ced04e7 100644
--- a/tests/ui/shadowed/shadowing-generic-item.rs
+++ b/tests/ui/shadowed/shadowing-generic-item.rs
@@ -1,3 +1,5 @@
+//! Test that generic parameters shadow structs and modules with the same name.
+
 struct T { i: i32 }
 fn f<T>() {
     let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T`
diff --git a/tests/ui/shadowed/shadowing-generic-item.stderr b/tests/ui/shadowed/shadowing-generic-item.stderr
index f0eaa1a5c64..55a0bb36ea8 100644
--- a/tests/ui/shadowed/shadowing-generic-item.stderr
+++ b/tests/ui/shadowed/shadowing-generic-item.stderr
@@ -1,5 +1,5 @@
 error[E0574]: expected struct, variant or union type, found type parameter `T`
-  --> $DIR/lexical-scopes.rs:3:13
+  --> $DIR/shadowing-generic-item.rs:5:13
    |
 LL | struct T { i: i32 }
    |        - you might have meant to refer to this struct
@@ -9,7 +9,7 @@ LL |     let t = T { i: 0 };
    |             ^ not a struct, variant or union type
 
 error[E0599]: no function or associated item named `f` found for type parameter `Foo` in the current scope
-  --> $DIR/lexical-scopes.rs:10:10
+  --> $DIR/shadowing-generic-item.rs:12:10
    |
 LL | fn g<Foo>() {
    |      --- function or associated item `f` not found for this type parameter
diff --git a/tests/ui/symbol-names/struct-constructor-mangling.rs b/tests/ui/symbol-names/struct-constructor-mangling.rs
index f32cbb7aaae..ec8791e2154 100644
--- a/tests/ui/symbol-names/struct-constructor-mangling.rs
+++ b/tests/ui/symbol-names/struct-constructor-mangling.rs
@@ -1,3 +1,5 @@
+//! Test that the symbol mangling of Foo-the-constructor-function versus Foo-the-type do not collide
+
 //@ run-pass
 
 fn size_of_val<T>(_: &T) -> usize {
@@ -6,8 +8,6 @@ fn size_of_val<T>(_: &T) -> usize {
 
 struct Foo(#[allow(dead_code)] i64);
 
-// Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
-// `typeof Foo` (the function type of the `struct` constructor) don't collide.
 fn main() {
     size_of_val(&Foo(0));
     size_of_val(&Foo);