about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-07-18 14:49:18 +0200
committerGitHub <noreply@github.com>2025-07-18 14:49:18 +0200
commit0820cf8c6e179277cd161da2fc3ad22b807d9742 (patch)
treeb13313575d445e26abb028df4fc8b1f81b31464e
parent3acbb4d42133fb1604da1e9ed9728da97ffd4465 (diff)
parentc0597fbd80acdc23434ed8f59c41f0728a2d9ba6 (diff)
downloadrust-0820cf8c6e179277cd161da2fc3ad22b807d9742.tar.gz
rust-0820cf8c6e179277cd161da2fc3ad22b807d9742.zip
Rollup merge of #143908 - Kivooeo:tf0, r=jieyouxu
`tests/ui`: A New Order [0/28]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

These are the some last tests that didn’t make it into the main twenty-eightology of PRs. Part of rust-lang/rust#133895.

r? ```@jieyouxu```
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr (renamed from tests/ui/deduplicate-diagnostics.deduplicate.stderr)4
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr (renamed from tests/ui/deduplicate-diagnostics.duplicate.stderr)10
-rw-r--r--tests/ui/diagnostic-flags/deduplicate-diagnostics.rs (renamed from tests/ui/deduplicate-diagnostics.rs)2
-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.rs (renamed from tests/ui/log-poly.rs)4
-rw-r--r--tests/ui/linking/ld64-cross-compilation.rs (renamed from tests/ui/darwin-ld64.rs)8
-rw-r--r--tests/ui/shadowed/shadowing-generic-item.rs (renamed from tests/ui/lexical-scopes.rs)2
-rw-r--r--tests/ui/shadowed/shadowing-generic-item.stderr (renamed from tests/ui/lexical-scopes.stderr)4
-rw-r--r--tests/ui/symbol-names/struct-constructor-mangling.rs (renamed from tests/ui/struct-ctor-mangling.rs)4
9 files changed, 22 insertions, 16 deletions
diff --git a/tests/ui/deduplicate-diagnostics.deduplicate.stderr b/tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr
index 5df2c687bdd..c0d568eb538 100644
--- a/tests/ui/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/deduplicate-diagnostics.duplicate.stderr b/tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr
index 48e2ba7b86a..74d7066293f 100644
--- a/tests/ui/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/deduplicate-diagnostics.rs b/tests/ui/diagnostic-flags/deduplicate-diagnostics.rs
index 299c1f5f461..48705266e35 100644
--- a/tests/ui/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/log-poly.rs b/tests/ui/fmt/println-debug-different-types.rs
index 64994a55817..9e21be1f03f 100644
--- a/tests/ui/log-poly.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/darwin-ld64.rs b/tests/ui/linking/ld64-cross-compilation.rs
index 75acc07a002..d6c6d1ff91d 100644
--- a/tests/ui/darwin-ld64.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/lexical-scopes.rs b/tests/ui/shadowed/shadowing-generic-item.rs
index 46cfdf1efa8..c3a0ced04e7 100644
--- a/tests/ui/lexical-scopes.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/lexical-scopes.stderr b/tests/ui/shadowed/shadowing-generic-item.stderr
index f0eaa1a5c64..55a0bb36ea8 100644
--- a/tests/ui/lexical-scopes.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/struct-ctor-mangling.rs b/tests/ui/symbol-names/struct-constructor-mangling.rs
index f32cbb7aaae..ec8791e2154 100644
--- a/tests/ui/struct-ctor-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);