about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-25 18:51:15 +0000
committerbors <bors@rust-lang.org>2025-04-25 18:51:15 +0000
commitb4c8b0c3f0533bb342a4873ff59bdad3883ab8e3 (patch)
treeeef1aa90a79b32d1ea165af6b54170a3ca6c0468 /tests
parente3e432d4d65a55e6db167598e96db2bcb163e316 (diff)
parent99dc43b7178445e3e7eacd10630dfbfadefab560 (diff)
downloadrust-b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3.tar.gz
rust-b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3.zip
Auto merge of #140298 - matthiaskrgr:rollup-5tc1gvb, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #137683 (Add a tidy check for GCC submodule version)
 - #138968 (Update the index of Result to make the summary more comprehensive)
 - #139572 (docs(std): mention const blocks in const keyword doc page)
 - #140152 (Unify the format of rustc cli flags)
 - #140193 (fix ICE in `#[naked]` attribute validation)
 - #140205 (Tidying up UI tests [2/N])
 - #140284 (remove expect() in `unnecessary_transmutes`)
 - #140290 (rustdoc: fix typo change from equivelent to equivalent)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/rustc-help/help-v.diff23
-rw-r--r--tests/run-make/rustc-help/help-v.stdout75
-rw-r--r--tests/run-make/rustc-help/help.stdout54
-rw-r--r--tests/run-make/rustdoc-default-output/output-default.stdout2
-rw-r--r--tests/ui/asm/naked-invalid-attr.rs9
-rw-r--r--tests/ui/asm/naked-invalid-attr.stderr19
-rw-r--r--tests/ui/compiletest-self-test/compile-flags-last.stderr2
-rw-r--r--tests/ui/copy-a-resource.rs21
-rw-r--r--tests/ui/invalid-compile-flags/emit-output-types-without-args.stderr3
-rw-r--r--tests/ui/invalid-compile-flags/print-without-arg.stderr5
-rw-r--r--tests/ui/macros/no-matching-rule.rs (renamed from tests/ui/fail-simple.rs)0
-rw-r--r--tests/ui/macros/no-matching-rule.stderr (renamed from tests/ui/fail-simple.stderr)2
-rw-r--r--tests/ui/methods/clone-missing.rs19
-rw-r--r--tests/ui/methods/clone-missing.stderr (renamed from tests/ui/copy-a-resource.stderr)2
-rw-r--r--tests/ui/modules/mod-pub-access.rs11
-rw-r--r--tests/ui/path.rs7
-rw-r--r--tests/ui/resolve/fn-item-cant-capture-dynamic-env.rs (renamed from tests/ui/capture1.rs)0
-rw-r--r--tests/ui/resolve/fn-item-cant-capture-dynamic-env.stderr (renamed from tests/ui/capture1.stderr)2
-rw-r--r--tests/ui/transmute/auxiliary/unnecessary-transmute-path-remap-ice-140277-trans.rs10
-rw-r--r--tests/ui/transmute/unnecessary-transmute-path-remap-ice-140277.rs10
-rw-r--r--tests/ui/type-alias/type-param.rs11
-rw-r--r--tests/ui/type-param.rs10
22 files changed, 177 insertions, 120 deletions
diff --git a/tests/run-make/rustc-help/help-v.diff b/tests/run-make/rustc-help/help-v.diff
index 0ea79f3e557..60a9dfbe201 100644
--- a/tests/run-make/rustc-help/help-v.diff
+++ b/tests/run-make/rustc-help/help-v.diff
@@ -1,22 +1,23 @@
-@@ -63,10 +63,27 @@
+@@ -65,10 +65,28 @@
                          Set a codegen option
      -V, --version       Print version info and exit
      -v, --verbose       Use verbose output
-+        --extern NAME[=PATH]
++        --extern <NAME>[=<PATH>]
 +                        Specify where an external rust library is located
-+        --sysroot PATH  Override the system root
-+        --error-format human|json|short
++        --sysroot <PATH>
++                        Override the system root
++        --error-format <human|json|short>
 +                        How errors and other messages are produced
-+        --json CONFIG   Configure the JSON output of the compiler
-+        --color auto|always|never
++        --json <CONFIG> Configure the JSON output of the compiler
++        --color <auto|always|never>
 +                        Configure coloring of output:
-+                        auto = colorize, if output goes to a tty (default);
-+                        always = always colorize output;
-+                        never = never colorize output
-+        --diagnostic-width WIDTH
++                        * auto = colorize, if output goes to a tty (default);
++                        * always = always colorize output;
++                        * never = never colorize output
++        --diagnostic-width <WIDTH>
 +                        Inform rustc of the width of the output so that
 +                        diagnostics can be truncated to fit
-+        --remap-path-prefix FROM=TO
++        --remap-path-prefix <FROM>=<TO>
 +                        Remap source names in all output (compiler messages
 +                        and output files)
 +    @path               Read newline separated options from `path`
diff --git a/tests/run-make/rustc-help/help-v.stdout b/tests/run-make/rustc-help/help-v.stdout
index 744453d6e85..3fc297fb08e 100644
--- a/tests/run-make/rustc-help/help-v.stdout
+++ b/tests/run-make/rustc-help/help-v.stdout
@@ -2,31 +2,32 @@ Usage: rustc [OPTIONS] INPUT
 
 Options:
     -h, --help          Display this message
-        --cfg SPEC      Configure the compilation environment.
-                        SPEC supports the syntax `NAME[="VALUE"]`.
-        --check-cfg SPEC
+        --cfg <SPEC>    Configure the compilation environment.
+                        SPEC supports the syntax `<NAME>[="<VALUE>"]`.
+        --check-cfg <SPEC>
                         Provide list of expected cfgs for checking
-    -L [KIND=]PATH      Add a directory to the library search path. The
-                        optional KIND can be one of dependency, crate, native,
-                        framework, or all (the default).
-    -l [KIND[:MODIFIERS]=]NAME[:RENAME]
+    -L [<KIND>=]<PATH>  Add a directory to the library search path. The
+                        optional KIND can be one of
+                        <dependency|crate|native|framework|all> (default:
+                        all).
+    -l [<KIND>[:<MODIFIERS>]=]<NAME>[:<RENAME>]
                         Link the generated crate(s) to the specified native
                         library NAME. The optional KIND can be one of
-                        static, framework, or dylib (the default).
+                        <static|framework|dylib> (default: dylib).
                         Optional comma separated MODIFIERS
-                        (bundle|verbatim|whole-archive|as-needed)
+                        <bundle|verbatim|whole-archive|as-needed>
                         may be specified each with a prefix of either '+' to
                         enable or '-' to disable.
-        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
+        --crate-type <bin|lib|rlib|dylib|cdylib|staticlib|proc-macro>
                         Comma separated list of types of crates
                         for the compiler to emit
-        --crate-name NAME
+        --crate-name <NAME>
                         Specify the name of the crate being built
-        --edition 2015|2018|2021|2024
+        --edition <2015|2018|2021|2024|future>
                         Specify which edition of the compiler to use when
                         compiling code. The default is 2015 and the latest
                         stable edition is 2024.
-        --emit TYPE[=FILE]
+        --emit <TYPE>[=<FILE>]
                         Comma separated list of types of output for the
                         compiler to emit.
                         Each TYPE has the default FILE name:
@@ -39,45 +40,47 @@ Options:
                         * mir - CRATE_NAME.mir
                         * obj - CRATE_NAME.o
                         * thin-link-bitcode - CRATE_NAME.indexing.o
-        --print INFO[=FILE]
+        --print <INFO>[=<FILE>]
                         Compiler information to print on stdout (or to a file)
                         INFO may be one of
-                        (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
+                        <all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models>.
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
-    -o FILENAME         Write output to <filename>
-        --out-dir DIR   Write output to compiler-chosen filename in <dir>
-        --explain OPT   Provide a detailed explanation of an error message
+    -o <FILENAME>       Write output to FILENAME
+        --out-dir <DIR> Write output to compiler-chosen filename in DIR
+        --explain <OPT> Provide a detailed explanation of an error message
         --test          Build a test harness
-        --target TARGET Target triple for which the code is compiled
-    -A, --allow LINT    Set lint allowed
-    -W, --warn LINT     Set lint warnings
-        --force-warn LINT
+        --target <TARGET>
+                        Target triple for which the code is compiled
+    -A, --allow <LINT>  Set lint allowed
+    -W, --warn <LINT>   Set lint warnings
+        --force-warn <LINT>
                         Set lint force-warn
-    -D, --deny LINT     Set lint denied
-    -F, --forbid LINT   Set lint forbidden
-        --cap-lints LEVEL
+    -D, --deny <LINT>   Set lint denied
+    -F, --forbid <LINT> Set lint forbidden
+        --cap-lints <LEVEL>
                         Set the most restrictive lint level. More restrictive
                         lints are capped at this level
-    -C, --codegen OPT[=VALUE]
+    -C, --codegen <OPT>[=<VALUE>]
                         Set a codegen option
     -V, --version       Print version info and exit
     -v, --verbose       Use verbose output
-        --extern NAME[=PATH]
+        --extern <NAME>[=<PATH>]
                         Specify where an external rust library is located
-        --sysroot PATH  Override the system root
-        --error-format human|json|short
+        --sysroot <PATH>
+                        Override the system root
+        --error-format <human|json|short>
                         How errors and other messages are produced
-        --json CONFIG   Configure the JSON output of the compiler
-        --color auto|always|never
+        --json <CONFIG> Configure the JSON output of the compiler
+        --color <auto|always|never>
                         Configure coloring of output:
-                        auto = colorize, if output goes to a tty (default);
-                        always = always colorize output;
-                        never = never colorize output
-        --diagnostic-width WIDTH
+                        * auto = colorize, if output goes to a tty (default);
+                        * always = always colorize output;
+                        * never = never colorize output
+        --diagnostic-width <WIDTH>
                         Inform rustc of the width of the output so that
                         diagnostics can be truncated to fit
-        --remap-path-prefix FROM=TO
+        --remap-path-prefix <FROM>=<TO>
                         Remap source names in all output (compiler messages
                         and output files)
     @path               Read newline separated options from `path`
diff --git a/tests/run-make/rustc-help/help.stdout b/tests/run-make/rustc-help/help.stdout
index 3043755207a..caffe28f498 100644
--- a/tests/run-make/rustc-help/help.stdout
+++ b/tests/run-make/rustc-help/help.stdout
@@ -2,31 +2,32 @@ Usage: rustc [OPTIONS] INPUT
 
 Options:
     -h, --help          Display this message
-        --cfg SPEC      Configure the compilation environment.
-                        SPEC supports the syntax `NAME[="VALUE"]`.
-        --check-cfg SPEC
+        --cfg <SPEC>    Configure the compilation environment.
+                        SPEC supports the syntax `<NAME>[="<VALUE>"]`.
+        --check-cfg <SPEC>
                         Provide list of expected cfgs for checking
-    -L [KIND=]PATH      Add a directory to the library search path. The
-                        optional KIND can be one of dependency, crate, native,
-                        framework, or all (the default).
-    -l [KIND[:MODIFIERS]=]NAME[:RENAME]
+    -L [<KIND>=]<PATH>  Add a directory to the library search path. The
+                        optional KIND can be one of
+                        <dependency|crate|native|framework|all> (default:
+                        all).
+    -l [<KIND>[:<MODIFIERS>]=]<NAME>[:<RENAME>]
                         Link the generated crate(s) to the specified native
                         library NAME. The optional KIND can be one of
-                        static, framework, or dylib (the default).
+                        <static|framework|dylib> (default: dylib).
                         Optional comma separated MODIFIERS
-                        (bundle|verbatim|whole-archive|as-needed)
+                        <bundle|verbatim|whole-archive|as-needed>
                         may be specified each with a prefix of either '+' to
                         enable or '-' to disable.
-        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
+        --crate-type <bin|lib|rlib|dylib|cdylib|staticlib|proc-macro>
                         Comma separated list of types of crates
                         for the compiler to emit
-        --crate-name NAME
+        --crate-name <NAME>
                         Specify the name of the crate being built
-        --edition 2015|2018|2021|2024
+        --edition <2015|2018|2021|2024|future>
                         Specify which edition of the compiler to use when
                         compiling code. The default is 2015 and the latest
                         stable edition is 2024.
-        --emit TYPE[=FILE]
+        --emit <TYPE>[=<FILE>]
                         Comma separated list of types of output for the
                         compiler to emit.
                         Each TYPE has the default FILE name:
@@ -39,27 +40,28 @@ Options:
                         * mir - CRATE_NAME.mir
                         * obj - CRATE_NAME.o
                         * thin-link-bitcode - CRATE_NAME.indexing.o
-        --print INFO[=FILE]
+        --print <INFO>[=<FILE>]
                         Compiler information to print on stdout (or to a file)
                         INFO may be one of
-                        (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
+                        <all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models>.
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
-    -o FILENAME         Write output to <filename>
-        --out-dir DIR   Write output to compiler-chosen filename in <dir>
-        --explain OPT   Provide a detailed explanation of an error message
+    -o <FILENAME>       Write output to FILENAME
+        --out-dir <DIR> Write output to compiler-chosen filename in DIR
+        --explain <OPT> Provide a detailed explanation of an error message
         --test          Build a test harness
-        --target TARGET Target triple for which the code is compiled
-    -A, --allow LINT    Set lint allowed
-    -W, --warn LINT     Set lint warnings
-        --force-warn LINT
+        --target <TARGET>
+                        Target triple for which the code is compiled
+    -A, --allow <LINT>  Set lint allowed
+    -W, --warn <LINT>   Set lint warnings
+        --force-warn <LINT>
                         Set lint force-warn
-    -D, --deny LINT     Set lint denied
-    -F, --forbid LINT   Set lint forbidden
-        --cap-lints LEVEL
+    -D, --deny <LINT>   Set lint denied
+    -F, --forbid <LINT> Set lint forbidden
+        --cap-lints <LEVEL>
                         Set the most restrictive lint level. More restrictive
                         lints are capped at this level
-    -C, --codegen OPT[=VALUE]
+    -C, --codegen <OPT>[=<VALUE>]
                         Set a codegen option
     -V, --version       Print version info and exit
     -v, --verbose       Use verbose output
diff --git a/tests/run-make/rustdoc-default-output/output-default.stdout b/tests/run-make/rustdoc-default-output/output-default.stdout
index 563f8ec50cd..78ca8c863eb 100644
--- a/tests/run-make/rustdoc-default-output/output-default.stdout
+++ b/tests/run-make/rustdoc-default-output/output-default.stdout
@@ -11,7 +11,7 @@ Options:
     -o, --out-dir PATH  which directory to place the output
         --crate-name NAME
                         specify the name of this crate
-        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
+        --crate-type <bin|lib|rlib|dylib|cdylib|staticlib|proc-macro>
                         Comma separated list of types of crates
                         for the compiler to emit
     -L, --library-path DIR
diff --git a/tests/ui/asm/naked-invalid-attr.rs b/tests/ui/asm/naked-invalid-attr.rs
index c3a3131ee46..6ac9cb9e3a9 100644
--- a/tests/ui/asm/naked-invalid-attr.rs
+++ b/tests/ui/asm/naked-invalid-attr.rs
@@ -51,3 +51,12 @@ fn main() {
     #[unsafe(naked)] //~ ERROR should be applied to a function definition
     || {};
 }
+
+// Check that the path of an attribute without a name is printed correctly (issue #140082)
+#[::a]
+//~^ ERROR attribute incompatible with `#[unsafe(naked)]`
+//~| ERROR failed to resolve: use of unresolved module or unlinked crate `a`
+#[unsafe(naked)]
+extern "C" fn issue_140082() {
+    naked_asm!("")
+}
diff --git a/tests/ui/asm/naked-invalid-attr.stderr b/tests/ui/asm/naked-invalid-attr.stderr
index 81d30e6475d..ef389e7d921 100644
--- a/tests/ui/asm/naked-invalid-attr.stderr
+++ b/tests/ui/asm/naked-invalid-attr.stderr
@@ -1,3 +1,9 @@
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
+  --> $DIR/naked-invalid-attr.rs:56:5
+   |
+LL | #[::a]
+   |     ^ use of unresolved module or unlinked crate `a`
+
 error: attribute should be applied to a function definition
   --> $DIR/naked-invalid-attr.rs:13:1
    |
@@ -27,6 +33,15 @@ LL |     #[unsafe(naked)]
 LL |     || {};
    |     ----- not a function definition
 
+error[E0736]: attribute incompatible with `#[unsafe(naked)]`
+  --> $DIR/naked-invalid-attr.rs:56:1
+   |
+LL | #[::a]
+   | ^^^^^^ the `{{root}}::a` attribute is incompatible with `#[unsafe(naked)]`
+...
+LL | #[unsafe(naked)]
+   | ---------------- function marked with `#[unsafe(naked)]` here
+
 error: attribute should be applied to a function definition
   --> $DIR/naked-invalid-attr.rs:22:5
    |
@@ -49,5 +64,7 @@ error: attribute should be applied to a function definition
 LL | #![unsafe(naked)]
    | ^^^^^^^^^^^^^^^^^ cannot be applied to crates
 
-error: aborting due to 6 previous errors
+error: aborting due to 8 previous errors
 
+Some errors have detailed explanations: E0433, E0736.
+For more information about an error, try `rustc --explain E0433`.
diff --git a/tests/ui/compiletest-self-test/compile-flags-last.stderr b/tests/ui/compiletest-self-test/compile-flags-last.stderr
index 72d92206e2b..5a48361cfc0 100644
--- a/tests/ui/compiletest-self-test/compile-flags-last.stderr
+++ b/tests/ui/compiletest-self-test/compile-flags-last.stderr
@@ -1,5 +1,5 @@
 error: Argument to option 'cap-lints' missing
        Usage:
-           --cap-lints LEVEL   Set the most restrictive lint level. More restrictive
+           --cap-lints <LEVEL> Set the most restrictive lint level. More restrictive
                                lints are capped at this level
 
diff --git a/tests/ui/copy-a-resource.rs b/tests/ui/copy-a-resource.rs
deleted file mode 100644
index 55f2dd4ee6d..00000000000
--- a/tests/ui/copy-a-resource.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#[derive(Debug)]
-struct Foo {
-  i: isize,
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {}
-}
-
-fn foo(i:isize) -> Foo {
-    Foo {
-        i: i
-    }
-}
-
-fn main() {
-    let x = foo(10);
-    let _y = x.clone();
-    //~^ ERROR no method named `clone` found
-    println!("{:?}", x);
-}
diff --git a/tests/ui/invalid-compile-flags/emit-output-types-without-args.stderr b/tests/ui/invalid-compile-flags/emit-output-types-without-args.stderr
index 669913b5765..9e4486a272f 100644
--- a/tests/ui/invalid-compile-flags/emit-output-types-without-args.stderr
+++ b/tests/ui/invalid-compile-flags/emit-output-types-without-args.stderr
@@ -1,6 +1,7 @@
 error: Argument to option 'emit' missing
        Usage:
-           --emit TYPE[=FILE]  Comma separated list of types of output for the
+           --emit <TYPE>[=<FILE>]
+                               Comma separated list of types of output for the
                                compiler to emit.
                                Each TYPE has the default FILE name:
                                * asm - CRATE_NAME.s
diff --git a/tests/ui/invalid-compile-flags/print-without-arg.stderr b/tests/ui/invalid-compile-flags/print-without-arg.stderr
index fd2a36e761b..3048a59d0d0 100644
--- a/tests/ui/invalid-compile-flags/print-without-arg.stderr
+++ b/tests/ui/invalid-compile-flags/print-without-arg.stderr
@@ -1,6 +1,7 @@
 error: Argument to option 'print' missing
        Usage:
-           --print INFO[=FILE] Compiler information to print on stdout (or to a file)
+           --print <INFO>[=<FILE>]
+                               Compiler information to print on stdout (or to a file)
                                INFO may be one of
-                               (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
+                               <all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models>.
 
diff --git a/tests/ui/fail-simple.rs b/tests/ui/macros/no-matching-rule.rs
index 55e547ee72b..55e547ee72b 100644
--- a/tests/ui/fail-simple.rs
+++ b/tests/ui/macros/no-matching-rule.rs
diff --git a/tests/ui/fail-simple.stderr b/tests/ui/macros/no-matching-rule.stderr
index 50c350b3ef5..a6312a843f3 100644
--- a/tests/ui/fail-simple.stderr
+++ b/tests/ui/macros/no-matching-rule.stderr
@@ -1,5 +1,5 @@
 error: no rules expected `@`
-  --> $DIR/fail-simple.rs:2:12
+  --> $DIR/no-matching-rule.rs:2:12
    |
 LL |     panic!(@);
    |            ^ no rules expected this token in macro call
diff --git a/tests/ui/methods/clone-missing.rs b/tests/ui/methods/clone-missing.rs
new file mode 100644
index 00000000000..f2e4ad268c6
--- /dev/null
+++ b/tests/ui/methods/clone-missing.rs
@@ -0,0 +1,19 @@
+// This test checks that calling `.clone()` on a type that does not implement the `Clone` trait
+// results in a compilation error. The `Foo` struct does not derive or implement `Clone`,
+// so attempting to clone it should fail.
+
+struct Foo {
+  i: isize,
+}
+
+fn foo(i:isize) -> Foo {
+    Foo {
+        i: i
+    }
+}
+
+fn main() {
+    let x = foo(10);
+    let _y = x.clone();
+    //~^ ERROR no method named `clone` found
+}
diff --git a/tests/ui/copy-a-resource.stderr b/tests/ui/methods/clone-missing.stderr
index ff1e28bf961..4ab1aae4934 100644
--- a/tests/ui/copy-a-resource.stderr
+++ b/tests/ui/methods/clone-missing.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `clone` found for struct `Foo` in the current scope
-  --> $DIR/copy-a-resource.rs:18:16
+  --> $DIR/clone-missing.rs:17:16
    |
 LL | struct Foo {
    | ---------- method `clone` not found for this struct
diff --git a/tests/ui/modules/mod-pub-access.rs b/tests/ui/modules/mod-pub-access.rs
new file mode 100644
index 00000000000..c07e7a2ff30
--- /dev/null
+++ b/tests/ui/modules/mod-pub-access.rs
@@ -0,0 +1,11 @@
+//@ run-pass
+// This is a name resolution smoke test that ensures paths with more than one
+// segment (e.g., `foo::bar`) resolve correctly.
+// It also serves as a basic visibility test — confirming that a `pub` item
+// inside a private module can still be accessed from outside that module.
+
+mod foo {
+    pub fn bar(_offset: usize) {}
+}
+
+fn main() { foo::bar(0); }
diff --git a/tests/ui/path.rs b/tests/ui/path.rs
deleted file mode 100644
index bd7b99ac01a..00000000000
--- a/tests/ui/path.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-//@ run-pass
-
-mod foo {
-    pub fn bar(_offset: usize) { }
-}
-
-pub fn main() { foo::bar(0); }
diff --git a/tests/ui/capture1.rs b/tests/ui/resolve/fn-item-cant-capture-dynamic-env.rs
index 4f8c04e3fa9..4f8c04e3fa9 100644
--- a/tests/ui/capture1.rs
+++ b/tests/ui/resolve/fn-item-cant-capture-dynamic-env.rs
diff --git a/tests/ui/capture1.stderr b/tests/ui/resolve/fn-item-cant-capture-dynamic-env.stderr
index 8027430de52..6b3e8792011 100644
--- a/tests/ui/capture1.stderr
+++ b/tests/ui/resolve/fn-item-cant-capture-dynamic-env.stderr
@@ -1,5 +1,5 @@
 error[E0434]: can't capture dynamic environment in a fn item
-  --> $DIR/capture1.rs:3:32
+  --> $DIR/fn-item-cant-capture-dynamic-env.rs:3:32
    |
 LL |     fn foo() -> isize { return bar; }
    |                                ^^^
diff --git a/tests/ui/transmute/auxiliary/unnecessary-transmute-path-remap-ice-140277-trans.rs b/tests/ui/transmute/auxiliary/unnecessary-transmute-path-remap-ice-140277-trans.rs
new file mode 100644
index 00000000000..0f273a6f536
--- /dev/null
+++ b/tests/ui/transmute/auxiliary/unnecessary-transmute-path-remap-ice-140277-trans.rs
@@ -0,0 +1,10 @@
+//@ compile-flags: --remap-path-prefix=/=/non-existent
+// helper for ../unnecessary-transmute-path-remap-ice-140277.rs
+
+#[macro_export]
+macro_rules! transmute {
+    ($e:expr) => {{
+        let e = $e;
+        std::mem::transmute(e)
+    }};
+}
diff --git a/tests/ui/transmute/unnecessary-transmute-path-remap-ice-140277.rs b/tests/ui/transmute/unnecessary-transmute-path-remap-ice-140277.rs
new file mode 100644
index 00000000000..756ce7b3d50
--- /dev/null
+++ b/tests/ui/transmute/unnecessary-transmute-path-remap-ice-140277.rs
@@ -0,0 +1,10 @@
+//@ aux-crate: zerocopy=unnecessary-transmute-path-remap-ice-140277-trans.rs
+//@ check-pass
+// tests for a regression in linting for unnecessary transmutes
+// where a span was inacessible for snippet procuring,
+// when remap-path-prefix was set, causing a panic.
+
+fn bytes_at_home(x: [u8; 4]) -> u32 {
+    unsafe { zerocopy::transmute!(x) }
+}
+fn main() {}
diff --git a/tests/ui/type-alias/type-param.rs b/tests/ui/type-alias/type-param.rs
new file mode 100644
index 00000000000..f8e73518bad
--- /dev/null
+++ b/tests/ui/type-alias/type-param.rs
@@ -0,0 +1,11 @@
+//@ run-pass
+// This is a smoke test to ensure that type aliases with type parameters
+// are accepted by the compiler and that the parameters are correctly
+// resolved in the aliased item type.
+
+#![allow(dead_code)]
+
+type Foo<T> = extern "C" fn(T) -> bool;
+type Bar<T> = fn(T) -> bool;
+
+fn main() {}
diff --git a/tests/ui/type-param.rs b/tests/ui/type-param.rs
deleted file mode 100644
index e7cf0e5446b..00000000000
--- a/tests/ui/type-param.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-pass
-
-#![allow(non_camel_case_types)]
-#![allow(dead_code)]
-
-
-
-type lteq<T> = extern "C" fn(T) -> bool;
-
-pub fn main() { }