From 10f9f14377a2fdf65a1f07497c48ce264816a04a Mon Sep 17 00:00:00 2001 From: Dnreikronos Date: Mon, 1 Jun 2026 13:47:30 -0300 Subject: [PATCH 1/9] Build a fully-applied trait ref in method-not-found suggestion When a method call fails to resolve, the suggestion machinery probes all traits for a method with the same name and builds a trait reference for the providing trait to detect duplicate trait items coming from multiple crate versions. It passed only the receiver type as the single argument, which is correct only for traits whose sole generic parameter is `Self`. For a trait with further parameters (for example `Borrow`), or when the receiver type is unknown, the argument list no longer matched the trait's generics and tripped the `debug_assert_args_compatible` assertion, producing an ICE. Build the argument list with `GenericArgs::for_item` instead, using the receiver type for `Self` when known and fresh inference variables for the remaining parameters. --- .../rustc_hir_typeck/src/method/suggest.rs | 19 +++++- ...estion-trait-with-extra-generics-no-ice.rs | 24 +++++++ ...on-trait-with-extra-generics-no-ice.stderr | 65 +++++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.rs create mode 100644 tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.stderr diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index c9ec32159f476..48e1f553900b0 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -4796,7 +4796,24 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let hir::Node::Expr(rcvr) = self.tcx.hir_node(hir_id) else { return false; }; - let trait_ref = ty::TraitRef::new(self.tcx, trait_def_id, rcvr_ty.into_iter()); + // The trait may have generic parameters beyond `Self` (e.g. `Borrow`), and + // `rcvr_ty` may even be unknown. We only ever know the receiver type (the `Self` arg), + // so fill `Self` from `rcvr_ty` when available and the remaining parameters with fresh + // inference variables; building a `TraitRef` with a partial arg list would otherwise trip + // `debug_assert_args_compatible` and ICE. See #157189. + let trait_ref = ty::TraitRef::new_from_args( + self.tcx, + trait_def_id, + ty::GenericArgs::for_item(self.tcx, trait_def_id, |param, _| { + if param.index == 0 + && let Some(rcvr_ty) = rcvr_ty + { + rcvr_ty.into() + } else { + self.var_for_def(rcvr.span, param) + } + }), + ); let trait_pred = ty::Binder::dummy(ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Positive, diff --git a/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.rs b/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.rs new file mode 100644 index 0000000000000..0a98cdef5c923 --- /dev/null +++ b/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.rs @@ -0,0 +1,24 @@ +//! Regression test for #157189. +//! +//! When a method call fails to resolve, the "trait which provides `` is +//! implemented but not in scope" diagnostic probes all traits for a method of the +//! same name. Here `.borrow()` matches `std::borrow::Borrow::borrow`, and `Borrow` +//! has a generic parameter (`Borrowed`) besides `Self`. Building the trait +//! reference for the diagnostic used to pass only the receiver type as the single +//! argument, which mismatched the trait's generics and ICEd in +//! `debug_assert_args_compatible`. It should just report the error. + +trait Foo { + extern "C" fn borrow(&self); +} + +struct Bar; + +fn main() { + let foo: Box usize> = Box::new(Bar); + //~^ ERROR expected a `Fn(bool)` closure, found `Bar` + foo.borrow(); + //~^ ERROR no method named `borrow` found + foo.take() + //~^ ERROR `Box usize>` is not an iterator +} diff --git a/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.stderr b/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.stderr new file mode 100644 index 0000000000000..aa46a41fa3378 --- /dev/null +++ b/tests/ui/methods/method-suggestion-trait-with-extra-generics-no-ice.stderr @@ -0,0 +1,65 @@ +error[E0599]: no method named `borrow` found for struct `Box usize>` in the current scope + --> $DIR/method-suggestion-trait-with-extra-generics-no-ice.rs:20:9 + | +LL | foo.borrow(); + | ^^^^^^ + | + --> $SRC_DIR/core/src/borrow.rs:LL:COL + | + = note: the method is available for `Box usize>` here + | + = help: items from traits can only be used if the trait is in scope +help: use parentheses to call this trait object + | +LL | foo(/* bool */).borrow(); + | ++++++++++++ +help: trait `Borrow` which provides `borrow` is implemented but not in scope; perhaps you want to import it + | +LL + use std::borrow::Borrow; + | +help: there is a method `borrow_mut` with a similar name + | +LL | foo.borrow_mut(); + | ++++ + +error[E0277]: expected a `Fn(bool)` closure, found `Bar` + --> $DIR/method-suggestion-trait-with-extra-generics-no-ice.rs:18:43 + | +LL | let foo: Box usize> = Box::new(Bar); + | ^^^^^^^^^^^^^ expected an `Fn(bool)` closure, found `Bar` + | +help: the trait `Fn(bool)` is not implemented for `Bar` + --> $DIR/method-suggestion-trait-with-extra-generics-no-ice.rs:15:1 + | +LL | struct Bar; + | ^^^^^^^^^^ + = note: required for the cast from `Box` to `Box usize>` + +error[E0599]: `Box usize>` is not an iterator + --> $DIR/method-suggestion-trait-with-extra-generics-no-ice.rs:22:9 + | +LL | foo.take() + | ^^^^ + | | + | this is an associated function, not a method + | `Box usize>` is not an iterator + | + = note: found the following associated functions; to be used as methods, functions must have a `self` parameter + = note: the candidate is defined in an impl for the type `Box` + = note: the following trait bounds were not satisfied: + `dyn Fn(bool) -> usize: Iterator` + which is required by `Box usize>: Iterator` + `Box usize>: Iterator` + which is required by `&mut Box usize>: Iterator` + `dyn Fn(bool) -> usize: Iterator` + which is required by `&mut dyn Fn(bool) -> usize: Iterator` +help: use associated function syntax instead + | +LL - foo.take() +LL + Box:: usize>::take(foo) + | + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0277, E0599. +For more information about an error, try `rustc --explain E0277`. From ab9a4cf5b303951cf410f4a3f4e7edcda23591ff Mon Sep 17 00:00:00 2001 From: Walnut <39544927+Walnut356@users.noreply.github.com> Date: Tue, 2 Jun 2026 02:41:15 -0500 Subject: [PATCH 2/9] add infallible primitive type lookups to template arg resolver --- src/etc/lldb_providers.py | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 81841dcc4cbb1..aefb7652917f7 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -1,6 +1,6 @@ from __future__ import annotations import sys -from typing import Generator, List, TYPE_CHECKING, Optional +from typing import Generator, Dict, List, TYPE_CHECKING, Optional from enum import Flag, auto from lldb import ( @@ -9,6 +9,16 @@ eBasicTypeLong, eBasicTypeUnsignedLong, eBasicTypeUnsignedChar, + eBasicTypeUnsignedShort, + eBasicTypeUnsignedLongLong, + eBasicTypeSignedChar, + eBasicTypeShort, + eBasicTypeLongLong, + eBasicTypeFloat, + eBasicTypeDouble, + eBasicTypeFloat128, + eBasicTypeHalf, + eBasicTypeChar32, eFormatChar, eTypeIsInteger, ) @@ -198,6 +208,22 @@ def get_template_args(type_name: str) -> Generator[str, None, None]: MSVC_PTR_PREFIX: List[str] = ["ref$<", "ref_mut$<", "ptr_const$<", "ptr_mut$<"] +PRIMITIVE_TYPES: Dict[str, int] = { + "u8": eBasicTypeUnsignedChar, + "u16": eBasicTypeUnsignedShort, + "u32": eBasicTypeUnsignedLong, + "u64": eBasicTypeUnsignedLongLong, + "i8": eBasicTypeSignedChar, + "i16": eBasicTypeShort, + "i32": eBasicTypeLong, + "i64": eBasicTypeLongLong, + "f16": eBasicTypeHalf, + "f32": eBasicTypeFloat, + "f64": eBasicTypeDouble, + "f128": eBasicTypeFloat128, + "char": eBasicTypeChar32, +} + def resolve_msvc_template_arg(arg_name: str, target: SBTarget) -> SBType: """ @@ -214,6 +240,17 @@ def resolve_msvc_template_arg(arg_name: str, target: SBTarget) -> SBType: current version of LLDB, so instead the types are generated via `base_type.GetPointerType()` and `base_type.GetArrayType()`, which bypass the PDB file and ask clang directly for the type node. """ + + # As of LLDB 22, finding primitives based on `FindFirstType` with their rust name no longer + # works. Instead, we can look them up by their `eBasicType` equivalent. For usize and isize, + # we convert them to their bit-sized counterpart before the lookup + if arg_name == "isize" or arg_name == "usize": + equivalent = f"{arg_name[0]}{target.GetAddressByteSize() * 8}" + return target.GetBasicType(PRIMITIVE_TYPES[equivalent]) + + if (basic_type := PRIMITIVE_TYPES.get(arg_name)) is not None: + return target.GetBasicType(basic_type) + result = target.FindFirstType(arg_name) if result.IsValid(): From 4919940fad92a2a503e3fe7fc6a5594fb9771e72 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 3 Jun 2026 09:46:48 +0200 Subject: [PATCH 3/9] Revert "LLVM 23: Run AssignGUIDPass in some places" This reverts commit cdb73bb67707f78b321fe5579bcb9c128f45c352. --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 9 --------- tests/codegen-llvm/bpf-allows-unaligned.rs | 2 +- tests/codegen-llvm/branch-protection.rs | 2 +- tests/codegen-llvm/frame-pointer-cli-control.rs | 2 +- tests/codegen-llvm/frame-pointer.rs | 2 +- tests/codegen-llvm/gpu-convergent.rs | 2 +- tests/codegen-llvm/instrument-coverage/testprog.rs | 4 ++-- tests/codegen-llvm/link_section.rs | 2 +- ...pe-metadata-itanium-cxx-abi-normalized-generalized.rs | 6 +++--- .../some-non-zero-from-atomic-optimization.rs | 2 +- .../codegen-llvm/target-feature-negative-implication.rs | 2 +- tests/codegen-llvm/target-feature-overrides.rs | 4 ++-- tests/codegen-llvm/unwind-abis/aapcs-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/c-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/cdecl-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/fastcall-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/stdcall-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/system-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/sysv64-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/thiscall-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/vectorcall-unwind-abi.rs | 4 ++-- tests/codegen-llvm/unwind-abis/win64-unwind-abi.rs | 4 ++-- 22 files changed, 35 insertions(+), 44 deletions(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 8a6caa9b10854..b03a07538ccd8 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -49,9 +49,6 @@ #include "llvm/Transforms/Instrumentation/RealtimeSanitizer.h" #include "llvm/Transforms/Instrumentation/ThreadSanitizer.h" #include "llvm/Transforms/Scalar/AnnotationRemarks.h" -#if LLVM_VERSION_GE(23, 0) -#include "llvm/Transforms/Utils/AssignGUID.h" -#endif #include "llvm/Transforms/Utils/CanonicalizeAliases.h" #include "llvm/Transforms/Utils/FunctionImportUtils.h" #include "llvm/Transforms/Utils/NameAnonGlobals.h" @@ -918,9 +915,6 @@ extern "C" LLVMRustResult LLVMRustOptimize( if (NeedThinLTOBufferPasses) { MPM.addPass(CanonicalizeAliasesPass()); MPM.addPass(NameAnonGlobalPass()); -#if LLVM_VERSION_GE(23, 0) - MPM.addPass(AssignGUIDPass()); -#endif } // For `-Copt-level=0`, and the pre-link fat/thin LTO stages. if (ThinLTOBufferRef && *ThinLTOBufferRef == nullptr) { @@ -1460,9 +1454,6 @@ extern "C" LLVMRustBuffer *LLVMRustModuleSerialize(LLVMModuleRef M, PB.registerLoopAnalyses(LAM); PB.crossRegisterProxies(LAM, FAM, CGAM, MAM); ModulePassManager MPM; -#if LLVM_VERSION_GE(23, 0) - MPM.addPass(AssignGUIDPass()); -#endif MPM.addPass(ThinLTOBitcodeWriterPass(OS, nullptr)); MPM.run(*unwrap(M), MAM); } else { diff --git a/tests/codegen-llvm/bpf-allows-unaligned.rs b/tests/codegen-llvm/bpf-allows-unaligned.rs index 7e95a56d984c9..c7a70d5b2e502 100644 --- a/tests/codegen-llvm/bpf-allows-unaligned.rs +++ b/tests/codegen-llvm/bpf-allows-unaligned.rs @@ -5,7 +5,7 @@ #[no_mangle] #[target_feature(enable = "allows-misaligned-mem-access")] -// CHECK: define noundef zeroext i8 @foo(i8 noundef returned %arg) unnamed_addr #0 +// CHECK: define noundef zeroext i8 @foo(i8 noundef returned %arg) unnamed_addr #0 { pub unsafe fn foo(arg: u8) -> u8 { arg } diff --git a/tests/codegen-llvm/branch-protection.rs b/tests/codegen-llvm/branch-protection.rs index 11847c256d6ba..ed1cb2cd137ea 100644 --- a/tests/codegen-llvm/branch-protection.rs +++ b/tests/codegen-llvm/branch-protection.rs @@ -22,7 +22,7 @@ extern crate minicore; use minicore::*; // A basic test function. -// CHECK: @test(){{.*}} [[ATTR:#[0-9]+]] +// CHECK: @test(){{.*}} [[ATTR:#[0-9]+]] { #[no_mangle] pub fn test() {} diff --git a/tests/codegen-llvm/frame-pointer-cli-control.rs b/tests/codegen-llvm/frame-pointer-cli-control.rs index 79cdfc70f1ad7..911a5f03cbcda 100644 --- a/tests/codegen-llvm/frame-pointer-cli-control.rs +++ b/tests/codegen-llvm/frame-pointer-cli-control.rs @@ -45,7 +45,7 @@ Specific cases where platforms or tools rely on frame pointers for sound or corr extern crate minicore; -// CHECK: i32 @peach{{.*}}[[PEACH_ATTRS:\#[0-9]+]] +// CHECK: i32 @peach{{.*}}[[PEACH_ATTRS:\#[0-9]+]] { #[no_mangle] pub fn peach(x: u32) -> u32 { x diff --git a/tests/codegen-llvm/frame-pointer.rs b/tests/codegen-llvm/frame-pointer.rs index a52d95a23862d..1d0dd762826b2 100644 --- a/tests/codegen-llvm/frame-pointer.rs +++ b/tests/codegen-llvm/frame-pointer.rs @@ -18,7 +18,7 @@ extern crate minicore; use minicore::*; -// CHECK: define i32 @peach{{.*}}[[PEACH_ATTRS:\#[0-9]+]] +// CHECK: define i32 @peach{{.*}}[[PEACH_ATTRS:\#[0-9]+]] { #[no_mangle] pub fn peach(x: u32) -> u32 { x diff --git a/tests/codegen-llvm/gpu-convergent.rs b/tests/codegen-llvm/gpu-convergent.rs index 376d65a3d4a25..bb9271ab69996 100644 --- a/tests/codegen-llvm/gpu-convergent.rs +++ b/tests/codegen-llvm/gpu-convergent.rs @@ -17,7 +17,7 @@ extern "C" { fn ext(); } -// CHECK: define {{.*}}_kernel void @fun(i32{{.*}}) unnamed_addr #[[ATTR:[0-9]+]] +// CHECK: define {{.*}}_kernel void @fun(i32{{.*}}) unnamed_addr #[[ATTR:[0-9]+]] { // CHECK: declare void @ext() unnamed_addr #[[ATTR]] // CHECK: attributes #[[ATTR]] = {{.*}} convergent #[no_mangle] diff --git a/tests/codegen-llvm/instrument-coverage/testprog.rs b/tests/codegen-llvm/instrument-coverage/testprog.rs index 67c49c438f9f7..ef61ede6de8ee 100644 --- a/tests/codegen-llvm/instrument-coverage/testprog.rs +++ b/tests/codegen-llvm/instrument-coverage/testprog.rs @@ -101,7 +101,7 @@ fn main() { // CHECK-SAME: @__llvm_prf_nm // CHECK-SAME: section "llvm.metadata" -// CHECK: define internal { {{.*}} } @_R{{[a-zA-Z0-9_]+}}testprog14will_be_called() unnamed_addr #{{[0-9]+}} +// CHECK: define internal { {{.*}} } @_R{{[a-zA-Z0-9_]+}}testprog14will_be_called() unnamed_addr #{{[0-9]+}} { // CHECK-NEXT: start: // CHECK-NOT: define internal // CHECK: atomicrmw add ptr @@ -109,7 +109,7 @@ fn main() { // CHECK: declare void @llvm.instrprof.increment(ptr, i64, i32, i32) #[[LLVM_INSTRPROF_INCREMENT_ATTR:[0-9]+]] -// WIN: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() #[[LLVM_PROFILE_RUNTIME_USER_ATTR:[0-9]+]] comdat {{.*}} +// WIN: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() #[[LLVM_PROFILE_RUNTIME_USER_ATTR:[0-9]+]] comdat {{.*}}{ // WIN-NEXT: %1 = load i32, ptr @__llvm_profile_runtime // WIN-NEXT: ret i32 %1 // WIN-NEXT: } diff --git a/tests/codegen-llvm/link_section.rs b/tests/codegen-llvm/link_section.rs index 61bde683c0a41..f196ea86c447d 100644 --- a/tests/codegen-llvm/link_section.rs +++ b/tests/codegen-llvm/link_section.rs @@ -29,7 +29,7 @@ pub static VAR2: E = E::A(666); #[link_section = "__TEST,three"] pub static VAR3: E = E::B(1.); -// CHECK: define {{(dso_local )?}}void @fn1() {{.*}} section "__TEST,four" +// CHECK: define {{(dso_local )?}}void @fn1() {{.*}} section "__TEST,four" { #[no_mangle] #[link_section = "__TEST,four"] pub fn fn1() {} diff --git a/tests/codegen-llvm/sanitizer/cfi/emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen-llvm/sanitizer/cfi/emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs index 5b1aa97ab3338..7639ce7b10448 100644 --- a/tests/codegen-llvm/sanitizer/cfi/emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs +++ b/tests/codegen-llvm/sanitizer/cfi/emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs @@ -7,21 +7,21 @@ pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 { // CHECK-LABEL: define{{.*}}foo - // CHECK-SAME: {{.*}}!type ![[TYPE1:[0-9]+]] + // CHECK-SAME: {{.*}}![[TYPE1:[0-9]+]] // CHECK: call i1 @llvm.type.test(ptr {{%f|%0}}, metadata !"_ZTSFu3i32S_E.normalized.generalized") f(arg) } pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 { // CHECK-LABEL: define{{.*}}bar - // CHECK-SAME: {{.*}}!type ![[TYPE2:[0-9]+]] + // CHECK-SAME: {{.*}}![[TYPE2:[0-9]+]] // CHECK: call i1 @llvm.type.test(ptr {{%f|%0}}, metadata !"_ZTSFu3i32S_S_E.normalized.generalized") f(arg1, arg2) } pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 { // CHECK-LABEL: define{{.*}}baz - // CHECK-SAME: {{.*}}!type ![[TYPE3:[0-9]+]] + // CHECK-SAME: {{.*}}![[TYPE3:[0-9]+]] // CHECK: call i1 @llvm.type.test(ptr {{%f|%0}}, metadata !"_ZTSFu3i32S_S_S_E.normalized.generalized") f(arg1, arg2, arg3) } diff --git a/tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs b/tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs index 3df2d569f9a40..35317b0dd39cc 100644 --- a/tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs +++ b/tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs @@ -72,7 +72,7 @@ pub unsafe fn some_non_zero_from_atomic_get() -> Option { /// /// The way we check that the LLVM IR is correct is by making sure that neither /// `panic` nor `unreachable` is part of the LLVM IR: -// CHECK-LABEL: define {{.*}} i64 @some_non_zero_from_atomic_get2() {{.*}} +// CHECK-LABEL: define {{.*}} i64 @some_non_zero_from_atomic_get2() {{.*}} { // CHECK-NOT: panic // CHECK-NOT: unreachable #[no_mangle] diff --git a/tests/codegen-llvm/target-feature-negative-implication.rs b/tests/codegen-llvm/target-feature-negative-implication.rs index 376599738e526..a9cdca4283991 100644 --- a/tests/codegen-llvm/target-feature-negative-implication.rs +++ b/tests/codegen-llvm/target-feature-negative-implication.rs @@ -13,7 +13,7 @@ use minicore::*; #[no_mangle] pub unsafe fn banana() { // CHECK-LABEL: @banana() - // CHECK-SAME: [[BANANAATTRS:#[0-9]+]] + // CHECK-SAME: [[BANANAATTRS:#[0-9]+]] { } // CHECK: attributes [[BANANAATTRS]] diff --git a/tests/codegen-llvm/target-feature-overrides.rs b/tests/codegen-llvm/target-feature-overrides.rs index 3bf05c7977ebf..2adc8ee6f53bc 100644 --- a/tests/codegen-llvm/target-feature-overrides.rs +++ b/tests/codegen-llvm/target-feature-overrides.rs @@ -23,7 +23,7 @@ extern "C" { #[no_mangle] pub unsafe fn apple() -> u32 { // CHECK-LABEL: @apple() - // CHECK-SAME: [[APPLEATTRS:#[0-9]+]] + // CHECK-SAME: [[APPLEATTRS:#[0-9]+]] { // CHECK: {{.*}}call{{.*}}@peach peach() } @@ -32,7 +32,7 @@ pub unsafe fn apple() -> u32 { #[no_mangle] pub unsafe fn banana() -> u32 { // CHECK-LABEL: @banana() - // CHECK-SAME: [[BANANAATTRS:#[0-9]+]] + // CHECK-SAME: [[BANANAATTRS:#[0-9]+]] { // COMPAT: {{.*}}call{{.*}}@peach // INCOMPAT: {{.*}}call{{.*}}@apple apple() // Compatible for inline in COMPAT revision and can't be inlined in INCOMPAT diff --git a/tests/codegen-llvm/unwind-abis/aapcs-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/aapcs-unwind-abi.rs index 279780e3a7aeb..ecace722e0dbe 100644 --- a/tests/codegen-llvm/unwind-abis/aapcs-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/aapcs-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `aapcs-unwind` extern functions. `aapcs-unwind` functions MUST NOT have this attribute. We // disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "aapcs" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "aapcs-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/c-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/c-unwind-abi.rs index 1b3312839e3e8..46c08b5fc4ff4 100644 --- a/tests/codegen-llvm/unwind-abis/c-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/c-unwind-abi.rs @@ -7,11 +7,11 @@ #![crate_type = "lib"] -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "C" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "C-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/cdecl-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/cdecl-unwind-abi.rs index 6f4eafb353ccb..8e643d6ce4947 100644 --- a/tests/codegen-llvm/unwind-abis/cdecl-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/cdecl-unwind-abi.rs @@ -7,11 +7,11 @@ #![crate_type = "lib"] -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "cdecl" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "cdecl-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/fastcall-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/fastcall-unwind-abi.rs index 51c6fd15b9c5c..7df46813ed1dd 100644 --- a/tests/codegen-llvm/unwind-abis/fastcall-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/fastcall-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `fastcall-unwind` extern functions. `fastcall-unwind` functions MUST NOT have this attribute. We // disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "fastcall" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "fastcall-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/stdcall-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/stdcall-unwind-abi.rs index b5fcea52b4d61..cc06ee125495a 100644 --- a/tests/codegen-llvm/unwind-abis/stdcall-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/stdcall-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // extern functions. `stdcall-unwind` functions MUST NOT have this attribute. We disable // optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "stdcall" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "stdcall-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/system-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/system-unwind-abi.rs index 15fce95fe285b..5f9102483464b 100644 --- a/tests/codegen-llvm/unwind-abis/system-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/system-unwind-abi.rs @@ -7,11 +7,11 @@ #![crate_type = "lib"] -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "system" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "system-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/sysv64-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/sysv64-unwind-abi.rs index 1293e7c0a5f82..69bfaf80b4be6 100644 --- a/tests/codegen-llvm/unwind-abis/sysv64-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/sysv64-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `sysv64-unwind` extern functions. `sysv64-unwind` functions MUST NOT have this attribute. We // disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "sysv64" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "sysv64-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/thiscall-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/thiscall-unwind-abi.rs index a9b6c34ee58e2..05f6b8b70e171 100644 --- a/tests/codegen-llvm/unwind-abis/thiscall-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/thiscall-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `thiscall-unwind` extern functions. `thiscall-unwind` functions MUST NOT have this attribute. We // disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "thiscall" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "thiscall-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/vectorcall-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/vectorcall-unwind-abi.rs index 8cedb55ae1d28..d001a16b32a1c 100644 --- a/tests/codegen-llvm/unwind-abis/vectorcall-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/vectorcall-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `vectorcall-unwind` extern functions. `vectorcall-unwind` functions MUST NOT have this attribute. // We disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "vectorcall" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "vectorcall-unwind" fn rust_item_that_can_unwind() {} diff --git a/tests/codegen-llvm/unwind-abis/win64-unwind-abi.rs b/tests/codegen-llvm/unwind-abis/win64-unwind-abi.rs index 2a3ad330406e6..257f00b54e4d8 100644 --- a/tests/codegen-llvm/unwind-abis/win64-unwind-abi.rs +++ b/tests/codegen-llvm/unwind-abis/win64-unwind-abi.rs @@ -16,11 +16,11 @@ pub trait Sized: MetaSized {} // `win64-unwind` extern functions. `win64-unwind` functions MUST NOT have this attribute. We // disable optimizations above to prevent LLVM from inferring the attribute. -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 +// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { #[no_mangle] pub extern "win64" fn rust_item_that_cannot_unwind() {} -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 +// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { #[no_mangle] pub extern "win64-unwind" fn rust_item_that_can_unwind() {} From f25f4b459c38678d56b1d0624b4856e9a35c891d Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Fri, 5 Jun 2026 22:41:18 +0800 Subject: [PATCH 4/9] compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows So that we don't get a bunch of console windows spawned by the debugger processes. --- src/tools/compiletest/src/runtest.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 72817ad64521a..79e04b12fbed3 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1645,6 +1645,11 @@ impl<'test> TestCx<'test> { if self.config.mode == TestMode::CodegenUnits { compiler.args(&["-Z", "human_readable_cgu_names"]); } + + if self.config.mode == TestMode::DebugInfo && cfg!(target_os = "windows") { + // Prevent debugger processes from creating new console windows. + compiler.args(&["-Z", r#"crate-attr=windows_subsystem="windows""#]); + } } if self.config.optimize_tests && compiler_kind == CompilerKind::Rustc { From 36742d886762365ad22152d8ddcf311ed58968cf Mon Sep 17 00:00:00 2001 From: Egor Ivanov Date: Fri, 5 Jun 2026 17:04:12 +0000 Subject: [PATCH 5/9] Convert `QueryRegionConstraint` into a struct --- .../src/type_check/constraint_conversion.rs | 8 ++-- .../src/infer/canonical/query_response.rs | 43 ++++++++++++------- compiler/rustc_middle/src/infer/canonical.rs | 9 ++-- .../src/solve/delegate.rs | 5 ++- .../src/traits/outlives_bounds.rs | 3 +- .../rustc_traits/src/coroutine_witnesses.rs | 3 +- 6 files changed, 45 insertions(+), 26 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/constraint_conversion.rs b/compiler/rustc_borrowck/src/type_check/constraint_conversion.rs index bca2de041b657..4d93fa08fe0bd 100644 --- a/compiler/rustc_borrowck/src/type_check/constraint_conversion.rs +++ b/compiler/rustc_borrowck/src/type_check/constraint_conversion.rs @@ -1,7 +1,7 @@ use rustc_data_structures::fx::FxHashSet; use rustc_hir::def_id::LocalDefId; use rustc_infer::infer::SubregionOrigin; -use rustc_infer::infer::canonical::QueryRegionConstraints; +use rustc_infer::infer::canonical::{QueryRegionConstraint, QueryRegionConstraints}; use rustc_infer::infer::outlives::env::RegionBoundPairs; use rustc_infer::infer::outlives::obligations::{TypeOutlives, TypeOutlivesDelegate}; use rustc_infer::infer::region_constraints::{GenericKind, VerifyBound}; @@ -74,9 +74,9 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> { let assumptions = elaborate::elaborate_outlives_assumptions(self.infcx.tcx, assumptions.iter().copied()); - for &(constraint, constraint_category, _) in constraints { + for &QueryRegionConstraint { constraint, category, .. } in constraints { constraint.iter_outlives().for_each(|predicate| { - self.convert(predicate, constraint_category, &assumptions); + self.convert(predicate, category, &assumptions); }); } } @@ -296,7 +296,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> { // FIXME(higher_ranked_auto): What should we do with the assumptions here? if let Some(QueryRegionConstraints { constraints, assumptions: _ }) = constraints { next_outlives_predicates.extend(constraints.iter().flat_map( - |(constraint, category, _)| { + |QueryRegionConstraint { constraint, category, .. }| { constraint.iter_outlives().map(|outlives| (outlives, *category)) }, )); diff --git a/compiler/rustc_infer/src/infer/canonical/query_response.rs b/compiler/rustc_infer/src/infer/canonical/query_response.rs index 98763ff742f25..5641523c304c9 100644 --- a/compiler/rustc_infer/src/infer/canonical/query_response.rs +++ b/compiler/rustc_infer/src/infer/canonical/query_response.rs @@ -13,7 +13,7 @@ use std::iter; use rustc_index::{Idx, IndexVec}; use rustc_middle::arena::ArenaAllocatable; use rustc_middle::bug; -use rustc_middle::infer::canonical::CanonicalVarKind; +use rustc_middle::infer::canonical::{CanonicalVarKind, QueryRegionConstraint}; use rustc_middle::ty::{self, BoundVar, GenericArg, GenericArgKind, Ty, TyCtxt, TypeFoldable}; use tracing::{debug, instrument}; @@ -188,7 +188,9 @@ impl<'tcx> InferCtxt<'tcx> { let InferOk { value: result_args, obligations } = self.query_response_instantiation(cause, param_env, original_values, query_response)?; - for (constraint, _category, vis) in &query_response.value.region_constraints.constraints { + for QueryRegionConstraint { constraint, visible_for_leak_check: vis, .. } in + &query_response.value.region_constraints.constraints + { let constraint = instantiate_value(self.tcx, &result_args, *constraint); match constraint { ty::RegionConstraint::Outlives(predicate) => { @@ -285,11 +287,12 @@ impl<'tcx> InferCtxt<'tcx> { (GenericArgKind::Lifetime(v_o), GenericArgKind::Lifetime(v_r)) => { if v_o != v_r { - output_query_region_constraints.constraints.push(( - ty::RegionEqPredicate(v_o, v_r).into(), - constraint_category, - ty::VisibleForLeakCheck::Yes, - )); + let constraint = QueryRegionConstraint { + constraint: ty::RegionEqPredicate(v_o, v_r).into(), + category: constraint_category, + visible_for_leak_check: ty::VisibleForLeakCheck::Yes, + }; + output_query_region_constraints.constraints.push(constraint); } } @@ -321,7 +324,7 @@ impl<'tcx> InferCtxt<'tcx> { let r_c = instantiate_value(self.tcx, &result_args, r_c); // Screen out `'a: 'a` or `'a == 'a` cases. - if r_c.0.is_trivial() { None } else { Some(r_c) } + if r_c.constraint.is_trivial() { None } else { Some(r_c) } }), ); @@ -616,7 +619,7 @@ pub fn make_query_region_constraints<'tcx>( debug!(?constraints); - let constraints: Vec<_> = constraints + let constraints: Vec> = constraints .iter() .map(|(c, origin)| match c.kind { ConstraintKind::VarSubVar @@ -625,22 +628,30 @@ pub fn make_query_region_constraints<'tcx>( | ConstraintKind::RegSubReg => { // Swap regions because we are going from sub (<=) to outlives (>=). let constraint = ty::OutlivesPredicate(c.sup.into(), c.sub).into(); - (constraint, origin.to_constraint_category(), c.visible_for_leak_check) + QueryRegionConstraint { + constraint, + category: origin.to_constraint_category(), + visible_for_leak_check: c.visible_for_leak_check, + } } ConstraintKind::VarEqVar | ConstraintKind::VarEqReg | ConstraintKind::RegEqReg => { let constraint = ty::RegionEqPredicate(c.sup, c.sub).into(); - (constraint, origin.to_constraint_category(), c.visible_for_leak_check) + QueryRegionConstraint { + constraint, + category: origin.to_constraint_category(), + visible_for_leak_check: c.visible_for_leak_check, + } } }) .chain(outlives_obligations.into_iter().map( |TypeOutlivesConstraint { sub_region, sup_type, origin }| { - ( - ty::OutlivesPredicate(sup_type.into(), sub_region).into(), - origin.to_constraint_category(), + QueryRegionConstraint { + constraint: ty::OutlivesPredicate(sup_type.into(), sub_region).into(), + category: origin.to_constraint_category(), // We don't do leak checks for type outlives - ty::VisibleForLeakCheck::Unreachable, - ) + visible_for_leak_check: ty::VisibleForLeakCheck::Unreachable, + } }, )) .collect(); diff --git a/compiler/rustc_middle/src/infer/canonical.rs b/compiler/rustc_middle/src/infer/canonical.rs index ee8ab8a2ff931..8f182d096e759 100644 --- a/compiler/rustc_middle/src/infer/canonical.rs +++ b/compiler/rustc_middle/src/infer/canonical.rs @@ -135,9 +135,12 @@ impl<'tcx, R> QueryResponse<'tcx, R> { } } -// FIXME: Convert this into a struct -pub type QueryRegionConstraint<'tcx> = - (ty::RegionConstraint<'tcx>, ConstraintCategory<'tcx>, ty::VisibleForLeakCheck); +#[derive(Debug, StableHash, Hash, Eq, PartialEq, TypeVisitable, Clone, TypeFoldable, Copy)] +pub struct QueryRegionConstraint<'tcx> { + pub constraint: ty::RegionConstraint<'tcx>, + pub category: ConstraintCategory<'tcx>, + pub visible_for_leak_check: ty::VisibleForLeakCheck, +} #[derive(Default)] pub struct CanonicalParamEnvCache<'tcx> { diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index bd22ba6b6bf6d..7c2f5c7f170aa 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -7,6 +7,7 @@ use rustc_hir::def_id::{CRATE_DEF_ID, DefId}; use rustc_infer::infer::canonical::query_response::make_query_region_constraints; use rustc_infer::infer::canonical::{ Canonical, CanonicalExt as _, CanonicalQueryInput, CanonicalVarKind, CanonicalVarValues, + QueryRegionConstraint, }; use rustc_infer::infer::{InferCtxt, RegionVariableOrigin, SubregionOrigin, TyCtxtInferExt}; use rustc_infer::traits::solve::{FetchEligibleAssocItemResponse, Goal}; @@ -262,7 +263,9 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< let mut seen = FxHashMap::default(); let mut constraints = vec![]; - for (outlives, _, vis) in region_constraints.constraints { + for QueryRegionConstraint { constraint: outlives, visible_for_leak_check: vis, .. } in + region_constraints.constraints + { match seen.entry(outlives) { Entry::Occupied(occupied) => { let idx = occupied.get(); diff --git a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs index 8be26fed0ca42..a171a0de9dd79 100644 --- a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs +++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs @@ -1,4 +1,5 @@ use rustc_infer::infer::InferOk; +use rustc_infer::infer::canonical::QueryRegionConstraint; use rustc_infer::infer::resolve::OpportunisticRegionResolver; use rustc_infer::traits::query::type_op::ImpliedOutlivesBounds; use rustc_macros::extension; @@ -83,7 +84,7 @@ fn implied_outlives_bounds<'a, 'tcx>( // outlives bound required proving some higher-ranked coroutine obl. let QueryRegionConstraints { constraints, assumptions: _ } = constraints; let cause = ObligationCause::misc(span, body_id); - for &(constraint, _, vis) in &constraints { + for &QueryRegionConstraint { constraint, visible_for_leak_check: vis, .. } in &constraints { match constraint { ty::RegionConstraint::Outlives(predicate) => { infcx.register_outlives_constraint(predicate, vis, &cause) diff --git a/compiler/rustc_traits/src/coroutine_witnesses.rs b/compiler/rustc_traits/src/coroutine_witnesses.rs index 83a77f17b28ce..7fe8303b7459b 100644 --- a/compiler/rustc_traits/src/coroutine_witnesses.rs +++ b/compiler/rustc_traits/src/coroutine_witnesses.rs @@ -1,4 +1,5 @@ use rustc_infer::infer::TyCtxtInferExt; +use rustc_infer::infer::canonical::QueryRegionConstraint; use rustc_infer::infer::canonical::query_response::make_query_region_constraints; use rustc_infer::infer::resolve::OpportunisticRegionResolver; use rustc_infer::traits::{Obligation, ObligationCause}; @@ -80,7 +81,7 @@ fn compute_assumptions<'tcx>( tcx.mk_outlives_from_iter( constraints .into_iter() - .flat_map(|(constraint, _, _)| constraint.iter_outlives()) + .flat_map(|QueryRegionConstraint { constraint, .. }| constraint.iter_outlives()) // FIXME(higher_ranked_auto): We probably should deeply resolve these before // filtering out infers which only correspond to unconstrained infer regions // which we can sometimes get. From 4e59f4c54b480d98dbe3eb37f12feb4d46be3d55 Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Wed, 27 May 2026 12:22:03 +0200 Subject: [PATCH 6/9] add `extern "tail"` calling convention --- compiler/rustc_abi/src/canon_abi.rs | 7 +- compiler/rustc_abi/src/extern_abi.rs | 9 ++- compiler/rustc_ast_lowering/src/stability.rs | 3 + .../rustc_ast_passes/src/ast_validation.rs | 1 + .../rustc_codegen_cranelift/src/abi/mod.rs | 7 +- compiler/rustc_codegen_gcc/src/abi.rs | 29 ++++--- compiler/rustc_codegen_gcc/src/context.rs | 8 +- compiler/rustc_codegen_llvm/src/abi.rs | 4 + compiler/rustc_feature/src/unstable.rs | 2 + compiler/rustc_hir_typeck/src/callee.rs | 1 + compiler/rustc_middle/src/ty/layout.rs | 4 +- compiler/rustc_public/src/abi.rs | 1 + compiler/rustc_public/src/ty.rs | 1 + .../src/unstable/convert/internal.rs | 1 + .../src/unstable/convert/stable/abi.rs | 1 + .../src/unstable/convert/stable/ty.rs | 1 + compiler/rustc_span/src/symbol.rs | 1 + compiler/rustc_target/src/spec/abi_map.rs | 1 + tests/codegen-llvm/preserve-none.rs | 2 +- tests/codegen-llvm/tailcc.rs | 28 +++++++ tests/ui/abi/rust-preserve-none-cc.rs | 29 ++++--- tests/ui/abi/rust-tail-cc.rs | 80 +++++++++++++++++++ .../feature-gate-rust-tail-cc.rs | 21 +++++ .../feature-gate-rust-tail-cc.stderr | 73 +++++++++++++++++ .../print-calling-conventions.stdout | 1 + 25 files changed, 286 insertions(+), 30 deletions(-) create mode 100644 tests/codegen-llvm/tailcc.rs create mode 100644 tests/ui/abi/rust-tail-cc.rs create mode 100644 tests/ui/feature-gates/feature-gate-rust-tail-cc.rs create mode 100644 tests/ui/feature-gates/feature-gate-rust-tail-cc.stderr diff --git a/compiler/rustc_abi/src/canon_abi.rs b/compiler/rustc_abi/src/canon_abi.rs index 316cb05ec1806..6b4963ae92461 100644 --- a/compiler/rustc_abi/src/canon_abi.rs +++ b/compiler/rustc_abi/src/canon_abi.rs @@ -28,6 +28,7 @@ pub enum CanonAbi { Rust, RustCold, RustPreserveNone, + RustTail, /// An ABI that rustc does not know how to call or define. Custom, @@ -59,7 +60,10 @@ pub enum CanonAbi { impl CanonAbi { pub fn is_rustic_abi(self) -> bool { match self { - CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::RustPreserveNone => true, + CanonAbi::Rust + | CanonAbi::RustCold + | CanonAbi::RustPreserveNone + | CanonAbi::RustTail => true, CanonAbi::C | CanonAbi::Custom | CanonAbi::Swift @@ -81,6 +85,7 @@ impl fmt::Display for CanonAbi { CanonAbi::Rust => ExternAbi::Rust, CanonAbi::RustCold => ExternAbi::RustCold, CanonAbi::RustPreserveNone => ExternAbi::RustPreserveNone, + CanonAbi::RustTail => ExternAbi::RustTail, CanonAbi::Custom => ExternAbi::Custom, CanonAbi::Swift => ExternAbi::Swift, CanonAbi::Arm(arm_call) => match arm_call { diff --git a/compiler/rustc_abi/src/extern_abi.rs b/compiler/rustc_abi/src/extern_abi.rs index 3def8a8ccf0ba..f30b923eeed17 100644 --- a/compiler/rustc_abi/src/extern_abi.rs +++ b/compiler/rustc_abi/src/extern_abi.rs @@ -49,6 +49,11 @@ pub enum ExternAbi { /// forcing callers to save all registers. RustPreserveNone, + /// Ensures that calls in tail position can always be optimized into a jump. + /// + /// This ABI is not stable, and relies on LLVM implementation details. + RustTail, + /// Unstable impl detail that directly uses Rust types to describe the ABI to LLVM. /// Even normally-compatible Rust types can become ABI-incompatible with this ABI! Unadjusted, @@ -205,6 +210,7 @@ abi_impls! { System { unwind: true } =><= "system-unwind", SysV64 { unwind: false } =><= "sysv64", SysV64 { unwind: true } =><= "sysv64-unwind", + RustTail =><= "tail", Thiscall { unwind: false } =><= "thiscall", Thiscall { unwind: true } =><= "thiscall-unwind", Unadjusted =><= "unadjusted", @@ -280,7 +286,7 @@ impl ExternAbi { /// - are subject to change between compiler versions pub fn is_rustic_abi(self) -> bool { use ExternAbi::*; - matches!(self, Rust | RustCall | RustCold | RustPreserveNone) + matches!(self, Rust | RustCall | RustCold | RustPreserveNone | RustTail) } /// Returns whether the ABI supports C variadics. This only controls whether we allow *imports* @@ -354,6 +360,7 @@ impl ExternAbi { | Self::SysV64 { .. } | Self::Win64 { .. } | Self::RustPreserveNone + | Self::RustTail | Self::Swift => true, } } diff --git a/compiler/rustc_ast_lowering/src/stability.rs b/compiler/rustc_ast_lowering/src/stability.rs index 00b6a353d93f6..b58087e4aa3a6 100644 --- a/compiler/rustc_ast_lowering/src/stability.rs +++ b/compiler/rustc_ast_lowering/src/stability.rs @@ -100,6 +100,9 @@ pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> { feature: sym::rust_preserve_none_cc, explain: GateReason::Experimental, }), + ExternAbi::RustTail => { + Err(UnstableAbi { abi, feature: sym::rust_tail_cc, explain: GateReason::Experimental }) + } ExternAbi::RustInvalid => { Err(UnstableAbi { abi, feature: sym::rustc_attrs, explain: GateReason::ImplDetail }) } diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index afaee6e542082..05f0990bf8512 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -424,6 +424,7 @@ impl<'a> AstValidator<'a> { | CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::RustPreserveNone + | CanonAbi::RustTail | CanonAbi::Swift | CanonAbi::Arm(_) | CanonAbi::X86(_) => { /* nothing to check */ } diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index a8b179f169bf6..9644932ae1055 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -55,8 +55,9 @@ pub(crate) fn conv_to_call_conv( match c { CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::C => default_call_conv, - // Cranelift doesn't currently have anything for this. - CanonAbi::RustPreserveNone => default_call_conv, + CanonAbi::RustPreserveNone | CanonAbi::RustTail => { + sess.dcx().fatal(format!("call conv {c:?} is LLVM-specific")) + } // Functions with this calling convention can only be called from assembly, but it is // possible to declare an `extern "custom"` block, so the backend still needs a calling @@ -71,7 +72,7 @@ pub(crate) fn conv_to_call_conv( }, CanonAbi::Interrupt(_) | CanonAbi::Arm(_) | CanonAbi::Swift => { - sess.dcx().fatal("call conv {c:?} is not yet implemented") + sess.dcx().fatal(format!("call conv {c:?} is not yet implemented")) } CanonAbi::GpuKernel => { unreachable!("tried to use {c:?} call conv which only exists on an unsupported target") diff --git a/compiler/rustc_codegen_gcc/src/abi.rs b/compiler/rustc_codegen_gcc/src/abi.rs index fb243ff842c83..1b7bb8c907735 100644 --- a/compiler/rustc_codegen_gcc/src/abi.rs +++ b/compiler/rustc_codegen_gcc/src/abi.rs @@ -10,7 +10,7 @@ use rustc_middle::bug; use rustc_middle::ty::Ty; use rustc_middle::ty::layout::LayoutOf; #[cfg(feature = "master")] -use rustc_session::config; +use rustc_session::{Session, config}; use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode}; #[cfg(feature = "master")] use rustc_target::spec::Arch; @@ -230,32 +230,43 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { #[cfg(feature = "master")] fn gcc_cconv(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Option> { - conv_to_fn_attribute(self.conv, &cx.tcx.sess.target.arch) + conv_to_fn_attribute(cx.sess(), self.conv) } } #[cfg(feature = "master")] -pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: &Arch) -> Option> { +pub fn conv_to_fn_attribute<'gcc>(sess: &Session, conv: CanonAbi) -> Option> { let attribute = match conv { CanonAbi::C | CanonAbi::Rust => return None, - // gcc/gccjit does not have anything for this. - CanonAbi::RustPreserveNone => return None, + CanonAbi::RustPreserveNone => { + // This calling convention is LLVM-specific and unspecified. + sess.dcx() + .fatal("gcc/gccjit backend does not support RustPreserveNone calling convention") + } + CanonAbi::RustTail => { + // This calling convention is LLVM-specific and unspecified. + sess.dcx().fatal("gcc/gccjit backend does not support RustTail calling convention") + } CanonAbi::RustCold => FnAttribute::Cold, // Functions with this calling convention can only be called from assembly, but it is // possible to declare an `extern "custom"` block, so the backend still needs a calling // convention for declaring foreign functions. CanonAbi::Custom => return None, - // gcc/gccjit does not have anything for Swift's calling convention. - CanonAbi::Swift => panic!("gcc/gccjit backend does not support Swift calling convention"), + CanonAbi::Swift => { + // gcc/gccjit does not have anything for Swift's calling convention. + sess.dcx().fatal("gcc/gccjit backend does not support Swift calling convention") + } CanonAbi::Arm(arm_call) => match arm_call { ArmCall::CCmseNonSecureCall => FnAttribute::ArmCmseNonsecureCall, ArmCall::CCmseNonSecureEntry => FnAttribute::ArmCmseNonsecureEntry, ArmCall::Aapcs => FnAttribute::ArmPcs("aapcs"), }, - CanonAbi::GpuKernel => match arch { + CanonAbi::GpuKernel => match &sess.target.arch { &Arch::AmdGpu => FnAttribute::GcnAmdGpuHsaKernel, &Arch::Nvptx64 => FnAttribute::NvptxKernel, - arch => panic!("Arch {arch} does not support GpuKernel calling convention"), + arch => sess + .dcx() + .fatal(format!("Arch {arch} does not support GpuKernel calling convention")), }, // FIXME(antoyo): check if those AVR attributes are mapped correctly. CanonAbi::Interrupt(interrupt_kind) => match interrupt_kind { diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index ed313859aeafa..ea71546ea1c0e 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/src/context.rs @@ -486,10 +486,10 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { fn declare_c_main(&self, fn_type: Self::Type) -> Option { let entry_name = self.sess().target.entry_name.as_ref(); if !self.functions.borrow().contains_key(entry_name) { - #[cfg(feature = "master")] - let conv = conv_to_fn_attribute(self.sess().target.entry_abi, &self.sess().target.arch); - #[cfg(not(feature = "master"))] - let conv = None; + let conv = cfg_select! { + feature = "master" => conv_to_fn_attribute(self.sess(), self.sess().target.entry_abi), + _ => None, + }; Some(self.declare_entry_fn(entry_name, fn_type, conv)) } else { // If the symbol already exists, it is an error: for example, the user wrote diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 3f6010e55928d..4d18818bbe7bd 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -723,6 +723,10 @@ pub(crate) fn to_llvm_calling_convention(sess: &Session, abi: CanonAbi) -> llvm: Arch::X86_64 | Arch::AArch64 => llvm::PreserveNone, _ => llvm::CCallConv, }, + CanonAbi::RustTail => match &sess.target.arch { + Arch::X86 | Arch::X86_64 | Arch::AArch64 => llvm::Tail, + _ => sess.dcx().fatal("extern \"tail\" is only supported on x86_64 and aarch64"), + }, // Functions with this calling convention can only be called from assembly, but it is // possible to declare an `extern "custom"` block, so the backend still needs a calling // convention for declaring foreign functions. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index be98544d89ecd..693326e198721 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -709,6 +709,8 @@ declare_features! ( (unstable, rust_cold_cc, "1.63.0", Some(97544)), /// Allows `extern "rust-preserve-none"`. (unstable, rust_preserve_none_cc, "1.95.0", Some(151401)), + /// Allows `extern "tail"`. + (unstable, rust_tail_cc, "CURRENT_RUSTC_VERSION", Some(157427)), /// Target features on s390x. (unstable, s390x_target_feature, "1.82.0", Some(150259)), /// Allows the use of the `sanitize` attribute. diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index 7d687099f9715..e70936972e7c7 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -205,6 +205,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::RustPreserveNone + | CanonAbi::RustTail | CanonAbi::Swift | CanonAbi::Arm(_) | CanonAbi::X86(_) => {} diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 682bec55b4a38..a0dd7b5c5cb5e 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -1305,7 +1305,9 @@ pub fn fn_can_unwind(tcx: TyCtxt<'_>, fn_def_id: Option, abi: ExternAbi) | RustInvalid | Swift | Unadjusted => false, - Rust | RustCall | RustCold | RustPreserveNone => tcx.sess.panic_strategy().unwinds(), + Rust | RustCall | RustCold | RustPreserveNone | RustTail => { + tcx.sess.panic_strategy().unwinds() + } } } diff --git a/compiler/rustc_public/src/abi.rs b/compiler/rustc_public/src/abi.rs index 1227fe23713cb..cde885def8a41 100644 --- a/compiler/rustc_public/src/abi.rs +++ b/compiler/rustc_public/src/abi.rs @@ -455,6 +455,7 @@ pub enum CallConvention { PreserveMost, PreserveAll, PreserveNone, + Tail, Custom, diff --git a/compiler/rustc_public/src/ty.rs b/compiler/rustc_public/src/ty.rs index f71ca7213e9ed..9b9a480ab5f82 100644 --- a/compiler/rustc_public/src/ty.rs +++ b/compiler/rustc_public/src/ty.rs @@ -1167,6 +1167,7 @@ pub enum Abi { RiscvInterruptM, RiscvInterruptS, RustPreserveNone, + RustTail, RustInvalid, Custom, Swift, diff --git a/compiler/rustc_public/src/unstable/convert/internal.rs b/compiler/rustc_public/src/unstable/convert/internal.rs index 37f00da9f7103..f18fe84053b32 100644 --- a/compiler/rustc_public/src/unstable/convert/internal.rs +++ b/compiler/rustc_public/src/unstable/convert/internal.rs @@ -618,6 +618,7 @@ impl RustcInternal for Abi { Abi::RiscvInterruptM => rustc_abi::ExternAbi::RiscvInterruptM, Abi::RiscvInterruptS => rustc_abi::ExternAbi::RiscvInterruptS, Abi::RustPreserveNone => rustc_abi::ExternAbi::RustPreserveNone, + Abi::RustTail => rustc_abi::ExternAbi::RustTail, Abi::Custom => rustc_abi::ExternAbi::Custom, Abi::Swift => rustc_abi::ExternAbi::Swift, } diff --git a/compiler/rustc_public/src/unstable/convert/stable/abi.rs b/compiler/rustc_public/src/unstable/convert/stable/abi.rs index f42399241cd28..7e0b04f8a7f61 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/abi.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/abi.rs @@ -125,6 +125,7 @@ impl<'tcx> Stable<'tcx> for CanonAbi { CanonAbi::Rust => CallConvention::Rust, CanonAbi::RustCold => CallConvention::Cold, CanonAbi::RustPreserveNone => CallConvention::PreserveNone, + CanonAbi::RustTail => CallConvention::Tail, CanonAbi::Custom => CallConvention::Custom, CanonAbi::Swift => CallConvention::Swift, CanonAbi::Arm(arm_call) => match arm_call { diff --git a/compiler/rustc_public/src/unstable/convert/stable/ty.rs b/compiler/rustc_public/src/unstable/convert/stable/ty.rs index 925d4a5b40b20..8469c500b24c8 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -1046,6 +1046,7 @@ impl<'tcx> Stable<'tcx> for rustc_abi::ExternAbi { ExternAbi::Unadjusted => Abi::Unadjusted, ExternAbi::RustCold => Abi::RustCold, ExternAbi::RustPreserveNone => Abi::RustPreserveNone, + ExternAbi::RustTail => Abi::RustTail, ExternAbi::RustInvalid => Abi::RustInvalid, ExternAbi::RiscvInterruptM => Abi::RiscvInterruptM, ExternAbi::RiscvInterruptS => Abi::RiscvInterruptS, diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index fb433aef68cf8..9313e869278db 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1703,6 +1703,7 @@ symbols! { rust_logo, rust_out, rust_preserve_none_cc, + rust_tail_cc, rustc, rustc_abi, // FIXME(#82232, #143834): temporary name to mitigate `#[align]` nameres ambiguity diff --git a/compiler/rustc_target/src/spec/abi_map.rs b/compiler/rustc_target/src/spec/abi_map.rs index 8c56dcb899718..f7a7ae1eb7555 100644 --- a/compiler/rustc_target/src/spec/abi_map.rs +++ b/compiler/rustc_target/src/spec/abi_map.rs @@ -100,6 +100,7 @@ impl AbiMap { (ExternAbi::RustCold, _) if self.os == OsKind::Windows => CanonAbi::Rust, (ExternAbi::RustCold, _) => CanonAbi::RustCold, (ExternAbi::RustPreserveNone, _) => CanonAbi::RustPreserveNone, + (ExternAbi::RustTail, _) => CanonAbi::RustTail, (ExternAbi::Custom, _) => CanonAbi::Custom, diff --git a/tests/codegen-llvm/preserve-none.rs b/tests/codegen-llvm/preserve-none.rs index b45e49a466bf3..b8c8db25f272c 100644 --- a/tests/codegen-llvm/preserve-none.rs +++ b/tests/codegen-llvm/preserve-none.rs @@ -19,7 +19,7 @@ extern crate minicore; // UNSUPPORTED: define{{( dso_local)?}} void @peach(i16 #[no_mangle] #[inline(never)] -pub extern "rust-preserve-none" fn peach(x: u16) { +pub extern "rust-preserve-none" fn peach(_: u16) { loop {} } diff --git a/tests/codegen-llvm/tailcc.rs b/tests/codegen-llvm/tailcc.rs new file mode 100644 index 0000000000000..15ae69cf0498c --- /dev/null +++ b/tests/codegen-llvm/tailcc.rs @@ -0,0 +1,28 @@ +//@ add-minicore +//@ revisions: I586 X86_64 AARCH64 +//@ [I586] compile-flags: -C no-prepopulate-passes --target=i586-unknown-linux-gnu +//@ [I586] needs-llvm-components: x86 +//@ [X86_64] compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu +//@ [X86_64] needs-llvm-components: x86 +//@ [AARCH64] compile-flags: -C no-prepopulate-passes --target=aarch64-unknown-linux-gnu +//@ [AARCH64] needs-llvm-components: aarch64 + +#![crate_type = "lib"] +#![feature(no_core, rust_tail_cc, explicit_tail_calls)] +#![no_core] + +extern crate minicore; + +// CHECK: define{{( dso_local)?}} tailcc void @peach(i16 +#[no_mangle] +#[inline(never)] +pub extern "tail" fn peach(_: u16) { + loop {} +} + +// CHECK: call tailcc void @peach(i16 +pub fn quince(x: u16) { + if let 12345u16 = x { + peach(54321); + } +} diff --git a/tests/ui/abi/rust-preserve-none-cc.rs b/tests/ui/abi/rust-preserve-none-cc.rs index deacb926971c8..20895e1583f4e 100644 --- a/tests/ui/abi/rust-preserve-none-cc.rs +++ b/tests/ui/abi/rust-preserve-none-cc.rs @@ -1,5 +1,6 @@ //@ run-pass //@ needs-unwind +//@ ignore-backends: gcc #![feature(rust_preserve_none_cc)] @@ -17,9 +18,7 @@ extern "rust-preserve-none" fn oven_explosion() { #[inline(never)] fn bite_into(yummy: u64) -> u64 { - let did_it_actually = std::panic::catch_unwind(move || { - oven_explosion() - }); + let did_it_actually = std::panic::catch_unwind(move || oven_explosion()); assert!(did_it_actually.is_err()); yummy - 25 } @@ -52,16 +51,26 @@ extern "rust-preserve-none" fn lotsa_apples( and_a.rome.iter().sum(), fuji + ambrosia, cosmic_crisp - honeycrisp, - bite_into(and_a.golden_delicious) + bite_into(and_a.golden_delicious), ) } fn main() { - let pie = lotsa_apples(220, 140, 210.54201234, &[180, 210], (), CrateOf { - mcintosh: 150.0, - golden_delicious: 185, - jonagold: None, - rome: [180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202] - }, 270, 193.1, &[]); + let pie = lotsa_apples( + 220, + 140, + 210.54201234, + &[180, 210], + (), + CrateOf { + mcintosh: 150.0, + golden_delicious: 185, + jonagold: None, + rome: [180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202], + }, + 270, + 193.1, + &[], + ); assert_eq!(pie, (2292, 403.64201234, 50, 160)); } diff --git a/tests/ui/abi/rust-tail-cc.rs b/tests/ui/abi/rust-tail-cc.rs new file mode 100644 index 0000000000000..aba5d0d695647 --- /dev/null +++ b/tests/ui/abi/rust-tail-cc.rs @@ -0,0 +1,80 @@ +//@ revisions: aarch64 x32 x64 +//@ run-pass +//@[aarch64] only-aarch64 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ needs-unwind +//@ ignore-backends: gcc + +#![feature(rust_tail_cc)] + +struct CrateOf<'a> { + mcintosh: f64, + golden_delicious: u64, + jonagold: Option<&'a u64>, + rome: [u64; 12], +} + +#[inline(never)] +extern "tail" fn oven_explosion() { + panic!("bad time"); +} + +#[inline(never)] +fn bite_into(yummy: u64) -> u64 { + let did_it_actually = std::panic::catch_unwind(move || oven_explosion()); + assert!(did_it_actually.is_err()); + yummy - 25 +} + +#[inline(never)] +extern "tail" fn lotsa_apples( + honeycrisp: u64, + gala: u32, + fuji: f64, + granny_smith: &[u64], + pink_lady: (), + and_a: CrateOf<'static>, + cosmic_crisp: u64, + ambrosia: f64, + winesap: &[u64], +) -> (u64, f64, u64, u64) { + assert_eq!(honeycrisp, 220); + assert_eq!(gala, 140); + assert_eq!(fuji, 210.54201234); + assert_eq!(granny_smith, &[180, 210]); + assert_eq!(pink_lady, ()); + assert_eq!(and_a.mcintosh, 150.0); + assert_eq!(and_a.golden_delicious, 185); + assert_eq!(and_a.jonagold, None); // my scales can't weight these gargantuans. + assert_eq!(and_a.rome, [180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202]); + assert_eq!(cosmic_crisp, 270); + assert_eq!(ambrosia, 193.1); + assert_eq!(winesap, &[]); + ( + and_a.rome.iter().sum(), + fuji + ambrosia, + cosmic_crisp - honeycrisp, + bite_into(and_a.golden_delicious), + ) +} + +fn main() { + let pie = lotsa_apples( + 220, + 140, + 210.54201234, + &[180, 210], + (), + CrateOf { + mcintosh: 150.0, + golden_delicious: 185, + jonagold: None, + rome: [180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202], + }, + 270, + 193.1, + &[], + ); + assert_eq!(pie, (2292, 403.64201234, 50, 160)); +} diff --git a/tests/ui/feature-gates/feature-gate-rust-tail-cc.rs b/tests/ui/feature-gates/feature-gate-rust-tail-cc.rs new file mode 100644 index 0000000000000..b2bbf606cc7a8 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-rust-tail-cc.rs @@ -0,0 +1,21 @@ +#![crate_type = "lib"] + +extern "tail" fn apple() {} //~ ERROR "tail" ABI is experimental + +trait T { + extern "tail" fn banana(); //~ ERROR "tail" ABI is experimental + extern "tail" fn citrus() {} //~ ERROR "tail" ABI is experimental +} + +struct S; +impl T for S { + extern "tail" fn banana() {} //~ ERROR "tail" ABI is experimental +} + +impl S { + extern "tail" fn durian() {} //~ ERROR "tail" ABI is experimental +} + +type Fig = extern "tail" fn(); //~ ERROR "tail" ABI is experimental + +extern "tail" {} //~ ERROR "tail" ABI is experimental diff --git a/tests/ui/feature-gates/feature-gate-rust-tail-cc.stderr b/tests/ui/feature-gates/feature-gate-rust-tail-cc.stderr new file mode 100644 index 0000000000000..e588569e6bd79 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-rust-tail-cc.stderr @@ -0,0 +1,73 @@ +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:3:8 + | +LL | extern "tail" fn apple() {} + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:6:12 + | +LL | extern "tail" fn banana(); + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:7:12 + | +LL | extern "tail" fn citrus() {} + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:12:12 + | +LL | extern "tail" fn banana() {} + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:16:12 + | +LL | extern "tail" fn durian() {} + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:19:19 + | +LL | type Fig = extern "tail" fn(); + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: the extern "tail" ABI is experimental and subject to change + --> $DIR/feature-gate-rust-tail-cc.rs:21:8 + | +LL | extern "tail" {} + | ^^^^^^ + | + = note: see issue #157427 for more information + = help: add `#![feature(rust_tail_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/print-request/print-calling-conventions.stdout b/tests/ui/print-request/print-calling-conventions.stdout index 506bbea23e171..af4f491fc069e 100644 --- a/tests/ui/print-request/print-calling-conventions.stdout +++ b/tests/ui/print-request/print-calling-conventions.stdout @@ -29,6 +29,7 @@ system system-unwind sysv64 sysv64-unwind +tail thiscall thiscall-unwind unadjusted From ce94e80b7c6a93a5b1ecd2d00d1c74d1910279f3 Mon Sep 17 00:00:00 2001 From: Laine Taffin Altman Date: Fri, 5 Jun 2026 20:48:47 -0700 Subject: [PATCH 7/9] Rename `SyncView::{as_pin => as_pin_ref}` --- library/core/src/sync/sync_view.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/sync/sync_view.rs b/library/core/src/sync/sync_view.rs index 3b02c4c727ca8..63e157bf90f23 100644 --- a/library/core/src/sync/sync_view.rs +++ b/library/core/src/sync/sync_view.rs @@ -188,7 +188,7 @@ impl SyncView { #[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")] #[must_use] #[inline] - pub const fn as_pin(self: Pin<&Self>) -> Pin<&T> { + pub const fn as_pin_ref(self: Pin<&Self>) -> Pin<&T> { // SAFETY: `SyncView` can only produce `&T` if itself is unpinned // `Pin::map_unchecked` is not const, so we do this conversion manually unsafe { Pin::new_unchecked(&self.get_ref().inner) } From 73f8dddcee0be9ec1cd9bb66a9b27f32c5c20d84 Mon Sep 17 00:00:00 2001 From: Embers-of-the-Fire Date: Sat, 9 May 2026 20:21:38 +0800 Subject: [PATCH 8/9] test(chore): audit `//@ run-pass` in ui tests Assisted-by: OpenAI:gpt-5.5 Co-authored-by: Ayuse Signed-off-by: Embers-of-the-Fire --- tests/ui/abi/relocation_model_pic.rs | 2 +- tests/ui/allocator/dyn-compatible.rs | 2 +- .../ui/array-slice-vec/array_const_index-2.rs | 2 +- .../ui/array-slice-vec/cast-in-array-size.rs | 2 +- .../ui/array-slice-vec/copy-out-of-array-1.rs | 2 +- tests/ui/array-slice-vec/empty-mutable-vec.rs | 2 +- tests/ui/array-slice-vec/issue-15730.rs | 2 +- tests/ui/array-slice-vec/issue-18425.rs | 2 +- .../ui/array-slice-vec/ivec-pass-by-value.rs | 2 +- tests/ui/array-slice-vec/mut-vstore-expr.rs | 2 +- .../vec-macro-with-brackets.rs | 2 +- .../array-slice-vec/vec-repeat-with-cast.rs | 2 +- tests/ui/array-slice-vec/vector-no-ann-2.rs | 2 +- tests/ui/asm/empty_global_asm.rs | 2 +- tests/ui/asm/may_unwind.rs | 2 +- .../associated-const-marks-live-code.rs | 2 +- .../associated-consts/mismatched_impl_ty_1.rs | 2 +- .../associated-consts/mismatched_impl_ty_2.rs | 2 +- .../associated-consts/mismatched_impl_ty_3.rs | 2 +- ...ssociated-types-binding-in-where-clause.rs | 2 +- .../associated-types-conditional-dispatch.rs | 2 +- ...ted-types-duplicate-binding-in-env-hrtb.rs | 2 +- ...sociated-types-duplicate-binding-in-env.rs | 2 +- .../associated-types-eq-obj.rs | 2 +- .../associated-types-from-supertrait.rs | 2 +- .../associated-types-impl-redirect.rs | 2 +- .../associated-types-issue-21212.rs | 2 +- .../associated-types-method.rs | 2 +- .../associated-types-nested-projections.rs | 4 +- ...associated-types-nested-projections.stderr | 13 ----- ...iated-types-normalize-in-bounds-binding.rs | 2 +- ...ociated-types-normalize-unifield-struct.rs | 2 +- ...ociated-types-projection-in-object-type.rs | 2 +- .../associated-types-ref-from-struct.rs | 2 +- ...ciated-types-region-erasure-issue-20582.rs | 2 +- .../associated-types-sugar-path.rs | 2 +- ...iated-types-where-clause-impl-ambiguity.rs | 2 +- tests/ui/associated-types/issue-22828.rs | 2 +- tests/ui/associated-types/issue-23208.rs | 2 +- tests/ui/associated-types/issue-25339.rs | 2 +- tests/ui/associated-types/issue-47139-1.rs | 2 +- tests/ui/associated-types/issue-47139-2.rs | 2 +- tests/ui/associated-types/issue-54467.rs | 2 +- .../async-await/async-drop/ex-ice-132103.rs | 2 +- .../context-is-sorta-unwindsafe.rs | 2 +- .../interior-with-const-generic-expr.rs | 2 +- tests/ui/async-await/issue-60709.rs | 2 +- .../issues/issue-54752-async-block.rs | 2 +- tests/ui/async-await/issues/issue-55809.rs | 2 +- tests/ui/async-await/issues/issue-59972.rs | 2 +- .../async-await/multiple-lifetimes/elided.rs | 2 +- .../async-await/multiple-lifetimes/fn-ptr.rs | 2 +- .../async-await/multiple-lifetimes/named.rs | 2 +- .../multiple-lifetimes/partial-relation.rs | 2 +- .../multiple-lifetimes/ret-impl-trait-fg.rs | 2 +- .../attributes/crate-name-attr-validation.rs | 2 +- .../attributes/inline-attribute-on-closure.rs | 2 +- tests/ui/attributes/inline-main.rs | 2 +- tests/ui/attributes/log-backtrace.rs | 2 +- tests/ui/auto-traits/auto-is-contextual.rs | 2 +- .../auto-traits/auto-traits-type-parameter.rs | 2 +- tests/ui/auto-traits/auto-traits.rs | 6 +-- tests/ui/auto-traits/auto-traits.stderr | 16 ------ .../auto-ref-bounded-ty-param.rs | 2 +- tests/ui/autoref-autoderef/auto-ref.rs | 2 +- .../autoderef-and-borrow-method-receiver.rs | 2 +- .../autoderef-vec-box-fn-36786.rs | 2 +- .../autoderef-vec-to-slice-by-value.rs | 2 +- .../deref-chain-method-calls-13264.rs | 2 +- tests/ui/bench/issue-32062.rs | 2 +- tests/ui/binding/expr-match-panic-all.rs | 2 +- .../binding/inconsistent-lifetime-mismatch.rs | 2 +- tests/ui/binding/match-bot-2.rs | 2 +- tests/ui/binding/match-larger-const.rs | 2 +- tests/ui/binding/match-naked-record-expr.rs | 2 +- tests/ui/binding/match-path.rs | 2 +- tests/ui/binding/match-pattern-simple.rs | 2 +- tests/ui/binding/match-phi.rs | 2 +- tests/ui/binding/match-range-static.rs | 2 +- .../match-value-binding-in-guard-3291.rs | 2 +- tests/ui/binding/nil-pattern.rs | 2 +- .../ui/binding/optional_comma_in_match_arm.rs | 2 +- tests/ui/binding/pat-tuple-5.rs | 2 +- tests/ui/binding/simple-generic-match.rs | 2 +- .../underscore-prefixed-function-argument.rs | 2 +- tests/ui/binop/binary-op-on-fn-ptr-eq.rs | 2 +- tests/ui/binop/issue-25916.rs | 2 +- .../blocks-without-results-11709.rs | 2 +- .../borrowck/borrowck-assign-to-subfield.rs | 2 +- tests/ui/borrowck/borrowck-box-sensitivity.rs | 2 +- .../borrowck-closures-slice-patterns-ok.rs | 2 +- .../borrowck-field-sensitivity-rpass.rs | 2 +- tests/ui/borrowck/borrowck-lend-args.rs | 2 +- tests/ui/borrowck/borrowck-trait-lifetime.rs | 2 +- tests/ui/borrowck/borrowck-uniq-via-ref.rs | 2 +- .../borrowck/borrowck-use-mut-borrow-rpass.rs | 2 +- tests/ui/borrowck/issue-46095.rs | 2 +- .../region-checker-map-closure-13665.rs | 2 +- .../rvalue-lifetime-match-equivalence-7660.rs | 2 +- ...se-control-flow-split-before-activation.rs | 2 +- .../ui/borrowck/two-phase-method-receivers.rs | 2 +- tests/ui/box/alloc-unstable.rs | 2 +- tests/ui/box/empty-alloc-deref-rvalue.rs | 2 +- tests/ui/box/unit/unique-generic-assign.rs | 2 +- tests/ui/box/unit/unique-object-move.rs | 2 +- .../builtin-superkinds-phantom-typaram.rs | 2 +- ...as-cast-unifies-raw-pointer-and-fn-type.rs | 2 +- tests/ui/cast/cast-region-to-uint.rs | 2 +- tests/ui/cast/cast-to-box-arr.rs | 2 +- tests/ui/cast/coercion-as-explicit-cast.rs | 4 +- .../ui/cast/coercion-as-explicit-cast.stderr | 12 ----- .../ui/cast/constant-expression-cast-9942.rs | 2 +- tests/ui/cast/generic-trait-object-call.rs | 2 +- .../cast/owned-struct-to-trait-cast-6318.rs | 2 +- tests/ui/cast/supported-cast.rs | 2 +- tests/ui/cfg/cfg-attr-cfg.rs | 2 +- tests/ui/cfg/cfg-attr-crate.rs | 2 +- tests/ui/cfg/cfg-false-use-item.rs | 2 +- tests/ui/cfg/cfg-in-crate-1.rs | 2 +- tests/ui/cfg/cfg-match-arm.rs | 2 +- tests/ui/cfg/cfg-target-abi.rs | 2 +- tests/ui/cfg/cfg-target-compact.rs | 2 +- tests/ui/cfg/cfg-target-vendor.rs | 2 +- tests/ui/cfg/cfg_attr.rs | 2 +- tests/ui/cfg/cfg_inner_static.rs | 2 +- .../conditional-compilation-struct-11085.rs | 2 +- tests/ui/cfg/conditional-compile-arch.rs | 2 +- tests/ui/cfg/crt-static-off-works.rs | 2 +- tests/ui/cfg/crt-static-on-works.rs | 2 +- tests/ui/cfg/struct-field-empty.rs | 2 +- .../disjoint-capture-in-same-closure.rs | 2 +- .../run_pass/issue-88372.rs | 2 +- .../2229_closure_analysis/run_pass/mut_ref.rs | 2 +- .../ui/closures/call-boxed-closure-no-args.rs | 2 +- ...closure-through-lifetime-generic-struct.rs | 2 +- .../closure-with-fixed-size-array-param.rs | 2 +- .../closures/destructure-newtype-closure.rs | 2 +- tests/ui/closures/issue-1460.rs | 4 +- tests/ui/closures/issue-1460.stderr | 11 ----- .../pass-lifetime-fn-to-generic-fnonce.rs | 2 +- tests/ui/closures/semistatement-in-lambda.rs | 2 +- tests/ui/codegen/issue-55976.rs | 2 +- tests/ui/codemap_tests/utf8-bom.rs | 2 +- .../coercion/any-trait-object-debug-12744.rs | 2 +- tests/ui/coercion/basic-ptr-coercions.rs | 2 +- ...coerce-bare-fn-returning-zst-to-closure.rs | 2 +- tests/ui/coercion/coerce-expect-unsized.rs | 2 +- tests/ui/coercion/coerce-many-with-ty-var.rs | 2 +- .../coercion/coerce-mut-trait-object-8248.rs | 4 +- .../coerce-mut-trait-object-8248.stderr | 12 ----- .../coercion/coerce-overloaded-autoderef.rs | 2 +- .../coercion/coerce-reborrow-imm-ptr-arg.rs | 2 +- .../coercion/coerce-reborrow-imm-vec-arg.rs | 2 +- .../coercion/coerce-reborrow-mut-ptr-arg.rs | 2 +- .../coercion/coerce-reborrow-mut-ptr-rcvr.rs | 2 +- tests/ui/coercion/coerce-unify-return.rs | 2 +- tests/ui/coercion/coerce-unify.rs | 2 +- tests/ui/coercion/coerce-unsize-subtype.rs | 2 +- tests/ui/coercion/fn-item-to-dyn-any.rs | 2 +- tests/ui/coercion/issue-14589.rs | 4 +- tests/ui/coercion/issue-14589.stderr | 12 ----- tests/ui/coercion/issue-26905-rpass.rs | 2 +- tests/ui/coercion/issue-3794.rs | 2 +- .../method-return-trait-object-14399.rs | 4 +- .../method-return-trait-object-14399.stderr | 12 ----- .../ui/coercion/trait-object-arrays-11205.rs | 2 +- ...trait-object-coercion-distribution-9951.rs | 4 +- ...t-object-coercion-distribution-9951.stderr | 12 ----- tests/ui/coherence/coherence-impl-in-fn.rs | 2 +- .../coherence-negative-impls-safe-rpass.rs | 2 +- .../array-wrapper-struct-ctor.rs | 2 +- .../associated-const-bindings/assoc-const.rs | 2 +- tests/ui/const-generics/broken-mir-1.rs | 2 +- tests/ui/const-generics/broken-mir-2.rs | 2 +- tests/ui/const-generics/core-types.rs | 2 +- .../defaults/complex-unord-param.rs | 2 +- .../defaults/default-annotation.rs | 2 +- .../defaults/repr-c-issue-82792.rs | 2 +- .../const-generics/defaults/rp_impl_trait.rs | 2 +- .../defaults/simple-defaults.rs | 2 +- .../generic_arg_infer/dont-use-defaults.rs | 2 +- .../generic_const_exprs/associated-consts.rs | 2 +- .../generic_const_exprs/division.rs | 2 +- ...t-eagerly-error-in-is-const-evaluatable.rs | 2 +- .../generic_const_exprs/from-sig.rs | 2 +- .../generic_const_exprs/issue-73899.rs | 2 +- .../generic_const_exprs/issue-99647.rs | 2 +- .../generic_const_exprs/less_than.rs | 2 +- .../generic_const_exprs/unop.rs | 2 +- .../inhabited-assoc-ty-ice-1.rs | 2 +- .../inhabited-assoc-ty-ice-2.rs | 2 +- .../ui/const-generics/issues/issue-105037.rs | 2 +- tests/ui/const-generics/issues/issue-61432.rs | 2 +- ...sue-62187-encountered-polymorphic-const.rs | 2 +- .../issues/issue-69654-run-pass.rs | 4 +- .../issues/issue-69654-run-pass.stderr | 10 ---- .../ui/const-generics/issues/issue-70125-2.rs | 2 +- tests/ui/const-generics/issues/issue-75299.rs | 2 +- .../const-generics/mgca/array-expr-simple.rs | 2 +- .../mgca/array-expr-with-assoc-const.rs | 2 +- .../mgca/array-expr-with-macro.rs | 2 +- .../mgca/array-expr-with-struct.rs | 2 +- .../mgca/array-expr-with-tuple.rs | 2 +- .../mgca/assoc-const-projection-in-bound.rs | 2 +- .../min_const_generics/inferred_const.rs | 2 +- .../type_and_const_defaults.rs | 2 +- tests/ui/const-generics/transmute.rs | 2 +- .../transparent-maybeunit-array-wrapper.rs | 2 +- .../ui/const-generics/type-after-const-ok.rs | 2 +- tests/ui/const_prop/const-prop-ice3.rs | 2 +- .../bool-comparison-in-const-array-len.rs | 2 +- tests/ui/consts/check_const-feature-gated.rs | 2 +- .../const-block-non-item-statement-3.rs | 2 +- tests/ui/consts/const-byte-str-cast.rs | 2 +- .../ui/consts/const-eval/const_fn_ptr_fail.rs | 2 +- tests/ui/consts/const-eval/issue-64970.rs | 2 +- tests/ui/consts/const-expr-in-vec-repeat.rs | 2 +- tests/ui/consts/const-fn-const-eval.rs | 2 +- tests/ui/consts/const-index-feature-gate.rs | 2 +- tests/ui/consts/const-vec-syntax.rs | 2 +- tests/ui/consts/issue-13902.rs | 2 +- tests/ui/consts/issue-17756.rs | 2 +- tests/ui/consts/issue-29927-1.rs | 2 +- tests/ui/consts/issue-29927.rs | 2 +- tests/ui/consts/issue-37550.rs | 2 +- .../consts/issue-70773-mir-typeck-lt-norm.rs | 2 +- .../allow_const_fn_ptr_run_pass.rs | 2 +- tests/ui/consts/non-scalar-cast.rs | 2 +- tests/ui/consts/return-in-const-fn.rs | 2 +- tests/ui/coroutine/borrow-in-tail-expr.rs | 2 +- tests/ui/coroutine/issue-58888.rs | 2 +- tests/ui/coroutine/live-upvar-across-yield.rs | 2 +- tests/ui/coroutine/match-bindings.rs | 4 +- tests/ui/coroutine/match-bindings.stderr | 17 ------- tests/ui/coroutine/nested_coroutine.rs | 2 +- tests/ui/coroutine/other-attribute-on-gen.rs | 2 +- tests/ui/coroutine/reborrow-mut-upvar.rs | 4 +- tests/ui/coroutine/reborrow-mut-upvar.stderr | 18 ------- tests/ui/coroutine/yield-in-args-rev.rs | 4 +- tests/ui/coroutine/yield-in-args-rev.stderr | 15 ------ tests/ui/cross-crate/cross-crate-const-pat.rs | 2 +- .../cross-crate/cross-crate-map-usage-5521.rs | 2 +- .../cross-crate/static-array-across-crate.rs | 2 +- .../static-with-cross-crate-regions-8259.rs | 2 +- tests/ui/cross-crate/trait-lifetime-param.rs | 2 +- .../impl-copy-function-debuginfo-58463.rs | 2 +- .../ui/debuginfo/issue-105386-debuginfo-ub.rs | 2 +- .../delegation/generics/generics-aux-pass.rs | 2 +- .../generics/mapping/free-to-free-pass.rs | 2 +- .../generics/mapping/free-to-trait-pass.rs | 2 +- .../mapping/impl-trait-to-free-pass.rs | 2 +- .../mapping/impl-trait-to-trait-pass.rs | 2 +- .../mapping/inherent-impl-to-free-pass.rs | 2 +- .../mapping/inherent-impl-to-trait-pass.rs | 2 +- .../generics/mapping/trait-to-free-pass.rs | 2 +- .../generics/mapping/trait-to-trait-pass.rs | 2 +- .../deprecation/deprecated_main_function.rs | 2 +- tests/ui/derives/deriving-in-fn.rs | 2 +- tests/ui/drop/drop-on-ret.rs | 2 +- tests/ui/dropck/dropck-empty-array.rs | 2 +- tests/ui/dropck/dropck_fn_type.rs | 2 +- tests/ui/dropck/dropck_traits.rs | 2 +- .../ui/dropck/issue-24805-dropck-itemless.rs | 2 +- tests/ui/dropck/issue-29844.rs | 2 +- tests/ui/dst/dst-coercions.rs | 4 +- tests/ui/dst/dst-coercions.stderr | 12 ----- tests/ui/dst/dst-irrefutable-bind.rs | 2 +- tests/ui/dst/unsized-str-mutability.rs | 2 +- ...rait-and-polymorphic-objects-issue-8401.rs | 2 +- .../repr128-get-discriminant-issue-43398.rs | 2 +- tests/ui/enum/enum-size-variance.rs | 2 +- tests/ui/enum/enum-variants.rs | 2 +- .../ui/enum/enum-with-uninhabited-variant.rs | 2 +- tests/ui/enum/issue-19340-1.rs | 2 +- tests/ui/enum/issue-19340-2.rs | 2 +- tests/ui/enum/issue-42747.rs | 2 +- .../enum/match-either-enum-variants-6117.rs | 2 +- .../enum/namespaced-enum-emulate-flat-xc.rs | 2 +- .../namespaced-enum-glob-import-xcrate.rs | 2 +- tests/ui/enum/namespaced-enums-xcrate.rs | 2 +- tests/ui/enum/simple-enum-usage-8506.rs | 2 +- .../ui/enum/struct-like-variant-construct.rs | 2 +- ...zero-variant-enum-pattern-matching-3037.rs | 2 +- tests/ui/ergonomic-clones/closure/nested.rs | 2 +- tests/ui/explicit-tail-calls/indexer.rs | 2 +- tests/ui/expr/early-return-in-binop.rs | 2 +- tests/ui/expr/if-panic-all.rs | 2 +- tests/ui/expr/if/if-ret.rs | 4 +- tests/ui/expr/if/if-ret.stderr | 12 ----- tests/ui/expr/return-in-block-tuple.rs | 2 +- tests/ui/expr/scope.rs | 2 +- .../ui/extern/empty-struct-extern-fn-16441.rs | 2 +- tests/ui/extern/extern-1.rs | 2 +- tests/ui/extern/extern-foreign-crate.rs | 2 +- tests/ui/extern/extern-mod-abi.rs | 2 +- .../extern/extern-prelude-no-speculative.rs | 2 +- tests/ui/extern/extern-pub.rs | 2 +- tests/ui/extern/extern-rust.rs | 2 +- .../extern/extern-types-manual-sync-send.rs | 2 +- tests/ui/extern/extern-types-trait-impl.rs | 2 +- tests/ui/extern/issue-10025.rs | 2 +- tests/ui/extern/issue-10764-rpass.rs | 2 +- ...eature-gate-public_private_dependencies.rs | 2 +- .../feature-gate-trivial_bounds-lint.rs | 2 +- .../function-pointer-comparison-54696.rs | 2 +- .../expect-infer-supply-two-infers.rs | 2 +- .../closure-expected-type/issue-38714.rs | 2 +- .../closure_to_fn_coercion-expected-types.rs | 2 +- .../fn-bare-coerce-to-block.rs | 2 +- .../ui/functions-closures/fn-coerce-field.rs | 2 +- .../functions-closures/fn-item-type-coerce.rs | 2 +- tests/ui/functions-closures/fn-lval.rs | 2 +- tests/ui/functions-closures/fn-type-infer.rs | 2 +- .../implied-bounds-closure-arg-outlives.rs | 2 +- .../trivial-clone-closure.rs | 2 +- .../default-type-params-well-formedness.rs | 2 +- .../generics/empty-generic-brackets-equiv.rs | 4 +- .../empty-generic-brackets-equiv.stderr | 10 ---- ...eric-associated-type-deref-target-56237.rs | 2 +- tests/ui/generics/generic-fn-twice.rs | 2 +- tests/ui/generics/generic-ivec-leak.rs | 2 +- tests/ui/generics/generic-newtype-struct.rs | 2 +- tests/ui/generics/generic-recursive-tag.rs | 2 +- tests/ui/generics/generic-tag-corruption.rs | 2 +- tests/ui/generics/generic-tag-local.rs | 2 +- tests/ui/generics/generic-tag.rs | 2 +- tests/ui/generics/generic-type-synonym.rs | 2 +- tests/ui/generics/mid-path-type-params.rs | 2 +- .../hrtb-debruijn-object-types-in-closures.rs | 2 +- .../trait-bounds/hrtb-resolve-lifetime.rs | 2 +- tests/ui/hygiene/issue-15221.rs | 2 +- .../explicit-and-elided-same-header.rs | 2 +- tests/ui/impl-trait/issues/issue-36792.rs | 2 +- tests/ui/impl-trait/issues/issue-51185.rs | 2 +- .../imports/enum-variant-import-path-15774.rs | 2 +- tests/ui/imports/export-multi.rs | 2 +- .../ui/imports/global-path-resolution-drop.rs | 2 +- tests/ui/imports/import-from.rs | 2 +- tests/ui/imports/import-glob-1.rs | 2 +- tests/ui/imports/import-in-block.rs | 2 +- tests/ui/imports/import-prefix-macro.rs | 2 +- tests/ui/imports/import-trailing-comma.rs | 2 +- tests/ui/imports/imports.rs | 2 +- .../issue-26873-multifile.rs | 2 +- .../issue-26873-onefile.rs | 2 +- tests/ui/imports/issue-4865-1.rs | 2 +- tests/ui/imports/issue-4865-3.rs | 2 +- tests/ui/imports/reexport-star.rs | 2 +- .../use-declaration-no-path-segment-prefix.rs | 2 +- tests/ui/imports/use-mod.rs | 2 +- .../collection-type-copy-behavior-12909.rs | 2 +- tests/ui/issues/issue-23491.rs | 2 +- tests/ui/issues/issue-23898.rs | 2 +- tests/ui/issues/issue-24954.rs | 2 +- tests/ui/issues/issue-25279.rs | 2 +- tests/ui/issues/issue-26641.rs | 2 +- tests/ui/issues/issue-32292.rs | 2 +- tests/ui/issues/issue-36816.rs | 2 +- tests/ui/issues/issue-38556.rs | 2 +- tests/ui/issues/issue-41479.rs | 2 +- tests/ui/issues/issue-41604.rs | 2 +- tests/ui/issues/issue-4228.rs | 2 +- tests/ui/issues/issue-43910.rs | 2 +- tests/ui/issues/issue-43923.rs | 2 +- tests/ui/issues/issue-5315.rs | 2 +- .../raw-identifier-for-function-57198.rs | 2 +- .../label_break_value_desugared_break.rs | 2 +- tests/ui/layout/big-type-no-err.rs | 2 +- tests/ui/let-else/issue-99975.rs | 2 +- tests/ui/let-else/let-else-non-copy.rs | 2 +- tests/ui/let-else/let-else-temp-borrowck.rs | 2 +- tests/ui/lexer/lex-bare-cr-nondoc-comment.rs | 2 +- .../enum-lifetime-container-10228.rs | 2 +- tests/ui/lifetimes/issue-84604.rs | 2 +- ...-bound-lifetime-arguments-warning-72278.rs | 2 +- .../ref-pattern-lifetime-annotation-13665.rs | 2 +- .../trait-object-constructor-14821.rs | 2 +- tests/ui/lint/dead-code/associated-type.rs | 2 +- tests/ui/lint/dead-code/enum-variants.rs | 2 +- tests/ui/lint/issue-20343.rs | 2 +- ...orthand-field-patterns-in-pattern-macro.rs | 2 +- tests/ui/lint/lint-cap.rs | 2 +- .../lint-expr-stmt-attrs-for-early-lints.rs | 2 +- tests/ui/lint/must_not_suspend/generic.rs | 2 +- tests/ui/lint/must_not_suspend/handled.rs | 2 +- .../mutex-guard-dropped-before-await.rs | 2 +- tests/ui/lint/must_not_suspend/warn.rs | 2 +- tests/ui/lint/unused/issue-70041.rs | 4 +- tests/ui/lint/unused/issue-70041.stderr | 18 ------- .../unused/no-unused-parens-return-block.rs | 2 +- tests/ui/lint/unused/unused-trait-fn.rs | 4 +- tests/ui/lint/unused/unused-trait-fn.stderr | 12 ----- .../unused-parens-in-macro-issue-120642.rs | 2 +- .../liveness-assign-imm-local-after-ret.rs | 2 +- tests/ui/macros/edition-macro-pats.rs | 2 +- tests/ui/macros/html-literals.rs | 2 +- tests/ui/macros/issue-41803.rs | 2 +- ...log_syntax-trace_macros-macro-locations.rs | 2 +- tests/ui/macros/macro-nested_expr.rs | 2 +- tests/ui/macros/macro-quote-test.rs | 2 +- tests/ui/macros/macro-stability-rpass.rs | 2 +- ...o-variable-declaration-with-bounds-5554.rs | 2 +- tests/ui/match/issue-113012.rs | 2 +- tests/ui/match/issue-33498.rs | 2 +- tests/ui/match/match-nested-enum-box-3121.rs | 2 +- tests/ui/match/match-range-char-const.rs | 2 +- tests/ui/match/match-ref-option-pattern.rs | 2 +- tests/ui/match/match-usize-min-max-pattern.rs | 2 +- tests/ui/match/tuple-usize-pattern-14393.rs | 2 +- ...t-method-resolution-on-deref-type-53843.rs | 2 +- ...thod-argument-inference-associated-type.rs | 2 +- .../method-early-bound-lifetimes-on-self.rs | 2 +- .../method-normalize-bounds-issue-20604.rs | 2 +- .../methods/method-recursive-blanket-impl.rs | 4 +- .../method-recursive-blanket-impl.stderr | 10 ---- ...o-traits-distinguished-via-where-clause.rs | 4 +- ...aits-distinguished-via-where-clause.stderr | 10 ---- tests/ui/mir/mir_ascription_coercion.rs | 2 +- tests/ui/mir/mir_coercion_casts.rs | 2 +- tests/ui/mir/mir_small_agg_arg.rs | 2 +- tests/ui/mir/mir_void_return_2.rs | 2 +- tests/ui/modules/issue-13872.rs | 2 +- tests/ui/modules/mod-pub-access.rs | 2 +- tests/ui/modules/mod-same-item-names.rs | 2 +- tests/ui/modules/mod-view-items.rs | 2 +- .../modules/module-qualified-paths-basic.rs | 2 +- tests/ui/modules/module-super-access.rs | 2 +- tests/ui/modules/module-use-nested-groups.rs | 2 +- tests/ui/modules/nested-modules-basic.rs | 2 +- .../primitive-type-module-deprecated-paths.rs | 2 +- .../ui/modules/special_module_name_ignore.rs | 2 +- .../use-keyword-reexport-type-alias.rs | 2 +- tests/ui/moves/move-nullary-fn.rs | 2 +- tests/ui/nll/borrow-use-issue-46875.rs | 2 +- ...ead-local-static-mut-borrow-outlives-fn.rs | 2 +- .../nll/issue-45696-no-variant-box-recur.rs | 2 +- tests/ui/nll/issue-47153-generic-const.rs | 2 +- tests/ui/nll/issue-47589.rs | 2 +- tests/ui/nll/issue-48070.rs | 2 +- tests/ui/nll/issue-48623-closure.rs | 2 +- tests/ui/nll/issue-48623-coroutine.rs | 4 +- tests/ui/nll/issue-48623-coroutine.stderr | 11 ----- tests/ui/nll/issue-50343.rs | 2 +- .../ui/nll/issue-50461-used-mut-from-moves.rs | 2 +- tests/ui/nll/issue-52057.rs | 2 +- tests/ui/nll/issue-53123-raw-pointer-cast.rs | 2 +- tests/ui/nll/user-annotations/issue-55241.rs | 2 +- tests/ui/no_std/no-core-edition2018-syntax.rs | 2 +- tests/ui/non_modrs_mods/non_modrs_mods.rs | 2 +- .../float-int-invalid-const-cast.rs | 2 +- .../integer-literal-suffix-inference-2.rs | 2 +- .../integer-literal-suffix-inference.rs | 2 +- .../object-lifetime-default-from-rptr-box.rs | 2 +- ...bject-lifetime-default-from-rptr-struct.rs | 2 +- .../or-patterns-syntactic-pass-2021.rs | 2 +- tests/ui/overloaded/fixup-deref-mut.rs | 2 +- ...oaded_deref_with_ref_pattern_issue15609.rs | 2 +- tests/ui/packed/issue-46152.rs | 2 +- tests/ui/parser/doc-comment-parsing.rs | 2 +- .../integer-literal-method-call-underscore.rs | 2 +- tests/ui/parser/issues/issue-21475.rs | 2 +- tests/ui/parser/issues/issue-48508.rs | 2 +- tests/ui/parser/issues/issue-7222.rs | 2 +- tests/ui/parser/multiline-comments-basic.rs | 2 +- tests/ui/parser/nested-block-comments.rs | 2 +- ...n-matching-with-double-references-61475.rs | 2 +- .../ui/parser/reference-whitespace-parsing.rs | 2 +- tests/ui/parser/slowparse-bstring.rs | 2 +- tests/ui/parser/slowparse-string.rs | 2 +- tests/ui/parser/syntactic-trailing-commas.rs | 2 +- .../ui/parser/ufcs-return-unused-parens.fixed | 2 +- tests/ui/parser/ufcs-return-unused-parens.rs | 2 +- tests/ui/pattern/integer-range-binding.rs | 2 +- .../pattern/mut_preserve_binding_mode_2024.rs | 2 +- .../ui/pattern/usefulness/irrefutable-unit.rs | 2 +- tests/ui/privacy/privacy-ns.rs | 2 +- tests/ui/privacy/privacy-reexport.rs | 2 +- tests/ui/privacy/privacy1-rpass.rs | 2 +- tests/ui/privacy/private-method-rpass.rs | 2 +- tests/ui/privacy/pub-priv-dep/std-pub.rs | 2 +- .../pub-restricted-path-usage-55376.rs | 2 +- tests/ui/privacy/pub_use_mods_xcrate_exe.rs | 2 +- .../ptr_ops/ptr-swap-overlapping-regions.rs | 2 +- tests/ui/ptr_ops/raw-pointer-type-basic.rs | 2 +- ...olean-negation-in-unreachable-code-7344.rs | 2 +- .../diverging-expressions-unreachable-code.rs | 2 +- .../reachable-unnameable-type-alias.rs | 2 +- .../unreachable-code-diverging-expressions.rs | 2 +- .../future-stream-buffer-unordered-40003.rs | 2 +- tests/ui/recursion/instantiable.rs | 2 +- .../recursion-tail-call-no-arg-leak.rs | 2 +- tests/ui/recursion/recursive-enum-box.rs | 2 +- ...recursive-struct-with-raw-pointer-field.rs | 2 +- tests/ui/regions/issue-6157.rs | 2 +- .../regions-addr-of-interior-of-unique-box.rs | 2 +- .../regions-assoc-type-region-bound.rs | 2 +- .../regions-bound-lists-feature-gate-2.rs | 2 +- .../regions-bound-lists-feature-gate.rs | 2 +- tests/ui/regions/regions-creating-enums2.rs | 2 +- tests/ui/regions/regions-creating-enums5.rs | 2 +- .../ui/regions/regions-debruijn-of-object.rs | 2 +- tests/ui/regions/regions-dependent-autofn.rs | 2 +- .../ui/regions/regions-dependent-autoslice.rs | 2 +- tests/ui/regions/regions-dependent-let-ref.rs | 2 +- ...egions-early-bound-lifetime-in-assoc-fn.rs | 2 +- tests/ui/regions/regions-expl-self.rs | 2 +- tests/ui/regions/regions-fn-subtyping-2.rs | 2 +- tests/ui/regions/regions-fn-subtyping.rs | 2 +- .../regions-infer-reborrow-ref-mut-recurse.rs | 2 +- tests/ui/regions/regions-issue-21422.rs | 2 +- tests/ui/regions/regions-issue-22246.rs | 2 +- tests/ui/regions/regions-link-fn-args.rs | 2 +- tests/ui/regions/regions-lub-ref-ref-rc.rs | 2 +- tests/ui/regions/regions-mock-codegen.rs | 2 +- .../regions-no-bound-in-argument-cleanup.rs | 2 +- tests/ui/regions/regions-nullary-variant.rs | 2 +- .../regions-reassign-let-bound-pointer.rs | 2 +- .../regions-reassign-match-bound-pointer.rs | 2 +- .../ui/regions/regions-scope-chain-example.rs | 2 +- ...ariance-contravariant-use-contravariant.rs | 2 +- .../regions/wf-bound-region-in-object-type.rs | 2 +- .../ui/repr/packed-struct-with-enum-53728.rs | 2 +- tests/ui/resolve/blind-item-mixed-use-item.rs | 2 +- tests/ui/resolve/primitive-usage.rs | 2 +- .../resolve/reference-clone-nonclone-11820.rs | 2 +- tests/ui/resolve/resolve-pseudo-shadowing.rs | 2 +- .../resolve/struct-function-same-name-2445.rs | 2 +- .../resolve/struct-function-same-name-2550.rs | 2 +- .../resolve/type-param-local-var-shadowing.rs | 2 +- ...arly-return-with-unreachable-code-24353.rs | 2 +- tests/ui/return/return-nil.rs | 2 +- ...ty-array-allowed-without-eq-issue-62336.rs | 2 +- .../rfc1445/eq-allows-match-on-ty-in-macro.rs | 2 +- .../rfc1445/eq-allows-match.rs | 2 +- .../termination-trait-for-box-dyn-error-ok.rs | 2 +- .../termination-trait-for-empty.rs | 2 +- ...rmination-trait-for-result-box-error_ok.rs | 2 +- .../termination-trait-for-result.rs | 2 +- .../enum_same_crate.rs | 2 +- .../structs_same_crate.rs | 2 +- .../variants_same_crate.rs | 2 +- tests/ui/rfcs/rfc-2091-track-caller/pass.rs | 2 +- .../shim-does-not-modify-symbol.rs | 2 +- .../rfcs/rfc-2093-infer-outlives/privacy.rs | 2 +- .../if_let_guard_indirect_let_chains.rs | 2 +- tests/ui/rust-2018/uniform-paths/redundant.rs | 2 +- tests/ui/rustc-env/rust-log.rs | 2 +- tests/ui/shadowed/use-shadows-reexport.rs | 2 +- .../simd/intrinsic/inlining-issue67557-ice.rs | 2 +- tests/ui/simd/libm_std_can_float.rs | 2 +- ...e-generic-monomorphisation-power-of-two.rs | 2 +- tests/ui/sized/coinductive-2.rs | 4 +- tests/ui/sized/coinductive-2.stderr | 10 ---- tests/ui/sized/sized-box-unsized-content.rs | 2 +- tests/ui/sized/sized-reference-to-unsized.rs | 2 +- .../unused-warning-point-at-identifier.rs | 2 +- .../specialization/defaultimpl/projection.rs | 2 +- tests/ui/specialization/issue-50452.rs | 2 +- .../specialization-allowed-cross-crate.rs | 2 +- .../specialization-on-projection.rs | 2 +- .../specialization-projection-alias.rs | 2 +- .../specialization-projection.rs | 2 +- ...on-translate-projections-with-lifetimes.rs | 2 +- .../transmute-specialization.rs | 2 +- tests/ui/statics/check-recursion-foreign.rs | 2 +- .../conditional-static-declaration-16010.rs | 2 +- .../issue-17718-static-unsafe-interior.rs | 2 +- tests/ui/statics/static-fn-inline-xc.rs | 2 +- tests/ui/statics/static-fn-trait-xc.rs | 2 +- tests/ui/statics/static-methods-in-traits2.rs | 2 +- tests/ui/structs-enums/class-dtor.rs | 2 +- tests/ui/structs-enums/class-typarams.rs | 2 +- tests/ui/structs-enums/empty-struct-braces.rs | 2 +- .../structs-enums/enum-export-inheritance.rs | 2 +- .../ui/structs-enums/enum-vec-initializer.rs | 2 +- tests/ui/structs-enums/foreign-struct.rs | 2 +- tests/ui/structs-enums/issue-50731.rs | 2 +- .../structs-enums/nested-enum-same-names.rs | 2 +- .../structs-enums/simple-match-generic-tag.rs | 2 +- tests/ui/structs-enums/struct_variant_xc.rs | 2 +- tests/ui/structs-enums/tag-exports.rs | 2 +- tests/ui/structs/large-records.rs | 2 +- .../module-qualified-struct-destructure.rs | 2 +- tests/ui/structs/newtype-struct-with-dtor.rs | 2 +- tests/ui/structs/newtype-struct-xc-2.rs | 2 +- tests/ui/structs/newtype-struct-xc.rs | 2 +- tests/ui/structs/struct-literal-dtor.rs | 2 +- tests/ui/structs/unit-like-struct.rs | 2 +- .../dont-try-removing-the-field.rs | 5 +- .../dont-try-removing-the-field.stderr | 10 ---- .../struct-constructor-mangling.rs | 2 +- tests/ui/threads-sendsync/sendable-class.rs | 2 +- tests/ui/tool-attributes/tool_lints-rpass.rs | 2 +- .../tool_lints_2018_preview.rs | 2 +- tests/ui/traits/alias/basic.rs | 2 +- tests/ui/traits/alias/import.rs | 2 +- .../check-trait-object-bounds-2-ok.rs | 2 +- .../traits/astconv-cycle-between-and-type.rs | 2 +- tests/ui/traits/bound/basic.rs | 2 +- tests/ui/traits/bound/multiple.rs | 2 +- tests/ui/traits/bug-7295.rs | 2 +- tests/ui/traits/cache-issue-18209.rs | 2 +- tests/ui/traits/copy-trait-implicit-copy.rs | 2 +- .../core-marker-name-shadowing-issue-2284.rs | 2 +- tests/ui/traits/cycle-type-trait.rs | 2 +- tests/ui/traits/early-vtbl-resolution.rs | 2 +- .../traits/encoder-trait-bounds-regression.rs | 2 +- ...se-ambiguity-where-clause-builtin-bound.rs | 2 +- tests/ui/traits/final/dyn-compat.rs | 2 +- tests/ui/traits/fn-type-trait-impl-15444.rs | 2 +- .../generic-cow-inference-regression.rs | 2 +- tests/ui/traits/impl-2.rs | 2 +- tests/ui/traits/impl-implicit-trait.rs | 2 +- .../traits/impl-object-overlap-issue-23853.rs | 4 +- .../impl-object-overlap-issue-23853.stderr | 12 ----- tests/ui/traits/impl-trait-chain-14229.rs | 2 +- .../traits/infer-from-object-issue-26952.rs | 2 +- tests/ui/traits/inheritance/num.rs | 2 +- tests/ui/traits/inheritance/num1.rs | 2 +- tests/ui/traits/inheritance/num5.rs | 2 +- tests/ui/traits/issue-22019.rs | 2 +- tests/ui/traits/issue-22110.rs | 2 +- tests/ui/traits/issue-23003.rs | 2 +- tests/ui/traits/issue-33096.rs | 2 +- tests/ui/traits/issue-38033.rs | 4 +- tests/ui/traits/issue-38033.stderr | 13 ----- tests/ui/traits/issue-4107.rs | 2 +- tests/ui/traits/issue-43132.rs | 2 +- tests/ui/traits/issue-6128.rs | 4 +- tests/ui/traits/issue-6128.stderr | 14 ------ tests/ui/traits/item-inside-macro.rs | 2 +- ...nomorphized-callees-with-ty-params-3314.rs | 2 +- ...ispatch-conditional-impl-not-considered.rs | 4 +- ...tch-conditional-impl-not-considered.stderr | 10 ---- tests/ui/traits/mut-trait-in-struct-8249.rs | 2 +- .../negative-impls/negative-impls-basic.rs | 2 +- .../next-solver/dyn-any-dont-prefer-impl.rs | 2 +- ...rmalize-associated-type-in-where-clause.rs | 2 +- tests/ui/traits/object/auto-dedup.rs | 2 +- tests/ui/traits/pointee-deduction.rs | 2 +- tests/ui/traits/syntax-polarity.rs | 2 +- ...-implementation-for-primitive-type-5280.rs | 2 +- .../trait-implementation-restriction-5988.rs | 2 +- .../tryfrominterror-result-comparison.rs | 2 +- tests/ui/traits/where-clause-vs-impl.rs | 2 +- .../trivial-bounds-inconsistent-sized.rs | 2 +- .../type-inference/partial-type-hint-12909.rs | 2 +- tests/ui/type/mutually-recursive-types.rs | 2 +- tests/ui/type/unit-type-basic-usages.rs | 2 +- .../typeck/typeck-closure-to-unsafe-fn-ptr.rs | 2 +- tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs | 2 +- tests/ui/unboxed-closures/issue-18661.rs | 2 +- ...space-conflict-in-unboxed-closure-18685.rs | 2 +- .../unboxed-closures-direct-sugary-call.rs | 2 +- .../unboxed-closures-move-mutable.rs | 8 +-- .../unboxed-closures-move-mutable.stderr | 49 ------------------- .../unboxed-closures-prelude.rs | 2 +- .../unboxed-closures-static-call-fn-once.rs | 2 +- .../unboxed-closures-zero-args.rs | 2 +- ...inhabited-type-layout-computation-88150.rs | 2 +- .../uninhabited-unreachable-warning-149571.rs | 2 +- tests/ui/union/union-backcomp.rs | 2 +- tests/ui/union/union-macro.rs | 2 +- tests/ui/unsafe/new-unsafe-pointers.rs | 2 +- .../unsafe-fn-called-from-unsafe-blk.rs | 2 +- .../unsafe/unsafe-fn-called-from-unsafe-fn.rs | 2 +- tests/ui/unsized-locals/unsized-parameters.rs | 2 +- tests/ui/unsized/enum-struct-optimization.rs | 2 +- tests/ui/unsized/unsized.rs | 2 +- tests/ui/unsized/unsized2.rs | 2 +- tests/ui/where-clauses/issue-50825.rs | 2 +- .../where-clause-early-bound-lifetimes.rs | 4 +- .../where-clause-early-bound-lifetimes.stderr | 12 ----- .../where-clause-method-substituion-rpass.rs | 4 +- ...ere-clause-method-substituion-rpass.stderr | 12 ----- .../where-clause-region-outlives.rs | 2 +- .../where-clauses-cross-crate.rs | 2 +- .../where-clauses/where-clauses-lifetimes.rs | 2 +- .../ui/where-clauses/where-clauses-method.rs | 2 +- .../where-clauses-unboxed-closures.rs | 2 +- tests/ui/where-clauses/where-clauses.rs | 2 +- tests/ui/windows-subsystem/console.rs | 2 +- tests/ui/windows-subsystem/windows.rs | 2 +- 683 files changed, 682 insertions(+), 1088 deletions(-) delete mode 100644 tests/ui/associated-types/associated-types-nested-projections.stderr delete mode 100644 tests/ui/auto-traits/auto-traits.stderr delete mode 100644 tests/ui/cast/coercion-as-explicit-cast.stderr delete mode 100644 tests/ui/closures/issue-1460.stderr delete mode 100644 tests/ui/coercion/coerce-mut-trait-object-8248.stderr delete mode 100644 tests/ui/coercion/issue-14589.stderr delete mode 100644 tests/ui/coercion/method-return-trait-object-14399.stderr delete mode 100644 tests/ui/coercion/trait-object-coercion-distribution-9951.stderr delete mode 100644 tests/ui/const-generics/issues/issue-69654-run-pass.stderr delete mode 100644 tests/ui/coroutine/match-bindings.stderr delete mode 100644 tests/ui/coroutine/reborrow-mut-upvar.stderr delete mode 100644 tests/ui/coroutine/yield-in-args-rev.stderr delete mode 100644 tests/ui/dst/dst-coercions.stderr delete mode 100644 tests/ui/expr/if/if-ret.stderr delete mode 100644 tests/ui/generics/empty-generic-brackets-equiv.stderr delete mode 100644 tests/ui/lint/unused/issue-70041.stderr delete mode 100644 tests/ui/lint/unused/unused-trait-fn.stderr delete mode 100644 tests/ui/methods/method-recursive-blanket-impl.stderr delete mode 100644 tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr delete mode 100644 tests/ui/nll/issue-48623-coroutine.stderr delete mode 100644 tests/ui/sized/coinductive-2.stderr delete mode 100644 tests/ui/suggestions/dont-try-removing-the-field.stderr delete mode 100644 tests/ui/traits/impl-object-overlap-issue-23853.stderr delete mode 100644 tests/ui/traits/issue-38033.stderr delete mode 100644 tests/ui/traits/issue-6128.stderr delete mode 100644 tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr delete mode 100644 tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr delete mode 100644 tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr delete mode 100644 tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr diff --git a/tests/ui/abi/relocation_model_pic.rs b/tests/ui/abi/relocation_model_pic.rs index e15b47acf1094..f35c71d11dd26 100644 --- a/tests/ui/abi/relocation_model_pic.rs +++ b/tests/ui/abi/relocation_model_pic.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags: -C relocation-model=pic //@ needs-relocation-model-pic diff --git a/tests/ui/allocator/dyn-compatible.rs b/tests/ui/allocator/dyn-compatible.rs index 9d8235e58d929..5eaa599663e59 100644 --- a/tests/ui/allocator/dyn-compatible.rs +++ b/tests/ui/allocator/dyn-compatible.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that `Allocator` is dyn-compatible, this allows for polymorphic allocators diff --git a/tests/ui/array-slice-vec/array_const_index-2.rs b/tests/ui/array-slice-vec/array_const_index-2.rs index 8dcfc294aae53..3a8f2e70e74f8 100644 --- a/tests/ui/array-slice-vec/array_const_index-2.rs +++ b/tests/ui/array-slice-vec/array_const_index-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] fn main() { diff --git a/tests/ui/array-slice-vec/cast-in-array-size.rs b/tests/ui/array-slice-vec/cast-in-array-size.rs index 5276288f8199c..2dd8e38efb4a7 100644 --- a/tests/ui/array-slice-vec/cast-in-array-size.rs +++ b/tests/ui/array-slice-vec/cast-in-array-size.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // issues #10618 and #16382 diff --git a/tests/ui/array-slice-vec/copy-out-of-array-1.rs b/tests/ui/array-slice-vec/copy-out-of-array-1.rs index 894ca2f930277..ae0ad7ae057e4 100644 --- a/tests/ui/array-slice-vec/copy-out-of-array-1.rs +++ b/tests/ui/array-slice-vec/copy-out-of-array-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Ensure that we can copy out of a fixed-size array. // diff --git a/tests/ui/array-slice-vec/empty-mutable-vec.rs b/tests/ui/array-slice-vec/empty-mutable-vec.rs index 1785b1aa39e81..3e597de1aff0d 100644 --- a/tests/ui/array-slice-vec/empty-mutable-vec.rs +++ b/tests/ui/array-slice-vec/empty-mutable-vec.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_mut)] diff --git a/tests/ui/array-slice-vec/issue-15730.rs b/tests/ui/array-slice-vec/issue-15730.rs index 2a69417819d95..da4d3cc3af230 100644 --- a/tests/ui/array-slice-vec/issue-15730.rs +++ b/tests/ui/array-slice-vec/issue-15730.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/array-slice-vec/issue-18425.rs b/tests/ui/array-slice-vec/issue-18425.rs index e74a20de72662..f4dbd33b134f8 100644 --- a/tests/ui/array-slice-vec/issue-18425.rs +++ b/tests/ui/array-slice-vec/issue-18425.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Check that codegen doesn't ICE when codegenning an array repeat // expression with a count of 1 and a non-Copy element type. diff --git a/tests/ui/array-slice-vec/ivec-pass-by-value.rs b/tests/ui/array-slice-vec/ivec-pass-by-value.rs index 67657859408b0..04e5e80f3617e 100644 --- a/tests/ui/array-slice-vec/ivec-pass-by-value.rs +++ b/tests/ui/array-slice-vec/ivec-pass-by-value.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass fn f(_a: Vec ) { } pub fn main() { f(vec![1, 2, 3, 4, 5]); } diff --git a/tests/ui/array-slice-vec/mut-vstore-expr.rs b/tests/ui/array-slice-vec/mut-vstore-expr.rs index 9553aed9a00ea..fde6f1fee39ee 100644 --- a/tests/ui/array-slice-vec/mut-vstore-expr.rs +++ b/tests/ui/array-slice-vec/mut-vstore-expr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { let _x: &mut [isize] = &mut [ 1, 2, 3 ]; diff --git a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs index b62e294f9d1d6..e4d66946abe10 100644 --- a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs +++ b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs index 1f1fd4cd0d29c..c991846058eae 100644 --- a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs +++ b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { let _a = [0; 1 as usize]; } diff --git a/tests/ui/array-slice-vec/vector-no-ann-2.rs b/tests/ui/array-slice-vec/vector-no-ann-2.rs index 63828551af114..b03aea366f1b8 100644 --- a/tests/ui/array-slice-vec/vector-no-ann-2.rs +++ b/tests/ui/array-slice-vec/vector-no-ann-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { diff --git a/tests/ui/asm/empty_global_asm.rs b/tests/ui/asm/empty_global_asm.rs index 2517796ad107c..5d989b22cce5f 100644 --- a/tests/ui/asm/empty_global_asm.rs +++ b/tests/ui/asm/empty_global_asm.rs @@ -1,5 +1,5 @@ //@ needs-asm-support -//@ run-pass +//@ build-pass use std::arch::global_asm; diff --git a/tests/ui/asm/may_unwind.rs b/tests/ui/asm/may_unwind.rs index 0fef317a2cfd1..2e4b1252c4b1b 100644 --- a/tests/ui/asm/may_unwind.rs +++ b/tests/ui/asm/may_unwind.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ needs-asm-support //@ needs-unwind //@ ignore-backends: gcc diff --git a/tests/ui/associated-consts/associated-const-marks-live-code.rs b/tests/ui/associated-consts/associated-const-marks-live-code.rs index 123650cfd0b3c..21cd7026ba76a 100644 --- a/tests/ui/associated-consts/associated-const-marks-live-code.rs +++ b/tests/ui/associated-consts/associated-const-marks-live-code.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(dead_code)] diff --git a/tests/ui/associated-consts/mismatched_impl_ty_1.rs b/tests/ui/associated-consts/mismatched_impl_ty_1.rs index 55db10bd0e4a0..5cd8bedcd6f9f 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_1.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-consts/mismatched_impl_ty_2.rs b/tests/ui/associated-consts/mismatched_impl_ty_2.rs index c6cbc69503d88..b337ca5a81d79 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_2.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Trait { const ASSOC: fn(&'static u32); } diff --git a/tests/ui/associated-consts/mismatched_impl_ty_3.rs b/tests/ui/associated-consts/mismatched_impl_ty_3.rs index 7945441f1c9ec..ddffae8e326f0 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_3.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_3.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Trait { const ASSOC: for<'a, 'b> fn(&'a u32, &'b u32); } diff --git a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs index b82656945a256..dd06c2ded4c3e 100644 --- a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs +++ b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test equality constraints on associated types in a where clause. diff --git a/tests/ui/associated-types/associated-types-conditional-dispatch.rs b/tests/ui/associated-types/associated-types-conditional-dispatch.rs index 3ec835ccbc3ac..da7dbe200e10a 100644 --- a/tests/ui/associated-types/associated-types-conditional-dispatch.rs +++ b/tests/ui/associated-types/associated-types-conditional-dispatch.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that we evaluate projection predicates to winnow out // candidates during trait selection and method resolution (#20296). // If we don't properly winnow out candidates based on the output type diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs index 9bf7570534c50..c2c4f47280dc4 100644 --- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs +++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Check that we do not report ambiguities when equivalent predicates // (modulo bound lifetime names) appears in the environment diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs index 44c5634f4ef8a..73b13b61c9070 100644 --- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs +++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Check that we do not report ambiguities when the same predicate // appears in the environment twice. Issue #21965. diff --git a/tests/ui/associated-types/associated-types-eq-obj.rs b/tests/ui/associated-types/associated-types-eq-obj.rs index c1ca8bbd7393c..3a56441897401 100644 --- a/tests/ui/associated-types/associated-types-eq-obj.rs +++ b/tests/ui/associated-types/associated-types-eq-obj.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test equality constraints on associated types inside of an object type diff --git a/tests/ui/associated-types/associated-types-from-supertrait.rs b/tests/ui/associated-types/associated-types-from-supertrait.rs index d0d3878ed06ca..7351111e263a3 100644 --- a/tests/ui/associated-types/associated-types-from-supertrait.rs +++ b/tests/ui/associated-types/associated-types-from-supertrait.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Foo: Iterator {} trait Bar: Foo {} diff --git a/tests/ui/associated-types/associated-types-impl-redirect.rs b/tests/ui/associated-types/associated-types-impl-redirect.rs index 11812c7212bb6..5aeca62f81b72 100644 --- a/tests/ui/associated-types/associated-types-impl-redirect.rs +++ b/tests/ui/associated-types/associated-types-impl-redirect.rs @@ -1,5 +1,5 @@ //@ edition:2015 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-issue-21212.rs b/tests/ui/associated-types/associated-types-issue-21212.rs index 4d177b69bf891..fdb9581b1a642 100644 --- a/tests/ui/associated-types/associated-types-issue-21212.rs +++ b/tests/ui/associated-types/associated-types-issue-21212.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Regression test for #21212: an overflow occurred during trait // checking where normalizing `Self::Input` led to normalizing the diff --git a/tests/ui/associated-types/associated-types-method.rs b/tests/ui/associated-types/associated-types-method.rs index 63b2a925e9bbc..d28d2ba713886 100644 --- a/tests/ui/associated-types/associated-types-method.rs +++ b/tests/ui/associated-types/associated-types-method.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that methods whose impl-trait-ref contains associated types // are supported. diff --git a/tests/ui/associated-types/associated-types-nested-projections.rs b/tests/ui/associated-types/associated-types-nested-projections.rs index 659016b4644b7..909845ac2080d 100644 --- a/tests/ui/associated-types/associated-types-nested-projections.rs +++ b/tests/ui/associated-types/associated-types-nested-projections.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Test that we can resolve nested projection types. Issue #20666. @@ -12,7 +12,7 @@ impl<'a> Bound for &'a i32 {} trait IntoIterator { type Iter: Iterator; - fn into_iter(self) -> Self::Iter; //~ WARN method `into_iter` is never used + fn into_iter(self) -> Self::Iter; } impl<'a, T> IntoIterator for &'a [T; 3] { diff --git a/tests/ui/associated-types/associated-types-nested-projections.stderr b/tests/ui/associated-types/associated-types-nested-projections.stderr deleted file mode 100644 index e360d33763939..0000000000000 --- a/tests/ui/associated-types/associated-types-nested-projections.stderr +++ /dev/null @@ -1,13 +0,0 @@ -warning: method `into_iter` is never used - --> $DIR/associated-types-nested-projections.rs:15:8 - | -LL | trait IntoIterator { - | ------------ method in this trait -... -LL | fn into_iter(self) -> Self::Iter; - | ^^^^^^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs index a6e426df1c920..98c08656fb66a 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in a bound that // contains a binding. Issue #21664. diff --git a/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs b/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs index ab36240ed636d..3735a6da62cd2 100644 --- a/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs +++ b/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Regression test for issue #21010: Normalize associated types in // various special paths in the `type_is_immediate` function. diff --git a/tests/ui/associated-types/associated-types-projection-in-object-type.rs b/tests/ui/associated-types/associated-types-projection-in-object-type.rs index d5d7a294dfd79..0629caef10493 100644 --- a/tests/ui/associated-types/associated-types-projection-in-object-type.rs +++ b/tests/ui/associated-types/associated-types-projection-in-object-type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] // Corrected regression test for #20831. The original did not compile. diff --git a/tests/ui/associated-types/associated-types-ref-from-struct.rs b/tests/ui/associated-types/associated-types-ref-from-struct.rs index bdff76e86a3e2..60b629aefe038 100644 --- a/tests/ui/associated-types/associated-types-ref-from-struct.rs +++ b/tests/ui/associated-types/associated-types-ref-from-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test associated type references in structure fields. diff --git a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs index 7c556005f2d5c..5b765c13aa2d4 100644 --- a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs +++ b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] // Regression test for #20582. This test caused an ICE related to // inconsistent region erasure in codegen. diff --git a/tests/ui/associated-types/associated-types-sugar-path.rs b/tests/ui/associated-types/associated-types-sugar-path.rs index 7b57e4a0ea0f7..be8e7830a4526 100644 --- a/tests/ui/associated-types/associated-types-sugar-path.rs +++ b/tests/ui/associated-types/associated-types-sugar-path.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs b/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs index fd40438704420..f07e4feb23660 100644 --- a/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs @@ -1,5 +1,5 @@ //@ edition:2015 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] // Test how resolving a projection interacts with inference. In this diff --git a/tests/ui/associated-types/issue-22828.rs b/tests/ui/associated-types/issue-22828.rs index 5624b9c693b54..25204f2ecdf1c 100644 --- a/tests/ui/associated-types/issue-22828.rs +++ b/tests/ui/associated-types/issue-22828.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. diff --git a/tests/ui/associated-types/issue-23208.rs b/tests/ui/associated-types/issue-23208.rs index fabcffb5cf060..beb571c33c0eb 100644 --- a/tests/ui/associated-types/issue-23208.rs +++ b/tests/ui/associated-types/issue-23208.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait TheTrait : TheSuperTrait<::Item> { type Item; } diff --git a/tests/ui/associated-types/issue-25339.rs b/tests/ui/associated-types/issue-25339.rs index a18ddc2f20714..562a69d44202f 100644 --- a/tests/ui/associated-types/issue-25339.rs +++ b/tests/ui/associated-types/issue-25339.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-47139-1.rs b/tests/ui/associated-types/issue-47139-1.rs index 8c25ee118f6fb..d0c54e306c03b 100644 --- a/tests/ui/associated-types/issue-47139-1.rs +++ b/tests/ui/associated-types/issue-47139-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Regression test for issue #47139: // // Coherence was encountering an (unnecessary) overflow trying to diff --git a/tests/ui/associated-types/issue-47139-2.rs b/tests/ui/associated-types/issue-47139-2.rs index f99beee7f8f58..e1fb83ba3af2a 100644 --- a/tests/ui/associated-types/issue-47139-2.rs +++ b/tests/ui/associated-types/issue-47139-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Regression test for issue #47139: // // Same as issue-47139-1.rs, but the impls of dummy are in the diff --git a/tests/ui/associated-types/issue-54467.rs b/tests/ui/associated-types/issue-54467.rs index 87fb0caf1d5f1..541561a797199 100644 --- a/tests/ui/associated-types/issue-54467.rs +++ b/tests/ui/associated-types/issue-54467.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait Stream { type Item; diff --git a/tests/ui/async-await/async-drop/ex-ice-132103.rs b/tests/ui/async-await/async-drop/ex-ice-132103.rs index 5becd99d50658..09b0c3bf05338 100644 --- a/tests/ui/async-await/async-drop/ex-ice-132103.rs +++ b/tests/ui/async-await/async-drop/ex-ice-132103.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //! This test used to ICE: rust-lang/rust#132103 //! Fixed when re-work async drop to shim drop glue coroutine scheme. //@ compile-flags: -Zvalidate-mir -Zinline-mir=yes diff --git a/tests/ui/async-await/context-is-sorta-unwindsafe.rs b/tests/ui/async-await/context-is-sorta-unwindsafe.rs index 278476ea2379c..58aecb75fe180 100644 --- a/tests/ui/async-await/context-is-sorta-unwindsafe.rs +++ b/tests/ui/async-await/context-is-sorta-unwindsafe.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Tests against a regression surfaced by crater in https://github.com/rust-lang/rust/issues/125193 // Unwind Safety is not a very coherent concept, but we'd prefer no regressions until we kibosh it // and this is an unstable feature anyways sooo... diff --git a/tests/ui/async-await/interior-with-const-generic-expr.rs b/tests/ui/async-await/interior-with-const-generic-expr.rs index 22e1cea223812..a033055327834 100644 --- a/tests/ui/async-await/interior-with-const-generic-expr.rs +++ b/tests/ui/async-await/interior-with-const-generic-expr.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/async-await/issue-60709.rs b/tests/ui/async-await/issue-60709.rs index a3f54d70316c7..eae81037900da 100644 --- a/tests/ui/async-await/issue-60709.rs +++ b/tests/ui/async-await/issue-60709.rs @@ -3,7 +3,7 @@ //@ compile-flags: -Copt-level=z -Cdebuginfo=2 //@ edition: 2018 -//@ run-pass +//@ build-pass use std::future::Future; use std::task::Poll; diff --git a/tests/ui/async-await/issues/issue-54752-async-block.rs b/tests/ui/async-await/issues/issue-54752-async-block.rs index 164c1885da11c..6f37e122600bf 100644 --- a/tests/ui/async-await/issues/issue-54752-async-block.rs +++ b/tests/ui/async-await/issues/issue-54752-async-block.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ edition:2018 //@ pp-exact diff --git a/tests/ui/async-await/issues/issue-55809.rs b/tests/ui/async-await/issues/issue-55809.rs index 07661f4c263cf..e74374dec9680 100644 --- a/tests/ui/async-await/issues/issue-55809.rs +++ b/tests/ui/async-await/issues/issue-55809.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass trait Foo { } diff --git a/tests/ui/async-await/issues/issue-59972.rs b/tests/ui/async-await/issues/issue-59972.rs index e64a856fab30b..46ed4945cffa3 100644 --- a/tests/ui/async-await/issues/issue-59972.rs +++ b/tests/ui/async-await/issues/issue-59972.rs @@ -2,7 +2,7 @@ // types as entirely uninhabited, when they were in fact constructible. This // caused us to hit "unreachable" code (illegal instruction on x86). -//@ run-pass +//@ check-pass //@ compile-flags: -Aunused //@ edition: 2018 diff --git a/tests/ui/async-await/multiple-lifetimes/elided.rs b/tests/ui/async-await/multiple-lifetimes/elided.rs index 954695d0aa8fc..a48a1a162e0e9 100644 --- a/tests/ui/async-await/multiple-lifetimes/elided.rs +++ b/tests/ui/async-await/multiple-lifetimes/elided.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs index 5ff06b1c3c557..5759b547186f1 100644 --- a/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs +++ b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/named.rs b/tests/ui/async-await/multiple-lifetimes/named.rs index c933765c91037..7e050a912146a 100644 --- a/tests/ui/async-await/multiple-lifetimes/named.rs +++ b/tests/ui/async-await/multiple-lifetimes/named.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs index 8a82cc9e220e7..ebe66879f02ab 100644 --- a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs +++ b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass async fn lotsa_lifetimes<'a, 'b, 'c>(a: &'a u32, b: &'b u32, c: &'c u32) -> (&'a u32, &'b u32) where 'b: 'a diff --git a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs index 3c6b847caaf46..bb95faf287930 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass // Test member constraints that appear in the `impl Trait` // return type of an async function. diff --git a/tests/ui/attributes/crate-name-attr-validation.rs b/tests/ui/attributes/crate-name-attr-validation.rs index e27893c3d25b4..ef9cf058ce7fc 100644 --- a/tests/ui/attributes/crate-name-attr-validation.rs +++ b/tests/ui/attributes/crate-name-attr-validation.rs @@ -1,6 +1,6 @@ //! Checks proper validation of the `#![crate_name]` attribute. -//@ run-pass +//@ check-pass //@ compile-flags:--crate-name crate_name_attr_used -F unused-attributes diff --git a/tests/ui/attributes/inline-attribute-on-closure.rs b/tests/ui/attributes/inline-attribute-on-closure.rs index 981d58e11e466..a118af53706f8 100644 --- a/tests/ui/attributes/inline-attribute-on-closure.rs +++ b/tests/ui/attributes/inline-attribute-on-closure.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/49632 -//@ run-pass +//@ build-pass #![feature(stmt_expr_attributes)] pub fn main() { diff --git a/tests/ui/attributes/inline-main.rs b/tests/ui/attributes/inline-main.rs index 7181ee19b6711..1b1d0c9328c5d 100644 --- a/tests/ui/attributes/inline-main.rs +++ b/tests/ui/attributes/inline-main.rs @@ -1,6 +1,6 @@ //! Test that #[inline(always)] can be applied to main function -//@ run-pass +//@ check-pass #[inline(always)] fn main() {} diff --git a/tests/ui/attributes/log-backtrace.rs b/tests/ui/attributes/log-backtrace.rs index 9af1d318eb063..bf09565de3683 100644 --- a/tests/ui/attributes/log-backtrace.rs +++ b/tests/ui/attributes/log-backtrace.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // // This test makes sure that log-backtrace option at least parses correctly // diff --git a/tests/ui/auto-traits/auto-is-contextual.rs b/tests/ui/auto-traits/auto-is-contextual.rs index 2183a8c110c68..a311009f986d6 100644 --- a/tests/ui/auto-traits/auto-is-contextual.rs +++ b/tests/ui/auto-traits/auto-is-contextual.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/auto-traits/auto-traits-type-parameter.rs b/tests/ui/auto-traits/auto-traits-type-parameter.rs index 0c448f5899672..f2b17a82519fd 100644 --- a/tests/ui/auto-traits/auto-traits-type-parameter.rs +++ b/tests/ui/auto-traits/auto-traits-type-parameter.rs @@ -1,7 +1,7 @@ //! Checks how type parameters interact with auto-traits like `Send` and `Sync` with implicit //! bounds -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/auto-traits/auto-traits.rs b/tests/ui/auto-traits/auto-traits.rs index 22b210eb3fabd..0cd2e9a4d339b 100644 --- a/tests/ui/auto-traits/auto-traits.rs +++ b/tests/ui/auto-traits/auto-traits.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_doc_comments)] #![feature(auto_traits)] #![feature(negative_impls)] @@ -19,8 +19,8 @@ fn take_auto_unsafe(_: T) {} fn main() { // Parse inside functions. - auto trait AutoInner {} //~ WARN trait `AutoInner` is never used - unsafe auto trait AutoUnsafeInner {} //~ WARN trait `AutoUnsafeInner` is never used + auto trait AutoInner {} + unsafe auto trait AutoUnsafeInner {} take_auto(0); take_auto(AutoBool(true)); diff --git a/tests/ui/auto-traits/auto-traits.stderr b/tests/ui/auto-traits/auto-traits.stderr deleted file mode 100644 index 1ac1a9922001e..0000000000000 --- a/tests/ui/auto-traits/auto-traits.stderr +++ /dev/null @@ -1,16 +0,0 @@ -warning: trait `AutoInner` is never used - --> $DIR/auto-traits.rs:22:16 - | -LL | auto trait AutoInner {} - | ^^^^^^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: trait `AutoUnsafeInner` is never used - --> $DIR/auto-traits.rs:23:23 - | -LL | unsafe auto trait AutoUnsafeInner {} - | ^^^^^^^^^^^^^^^ - -warning: 2 warnings emitted - diff --git a/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs b/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs index 47e2072461e88..cfb4dc01f35dd 100644 --- a/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs +++ b/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Foo { fn f(&self); } diff --git a/tests/ui/autoref-autoderef/auto-ref.rs b/tests/ui/autoref-autoderef/auto-ref.rs index 1109a82b8d580..c4151b42f04d2 100644 --- a/tests/ui/autoref-autoderef/auto-ref.rs +++ b/tests/ui/autoref-autoderef/auto-ref.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Foo { x: isize, } diff --git a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs index d75a2ab8bdba4..c0d200840de53 100644 --- a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs +++ b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] struct Foo { diff --git a/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs index e16929bf48acc..b958af14a3fca 100644 --- a/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs +++ b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/36786 -//@ run-pass +//@ check-pass // Ensure that types that rely on obligations are autoderefed // correctly diff --git a/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs b/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs index 4d67c3a6733bd..ad5d30b3ee78f 100644 --- a/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs +++ b/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs @@ -2,7 +2,7 @@ //! implemented for `&[isize]` with a by-value receiver (`self`), relying on auto-dereferencing //! from `Vec` to `&[isize]` during method resolution. -//@ run-pass +//@ check-pass trait Foo { fn foo(self); diff --git a/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs index f471c1c7eefca..89506ebb01e0a 100644 --- a/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs +++ b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/13264 -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/bench/issue-32062.rs b/tests/ui/bench/issue-32062.rs index a7d1f8073d46b..bea7d8d89cb16 100644 --- a/tests/ui/bench/issue-32062.rs +++ b/tests/ui/bench/issue-32062.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { diff --git a/tests/ui/binding/expr-match-panic-all.rs b/tests/ui/binding/expr-match-panic-all.rs index 928f4d012b452..e6530f6635a5c 100644 --- a/tests/ui/binding/expr-match-panic-all.rs +++ b/tests/ui/binding/expr-match-panic-all.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass diff --git a/tests/ui/binding/inconsistent-lifetime-mismatch.rs b/tests/ui/binding/inconsistent-lifetime-mismatch.rs index 539f8f58a1d5e..efc5effc9dcc9 100644 --- a/tests/ui/binding/inconsistent-lifetime-mismatch.rs +++ b/tests/ui/binding/inconsistent-lifetime-mismatch.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] fn foo(_: &[&str]) {} diff --git a/tests/ui/binding/match-bot-2.rs b/tests/ui/binding/match-bot-2.rs index 014247417a6d9..a5a3db89aea8b 100644 --- a/tests/ui/binding/match-bot-2.rs +++ b/tests/ui/binding/match-bot-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unreachable_code)] // n.b. This was only ever failing with optimization disabled. diff --git a/tests/ui/binding/match-larger-const.rs b/tests/ui/binding/match-larger-const.rs index 4d9e587fdce40..5fc64b39dc242 100644 --- a/tests/ui/binding/match-larger-const.rs +++ b/tests/ui/binding/match-larger-const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[derive(Eq, PartialEq)] pub struct Data([u8; 4]); diff --git a/tests/ui/binding/match-naked-record-expr.rs b/tests/ui/binding/match-naked-record-expr.rs index 57697a73ca4b2..211865e5bbb78 100644 --- a/tests/ui/binding/match-naked-record-expr.rs +++ b/tests/ui/binding/match-naked-record-expr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct X { x: isize } diff --git a/tests/ui/binding/match-path.rs b/tests/ui/binding/match-path.rs index 1305ac7668ea6..a1f5a52766bdf 100644 --- a/tests/ui/binding/match-path.rs +++ b/tests/ui/binding/match-path.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-pattern-simple.rs b/tests/ui/binding/match-pattern-simple.rs index da22acd7f37f3..a7e907a5431be 100644 --- a/tests/ui/binding/match-pattern-simple.rs +++ b/tests/ui/binding/match-pattern-simple.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/binding/match-phi.rs b/tests/ui/binding/match-phi.rs index 128d4d618a096..6b9176308cb39 100644 --- a/tests/ui/binding/match-phi.rs +++ b/tests/ui/binding/match-phi.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-range-static.rs b/tests/ui/binding/match-range-static.rs index cf4d030b66fbe..d7722b1f2beda 100644 --- a/tests/ui/binding/match-range-static.rs +++ b/tests/ui/binding/match-range-static.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_upper_case_globals)] const s: isize = 1; diff --git a/tests/ui/binding/match-value-binding-in-guard-3291.rs b/tests/ui/binding/match-value-binding-in-guard-3291.rs index ca8c34628b71e..898bd2d51c927 100644 --- a/tests/ui/binding/match-value-binding-in-guard-3291.rs +++ b/tests/ui/binding/match-value-binding-in-guard-3291.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn foo(x: Option>, b: bool) -> isize { match x { diff --git a/tests/ui/binding/nil-pattern.rs b/tests/ui/binding/nil-pattern.rs index 68dbfe3b45316..d55049072bde2 100644 --- a/tests/ui/binding/nil-pattern.rs +++ b/tests/ui/binding/nil-pattern.rs @@ -1,3 +1,3 @@ -//@ run-pass +//@ check-pass pub fn main() { let x = (); match x { () => { } } } diff --git a/tests/ui/binding/optional_comma_in_match_arm.rs b/tests/ui/binding/optional_comma_in_match_arm.rs index 16fc72bbac0c0..d86ecaf21d412 100644 --- a/tests/ui/binding/optional_comma_in_match_arm.rs +++ b/tests/ui/binding/optional_comma_in_match_arm.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_unsafe)] #![allow(while_true)] diff --git a/tests/ui/binding/pat-tuple-5.rs b/tests/ui/binding/pat-tuple-5.rs index 928fc743417f2..6d1c322421435 100644 --- a/tests/ui/binding/pat-tuple-5.rs +++ b/tests/ui/binding/pat-tuple-5.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass fn tuple() { struct S; struct Z; diff --git a/tests/ui/binding/simple-generic-match.rs b/tests/ui/binding/simple-generic-match.rs index 001b469d35e3f..cb97cace976ea 100644 --- a/tests/ui/binding/simple-generic-match.rs +++ b/tests/ui/binding/simple-generic-match.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/underscore-prefixed-function-argument.rs b/tests/ui/binding/underscore-prefixed-function-argument.rs index e5b2ec1b5f005..a16c133ac6d81 100644 --- a/tests/ui/binding/underscore-prefixed-function-argument.rs +++ b/tests/ui/binding/underscore-prefixed-function-argument.rs @@ -1,6 +1,6 @@ //! Test that argument names starting with `_` are usable. -//@ run-pass +//@ check-pass fn good(_a: &isize) {} diff --git a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs index 47b79f3855f60..55992430f6225 100644 --- a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs +++ b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Tests equality between supertype and subtype of a function // See the issue #91636 diff --git a/tests/ui/binop/issue-25916.rs b/tests/ui/binop/issue-25916.rs index c6721fab71051..de06d4743d599 100644 --- a/tests/ui/binop/issue-25916.rs +++ b/tests/ui/binop/issue-25916.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_must_use)] fn main() { diff --git a/tests/ui/block-result/blocks-without-results-11709.rs b/tests/ui/block-result/blocks-without-results-11709.rs index 97ea6f9e19edc..7c4b65ec7f14f 100644 --- a/tests/ui/block-result/blocks-without-results-11709.rs +++ b/tests/ui/block-result/blocks-without-results-11709.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/11709 -//@ run-pass +//@ check-pass #![allow(dead_code)] // Don't panic on blocks without results diff --git a/tests/ui/borrowck/borrowck-assign-to-subfield.rs b/tests/ui/borrowck/borrowck-assign-to-subfield.rs index 8e5192611ffd9..f8e0c4293ebbd 100644 --- a/tests/ui/borrowck/borrowck-assign-to-subfield.rs +++ b/tests/ui/borrowck/borrowck-assign-to-subfield.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[allow(unused)] pub fn main() { diff --git a/tests/ui/borrowck/borrowck-box-sensitivity.rs b/tests/ui/borrowck/borrowck-box-sensitivity.rs index 421d6a53a17dd..a750410dd45df 100644 --- a/tests/ui/borrowck/borrowck-box-sensitivity.rs +++ b/tests/ui/borrowck/borrowck-box-sensitivity.rs @@ -1,7 +1,7 @@ // Test that `Box` is treated specially by borrow checking. This is the case // because NLL reverted the deicision in rust-lang/rfcs#130. -//@ run-pass +//@ check-pass struct A { x: Box, diff --git a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs index ec01db2948a28..94f6228624913 100644 --- a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs +++ b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs @@ -3,7 +3,7 @@ #![allow(unused_variables)] #![allow(dropping_references)] -//@ run-pass +//@ check-pass fn arr_by_ref(x: [String; 3]) { let r = &x; diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs index d200ef6d6f872..34a69d7990409 100644 --- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs +++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_mut)] #![allow(unused_variables)] #![allow(dropping_copy_types)] diff --git a/tests/ui/borrowck/borrowck-lend-args.rs b/tests/ui/borrowck/borrowck-lend-args.rs index 9d45730f196de..3428c75ab17a5 100644 --- a/tests/ui/borrowck/borrowck-lend-args.rs +++ b/tests/ui/borrowck/borrowck-lend-args.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/borrowck/borrowck-trait-lifetime.rs b/tests/ui/borrowck/borrowck-trait-lifetime.rs index 26d4cfb888754..31fc1c4c4524d 100644 --- a/tests/ui/borrowck/borrowck-trait-lifetime.rs +++ b/tests/ui/borrowck/borrowck-trait-lifetime.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] // This test verifies that casting from the same lifetime on a value // to the same lifetime on a trait succeeds. See issue #10766. diff --git a/tests/ui/borrowck/borrowck-uniq-via-ref.rs b/tests/ui/borrowck/borrowck-uniq-via-ref.rs index 67f908a0c076f..ea594e2325a8f 100644 --- a/tests/ui/borrowck/borrowck-uniq-via-ref.rs +++ b/tests/ui/borrowck/borrowck-uniq-via-ref.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs index 5bbac021504fa..77e5ab6a9043d 100644 --- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs +++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/borrowck/issue-46095.rs b/tests/ui/borrowck/issue-46095.rs index 52a814e96ebc3..2a701286ccfea 100644 --- a/tests/ui/borrowck/issue-46095.rs +++ b/tests/ui/borrowck/issue-46095.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct A; impl A { diff --git a/tests/ui/borrowck/region-checker-map-closure-13665.rs b/tests/ui/borrowck/region-checker-map-closure-13665.rs index 72efa42fe3835..ad9ab7a3a072c 100644 --- a/tests/ui/borrowck/region-checker-map-closure-13665.rs +++ b/tests/ui/borrowck/region-checker-map-closure-13665.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/13665 -//@ run-pass +//@ check-pass fn foo<'r>() { let maybe_value_ref: Option<&'r u8> = None; diff --git a/tests/ui/borrowck/rvalue-lifetime-match-equivalence-7660.rs b/tests/ui/borrowck/rvalue-lifetime-match-equivalence-7660.rs index 90526de14e758..2b35fad2329f2 100644 --- a/tests/ui/borrowck/rvalue-lifetime-match-equivalence-7660.rs +++ b/tests/ui/borrowck/rvalue-lifetime-match-equivalence-7660.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/7660 -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Regression test for issue 7660 // rvalue lifetime too short when equivalent `match` works diff --git a/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs b/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs index 921e7351c0fcd..79c110c9b9100 100644 --- a/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs +++ b/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { let mut a = 0; diff --git a/tests/ui/borrowck/two-phase-method-receivers.rs b/tests/ui/borrowck/two-phase-method-receivers.rs index 147b70d0cfbf4..7cbbf00d35f43 100644 --- a/tests/ui/borrowck/two-phase-method-receivers.rs +++ b/tests/ui/borrowck/two-phase-method-receivers.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Foo<'a> { x: &'a i32 diff --git a/tests/ui/box/alloc-unstable.rs b/tests/ui/box/alloc-unstable.rs index b8c8bc0c70af4..ad97b90528467 100644 --- a/tests/ui/box/alloc-unstable.rs +++ b/tests/ui/box/alloc-unstable.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(allocator_api)] fn main() { let _boxed: Box = Box::new(10); diff --git a/tests/ui/box/empty-alloc-deref-rvalue.rs b/tests/ui/box/empty-alloc-deref-rvalue.rs index 507a753467ac9..1a6c77a9b5763 100644 --- a/tests/ui/box/empty-alloc-deref-rvalue.rs +++ b/tests/ui/box/empty-alloc-deref-rvalue.rs @@ -3,7 +3,7 @@ //! Originally a regression test of github.com/rust-lang/rust/issues/13360 //! but repurposed for a smoke test. -//@ run-pass +//@ build-pass pub fn main() { let _: () = *Box::new(()); diff --git a/tests/ui/box/unit/unique-generic-assign.rs b/tests/ui/box/unit/unique-generic-assign.rs index 2c5cb0c1112a3..7af134903baa7 100644 --- a/tests/ui/box/unit/unique-generic-assign.rs +++ b/tests/ui/box/unit/unique-generic-assign.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Issue #976 diff --git a/tests/ui/box/unit/unique-object-move.rs b/tests/ui/box/unit/unique-object-move.rs index 6ed2b1dc401ce..a12b501932674 100644 --- a/tests/ui/box/unit/unique-object-move.rs +++ b/tests/ui/box/unit/unique-object-move.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] // Issue #5192 diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs index ea5d3bdcfdbe6..849076aec9c54 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Tests that even when a type parameter doesn't implement a required diff --git a/tests/ui/cast/as-cast-unifies-raw-pointer-and-fn-type.rs b/tests/ui/cast/as-cast-unifies-raw-pointer-and-fn-type.rs index ce4319b7cc6dd..b7d7b3e07f2df 100644 --- a/tests/ui/cast/as-cast-unifies-raw-pointer-and-fn-type.rs +++ b/tests/ui/cast/as-cast-unifies-raw-pointer-and-fn-type.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/23699 -//@ run-pass +//@ check-pass #![allow(unused_variables)] fn gimme_a_raw_pointer(_: *const T) { } diff --git a/tests/ui/cast/cast-region-to-uint.rs b/tests/ui/cast/cast-region-to-uint.rs index 6f4edadafee51..ba27b1d1f08fb 100644 --- a/tests/ui/cast/cast-region-to-uint.rs +++ b/tests/ui/cast/cast-region-to-uint.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass pub fn main() { let x: isize = 3; diff --git a/tests/ui/cast/cast-to-box-arr.rs b/tests/ui/cast/cast-to-box-arr.rs index 1a9004cd074ef..7b909de8a7169 100644 --- a/tests/ui/cast/cast-to-box-arr.rs +++ b/tests/ui/cast/cast-to-box-arr.rs @@ -1,5 +1,5 @@ //! regression test for -//@ run-pass +//@ build-pass fn main() { let x = Box::new([1, 2, 3]); let y = x as Box<[i32]>; diff --git a/tests/ui/cast/coercion-as-explicit-cast.rs b/tests/ui/cast/coercion-as-explicit-cast.rs index b99f5d93478cc..407580cd64aae 100644 --- a/tests/ui/cast/coercion-as-explicit-cast.rs +++ b/tests/ui/cast/coercion-as-explicit-cast.rs @@ -1,12 +1,12 @@ //! This test checks that various forms of "trivial" casts and coercions //! can be explicitly performed using the `as` keyword without compilation errors. -//@ run-pass +//@ check-pass #![allow(trivial_casts, trivial_numeric_casts)] trait Foo { - fn foo(&self) {} //~ WARN method `foo` is never used + fn foo(&self) {} } pub struct Bar; diff --git a/tests/ui/cast/coercion-as-explicit-cast.stderr b/tests/ui/cast/coercion-as-explicit-cast.stderr deleted file mode 100644 index 9553ddd656714..0000000000000 --- a/tests/ui/cast/coercion-as-explicit-cast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `foo` is never used - --> $DIR/coercion-as-explicit-cast.rs:9:8 - | -LL | trait Foo { - | --- method in this trait -LL | fn foo(&self) {} - | ^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/cast/constant-expression-cast-9942.rs b/tests/ui/cast/constant-expression-cast-9942.rs index d0a6f27b7e33c..06a86955da481 100644 --- a/tests/ui/cast/constant-expression-cast-9942.rs +++ b/tests/ui/cast/constant-expression-cast-9942.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/9942 -//@ run-pass +//@ build-pass pub fn main() { const S: usize = 23 as usize; [0; S]; () diff --git a/tests/ui/cast/generic-trait-object-call.rs b/tests/ui/cast/generic-trait-object-call.rs index a6703dfd8aa6c..d7819ac657c3b 100644 --- a/tests/ui/cast/generic-trait-object-call.rs +++ b/tests/ui/cast/generic-trait-object-call.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/2288 -//@ run-pass +//@ build-pass #![allow(non_camel_case_types)] trait clam { diff --git a/tests/ui/cast/owned-struct-to-trait-cast-6318.rs b/tests/ui/cast/owned-struct-to-trait-cast-6318.rs index 8cfc77c427400..eed1db9b6a010 100644 --- a/tests/ui/cast/owned-struct-to-trait-cast-6318.rs +++ b/tests/ui/cast/owned-struct-to-trait-cast-6318.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/6318 -//@ run-pass +//@ build-pass pub enum Thing { A(Box) diff --git a/tests/ui/cast/supported-cast.rs b/tests/ui/cast/supported-cast.rs index 4862d7a4125bb..cf3f590bb974b 100644 --- a/tests/ui/cast/supported-cast.rs +++ b/tests/ui/cast/supported-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass pub fn main() { let f = 1_usize as *const String; diff --git a/tests/ui/cfg/cfg-attr-cfg.rs b/tests/ui/cfg/cfg-attr-cfg.rs index 08b9374cfd7b9..f6c28c1c6885e 100644 --- a/tests/ui/cfg/cfg-attr-cfg.rs +++ b/tests/ui/cfg/cfg-attr-cfg.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // main is conditionally compiled, but the conditional compilation // is conditional too! diff --git a/tests/ui/cfg/cfg-attr-crate.rs b/tests/ui/cfg/cfg-attr-crate.rs index 44242a6a57d2a..f2faa01b7e738 100644 --- a/tests/ui/cfg/cfg-attr-crate.rs +++ b/tests/ui/cfg/cfg-attr-crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 diff --git a/tests/ui/cfg/cfg-false-use-item.rs b/tests/ui/cfg/cfg-false-use-item.rs index d907e17a0c11d..3045d20a593a3 100644 --- a/tests/ui/cfg/cfg-false-use-item.rs +++ b/tests/ui/cfg/cfg-false-use-item.rs @@ -1,6 +1,6 @@ //! Test that use items with cfg(false) are properly filtered out -//@ run-pass +//@ check-pass //@ reference: cfg.predicate.literal //@ reference: cfg.attr.effect diff --git a/tests/ui/cfg/cfg-in-crate-1.rs b/tests/ui/cfg/cfg-in-crate-1.rs index 4339ce004778b..544a3dbb13a59 100644 --- a/tests/ui/cfg/cfg-in-crate-1.rs +++ b/tests/ui/cfg/cfg-in-crate-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags: --cfg bar --check-cfg=cfg(bar) -D warnings #![cfg(bar)] diff --git a/tests/ui/cfg/cfg-match-arm.rs b/tests/ui/cfg/cfg-match-arm.rs index cb5bf0ab06539..47ed90497f00b 100644 --- a/tests/ui/cfg/cfg-match-arm.rs +++ b/tests/ui/cfg/cfg-match-arm.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/cfg/cfg-target-abi.rs b/tests/ui/cfg/cfg-target-abi.rs index b001071185171..3d913390136da 100644 --- a/tests/ui/cfg/cfg-target-abi.rs +++ b/tests/ui/cfg/cfg-target-abi.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ reference: cfg.target_abi.def //@ reference: cfg.target_abi.values diff --git a/tests/ui/cfg/cfg-target-compact.rs b/tests/ui/cfg/cfg-target-compact.rs index 7698b36333575..af0b6947b2a25 100644 --- a/tests/ui/cfg/cfg-target-compact.rs +++ b/tests/ui/cfg/cfg-target-compact.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(cfg_target_compact)] #[cfg(target(os = "linux", pointer_width = "64"))] diff --git a/tests/ui/cfg/cfg-target-vendor.rs b/tests/ui/cfg/cfg-target-vendor.rs index 04dfbdb064d0d..705b030c9ba67 100644 --- a/tests/ui/cfg/cfg-target-vendor.rs +++ b/tests/ui/cfg/cfg-target-vendor.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ reference: cfg.target_vendor.def //@ reference: cfg.target_vendor.values #[cfg(target_vendor = "unknown")] diff --git a/tests/ui/cfg/cfg_attr.rs b/tests/ui/cfg/cfg_attr.rs index 1fab79c5e1f22..e546fcc537107 100644 --- a/tests/ui/cfg/cfg_attr.rs +++ b/tests/ui/cfg/cfg_attr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags:--cfg set1 --cfg set2 //@ reference: cfg.cfg_attr.intro //@ reference: cfg.cfg_attr.syntax diff --git a/tests/ui/cfg/cfg_inner_static.rs b/tests/ui/cfg/cfg_inner_static.rs index 8d188b0aed73c..35f8bcc65fe26 100644 --- a/tests/ui/cfg/cfg_inner_static.rs +++ b/tests/ui/cfg/cfg_inner_static.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:cfg_inner_static.rs diff --git a/tests/ui/cfg/conditional-compilation-struct-11085.rs b/tests/ui/cfg/conditional-compilation-struct-11085.rs index 8fdc88be37d24..7373d15d28b61 100644 --- a/tests/ui/cfg/conditional-compilation-struct-11085.rs +++ b/tests/ui/cfg/conditional-compilation-struct-11085.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/11085 -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs index 0d57a50be530d..72a2e65cee8c8 100644 --- a/tests/ui/cfg/conditional-compile-arch.rs +++ b/tests/ui/cfg/conditional-compile-arch.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ reference: cfg.target_arch.def //@ reference: cfg.target_arch.values diff --git a/tests/ui/cfg/crt-static-off-works.rs b/tests/ui/cfg/crt-static-off-works.rs index 520d139915cc5..b01d66f231c0a 100644 --- a/tests/ui/cfg/crt-static-off-works.rs +++ b/tests/ui/cfg/crt-static-off-works.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags:-C target-feature=-crt-static -Z unstable-options //@ ignore-musl - requires changing the linker which is hard diff --git a/tests/ui/cfg/crt-static-on-works.rs b/tests/ui/cfg/crt-static-on-works.rs index 13b7d4bc51995..853656ffc7e03 100644 --- a/tests/ui/cfg/crt-static-on-works.rs +++ b/tests/ui/cfg/crt-static-on-works.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags:-C target-feature=+crt-static //@ only-msvc diff --git a/tests/ui/cfg/struct-field-empty.rs b/tests/ui/cfg/struct-field-empty.rs index eed69a0c03f0b..3ffc68c32492c 100644 --- a/tests/ui/cfg/struct-field-empty.rs +++ b/tests/ui/cfg/struct-field-empty.rs @@ -1,5 +1,5 @@ //! regression test for -//@ run-pass +//@ check-pass #![allow(unused_variables)] // `#[cfg]` on struct field permits empty unusable struct diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs index 671a4dbb0c77a..ad0c6f1236747 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs @@ -1,5 +1,5 @@ //@ edition:2021 -//@ run-pass +//@ check-pass // Tests that if a closure uses individual fields of the same object // then that case is handled properly. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs index 1fa272117e9b8..7c883f1cd2e49 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs @@ -1,5 +1,5 @@ //@ edition:2021 -//@ run-pass +//@ check-pass fn solve(validate: F) -> Option diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs index 3106908c621db..a8aff14ca0020 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs @@ -1,5 +1,5 @@ //@ edition:2021 -//@ run-pass +//@ check-pass // Test that we can mutate a place through a mut-borrow // that is captured by the closure diff --git a/tests/ui/closures/call-boxed-closure-no-args.rs b/tests/ui/closures/call-boxed-closure-no-args.rs index bf6b73ee6fd57..9f51bf7ac6d87 100644 --- a/tests/ui/closures/call-boxed-closure-no-args.rs +++ b/tests/ui/closures/call-boxed-closure-no-args.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/20575 -//@ run-pass +//@ check-pass // Test that overloaded calls work with zero arity closures diff --git a/tests/ui/closures/call-closure-through-lifetime-generic-struct.rs b/tests/ui/closures/call-closure-through-lifetime-generic-struct.rs index aa2180e3c7f09..b9082c667d50e 100644 --- a/tests/ui/closures/call-closure-through-lifetime-generic-struct.rs +++ b/tests/ui/closures/call-closure-through-lifetime-generic-struct.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/17816 -//@ run-pass +//@ check-pass #![allow(unused_variables)] use std::marker::PhantomData; diff --git a/tests/ui/closures/closure-with-fixed-size-array-param.rs b/tests/ui/closures/closure-with-fixed-size-array-param.rs index f12df2e5f628a..0b0673cb4c54e 100644 --- a/tests/ui/closures/closure-with-fixed-size-array-param.rs +++ b/tests/ui/closures/closure-with-fixed-size-array-param.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/28181 -//@ run-pass +//@ check-pass fn bar(f: F) -> usize where F: Fn([usize; 1]) -> usize { f([2]) } fn main() { diff --git a/tests/ui/closures/destructure-newtype-closure.rs b/tests/ui/closures/destructure-newtype-closure.rs index f8543e64cb353..826cc51343e53 100644 --- a/tests/ui/closures/destructure-newtype-closure.rs +++ b/tests/ui/closures/destructure-newtype-closure.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/20174 -//@ run-pass +//@ check-pass struct GradFn usize>(F); fn main() { diff --git a/tests/ui/closures/issue-1460.rs b/tests/ui/closures/issue-1460.rs index ceb030b92c8ff..4d6d22590195b 100644 --- a/tests/ui/closures/issue-1460.rs +++ b/tests/ui/closures/issue-1460.rs @@ -1,6 +1,6 @@ -//@ run-pass +//@ check-pass pub fn main() { - {|i: u32| if 1 == i { }}; //~ WARN unused closure that must be used + {|i: u32| if 1 == i { }}; } diff --git a/tests/ui/closures/issue-1460.stderr b/tests/ui/closures/issue-1460.stderr deleted file mode 100644 index 8d6851640f9c6..0000000000000 --- a/tests/ui/closures/issue-1460.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: unused closure that must be used - --> $DIR/issue-1460.rs:5:6 - | -LL | {|i: u32| if 1 == i { }}; - | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/closures/pass-lifetime-fn-to-generic-fnonce.rs b/tests/ui/closures/pass-lifetime-fn-to-generic-fnonce.rs index 2da3ac24eb5b0..59733c64c715e 100644 --- a/tests/ui/closures/pass-lifetime-fn-to-generic-fnonce.rs +++ b/tests/ui/closures/pass-lifetime-fn-to-generic-fnonce.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/19127 -//@ run-pass +//@ check-pass #![allow(unused_variables)] fn foo T>(f: F) {} diff --git a/tests/ui/closures/semistatement-in-lambda.rs b/tests/ui/closures/semistatement-in-lambda.rs index cfefa51b93ea7..ff0544ca827f1 100644 --- a/tests/ui/closures/semistatement-in-lambda.rs +++ b/tests/ui/closures/semistatement-in-lambda.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_must_use)] diff --git a/tests/ui/codegen/issue-55976.rs b/tests/ui/codegen/issue-55976.rs index e28d5ab114c7e..86cd5c9c7641c 100644 --- a/tests/ui/codegen/issue-55976.rs +++ b/tests/ui/codegen/issue-55976.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // ^-- The above is needed as this issue is related to LLVM/codegen. fn main() { diff --git a/tests/ui/codemap_tests/utf8-bom.rs b/tests/ui/codemap_tests/utf8-bom.rs index eb82f6652cb29..e3d7e13e4da3a 100644 --- a/tests/ui/codemap_tests/utf8-bom.rs +++ b/tests/ui/codemap_tests/utf8-bom.rs @@ -1,5 +1,5 @@ // This file has utf-8 BOM, it should be compiled normally without error. -//@ run-pass +//@ check-pass //@ reference: input.byte-order-mark pub fn main() {} diff --git a/tests/ui/coercion/any-trait-object-debug-12744.rs b/tests/ui/coercion/any-trait-object-debug-12744.rs index 4d981c077ee25..4b2350701a07e 100644 --- a/tests/ui/coercion/any-trait-object-debug-12744.rs +++ b/tests/ui/coercion/any-trait-object-debug-12744.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/12744 -//@ run-pass +//@ check-pass fn main() { fn test() -> Box { Box::new(1) } println!("{:?}", test()) diff --git a/tests/ui/coercion/basic-ptr-coercions.rs b/tests/ui/coercion/basic-ptr-coercions.rs index 4229d1fb2745f..6491fb17f3513 100644 --- a/tests/ui/coercion/basic-ptr-coercions.rs +++ b/tests/ui/coercion/basic-ptr-coercions.rs @@ -1,6 +1,6 @@ //! Tests basic pointer coercions -//@ run-pass +//@ build-pass pub fn main() { // &mut -> & diff --git a/tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs b/tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs index 39d4fa8457147..cac4995b31dd7 100644 --- a/tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs +++ b/tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/18539 -//@ run-pass +//@ build-pass // Test that coercing bare fn's that return a zero sized type to // a closure doesn't cause an LLVM ERROR diff --git a/tests/ui/coercion/coerce-expect-unsized.rs b/tests/ui/coercion/coerce-expect-unsized.rs index ebf723be724db..751cf9fe6e9e1 100644 --- a/tests/ui/coercion/coerce-expect-unsized.rs +++ b/tests/ui/coercion/coerce-expect-unsized.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_braces)] use std::cell::RefCell; diff --git a/tests/ui/coercion/coerce-many-with-ty-var.rs b/tests/ui/coercion/coerce-many-with-ty-var.rs index cbd16f58ea5b5..2cf8bab8c41b5 100644 --- a/tests/ui/coercion/coerce-many-with-ty-var.rs +++ b/tests/ui/coercion/coerce-many-with-ty-var.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Check that least upper bound coercions don't resolve type variable merely based on the first // coercion. Check issue #136420. diff --git a/tests/ui/coercion/coerce-mut-trait-object-8248.rs b/tests/ui/coercion/coerce-mut-trait-object-8248.rs index a45a4d94315f1..da02fae36696e 100644 --- a/tests/ui/coercion/coerce-mut-trait-object-8248.rs +++ b/tests/ui/coercion/coerce-mut-trait-object-8248.rs @@ -1,8 +1,8 @@ // https://github.com/rust-lang/rust/issues/8248 -//@ run-pass +//@ check-pass trait A { - fn dummy(&self) { } //~ WARN method `dummy` is never used + fn dummy(&self) { } } struct B; impl A for B {} diff --git a/tests/ui/coercion/coerce-mut-trait-object-8248.stderr b/tests/ui/coercion/coerce-mut-trait-object-8248.stderr deleted file mode 100644 index c3b35a7063cdb..0000000000000 --- a/tests/ui/coercion/coerce-mut-trait-object-8248.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/coerce-mut-trait-object-8248.rs:5:8 - | -LL | trait A { - | - method in this trait -LL | fn dummy(&self) { } - | ^^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coercion/coerce-overloaded-autoderef.rs b/tests/ui/coercion/coerce-overloaded-autoderef.rs index 03d0b0df5435d..fd0f77d3cc323 100644 --- a/tests/ui/coercion/coerce-overloaded-autoderef.rs +++ b/tests/ui/coercion/coerce-overloaded-autoderef.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_braces)] #![allow(dead_code)] diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs index f43b6dad71d32..ca31ab5b8791e 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] fn negate(x: &isize) -> isize { diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs index afcec17d55ba6..9d0385032ff34 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] fn sum(x: &[isize]) -> isize { diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs index 0367e384829dc..51eace30e0187 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs index b9479f6bdf835..335e69d06f7e4 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-unify-return.rs b/tests/ui/coercion/coerce-unify-return.rs index 54998a35382c4..194fb0541e671 100644 --- a/tests/ui/coercion/coerce-unify-return.rs +++ b/tests/ui/coercion/coerce-unify-return.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that coercions unify the expected return type of a polymorphic // function call, instead of leaving the type variables as they were. diff --git a/tests/ui/coercion/coerce-unify.rs b/tests/ui/coercion/coerce-unify.rs index ae4088535aa78..b869145e9c1ba 100644 --- a/tests/ui/coercion/coerce-unify.rs +++ b/tests/ui/coercion/coerce-unify.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that coercions can unify if-else, match arms and array elements. // Try to construct if-else chains, matches and arrays out of given expressions. diff --git a/tests/ui/coercion/coerce-unsize-subtype.rs b/tests/ui/coercion/coerce-unsize-subtype.rs index a3e762e4c5fa1..f01b80d82bd95 100644 --- a/tests/ui/coercion/coerce-unsize-subtype.rs +++ b/tests/ui/coercion/coerce-unsize-subtype.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/tests/ui/coercion/fn-item-to-dyn-any.rs b/tests/ui/coercion/fn-item-to-dyn-any.rs index 0e6e5aa5f89ce..de7ebd97bae56 100644 --- a/tests/ui/coercion/fn-item-to-dyn-any.rs +++ b/tests/ui/coercion/fn-item-to-dyn-any.rs @@ -1,5 +1,5 @@ //! Regression test for . -//@ run-pass +//@ check-pass use std::any::Any; diff --git a/tests/ui/coercion/issue-14589.rs b/tests/ui/coercion/issue-14589.rs index 1e99cc4f6a836..7addcf0281973 100644 --- a/tests/ui/coercion/issue-14589.rs +++ b/tests/ui/coercion/issue-14589.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // All 3 expressions should work in that the argument gets // coerced to a trait object @@ -18,6 +18,6 @@ impl Test { fn send(&self, _: T) {} } -trait Foo { fn dummy(&self) { }} //~ WARN method `dummy` is never used +trait Foo { fn dummy(&self) { }} struct Output(#[allow(dead_code)] isize); impl Foo for Output {} diff --git a/tests/ui/coercion/issue-14589.stderr b/tests/ui/coercion/issue-14589.stderr deleted file mode 100644 index b98444ab7e401..0000000000000 --- a/tests/ui/coercion/issue-14589.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/issue-14589.rs:21:16 - | -LL | trait Foo { fn dummy(&self) { }} - | --- ^^^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coercion/issue-26905-rpass.rs b/tests/ui/coercion/issue-26905-rpass.rs index 6ff3cbdaf99bf..41a5a8b47ba68 100644 --- a/tests/ui/coercion/issue-26905-rpass.rs +++ b/tests/ui/coercion/issue-26905-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(unsize, coerce_unsized)] // Verfies that PhantomData is ignored for DST coercions diff --git a/tests/ui/coercion/issue-3794.rs b/tests/ui/coercion/issue-3794.rs index f076035c3d5aa..1fe780ca26577 100644 --- a/tests/ui/coercion/issue-3794.rs +++ b/tests/ui/coercion/issue-3794.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] trait T { diff --git a/tests/ui/coercion/method-return-trait-object-14399.rs b/tests/ui/coercion/method-return-trait-object-14399.rs index 49eee152d889c..b6b338770e0b0 100644 --- a/tests/ui/coercion/method-return-trait-object-14399.rs +++ b/tests/ui/coercion/method-return-trait-object-14399.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/14399 -//@ run-pass +//@ check-pass // #14399 // We'd previously ICE if we had a method call whose return // value was coerced to a trait object. (v.clone() returns Box @@ -10,7 +10,7 @@ #[derive(Clone)] struct B1; -trait A { fn foo(&self) {} } //~ WARN method `foo` is never used +trait A { fn foo(&self) {} } impl A for B1 {} fn main() { diff --git a/tests/ui/coercion/method-return-trait-object-14399.stderr b/tests/ui/coercion/method-return-trait-object-14399.stderr deleted file mode 100644 index 283358cb77df7..0000000000000 --- a/tests/ui/coercion/method-return-trait-object-14399.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `foo` is never used - --> $DIR/method-return-trait-object-14399.rs:13:14 - | -LL | trait A { fn foo(&self) {} } - | - ^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coercion/trait-object-arrays-11205.rs b/tests/ui/coercion/trait-object-arrays-11205.rs index 45d69dce32389..46d6521a3793a 100644 --- a/tests/ui/coercion/trait-object-arrays-11205.rs +++ b/tests/ui/coercion/trait-object-arrays-11205.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/11205 -//@ run-pass +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/coercion/trait-object-coercion-distribution-9951.rs b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs index 526d65615101e..6f06743306ec7 100644 --- a/tests/ui/coercion/trait-object-coercion-distribution-9951.rs +++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs @@ -1,10 +1,10 @@ // https://github.com/rust-lang/rust/issues/9951 -//@ run-pass +//@ check-pass #![allow(unused_variables)] trait Bar { - fn noop(&self); //~ WARN method `noop` is never used + fn noop(&self); } impl Bar for u8 { fn noop(&self) {} diff --git a/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr deleted file mode 100644 index 04e05ed8d6be3..0000000000000 --- a/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `noop` is never used - --> $DIR/trait-object-coercion-distribution-9951.rs:7:6 - | -LL | trait Bar { - | --- method in this trait -LL | fn noop(&self); - | ^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coherence/coherence-impl-in-fn.rs b/tests/ui/coherence/coherence-impl-in-fn.rs index c391e87bf8d17..635576a00000e 100644 --- a/tests/ui/coherence/coherence-impl-in-fn.rs +++ b/tests/ui/coherence/coherence-impl-in-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs index 5935e972e49e8..5007313c5d6af 100644 --- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs +++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(negative_impls)] diff --git a/tests/ui/const-generics/array-wrapper-struct-ctor.rs b/tests/ui/const-generics/array-wrapper-struct-ctor.rs index b94773562e814..8785de28b52a6 100644 --- a/tests/ui/const-generics/array-wrapper-struct-ctor.rs +++ b/tests/ui/const-generics/array-wrapper-struct-ctor.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/associated-const-bindings/assoc-const.rs b/tests/ui/const-generics/associated-const-bindings/assoc-const.rs index 3f8353b6914d0..0bdc56367f0bd 100644 --- a/tests/ui/const-generics/associated-const-bindings/assoc-const.rs +++ b/tests/ui/const-generics/associated-const-bindings/assoc-const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(min_generic_const_args)] #![allow(unused, incomplete_features)] diff --git a/tests/ui/const-generics/broken-mir-1.rs b/tests/ui/const-generics/broken-mir-1.rs index 67b18994785f9..3b65735e3dda1 100644 --- a/tests/ui/const-generics/broken-mir-1.rs +++ b/tests/ui/const-generics/broken-mir-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait Foo { fn foo(&self); } diff --git a/tests/ui/const-generics/broken-mir-2.rs b/tests/ui/const-generics/broken-mir-2.rs index 46a714f1883bf..f7c23f73ff20b 100644 --- a/tests/ui/const-generics/broken-mir-2.rs +++ b/tests/ui/const-generics/broken-mir-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/core-types.rs b/tests/ui/const-generics/core-types.rs index 03b3bc172b039..aa3d657950e10 100644 --- a/tests/ui/const-generics/core-types.rs +++ b/tests/ui/const-generics/core-types.rs @@ -1,5 +1,5 @@ // Check that all types allowed with `min_const_generics` work. -//@ run-pass +//@ check-pass //@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] diff --git a/tests/ui/const-generics/defaults/complex-unord-param.rs b/tests/ui/const-generics/defaults/complex-unord-param.rs index 5783fc415571a..cb6b7548b53c5 100644 --- a/tests/ui/const-generics/defaults/complex-unord-param.rs +++ b/tests/ui/const-generics/defaults/complex-unord-param.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Checks a complicated usage of unordered params #![allow(dead_code)] diff --git a/tests/ui/const-generics/defaults/default-annotation.rs b/tests/ui/const-generics/defaults/default-annotation.rs index fbb30d43a67fd..bed49f231c121 100644 --- a/tests/ui/const-generics/defaults/default-annotation.rs +++ b/tests/ui/const-generics/defaults/default-annotation.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(staged_api)] #![allow(incomplete_features)] // FIXME(const_generics_defaults): It seems like we aren't testing the right thing here, diff --git a/tests/ui/const-generics/defaults/repr-c-issue-82792.rs b/tests/ui/const-generics/defaults/repr-c-issue-82792.rs index c23187598bceb..e97c538feca1b 100644 --- a/tests/ui/const-generics/defaults/repr-c-issue-82792.rs +++ b/tests/ui/const-generics/defaults/repr-c-issue-82792.rs @@ -1,6 +1,6 @@ // Regression test for #82792. -//@ run-pass +//@ check-pass #[repr(C)] pub struct Loaf { diff --git a/tests/ui/const-generics/defaults/rp_impl_trait.rs b/tests/ui/const-generics/defaults/rp_impl_trait.rs index 406efbd0f8819..0389f720416a8 100644 --- a/tests/ui/const-generics/defaults/rp_impl_trait.rs +++ b/tests/ui/const-generics/defaults/rp_impl_trait.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass struct Uwu; trait Trait {} diff --git a/tests/ui/const-generics/defaults/simple-defaults.rs b/tests/ui/const-generics/defaults/simple-defaults.rs index ecc8cad2684cd..0642af409e1f7 100644 --- a/tests/ui/const-generics/defaults/simple-defaults.rs +++ b/tests/ui/const-generics/defaults/simple-defaults.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Checks that type param defaults are allowed after const params. #![allow(dead_code)] diff --git a/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs b/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs index d4a1468c04965..504bd5ee7727c 100644 --- a/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs +++ b/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass struct Foo; impl Foo { diff --git a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs index 5d2198f50ad92..b7c5357cd1cd3 100644 --- a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/division.rs b/tests/ui/const-generics/generic_const_exprs/division.rs index b6b5750a48f46..646046d211084 100644 --- a/tests/ui/const-generics/generic_const_exprs/division.rs +++ b/tests/ui/const-generics/generic_const_exprs/division.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs index 5290d24fc2d8e..4205dec171691 100644 --- a/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig.rs b/tests/ui/const-generics/generic_const_exprs/from-sig.rs index 74942041f680a..c3c76ece6ed3e 100644 --- a/tests/ui/const-generics/generic_const_exprs/from-sig.rs +++ b/tests/ui/const-generics/generic_const_exprs/from-sig.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-73899.rs b/tests/ui/const-generics/generic_const_exprs/issue-73899.rs index 61550c03ec6ad..4392e992d5c53 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-73899.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-73899.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-99647.rs b/tests/ui/const-generics/generic_const_exprs/issue-99647.rs index a6b5eb15d6c1b..335b9cf46dace 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-99647.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-99647.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/less_than.rs b/tests/ui/const-generics/generic_const_exprs/less_than.rs index 07dfe7d9687dc..f3e6e8852bc97 100644 --- a/tests/ui/const-generics/generic_const_exprs/less_than.rs +++ b/tests/ui/const-generics/generic_const_exprs/less_than.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unop.rs b/tests/ui/const-generics/generic_const_exprs/unop.rs index c8eb3deba6075..4455d6e2f19e9 100644 --- a/tests/ui/const-generics/generic_const_exprs/unop.rs +++ b/tests/ui/const-generics/generic_const_exprs/unop.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs index a5f515f5ea228..bbfccbd84ed72 100644 --- a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs +++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs index 3613deb9cd736..fac039e03595f 100644 --- a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs +++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-105037.rs b/tests/ui/const-generics/issues/issue-105037.rs index 65c8cfe8103d0..9fa0ff918ff3c 100644 --- a/tests/ui/const-generics/issues/issue-105037.rs +++ b/tests/ui/const-generics/issues/issue-105037.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/issues/issue-61432.rs b/tests/ui/const-generics/issues/issue-61432.rs index 329bf24922e6b..5f11927cc833a 100644 --- a/tests/ui/const-generics/issues/issue-61432.rs +++ b/tests/ui/const-generics/issues/issue-61432.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn promote() { let _ = &N; diff --git a/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs b/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs index 778e4a31d15f6..500d2d42d67ed 100644 --- a/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs +++ b/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait BitLen: Sized { const BIT_LEN: usize; } diff --git a/tests/ui/const-generics/issues/issue-69654-run-pass.rs b/tests/ui/const-generics/issues/issue-69654-run-pass.rs index bd8f1fcddb82e..1bda9412bddad 100644 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.rs +++ b/tests/ui/const-generics/issues/issue-69654-run-pass.rs @@ -1,5 +1,5 @@ -//@ run-pass -trait Bar {} //~ WARN trait `Bar` is never used +//@ build-pass +trait Bar {} impl Bar for [u8; 7] {} struct Foo {} diff --git a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr b/tests/ui/const-generics/issues/issue-69654-run-pass.stderr deleted file mode 100644 index abde9a95f89ba..0000000000000 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `Bar` is never used - --> $DIR/issue-69654-run-pass.rs:2:7 - | -LL | trait Bar {} - | ^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/const-generics/issues/issue-70125-2.rs b/tests/ui/const-generics/issues/issue-70125-2.rs index ec53c538ea23d..89642b26414b3 100644 --- a/tests/ui/const-generics/issues/issue-70125-2.rs +++ b/tests/ui/const-generics/issues/issue-70125-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { <()>::foo(); } diff --git a/tests/ui/const-generics/issues/issue-75299.rs b/tests/ui/const-generics/issues/issue-75299.rs index 2c48dc7120772..8cc873a8efa45 100644 --- a/tests/ui/const-generics/issues/issue-75299.rs +++ b/tests/ui/const-generics/issues/issue-75299.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=4 -//@ run-pass +//@ build-pass fn main() { fn foo() -> [u8; N] { [0; N] diff --git a/tests/ui/const-generics/mgca/array-expr-simple.rs b/tests/ui/const-generics/mgca/array-expr-simple.rs index 44feeccb4f9f2..c8f82db2098a3 100644 --- a/tests/ui/const-generics/mgca/array-expr-simple.rs +++ b/tests/ui/const-generics/mgca/array-expr-simple.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![expect(incomplete_features)] #![feature(min_generic_const_args, adt_const_params)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs b/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs index 7401181962bb8..825f101c18f18 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![expect(incomplete_features)] #![feature(min_generic_const_args, adt_const_params)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-macro.rs b/tests/ui/const-generics/mgca/array-expr-with-macro.rs index aef5acc1c8030..e42307cc29442 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-macro.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![expect(incomplete_features)] #![feature(min_generic_const_args, adt_const_params)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-struct.rs b/tests/ui/const-generics/mgca/array-expr-with-struct.rs index 883af57e918e3..753b1c7b74f57 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-struct.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(min_generic_const_args, adt_const_params)] #![expect(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-tuple.rs b/tests/ui/const-generics/mgca/array-expr-with-tuple.rs index 004663dcefaba..d27356b140eef 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-tuple.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-tuple.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(min_generic_const_args, adt_const_params, unsized_const_params)] #![expect(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs b/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs index 13b2e031b118b..588ad3d13be82 100644 --- a/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs +++ b/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs @@ -1,5 +1,5 @@ //! regression test for -//@ run-pass +//@ check-pass #![expect(incomplete_features)] #![feature(min_generic_const_args)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/min_const_generics/inferred_const.rs b/tests/ui/const-generics/min_const_generics/inferred_const.rs index 4a4fb417ab1dd..d8cdbe115d270 100644 --- a/tests/ui/const-generics/min_const_generics/inferred_const.rs +++ b/tests/ui/const-generics/min_const_generics/inferred_const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass fn foo(_data: [u32; N]) -> [u32; K] { [0; K] diff --git a/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs b/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs index 9f8f63eb905d5..1c65b2b06d120 100644 --- a/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs +++ b/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] struct Both { diff --git a/tests/ui/const-generics/transmute.rs b/tests/ui/const-generics/transmute.rs index 6108139f3ce5c..b4f0f80f75f17 100644 --- a/tests/ui/const-generics/transmute.rs +++ b/tests/ui/const-generics/transmute.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs b/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs index 419d605d0c875..4fae15723ecb3 100644 --- a/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs +++ b/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] diff --git a/tests/ui/const-generics/type-after-const-ok.rs b/tests/ui/const-generics/type-after-const-ok.rs index 0a336e9a14a51..c0fbeba818a99 100644 --- a/tests/ui/const-generics/type-after-const-ok.rs +++ b/tests/ui/const-generics/type-after-const-ok.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Verifies that having generic parameters after constants is permitted #[allow(dead_code)] struct A(T); diff --git a/tests/ui/const_prop/const-prop-ice3.rs b/tests/ui/const_prop/const-prop-ice3.rs index 34b662922ae6e..9dcf5b9759af1 100644 --- a/tests/ui/const_prop/const-prop-ice3.rs +++ b/tests/ui/const_prop/const-prop-ice3.rs @@ -1,4 +1,4 @@ -//@ run-pass (ensure that const-prop is run) +//@ build-pass (ensure that const-prop is run) struct A(T); diff --git a/tests/ui/consts/bool-comparison-in-const-array-len.rs b/tests/ui/consts/bool-comparison-in-const-array-len.rs index 028ec16a21c66..7e226d7ecd698 100644 --- a/tests/ui/consts/bool-comparison-in-const-array-len.rs +++ b/tests/ui/consts/bool-comparison-in-const-array-len.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/39548 -//@ run-pass +//@ check-pass type Array = [(); ((1 < 2) == false) as usize]; fn main() { diff --git a/tests/ui/consts/check_const-feature-gated.rs b/tests/ui/consts/check_const-feature-gated.rs index ef6c50ff50763..fdfb0525b2921 100644 --- a/tests/ui/consts/check_const-feature-gated.rs +++ b/tests/ui/consts/check_const-feature-gated.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass const ARR: [usize; 1] = [2]; diff --git a/tests/ui/consts/const-block-non-item-statement-3.rs b/tests/ui/consts/const-block-non-item-statement-3.rs index ba77e721c7f77..e29043bdf7fd3 100644 --- a/tests/ui/consts/const-block-non-item-statement-3.rs +++ b/tests/ui/consts/const-block-non-item-statement-3.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code, unused)] type Array = [u32; { let x = 2; 5 }]; diff --git a/tests/ui/consts/const-byte-str-cast.rs b/tests/ui/consts/const-byte-str-cast.rs index c739e01a37a69..1a53d9e27bf0b 100644 --- a/tests/ui/consts/const-byte-str-cast.rs +++ b/tests/ui/consts/const-byte-str-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[deny(warnings)] pub fn main() { diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail.rs b/tests/ui/consts/const-eval/const_fn_ptr_fail.rs index 00bf0ed0eba06..0ca3fca2b8114 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr_fail.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr_fail.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags: -Zunleash-the-miri-inside-of-you #![allow(unused)] diff --git a/tests/ui/consts/const-eval/issue-64970.rs b/tests/ui/consts/const-eval/issue-64970.rs index c7be311ce6bd7..6bcd5f8bc80db 100644 --- a/tests/ui/consts/const-eval/issue-64970.rs +++ b/tests/ui/consts/const-eval/issue-64970.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { foo(10); diff --git a/tests/ui/consts/const-expr-in-vec-repeat.rs b/tests/ui/consts/const-expr-in-vec-repeat.rs index e270d4c1eb3c1..73204bacac463 100644 --- a/tests/ui/consts/const-expr-in-vec-repeat.rs +++ b/tests/ui/consts/const-expr-in-vec-repeat.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that constant expressions can be used in vec repeat syntax. diff --git a/tests/ui/consts/const-fn-const-eval.rs b/tests/ui/consts/const-fn-const-eval.rs index 25abca0fb43d2..e45db74c883b8 100644 --- a/tests/ui/consts/const-fn-const-eval.rs +++ b/tests/ui/consts/const-fn-const-eval.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] const fn add(x: usize, y: usize) -> usize { diff --git a/tests/ui/consts/const-index-feature-gate.rs b/tests/ui/consts/const-index-feature-gate.rs index d13a0b00d8079..d002a96d7561c 100644 --- a/tests/ui/consts/const-index-feature-gate.rs +++ b/tests/ui/consts/const-index-feature-gate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] const ARR: [usize; 1] = [2]; const ARR2: [i32; ARR[0]] = [5, 6]; diff --git a/tests/ui/consts/const-vec-syntax.rs b/tests/ui/consts/const-vec-syntax.rs index d305d45a8cdaa..5918da4bfb245 100644 --- a/tests/ui/consts/const-vec-syntax.rs +++ b/tests/ui/consts/const-vec-syntax.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn f(_: &[isize]) {} diff --git a/tests/ui/consts/issue-13902.rs b/tests/ui/consts/issue-13902.rs index b14f36dd218d8..b2cffe8cac169 100644 --- a/tests/ui/consts/issue-13902.rs +++ b/tests/ui/consts/issue-13902.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/consts/issue-17756.rs b/tests/ui/consts/issue-17756.rs index 8a419e8046da5..3bdde288d09ad 100644 --- a/tests/ui/consts/issue-17756.rs +++ b/tests/ui/consts/issue-17756.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-29927-1.rs b/tests/ui/consts/issue-29927-1.rs index 544737765bb7c..90c6692b953a4 100644 --- a/tests/ui/consts/issue-29927-1.rs +++ b/tests/ui/consts/issue-29927-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] const fn f() -> usize { 5 diff --git a/tests/ui/consts/issue-29927.rs b/tests/ui/consts/issue-29927.rs index bda5138fcd280..02953b6359cb2 100644 --- a/tests/ui/consts/issue-29927.rs +++ b/tests/ui/consts/issue-29927.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] struct A { field: usize, diff --git a/tests/ui/consts/issue-37550.rs b/tests/ui/consts/issue-37550.rs index 332e5db7a0f2e..f0f2da46f061a 100644 --- a/tests/ui/consts/issue-37550.rs +++ b/tests/ui/consts/issue-37550.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs index 97462a705d5d9..bda7741b83d5b 100644 --- a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs +++ b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass const HASH_LEN: usize = 20; struct Hash(#[allow(dead_code)] [u8; HASH_LEN]); diff --git a/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs b/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs index fe92787aec11b..75b200f477b9b 100644 --- a/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs +++ b/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(rustc_attrs, staged_api)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/ui/consts/non-scalar-cast.rs b/tests/ui/consts/non-scalar-cast.rs index fa0f63d8aca84..346dddfd2425a 100644 --- a/tests/ui/consts/non-scalar-cast.rs +++ b/tests/ui/consts/non-scalar-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/37448 diff --git a/tests/ui/consts/return-in-const-fn.rs b/tests/ui/consts/return-in-const-fn.rs index 16e6ca7df8ae6..2626f8818be35 100644 --- a/tests/ui/consts/return-in-const-fn.rs +++ b/tests/ui/consts/return-in-const-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/43754 diff --git a/tests/ui/coroutine/borrow-in-tail-expr.rs b/tests/ui/coroutine/borrow-in-tail-expr.rs index 380e95cfc7765..2873ede570ec2 100644 --- a/tests/ui/coroutine/borrow-in-tail-expr.rs +++ b/tests/ui/coroutine/borrow-in-tail-expr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(coroutines, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/issue-58888.rs b/tests/ui/coroutine/issue-58888.rs index e4fada0cd432e..3c0d8fe617731 100644 --- a/tests/ui/coroutine/issue-58888.rs +++ b/tests/ui/coroutine/issue-58888.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags: -g #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/live-upvar-across-yield.rs b/tests/ui/coroutine/live-upvar-across-yield.rs index d13d480dcdcce..84a29eba92610 100644 --- a/tests/ui/coroutine/live-upvar-across-yield.rs +++ b/tests/ui/coroutine/live-upvar-across-yield.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/match-bindings.rs b/tests/ui/coroutine/match-bindings.rs index 2a0cd9af9f382..c24f92e93c1a2 100644 --- a/tests/ui/coroutine/match-bindings.rs +++ b/tests/ui/coroutine/match-bindings.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(coroutines)] @@ -9,7 +9,7 @@ enum Enum { } fn main() { - #[coroutine] || { //~ WARN unused coroutine that must be used + #[coroutine] || { loop { if let true = true { match Enum::A(String::new()) { diff --git a/tests/ui/coroutine/match-bindings.stderr b/tests/ui/coroutine/match-bindings.stderr deleted file mode 100644 index 98877bbcba5d2..0000000000000 --- a/tests/ui/coroutine/match-bindings.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: unused coroutine that must be used - --> $DIR/match-bindings.rs:12:18 - | -LL | #[coroutine] || { - | __________________^ -LL | | loop { -LL | | if let true = true { -LL | | match Enum::A(String::new()) { -... | -LL | | }; - | |_____^ - | - = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coroutine/nested_coroutine.rs b/tests/ui/coroutine/nested_coroutine.rs index 2c12ab2adad41..bb7a3ed05cc70 100644 --- a/tests/ui/coroutine/nested_coroutine.rs +++ b/tests/ui/coroutine/nested_coroutine.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/other-attribute-on-gen.rs b/tests/ui/coroutine/other-attribute-on-gen.rs index e13a0abcbfd63..8d344a3386ce2 100644 --- a/tests/ui/coroutine/other-attribute-on-gen.rs +++ b/tests/ui/coroutine/other-attribute-on-gen.rs @@ -1,5 +1,5 @@ //@ edition: 2024 -//@ run-pass +//@ check-pass #![feature(gen_blocks)] #![feature(optimize_attribute)] #![feature(async_iterator)] diff --git a/tests/ui/coroutine/reborrow-mut-upvar.rs b/tests/ui/coroutine/reborrow-mut-upvar.rs index 716781e365c5a..6cbbd9d5332f6 100644 --- a/tests/ui/coroutine/reborrow-mut-upvar.rs +++ b/tests/ui/coroutine/reborrow-mut-upvar.rs @@ -1,9 +1,9 @@ -//@ run-pass +//@ check-pass #![feature(coroutines)] fn _run(bar: &mut i32) { - #[coroutine] || { //~ WARN unused coroutine that must be used + #[coroutine] || { { let _baz = &*bar; yield; diff --git a/tests/ui/coroutine/reborrow-mut-upvar.stderr b/tests/ui/coroutine/reborrow-mut-upvar.stderr deleted file mode 100644 index a77121a25dc5d..0000000000000 --- a/tests/ui/coroutine/reborrow-mut-upvar.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: unused coroutine that must be used - --> $DIR/reborrow-mut-upvar.rs:6:18 - | -LL | #[coroutine] || { - | __________________^ -LL | | { -LL | | let _baz = &*bar; -LL | | yield; -... | -LL | | *bar = 2; -LL | | }; - | |_____^ - | - = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/coroutine/yield-in-args-rev.rs b/tests/ui/coroutine/yield-in-args-rev.rs index 29d79df25fbab..0d7b14b4734cc 100644 --- a/tests/ui/coroutine/yield-in-args-rev.rs +++ b/tests/ui/coroutine/yield-in-args-rev.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test that a borrow that occurs after a yield in the same @@ -10,7 +10,7 @@ fn foo(_a: (), _b: &bool) {} fn bar() { - #[coroutine] || { //~ WARN unused coroutine that must be used + #[coroutine] || { let b = true; foo(yield, &b); }; diff --git a/tests/ui/coroutine/yield-in-args-rev.stderr b/tests/ui/coroutine/yield-in-args-rev.stderr deleted file mode 100644 index d1650cee6cb01..0000000000000 --- a/tests/ui/coroutine/yield-in-args-rev.stderr +++ /dev/null @@ -1,15 +0,0 @@ -warning: unused coroutine that must be used - --> $DIR/yield-in-args-rev.rs:13:18 - | -LL | #[coroutine] || { - | __________________^ -LL | | let b = true; -LL | | foo(yield, &b); -LL | | }; - | |_____^ - | - = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/cross-crate/cross-crate-const-pat.rs b/tests/ui/cross-crate/cross-crate-const-pat.rs index 315210891609b..a5078e39bb138 100644 --- a/tests/ui/cross-crate/cross-crate-const-pat.rs +++ b/tests/ui/cross-crate/cross-crate-const-pat.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:cci_const.rs diff --git a/tests/ui/cross-crate/cross-crate-map-usage-5521.rs b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs index ffce846be2c13..a68873d81d0fe 100644 --- a/tests/ui/cross-crate/cross-crate-map-usage-5521.rs +++ b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/5521 -//@ run-pass +//@ build-pass #![allow(dead_code)] //@ aux-build:aux-5521.rs diff --git a/tests/ui/cross-crate/static-array-across-crate.rs b/tests/ui/cross-crate/static-array-across-crate.rs index fecdf41c29826..bcb3ca2efebb4 100644 --- a/tests/ui/cross-crate/static-array-across-crate.rs +++ b/tests/ui/cross-crate/static-array-across-crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] //@ aux-build:pub_static_array.rs diff --git a/tests/ui/cross-crate/static-with-cross-crate-regions-8259.rs b/tests/ui/cross-crate/static-with-cross-crate-regions-8259.rs index 347cfa2aee130..9b5f1844badda 100644 --- a/tests/ui/cross-crate/static-with-cross-crate-regions-8259.rs +++ b/tests/ui/cross-crate/static-with-cross-crate-regions-8259.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/8259 -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/cross-crate/trait-lifetime-param.rs b/tests/ui/cross-crate/trait-lifetime-param.rs index 89983492fe4cb..3fc99680a9e38 100644 --- a/tests/ui/cross-crate/trait-lifetime-param.rs +++ b/tests/ui/cross-crate/trait-lifetime-param.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] //@ aux-build:xcrate-trait-lifetime-param.rs diff --git a/tests/ui/debuginfo/impl-copy-function-debuginfo-58463.rs b/tests/ui/debuginfo/impl-copy-function-debuginfo-58463.rs index 72388c36ce487..be3190114f356 100644 --- a/tests/ui/debuginfo/impl-copy-function-debuginfo-58463.rs +++ b/tests/ui/debuginfo/impl-copy-function-debuginfo-58463.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/58463 -//@ run-pass +//@ build-pass //@ compile-flags:-C debuginfo=2 fn foo() -> impl Copy { diff --git a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs index e926a337659c1..e13c6888598ee 100644 --- a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs +++ b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags: -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3 //@ edition: 2021 diff --git a/tests/ui/delegation/generics/generics-aux-pass.rs b/tests/ui/delegation/generics/generics-aux-pass.rs index f5d49c03a6137..6e3e3e9d42136 100644 --- a/tests/ui/delegation/generics/generics-aux-pass.rs +++ b/tests/ui/delegation/generics/generics-aux-pass.rs @@ -1,5 +1,5 @@ //@ aux-crate:generics=generics.rs -//@ run-pass +//@ build-pass #![feature(fn_delegation)] diff --git a/tests/ui/delegation/generics/mapping/free-to-free-pass.rs b/tests/ui/delegation/generics/mapping/free-to-free-pass.rs index c5520350ced60..4afd61d7c39d6 100644 --- a/tests/ui/delegation/generics/mapping/free-to-free-pass.rs +++ b/tests/ui/delegation/generics/mapping/free-to-free-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] diff --git a/tests/ui/delegation/generics/mapping/free-to-trait-pass.rs b/tests/ui/delegation/generics/mapping/free-to-trait-pass.rs index 9f4b2b39f5f57..96989b43caf01 100644 --- a/tests/ui/delegation/generics/mapping/free-to-trait-pass.rs +++ b/tests/ui/delegation/generics/mapping/free-to-trait-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] diff --git a/tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs b/tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs index b2da7f56b2da7..b278307294a5c 100644 --- a/tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs +++ b/tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] #![allow(late_bound_lifetime_arguments)] diff --git a/tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs b/tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs index bf7f8655b111e..419e0848ec402 100644 --- a/tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs +++ b/tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] #![allow(late_bound_lifetime_arguments)] diff --git a/tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs b/tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs index f7149dd9de037..3d092d201b670 100644 --- a/tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs +++ b/tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] diff --git a/tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs b/tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs index a28ca88c0ce31..a0c12c94a30a3 100644 --- a/tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs +++ b/tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] #![allow(late_bound_lifetime_arguments)] diff --git a/tests/ui/delegation/generics/mapping/trait-to-free-pass.rs b/tests/ui/delegation/generics/mapping/trait-to-free-pass.rs index 452e0ee5cfddb..50b29bf13f916 100644 --- a/tests/ui/delegation/generics/mapping/trait-to-free-pass.rs +++ b/tests/ui/delegation/generics/mapping/trait-to-free-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] diff --git a/tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs b/tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs index aac835c904637..e2e30d8bb9f59 100644 --- a/tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs +++ b/tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(fn_delegation)] #![allow(late_bound_lifetime_arguments)] diff --git a/tests/ui/deprecation/deprecated_main_function.rs b/tests/ui/deprecation/deprecated_main_function.rs index 398046637d803..45ad68942e067 100644 --- a/tests/ui/deprecation/deprecated_main_function.rs +++ b/tests/ui/deprecation/deprecated_main_function.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags:-Zforce-unstable-if-unmarked #[deprecated] // should work even with -Zforce-unstable-if-unmarked diff --git a/tests/ui/derives/deriving-in-fn.rs b/tests/ui/derives/deriving-in-fn.rs index 13f3d39597ce3..d71692bffa7c1 100644 --- a/tests/ui/derives/deriving-in-fn.rs +++ b/tests/ui/derives/deriving-in-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/drop/drop-on-ret.rs b/tests/ui/drop/drop-on-ret.rs index 4bd50e6a72d72..5ce3140dad5be 100644 --- a/tests/ui/drop/drop-on-ret.rs +++ b/tests/ui/drop/drop-on-ret.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass diff --git a/tests/ui/dropck/dropck-empty-array.rs b/tests/ui/dropck/dropck-empty-array.rs index 5df274d455420..4e68960b091e7 100644 --- a/tests/ui/dropck/dropck-empty-array.rs +++ b/tests/ui/dropck/dropck-empty-array.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code, unused_variables, unused_assignments)] diff --git a/tests/ui/dropck/dropck_fn_type.rs b/tests/ui/dropck/dropck_fn_type.rs index 0695fc8012ff4..e3332eccef648 100644 --- a/tests/ui/dropck/dropck_fn_type.rs +++ b/tests/ui/dropck/dropck_fn_type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //! Regression test for #58311, regarding the usage of Fn types in drop impls // All of this Drop impls should compile. diff --git a/tests/ui/dropck/dropck_traits.rs b/tests/ui/dropck/dropck_traits.rs index 6f14aa82373be..141892c1af557 100644 --- a/tests/ui/dropck/dropck_traits.rs +++ b/tests/ui/dropck/dropck_traits.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //! Regression test for #34426, regarding HRTB in drop impls // All of this Drop impls should compile. diff --git a/tests/ui/dropck/issue-24805-dropck-itemless.rs b/tests/ui/dropck/issue-24805-dropck-itemless.rs index 8519bcc996131..3f40f91cfdccd 100644 --- a/tests/ui/dropck/issue-24805-dropck-itemless.rs +++ b/tests/ui/dropck/issue-24805-dropck-itemless.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that item-less traits do not cause dropck to inject extra // region constraints. diff --git a/tests/ui/dropck/issue-29844.rs b/tests/ui/dropck/issue-29844.rs index 2538fbe257aac..1067677efb515 100644 --- a/tests/ui/dropck/issue-29844.rs +++ b/tests/ui/dropck/issue-29844.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::sync::Arc; pub struct DescriptorSet<'a> { diff --git a/tests/ui/dst/dst-coercions.rs b/tests/ui/dst/dst-coercions.rs index 4813dda439b53..3c2d4a2e4017b 100644 --- a/tests/ui/dst/dst-coercions.rs +++ b/tests/ui/dst/dst-coercions.rs @@ -1,10 +1,10 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Test coercions involving DST and/or raw pointers struct S; -trait T { fn dummy(&self) { } } //~ WARN method `dummy` is never used +trait T { fn dummy(&self) { } } impl T for S {} pub fn main() { diff --git a/tests/ui/dst/dst-coercions.stderr b/tests/ui/dst/dst-coercions.stderr deleted file mode 100644 index ebc025a98ccfb..0000000000000 --- a/tests/ui/dst/dst-coercions.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/dst-coercions.rs:7:14 - | -LL | trait T { fn dummy(&self) { } } - | - ^^^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/dst/dst-irrefutable-bind.rs b/tests/ui/dst/dst-irrefutable-bind.rs index f4576229864b8..a134ae3ce5699 100644 --- a/tests/ui/dst/dst-irrefutable-bind.rs +++ b/tests/ui/dst/dst-irrefutable-bind.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass struct Test(T); diff --git a/tests/ui/dst/unsized-str-mutability.rs b/tests/ui/dst/unsized-str-mutability.rs index d84fa001fd679..94362988cdb22 100644 --- a/tests/ui/dst/unsized-str-mutability.rs +++ b/tests/ui/dst/unsized-str-mutability.rs @@ -1,6 +1,6 @@ //! regression test for //! Test that HIR ty lowering doesn't forget about mutability of `&mut str`. -//@ run-pass +//@ check-pass fn main() { fn foo(_: &mut T) {} diff --git a/tests/ui/dyn-keyword/methods-with-mut-trait-and-polymorphic-objects-issue-8401.rs b/tests/ui/dyn-keyword/methods-with-mut-trait-and-polymorphic-objects-issue-8401.rs index 313c6891720ac..f99f29d7e76e9 100644 --- a/tests/ui/dyn-keyword/methods-with-mut-trait-and-polymorphic-objects-issue-8401.rs +++ b/tests/ui/dyn-keyword/methods-with-mut-trait-and-polymorphic-objects-issue-8401.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:aux-8401.rs // https://github.com/rust-lang/rust/issues/8401 diff --git a/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs b/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs index 2bb9725fb77d1..aa7b8ee1291d8 100644 --- a/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs +++ b/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(core_intrinsics)] diff --git a/tests/ui/enum/enum-size-variance.rs b/tests/ui/enum/enum-size-variance.rs index 28b7fa9f7469f..5442f5ccb0421 100644 --- a/tests/ui/enum/enum-size-variance.rs +++ b/tests/ui/enum/enum-size-variance.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![warn(variant_size_differences)] #![allow(dead_code)] diff --git a/tests/ui/enum/enum-variants.rs b/tests/ui/enum/enum-variants.rs index d9639b329419a..02f9268d10191 100644 --- a/tests/ui/enum/enum-variants.rs +++ b/tests/ui/enum/enum-variants.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/enum/enum-with-uninhabited-variant.rs b/tests/ui/enum/enum-with-uninhabited-variant.rs index 8dfa492e6ea5c..b0877ba0cc564 100644 --- a/tests/ui/enum/enum-with-uninhabited-variant.rs +++ b/tests/ui/enum/enum-with-uninhabited-variant.rs @@ -1,5 +1,5 @@ //! regression test for issue https://github.com/rust-lang/rust/issues/50442 -//@ run-pass +//@ build-pass #![allow(dead_code)] enum Void {} diff --git a/tests/ui/enum/issue-19340-1.rs b/tests/ui/enum/issue-19340-1.rs index 9793692344261..fc82c051910d6 100644 --- a/tests/ui/enum/issue-19340-1.rs +++ b/tests/ui/enum/issue-19340-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_variables)] //@ aux-build:issue-19340-1.rs diff --git a/tests/ui/enum/issue-19340-2.rs b/tests/ui/enum/issue-19340-2.rs index 0930cd5da09ae..2ee3a7e035212 100644 --- a/tests/ui/enum/issue-19340-2.rs +++ b/tests/ui/enum/issue-19340-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_variables)] enum Homura { diff --git a/tests/ui/enum/issue-42747.rs b/tests/ui/enum/issue-42747.rs index 976a7f0a68cdf..f918bd054f489 100644 --- a/tests/ui/enum/issue-42747.rs +++ b/tests/ui/enum/issue-42747.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass macro_rules! fooN { ($cur:ident $prev:ty) => { #[allow(dead_code)] diff --git a/tests/ui/enum/match-either-enum-variants-6117.rs b/tests/ui/enum/match-either-enum-variants-6117.rs index 7b395066166b7..4db9dd28630db 100644 --- a/tests/ui/enum/match-either-enum-variants-6117.rs +++ b/tests/ui/enum/match-either-enum-variants-6117.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/6117 -//@ run-pass +//@ build-pass #![allow(dead_code)] enum Either { Left(T), Right(U) } diff --git a/tests/ui/enum/namespaced-enum-emulate-flat-xc.rs b/tests/ui/enum/namespaced-enum-emulate-flat-xc.rs index fca89728f2106..4b9ed431f6bab 100644 --- a/tests/ui/enum/namespaced-enum-emulate-flat-xc.rs +++ b/tests/ui/enum/namespaced-enum-emulate-flat-xc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] //@ aux-build:namespaced_enum_emulate_flat.rs diff --git a/tests/ui/enum/namespaced-enum-glob-import-xcrate.rs b/tests/ui/enum/namespaced-enum-glob-import-xcrate.rs index 80d5231fc85ab..f585e15768cdd 100644 --- a/tests/ui/enum/namespaced-enum-glob-import-xcrate.rs +++ b/tests/ui/enum/namespaced-enum-glob-import-xcrate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:namespaced_enums.rs diff --git a/tests/ui/enum/namespaced-enums-xcrate.rs b/tests/ui/enum/namespaced-enums-xcrate.rs index 36bc973749c33..b8d77414eda7b 100644 --- a/tests/ui/enum/namespaced-enums-xcrate.rs +++ b/tests/ui/enum/namespaced-enums-xcrate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:namespaced_enums.rs diff --git a/tests/ui/enum/simple-enum-usage-8506.rs b/tests/ui/enum/simple-enum-usage-8506.rs index ebe095d84e437..fcbe1bd490fd6 100644 --- a/tests/ui/enum/simple-enum-usage-8506.rs +++ b/tests/ui/enum/simple-enum-usage-8506.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/8506 -//@ run-pass +//@ build-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/enum/struct-like-variant-construct.rs b/tests/ui/enum/struct-like-variant-construct.rs index ec60fef9d3f74..e93435a7d331e 100644 --- a/tests/ui/enum/struct-like-variant-construct.rs +++ b/tests/ui/enum/struct-like-variant-construct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs index 7a7abb1c67c7c..d19140c4b8ace 100644 --- a/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs +++ b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/3037 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/ergonomic-clones/closure/nested.rs b/tests/ui/ergonomic-clones/closure/nested.rs index fc364fb594b2c..c9db5acc88c6f 100644 --- a/tests/ui/ergonomic-clones/closure/nested.rs +++ b/tests/ui/ergonomic-clones/closure/nested.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(ergonomic_clones)] #![allow(incomplete_features)] diff --git a/tests/ui/explicit-tail-calls/indexer.rs b/tests/ui/explicit-tail-calls/indexer.rs index c26d9774ce780..b65a126813be5 100644 --- a/tests/ui/explicit-tail-calls/indexer.rs +++ b/tests/ui/explicit-tail-calls/indexer.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ ignore-backends: gcc // Indexing taken from // https://github.com/phi-go/rfcs/blob/guaranteed-tco/text%2F0000-explicit-tail-calls.md#tail-call-elimination diff --git a/tests/ui/expr/early-return-in-binop.rs b/tests/ui/expr/early-return-in-binop.rs index 389d25210f77a..0b2400d0fcdcb 100644 --- a/tests/ui/expr/early-return-in-binop.rs +++ b/tests/ui/expr/early-return-in-binop.rs @@ -1,6 +1,6 @@ //! Test early return within binary operation expressions -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unreachable_code)] diff --git a/tests/ui/expr/if-panic-all.rs b/tests/ui/expr/if-panic-all.rs index 2ba2a36d165b5..d02517c8d8d4c 100644 --- a/tests/ui/expr/if-panic-all.rs +++ b/tests/ui/expr/if-panic-all.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // When all branches of an if expression result in panic, the entire if // expression results in panic. diff --git a/tests/ui/expr/if/if-ret.rs b/tests/ui/expr/if/if-ret.rs index 2698c5bbf6eaa..9bcf67d164284 100644 --- a/tests/ui/expr/if/if-ret.rs +++ b/tests/ui/expr/if/if-ret.rs @@ -1,7 +1,7 @@ -//@ run-pass +//@ check-pass #![allow(unused_parens)] -fn foo() { if (return) { } } //~ WARNING unreachable block in `if` +fn foo() { if (return) { } } pub fn main() { foo(); } diff --git a/tests/ui/expr/if/if-ret.stderr b/tests/ui/expr/if/if-ret.stderr deleted file mode 100644 index e53a1e3b08131..0000000000000 --- a/tests/ui/expr/if/if-ret.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: unreachable block in `if` or `while` expression - --> $DIR/if-ret.rs:5:24 - | -LL | fn foo() { if (return) { } } - | -------- ^^^ unreachable block in `if` or `while` expression - | | - | any code following this expression is unreachable - | - = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/expr/return-in-block-tuple.rs b/tests/ui/expr/return-in-block-tuple.rs index 2b3a59f21412f..1b0808a3d2dcc 100644 --- a/tests/ui/expr/return-in-block-tuple.rs +++ b/tests/ui/expr/return-in-block-tuple.rs @@ -1,5 +1,5 @@ //! regression test for https://github.com/rust-lang/rust/issues/18110 -//@ run-pass +//@ check-pass #![allow(unreachable_code)] fn main() { diff --git a/tests/ui/expr/scope.rs b/tests/ui/expr/scope.rs index b059e43de9ee2..dca38e2c5aa0e 100644 --- a/tests/ui/expr/scope.rs +++ b/tests/ui/expr/scope.rs @@ -1,5 +1,5 @@ //@ edition:2015 -//@ run-pass +//@ check-pass // Regression test for issue #762 diff --git a/tests/ui/extern/empty-struct-extern-fn-16441.rs b/tests/ui/extern/empty-struct-extern-fn-16441.rs index 82f2eee611d06..554862edf5d6b 100644 --- a/tests/ui/extern/empty-struct-extern-fn-16441.rs +++ b/tests/ui/extern/empty-struct-extern-fn-16441.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/16441 -//@ run-pass +//@ check-pass #![allow(dead_code)] struct Empty; diff --git a/tests/ui/extern/extern-1.rs b/tests/ui/extern/extern-1.rs index 226bc1effb176..786afab65bbb3 100644 --- a/tests/ui/extern/extern-1.rs +++ b/tests/ui/extern/extern-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] extern "C" fn f() { diff --git a/tests/ui/extern/extern-foreign-crate.rs b/tests/ui/extern/extern-foreign-crate.rs index 690a650136846..b784ca0c5e886 100644 --- a/tests/ui/extern/extern-foreign-crate.rs +++ b/tests/ui/extern/extern-foreign-crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass extern crate std as mystd; diff --git a/tests/ui/extern/extern-mod-abi.rs b/tests/ui/extern/extern-mod-abi.rs index 29892c468dd3b..b8036e2ab2979 100644 --- a/tests/ui/extern/extern-mod-abi.rs +++ b/tests/ui/extern/extern-mod-abi.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] extern "C" { diff --git a/tests/ui/extern/extern-prelude-no-speculative.rs b/tests/ui/extern/extern-prelude-no-speculative.rs index 949f4c8f2bf29..62ceb322c4c9c 100644 --- a/tests/ui/extern/extern-prelude-no-speculative.rs +++ b/tests/ui/extern/extern-prelude-no-speculative.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] //@ compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere diff --git a/tests/ui/extern/extern-pub.rs b/tests/ui/extern/extern-pub.rs index b272bc5359fd0..5e0cf874a5c05 100644 --- a/tests/ui/extern/extern-pub.rs +++ b/tests/ui/extern/extern-pub.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass extern "C" { pub fn free(p: *const u8); diff --git a/tests/ui/extern/extern-rust.rs b/tests/ui/extern/extern-rust.rs index b4a4a49810e66..b74a8c9183679 100644 --- a/tests/ui/extern/extern-rust.rs +++ b/tests/ui/extern/extern-rust.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[repr(C)] pub struct Foo(u32); diff --git a/tests/ui/extern/extern-types-manual-sync-send.rs b/tests/ui/extern/extern-types-manual-sync-send.rs index b273dcea7228f..ec00a7db8b276 100644 --- a/tests/ui/extern/extern-types-manual-sync-send.rs +++ b/tests/ui/extern/extern-types-manual-sync-send.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that unsafe impl for Sync/Send can be provided for extern types. #![feature(extern_types, sized_hierarchy)] diff --git a/tests/ui/extern/extern-types-trait-impl.rs b/tests/ui/extern/extern-types-trait-impl.rs index 07cb1efa80130..30fd0a3ad2270 100644 --- a/tests/ui/extern/extern-types-trait-impl.rs +++ b/tests/ui/extern/extern-types-trait-impl.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test that traits can be implemented for extern types. #![feature(extern_types, sized_hierarchy)] diff --git a/tests/ui/extern/issue-10025.rs b/tests/ui/extern/issue-10025.rs index 9be0f616fd2d6..8ddcd780e377c 100644 --- a/tests/ui/extern/issue-10025.rs +++ b/tests/ui/extern/issue-10025.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code, missing_abi)] unsafe extern fn foo() {} diff --git a/tests/ui/extern/issue-10764-rpass.rs b/tests/ui/extern/issue-10764-rpass.rs index 761bf4e28b775..5a161813503fd 100644 --- a/tests/ui/extern/issue-10764-rpass.rs +++ b/tests/ui/extern/issue-10764-rpass.rs @@ -1,3 +1,3 @@ -//@ run-pass +//@ check-pass extern "Rust" fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs b/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs index 959c9e6c20d8d..ba10a48a30ea2 100644 --- a/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs +++ b/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs @@ -4,7 +4,7 @@ // This is due to the fact that 'public_private_dependencies' just enables // a lint, so disabling it shouldn't cause any code to stop compiling. -//@ run-pass +//@ build-pass //@ aux-build:pub_dep.rs // Without ![feature(public_private_dependencies)], diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs b/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs index 32445c101d79b..61b74b0065c99 100644 --- a/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs +++ b/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused)] #![deny(trivial_bounds)] // Ignored without the trivial_bounds feature flag. diff --git a/tests/ui/function-pointer/function-pointer-comparison-54696.rs b/tests/ui/function-pointer/function-pointer-comparison-54696.rs index 2e28dfeaaf884..9d68f6dc7ceb9 100644 --- a/tests/ui/function-pointer/function-pointer-comparison-54696.rs +++ b/tests/ui/function-pointer/function-pointer-comparison-54696.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/54696 -//@ run-pass +//@ check-pass #![allow(unpredictable_function_pointer_comparisons)] diff --git a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs index 09675d493939c..bb91d4c6dd58a 100644 --- a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs +++ b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] fn with_closure(_: F) diff --git a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs index 47835ad844292..e070427d0a886 100644 --- a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs +++ b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] struct UsizeRef<'a> { diff --git a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs index b8a11ef5a00e6..eda90f52b127d 100644 --- a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs +++ b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Ensure that we deduce expected argument types when a `fn()` type is expected (#41755) diff --git a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs index 9c80463d59ed4..9d1401295fef6 100644 --- a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs +++ b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn bare() {} diff --git a/tests/ui/functions-closures/fn-coerce-field.rs b/tests/ui/functions-closures/fn-coerce-field.rs index 7a9e1e5e82c39..649eb45872738 100644 --- a/tests/ui/functions-closures/fn-coerce-field.rs +++ b/tests/ui/functions-closures/fn-coerce-field.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/functions-closures/fn-item-type-coerce.rs b/tests/ui/functions-closures/fn-item-type-coerce.rs index a5a0a4995bf47..5d70ba58841fb 100644 --- a/tests/ui/functions-closures/fn-item-type-coerce.rs +++ b/tests/ui/functions-closures/fn-item-type-coerce.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Test implicit coercions from a fn item type to a fn pointer type. diff --git a/tests/ui/functions-closures/fn-lval.rs b/tests/ui/functions-closures/fn-lval.rs index 7b5e4d6651763..dd1300b9171b2 100644 --- a/tests/ui/functions-closures/fn-lval.rs +++ b/tests/ui/functions-closures/fn-lval.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass diff --git a/tests/ui/functions-closures/fn-type-infer.rs b/tests/ui/functions-closures/fn-type-infer.rs index eb9e5b1046794..cdad6f2aaff34 100644 --- a/tests/ui/functions-closures/fn-type-infer.rs +++ b/tests/ui/functions-closures/fn-type-infer.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs index dfcbc037412ef..dba4be22e94d3 100644 --- a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs +++ b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that we are able to handle the relationships between free // regions bound in a closure callback. diff --git a/tests/ui/functions-closures/trivial-clone-closure.rs b/tests/ui/functions-closures/trivial-clone-closure.rs index 5f45d500543ae..b610188068029 100644 --- a/tests/ui/functions-closures/trivial-clone-closure.rs +++ b/tests/ui/functions-closures/trivial-clone-closure.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check that closures implement `TrivialClone`. #![feature(trivial_clone)] diff --git a/tests/ui/generics/default-type-params-well-formedness.rs b/tests/ui/generics/default-type-params-well-formedness.rs index 22b8f5011f7e9..55d6b5fd8ea88 100644 --- a/tests/ui/generics/default-type-params-well-formedness.rs +++ b/tests/ui/generics/default-type-params-well-formedness.rs @@ -2,7 +2,7 @@ //! //! Regression Test for: https://github.com/rust-lang/rust/issues/49344 -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/generics/empty-generic-brackets-equiv.rs b/tests/ui/generics/empty-generic-brackets-equiv.rs index d84498a60f80d..87deacccda99c 100644 --- a/tests/ui/generics/empty-generic-brackets-equiv.rs +++ b/tests/ui/generics/empty-generic-brackets-equiv.rs @@ -3,10 +3,10 @@ //! Checks` that empty angle brackets <> are syntactically valid and equivalent //! to omitting type parameters entirely across various language constructs. -//@ run-pass +//@ check-pass struct S<>; -trait T<> {} //~ WARN trait `T` is never used +trait T<> {} enum E<> { V } diff --git a/tests/ui/generics/empty-generic-brackets-equiv.stderr b/tests/ui/generics/empty-generic-brackets-equiv.stderr deleted file mode 100644 index aef4aa7cbf1e8..0000000000000 --- a/tests/ui/generics/empty-generic-brackets-equiv.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `T` is never used - --> $DIR/empty-generic-brackets-equiv.rs:9:7 - | -LL | trait T<> {} - | ^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/generics/generic-associated-type-deref-target-56237.rs b/tests/ui/generics/generic-associated-type-deref-target-56237.rs index 2050ca377e8c1..f7eee52ebd23b 100644 --- a/tests/ui/generics/generic-associated-type-deref-target-56237.rs +++ b/tests/ui/generics/generic-associated-type-deref-target-56237.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/56237 -//@ run-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/generics/generic-fn-twice.rs b/tests/ui/generics/generic-fn-twice.rs index 26d6f750c80f8..fe5a3f5521d81 100644 --- a/tests/ui/generics/generic-fn-twice.rs +++ b/tests/ui/generics/generic-fn-twice.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass diff --git a/tests/ui/generics/generic-ivec-leak.rs b/tests/ui/generics/generic-ivec-leak.rs index 1150b7f1c835d..ec327a1ab27a0 100644 --- a/tests/ui/generics/generic-ivec-leak.rs +++ b/tests/ui/generics/generic-ivec-leak.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] enum wrapper { wrapped(#[allow(dead_code)] T), } diff --git a/tests/ui/generics/generic-newtype-struct.rs b/tests/ui/generics/generic-newtype-struct.rs index 4cb481044f203..0f4552f081e6a 100644 --- a/tests/ui/generics/generic-newtype-struct.rs +++ b/tests/ui/generics/generic-newtype-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct S(#[allow(dead_code)] T); diff --git a/tests/ui/generics/generic-recursive-tag.rs b/tests/ui/generics/generic-recursive-tag.rs index b5c3f6c2de8ad..b944a8eb4c21a 100644 --- a/tests/ui/generics/generic-recursive-tag.rs +++ b/tests/ui/generics/generic-recursive-tag.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] enum list { #[allow(dead_code)] cons(Box, Box>), nil, } diff --git a/tests/ui/generics/generic-tag-corruption.rs b/tests/ui/generics/generic-tag-corruption.rs index b7fd66a052394..ced601b3a6d5d 100644 --- a/tests/ui/generics/generic-tag-corruption.rs +++ b/tests/ui/generics/generic-tag-corruption.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag-local.rs b/tests/ui/generics/generic-tag-local.rs index 025827783c3e4..5d64ac0cda447 100644 --- a/tests/ui/generics/generic-tag-local.rs +++ b/tests/ui/generics/generic-tag-local.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag.rs b/tests/ui/generics/generic-tag.rs index 98350e93ecebd..0371f2d63e942 100644 --- a/tests/ui/generics/generic-tag.rs +++ b/tests/ui/generics/generic-tag.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-type-synonym.rs b/tests/ui/generics/generic-type-synonym.rs index a8a946d5ed2ad..0b8a48bd7f7f3 100644 --- a/tests/ui/generics/generic-type-synonym.rs +++ b/tests/ui/generics/generic-type-synonym.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/generics/mid-path-type-params.rs b/tests/ui/generics/mid-path-type-params.rs index 5100e8e73531e..d07f83ae851b7 100644 --- a/tests/ui/generics/mid-path-type-params.rs +++ b/tests/ui/generics/mid-path-type-params.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs index 745a2fcc4f030..e06c0f21f18a0 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] trait Typer<'tcx> { diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs index 271eedae89a16..37cb7b00e8a93 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // A basic test of using a higher-ranked trait bound. diff --git a/tests/ui/hygiene/issue-15221.rs b/tests/ui/hygiene/issue-15221.rs index 7703cb2de4e81..5f9d7d19a1bc4 100644 --- a/tests/ui/hygiene/issue-15221.rs +++ b/tests/ui/hygiene/issue-15221.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(path_statements)] macro_rules! inner { diff --git a/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs b/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs index fb5f9b0aeee55..9e707127f144e 100644 --- a/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs +++ b/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/impl-trait/issues/issue-36792.rs b/tests/ui/impl-trait/issues/issue-36792.rs index 6682a953fa0bd..d1106d99d3f4d 100644 --- a/tests/ui/impl-trait/issues/issue-36792.rs +++ b/tests/ui/impl-trait/issues/issue-36792.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn foo() -> impl Copy { foo } diff --git a/tests/ui/impl-trait/issues/issue-51185.rs b/tests/ui/impl-trait/issues/issue-51185.rs index ddba905835f84..fed312af01cc6 100644 --- a/tests/ui/impl-trait/issues/issue-51185.rs +++ b/tests/ui/impl-trait/issues/issue-51185.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn foo() -> impl Into fn(&'a ())> { (|_| {}) as for<'a> fn(&'a ()) } diff --git a/tests/ui/imports/enum-variant-import-path-15774.rs b/tests/ui/imports/enum-variant-import-path-15774.rs index 583fe4da17969..50a325e4c6d58 100644 --- a/tests/ui/imports/enum-variant-import-path-15774.rs +++ b/tests/ui/imports/enum-variant-import-path-15774.rs @@ -1,7 +1,7 @@ //! Regression test for https://github.com/rust-lang/rust/issues/15774 //@ edition: 2015 -//@ run-pass +//@ check-pass #![deny(warnings)] #![allow(unused_imports)] diff --git a/tests/ui/imports/export-multi.rs b/tests/ui/imports/export-multi.rs index 4f7f7d3a6c035..36733ce17a875 100644 --- a/tests/ui/imports/export-multi.rs +++ b/tests/ui/imports/export-multi.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use m::f; use m::g; diff --git a/tests/ui/imports/global-path-resolution-drop.rs b/tests/ui/imports/global-path-resolution-drop.rs index 29a6afa10c96f..ab9b6a630a04f 100644 --- a/tests/ui/imports/global-path-resolution-drop.rs +++ b/tests/ui/imports/global-path-resolution-drop.rs @@ -1,6 +1,6 @@ //! Checks global path resolution of `mem::drop` using a leading `::`. -//@ run-pass +//@ check-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/imports/import-from.rs b/tests/ui/imports/import-from.rs index 128002e0e2abc..e14c4b90ca492 100644 --- a/tests/ui/imports/import-from.rs +++ b/tests/ui/imports/import-from.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use spam::{ham, eggs}; diff --git a/tests/ui/imports/import-glob-1.rs b/tests/ui/imports/import-glob-1.rs index 8beec4ce469d1..2f7f2bf429eac 100644 --- a/tests/ui/imports/import-glob-1.rs +++ b/tests/ui/imports/import-glob-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] // This should resolve fine. Prior to fix, the last import diff --git a/tests/ui/imports/import-in-block.rs b/tests/ui/imports/import-in-block.rs index 2588ea7702363..284b83531f0a1 100644 --- a/tests/ui/imports/import-in-block.rs +++ b/tests/ui/imports/import-in-block.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { use std::mem::replace; diff --git a/tests/ui/imports/import-prefix-macro.rs b/tests/ui/imports/import-prefix-macro.rs index e80f8fa9d04eb..39f995a658626 100644 --- a/tests/ui/imports/import-prefix-macro.rs +++ b/tests/ui/imports/import-prefix-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] mod a { pub mod b { diff --git a/tests/ui/imports/import-trailing-comma.rs b/tests/ui/imports/import-trailing-comma.rs index 4147357a22b09..5fa9919b19fdf 100644 --- a/tests/ui/imports/import-trailing-comma.rs +++ b/tests/ui/imports/import-trailing-comma.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use foo::bar::{baz, quux,}; diff --git a/tests/ui/imports/imports.rs b/tests/ui/imports/imports.rs index b5c25eb044724..b16bd4fd850c8 100644 --- a/tests/ui/imports/imports.rs +++ b/tests/ui/imports/imports.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused)] // Like other items, private imports can be imported and used non-lexically in paths. diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs index 2fd9210806b66..41ff9b15b09e8 100644 --- a/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs +++ b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs index 603d4e0d65da3..efc201a0301de 100644 --- a/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs +++ b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/imports/issue-4865-1.rs b/tests/ui/imports/issue-4865-1.rs index 7c34d105550ac..3633e00464b1b 100644 --- a/tests/ui/imports/issue-4865-1.rs +++ b/tests/ui/imports/issue-4865-1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] // This should resolve fine. // Prior to fix, the crossed imports between a and b diff --git a/tests/ui/imports/issue-4865-3.rs b/tests/ui/imports/issue-4865-3.rs index d9d17f4dd4756..25c501ef8ed23 100644 --- a/tests/ui/imports/issue-4865-3.rs +++ b/tests/ui/imports/issue-4865-3.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] // This should resolve fine even with the circular imports as // they are not `pub`. diff --git a/tests/ui/imports/reexport-star.rs b/tests/ui/imports/reexport-star.rs index 9bf4a6ce0c460..8e33bf99029a1 100644 --- a/tests/ui/imports/reexport-star.rs +++ b/tests/ui/imports/reexport-star.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass mod a { pub fn f() {} diff --git a/tests/ui/imports/use-declaration-no-path-segment-prefix.rs b/tests/ui/imports/use-declaration-no-path-segment-prefix.rs index f7fbc084ebfe4..43399980396e7 100644 --- a/tests/ui/imports/use-declaration-no-path-segment-prefix.rs +++ b/tests/ui/imports/use-declaration-no-path-segment-prefix.rs @@ -1,7 +1,7 @@ //! Regression test for https://github.com/rust-lang/rust/issues/10806 //@ edition: 2015 -//@ run-pass +//@ check-pass #![allow(unused_imports)] diff --git a/tests/ui/imports/use-mod.rs b/tests/ui/imports/use-mod.rs index cabea16e725d7..e5e118c34158e 100644 --- a/tests/ui/imports/use-mod.rs +++ b/tests/ui/imports/use-mod.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] diff --git a/tests/ui/inference/collection-type-copy-behavior-12909.rs b/tests/ui/inference/collection-type-copy-behavior-12909.rs index 83536e8875cad..265e5b0b208c8 100644 --- a/tests/ui/inference/collection-type-copy-behavior-12909.rs +++ b/tests/ui/inference/collection-type-copy-behavior-12909.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/12909 -//@ run-pass +//@ check-pass #![allow(unused_variables)] use std::collections::HashMap; diff --git a/tests/ui/issues/issue-23491.rs b/tests/ui/issues/issue-23491.rs index 0a2dfa4257a03..e054eb6ae3086 100644 --- a/tests/ui/issues/issue-23491.rs +++ b/tests/ui/issues/issue-23491.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] struct Node(#[allow(dead_code)] T); diff --git a/tests/ui/issues/issue-23898.rs b/tests/ui/issues/issue-23898.rs index 0d8fd7ea4eba3..b606aac039439 100644 --- a/tests/ui/issues/issue-23898.rs +++ b/tests/ui/issues/issue-23898.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-24954.rs b/tests/ui/issues/issue-24954.rs index fe16e29d70f3b..4a7f89c08c99f 100644 --- a/tests/ui/issues/issue-24954.rs +++ b/tests/ui/issues/issue-24954.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass macro_rules! foo { ($y:expr) => ({ $y = 2; diff --git a/tests/ui/issues/issue-25279.rs b/tests/ui/issues/issue-25279.rs index 7d85a122e1734..54415fdbac1f3 100644 --- a/tests/ui/issues/issue-25279.rs +++ b/tests/ui/issues/issue-25279.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct S<'a>(&'a ()); impl<'a> S<'a> { diff --git a/tests/ui/issues/issue-26641.rs b/tests/ui/issues/issue-26641.rs index 983bcbea92731..0735384c34229 100644 --- a/tests/ui/issues/issue-26641.rs +++ b/tests/ui/issues/issue-26641.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Parser<'a>(#[allow(dead_code)] Box); fn main() { diff --git a/tests/ui/issues/issue-32292.rs b/tests/ui/issues/issue-32292.rs index 2181dff505ace..1df8502856192 100644 --- a/tests/ui/issues/issue-32292.rs +++ b/tests/ui/issues/issue-32292.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(warnings)] #[derive(Hash, Ord, PartialOrd, Eq, PartialEq, Debug, Clone, Copy)] diff --git a/tests/ui/issues/issue-36816.rs b/tests/ui/issues/issue-36816.rs index d15a9c7abe15b..c663a2d7e7203 100644 --- a/tests/ui/issues/issue-36816.rs +++ b/tests/ui/issues/issue-36816.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass macro_rules! m { () => { 1 } } macro_rules! n { () => { 1 + m!() } } diff --git a/tests/ui/issues/issue-38556.rs b/tests/ui/issues/issue-38556.rs index b04558707e148..6530905db68c8 100644 --- a/tests/ui/issues/issue-38556.rs +++ b/tests/ui/issues/issue-38556.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] pub struct Foo; diff --git a/tests/ui/issues/issue-41479.rs b/tests/ui/issues/issue-41479.rs index c8ebad6c5e071..36a602c08559c 100644 --- a/tests/ui/issues/issue-41479.rs +++ b/tests/ui/issues/issue-41479.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn split(pair: (A, B)) { let _a = pair.0; let _b = pair.1; diff --git a/tests/ui/issues/issue-41604.rs b/tests/ui/issues/issue-41604.rs index 3cd16a2a598ba..1713517ea1a86 100644 --- a/tests/ui/issues/issue-41604.rs +++ b/tests/ui/issues/issue-41604.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct B; impl B { diff --git a/tests/ui/issues/issue-4228.rs b/tests/ui/issues/issue-4228.rs index 362d5925c7085..b9354e6155bcc 100644 --- a/tests/ui/issues/issue-4228.rs +++ b/tests/ui/issues/issue-4228.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Foo; diff --git a/tests/ui/issues/issue-43910.rs b/tests/ui/issues/issue-43910.rs index 041147dc49ddb..ebdf4cb7ebdc1 100644 --- a/tests/ui/issues/issue-43910.rs +++ b/tests/ui/issues/issue-43910.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-43923.rs b/tests/ui/issues/issue-43923.rs index 4cd46b6ca6025..8894ff2a11d12 100644 --- a/tests/ui/issues/issue-43923.rs +++ b/tests/ui/issues/issue-43923.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] struct A { ptr: T } diff --git a/tests/ui/issues/issue-5315.rs b/tests/ui/issues/issue-5315.rs index 29a6f8f2934a1..776cc8183a2cb 100644 --- a/tests/ui/issues/issue-5315.rs +++ b/tests/ui/issues/issue-5315.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct A(#[allow(dead_code)] bool); diff --git a/tests/ui/keyword/raw-identifier-for-function-57198.rs b/tests/ui/keyword/raw-identifier-for-function-57198.rs index 41a0cbf4619d4..7c838d02bfac2 100644 --- a/tests/ui/keyword/raw-identifier-for-function-57198.rs +++ b/tests/ui/keyword/raw-identifier-for-function-57198.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/57198 -//@ run-pass +//@ build-pass mod m { pub fn r#for() {} diff --git a/tests/ui/label/label_break_value_desugared_break.rs b/tests/ui/label/label_break_value_desugared_break.rs index 17ef1ba6d24bc..ca59772b20fbe 100644 --- a/tests/ui/label/label_break_value_desugared_break.rs +++ b/tests/ui/label/label_break_value_desugared_break.rs @@ -1,7 +1,7 @@ //@ edition: 2018 #![feature(try_blocks)] -//@ run-pass +//@ check-pass fn main() { let _: Result<(), ()> = try { 'foo: { diff --git a/tests/ui/layout/big-type-no-err.rs b/tests/ui/layout/big-type-no-err.rs index cd90771a9c22d..ab32770570edf 100644 --- a/tests/ui/layout/big-type-no-err.rs +++ b/tests/ui/layout/big-type-no-err.rs @@ -1,5 +1,5 @@ // Enormous types are allowed if they are never actually instantiated. -//@ run-pass +//@ build-pass trait Foo { type Assoc; } diff --git a/tests/ui/let-else/issue-99975.rs b/tests/ui/let-else/issue-99975.rs index 244d946392fc7..ebb4f46e0fe71 100644 --- a/tests/ui/let-else/issue-99975.rs +++ b/tests/ui/let-else/issue-99975.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags: -C opt-level=3 -Zvalidate-mir diff --git a/tests/ui/let-else/let-else-non-copy.rs b/tests/ui/let-else/let-else-non-copy.rs index 4f59824396ef5..802cf46d57495 100644 --- a/tests/ui/let-else/let-else-non-copy.rs +++ b/tests/ui/let-else/let-else-non-copy.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // // This is derived from a change to compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs, in // preparation for adopting let-else within the compiler (thanks @est31): diff --git a/tests/ui/let-else/let-else-temp-borrowck.rs b/tests/ui/let-else/let-else-temp-borrowck.rs index 32fb8509a4754..15f5f88376358 100644 --- a/tests/ui/let-else/let-else-temp-borrowck.rs +++ b/tests/ui/let-else/let-else-temp-borrowck.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // // from issue #93951, where borrowck complained the temporary that `foo(&x)` was stored in was to // be dropped sometime after `x` was. It then suggested adding a semicolon that was already there. diff --git a/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs b/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs index f615ae7e95b75..cfdad45bb2aae 100644 --- a/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs +++ b/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // ignore-tidy-cr // nondoc comment with bare CR: ' ' diff --git a/tests/ui/lifetimes/enum-lifetime-container-10228.rs b/tests/ui/lifetimes/enum-lifetime-container-10228.rs index ebbefb619c616..6ffba077514ef 100644 --- a/tests/ui/lifetimes/enum-lifetime-container-10228.rs +++ b/tests/ui/lifetimes/enum-lifetime-container-10228.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/10228 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/lifetimes/issue-84604.rs b/tests/ui/lifetimes/issue-84604.rs index 3f83b0c1cd3ca..9b9ff6bf1c5db 100644 --- a/tests/ui/lifetimes/issue-84604.rs +++ b/tests/ui/lifetimes/issue-84604.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags: -Csymbol-mangling-version=v0 pub fn f() {} diff --git a/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs index 81e4d3e7043bd..927f9d3fcfb97 100644 --- a/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs +++ b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/72278 // and https://github.com/rust-lang/rust/issues/42868 -//@ run-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs b/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs index bae2f73baa36f..6a3299488c040 100644 --- a/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs +++ b/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/13665 -//@ run-pass +//@ check-pass fn foo<'r>() { let maybe_value_ref: Option<&'r u8> = None; diff --git a/tests/ui/lifetimes/trait-object-constructor-14821.rs b/tests/ui/lifetimes/trait-object-constructor-14821.rs index 76f0c7514bc33..5c6681c03bea2 100644 --- a/tests/ui/lifetimes/trait-object-constructor-14821.rs +++ b/tests/ui/lifetimes/trait-object-constructor-14821.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/14821 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] trait SomeTrait {} diff --git a/tests/ui/lint/dead-code/associated-type.rs b/tests/ui/lint/dead-code/associated-type.rs index 542a64afbf2da..7ab717fea1184 100644 --- a/tests/ui/lint/dead-code/associated-type.rs +++ b/tests/ui/lint/dead-code/associated-type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/enum-variants.rs b/tests/ui/lint/dead-code/enum-variants.rs index 9499ffdecd748..113265f5d6cbe 100644 --- a/tests/ui/lint/dead-code/enum-variants.rs +++ b/tests/ui/lint/dead-code/enum-variants.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(dead_code)] diff --git a/tests/ui/lint/issue-20343.rs b/tests/ui/lint/issue-20343.rs index da353c985c9a0..574a99adcde8a 100644 --- a/tests/ui/lint/issue-20343.rs +++ b/tests/ui/lint/issue-20343.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] // Regression test for Issue #20343. diff --git a/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs b/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs index 570b559eb61a8..7138e6388f87a 100644 --- a/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs +++ b/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![warn(unused)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/lint-cap.rs b/tests/ui/lint/lint-cap.rs index 4f67a76f68f38..c1557cc464d57 100644 --- a/tests/ui/lint/lint-cap.rs +++ b/tests/ui/lint/lint-cap.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ compile-flags: --cap-lints allow #![deny(warnings)] diff --git a/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs b/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs index 77ef6fab16cd1..daa9ad5133f6a 100644 --- a/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs +++ b/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_parens)] diff --git a/tests/ui/lint/must_not_suspend/generic.rs b/tests/ui/lint/must_not_suspend/generic.rs index b9b9ae8caa211..0ac4e450a0049 100644 --- a/tests/ui/lint/must_not_suspend/generic.rs +++ b/tests/ui/lint/must_not_suspend/generic.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass // // this test shows a case where the lint doesn't fire in generic code #![feature(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/handled.rs b/tests/ui/lint/must_not_suspend/handled.rs index 9274bafa41593..36277d5035a51 100644 --- a/tests/ui/lint/must_not_suspend/handled.rs +++ b/tests/ui/lint/must_not_suspend/handled.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/mutex-guard-dropped-before-await.rs b/tests/ui/lint/must_not_suspend/mutex-guard-dropped-before-await.rs index d1c48c3c51457..fd84a27287dae 100644 --- a/tests/ui/lint/must_not_suspend/mutex-guard-dropped-before-await.rs +++ b/tests/ui/lint/must_not_suspend/mutex-guard-dropped-before-await.rs @@ -1,7 +1,7 @@ //! Regression test for //@ edition:2018 -//@ run-pass +//@ check-pass #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/warn.rs b/tests/ui/lint/must_not_suspend/warn.rs index 64432e4460ae8..4e8cd0d011650 100644 --- a/tests/ui/lint/must_not_suspend/warn.rs +++ b/tests/ui/lint/must_not_suspend/warn.rs @@ -1,5 +1,5 @@ //@ edition:2018 -//@ run-pass +//@ check-pass #![feature(must_not_suspend)] #![warn(must_not_suspend)] diff --git a/tests/ui/lint/unused/issue-70041.rs b/tests/ui/lint/unused/issue-70041.rs index 890ba378263bc..5d1eb282a9c05 100644 --- a/tests/ui/lint/unused/issue-70041.rs +++ b/tests/ui/lint/unused/issue-70041.rs @@ -1,13 +1,11 @@ //@ edition: 2018 -//@ run-pass +//@ check-pass macro_rules! regex { - //~^ WARN unused macro definition () => {}; } #[allow(dead_code)] use regex; -//~^ WARN unused import fn main() {} diff --git a/tests/ui/lint/unused/issue-70041.stderr b/tests/ui/lint/unused/issue-70041.stderr deleted file mode 100644 index 4a2c4b8b90746..0000000000000 --- a/tests/ui/lint/unused/issue-70041.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: unused macro definition: `regex` - --> $DIR/issue-70041.rs:4:14 - | -LL | macro_rules! regex { - | ^^^^^ - | - = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default - -warning: unused import: `regex` - --> $DIR/issue-70041.rs:10:5 - | -LL | use regex; - | ^^^^^ - | - = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default - -warning: 2 warnings emitted - diff --git a/tests/ui/lint/unused/no-unused-parens-return-block.rs b/tests/ui/lint/unused/no-unused-parens-return-block.rs index 57e5da0a47209..669135be1a319 100644 --- a/tests/ui/lint/unused/no-unused-parens-return-block.rs +++ b/tests/ui/lint/unused/no-unused-parens-return-block.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_parens)] #![allow(unreachable_code)] diff --git a/tests/ui/lint/unused/unused-trait-fn.rs b/tests/ui/lint/unused/unused-trait-fn.rs index 57b39c0de17ee..f177d81461ee3 100644 --- a/tests/ui/lint/unused/unused-trait-fn.rs +++ b/tests/ui/lint/unused/unused-trait-fn.rs @@ -1,7 +1,7 @@ //! regression test for -//@ run-pass +//@ check-pass -trait Str { fn foo(&self) {} } //~ WARN method `foo` is never used +trait Str { fn foo(&self) {} } impl Str for str {} impl<'a, S: ?Sized> Str for &'a S where S: Str {} diff --git a/tests/ui/lint/unused/unused-trait-fn.stderr b/tests/ui/lint/unused/unused-trait-fn.stderr deleted file mode 100644 index f33fed29c94c7..0000000000000 --- a/tests/ui/lint/unused/unused-trait-fn.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `foo` is never used - --> $DIR/unused-trait-fn.rs:4:16 - | -LL | trait Str { fn foo(&self) {} } - | --- ^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/lint/unused/unused_parens/unused-parens-in-macro-issue-120642.rs b/tests/ui/lint/unused/unused_parens/unused-parens-in-macro-issue-120642.rs index 59bb65a357bae..0b18355b54fb8 100644 --- a/tests/ui/lint/unused/unused_parens/unused-parens-in-macro-issue-120642.rs +++ b/tests/ui/lint/unused/unused_parens/unused-parens-in-macro-issue-120642.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![warn(unused_parens)] #![allow(dead_code)] diff --git a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs index ebdb5658537d2..148d2469b2cc9 100644 --- a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs +++ b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unreachable_code)] diff --git a/tests/ui/macros/edition-macro-pats.rs b/tests/ui/macros/edition-macro-pats.rs index f5388e09c74a5..b2499cc595edf 100644 --- a/tests/ui/macros/edition-macro-pats.rs +++ b/tests/ui/macros/edition-macro-pats.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ edition:2021 macro_rules! foo { diff --git a/tests/ui/macros/html-literals.rs b/tests/ui/macros/html-literals.rs index b30de7b7ee684..1d02c32cb38e8 100644 --- a/tests/ui/macros/html-literals.rs +++ b/tests/ui/macros/html-literals.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(non_camel_case_types)] // A test of the macro system. Can we do HTML literals? diff --git a/tests/ui/macros/issue-41803.rs b/tests/ui/macros/issue-41803.rs index 69162da12ac93..aa045605ccb9e 100644 --- a/tests/ui/macros/issue-41803.rs +++ b/tests/ui/macros/issue-41803.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_macro_rules)] /// A compile-time map from identifiers to arbitrary (heterogeneous) expressions diff --git a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs index adf5448ffc09d..3a379b742a462 100644 --- a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs +++ b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(trace_macros, log_syntax)] diff --git a/tests/ui/macros/macro-nested_expr.rs b/tests/ui/macros/macro-nested_expr.rs index 291ae58c243a5..1d9efd560411c 100644 --- a/tests/ui/macros/macro-nested_expr.rs +++ b/tests/ui/macros/macro-nested_expr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // #42164 #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-quote-test.rs b/tests/ui/macros/macro-quote-test.rs index a4b667b4af6fb..8c32371bffb7b 100644 --- a/tests/ui/macros/macro-quote-test.rs +++ b/tests/ui/macros/macro-quote-test.rs @@ -1,6 +1,6 @@ // Test that a macro can emit delimiters with nothing inside - `()`, `{}` -//@ run-pass +//@ build-pass //@ proc-macro: hello_macro.rs extern crate hello_macro; diff --git a/tests/ui/macros/macro-stability-rpass.rs b/tests/ui/macros/macro-stability-rpass.rs index 25a69a5fc4cfa..7fe0f2a2992a4 100644 --- a/tests/ui/macros/macro-stability-rpass.rs +++ b/tests/ui/macros/macro-stability-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:unstable-macros.rs #![unstable(feature = "one_two_three_testing", issue = "none")] diff --git a/tests/ui/macros/macro-variable-declaration-with-bounds-5554.rs b/tests/ui/macros/macro-variable-declaration-with-bounds-5554.rs index 8ccf8e8013100..274a009f98f0a 100644 --- a/tests/ui/macros/macro-variable-declaration-with-bounds-5554.rs +++ b/tests/ui/macros/macro-variable-declaration-with-bounds-5554.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/5554 -//@ run-pass +//@ build-pass #![allow(dead_code)] pub struct X { diff --git a/tests/ui/match/issue-113012.rs b/tests/ui/match/issue-113012.rs index 2b139829510b8..f4c4320ffbfca 100644 --- a/tests/ui/match/issue-113012.rs +++ b/tests/ui/match/issue-113012.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] struct Foo(()); diff --git a/tests/ui/match/issue-33498.rs b/tests/ui/match/issue-33498.rs index 8d741927a41b6..ec520646704c1 100644 --- a/tests/ui/match/issue-33498.rs +++ b/tests/ui/match/issue-33498.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] pub fn main() { let x = (0, 2); diff --git a/tests/ui/match/match-nested-enum-box-3121.rs b/tests/ui/match/match-nested-enum-box-3121.rs index f2ab4bf080750..0b19333d40385 100644 --- a/tests/ui/match/match-nested-enum-box-3121.rs +++ b/tests/ui/match/match-nested-enum-box-3121.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/3121 -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/match/match-range-char-const.rs b/tests/ui/match/match-range-char-const.rs index 84881fd56cc0f..61dd17b716a74 100644 --- a/tests/ui/match/match-range-char-const.rs +++ b/tests/ui/match/match-range-char-const.rs @@ -1,5 +1,5 @@ //! Regression test for https://github.com/rust-lang/rust/issues/18464 -//@ run-pass +//@ check-pass #![deny(dead_code)] const LOW_RANGE: char = '0'; diff --git a/tests/ui/match/match-ref-option-pattern.rs b/tests/ui/match/match-ref-option-pattern.rs index a6de2361503a8..025ef00379367 100644 --- a/tests/ui/match/match-ref-option-pattern.rs +++ b/tests/ui/match/match-ref-option-pattern.rs @@ -1,5 +1,5 @@ //! regression test for issue #3500 -//@ run-pass +//@ check-pass pub fn main() { let x = &Some(1); diff --git a/tests/ui/match/match-usize-min-max-pattern.rs b/tests/ui/match/match-usize-min-max-pattern.rs index 6a801406895d3..c8dc920eb235b 100644 --- a/tests/ui/match/match-usize-min-max-pattern.rs +++ b/tests/ui/match/match-usize-min-max-pattern.rs @@ -1,5 +1,5 @@ //! regression test for -//@ run-pass +//@ check-pass fn main() { match (0, 0) { (usize::MIN, usize::MAX) => {} diff --git a/tests/ui/match/tuple-usize-pattern-14393.rs b/tests/ui/match/tuple-usize-pattern-14393.rs index 12d58d4c059a5..e0dd0f518c075 100644 --- a/tests/ui/match/tuple-usize-pattern-14393.rs +++ b/tests/ui/match/tuple-usize-pattern-14393.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/14393 -//@ run-pass +//@ check-pass fn main() { match ("", 1_usize) { diff --git a/tests/ui/methods/inherent-method-resolution-on-deref-type-53843.rs b/tests/ui/methods/inherent-method-resolution-on-deref-type-53843.rs index 0b2ab9afc399e..0dc90302b87f1 100644 --- a/tests/ui/methods/inherent-method-resolution-on-deref-type-53843.rs +++ b/tests/ui/methods/inherent-method-resolution-on-deref-type-53843.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/methods/method-argument-inference-associated-type.rs b/tests/ui/methods/method-argument-inference-associated-type.rs index a9d2bb6df8e7c..158499500311f 100644 --- a/tests/ui/methods/method-argument-inference-associated-type.rs +++ b/tests/ui/methods/method-argument-inference-associated-type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass pub struct ClientMap; pub struct ClientMap2; diff --git a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs index ec7abe1280d85..32f8000132fd8 100644 --- a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs +++ b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Check that we successfully handle methods where the `self` type has // an early-bound lifetime. Issue #18208. diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs index 9f20f99b97fc4..3bfe762e21dce 100644 --- a/tests/ui/methods/method-normalize-bounds-issue-20604.rs +++ b/tests/ui/methods/method-normalize-bounds-issue-20604.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/methods/method-recursive-blanket-impl.rs b/tests/ui/methods/method-recursive-blanket-impl.rs index 547e57885e036..a68fd2f222a67 100644 --- a/tests/ui/methods/method-recursive-blanket-impl.rs +++ b/tests/ui/methods/method-recursive-blanket-impl.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] #![allow(unused_imports)] // Test that we don't trigger on the blanket impl for all `&'a T` but @@ -10,7 +10,7 @@ use std::marker::Sized; // Note: this must be generic for the problem to show up -trait Foo { //~ WARN trait `Foo` is never used +trait Foo { fn foo(&self, a: A); } diff --git a/tests/ui/methods/method-recursive-blanket-impl.stderr b/tests/ui/methods/method-recursive-blanket-impl.stderr deleted file mode 100644 index 1074893744abd..0000000000000 --- a/tests/ui/methods/method-recursive-blanket-impl.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `Foo` is never used - --> $DIR/method-recursive-blanket-impl.rs:13:7 - | -LL | trait Foo { - | ^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs index 2ef2848c21641..80ac60f0c16ce 100644 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs +++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs @@ -1,9 +1,9 @@ -//@ run-pass +//@ check-pass // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. -trait A { //~ WARN trait `A` is never used +trait A { fn foo(self); } diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr deleted file mode 100644 index 40f9133705274..0000000000000 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `A` is never used - --> $DIR/method-two-traits-distinguished-via-where-clause.rs:6:7 - | -LL | trait A { - | ^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/mir/mir_ascription_coercion.rs b/tests/ui/mir/mir_ascription_coercion.rs index b36a2c385d0f6..0ab091a620e53 100644 --- a/tests/ui/mir/mir_ascription_coercion.rs +++ b/tests/ui/mir/mir_ascription_coercion.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Tests that the result of type ascription has adjustments applied #![feature(type_ascription)] diff --git a/tests/ui/mir/mir_coercion_casts.rs b/tests/ui/mir/mir_coercion_casts.rs index bfb47d9cfa365..449bcca910151 100644 --- a/tests/ui/mir/mir_coercion_casts.rs +++ b/tests/ui/mir/mir_coercion_casts.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Tests the coercion casts are handled properly fn main() { diff --git a/tests/ui/mir/mir_small_agg_arg.rs b/tests/ui/mir/mir_small_agg_arg.rs index a21c2076e174e..329fb5cd2d436 100644 --- a/tests/ui/mir/mir_small_agg_arg.rs +++ b/tests/ui/mir/mir_small_agg_arg.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_variables)] fn foo((x, y): (i8, i8)) { } diff --git a/tests/ui/mir/mir_void_return_2.rs b/tests/ui/mir/mir_void_return_2.rs index 1e4092070f305..a9f80a103c2b3 100644 --- a/tests/ui/mir/mir_void_return_2.rs +++ b/tests/ui/mir/mir_void_return_2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass fn nil() {} fn mir(){ diff --git a/tests/ui/modules/issue-13872.rs b/tests/ui/modules/issue-13872.rs index a29f378c844cb..25d0a51db0736 100644 --- a/tests/ui/modules/issue-13872.rs +++ b/tests/ui/modules/issue-13872.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:issue-13872-1.rs //@ aux-build:issue-13872-2.rs //@ aux-build:issue-13872-3.rs diff --git a/tests/ui/modules/mod-pub-access.rs b/tests/ui/modules/mod-pub-access.rs index c07e7a2ff3062..4b11dc5ca08ed 100644 --- a/tests/ui/modules/mod-pub-access.rs +++ b/tests/ui/modules/mod-pub-access.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-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 diff --git a/tests/ui/modules/mod-same-item-names.rs b/tests/ui/modules/mod-same-item-names.rs index 1e9a9caa5fc5d..120cea31cc9f4 100644 --- a/tests/ui/modules/mod-same-item-names.rs +++ b/tests/ui/modules/mod-same-item-names.rs @@ -1,6 +1,6 @@ //! Test that items with identical names can coexist in different modules -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/modules/mod-view-items.rs b/tests/ui/modules/mod-view-items.rs index 2d25c83f36237..0da8402a90119 100644 --- a/tests/ui/modules/mod-view-items.rs +++ b/tests/ui/modules/mod-view-items.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test view items inside non-file-level mods // This is a regression test for an issue where we were failing to diff --git a/tests/ui/modules/module-qualified-paths-basic.rs b/tests/ui/modules/module-qualified-paths-basic.rs index c02f6060caa71..eb843a07a6d1b 100644 --- a/tests/ui/modules/module-qualified-paths-basic.rs +++ b/tests/ui/modules/module-qualified-paths-basic.rs @@ -1,6 +1,6 @@ //! Checks that functions from different modules are accessible via their fully-qualified paths. -//@ run-pass +//@ check-pass mod foo { pub fn x() -> isize { diff --git a/tests/ui/modules/module-super-access.rs b/tests/ui/modules/module-super-access.rs index 8acba607f6c06..e3aea1dc6e947 100644 --- a/tests/ui/modules/module-super-access.rs +++ b/tests/ui/modules/module-super-access.rs @@ -1,6 +1,6 @@ //! Check path resolution using `super` -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/modules/module-use-nested-groups.rs b/tests/ui/modules/module-use-nested-groups.rs index 84d1f9141a899..b4f971f700b4f 100644 --- a/tests/ui/modules/module-use-nested-groups.rs +++ b/tests/ui/modules/module-use-nested-groups.rs @@ -1,6 +1,6 @@ //! Checks complex `use` syntax and availability of types across nested modules. -//@ run-pass +//@ check-pass mod a { pub enum B {} diff --git a/tests/ui/modules/nested-modules-basic.rs b/tests/ui/modules/nested-modules-basic.rs index 12eccec280863..55c42e602cb70 100644 --- a/tests/ui/modules/nested-modules-basic.rs +++ b/tests/ui/modules/nested-modules-basic.rs @@ -1,6 +1,6 @@ //! Basic test for nested module functionality and path resolution -//@ run-pass +//@ check-pass mod inner { pub mod inner2 { diff --git a/tests/ui/modules/primitive-type-module-deprecated-paths.rs b/tests/ui/modules/primitive-type-module-deprecated-paths.rs index 5c9d2a616b3f0..3a173d249fc0a 100644 --- a/tests/ui/modules/primitive-type-module-deprecated-paths.rs +++ b/tests/ui/modules/primitive-type-module-deprecated-paths.rs @@ -1,7 +1,7 @@ //! Make sure the module level constants are still there and accessible even after //! the corresponding associated constants have been added, and later stabilized. -//@ run-pass +//@ check-pass #![allow(deprecated, deprecated_in_future)] use std::{f32, u16}; diff --git a/tests/ui/modules/special_module_name_ignore.rs b/tests/ui/modules/special_module_name_ignore.rs index a602b81b319b6..5b484f0db2a94 100644 --- a/tests/ui/modules/special_module_name_ignore.rs +++ b/tests/ui/modules/special_module_name_ignore.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[path = "auxiliary/dummy_lib.rs"] mod lib; diff --git a/tests/ui/modules/use-keyword-reexport-type-alias.rs b/tests/ui/modules/use-keyword-reexport-type-alias.rs index c62bd9687ae62..09c94b8da0975 100644 --- a/tests/ui/modules/use-keyword-reexport-type-alias.rs +++ b/tests/ui/modules/use-keyword-reexport-type-alias.rs @@ -1,7 +1,7 @@ //! Checks module re-exports, aliasing with `pub use`, //! and calling private methods via `Self` in an impl block. -//@ run-pass +//@ check-pass #![allow(unused_variables)] pub struct A; diff --git a/tests/ui/moves/move-nullary-fn.rs b/tests/ui/moves/move-nullary-fn.rs index 0480d2b10454e..a672770851ebb 100644 --- a/tests/ui/moves/move-nullary-fn.rs +++ b/tests/ui/moves/move-nullary-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Issue #922 fn f2(_thing: F) where F: FnOnce() { } diff --git a/tests/ui/nll/borrow-use-issue-46875.rs b/tests/ui/nll/borrow-use-issue-46875.rs index 9917fc2c86e56..f879fd952fd66 100644 --- a/tests/ui/nll/borrow-use-issue-46875.rs +++ b/tests/ui/nll/borrow-use-issue-46875.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn vec() { let mut _x = vec!['c']; diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs index 73597408d1061..4d60126724598 100644 --- a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs +++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs @@ -1,5 +1,5 @@ // -//@ run-pass +//@ check-pass // // FIXME(#54366) - We probably shouldn't allow #[thread_local] static mut to get a 'static lifetime. diff --git a/tests/ui/nll/issue-45696-no-variant-box-recur.rs b/tests/ui/nll/issue-45696-no-variant-box-recur.rs index 5ede76ef87bb3..682d7fd755cac 100644 --- a/tests/ui/nll/issue-45696-no-variant-box-recur.rs +++ b/tests/ui/nll/issue-45696-no-variant-box-recur.rs @@ -3,7 +3,7 @@ // to construct but *is* possible to declare; see also issues #4287, #44933, // and #52852). -//@ run-pass +//@ check-pass // This test has structs and functions that are by definition unusable // all over the place, so just go ahead and allow dead_code diff --git a/tests/ui/nll/issue-47153-generic-const.rs b/tests/ui/nll/issue-47153-generic-const.rs index b8a435f37ed1a..34473951ffb80 100644 --- a/tests/ui/nll/issue-47153-generic-const.rs +++ b/tests/ui/nll/issue-47153-generic-const.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Regression test for #47153: constants in a generic context (such as // a trait) used to ICE. diff --git a/tests/ui/nll/issue-47589.rs b/tests/ui/nll/issue-47589.rs index 5d7500407a887..12366bb064b40 100644 --- a/tests/ui/nll/issue-47589.rs +++ b/tests/ui/nll/issue-47589.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub struct DescriptorSet<'a> { pub slots: Vec> diff --git a/tests/ui/nll/issue-48070.rs b/tests/ui/nll/issue-48070.rs index 263fdce60982d..833349dd1a41f 100644 --- a/tests/ui/nll/issue-48070.rs +++ b/tests/ui/nll/issue-48070.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Foo { x: u32 diff --git a/tests/ui/nll/issue-48623-closure.rs b/tests/ui/nll/issue-48623-closure.rs index e781cfb13921c..3605ea9ae350d 100644 --- a/tests/ui/nll/issue-48623-closure.rs +++ b/tests/ui/nll/issue-48623-closure.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-48623-coroutine.rs b/tests/ui/nll/issue-48623-coroutine.rs index 57f579106b7a9..3d98a4b8a5d2e 100644 --- a/tests/ui/nll/issue-48623-coroutine.rs +++ b/tests/ui/nll/issue-48623-coroutine.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(path_statements)] #![allow(dead_code)] @@ -12,7 +12,7 @@ impl Drop for WithDrop { fn reborrow_from_coroutine(r: &mut ()) { let d = WithDrop; - #[coroutine] move || { d; yield; &mut *r }; //~ WARN unused coroutine that must be used + #[coroutine] move || { d; yield; &mut *r }; } fn main() {} diff --git a/tests/ui/nll/issue-48623-coroutine.stderr b/tests/ui/nll/issue-48623-coroutine.stderr deleted file mode 100644 index 2862d7b2a2f05..0000000000000 --- a/tests/ui/nll/issue-48623-coroutine.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: unused coroutine that must be used - --> $DIR/issue-48623-coroutine.rs:15:18 - | -LL | #[coroutine] move || { d; yield; &mut *r }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/nll/issue-50343.rs b/tests/ui/nll/issue-50343.rs index d238aa8b9eb2d..331e8e437cc02 100644 --- a/tests/ui/nll/issue-50343.rs +++ b/tests/ui/nll/issue-50343.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-50461-used-mut-from-moves.rs b/tests/ui/nll/issue-50461-used-mut-from-moves.rs index 59103afa22617..19f05dae7a4fb 100644 --- a/tests/ui/nll/issue-50461-used-mut-from-moves.rs +++ b/tests/ui/nll/issue-50461-used-mut-from-moves.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-52057.rs b/tests/ui/nll/issue-52057.rs index fabee5b0d9721..9a4d35968ecf6 100644 --- a/tests/ui/nll/issue-52057.rs +++ b/tests/ui/nll/issue-52057.rs @@ -2,7 +2,7 @@ // that `I: 'x` where `'x` is the lifetime of the reference `&mut Self::Input` // in `parse_first`; but to observe that, one must normalize first. // -//@ run-pass +//@ check-pass pub trait Parser { type Input; diff --git a/tests/ui/nll/issue-53123-raw-pointer-cast.rs b/tests/ui/nll/issue-53123-raw-pointer-cast.rs index e954a2c5ff535..ed78357455852 100644 --- a/tests/ui/nll/issue-53123-raw-pointer-cast.rs +++ b/tests/ui/nll/issue-53123-raw-pointer-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/nll/user-annotations/issue-55241.rs b/tests/ui/nll/user-annotations/issue-55241.rs index 094f8da2452ac..7c2f6bab107c8 100644 --- a/tests/ui/nll/user-annotations/issue-55241.rs +++ b/tests/ui/nll/user-annotations/issue-55241.rs @@ -5,7 +5,7 @@ // value of `_`; solving that requires having normalized, so we can // test against `C: NodeCodec` in the environment. // -//@ run-pass +//@ check-pass pub trait Hasher { type Out: Eq; diff --git a/tests/ui/no_std/no-core-edition2018-syntax.rs b/tests/ui/no_std/no-core-edition2018-syntax.rs index 9a327e4c8e316..58644830b5285 100644 --- a/tests/ui/no_std/no-core-edition2018-syntax.rs +++ b/tests/ui/no_std/no-core-edition2018-syntax.rs @@ -5,7 +5,7 @@ //! This test makes sure that after doing that, things like `for` loops and the //! `?` operator still work as expected. -//@ run-pass +//@ check-pass //@ edition:2018 #![allow(dead_code, unused_imports)] diff --git a/tests/ui/non_modrs_mods/non_modrs_mods.rs b/tests/ui/non_modrs_mods/non_modrs_mods.rs index acc326dd0e0f4..6ee81abea1025 100644 --- a/tests/ui/non_modrs_mods/non_modrs_mods.rs +++ b/tests/ui/non_modrs_mods/non_modrs_mods.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // pub mod modrs_mod; pub mod foors_mod; diff --git a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs index b61ca05495432..2f1b308277926 100644 --- a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs +++ b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Forces evaluation of constants, triggering hard error fn force(_: T) {} diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs index 2cbbdfc6479f1..7b9f0e92158c1 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn foo(_: *const ()) {} diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs index ed59bba119606..0e1852c150766 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { fn id_i8(n: i8) -> i8 { n } diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs index 2402bb24d787f..160b60edf3819 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `Box` struct. diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs index 988cef49fe03e..2e52045c75a7a 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `MyBox` struct. diff --git a/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs b/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs index 040f03c08b4fb..42414878d48f9 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs @@ -1,6 +1,6 @@ // Tests that :pat in macros in edition 2021 allows top-level or-patterns. -//@ run-pass +//@ check-pass //@ edition:2021 macro_rules! accept_pat { diff --git a/tests/ui/overloaded/fixup-deref-mut.rs b/tests/ui/overloaded/fixup-deref-mut.rs index f8d3e678f0c0b..fd3faa98f2fd7 100644 --- a/tests/ui/overloaded/fixup-deref-mut.rs +++ b/tests/ui/overloaded/fixup-deref-mut.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs b/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs index 143a9ec04476b..7e63b84ba0fdf 100644 --- a/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs +++ b/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609). diff --git a/tests/ui/packed/issue-46152.rs b/tests/ui/packed/issue-46152.rs index 5b2e4bbfdf243..c3265498578b1 100644 --- a/tests/ui/packed/issue-46152.rs +++ b/tests/ui/packed/issue-46152.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_local_definitions)] diff --git a/tests/ui/parser/doc-comment-parsing.rs b/tests/ui/parser/doc-comment-parsing.rs index 00f6b0e09a892..0da2f7518b5f1 100644 --- a/tests/ui/parser/doc-comment-parsing.rs +++ b/tests/ui/parser/doc-comment-parsing.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/10638 -//@ run-pass +//@ check-pass pub fn main() { //// I am not a doc comment! diff --git a/tests/ui/parser/integer-literal-method-call-underscore.rs b/tests/ui/parser/integer-literal-method-call-underscore.rs index 9e4abf28cbaa6..c54740da7fab5 100644 --- a/tests/ui/parser/integer-literal-method-call-underscore.rs +++ b/tests/ui/parser/integer-literal-method-call-underscore.rs @@ -2,7 +2,7 @@ //! successfully called directly on integer literals, confirming the correct //! parsing of such expressions where the underscore is part of the method identifier. -//@ run-pass +//@ check-pass trait Tr: Sized { fn _method_on_numbers(self) {} diff --git a/tests/ui/parser/issues/issue-21475.rs b/tests/ui/parser/issues/issue-21475.rs index 43dc7c53a7085..e07b866ba4c2e 100644 --- a/tests/ui/parser/issues/issue-21475.rs +++ b/tests/ui/parser/issues/issue-21475.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports, overlapping_range_endpoints)] use m::{START, END}; diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs index 54adfce93a4bb..cf7bb5ea0349f 100644 --- a/tests/ui/parser/issues/issue-48508.rs +++ b/tests/ui/parser/issues/issue-48508.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Regression test for issue #48508: // // Confusion between global and local file offsets caused incorrect handling of multibyte character diff --git a/tests/ui/parser/issues/issue-7222.rs b/tests/ui/parser/issues/issue-7222.rs index d601731dc7734..8a5a0e701f5b5 100644 --- a/tests/ui/parser/issues/issue-7222.rs +++ b/tests/ui/parser/issues/issue-7222.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { const FOO: f64 = 10.0; diff --git a/tests/ui/parser/multiline-comments-basic.rs b/tests/ui/parser/multiline-comments-basic.rs index 1aa2a531f5cc2..9d6bdb2a0b6f9 100644 --- a/tests/ui/parser/multiline-comments-basic.rs +++ b/tests/ui/parser/multiline-comments-basic.rs @@ -2,7 +2,7 @@ //! //! Feature implementation test for . -//@ run-pass +//@ check-pass /* * This is a multi-line comment. diff --git a/tests/ui/parser/nested-block-comments.rs b/tests/ui/parser/nested-block-comments.rs index 8fe778963619c..a6ba6bf13c3c9 100644 --- a/tests/ui/parser/nested-block-comments.rs +++ b/tests/ui/parser/nested-block-comments.rs @@ -2,7 +2,7 @@ //! //! See . -//@ run-pass +//@ check-pass /* This test checks that nested comments are supported diff --git a/tests/ui/parser/pattern-matching-with-double-references-61475.rs b/tests/ui/parser/pattern-matching-with-double-references-61475.rs index bf800ec8b2c66..f526b16b2ff34 100644 --- a/tests/ui/parser/pattern-matching-with-double-references-61475.rs +++ b/tests/ui/parser/pattern-matching-with-double-references-61475.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/61475 -//@ run-pass +//@ check-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/reference-whitespace-parsing.rs b/tests/ui/parser/reference-whitespace-parsing.rs index 7109c5911aef9..249e2d503479b 100644 --- a/tests/ui/parser/reference-whitespace-parsing.rs +++ b/tests/ui/parser/reference-whitespace-parsing.rs @@ -1,6 +1,6 @@ //! Test parsing of multiple references with various whitespace arrangements -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/parser/slowparse-bstring.rs b/tests/ui/parser/slowparse-bstring.rs index facfa8bb8529b..9aa387ce66bab 100644 --- a/tests/ui/parser/slowparse-bstring.rs +++ b/tests/ui/parser/slowparse-bstring.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/slowparse-string.rs b/tests/ui/parser/slowparse-string.rs index 977aa7c8766f9..5dee3cad28a86 100644 --- a/tests/ui/parser/slowparse-string.rs +++ b/tests/ui/parser/slowparse-string.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/syntactic-trailing-commas.rs b/tests/ui/parser/syntactic-trailing-commas.rs index ba688dffb3c46..b9e33d493aeb3 100644 --- a/tests/ui/parser/syntactic-trailing-commas.rs +++ b/tests/ui/parser/syntactic-trailing-commas.rs @@ -6,7 +6,7 @@ //! - Enum variant declarations. //! - Attributes. -//@ run-pass +//@ check-pass fn f(_: T,) {} diff --git a/tests/ui/parser/ufcs-return-unused-parens.fixed b/tests/ui/parser/ufcs-return-unused-parens.fixed index 811a853b76933..3c35f75612a6b 100644 --- a/tests/ui/parser/ufcs-return-unused-parens.fixed +++ b/tests/ui/parser/ufcs-return-unused-parens.fixed @@ -3,7 +3,7 @@ //! //! Regression test for . -//@ run-pass +//@ check-pass //@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/ufcs-return-unused-parens.rs b/tests/ui/parser/ufcs-return-unused-parens.rs index 6ea69ef9a2627..d31ae98f99b34 100644 --- a/tests/ui/parser/ufcs-return-unused-parens.rs +++ b/tests/ui/parser/ufcs-return-unused-parens.rs @@ -3,7 +3,7 @@ //! //! Regression test for . -//@ run-pass +//@ check-pass //@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/pattern/integer-range-binding.rs b/tests/ui/pattern/integer-range-binding.rs index a1838c0c997bc..89b0646eb36ef 100644 --- a/tests/ui/pattern/integer-range-binding.rs +++ b/tests/ui/pattern/integer-range-binding.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { let -2147483648..=2147483647 = 1; diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024.rs b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs index a4afcb2e5111c..b720527aca851 100644 --- a/tests/ui/pattern/mut_preserve_binding_mode_2024.rs +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ edition: 2024 #![feature(mut_ref, ref_pat_eat_one_layer_2024)] #![allow(incomplete_features, unused)] diff --git a/tests/ui/pattern/usefulness/irrefutable-unit.rs b/tests/ui/pattern/usefulness/irrefutable-unit.rs index 9a48b1a8679b7..d25d480925ca2 100644 --- a/tests/ui/pattern/usefulness/irrefutable-unit.rs +++ b/tests/ui/pattern/usefulness/irrefutable-unit.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub fn main() { let ((),()) = ((),()); diff --git a/tests/ui/privacy/privacy-ns.rs b/tests/ui/privacy/privacy-ns.rs index ab3d79e40f918..bd604e2f178e2 100644 --- a/tests/ui/privacy/privacy-ns.rs +++ b/tests/ui/privacy/privacy-ns.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/privacy/privacy-reexport.rs b/tests/ui/privacy/privacy-reexport.rs index 74ac7cdce94fe..5aba78003211c 100644 --- a/tests/ui/privacy/privacy-reexport.rs +++ b/tests/ui/privacy/privacy-reexport.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:privacy_reexport.rs diff --git a/tests/ui/privacy/privacy1-rpass.rs b/tests/ui/privacy/privacy1-rpass.rs index 546492c870947..1d1b6afe68ae5 100644 --- a/tests/ui/privacy/privacy1-rpass.rs +++ b/tests/ui/privacy/privacy1-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] pub mod test2 { diff --git a/tests/ui/privacy/private-method-rpass.rs b/tests/ui/privacy/private-method-rpass.rs index f62dd682d2bc4..ff18bc6112c48 100644 --- a/tests/ui/privacy/private-method-rpass.rs +++ b/tests/ui/privacy/private-method-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/privacy/pub-priv-dep/std-pub.rs b/tests/ui/privacy/pub-priv-dep/std-pub.rs index 348e8d10735a3..f7a5bb061dbbb 100644 --- a/tests/ui/privacy/pub-priv-dep/std-pub.rs +++ b/tests/ui/privacy/pub-priv-dep/std-pub.rs @@ -1,7 +1,7 @@ // The 'std' crates should always be implicitly public, // without having to pass any compiler arguments -//@ run-pass +//@ check-pass #![deny(exported_private_dependencies)] diff --git a/tests/ui/privacy/pub-restricted-path-usage-55376.rs b/tests/ui/privacy/pub-restricted-path-usage-55376.rs index ca4e27c30a8fc..461f7151e424a 100644 --- a/tests/ui/privacy/pub-restricted-path-usage-55376.rs +++ b/tests/ui/privacy/pub-restricted-path-usage-55376.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55376 -//@ run-pass +//@ build-pass // Tests that paths in `pub(...)` don't fail HIR verification. #![allow(unused_imports)] diff --git a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs index f986bfb76e117..c3ab13f94036f 100644 --- a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs +++ b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:pub_use_mods_xcrate.rs diff --git a/tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs b/tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs index 8f05e937d5941..1cf2fd0ab43f8 100644 --- a/tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs +++ b/tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs @@ -3,7 +3,7 @@ //! //! Regression test: -//@ run-pass +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/ptr_ops/raw-pointer-type-basic.rs b/tests/ui/ptr_ops/raw-pointer-type-basic.rs index 349e8e67909fd..6425fceaca095 100644 --- a/tests/ui/ptr_ops/raw-pointer-type-basic.rs +++ b/tests/ui/ptr_ops/raw-pointer-type-basic.rs @@ -1,6 +1,6 @@ //! Checks the basic usage of raw pointers (`*const isize`) as function argument and return types. -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/reachable/boolean-negation-in-unreachable-code-7344.rs b/tests/ui/reachable/boolean-negation-in-unreachable-code-7344.rs index 8fd091872c310..b7c58361c4285 100644 --- a/tests/ui/reachable/boolean-negation-in-unreachable-code-7344.rs +++ b/tests/ui/reachable/boolean-negation-in-unreachable-code-7344.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/7344 -//@ run-pass +//@ check-pass #![allow(unused_must_use)] #![allow(unreachable_code)] diff --git a/tests/ui/reachable/diverging-expressions-unreachable-code.rs b/tests/ui/reachable/diverging-expressions-unreachable-code.rs index bb56987775ff2..ec77680ef182c 100644 --- a/tests/ui/reachable/diverging-expressions-unreachable-code.rs +++ b/tests/ui/reachable/diverging-expressions-unreachable-code.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_must_use)] #![allow(unreachable_code)] diff --git a/tests/ui/reachable/reachable-unnameable-type-alias.rs b/tests/ui/reachable/reachable-unnameable-type-alias.rs index 7e71cb1f113b3..dfb9ff1b53f51 100644 --- a/tests/ui/reachable/reachable-unnameable-type-alias.rs +++ b/tests/ui/reachable/reachable-unnameable-type-alias.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(staged_api)] #![stable(feature = "a", since = "3.3.3")] diff --git a/tests/ui/reachable/unreachable-code-diverging-expressions.rs b/tests/ui/reachable/unreachable-code-diverging-expressions.rs index c3bfbffcd58e0..a87675dea8570 100644 --- a/tests/ui/reachable/unreachable-code-diverging-expressions.rs +++ b/tests/ui/reachable/unreachable-code-diverging-expressions.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/recursion/future-stream-buffer-unordered-40003.rs b/tests/ui/recursion/future-stream-buffer-unordered-40003.rs index 6bc40690dad86..764ed39821ef4 100644 --- a/tests/ui/recursion/future-stream-buffer-unordered-40003.rs +++ b/tests/ui/recursion/future-stream-buffer-unordered-40003.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_must_use)] fn main() { if false { test(); } diff --git a/tests/ui/recursion/instantiable.rs b/tests/ui/recursion/instantiable.rs index 3fe50e8d011e9..f43476c149933 100644 --- a/tests/ui/recursion/instantiable.rs +++ b/tests/ui/recursion/instantiable.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs b/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs index fe10b8907006e..1a792a27f9d29 100644 --- a/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs +++ b/tests/ui/recursion/recursion-tail-call-no-arg-leak.rs @@ -2,7 +2,7 @@ //! //! Regression test for: -//@ run-pass +//@ build-pass fn inner(dummy: String, b: bool) { if b { diff --git a/tests/ui/recursion/recursive-enum-box.rs b/tests/ui/recursion/recursive-enum-box.rs index 540b0c553603c..e0ffeaf4f2ba1 100644 --- a/tests/ui/recursion/recursive-enum-box.rs +++ b/tests/ui/recursion/recursive-enum-box.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // A smoke test for recursive enum structures using Box. // This test constructs a linked list-like structure to exercise memory allocation and ownership. // Originally introduced in 2010, this is one of Rust’s earliest test cases. diff --git a/tests/ui/recursion/recursive-struct-with-raw-pointer-field.rs b/tests/ui/recursion/recursive-struct-with-raw-pointer-field.rs index 97fa08fab1d93..0b70f7143acce 100644 --- a/tests/ui/recursion/recursive-struct-with-raw-pointer-field.rs +++ b/tests/ui/recursion/recursive-struct-with-raw-pointer-field.rs @@ -1,5 +1,5 @@ //! Regression test for -//@ run-pass +//@ check-pass #![allow(dead_code)] // check that we handle recursive arrays correctly in `type_of` diff --git a/tests/ui/regions/issue-6157.rs b/tests/ui/regions/issue-6157.rs index 8d3002e52c858..66a40b363212b 100644 --- a/tests/ui/regions/issue-6157.rs +++ b/tests/ui/regions/issue-6157.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait OpInt { fn call(&mut self, _: isize, _: isize) -> isize; } diff --git a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs index 9dd49d35d44a4..91b4bf2c15016 100644 --- a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs +++ b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/regions/regions-assoc-type-region-bound.rs b/tests/ui/regions/regions-assoc-type-region-bound.rs index 86c8359b61a0d..280fbd944a0f8 100644 --- a/tests/ui/regions/regions-assoc-type-region-bound.rs +++ b/tests/ui/regions/regions-assoc-type-region-bound.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test that the compiler considers the 'a bound declared in the // trait. Issue #20890. diff --git a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs index 6cdae0d49081e..6207c8148b0d9 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] trait Foo { diff --git a/tests/ui/regions/regions-bound-lists-feature-gate.rs b/tests/ui/regions/regions-bound-lists-feature-gate.rs index 23878f5b406f1..3c11d50647fad 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-creating-enums2.rs b/tests/ui/regions/regions-creating-enums2.rs index de6e51b1fbd64..53945b1113ff4 100644 --- a/tests/ui/regions/regions-creating-enums2.rs +++ b/tests/ui/regions/regions-creating-enums2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-creating-enums5.rs b/tests/ui/regions/regions-creating-enums5.rs index 14221a9d75f6c..c715b0ee34f70 100644 --- a/tests/ui/regions/regions-creating-enums5.rs +++ b/tests/ui/regions/regions-creating-enums5.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-debruijn-of-object.rs b/tests/ui/regions/regions-debruijn-of-object.rs index a2de66aef3709..9513e110dfa19 100644 --- a/tests/ui/regions/regions-debruijn-of-object.rs +++ b/tests/ui/regions/regions-debruijn-of-object.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-dependent-autofn.rs b/tests/ui/regions/regions-dependent-autofn.rs index c58ae5e24ee3e..819d1b2c77874 100644 --- a/tests/ui/regions/regions-dependent-autofn.rs +++ b/tests/ui/regions/regions-dependent-autofn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. diff --git a/tests/ui/regions/regions-dependent-autoslice.rs b/tests/ui/regions/regions-dependent-autoslice.rs index 3672b99151d3e..003d25e12bc6e 100644 --- a/tests/ui/regions/regions-dependent-autoslice.rs +++ b/tests/ui/regions/regions-dependent-autoslice.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. diff --git a/tests/ui/regions/regions-dependent-let-ref.rs b/tests/ui/regions/regions-dependent-let-ref.rs index 23b46abc91d25..16abdd0965943 100644 --- a/tests/ui/regions/regions-dependent-let-ref.rs +++ b/tests/ui/regions/regions-dependent-let-ref.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test lifetimes are linked properly when we take reference // to interior. diff --git a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs index c08142154edbd..8b21f3c5ea128 100644 --- a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs +++ b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] // Test that we are able to compile calls to associated fns like // `decode()` where the bound on the `Self` parameter references a diff --git a/tests/ui/regions/regions-expl-self.rs b/tests/ui/regions/regions-expl-self.rs index 552204867f630..665719885b550 100644 --- a/tests/ui/regions/regions-expl-self.rs +++ b/tests/ui/regions/regions-expl-self.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test that you can insert an explicit lifetime in explicit self. diff --git a/tests/ui/regions/regions-fn-subtyping-2.rs b/tests/ui/regions/regions-fn-subtyping-2.rs index 98be8de8671b7..6bdddd4b234ec 100644 --- a/tests/ui/regions/regions-fn-subtyping-2.rs +++ b/tests/ui/regions/regions-fn-subtyping-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Issue #2263. diff --git a/tests/ui/regions/regions-fn-subtyping.rs b/tests/ui/regions/regions-fn-subtyping.rs index dacd2f007c107..e2a4de9b2487a 100644 --- a/tests/ui/regions/regions-fn-subtyping.rs +++ b/tests/ui/regions/regions-fn-subtyping.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] // Issue #2263. diff --git a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs index f4e5c3a93a653..479ce6502c3fa 100644 --- a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs +++ b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test an edge case in region inference: the lifetime of the borrow // of `*x` must be extended to at least 'a. diff --git a/tests/ui/regions/regions-issue-21422.rs b/tests/ui/regions/regions-issue-21422.rs index 25f5d0f50139f..587c12dbe40bd 100644 --- a/tests/ui/regions/regions-issue-21422.rs +++ b/tests/ui/regions/regions-issue-21422.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Regression test for issue #21422, which was related to failing to // add inference constraints that the operands of a binary operator // should outlive the binary operation itself. diff --git a/tests/ui/regions/regions-issue-22246.rs b/tests/ui/regions/regions-issue-22246.rs index c943f33150eab..0d3c30b74094e 100644 --- a/tests/ui/regions/regions-issue-22246.rs +++ b/tests/ui/regions/regions-issue-22246.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_imports)] // Regression test for issue #22246 -- we should be able to deduce // that `&'a B::Owned` implies that `B::Owned : 'a`. diff --git a/tests/ui/regions/regions-link-fn-args.rs b/tests/ui/regions/regions-link-fn-args.rs index 9172ebf9664fe..328e6ca5ec2d8 100644 --- a/tests/ui/regions/regions-link-fn-args.rs +++ b/tests/ui/regions/regions-link-fn-args.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that region inference correctly links up the regions when a // `ref` borrow occurs inside a fn argument. diff --git a/tests/ui/regions/regions-lub-ref-ref-rc.rs b/tests/ui/regions/regions-lub-ref-ref-rc.rs index d20bc73940671..58362c279c869 100644 --- a/tests/ui/regions/regions-lub-ref-ref-rc.rs +++ b/tests/ui/regions/regions-lub-ref-ref-rc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test a corner case of LUB coercion. In this case, one arm of the // match requires a deref coercion and the other doesn't, and there diff --git a/tests/ui/regions/regions-mock-codegen.rs b/tests/ui/regions/regions-mock-codegen.rs index 99c863640669e..2749b03f65d2d 100644 --- a/tests/ui/regions/regions-mock-codegen.rs +++ b/tests/ui/regions/regions-mock-codegen.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![feature(allocator_api)] diff --git a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs index 3836c661df8ef..4d958030483ae 100644 --- a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs +++ b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::marker; diff --git a/tests/ui/regions/regions-nullary-variant.rs b/tests/ui/regions/regions-nullary-variant.rs index 24c5c6765a86c..6cb2a2a280297 100644 --- a/tests/ui/regions/regions-nullary-variant.rs +++ b/tests/ui/regions/regions-nullary-variant.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-reassign-let-bound-pointer.rs b/tests/ui/regions/regions-reassign-let-bound-pointer.rs index 7ecfd95851271..32658e759c735 100644 --- a/tests/ui/regions/regions-reassign-let-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-let-bound-pointer.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which diff --git a/tests/ui/regions/regions-reassign-match-bound-pointer.rs b/tests/ui/regions/regions-reassign-match-bound-pointer.rs index e549804db4363..2b174d789cd69 100644 --- a/tests/ui/regions/regions-reassign-match-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-match-bound-pointer.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which diff --git a/tests/ui/regions/regions-scope-chain-example.rs b/tests/ui/regions/regions-scope-chain-example.rs index 184ce01589233..4f2eef853df32 100644 --- a/tests/ui/regions/regions-scope-chain-example.rs +++ b/tests/ui/regions/regions-scope-chain-example.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] // This is an example where the older inference algorithm failed. The diff --git a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs index db7cf869450b4..9ba93825d195c 100644 --- a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs +++ b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that a type which is contravariant with respect to its region diff --git a/tests/ui/regions/wf-bound-region-in-object-type.rs b/tests/ui/regions/wf-bound-region-in-object-type.rs index c77845ab3060b..a85515c87228f 100644 --- a/tests/ui/regions/wf-bound-region-in-object-type.rs +++ b/tests/ui/regions/wf-bound-region-in-object-type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/repr/packed-struct-with-enum-53728.rs b/tests/ui/repr/packed-struct-with-enum-53728.rs index 6ce65ed634fc5..f54e8e4d60918 100644 --- a/tests/ui/repr/packed-struct-with-enum-53728.rs +++ b/tests/ui/repr/packed-struct-with-enum-53728.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/53728 -//@ run-pass +//@ check-pass #![allow(dead_code)] #[repr(u16)] diff --git a/tests/ui/resolve/blind-item-mixed-use-item.rs b/tests/ui/resolve/blind-item-mixed-use-item.rs index 7796233c41991..bb1cb41141a87 100644 --- a/tests/ui/resolve/blind-item-mixed-use-item.rs +++ b/tests/ui/resolve/blind-item-mixed-use-item.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass mod m { pub fn f(_: T, _: ()) { } diff --git a/tests/ui/resolve/primitive-usage.rs b/tests/ui/resolve/primitive-usage.rs index b00d18a4e1e88..31c17a0b7d8f1 100644 --- a/tests/ui/resolve/primitive-usage.rs +++ b/tests/ui/resolve/primitive-usage.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused)] #![feature(f128)] #![feature(f16)] diff --git a/tests/ui/resolve/reference-clone-nonclone-11820.rs b/tests/ui/resolve/reference-clone-nonclone-11820.rs index 74dad96da94e2..00f03b3c16816 100644 --- a/tests/ui/resolve/reference-clone-nonclone-11820.rs +++ b/tests/ui/resolve/reference-clone-nonclone-11820.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/11820 -//@ run-pass +//@ check-pass #![allow(noop_method_call)] diff --git a/tests/ui/resolve/resolve-pseudo-shadowing.rs b/tests/ui/resolve/resolve-pseudo-shadowing.rs index a5aad3c669cc2..7414c98808be0 100644 --- a/tests/ui/resolve/resolve-pseudo-shadowing.rs +++ b/tests/ui/resolve/resolve-pseudo-shadowing.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // check that type parameters can't "shadow" qualified paths. fn check(_c: Clone) { diff --git a/tests/ui/resolve/struct-function-same-name-2445.rs b/tests/ui/resolve/struct-function-same-name-2445.rs index 8a0490efa3aa7..2c452a3c3c22b 100644 --- a/tests/ui/resolve/struct-function-same-name-2445.rs +++ b/tests/ui/resolve/struct-function-same-name-2445.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/2445 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/resolve/struct-function-same-name-2550.rs b/tests/ui/resolve/struct-function-same-name-2550.rs index c96f58374c6dc..1373d0e252078 100644 --- a/tests/ui/resolve/struct-function-same-name-2550.rs +++ b/tests/ui/resolve/struct-function-same-name-2550.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/2550 -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/resolve/type-param-local-var-shadowing.rs b/tests/ui/resolve/type-param-local-var-shadowing.rs index e08379e2acff9..6a00f06d73577 100644 --- a/tests/ui/resolve/type-param-local-var-shadowing.rs +++ b/tests/ui/resolve/type-param-local-var-shadowing.rs @@ -2,7 +2,7 @@ //! //! Regression test for https://github.com/rust-lang/rust/issues/23880 -//@ run-pass +//@ check-pass #![allow(unused)] struct Foo { diff --git a/tests/ui/return/early-return-with-unreachable-code-24353.rs b/tests/ui/return/early-return-with-unreachable-code-24353.rs index 13add4652d994..7f82cc55a1ee5 100644 --- a/tests/ui/return/early-return-with-unreachable-code-24353.rs +++ b/tests/ui/return/early-return-with-unreachable-code-24353.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unreachable_code)] fn main() { return (); diff --git a/tests/ui/return/return-nil.rs b/tests/ui/return/return-nil.rs index c2591a77b3015..224f8bc1c6e6c 100644 --- a/tests/ui/return/return-nil.rs +++ b/tests/ui/return/return-nil.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn f() { let x = (); return x; } diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs index ad4e0d070da34..cfbef2dbc80e2 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs @@ -4,7 +4,7 @@ // // See rust-lang/rust#62336. -//@ run-pass +//@ check-pass #[derive(PartialEq, Debug)] struct B(i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs index 7250da54c6c75..9cdefcd63be5c 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] macro_rules! foo { diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs index b297ec1b4e240..fc472447109f9 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #[derive(PartialEq, Eq)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs index fd343eaeea95b..f00e31fd8c991 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::error::Error; fn main() -> Result<(), Box> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs index 016bccc056c36..784351cbee9a6 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs @@ -1,2 +1,2 @@ -//@ run-pass +//@ check-pass fn main() {} diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs index 8a5b962e68196..31d3285a6d58e 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::io::Error; fn main() -> Result<(), Box> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs index ce29a8239e87b..bb2e3d90228ab 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::io::Error; fn main() -> Result<(), Error> { diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs index 2a89eefd46136..05430c1afface 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #[non_exhaustive] pub enum NonExhaustiveEnum { diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs index 9982e88874c0c..499fa2b1b235b 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs index 7630f2753d9d9..4152d27baa882 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub enum NonExhaustiveVariants { #[non_exhaustive] Unit, diff --git a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs index 63d06d42b1ac7..ca91d0d530367 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ revisions: default mir-opt //@[mir-opt] compile-flags: -Zmir-opt-level=4 diff --git a/tests/ui/rfcs/rfc-2091-track-caller/shim-does-not-modify-symbol.rs b/tests/ui/rfcs/rfc-2091-track-caller/shim-does-not-modify-symbol.rs index 255e2c159f119..1ca517e7aa12b 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/shim-does-not-modify-symbol.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/shim-does-not-modify-symbol.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(rustc_attrs)] // The shim that is generated for a function annotated with `#[track_caller]` should not inherit diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs index c6ce001806d1b..037b1741f2f0e 100644 --- a/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs +++ b/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs @@ -3,7 +3,7 @@ // Private>::Out: 'a`, but the private trait is -- well -- private, // and hence it was not something that a pub trait could refer to. // -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/if_let_guard_indirect_let_chains.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/if_let_guard_indirect_let_chains.rs index 9c9d1b9f1350a..51a92a1f9f48e 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/if_let_guard_indirect_let_chains.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/if_let_guard_indirect_let_chains.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/93150 -//@ run-pass +//@ check-pass fn main() { match true { diff --git a/tests/ui/rust-2018/uniform-paths/redundant.rs b/tests/ui/rust-2018/uniform-paths/redundant.rs index c7eca0c9e00f4..c93d212213945 100644 --- a/tests/ui/rust-2018/uniform-paths/redundant.rs +++ b/tests/ui/rust-2018/uniform-paths/redundant.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ edition:2018 use std; diff --git a/tests/ui/rustc-env/rust-log.rs b/tests/ui/rustc-env/rust-log.rs index 10040754593c2..df68a5a5ee9c5 100644 --- a/tests/ui/rustc-env/rust-log.rs +++ b/tests/ui/rustc-env/rust-log.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // This test is just checking that we won't ICE if logging is turned // on; don't bother trying to compare that (copious) output. // diff --git a/tests/ui/shadowed/use-shadows-reexport.rs b/tests/ui/shadowed/use-shadows-reexport.rs index d220e4b406be8..0031dfa9b87ed 100644 --- a/tests/ui/shadowed/use-shadows-reexport.rs +++ b/tests/ui/shadowed/use-shadows-reexport.rs @@ -1,6 +1,6 @@ //! Check that a local `use` declaration can shadow a re-exported item within the same module. -//@ run-pass +//@ check-pass #![allow(unused_imports)] mod foo { diff --git a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs index 49a26ff57341c..75074fe1c67f5 100644 --- a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs +++ b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs @@ -1,7 +1,7 @@ // This used to cause an ICE for an internal index out of range due to simd_shuffle_indices being // passed the wrong Instance, causing issues with inlining. See #67557. // -//@ run-pass +//@ build-pass //@ compile-flags: -Zmir-opt-level=4 #![feature(core_intrinsics, repr_simd)] diff --git a/tests/ui/simd/libm_std_can_float.rs b/tests/ui/simd/libm_std_can_float.rs index 520b7d09ae96f..c0e1edcce029e 100644 --- a/tests/ui/simd/libm_std_can_float.rs +++ b/tests/ui/simd/libm_std_can_float.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // This is the converse of the other libm test. #![feature(portable_simd)] diff --git a/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs b/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs index b3e228970d009..8bd31ef0908d4 100644 --- a/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs +++ b/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(repr_simd, intrinsics)] diff --git a/tests/ui/sized/coinductive-2.rs b/tests/ui/sized/coinductive-2.rs index 277dd8c878aa1..ceebdbca6b8a1 100644 --- a/tests/ui/sized/coinductive-2.rs +++ b/tests/ui/sized/coinductive-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass struct Node> { _children: C::Collection, } @@ -11,7 +11,7 @@ impl CollectionFactory for Vec<()> { type Collection = Vec; } -trait Collection: Sized { //~ WARN trait `Collection` is never used +trait Collection: Sized { fn push(&mut self, v: T); } diff --git a/tests/ui/sized/coinductive-2.stderr b/tests/ui/sized/coinductive-2.stderr deleted file mode 100644 index 5faec7397e295..0000000000000 --- a/tests/ui/sized/coinductive-2.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `Collection` is never used - --> $DIR/coinductive-2.rs:14:7 - | -LL | trait Collection: Sized { - | ^^^^^^^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/sized/sized-box-unsized-content.rs b/tests/ui/sized/sized-box-unsized-content.rs index 9cc202a1582fd..f69cbe0293855 100644 --- a/tests/ui/sized/sized-box-unsized-content.rs +++ b/tests/ui/sized/sized-box-unsized-content.rs @@ -1,6 +1,6 @@ //! Check that `Box` is `Sized`, even when `T` is a dynamically sized type. -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/sized/sized-reference-to-unsized.rs b/tests/ui/sized/sized-reference-to-unsized.rs index ac2934d8fe646..f3cce997ff17f 100644 --- a/tests/ui/sized/sized-reference-to-unsized.rs +++ b/tests/ui/sized/sized-reference-to-unsized.rs @@ -1,6 +1,6 @@ //! Check that a reference to a potentially unsized type (`&T`) is itself considered `Sized`. -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/span/unused-warning-point-at-identifier.rs b/tests/ui/span/unused-warning-point-at-identifier.rs index 8a075850063a5..c238beafdc3cb 100644 --- a/tests/ui/span/unused-warning-point-at-identifier.rs +++ b/tests/ui/span/unused-warning-point-at-identifier.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/specialization/defaultimpl/projection.rs b/tests/ui/specialization/defaultimpl/projection.rs index 9a2fc8d8f5268..ca29a536c7f8f 100644 --- a/tests/ui/specialization/defaultimpl/projection.rs +++ b/tests/ui/specialization/defaultimpl/projection.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(specialization)] diff --git a/tests/ui/specialization/issue-50452.rs b/tests/ui/specialization/issue-50452.rs index 629ae80f6a649..e03d5b7ec3731 100644 --- a/tests/ui/specialization/issue-50452.rs +++ b/tests/ui/specialization/issue-50452.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(specialization)] diff --git a/tests/ui/specialization/specialization-allowed-cross-crate.rs b/tests/ui/specialization/specialization-allowed-cross-crate.rs index 1a6c3832b16d2..1c8d854466650 100644 --- a/tests/ui/specialization/specialization-allowed-cross-crate.rs +++ b/tests/ui/specialization/specialization-allowed-cross-crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/specialization/specialization-on-projection.rs b/tests/ui/specialization/specialization-on-projection.rs index f5fc13185a765..b2b37701bcb00 100644 --- a/tests/ui/specialization/specialization-on-projection.rs +++ b/tests/ui/specialization/specialization-on-projection.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(specialization)] diff --git a/tests/ui/specialization/specialization-projection-alias.rs b/tests/ui/specialization/specialization-projection-alias.rs index 92368b17b98be..7d92961a75625 100644 --- a/tests/ui/specialization/specialization-projection-alias.rs +++ b/tests/ui/specialization/specialization-projection-alias.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/specialization/specialization-projection.rs b/tests/ui/specialization/specialization-projection.rs index 20105fb9fdb11..72676b2da7afe 100644 --- a/tests/ui/specialization/specialization-projection.rs +++ b/tests/ui/specialization/specialization-projection.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(specialization)] diff --git a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs index 06f7cdd3398ad..daeabf5a3a65b 100644 --- a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs +++ b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(specialization)] diff --git a/tests/ui/specialization/transmute-specialization.rs b/tests/ui/specialization/transmute-specialization.rs index da0f12cf71692..563736f9ffba8 100644 --- a/tests/ui/specialization/transmute-specialization.rs +++ b/tests/ui/specialization/transmute-specialization.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(specialization)] diff --git a/tests/ui/statics/check-recursion-foreign.rs b/tests/ui/statics/check-recursion-foreign.rs index 6804910f4ccf9..f539f4bb9bc94 100644 --- a/tests/ui/statics/check-recursion-foreign.rs +++ b/tests/ui/statics/check-recursion-foreign.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Static recursion check shouldn't fail when given a foreign item (#18279) diff --git a/tests/ui/statics/conditional-static-declaration-16010.rs b/tests/ui/statics/conditional-static-declaration-16010.rs index 0bc5b0ee86f7e..1fff2e56c4b3e 100644 --- a/tests/ui/statics/conditional-static-declaration-16010.rs +++ b/tests/ui/statics/conditional-static-declaration-16010.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/16010 -//@ run-pass +//@ check-pass #![allow(dead_code)] fn main() { diff --git a/tests/ui/statics/issue-17718-static-unsafe-interior.rs b/tests/ui/statics/issue-17718-static-unsafe-interior.rs index daff7ba873c0f..e60bc6ca6504b 100644 --- a/tests/ui/statics/issue-17718-static-unsafe-interior.rs +++ b/tests/ui/statics/issue-17718-static-unsafe-interior.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/statics/static-fn-inline-xc.rs b/tests/ui/statics/static-fn-inline-xc.rs index e75083b218830..c21ae68d11e26 100644 --- a/tests/ui/statics/static-fn-inline-xc.rs +++ b/tests/ui/statics/static-fn-inline-xc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:static_fn_inline_xc_aux.rs diff --git a/tests/ui/statics/static-fn-trait-xc.rs b/tests/ui/statics/static-fn-trait-xc.rs index 73747416c604d..a051dc5dc93c2 100644 --- a/tests/ui/statics/static-fn-trait-xc.rs +++ b/tests/ui/statics/static-fn-trait-xc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:static_fn_trait_xc_aux.rs diff --git a/tests/ui/statics/static-methods-in-traits2.rs b/tests/ui/statics/static-methods-in-traits2.rs index dbd5e77c1ba9f..f3e8a08521f9c 100644 --- a/tests/ui/statics/static-methods-in-traits2.rs +++ b/tests/ui/statics/static-methods-in-traits2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait Number: NumConv { fn from(n: T) -> Self; diff --git a/tests/ui/structs-enums/class-dtor.rs b/tests/ui/structs-enums/class-dtor.rs index b7911823ef1b9..d9b0b18477350 100644 --- a/tests/ui/structs-enums/class-dtor.rs +++ b/tests/ui/structs-enums/class-dtor.rs @@ -1,4 +1,4 @@ -//@ check-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-typarams.rs b/tests/ui/structs-enums/class-typarams.rs index b5a3923983f36..00b2655bf39a3 100644 --- a/tests/ui/structs-enums/class-typarams.rs +++ b/tests/ui/structs-enums/class-typarams.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/empty-struct-braces.rs b/tests/ui/structs-enums/empty-struct-braces.rs index 0449fb51af5b7..f9140dcf6faff 100644 --- a/tests/ui/structs-enums/empty-struct-braces.rs +++ b/tests/ui/structs-enums/empty-struct-braces.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/structs-enums/enum-export-inheritance.rs b/tests/ui/structs-enums/enum-export-inheritance.rs index 1fd697830db51..d304530b6a7f9 100644 --- a/tests/ui/structs-enums/enum-export-inheritance.rs +++ b/tests/ui/structs-enums/enum-export-inheritance.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] mod a { diff --git a/tests/ui/structs-enums/enum-vec-initializer.rs b/tests/ui/structs-enums/enum-vec-initializer.rs index 8c610456c227f..f1eb98f48f404 100644 --- a/tests/ui/structs-enums/enum-vec-initializer.rs +++ b/tests/ui/structs-enums/enum-vec-initializer.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass enum Flopsy { Bunny = 2 diff --git a/tests/ui/structs-enums/foreign-struct.rs b/tests/ui/structs-enums/foreign-struct.rs index b710d83350abf..7398acf50a6f4 100644 --- a/tests/ui/structs-enums/foreign-struct.rs +++ b/tests/ui/structs-enums/foreign-struct.rs @@ -1,4 +1,4 @@ -//@ check-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/issue-50731.rs b/tests/ui/structs-enums/issue-50731.rs index c00ef6d5f74c9..bfee3e07b22be 100644 --- a/tests/ui/structs-enums/issue-50731.rs +++ b/tests/ui/structs-enums/issue-50731.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass enum Void {} fn foo(_: Result<(Void, u32), (Void, String)>) {} fn main() { diff --git a/tests/ui/structs-enums/nested-enum-same-names.rs b/tests/ui/structs-enums/nested-enum-same-names.rs index 1d3fab4e722c3..a2fbcb8fd23d1 100644 --- a/tests/ui/structs-enums/nested-enum-same-names.rs +++ b/tests/ui/structs-enums/nested-enum-same-names.rs @@ -1,4 +1,4 @@ -//@ check-pass +//@ build-pass #![allow(dead_code)] /* diff --git a/tests/ui/structs-enums/simple-match-generic-tag.rs b/tests/ui/structs-enums/simple-match-generic-tag.rs index 47a2d1054e02d..8778774db560b 100644 --- a/tests/ui/structs-enums/simple-match-generic-tag.rs +++ b/tests/ui/structs-enums/simple-match-generic-tag.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/struct_variant_xc.rs b/tests/ui/structs-enums/struct_variant_xc.rs index bf69a2aead93d..27fab2b260616 100644 --- a/tests/ui/structs-enums/struct_variant_xc.rs +++ b/tests/ui/structs-enums/struct_variant_xc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:struct_variant_xc_aux.rs extern crate struct_variant_xc_aux; diff --git a/tests/ui/structs-enums/tag-exports.rs b/tests/ui/structs-enums/tag-exports.rs index bac428e67233c..dd438c2d999ce 100644 --- a/tests/ui/structs-enums/tag-exports.rs +++ b/tests/ui/structs-enums/tag-exports.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs/large-records.rs b/tests/ui/structs/large-records.rs index d02a9f488c61b..7d7c9c60c8c31 100644 --- a/tests/ui/structs/large-records.rs +++ b/tests/ui/structs/large-records.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/structs/module-qualified-struct-destructure.rs b/tests/ui/structs/module-qualified-struct-destructure.rs index 9d06980fca97d..52dd7f9c9e677 100644 --- a/tests/ui/structs/module-qualified-struct-destructure.rs +++ b/tests/ui/structs/module-qualified-struct-destructure.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass mod m { pub struct S { diff --git a/tests/ui/structs/newtype-struct-with-dtor.rs b/tests/ui/structs/newtype-struct-with-dtor.rs index c0d04932c4642..17feada1d6da1 100644 --- a/tests/ui/structs/newtype-struct-with-dtor.rs +++ b/tests/ui/structs/newtype-struct-with-dtor.rs @@ -1,4 +1,4 @@ -//@ check-pass +//@ build-pass #![allow(unused_unsafe)] #![allow(unused_variables)] diff --git a/tests/ui/structs/newtype-struct-xc-2.rs b/tests/ui/structs/newtype-struct-xc-2.rs index a52c41dde2774..52ee8ce054935 100644 --- a/tests/ui/structs/newtype-struct-xc-2.rs +++ b/tests/ui/structs/newtype-struct-xc-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //@ aux-build:newtype_struct_xc.rs diff --git a/tests/ui/structs/newtype-struct-xc.rs b/tests/ui/structs/newtype-struct-xc.rs index 138bf4878f001..f90e511ead017 100644 --- a/tests/ui/structs/newtype-struct-xc.rs +++ b/tests/ui/structs/newtype-struct-xc.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:newtype_struct_xc.rs diff --git a/tests/ui/structs/struct-literal-dtor.rs b/tests/ui/structs/struct-literal-dtor.rs index 30b1f1139389d..3e57e2ebf3c4d 100644 --- a/tests/ui/structs/struct-literal-dtor.rs +++ b/tests/ui/structs/struct-literal-dtor.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(non_camel_case_types)] struct foo { diff --git a/tests/ui/structs/unit-like-struct.rs b/tests/ui/structs/unit-like-struct.rs index 8a2f500676e68..63237e0b51ff4 100644 --- a/tests/ui/structs/unit-like-struct.rs +++ b/tests/ui/structs/unit-like-struct.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass struct Foo; pub fn main() { diff --git a/tests/ui/suggestions/dont-try-removing-the-field.rs b/tests/ui/suggestions/dont-try-removing-the-field.rs index 80bb15441d45d..7bc74892cddbc 100644 --- a/tests/ui/suggestions/dont-try-removing-the-field.rs +++ b/tests/ui/suggestions/dont-try-removing-the-field.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] @@ -9,8 +9,7 @@ struct Foo { } fn use_foo(x: Foo) -> (i32, i32) { - let Foo { foo, bar, baz } = x; //~ WARNING unused variable: `baz` - //~| help: try ignoring the field + let Foo { foo, bar, baz } = x; return (foo, bar); } diff --git a/tests/ui/suggestions/dont-try-removing-the-field.stderr b/tests/ui/suggestions/dont-try-removing-the-field.stderr deleted file mode 100644 index e327b21417a6b..0000000000000 --- a/tests/ui/suggestions/dont-try-removing-the-field.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: unused variable: `baz` - --> $DIR/dont-try-removing-the-field.rs:12:25 - | -LL | let Foo { foo, bar, baz } = x; - | ^^^ help: try ignoring the field: `baz: _` - | - = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/symbol-names/struct-constructor-mangling.rs b/tests/ui/symbol-names/struct-constructor-mangling.rs index ec8791e215491..77b3e38a31da3 100644 --- a/tests/ui/symbol-names/struct-constructor-mangling.rs +++ b/tests/ui/symbol-names/struct-constructor-mangling.rs @@ -1,6 +1,6 @@ //! Test that the symbol mangling of Foo-the-constructor-function versus Foo-the-type do not collide -//@ run-pass +//@ build-pass fn size_of_val(_: &T) -> usize { std::mem::size_of::() diff --git a/tests/ui/threads-sendsync/sendable-class.rs b/tests/ui/threads-sendsync/sendable-class.rs index da61ea6be2cee..4d4d4874f79be 100644 --- a/tests/ui/threads-sendsync/sendable-class.rs +++ b/tests/ui/threads-sendsync/sendable-class.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/tool-attributes/tool_lints-rpass.rs b/tests/ui/tool-attributes/tool_lints-rpass.rs index 458eca19ed6c7..7e4aad8889b61 100644 --- a/tests/ui/tool-attributes/tool_lints-rpass.rs +++ b/tests/ui/tool-attributes/tool_lints-rpass.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unknown_lints)] diff --git a/tests/ui/tool-attributes/tool_lints_2018_preview.rs b/tests/ui/tool-attributes/tool_lints_2018_preview.rs index 458eca19ed6c7..7e4aad8889b61 100644 --- a/tests/ui/tool-attributes/tool_lints_2018_preview.rs +++ b/tests/ui/tool-attributes/tool_lints_2018_preview.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unknown_lints)] diff --git a/tests/ui/traits/alias/basic.rs b/tests/ui/traits/alias/basic.rs index b1283d2729519..0d1747336aa5f 100644 --- a/tests/ui/traits/alias/basic.rs +++ b/tests/ui/traits/alias/basic.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/import.rs b/tests/ui/traits/alias/import.rs index 9469490ca2bf3..4c5774c6beb72 100644 --- a/tests/ui/traits/alias/import.rs +++ b/tests/ui/traits/alias/import.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs index 6eaab6e594777..0809dcc923379 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs @@ -1,6 +1,6 @@ // Make sure that we're handling bound lifetimes correctly when validating trait // bounds. -//@ run-pass +//@ check-pass trait X<'a> { type F: FnOnce(&i32) -> &'a i32; diff --git a/tests/ui/traits/astconv-cycle-between-and-type.rs b/tests/ui/traits/astconv-cycle-between-and-type.rs index cb2e172f02ec5..76eae9393e990 100644 --- a/tests/ui/traits/astconv-cycle-between-and-type.rs +++ b/tests/ui/traits/astconv-cycle-between-and-type.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that we are able to successfully compile a setup where a trait // (`Trait1`) references a struct (`SomeType`) which in turn // carries a predicate that references the trait (`u32 : Trait1`, diff --git a/tests/ui/traits/bound/basic.rs b/tests/ui/traits/bound/basic.rs index acd8056bee083..71ec5f43818e9 100644 --- a/tests/ui/traits/bound/basic.rs +++ b/tests/ui/traits/bound/basic.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unconditional_recursion)] diff --git a/tests/ui/traits/bound/multiple.rs b/tests/ui/traits/bound/multiple.rs index 30f229b285aaa..98e6ed17606f4 100644 --- a/tests/ui/traits/bound/multiple.rs +++ b/tests/ui/traits/bound/multiple.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn f(_: T) { } diff --git a/tests/ui/traits/bug-7295.rs b/tests/ui/traits/bug-7295.rs index a1cbcf1601e95..180e264190cde 100644 --- a/tests/ui/traits/bug-7295.rs +++ b/tests/ui/traits/bug-7295.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass pub trait Foo { fn func1(&self, t: U, w: T); diff --git a/tests/ui/traits/cache-issue-18209.rs b/tests/ui/traits/cache-issue-18209.rs index 6a027d6b3f3dd..d9a4ae4c63e0f 100644 --- a/tests/ui/traits/cache-issue-18209.rs +++ b/tests/ui/traits/cache-issue-18209.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that the cache results from the default method do not pollute // the cache for the later call in `load()`. // diff --git a/tests/ui/traits/copy-trait-implicit-copy.rs b/tests/ui/traits/copy-trait-implicit-copy.rs index e06385587b4b5..57b7e30a35f22 100644 --- a/tests/ui/traits/copy-trait-implicit-copy.rs +++ b/tests/ui/traits/copy-trait-implicit-copy.rs @@ -1,6 +1,6 @@ //! Tests that type parameters with the `Copy` are implicitly copyable. -//@ run-pass +//@ check-pass /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs b/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs index e5d083ac8c3fb..ce40bae444b20 100644 --- a/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs +++ b/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] //! Tests that user-defined trait is prioritized in compile time over diff --git a/tests/ui/traits/cycle-type-trait.rs b/tests/ui/traits/cycle-type-trait.rs index 3a6cd2eccc250..cdb7c48ca8e01 100644 --- a/tests/ui/traits/cycle-type-trait.rs +++ b/tests/ui/traits/cycle-type-trait.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // Test a case where a supertrait references a type that references // the original trait. This poses no problem at the moment. diff --git a/tests/ui/traits/early-vtbl-resolution.rs b/tests/ui/traits/early-vtbl-resolution.rs index bf3cc04cdc227..1f1b54748dcec 100644 --- a/tests/ui/traits/early-vtbl-resolution.rs +++ b/tests/ui/traits/early-vtbl-resolution.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/traits/encoder-trait-bounds-regression.rs b/tests/ui/traits/encoder-trait-bounds-regression.rs index 292b921cdf761..d39464c008a2f 100644 --- a/tests/ui/traits/encoder-trait-bounds-regression.rs +++ b/tests/ui/traits/encoder-trait-bounds-regression.rs @@ -8,7 +8,7 @@ //! - Multiple encoder implementations for the same type //! - Polymorphic encoding functions -//@ run-pass +//@ check-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs index ab9d10d14fdd0..9391031849b02 100644 --- a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs +++ b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that we do not error out because of a (False) ambiguity // between the builtin rules for Sized and the where clause. Issue // #20959. diff --git a/tests/ui/traits/final/dyn-compat.rs b/tests/ui/traits/final/dyn-compat.rs index d600058820c20..1359a15b3ecf6 100644 --- a/tests/ui/traits/final/dyn-compat.rs +++ b/tests/ui/traits/final/dyn-compat.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![feature(final_associated_functions)] diff --git a/tests/ui/traits/fn-type-trait-impl-15444.rs b/tests/ui/traits/fn-type-trait-impl-15444.rs index ab91e88b9cd0a..48eeac3c41915 100644 --- a/tests/ui/traits/fn-type-trait-impl-15444.rs +++ b/tests/ui/traits/fn-type-trait-impl-15444.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/15444 -//@ run-pass +//@ check-pass trait MyTrait { fn foo(&self); diff --git a/tests/ui/traits/generic-cow-inference-regression.rs b/tests/ui/traits/generic-cow-inference-regression.rs index e9dd76d1aea4f..f2ba81e4c349e 100644 --- a/tests/ui/traits/generic-cow-inference-regression.rs +++ b/tests/ui/traits/generic-cow-inference-regression.rs @@ -1,6 +1,6 @@ //@[new] compile-flags: -Znext-solver //@ revisions: old new -//@ run-pass +//@ check-pass // regression test for #147964: // constification of these traits resulted in inference errors due to additional where clauses diff --git a/tests/ui/traits/impl-2.rs b/tests/ui/traits/impl-2.rs index eafbaeaa167b9..34a155f220b0b 100644 --- a/tests/ui/traits/impl-2.rs +++ b/tests/ui/traits/impl-2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/impl-implicit-trait.rs b/tests/ui/traits/impl-implicit-trait.rs index ff62858dcc2ff..5c25109a5ab78 100644 --- a/tests/ui/traits/impl-implicit-trait.rs +++ b/tests/ui/traits/impl-implicit-trait.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.rs b/tests/ui/traits/impl-object-overlap-issue-23853.rs index e091a01949f1d..c9eba18a6bb1b 100644 --- a/tests/ui/traits/impl-object-overlap-issue-23853.rs +++ b/tests/ui/traits/impl-object-overlap-issue-23853.rs @@ -1,11 +1,11 @@ -//@ run-pass +//@ check-pass // Test that we are able to compile the case where both a blanket impl // and the object type itself supply the required trait obligation. // In this case, the blanket impl for `Foo` applies to any type, // including `Bar`, but the object type `Bar` also implicitly supplies // this context. -trait Foo { fn dummy(&self) { } } //~ WARN method `dummy` is never used +trait Foo { fn dummy(&self) { } } trait Bar: Foo { } diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.stderr b/tests/ui/traits/impl-object-overlap-issue-23853.stderr deleted file mode 100644 index bdab0ae3532a9..0000000000000 --- a/tests/ui/traits/impl-object-overlap-issue-23853.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/impl-object-overlap-issue-23853.rs:8:16 - | -LL | trait Foo { fn dummy(&self) { } } - | --- ^^^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/impl-trait-chain-14229.rs b/tests/ui/traits/impl-trait-chain-14229.rs index 4a234f3a68114..ae7b56ba8951f 100644 --- a/tests/ui/traits/impl-trait-chain-14229.rs +++ b/tests/ui/traits/impl-trait-chain-14229.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/14229 -//@ run-pass +//@ check-pass trait Foo: Sized { fn foo(self) {} } diff --git a/tests/ui/traits/infer-from-object-issue-26952.rs b/tests/ui/traits/infer-from-object-issue-26952.rs index 83eb9bcb62d75..31a09eba3f718 100644 --- a/tests/ui/traits/infer-from-object-issue-26952.rs +++ b/tests/ui/traits/infer-from-object-issue-26952.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when we match a trait reference like `Foo: Foo`, diff --git a/tests/ui/traits/inheritance/num.rs b/tests/ui/traits/inheritance/num.rs index 58564147a2929..c6ad3d856423e 100644 --- a/tests/ui/traits/inheritance/num.rs +++ b/tests/ui/traits/inheritance/num.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/traits/inheritance/num1.rs b/tests/ui/traits/inheritance/num1.rs index d02cff70842a6..7bd429601e37c 100644 --- a/tests/ui/traits/inheritance/num1.rs +++ b/tests/ui/traits/inheritance/num1.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] pub trait NumCast: Sized { diff --git a/tests/ui/traits/inheritance/num5.rs b/tests/ui/traits/inheritance/num5.rs index 8ac4c86c39215..4bea3119b0ed8 100644 --- a/tests/ui/traits/inheritance/num5.rs +++ b/tests/ui/traits/inheritance/num5.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/issue-22019.rs b/tests/ui/traits/issue-22019.rs index 191c345e2d17f..16844965e1a8f 100644 --- a/tests/ui/traits/issue-22019.rs +++ b/tests/ui/traits/issue-22019.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test an issue where global caching was causing free regions from // distinct scopes to be compared (`'g` and `'h`). The only important // thing is that compilation succeeds here. diff --git a/tests/ui/traits/issue-22110.rs b/tests/ui/traits/issue-22110.rs index f16f5328ad368..fc764e8763c5c 100644 --- a/tests/ui/traits/issue-22110.rs +++ b/tests/ui/traits/issue-22110.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test an issue where we reported ambiguity between the where-clause // and the blanket impl. The only important thing is that compilation // succeeds here. Issue #22110. diff --git a/tests/ui/traits/issue-23003.rs b/tests/ui/traits/issue-23003.rs index 93c5bfe32ce9e..22d7764ca5fff 100644 --- a/tests/ui/traits/issue-23003.rs +++ b/tests/ui/traits/issue-23003.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test stack overflow triggered by evaluating the implications. To be // WF, the type `Receipt` would require that `::Cancel` be WF. This normalizes to `Receipt` diff --git a/tests/ui/traits/issue-33096.rs b/tests/ui/traits/issue-33096.rs index bd513b749bffe..53667f7ffc7bd 100644 --- a/tests/ui/traits/issue-33096.rs +++ b/tests/ui/traits/issue-33096.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ compile-flags: -g use std::ops::Deref; diff --git a/tests/ui/traits/issue-38033.rs b/tests/ui/traits/issue-38033.rs index f3525bd13c4fa..f8d7cceafe4a7 100644 --- a/tests/ui/traits/issue-38033.rs +++ b/tests/ui/traits/issue-38033.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass use std::marker; use std::mem; @@ -19,7 +19,7 @@ trait IntoFuture { type Item; type Error; - fn into_future(self) -> Self::Future; //~ WARN method `into_future` is never used + fn into_future(self) -> Self::Future; } impl IntoFuture for F { diff --git a/tests/ui/traits/issue-38033.stderr b/tests/ui/traits/issue-38033.stderr deleted file mode 100644 index fb713c564cf14..0000000000000 --- a/tests/ui/traits/issue-38033.stderr +++ /dev/null @@ -1,13 +0,0 @@ -warning: method `into_future` is never used - --> $DIR/issue-38033.rs:22:8 - | -LL | trait IntoFuture { - | ---------- method in this trait -... -LL | fn into_future(self) -> Self::Future; - | ^^^^^^^^^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/issue-4107.rs b/tests/ui/traits/issue-4107.rs index 1a754dab5ada6..a94503f19481e 100644 --- a/tests/ui/traits/issue-4107.rs +++ b/tests/ui/traits/issue-4107.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/traits/issue-43132.rs b/tests/ui/traits/issue-43132.rs index 5f11928b3173d..27be792d5d61b 100644 --- a/tests/ui/traits/issue-43132.rs +++ b/tests/ui/traits/issue-43132.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused)] fn main() { diff --git a/tests/ui/traits/issue-6128.rs b/tests/ui/traits/issue-6128.rs index 95b61549b5ef4..60134952604bd 100644 --- a/tests/ui/traits/issue-6128.rs +++ b/tests/ui/traits/issue-6128.rs @@ -1,9 +1,9 @@ -//@ run-pass +//@ check-pass use std::collections::HashMap; trait Graph { - fn f(&self, _: Edge); //~ WARN methods `f` and `g` are never used + fn f(&self, _: Edge); fn g(&self, _: Node); } diff --git a/tests/ui/traits/issue-6128.stderr b/tests/ui/traits/issue-6128.stderr deleted file mode 100644 index 1c0460df69e83..0000000000000 --- a/tests/ui/traits/issue-6128.stderr +++ /dev/null @@ -1,14 +0,0 @@ -warning: methods `f` and `g` are never used - --> $DIR/issue-6128.rs:6:8 - | -LL | trait Graph { - | ----- methods in this trait -LL | fn f(&self, _: Edge); - | ^ -LL | fn g(&self, _: Node); - | ^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/item-inside-macro.rs b/tests/ui/traits/item-inside-macro.rs index 6866c7313fcb5..d194e4c1ef07b 100644 --- a/tests/ui/traits/item-inside-macro.rs +++ b/tests/ui/traits/item-inside-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Issue #34183 macro_rules! foo { diff --git a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs index 9d33ec8c1728e..b993f096d7ecf 100644 --- a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs +++ b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Serializer { } diff --git a/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs b/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs index daefdcff5a556..a3c309d5adefb 100644 --- a/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs +++ b/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that we correctly ignore the blanket impl // because (in this case) `T` does not impl `Clone`. // @@ -6,7 +6,7 @@ use std::cell::RefCell; -trait Foo { //~ WARN trait `Foo` is never used +trait Foo { fn foo(&self) {} } diff --git a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr b/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr deleted file mode 100644 index 8a9c2206331e0..0000000000000 --- a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr +++ /dev/null @@ -1,10 +0,0 @@ -warning: trait `Foo` is never used - --> $DIR/multidispatch-conditional-impl-not-considered.rs:9:7 - | -LL | trait Foo { - | ^^^ - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/mut-trait-in-struct-8249.rs b/tests/ui/traits/mut-trait-in-struct-8249.rs index b6dcd848b8b34..88bdaa38958c9 100644 --- a/tests/ui/traits/mut-trait-in-struct-8249.rs +++ b/tests/ui/traits/mut-trait-in-struct-8249.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/8249 -//@ run-pass +//@ check-pass #![allow(dead_code)] trait A { diff --git a/tests/ui/traits/negative-impls/negative-impls-basic.rs b/tests/ui/traits/negative-impls/negative-impls-basic.rs index 3d766cc785d5b..7d8196cf62fc6 100644 --- a/tests/ui/traits/negative-impls/negative-impls-basic.rs +++ b/tests/ui/traits/negative-impls/negative-impls-basic.rs @@ -1,7 +1,7 @@ // A simple test that we are able to create negative impls, when the // feature gate is given. // -//@ run-pass +//@ check-pass #![feature(negative_impls)] #![allow(dead_code)] diff --git a/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs index 1554d74f21453..a63fe729fd687 100644 --- a/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs +++ b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -//@ run-pass +//@ check-pass // Test that selection prefers the builtin trait object impl for `Any` // instead of the user defined impl. Both impls apply to the trait diff --git a/tests/ui/traits/normalize/normalize-associated-type-in-where-clause.rs b/tests/ui/traits/normalize/normalize-associated-type-in-where-clause.rs index 25ca4a41aa85d..30295d5ef71eb 100644 --- a/tests/ui/traits/normalize/normalize-associated-type-in-where-clause.rs +++ b/tests/ui/traits/normalize/normalize-associated-type-in-where-clause.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass //! regression test for issue #50825, #51044 //! Check that the feature gate normalizes associated types. diff --git a/tests/ui/traits/object/auto-dedup.rs b/tests/ui/traits/object/auto-dedup.rs index 732a504e750b2..a5d3574f923a9 100644 --- a/tests/ui/traits/object/auto-dedup.rs +++ b/tests/ui/traits/object/auto-dedup.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_assignments)] diff --git a/tests/ui/traits/pointee-deduction.rs b/tests/ui/traits/pointee-deduction.rs index 541daf2308782..ed7850d6baf43 100644 --- a/tests/ui/traits/pointee-deduction.rs +++ b/tests/ui/traits/pointee-deduction.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![feature(ptr_metadata)] diff --git a/tests/ui/traits/syntax-polarity.rs b/tests/ui/traits/syntax-polarity.rs index c6506e916ed45..e2a2014188eee 100644 --- a/tests/ui/traits/syntax-polarity.rs +++ b/tests/ui/traits/syntax-polarity.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![feature(negative_impls)] diff --git a/tests/ui/traits/trait-implementation-for-primitive-type-5280.rs b/tests/ui/traits/trait-implementation-for-primitive-type-5280.rs index 72a4283bc7e2b..31e4c97b9d2d2 100644 --- a/tests/ui/traits/trait-implementation-for-primitive-type-5280.rs +++ b/tests/ui/traits/trait-implementation-for-primitive-type-5280.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] type FontTableTag = u32; diff --git a/tests/ui/traits/trait-implementation-restriction-5988.rs b/tests/ui/traits/trait-implementation-restriction-5988.rs index d3a5b10569b22..330759b139032 100644 --- a/tests/ui/traits/trait-implementation-restriction-5988.rs +++ b/tests/ui/traits/trait-implementation-restriction-5988.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/5988 -//@ run-pass +//@ check-pass trait B { fn f(&self); diff --git a/tests/ui/traits/tryfrominterror-result-comparison.rs b/tests/ui/traits/tryfrominterror-result-comparison.rs index 8a2741e9058e4..e46f1978f41b7 100644 --- a/tests/ui/traits/tryfrominterror-result-comparison.rs +++ b/tests/ui/traits/tryfrominterror-result-comparison.rs @@ -3,7 +3,7 @@ //! It specifically checks a successful numeric conversion scenario where the `Result::Ok` //! variant is compared, ensuring that the comparison yields the expected boolean result. -//@ run-pass +//@ check-pass #![allow(unused_must_use)] // Allow ignoring the result of the comparison for the test's purpose diff --git a/tests/ui/traits/where-clause-vs-impl.rs b/tests/ui/traits/where-clause-vs-impl.rs index 639347b3bc36d..097db968053d1 100644 --- a/tests/ui/traits/where-clause-vs-impl.rs +++ b/tests/ui/traits/where-clause-vs-impl.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when there is a conditional (but blanket) impl and a diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs index bc7ec1f687216..9581072475d02 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Check tautalogically false `Sized` bounds #![feature(trivial_bounds)] #![allow(unused)] diff --git a/tests/ui/type-inference/partial-type-hint-12909.rs b/tests/ui/type-inference/partial-type-hint-12909.rs index d7017f451e323..c6579742b3609 100644 --- a/tests/ui/type-inference/partial-type-hint-12909.rs +++ b/tests/ui/type-inference/partial-type-hint-12909.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/12909 -//@ run-pass +//@ check-pass #![allow(unused_variables)] use std::collections::HashMap; diff --git a/tests/ui/type/mutually-recursive-types.rs b/tests/ui/type/mutually-recursive-types.rs index 5472e1582218e..4bb794978d0cb 100644 --- a/tests/ui/type/mutually-recursive-types.rs +++ b/tests/ui/type/mutually-recursive-types.rs @@ -2,7 +2,7 @@ //! This checks that types can reference each other in their definitions through //! `Box` indirection, creating cycles in the type dependency graph. -//@ run-pass +//@ check-pass #[derive(Debug, PartialEq)] enum Colour { diff --git a/tests/ui/type/unit-type-basic-usages.rs b/tests/ui/type/unit-type-basic-usages.rs index c3ee8067f5918..416312472ada2 100644 --- a/tests/ui/type/unit-type-basic-usages.rs +++ b/tests/ui/type/unit-type-basic-usages.rs @@ -1,6 +1,6 @@ //! Checks the basic usage of unit type -//@ run-pass +//@ check-pass fn f(u: ()) { u diff --git a/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs b/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs index 24d1c7be51489..0d85bd85f2bf9 100644 --- a/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs +++ b/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () { func() diff --git a/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs b/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs index 3d414aa6f1a37..63fb8b08d5eae 100644 --- a/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs +++ b/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // This tests reification from safe function to `unsafe fn` pointer fn do_nothing() -> () {} diff --git a/tests/ui/unboxed-closures/issue-18661.rs b/tests/ui/unboxed-closures/issue-18661.rs index dc965809ea187..349a1febc963e 100644 --- a/tests/ui/unboxed-closures/issue-18661.rs +++ b/tests/ui/unboxed-closures/issue-18661.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass // Test that param substitutions from the correct environment are // used when codegenning unboxed closure calls. diff --git a/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs index 38cf26c277709..4879c2fde18b4 100644 --- a/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs +++ b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/18685 -//@ run-pass +//@ build-pass // Test that the self param space is not used in a conflicting // manner by unboxed closures within a default method on a trait diff --git a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs index 265e8e49f0dec..a0f228d15b238 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_mut)] fn main() { diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs index 5710998cda799..aa1c2903af35d 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![deny(unused_mut)] #![allow(unused_must_use)] @@ -13,17 +13,11 @@ fn set(x: &mut usize) { *x = 42; } fn main() { { let mut x = 0_usize; - //~^ WARN unused variable: `x` move || x += 1; - //~^ WARN value captured by `x` is never read - //~| WARN value assigned to `x` is never read } { let mut x = 0_usize; - //~^ WARN unused variable: `x` move || x += 1; - //~^ WARN value captured by `x` is never read - //~| WARN value assigned to `x` is never read } { let mut x = 0_usize; diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr deleted file mode 100644 index 70c48b596c0ec..0000000000000 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr +++ /dev/null @@ -1,49 +0,0 @@ -warning: value captured by `x` is never read - --> $DIR/unboxed-closures-move-mutable.rs:24:17 - | -LL | move || x += 1; - | ^ - | - = help: did you mean to capture by reference instead? - = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default - -warning: value assigned to `x` is never read - --> $DIR/unboxed-closures-move-mutable.rs:24:17 - | -LL | move || x += 1; - | ^^^^^^ - | - = help: maybe it is overwritten before being read? - -warning: value captured by `x` is never read - --> $DIR/unboxed-closures-move-mutable.rs:17:17 - | -LL | move || x += 1; - | ^ - | - = help: did you mean to capture by reference instead? - -warning: value assigned to `x` is never read - --> $DIR/unboxed-closures-move-mutable.rs:17:17 - | -LL | move || x += 1; - | ^^^^^^ - | - = help: maybe it is overwritten before being read? - -warning: unused variable: `x` - --> $DIR/unboxed-closures-move-mutable.rs:15:13 - | -LL | let mut x = 0_usize; - | ^^^^^ help: if this is intentional, prefix it with an underscore: `_x` - | - = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default - -warning: unused variable: `x` - --> $DIR/unboxed-closures-move-mutable.rs:22:13 - | -LL | let mut x = 0_usize; - | ^^^^^ help: if this is intentional, prefix it with an underscore: `_x` - -warning: 6 warnings emitted - diff --git a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs index ae90a51c48826..02bbdcdfe7c78 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Tests that the re-exports of `FnOnce` et al from the prelude work. diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs index c63594dc8787b..4697f61cb3d12 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass fn main() { let onetime = |x| x; diff --git a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs index c808189b65859..22621f8c5cad4 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_mut)] fn main() { diff --git a/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs index 1387c5b6c1094..ed4b0aeddfd48 100644 --- a/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs +++ b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/88150 -//@ run-pass +//@ build-pass //@ compile-flags:-C debuginfo=2 //@ edition:2018 diff --git a/tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs b/tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs index a389562d649e3..a311be14d4dee 100644 --- a/tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs +++ b/tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs @@ -1,5 +1,5 @@ #![deny(unreachable_code)] -//@ run-pass +//@ check-pass use std::convert::Infallible; diff --git a/tests/ui/union/union-backcomp.rs b/tests/ui/union/union-backcomp.rs index a71813968e841..18bec15aa0c70 100644 --- a/tests/ui/union/union-backcomp.rs +++ b/tests/ui/union/union-backcomp.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/union/union-macro.rs b/tests/ui/union/union-macro.rs index 729f56de7a065..130fe4b223a0e 100644 --- a/tests/ui/union/union-macro.rs +++ b/tests/ui/union/union-macro.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(unused_variables)] diff --git a/tests/ui/unsafe/new-unsafe-pointers.rs b/tests/ui/unsafe/new-unsafe-pointers.rs index 07c54ae96922c..d3d5851a6964f 100644 --- a/tests/ui/unsafe/new-unsafe-pointers.rs +++ b/tests/ui/unsafe/new-unsafe-pointers.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass fn main() { let _a: *const isize = 3 as *const isize; diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs index d45f5c523c25a..906949faeaa1e 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs index 168c60dfc8439..2089498fd4170 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(dead_code)] // diff --git a/tests/ui/unsized-locals/unsized-parameters.rs b/tests/ui/unsized-locals/unsized-parameters.rs index df12dac48ef5d..6dc42e3a07de7 100644 --- a/tests/ui/unsized-locals/unsized-parameters.rs +++ b/tests/ui/unsized-locals/unsized-parameters.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(incomplete_features)] #![feature(unsized_fn_params)] diff --git a/tests/ui/unsized/enum-struct-optimization.rs b/tests/ui/unsized/enum-struct-optimization.rs index 2e2bc64008a6b..0da36244cd52d 100644 --- a/tests/ui/unsized/enum-struct-optimization.rs +++ b/tests/ui/unsized/enum-struct-optimization.rs @@ -1,5 +1,5 @@ //! regression test for -//@ run-pass +//@ build-pass #![allow(dead_code)] // Test that wrapping an unsized struct in an enum which gets optimised does // not ICE. diff --git a/tests/ui/unsized/unsized.rs b/tests/ui/unsized/unsized.rs index 7ae6d611c2970..4f6ae18b6632d 100644 --- a/tests/ui/unsized/unsized.rs +++ b/tests/ui/unsized/unsized.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(type_alias_bounds)] #![allow(dead_code)] diff --git a/tests/ui/unsized/unsized2.rs b/tests/ui/unsized/unsized2.rs index e2692a7a2c0ac..c5ba76334c781 100644 --- a/tests/ui/unsized/unsized2.rs +++ b/tests/ui/unsized/unsized2.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unconditional_recursion)] #![allow(dead_code)] diff --git a/tests/ui/where-clauses/issue-50825.rs b/tests/ui/where-clauses/issue-50825.rs index 4c5c2727824a7..85901c2de604c 100644 --- a/tests/ui/where-clauses/issue-50825.rs +++ b/tests/ui/where-clauses/issue-50825.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // regression test for issue #50825 // Make sure that the built-in bound {integer}: Sized is preferred over // the u64: Sized bound in the where clause. diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs index 153fa8a5715a1..dd323450f265d 100644 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs +++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs @@ -1,8 +1,8 @@ -//@ run-pass +//@ check-pass #![allow(non_upper_case_globals)] -trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used +trait TheTrait { fn dummy(&self) { } } impl TheTrait for &'static isize { } diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr deleted file mode 100644 index ebe609af38a86..0000000000000 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/where-clause-early-bound-lifetimes.rs:5:21 - | -LL | trait TheTrait { fn dummy(&self) { } } - | -------- ^^^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs index da75ed796c00f..d8f46cfc88b2c 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs @@ -1,7 +1,7 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] -trait Foo { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used +trait Foo { fn dummy(&self, arg: T) { } } trait Bar { fn method(&self) where A: Foo; diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr deleted file mode 100644 index 5161e2aabc169..0000000000000 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: method `dummy` is never used - --> $DIR/where-clause-method-substituion-rpass.rs:4:19 - | -LL | trait Foo { fn dummy(&self, arg: T) { } } - | --- ^^^^^ - | | - | method in this trait - | - = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default - -warning: 1 warning emitted - diff --git a/tests/ui/where-clauses/where-clause-region-outlives.rs b/tests/ui/where-clauses/where-clause-region-outlives.rs index 47a6d46820446..dc7828ac78b4b 100644 --- a/tests/ui/where-clauses/where-clause-region-outlives.rs +++ b/tests/ui/where-clauses/where-clause-region-outlives.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/where-clauses/where-clauses-cross-crate.rs b/tests/ui/where-clauses/where-clauses-cross-crate.rs index 713808520b5de..79d551272f795 100644 --- a/tests/ui/where-clauses/where-clauses-cross-crate.rs +++ b/tests/ui/where-clauses/where-clauses-cross-crate.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass //@ aux-build:where_clauses_xc.rs extern crate where_clauses_xc; diff --git a/tests/ui/where-clauses/where-clauses-lifetimes.rs b/tests/ui/where-clauses/where-clauses-lifetimes.rs index 63ab9bafa23d9..880a69ad3262d 100644 --- a/tests/ui/where-clauses/where-clauses-lifetimes.rs +++ b/tests/ui/where-clauses/where-clauses-lifetimes.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/where-clauses/where-clauses-method.rs b/tests/ui/where-clauses/where-clauses-method.rs index 1759c0f234683..1e0afacfa7ae5 100644 --- a/tests/ui/where-clauses/where-clauses-method.rs +++ b/tests/ui/where-clauses/where-clauses-method.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass // Test that a where clause attached to a method allows us to add // additional constraints to a parameter out of scope. diff --git a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs index 5961a51645785..b51a9ca63b281 100644 --- a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs +++ b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass #![allow(unused_variables)] struct Bencher; diff --git a/tests/ui/where-clauses/where-clauses.rs b/tests/ui/where-clauses/where-clauses.rs index f7bf875d4173f..0beb670638f24 100644 --- a/tests/ui/where-clauses/where-clauses.rs +++ b/tests/ui/where-clauses/where-clauses.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ check-pass trait Equal { fn equal(&self, other: &Self) -> bool; fn equals(&self, this: &T, that: &T, x: &U, y: &U) -> bool diff --git a/tests/ui/windows-subsystem/console.rs b/tests/ui/windows-subsystem/console.rs index 8f0ca2de370de..ff8b642d5272a 100644 --- a/tests/ui/windows-subsystem/console.rs +++ b/tests/ui/windows-subsystem/console.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![windows_subsystem = "console"] fn main() {} diff --git a/tests/ui/windows-subsystem/windows.rs b/tests/ui/windows-subsystem/windows.rs index 65db0fec7a8b6..757126bf77353 100644 --- a/tests/ui/windows-subsystem/windows.rs +++ b/tests/ui/windows-subsystem/windows.rs @@ -1,4 +1,4 @@ -//@ run-pass +//@ build-pass #![windows_subsystem = "windows"] fn main() {} From bde0008b542d31b300caff147d44d0dbbf49fb1b Mon Sep 17 00:00:00 2001 From: Walnut <39544927+Walnut356@users.noreply.github.com> Date: Sat, 6 Jun 2026 02:56:30 -0500 Subject: [PATCH 9/9] fix `breakpoint_callback` path --- src/etc/lldb_batchmode/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/lldb_batchmode/runner.py b/src/etc/lldb_batchmode/runner.py index e9b106390f6f9..cdc5458606858 100644 --- a/src/etc/lldb_batchmode/runner.py +++ b/src/etc/lldb_batchmode/runner.py @@ -98,7 +98,7 @@ def execute_command(command_interpreter, command): "registering breakpoint callback, id = " + str(breakpoint_id) ) callback_command = f"breakpoint command add -s python {str(breakpoint_id)} -o \ - 'import lldb_batchmode; lldb_batchmode.breakpoint_callback'" +'import lldb_batchmode; lldb_batchmode.runner.breakpoint_callback'" command_interpreter.HandleCommand(callback_command, res) if res.Succeeded():