diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index a3783db5f80d6..f414ff746bb82 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -13,7 +13,7 @@ use rustc_session::parse::feature_err; use rustc_session::{RustcVersion, Session}; use rustc_span::hygiene::Transparency; use rustc_span::{symbol::sym, symbol::Symbol, Span}; -use std::num::NonZeroU32; +use std::num::NonZero; use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause}; @@ -113,7 +113,7 @@ pub enum StabilityLevel { /// Reason for the current stability level. reason: UnstableReason, /// Relevant `rust-lang/rust` issue. - issue: Option, + issue: Option>, is_soft: bool, /// If part of a feature is stabilized and a new feature is added for the remaining parts, /// then the `implied_by` attribute is used to indicate which now-stable feature previously @@ -442,7 +442,7 @@ fn parse_unstability(sess: &Session, attr: &Attribute) -> Option<(Symbol, Stabil // is a name/value pair string literal. issue_num = match issue.unwrap().as_str() { "none" => None, - issue => match issue.parse::() { + issue => match issue.parse::>() { Ok(num) => Some(num), Err(err) => { sess.dcx().emit_err( diff --git a/compiler/rustc_attr/src/lib.rs b/compiler/rustc_attr/src/lib.rs index dd87a5c4dc384..fada69c4e6df1 100644 --- a/compiler/rustc_attr/src/lib.rs +++ b/compiler/rustc_attr/src/lib.rs @@ -7,6 +7,7 @@ #![allow(internal_features)] #![feature(rustdoc_internals)] #![doc(rust_logo)] +#![feature(generic_nonzero)] #![feature(let_chains)] #[macro_use] diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index b3d684086c286..65643e93d27c1 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -698,7 +698,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { ), .. }) => { - let hir::Ty { span, .. } = inputs[local.index() - 1]; + let hir::Ty { span, .. } = *inputs.get(local.index() - 1)?; Some(span) } _ => None, diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index ae4000f02a7d6..64469727d0dbe 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -1666,16 +1666,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { let func_ty = func.ty(body, self.infcx.tcx); if let ty::FnDef(def_id, _) = *func_ty.kind() { - if self.tcx().is_intrinsic(def_id) { - match self.tcx().item_name(def_id) { - sym::simd_shuffle => { - if !matches!(args[2], Spanned { node: Operand::Constant(_), .. }) { - self.tcx() - .dcx() - .emit_err(SimdShuffleLastConst { span: term.source_info.span }); - } - } - _ => {} + if let Some(sym::simd_shuffle) = self.tcx().intrinsic(def_id) { + if !matches!(args[2], Spanned { node: Operand::Constant(_), .. }) { + self.tcx().dcx().emit_err(SimdShuffleLastConst { span: term.source_info.span }); } } } diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index 0f0d828c8fc3f..6e846d721f2e2 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -387,15 +387,17 @@ pub(crate) fn codegen_terminator_call<'tcx>( match instance.def { InstanceDef::Intrinsic(_) => { - crate::intrinsics::codegen_intrinsic_call( + match crate::intrinsics::codegen_intrinsic_call( fx, instance, args, ret_place, target, source_info, - ); - return; + ) { + Ok(()) => return, + Err(instance) => Some(instance), + } } InstanceDef::DropGlue(_, None) => { // empty drop glue - a nop. diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 819cb5ef137ce..476752c7230a7 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -268,7 +268,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( destination: CPlace<'tcx>, target: Option, source_info: mir::SourceInfo, -) { +) -> Result<(), Instance<'tcx>> { let intrinsic = fx.tcx.item_name(instance.def_id()); let instance_args = instance.args; @@ -295,8 +295,9 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( destination, target, source_info, - ); + )?; } + Ok(()) } fn codegen_float_intrinsic_call<'tcx>( @@ -430,25 +431,20 @@ fn codegen_regular_intrinsic_call<'tcx>( ret: CPlace<'tcx>, destination: Option, source_info: mir::SourceInfo, -) { +) -> Result<(), Instance<'tcx>> { + assert_eq!(generic_args, instance.args); let usize_layout = fx.layout_of(fx.tcx.types.usize); match intrinsic { sym::abort => { fx.bcx.ins().trap(TrapCode::User(0)); - return; + return Ok(()); } sym::likely | sym::unlikely => { intrinsic_args!(fx, args => (a); intrinsic); ret.write_cvalue(fx, a); } - sym::is_val_statically_known => { - intrinsic_args!(fx, args => (_a); intrinsic); - - let res = fx.bcx.ins().iconst(types::I8, 0); - ret.write_cvalue(fx, CValue::by_val(res, ret.layout())); - } sym::breakpoint => { intrinsic_args!(fx, args => (); intrinsic); @@ -697,7 +693,7 @@ fn codegen_regular_intrinsic_call<'tcx>( }) }); crate::base::codegen_panic_nounwind(fx, &msg_str, Some(source_info.span)); - return; + return Ok(()); } } } @@ -792,7 +788,7 @@ fn codegen_regular_intrinsic_call<'tcx>( if fx.tcx.is_compiler_builtins(LOCAL_CRATE) { // special case for compiler-builtins to avoid having to patch it crate::trap::trap_unimplemented(fx, "128bit atomics not yet supported"); - return; + return Ok(()); } else { fx.tcx .dcx() @@ -802,7 +798,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, ty); - return; + return Ok(()); } } let clif_ty = fx.clif_type(ty).unwrap(); @@ -823,7 +819,7 @@ fn codegen_regular_intrinsic_call<'tcx>( if fx.tcx.is_compiler_builtins(LOCAL_CRATE) { // special case for compiler-builtins to avoid having to patch it crate::trap::trap_unimplemented(fx, "128bit atomics not yet supported"); - return; + return Ok(()); } else { fx.tcx .dcx() @@ -833,7 +829,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, ty); - return; + return Ok(()); } } @@ -850,7 +846,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -872,7 +868,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } @@ -895,7 +891,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -917,7 +913,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -939,7 +935,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -960,7 +956,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -981,7 +977,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1002,7 +998,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1023,7 +1019,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1044,7 +1040,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1065,7 +1061,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1086,7 +1082,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1233,19 +1229,6 @@ fn codegen_regular_intrinsic_call<'tcx>( ret.write_cvalue(fx, CValue::by_val(cmp, ret.layout())); } - sym::const_allocate => { - intrinsic_args!(fx, args => (_size, _align); intrinsic); - - // returns a null pointer at runtime. - let null = fx.bcx.ins().iconst(fx.pointer_type, 0); - ret.write_cvalue(fx, CValue::by_val(null, ret.layout())); - } - - sym::const_deallocate => { - intrinsic_args!(fx, args => (_ptr, _size, _align); intrinsic); - // nop at runtime. - } - sym::black_box => { intrinsic_args!(fx, args => (a); intrinsic); @@ -1261,13 +1244,12 @@ fn codegen_regular_intrinsic_call<'tcx>( ); } - _ => { - fx.tcx - .dcx() - .span_fatal(source_info.span, format!("unsupported intrinsic {}", intrinsic)); - } + // Unimplemented intrinsics must have a fallback body. The fallback body is obtained + // by converting the `InstanceDef::Intrinsic` to an `InstanceDef::Item`. + _ => return Err(Instance::new(instance.def_id(), instance.args)), } let ret_block = fx.get_block(destination.unwrap()); fx.bcx.ins().jump(ret_block, &[]); + Ok(()) } diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs index eac8cb437794b..f162ef831b768 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs @@ -90,7 +90,7 @@ fn get_simple_intrinsic<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, name: Symbol) -> } impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { - fn codegen_intrinsic_call(&mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, RValue<'gcc>>], llresult: RValue<'gcc>, span: Span) { + fn codegen_intrinsic_call(&mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, RValue<'gcc>>], llresult: RValue<'gcc>, span: Span) -> Result<(), Instance<'tcx>> { let tcx = self.tcx; let callee_ty = instance.ty(tcx, ty::ParamEnv::reveal_all()); @@ -137,7 +137,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { args[2].immediate(), llresult, ); - return; + return Ok(()); } sym::breakpoint => { unimplemented!(); @@ -166,12 +166,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { sym::volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.volatile_store(self, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.unaligned_volatile_store(self, dst); - return; + return Ok(()); } sym::prefetch_read_data | sym::prefetch_write_data @@ -269,7 +269,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { }, None => { tcx.dcx().emit_err(InvalidMonomorphization::BasicIntegerType { span, name, ty }); - return; + return Ok(()); } } } @@ -339,7 +339,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { extended_asm.set_volatile_flag(true); // We have copied the value to `result` already. - return; + return Ok(()); } sym::ptr_mask => { @@ -357,11 +357,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { _ if name_str.starts_with("simd_") => { match generic_simd_intrinsic(self, name, callee_ty, args, ret_ty, llret_ty, span) { Ok(llval) => llval, - Err(()) => return, + Err(()) => return Ok(()), } } - _ => bug!("unknown intrinsic '{}'", name), + // Fall back to default body + _ => return Err(Instance::new(instance.def_id(), instance.args)), }; if !fn_abi.ret.is_ignore() { @@ -376,6 +377,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { .store(self, result); } } + Ok(()) } fn abort(&mut self) { diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index e3e48ecb3aa5f..4415c51acf684 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -86,7 +86,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { args: &[OperandRef<'tcx, &'ll Value>], llresult: &'ll Value, span: Span, - ) { + ) -> Result<(), ty::Instance<'tcx>> { let tcx = self.tcx; let callee_ty = instance.ty(tcx, ty::ParamEnv::reveal_all()); @@ -141,7 +141,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { args[2].immediate(), llresult, ); - return; + return Ok(()); } sym::breakpoint => self.call_intrinsic("llvm.debugtrap", &[]), sym::va_copy => { @@ -194,17 +194,17 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { if !result.layout.is_zst() { self.store(load, result.llval, result.align); } - return; + return Ok(()); } sym::volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.volatile_store(self, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.unaligned_volatile_store(self, dst); - return; + return Ok(()); } sym::prefetch_read_data | sym::prefetch_write_data @@ -305,7 +305,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { name, ty, }); - return; + return Ok(()); } } } @@ -387,7 +387,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { .unwrap_or_else(|| bug!("failed to generate inline asm call for `black_box`")); // We have copied the value to `result` already. - return; + return Ok(()); } _ if name.as_str().starts_with("simd_") => { @@ -395,11 +395,15 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { self, name, callee_ty, fn_args, args, ret_ty, llret_ty, span, ) { Ok(llval) => llval, - Err(()) => return, + Err(()) => return Ok(()), } } - _ => bug!("unknown intrinsic '{}' -- should it have been lowered earlier?", name), + _ => { + debug!("unknown intrinsic '{}' -- falling back to default body", name); + // Call the fallback body instead of generating the intrinsic code + return Err(ty::Instance::new(instance.def_id(), instance.args)); + } }; if !fn_abi.ret.is_ignore() { @@ -411,6 +415,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { .store(self, result); } } + Ok(()) } fn abort(&mut self) { diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index e35b4029b4506..75d413dedad3e 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -787,7 +787,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // Handle intrinsics old codegen wants Expr's for, ourselves. let intrinsic = match def { - Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().item_name(def_id)), + Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().intrinsic(def_id).unwrap()), _ => None, }; @@ -817,21 +817,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // The arguments we'll be passing. Plus one to account for outptr, if used. let arg_count = fn_abi.args.len() + fn_abi.ret.is_indirect() as usize; - let mut llargs = Vec::with_capacity(arg_count); - - // Prepare the return value destination - let ret_dest = if target.is_some() { - let is_intrinsic = intrinsic.is_some(); - self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, is_intrinsic) - } else { - ReturnDest::Nothing - }; if intrinsic == Some(sym::caller_location) { return if let Some(target) = target { let location = self.get_caller_location(bx, mir::SourceInfo { span: fn_span, ..source_info }); + let mut llargs = Vec::with_capacity(arg_count); + let ret_dest = + self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, true, true); + assert_eq!(llargs, []); if let ReturnDest::IndirectOperand(tmp, _) = ret_dest { location.val.store(bx, tmp); } @@ -842,9 +837,18 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { }; } - match intrinsic { - None | Some(sym::drop_in_place) => {} + let instance = match intrinsic { + None | Some(sym::drop_in_place) => instance, Some(intrinsic) => { + let mut llargs = Vec::with_capacity(1); + let ret_dest = self.make_return_dest( + bx, + destination, + &fn_abi.ret, + &mut llargs, + true, + target.is_some(), + ); let dest = match ret_dest { _ if fn_abi.ret.is_indirect() => llargs[0], ReturnDest::Nothing => bx.const_undef(bx.type_ptr()), @@ -878,27 +882,29 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { }) .collect(); - Self::codegen_intrinsic_call( - bx, - *instance.as_ref().unwrap(), - fn_abi, - &args, - dest, - span, - ); + let instance = *instance.as_ref().unwrap(); + match Self::codegen_intrinsic_call(bx, instance, fn_abi, &args, dest, span) { + Ok(()) => { + if let ReturnDest::IndirectOperand(dst, _) = ret_dest { + self.store_return(bx, ret_dest, &fn_abi.ret, dst.llval); + } - if let ReturnDest::IndirectOperand(dst, _) = ret_dest { - self.store_return(bx, ret_dest, &fn_abi.ret, dst.llval); + return if let Some(target) = target { + helper.funclet_br(self, bx, target, mergeable_succ) + } else { + bx.unreachable(); + MergingSucc::False + }; + } + Err(instance) => Some(instance), } - - return if let Some(target) = target { - helper.funclet_br(self, bx, target, mergeable_succ) - } else { - bx.unreachable(); - MergingSucc::False - }; } - } + }; + + let mut llargs = Vec::with_capacity(arg_count); + let destination = target.as_ref().map(|&target| { + (self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, false, true), target) + }); // Split the rust-call tupled arguments off. let (first_args, untuple) = if abi == Abi::RustCall && !args.is_empty() { @@ -1040,14 +1046,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { (_, Some(llfn)) => llfn, _ => span_bug!(span, "no instance or llfn for call"), }; - helper.do_call( self, bx, fn_abi, fn_ptr, &llargs, - target.as_ref().map(|&target| (ret_dest, target)), + destination, unwind, &copied_constant_arguments, mergeable_succ, @@ -1632,7 +1637,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { fn_ret: &ArgAbi<'tcx, Ty<'tcx>>, llargs: &mut Vec, is_intrinsic: bool, + has_target: bool, ) -> ReturnDest<'tcx, Bx::Value> { + if !has_target { + return ReturnDest::Nothing; + } // If the return is ignored, we can just return a do-nothing `ReturnDest`. if fn_ret.is_ignore() { return ReturnDest::Nothing; diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index 8530bf9e2b363..e4633acd81740 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -54,6 +54,7 @@ fn memset_intrinsic<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( } impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { + /// In the `Err` case, returns the instance that should be called instead. pub fn codegen_intrinsic_call( bx: &mut Bx, instance: ty::Instance<'tcx>, @@ -61,7 +62,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args: &[OperandRef<'tcx, Bx::Value>], llresult: Bx::Value, span: Span, - ) { + ) -> Result<(), ty::Instance<'tcx>> { let callee_ty = instance.ty(bx.tcx(), ty::ParamEnv::reveal_all()); let ty::FnDef(def_id, fn_args) = *callee_ty.kind() else { @@ -81,7 +82,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let llval = match name { sym::abort => { bx.abort(); - return; + return Ok(()); } sym::va_start => bx.va_start(args[0].immediate()), @@ -150,7 +151,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[0].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::write_bytes => { memset_intrinsic( @@ -161,7 +162,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_copy_nonoverlapping_memory => { @@ -174,7 +175,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_copy_memory => { copy_intrinsic( @@ -186,7 +187,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_set_memory => { memset_intrinsic( @@ -197,17 +198,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_store => { let dst = args[0].deref(bx.cx()); args[1].val.volatile_store(bx, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(bx.cx()); args[1].val.unaligned_volatile_store(bx, dst); - return; + return Ok(()); } sym::exact_div => { let ty = arg_tys[0]; @@ -225,7 +226,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name, ty, }); - return; + return Ok(()); } } } @@ -245,7 +246,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name, ty: arg_tys[0], }); - return; + return Ok(()); } } } @@ -256,14 +257,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { span, ty: arg_tys[0], }); - return; + return Ok(()); } let Some((_width, signed)) = int_type_width_signed(ret_ty, bx.tcx()) else { bx.tcx().dcx().emit_err(InvalidMonomorphization::FloatToIntUnchecked { span, ty: ret_ty, }); - return; + return Ok(()); }; if signed { bx.fptosi(args[0].immediate(), llret_ty) @@ -280,16 +281,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } } - sym::const_allocate => { - // returns a null pointer at runtime. - bx.const_null(bx.type_ptr()) - } - - sym::const_deallocate => { - // nop at runtime. - return; - } - // This requires that atomic intrinsics follow a specific naming pattern: // "atomic_[_]" name if let Some(atomic) = name_str.strip_prefix("atomic_") => { @@ -350,10 +341,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { bx.store(val, dest.llval, dest.align); let dest = result.project_field(bx, 1); bx.store(success, dest.llval, dest.align); - return; } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); } + return Ok(()); } "load" => { @@ -383,7 +374,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { ) } } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); + return Ok(()); } } @@ -399,10 +391,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { val = bx.ptrtoint(val, bx.type_isize()); } bx.atomic_store(val, ptr, parse_ordering(bx, ordering), size); - return; } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); } + return Ok(()); } "fence" => { @@ -410,7 +402,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { parse_ordering(bx, ordering), SynchronizationScope::CrossThread, ); - return; + return Ok(()); } "singlethreadfence" => { @@ -418,7 +410,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { parse_ordering(bx, ordering), SynchronizationScope::SingleThread, ); - return; + return Ok(()); } // These are all AtomicRMW ops @@ -449,7 +441,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } bx.atomic_rmw(atom_op, ptr, val, parse_ordering(bx, ordering)) } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); + return Ok(()); } } } @@ -458,7 +451,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { sym::nontemporal_store => { let dst = args[0].deref(bx.cx()); args[1].val.nontemporal_store(bx, dst); - return; + return Ok(()); } sym::ptr_guaranteed_cmp => { @@ -493,8 +486,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { _ => { // Need to use backend-specific things in the implementation. - bx.codegen_intrinsic_call(instance, fn_abi, args, llresult, span); - return; + return bx.codegen_intrinsic_call(instance, fn_abi, args, llresult, span); } }; @@ -507,6 +499,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { .store(bx, result); } } + Ok(()) } } diff --git a/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs b/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs index 450672fb94122..502f0b3fcb510 100644 --- a/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs @@ -8,6 +8,8 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes { /// Remember to add all intrinsics here, in `compiler/rustc_hir_analysis/src/check/mod.rs`, /// and in `library/core/src/intrinsics.rs`; if you need access to any LLVM intrinsics, /// add them to `compiler/rustc_codegen_llvm/src/context.rs`. + /// Returns `Err` if another instance should be called instead. This is used to invoke + /// intrinsic default bodies in case an intrinsic is not implemented by the backend. fn codegen_intrinsic_call( &mut self, instance: ty::Instance<'tcx>, @@ -15,7 +17,7 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes { args: &[OperandRef<'tcx, Self::Value>], llresult: Self::Value, span: Span, - ); + ) -> Result<(), ty::Instance<'tcx>>; fn abort(&mut self); fn assume(&mut self, val: Self::Value); diff --git a/compiler/rustc_const_eval/messages.ftl b/compiler/rustc_const_eval/messages.ftl index 4a6d4fe930cf3..c456e40d7c15b 100644 --- a/compiler/rustc_const_eval/messages.ftl +++ b/compiler/rustc_const_eval/messages.ftl @@ -453,7 +453,7 @@ const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, bu const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer -const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const` or `static` +const_eval_validation_mutable_ref_in_const_or_static = {$front_matter}: encountered mutable reference in a `const` or `static` const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!` const_eval_validation_null_box = {$front_matter}: encountered a null box diff --git a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs index dbc29e607eff9..ddad6683afbd9 100644 --- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs @@ -49,7 +49,7 @@ fn constness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Constness { hir::Node::ForeignItem(hir::ForeignItem { kind: hir::ForeignItemKind::Fn(..), .. }) => { // Intrinsics use `rustc_const_{un,}stable` attributes to indicate constness. All other // foreign items cannot be evaluated at compile-time. - let is_const = if tcx.is_intrinsic(def_id) { + let is_const = if tcx.intrinsic(def_id).is_some() { tcx.lookup_const_stability(def_id).is_some() } else { false diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 11679ab77e351..2fd34b3c7fc31 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -603,18 +603,18 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { PtrToUninhabited { ptr_kind: PointerKind::Box, .. } => { const_eval_validation_box_to_uninhabited } - PtrToUninhabited { ptr_kind: PointerKind::Ref, .. } => { + PtrToUninhabited { ptr_kind: PointerKind::Ref(_), .. } => { const_eval_validation_ref_to_uninhabited } PtrToStatic { ptr_kind: PointerKind::Box } => const_eval_validation_box_to_static, - PtrToStatic { ptr_kind: PointerKind::Ref } => const_eval_validation_ref_to_static, + PtrToStatic { ptr_kind: PointerKind::Ref(_) } => const_eval_validation_ref_to_static, PointerAsInt { .. } => const_eval_validation_pointer_as_int, PartialPointer => const_eval_validation_partial_pointer, ConstRefToMutable => const_eval_validation_const_ref_to_mutable, ConstRefToExtern => const_eval_validation_const_ref_to_extern, - MutableRefInConst => const_eval_validation_mutable_ref_in_const, + MutableRefInConstOrStatic => const_eval_validation_mutable_ref_in_const_or_static, MutableRefToImmutable => const_eval_validation_mutable_ref_to_immutable, NullFnPtr => const_eval_validation_null_fn_ptr, NeverVal => const_eval_validation_never_val, @@ -630,37 +630,39 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Box } => { const_eval_validation_invalid_box_slice_meta } - InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Ref } => { + InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_invalid_ref_slice_meta } InvalidMetaTooLarge { ptr_kind: PointerKind::Box } => { const_eval_validation_invalid_box_meta } - InvalidMetaTooLarge { ptr_kind: PointerKind::Ref } => { + InvalidMetaTooLarge { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_invalid_ref_meta } - UnalignedPtr { ptr_kind: PointerKind::Ref, .. } => const_eval_validation_unaligned_ref, + UnalignedPtr { ptr_kind: PointerKind::Ref(_), .. } => { + const_eval_validation_unaligned_ref + } UnalignedPtr { ptr_kind: PointerKind::Box, .. } => const_eval_validation_unaligned_box, NullPtr { ptr_kind: PointerKind::Box } => const_eval_validation_null_box, - NullPtr { ptr_kind: PointerKind::Ref } => const_eval_validation_null_ref, + NullPtr { ptr_kind: PointerKind::Ref(_) } => const_eval_validation_null_ref, DanglingPtrNoProvenance { ptr_kind: PointerKind::Box, .. } => { const_eval_validation_dangling_box_no_provenance } - DanglingPtrNoProvenance { ptr_kind: PointerKind::Ref, .. } => { + DanglingPtrNoProvenance { ptr_kind: PointerKind::Ref(_), .. } => { const_eval_validation_dangling_ref_no_provenance } DanglingPtrOutOfBounds { ptr_kind: PointerKind::Box } => { const_eval_validation_dangling_box_out_of_bounds } - DanglingPtrOutOfBounds { ptr_kind: PointerKind::Ref } => { + DanglingPtrOutOfBounds { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_dangling_ref_out_of_bounds } DanglingPtrUseAfterFree { ptr_kind: PointerKind::Box } => { const_eval_validation_dangling_box_use_after_free } - DanglingPtrUseAfterFree { ptr_kind: PointerKind::Ref } => { + DanglingPtrUseAfterFree { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_dangling_ref_use_after_free } InvalidBool { .. } => const_eval_validation_invalid_bool, @@ -766,7 +768,7 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { } NullPtr { .. } | PtrToStatic { .. } - | MutableRefInConst + | MutableRefInConstOrStatic | ConstRefToMutable | ConstRefToExtern | MutableRefToImmutable diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index b2207c3d3106c..e72ace8be3559 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -526,7 +526,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { match instance.def { ty::InstanceDef::Intrinsic(def_id) => { - assert!(self.tcx.is_intrinsic(def_id)); + assert!(self.tcx.intrinsic(def_id).is_some()); // FIXME: Should `InPlace` arguments be reset to uninit? M::call_intrinsic( self, diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 08a2e38bfa1b7..792e1c9e736a4 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -5,7 +5,7 @@ //! to be const-safe. use std::fmt::Write; -use std::num::NonZeroUsize; +use std::num::NonZero; use either::{Left, Right}; @@ -445,22 +445,22 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' // Determine whether this pointer expects to be pointing to something mutable. let ptr_expected_mutbl = match ptr_kind { PointerKind::Box => Mutability::Mut, - PointerKind::Ref => { - let tam = value.layout.ty.builtin_deref(false).unwrap(); - // ZST never require mutability. We do not take into account interior mutability - // here since we cannot know if there really is an `UnsafeCell` inside - // `Option` -- so we check that in the recursive descent behind this - // reference. - if size == Size::ZERO { Mutability::Not } else { tam.mutbl } + PointerKind::Ref(mutbl) => { + // We do not take into account interior mutability here since we cannot know if + // there really is an `UnsafeCell` inside `Option` -- so we check + // that in the recursive descent behind this reference (controlled by + // `allow_immutable_unsafe_cell`). + mutbl } }; // Proceed recursively even for ZST, no reason to skip them! // `!` is a ZST and we want to validate it. if let Ok((alloc_id, _offset, _prov)) = self.ecx.ptr_try_get_alloc_id(place.ptr()) { + let mut skip_recursive_check = false; // Let's see what kind of memory this points to. // `unwrap` since dangling pointers have already been handled. let alloc_kind = self.ecx.tcx.try_get_global_alloc(alloc_id).unwrap(); - match alloc_kind { + let alloc_actual_mutbl = match alloc_kind { GlobalAlloc::Static(did) => { // Special handling for pointers to statics (irrespective of their type). assert!(!self.ecx.tcx.is_thread_local_static(did)); @@ -474,12 +474,6 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' .no_bound_vars() .expect("statics should not have generic parameters") .is_freeze(*self.ecx.tcx, ty::ParamEnv::reveal_all()); - // Mutability check. - if ptr_expected_mutbl == Mutability::Mut { - if !is_mut { - throw_validation_failure!(self.path, MutableRefToImmutable); - } - } // Mode-specific checks match self.ctfe_mode { Some( @@ -494,15 +488,9 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' // trigger cycle errors if we try to compute the value of the other static // and that static refers back to us (potentially through a promoted). // This could miss some UB, but that's fine. - return Ok(()); + skip_recursive_check = true; } Some(CtfeValidationMode::Const { .. }) => { - // For consts on the other hand we have to recursively check; - // pattern matching assumes a valid value. However we better make - // sure this is not mutable. - if is_mut { - throw_validation_failure!(self.path, ConstRefToMutable); - } // We can't recursively validate `extern static`, so we better reject them. if self.ecx.tcx.is_foreign_item(did) { throw_validation_failure!(self.path, ConstRefToExtern); @@ -510,26 +498,39 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' } None => {} } + // Return alloc mutability + if is_mut { Mutability::Mut } else { Mutability::Not } } - GlobalAlloc::Memory(alloc) => { - if alloc.inner().mutability == Mutability::Mut - && matches!(self.ctfe_mode, Some(CtfeValidationMode::Const { .. })) - { - throw_validation_failure!(self.path, ConstRefToMutable); - } - if ptr_expected_mutbl == Mutability::Mut - && alloc.inner().mutability == Mutability::Not - { - throw_validation_failure!(self.path, MutableRefToImmutable); - } - } + GlobalAlloc::Memory(alloc) => alloc.inner().mutability, GlobalAlloc::Function(..) | GlobalAlloc::VTable(..) => { // These are immutable, we better don't allow mutable pointers here. - if ptr_expected_mutbl == Mutability::Mut { - throw_validation_failure!(self.path, MutableRefToImmutable); - } + Mutability::Not + } + }; + // Mutability check. + // If this allocation has size zero, there is no actual mutability here. + let (size, _align, _alloc_kind) = self.ecx.get_alloc_info(alloc_id); + if size != Size::ZERO { + if ptr_expected_mutbl == Mutability::Mut + && alloc_actual_mutbl == Mutability::Not + { + throw_validation_failure!(self.path, MutableRefToImmutable); + } + if ptr_expected_mutbl == Mutability::Mut + && self.ctfe_mode.is_some_and(|c| !c.may_contain_mutable_ref()) + { + throw_validation_failure!(self.path, MutableRefInConstOrStatic); + } + if alloc_actual_mutbl == Mutability::Mut + && matches!(self.ctfe_mode, Some(CtfeValidationMode::Const { .. })) + { + throw_validation_failure!(self.path, ConstRefToMutable); } } + // Potentially skip recursive check. + if skip_recursive_check { + return Ok(()); + } } let path = &self.path; ref_tracking.track(place, || { @@ -598,16 +599,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' } Ok(true) } - ty::Ref(_, ty, mutbl) => { - if self.ctfe_mode.is_some_and(|c| !c.may_contain_mutable_ref()) - && *mutbl == Mutability::Mut - { - let layout = self.ecx.layout_of(*ty)?; - if !layout.is_zst() { - throw_validation_failure!(self.path, MutableRefInConst); - } - } - self.check_safe_pointer(value, PointerKind::Ref)?; + ty::Ref(_, _ty, mutbl) => { + self.check_safe_pointer(value, PointerKind::Ref(*mutbl))?; Ok(true) } ty::FnPtr(_sig) => { @@ -785,7 +778,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> fn visit_union( &mut self, op: &OpTy<'tcx, M::Provenance>, - _fields: NonZeroUsize, + _fields: NonZero, ) -> InterpResult<'tcx> { // Special check for CTFE validation, preventing `UnsafeCell` inside unions in immutable memory. if self.ctfe_mode.is_some_and(|c| !c.allow_immutable_unsafe_cell()) { diff --git a/compiler/rustc_const_eval/src/interpret/visitor.rs b/compiler/rustc_const_eval/src/interpret/visitor.rs index 340a496a68990..b200ecbf73af5 100644 --- a/compiler/rustc_const_eval/src/interpret/visitor.rs +++ b/compiler/rustc_const_eval/src/interpret/visitor.rs @@ -7,7 +7,7 @@ use rustc_middle::ty; use rustc_target::abi::FieldIdx; use rustc_target::abi::{FieldsShape, VariantIdx, Variants}; -use std::num::NonZeroUsize; +use std::num::NonZero; use super::{InterpCx, MPlaceTy, Machine, Projectable}; @@ -43,7 +43,7 @@ pub trait ValueVisitor<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>>: Sized { } /// Visits the given value as a union. No automatic recursion can happen here. #[inline(always)] - fn visit_union(&mut self, _v: &Self::V, _fields: NonZeroUsize) -> InterpResult<'tcx> { + fn visit_union(&mut self, _v: &Self::V, _fields: NonZero) -> InterpResult<'tcx> { Ok(()) } /// Visits the given value as the pointer of a `Box`. There is nothing to recurse into. diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs index e33f374c35954..51836063945e4 100644 --- a/compiler/rustc_const_eval/src/lib.rs +++ b/compiler/rustc_const_eval/src/lib.rs @@ -11,6 +11,7 @@ Rust MIR: a lowered representation of Rust. #![feature(assert_matches)] #![feature(box_patterns)] #![feature(decl_macro)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(slice_ptr_get)] #![feature(never_type)] diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 43048dc41d3c2..96c9e740568cc 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -861,7 +861,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { // We do not use `const` modifiers for intrinsic "functions", as intrinsics are // `extern` functions, and these have no way to get marked `const`. So instead we // use `rustc_const_(un)stable` attributes to mean that the intrinsic is `const` - if self.ccx.is_const_stable_const_fn() || tcx.is_intrinsic(callee) { + if self.ccx.is_const_stable_const_fn() || tcx.intrinsic(callee).is_some() { self.check_op(ops::FnCallUnstable(callee, None)); return; } diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 2b799d6f5d3b8..b82a9a909e6d0 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -20,6 +20,7 @@ #![feature(cfg_match)] #![feature(core_intrinsics)] #![feature(extend_one)] +#![feature(generic_nonzero)] #![feature(hash_raw_entry)] #![feature(hasher_prefixfree_extras)] #![feature(lazy_cell)] diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs index 52304c72a2f8d..15691804a94b2 100644 --- a/compiler/rustc_data_structures/src/stable_hasher.rs +++ b/compiler/rustc_data_structures/src/stable_hasher.rs @@ -6,6 +6,7 @@ use std::fmt; use std::hash::{BuildHasher, Hash, Hasher}; use std::marker::PhantomData; use std::mem; +use std::num::NonZero; #[cfg(test)] mod tests; @@ -338,14 +339,14 @@ impl HashStable for PhantomData { fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {} } -impl HashStable for ::std::num::NonZeroU32 { +impl HashStable for NonZero { #[inline] fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { self.get().hash_stable(ctx, hasher) } } -impl HashStable for ::std::num::NonZeroUsize { +impl HashStable for NonZero { #[inline] fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { self.get().hash_stable(ctx, hasher) diff --git a/compiler/rustc_data_structures/src/sync/worker_local.rs b/compiler/rustc_data_structures/src/sync/worker_local.rs index b34d3dd904400..50a614a1b0279 100644 --- a/compiler/rustc_data_structures/src/sync/worker_local.rs +++ b/compiler/rustc_data_structures/src/sync/worker_local.rs @@ -1,7 +1,7 @@ use parking_lot::Mutex; use std::cell::Cell; use std::cell::OnceCell; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::Deref; use std::ptr; use std::sync::Arc; @@ -31,7 +31,7 @@ impl RegistryId { } struct RegistryData { - thread_limit: NonZeroUsize, + thread_limit: NonZero, threads: Mutex, } @@ -61,7 +61,7 @@ thread_local! { impl Registry { /// Creates a registry which can hold up to `thread_limit` threads. - pub fn new(thread_limit: NonZeroUsize) -> Self { + pub fn new(thread_limit: NonZero) -> Self { Registry(Arc::new(RegistryData { thread_limit, threads: Mutex::new(0) })) } diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs index e893a2c781346..ff4208def319d 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs @@ -4,7 +4,7 @@ use std::fmt; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::mem::ManuallyDrop; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::{Deref, DerefMut}; use std::ptr::NonNull; @@ -134,7 +134,7 @@ where ptr.map_addr(|addr| { // Safety: - // - The pointer is `NonNull` => it's address is `NonZeroUsize` + // - The pointer is `NonNull` => it's address is `NonZero` // - `P::BITS` least significant bits are always zero (`Pointer` contract) // - `T::BITS <= P::BITS` (from `Self::ASSERTION`) // @@ -143,14 +143,14 @@ where // `{non_zero} | packed_tag` can't make the value zero. let packed = (addr.get() >> T::BITS) | packed_tag; - unsafe { NonZeroUsize::new_unchecked(packed) } + unsafe { NonZero::new_unchecked(packed) } }) } /// Retrieves the original raw pointer from `self.packed`. #[inline] pub(super) fn pointer_raw(&self) -> NonNull { - self.packed.map_addr(|addr| unsafe { NonZeroUsize::new_unchecked(addr.get() << T::BITS) }) + self.packed.map_addr(|addr| unsafe { NonZero::new_unchecked(addr.get() << T::BITS) }) } /// This provides a reference to the `P` pointer itself, rather than the diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index e936ebc7185fa..eaf75539f59b9 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -79,7 +79,7 @@ into_diagnostic_arg_using_display!( ast::ParamKindOrd, std::io::Error, Box, - std::num::NonZeroU32, + std::num::NonZero, hir::Target, Edition, Ident, diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index b0db3545ae7cd..b9b257856e678 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -16,6 +16,7 @@ #![feature(box_patterns)] #![feature(error_reporter)] #![feature(extract_if)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(negative_impls)] #![feature(never_type)] @@ -77,7 +78,7 @@ use std::error::Report; use std::fmt; use std::hash::Hash; use std::io::Write; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::DerefMut; use std::panic; use std::path::{Path, PathBuf}; @@ -525,6 +526,7 @@ pub enum StashKey { MaybeFruTypo, CallAssocMethod, TraitMissingMethod, + AssociatedTypeSuggestion, OpaqueHiddenTypeMismatch, MaybeForgetReturn, /// Query cycle detected, stashing in favor of a better error. @@ -546,7 +548,7 @@ pub struct DiagCtxtFlags { pub can_emit_warnings: bool, /// If Some, the Nth error-level diagnostic is upgraded to bug-level. /// (rustc: see `-Z treat-err-as-bug`) - pub treat_err_as_bug: Option, + pub treat_err_as_bug: Option>, /// Eagerly emit delayed bugs as errors, so that the compiler debugger may /// see all of the errors being emitted at once. pub eagerly_emit_delayed_bugs: bool, diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 6aedd2a5e3341..99875ec540545 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -788,6 +788,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_safe_intrinsic, Normal, template!(Word), WarnFollowing, "the `#[rustc_safe_intrinsic]` attribute is used internally to mark intrinsics as safe" ), + rustc_attr!( + rustc_intrinsic, Normal, template!(Word), ErrorFollowing, + "the `#[rustc_intrinsic]` attribute is used to declare intrinsics with function bodies", + ), // ========================================================================== // Internal attributes, Testing: diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs index f1c8f2e2dde5c..cbc0ce8c97468 100644 --- a/compiler/rustc_feature/src/lib.rs +++ b/compiler/rustc_feature/src/lib.rs @@ -12,6 +12,7 @@ //! symbol to the `accepted` or `removed` modules respectively. #![allow(internal_features)] +#![feature(generic_nonzero)] #![feature(rustdoc_internals)] #![doc(rust_logo)] #![feature(lazy_cell)] @@ -25,13 +26,13 @@ mod unstable; mod tests; use rustc_span::symbol::Symbol; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(Debug, Clone)] pub struct Feature { pub name: Symbol, pub since: &'static str, - issue: Option, + issue: Option>, } #[derive(Copy, Clone, Debug)] @@ -85,7 +86,7 @@ impl UnstableFeatures { } } -fn find_lang_feature_issue(feature: Symbol) -> Option { +fn find_lang_feature_issue(feature: Symbol) -> Option> { // Search in all the feature lists. if let Some(f) = UNSTABLE_FEATURES.iter().find(|f| f.feature.name == feature) { return f.feature.issue; @@ -99,21 +100,21 @@ fn find_lang_feature_issue(feature: Symbol) -> Option { panic!("feature `{feature}` is not declared anywhere"); } -const fn to_nonzero(n: Option) -> Option { - // Can be replaced with `n.and_then(NonZeroU32::new)` if that is ever usable +const fn to_nonzero(n: Option) -> Option> { + // Can be replaced with `n.and_then(NonZero::new)` if that is ever usable // in const context. Requires https://github.com/rust-lang/rfcs/pull/2632. match n { None => None, - Some(n) => NonZeroU32::new(n), + Some(n) => NonZero::new(n), } } pub enum GateIssue { Language, - Library(Option), + Library(Option>), } -pub fn find_feature_issue(feature: Symbol, issue: GateIssue) -> Option { +pub fn find_feature_issue(feature: Symbol, issue: GateIssue) -> Option> { match issue { GateIssue::Language => find_lang_feature_issue(feature), GateIssue::Library(lib) => lib, diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 488d16f18da92..1410273e3bc9e 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -525,7 +525,18 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) { DefKind::Enum => { check_enum(tcx, def_id); } - DefKind::Fn => {} // entirely within check_item_body + DefKind::Fn => { + if let Some(name) = tcx.intrinsic(def_id) { + intrinsic::check_intrinsic_type( + tcx, + def_id, + tcx.def_ident_span(def_id).unwrap(), + name, + Abi::Rust, + ) + } + // Everything else is checked entirely within check_item_body + } DefKind::Impl { of_trait } => { if of_trait && let Some(impl_trait_header) = tcx.impl_trait_header(def_id) { check_impl_items_against_trait( @@ -590,15 +601,24 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) { match abi { Abi::RustIntrinsic => { for item in items { - let item = tcx.hir().foreign_item(item.id); - intrinsic::check_intrinsic_type(tcx, item); + intrinsic::check_intrinsic_type( + tcx, + item.id.owner_id.def_id, + item.span, + item.ident.name, + abi, + ); } } Abi::PlatformIntrinsic => { for item in items { - let item = tcx.hir().foreign_item(item.id); - intrinsic::check_platform_intrinsic_type(tcx, item); + intrinsic::check_platform_intrinsic_type( + tcx, + item.id.owner_id.def_id, + item.span, + item.ident.name, + ); } } diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index dc391ab5648c6..f0f6bfff64aaa 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -7,30 +7,36 @@ use crate::errors::{ WrongNumberOfGenericArgumentsToIntrinsic, }; -use hir::def_id::DefId; use rustc_errors::{codes::*, struct_span_code_err, DiagnosticMessage}; use rustc_hir as hir; use rustc_middle::traits::{ObligationCause, ObligationCauseCode}; use rustc_middle::ty::{self, Ty, TyCtxt}; +use rustc_span::def_id::LocalDefId; use rustc_span::symbol::{kw, sym}; +use rustc_span::{Span, Symbol}; use rustc_target::spec::abi::Abi; fn equate_intrinsic_type<'tcx>( tcx: TyCtxt<'tcx>, - it: &hir::ForeignItem<'_>, + span: Span, + def_id: LocalDefId, n_tps: usize, n_lts: usize, n_cts: usize, sig: ty::PolyFnSig<'tcx>, ) { - let (own_counts, span) = match &it.kind { - hir::ForeignItemKind::Fn(.., generics) => { - let own_counts = tcx.generics_of(it.owner_id.to_def_id()).own_counts(); + let (own_counts, span) = match tcx.hir_node_by_def_id(def_id) { + hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. }) + | hir::Node::ForeignItem(hir::ForeignItem { + kind: hir::ForeignItemKind::Fn(.., generics), + .. + }) => { + let own_counts = tcx.generics_of(def_id).own_counts(); (own_counts, generics.span) } _ => { - struct_span_code_err!(tcx.dcx(), it.span, E0622, "intrinsic must be a function") - .with_span_label(it.span, "expected a function") + struct_span_code_err!(tcx.dcx(), span, E0622, "intrinsic must be a function") + .with_span_label(span, "expected a function") .emit(); return; } @@ -54,23 +60,26 @@ fn equate_intrinsic_type<'tcx>( && gen_count_ok(own_counts.types, n_tps, "type") && gen_count_ok(own_counts.consts, n_cts, "const") { - let it_def_id = it.owner_id.def_id; let _ = check_function_signature( tcx, - ObligationCause::new(it.span, it_def_id, ObligationCauseCode::IntrinsicType), - it_def_id.into(), + ObligationCause::new(span, def_id, ObligationCauseCode::IntrinsicType), + def_id.into(), sig, ); } } /// Returns the unsafety of the given intrinsic. -pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir::Unsafety { - let has_safe_attr = match tcx.has_attr(intrinsic_id, sym::rustc_safe_intrinsic) { - true => hir::Unsafety::Normal, - false => hir::Unsafety::Unsafe, +pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hir::Unsafety { + let has_safe_attr = if tcx.has_attr(intrinsic_id, sym::rustc_intrinsic) { + tcx.fn_sig(intrinsic_id).skip_binder().unsafety() + } else { + match tcx.has_attr(intrinsic_id, sym::rustc_safe_intrinsic) { + true => hir::Unsafety::Normal, + false => hir::Unsafety::Unsafe, + } }; - let is_in_list = match tcx.item_name(intrinsic_id) { + let is_in_list = match tcx.item_name(intrinsic_id.into()) { // When adding a new intrinsic to this list, // it's usually worth updating that intrinsic's documentation // to note that it's safe to call, since @@ -112,6 +121,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir | sym::forget | sym::black_box | sym::variant_count + | sym::is_val_statically_known | sym::ptr_mask | sym::debug_assertions => hir::Unsafety::Normal, _ => hir::Unsafety::Unsafe, @@ -122,7 +132,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir tcx.def_span(intrinsic_id), DiagnosticMessage::from(format!( "intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{}`", - tcx.item_name(intrinsic_id) + tcx.item_name(intrinsic_id.into()) ) )).emit(); } @@ -132,8 +142,14 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir /// Remember to add all intrinsics here, in `compiler/rustc_codegen_llvm/src/intrinsic.rs`, /// and in `library/core/src/intrinsics.rs`. -pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { - let generics = tcx.generics_of(it.owner_id); +pub fn check_intrinsic_type( + tcx: TyCtxt<'_>, + intrinsic_id: LocalDefId, + span: Span, + intrinsic_name: Symbol, + abi: Abi, +) { + let generics = tcx.generics_of(intrinsic_id); let param = |n| { if let Some(&ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. @@ -141,11 +157,9 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { { Ty::new_param(tcx, n, name) } else { - Ty::new_error_with_message(tcx, tcx.def_span(it.owner_id), "expected param") + Ty::new_error_with_message(tcx, span, "expected param") } }; - let intrinsic_id = it.owner_id.to_def_id(); - let intrinsic_name = tcx.item_name(intrinsic_id); let name_str = intrinsic_name.as_str(); let bound_vars = tcx.mk_bound_variable_kinds(&[ @@ -169,7 +183,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { }) }; - let (n_tps, n_lts, inputs, output, unsafety) = if name_str.starts_with("atomic_") { + let (n_tps, n_lts, n_cts, inputs, output, unsafety) = if name_str.starts_with("atomic_") { let split: Vec<&str> = name_str.split('_').collect(); assert!(split.len() >= 2, "Atomic intrinsic in an incorrect format"); @@ -187,49 +201,51 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { | "umin" => (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], param(0)), "fence" | "singlethreadfence" => (0, Vec::new(), Ty::new_unit(tcx)), op => { - tcx.dcx().emit_err(UnrecognizedAtomicOperation { span: it.span, op }); + tcx.dcx().emit_err(UnrecognizedAtomicOperation { span, op }); return; } }; - (n_tps, 0, inputs, output, hir::Unsafety::Unsafe) + (n_tps, 0, 0, inputs, output, hir::Unsafety::Unsafe) } else { let unsafety = intrinsic_operation_unsafety(tcx, intrinsic_id); - let (n_tps, inputs, output) = match intrinsic_name { - sym::abort => (0, Vec::new(), tcx.types.never), - sym::unreachable => (0, Vec::new(), tcx.types.never), - sym::breakpoint => (0, Vec::new(), Ty::new_unit(tcx)), + let (n_tps, n_cts, inputs, output) = match intrinsic_name { + sym::abort => (0, 0, vec![], tcx.types.never), + sym::unreachable => (0, 0, vec![], tcx.types.never), + sym::breakpoint => (0, 0, vec![], Ty::new_unit(tcx)), sym::size_of | sym::pref_align_of | sym::min_align_of | sym::variant_count => { - (1, Vec::new(), tcx.types.usize) + (1, 0, vec![], tcx.types.usize) } sym::size_of_val | sym::min_align_of_val => { - (1, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize) + (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize) } - sym::rustc_peek => (1, vec![param(0)], param(0)), - sym::caller_location => (0, vec![], tcx.caller_location_ty()), + sym::rustc_peek => (1, 0, vec![param(0)], param(0)), + sym::caller_location => (0, 0, vec![], tcx.caller_location_ty()), sym::assert_inhabited | sym::assert_zero_valid - | sym::assert_mem_uninitialized_valid => (1, Vec::new(), Ty::new_unit(tcx)), - sym::forget => (1, vec![param(0)], Ty::new_unit(tcx)), - sym::transmute | sym::transmute_unchecked => (2, vec![param(0)], param(1)), + | sym::assert_mem_uninitialized_valid => (1, 0, vec![], Ty::new_unit(tcx)), + sym::forget => (1, 0, vec![param(0)], Ty::new_unit(tcx)), + sym::transmute | sym::transmute_unchecked => (2, 0, vec![param(0)], param(1)), sym::prefetch_read_data | sym::prefetch_write_data | sym::prefetch_read_instruction | sym::prefetch_write_instruction => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.i32, ], Ty::new_unit(tcx), ), - sym::drop_in_place => (1, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), - sym::needs_drop => (1, Vec::new(), tcx.types.bool), + sym::drop_in_place => (1, 0, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), + sym::needs_drop => (1, 0, vec![], tcx.types.bool), - sym::type_name => (1, Vec::new(), Ty::new_static_str(tcx)), - sym::type_id => (1, Vec::new(), tcx.types.u128), - sym::offset => (2, vec![param(0), param(1)], param(0)), + sym::type_name => (1, 0, vec![], Ty::new_static_str(tcx)), + sym::type_id => (1, 0, vec![], tcx.types.u128), + sym::offset => (2, 0, vec![param(0), param(1)], param(0)), sym::arith_offset => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.isize, @@ -238,6 +254,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { ), sym::ptr_mask => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.usize, @@ -247,6 +264,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { sym::copy | sym::copy_nonoverlapping => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), @@ -256,6 +274,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { ), sym::volatile_copy_memory | sym::volatile_copy_nonoverlapping_memory => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), @@ -265,10 +284,11 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { ), sym::compare_bytes => { let byte_ptr = Ty::new_imm_ptr(tcx, tcx.types.u8); - (0, vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32) + (0, 0, vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32) } sym::write_bytes | sym::volatile_set_memory => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), tcx.types.u8, @@ -276,56 +296,56 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { ], Ty::new_unit(tcx), ), - sym::sqrtf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::sqrtf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::powif32 => (0, vec![tcx.types.f32, tcx.types.i32], tcx.types.f32), - sym::powif64 => (0, vec![tcx.types.f64, tcx.types.i32], tcx.types.f64), - sym::sinf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::sinf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::cosf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::cosf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::powf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::powf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::expf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::expf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::exp2f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::exp2f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::logf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::logf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::log10f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::log10f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::log2f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::log2f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::fmaf32 => (0, vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::fmaf64 => (0, vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::fabsf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::fabsf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::minnumf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::minnumf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::maxnumf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::maxnumf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::copysignf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::copysignf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::floorf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::floorf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::ceilf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::ceilf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::truncf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::truncf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::rintf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::rintf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::nearbyintf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::nearbyintf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::roundf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::roundf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::roundevenf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::roundevenf64 => (0, vec![tcx.types.f64], tcx.types.f64), + sym::sqrtf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::sqrtf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::powif32 => (0, 0, vec![tcx.types.f32, tcx.types.i32], tcx.types.f32), + sym::powif64 => (0, 0, vec![tcx.types.f64, tcx.types.i32], tcx.types.f64), + sym::sinf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::sinf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::cosf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::cosf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::powf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::powf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::expf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::expf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::exp2f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::exp2f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::logf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::logf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::log10f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::log10f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::log2f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::log2f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::fmaf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::fmaf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::fabsf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::fabsf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::minnumf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::minnumf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::maxnumf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::maxnumf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::copysignf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::copysignf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::floorf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::floorf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::ceilf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::ceilf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::truncf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::truncf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::rintf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::rintf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::nearbyintf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::nearbyintf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::roundf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::roundf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::roundevenf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::roundevenf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), sym::volatile_load | sym::unaligned_volatile_load => { - (1, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)) + (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)) } sym::volatile_store | sym::unaligned_volatile_store => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::ctpop @@ -334,62 +354,66 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { | sym::cttz | sym::cttz_nonzero | sym::bswap - | sym::bitreverse => (1, vec![param(0)], param(0)), + | sym::bitreverse => (1, 0, vec![param(0)], param(0)), sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => { - (1, vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool])) + (1, 0, vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool])) } sym::ptr_guaranteed_cmp => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.u8, ), sym::const_allocate => { - (0, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) + (0, 1, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) } sym::const_deallocate => ( 0, + 1, vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize], Ty::new_unit(tcx), ), sym::ptr_offset_from => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.isize, ), sym::ptr_offset_from_unsigned => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize, ), sym::unchecked_div | sym::unchecked_rem | sym::exact_div => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::unchecked_shl | sym::unchecked_shr | sym::rotate_left | sym::rotate_right => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::unchecked_add | sym::unchecked_sub | sym::unchecked_mul => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::wrapping_add | sym::wrapping_sub | sym::wrapping_mul => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } - sym::saturating_add | sym::saturating_sub => (1, vec![param(0), param(0)], param(0)), + sym::saturating_add | sym::saturating_sub => (1, 0, vec![param(0), param(0)], param(0)), sym::fadd_fast | sym::fsub_fast | sym::fmul_fast | sym::fdiv_fast | sym::frem_fast => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } - sym::float_to_int_unchecked => (2, vec![param(0)], param(1)), + sym::float_to_int_unchecked => (2, 0, vec![param(0)], param(1)), - sym::assume => (0, vec![tcx.types.bool], Ty::new_unit(tcx)), - sym::likely => (0, vec![tcx.types.bool], tcx.types.bool), - sym::unlikely => (0, vec![tcx.types.bool], tcx.types.bool), + sym::assume => (0, 0, vec![tcx.types.bool], Ty::new_unit(tcx)), + sym::likely => (0, 0, vec![tcx.types.bool], tcx.types.bool), + sym::unlikely => (0, 0, vec![tcx.types.bool], tcx.types.bool), - sym::read_via_copy => (1, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)), + sym::read_via_copy => (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)), sym::write_via_move => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::discriminant_value => { @@ -401,6 +425,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { let br = ty::BoundRegion { var: ty::BoundVar::from_u32(0), kind: ty::BrAnon }; ( 1, + 0, vec![Ty::new_imm_ref( tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), @@ -427,6 +452,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { Abi::Rust, )); ( + 0, 0, vec![Ty::new_fn_ptr(tcx, try_fn_ty), mut_u8, Ty::new_fn_ptr(tcx, catch_fn_ty)], tcx.types.i32, @@ -434,61 +460,66 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { } sym::va_start | sym::va_end => match mk_va_list_ty(hir::Mutability::Mut) { - Some((va_list_ref_ty, _)) => (0, vec![va_list_ref_ty], Ty::new_unit(tcx)), + Some((va_list_ref_ty, _)) => (0, 0, vec![va_list_ref_ty], Ty::new_unit(tcx)), None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::va_copy => match mk_va_list_ty(hir::Mutability::Not) { Some((va_list_ref_ty, va_list_ty)) => { let va_list_ptr_ty = Ty::new_mut_ptr(tcx, va_list_ty); - (0, vec![va_list_ptr_ty, va_list_ref_ty], Ty::new_unit(tcx)) + (0, 0, vec![va_list_ptr_ty, va_list_ref_ty], Ty::new_unit(tcx)) } None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::va_arg => match mk_va_list_ty(hir::Mutability::Mut) { - Some((va_list_ref_ty, _)) => (1, vec![va_list_ref_ty], param(0)), + Some((va_list_ref_ty, _)) => (1, 0, vec![va_list_ref_ty], param(0)), None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::nontemporal_store => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::raw_eq => { let br = ty::BoundRegion { var: ty::BoundVar::from_u32(0), kind: ty::BrAnon }; let param_ty = Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0)); - (1, vec![param_ty; 2], tcx.types.bool) + (1, 0, vec![param_ty; 2], tcx.types.bool) } - sym::black_box => (1, vec![param(0)], param(0)), + sym::black_box => (1, 0, vec![param(0)], param(0)), - sym::is_val_statically_known => (1, vec![param(0)], tcx.types.bool), + sym::is_val_statically_known => (1, 1, vec![param(0)], tcx.types.bool), - sym::const_eval_select => (4, vec![param(0), param(1), param(2)], param(3)), + sym::const_eval_select => (4, 0, vec![param(0), param(1), param(2)], param(3)), sym::vtable_size | sym::vtable_align => { - (0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize) + (0, 0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize) } - sym::debug_assertions => (0, Vec::new(), tcx.types.bool), + sym::debug_assertions => (0, 1, Vec::new(), tcx.types.bool), other => { - tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span: it.span, name: other }); + tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other }); return; } }; - (n_tps, 0, inputs, output, unsafety) + (n_tps, 0, n_cts, inputs, output, unsafety) }; - let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, Abi::RustIntrinsic); + let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, abi); let sig = ty::Binder::bind_with_vars(sig, bound_vars); - equate_intrinsic_type(tcx, it, n_tps, n_lts, 0, sig) + equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, n_cts, sig) } /// Type-check `extern "platform-intrinsic" { ... }` functions. -pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { - let generics = tcx.generics_of(it.owner_id); +pub fn check_platform_intrinsic_type( + tcx: TyCtxt<'_>, + intrinsic_id: LocalDefId, + span: Span, + name: Symbol, +) { + let generics = tcx.generics_of(intrinsic_id); let param = |n| { if let Some(&ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. @@ -496,12 +527,10 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { Ty::new_param(tcx, n, name) } else { - Ty::new_error_with_message(tcx, tcx.def_span(it.owner_id), "expected param") + Ty::new_error_with_message(tcx, span, "expected param") } }; - let name = it.ident.name; - let (n_tps, n_cts, inputs, output) = match name { sym::simd_eq | sym::simd_ne | sym::simd_lt | sym::simd_le | sym::simd_gt | sym::simd_ge => { (2, 0, vec![param(0), param(0)], param(1)) @@ -574,12 +603,12 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) sym::simd_shuffle_generic => (2, 1, vec![param(0), param(0)], param(1)), _ => { let msg = format!("unrecognized platform-specific intrinsic function: `{name}`"); - tcx.dcx().span_err(it.span, msg); + tcx.dcx().span_err(span, msg); return; } }; let sig = tcx.mk_fn_sig(inputs, output, false, hir::Unsafety::Unsafe, Abi::PlatformIntrinsic); let sig = ty::Binder::dummy(sig); - equate_intrinsic_type(tcx, it, n_tps, 0, n_cts, sig) + equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, 0, n_cts, sig) } diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs index 8884c218d05ae..b9052672a26a8 100644 --- a/compiler/rustc_hir_analysis/src/check/mod.rs +++ b/compiler/rustc_hir_analysis/src/check/mod.rs @@ -74,7 +74,7 @@ pub mod wfcheck; pub use check::check_abi; -use std::num::NonZeroU32; +use std::num::NonZero; use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; use rustc_errors::ErrorGuaranteed; @@ -270,7 +270,7 @@ fn default_body_is_unstable( item_did: DefId, feature: Symbol, reason: Option, - issue: Option, + issue: Option>, ) { let missing_item_name = tcx.associated_item(item_did).name; let (mut some_note, mut none_note, mut reason_str) = (false, false, String::new()); diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 41420b9caec54..43f0af5bd1da7 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -1651,7 +1651,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>( abi: abi::Abi, ) -> ty::PolyFnSig<'tcx> { let unsafety = if abi == abi::Abi::RustIntrinsic { - intrinsic_operation_unsafety(tcx, def_id.to_def_id()) + intrinsic_operation_unsafety(tcx, def_id) } else { hir::Unsafety::Unsafe }; diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 33092825e8915..e53f922ad1075 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -63,6 +63,7 @@ This API is completely unstable and subject to change. #![feature(rustdoc_internals)] #![allow(internal_features)] #![feature(control_flow_enum)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(is_sorted)] #![feature(iter_intersperse)] diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index c4271c66e1c9d..27614634c6b3e 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -540,8 +540,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if let Some(def_id) = def_id && self.tcx.def_kind(def_id) == hir::def::DefKind::Fn - && self.tcx.is_intrinsic(def_id) - && self.tcx.item_name(def_id) == sym::const_eval_select + && matches!(self.tcx.intrinsic(def_id), Some(sym::const_eval_select)) { let fn_sig = self.resolve_vars_if_possible(fn_sig); for idx in 0..=1 { diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index e6319747e782e..6bab8f75d248c 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -867,7 +867,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { let a_sig = a.fn_sig(self.tcx); if let ty::FnDef(def_id, _) = *a.kind() { // Intrinsics are not coercible to function pointers - if self.tcx.is_intrinsic(def_id) { + if self.tcx.intrinsic(def_id).is_some() { return Err(TypeError::IntrinsicCast); } diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index 729ce1f00cd8b..f39b496154b46 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -109,6 +109,93 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { self.autoderef(span, ty).any(|(ty, _)| matches!(ty.kind(), ty::Slice(..) | ty::Array(..))) } + fn impl_into_iterator_should_be_iterator( + &self, + ty: Ty<'tcx>, + span: Span, + unsatisfied_predicates: &Vec<( + ty::Predicate<'_>, + Option>, + Option>, + )>, + ) -> bool { + fn predicate_bounds_generic_param<'tcx>( + predicate: ty::Predicate<'_>, + generics: &'tcx ty::Generics, + generic_param: &ty::GenericParamDef, + tcx: TyCtxt<'tcx>, + ) -> bool { + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = + predicate.kind().as_ref().skip_binder() + { + let ty::TraitPredicate { trait_ref: ty::TraitRef { args, .. }, .. } = trait_pred; + if args.is_empty() { + return false; + } + let Some(arg_ty) = args[0].as_type() else { + return false; + }; + let ty::Param(param) = arg_ty.kind() else { + return false; + }; + // Is `generic_param` the same as the arg for this trait predicate? + generic_param.index == generics.type_param(¶m, tcx).index + } else { + false + } + } + + fn is_iterator_predicate(predicate: ty::Predicate<'_>, tcx: TyCtxt<'_>) -> bool { + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = + predicate.kind().as_ref().skip_binder() + { + tcx.is_diagnostic_item(sym::Iterator, trait_pred.trait_ref.def_id) + } else { + false + } + } + + // Does the `ty` implement `IntoIterator`? + let Some(into_iterator_trait) = self.tcx.get_diagnostic_item(sym::IntoIterator) else { + return false; + }; + let trait_ref = ty::TraitRef::new(self.tcx, into_iterator_trait, [ty]); + let cause = ObligationCause::new(span, self.body_id, ObligationCauseCode::MiscObligation); + let obligation = Obligation::new(self.tcx, cause, self.param_env, trait_ref); + if !self.predicate_must_hold_modulo_regions(&obligation) { + return false; + } + + match ty.kind() { + ty::Param(param) => { + let generics = self.tcx.generics_of(self.body_id); + let generic_param = generics.type_param(¶m, self.tcx); + for unsatisfied in unsatisfied_predicates.iter() { + // The parameter implements `IntoIterator` + // but it has called a method that requires it to implement `Iterator` + if predicate_bounds_generic_param( + unsatisfied.0, + generics, + generic_param, + self.tcx, + ) && is_iterator_predicate(unsatisfied.0, self.tcx) + { + return true; + } + } + } + ty::Alias(ty::AliasKind::Opaque, _) => { + for unsatisfied in unsatisfied_predicates.iter() { + if is_iterator_predicate(unsatisfied.0, self.tcx) { + return true; + } + } + } + _ => return false, + } + false + } + #[instrument(level = "debug", skip(self))] pub fn report_method_error( &self, @@ -555,6 +642,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { "`count` is defined on `{iterator_trait}`, which `{rcvr_ty}` does not implement" )); } + } else if self.impl_into_iterator_should_be_iterator(rcvr_ty, span, unsatisfied_predicates) + { + err.span_label(span, format!("`{rcvr_ty}` is not an iterator")); + err.multipart_suggestion_verbose( + "call `.into_iter()` first", + vec![(span.shrink_to_lo(), format!("into_iter()."))], + Applicability::MaybeIncorrect, + ); + return Some(err); } else if !unsatisfied_predicates.is_empty() && matches!(rcvr_ty.kind(), ty::Param(_)) { // We special case the situation where we are looking for `_` in // `::method` because otherwise the machinery will look for blanket diff --git a/compiler/rustc_infer/src/infer/error_reporting/suggest.rs b/compiler/rustc_infer/src/infer/error_reporting/suggest.rs index c6f6c32fe60c2..f49369c5a237c 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/suggest.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/suggest.rs @@ -316,7 +316,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { if !self.same_type_modulo_infer(*found_sig, *expected_sig) || !sig.is_suggestable(self.tcx, true) - || self.tcx.is_intrinsic(*did) + || self.tcx.intrinsic(*did).is_some() { return; } @@ -348,8 +348,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { if !self.same_type_modulo_infer(*found_sig, *expected_sig) || !found_sig.is_suggestable(self.tcx, true) || !expected_sig.is_suggestable(self.tcx, true) - || self.tcx.is_intrinsic(*did1) - || self.tcx.is_intrinsic(*did2) + || self.tcx.intrinsic(*did1).is_some() + || self.tcx.intrinsic(*did2).is_some() { return; } diff --git a/compiler/rustc_interface/src/lib.rs b/compiler/rustc_interface/src/lib.rs index 7d69e49b209f5..24c2e29053488 100644 --- a/compiler/rustc_interface/src/lib.rs +++ b/compiler/rustc_interface/src/lib.rs @@ -1,5 +1,6 @@ #![feature(decl_macro)] #![feature(error_iter)] +#![feature(generic_nonzero)] #![feature(lazy_cell)] #![feature(let_chains)] #![feature(thread_spawn_unchecked)] diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index bfc4fc07d4cc7..112553b2f7031 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -20,7 +20,7 @@ use rustc_span::{FileName, SourceFileHashAlgorithm}; use rustc_target::spec::{CodeModel, LinkerFlavorCli, MergeFunctions, PanicStrategy, RelocModel}; use rustc_target::spec::{RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TlsModel}; use std::collections::{BTreeMap, BTreeSet}; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::path::{Path, PathBuf}; use std::sync::Arc; @@ -827,7 +827,7 @@ fn test_unstable_options_tracking_hash() { tracked!(tls_model, Some(TlsModel::GeneralDynamic)); tracked!(translate_remapped_path_to_local_path, false); tracked!(trap_unreachable, Some(false)); - tracked!(treat_err_as_bug, NonZeroUsize::new(1)); + tracked!(treat_err_as_bug, NonZero::new(1)); tracked!(tune_cpu, Some(String::from("abc"))); tracked!(uninit_const_chunk_threshold, 123); tracked!(unleash_the_miri_inside_of_you, true); diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 76b9e8de75fb0..087c43075f175 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -107,7 +107,7 @@ pub(crate) fn run_in_thread_pool_with_globals R + Send, R: Send>( use rustc_query_impl::QueryCtxt; use rustc_query_system::query::{deadlock, QueryContext}; - let registry = sync::Registry::new(std::num::NonZeroUsize::new(threads).unwrap()); + let registry = sync::Registry::new(std::num::NonZero::new(threads).unwrap()); if !sync::is_dyn_thread_safe() { return run_in_thread_with_globals(edition, || { diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 6ee1d1ca92472..faa35f51cd496 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1227,7 +1227,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes { } fn def_id_is_transmute(cx: &LateContext<'_>, def_id: DefId) -> bool { - cx.tcx.is_intrinsic(def_id) && cx.tcx.item_name(def_id) == sym::transmute + matches!(cx.tcx.intrinsic(def_id), Some(sym::transmute)) } } } diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs index 5f769e9ad8a5b..85f9d3bd63ec7 100644 --- a/compiler/rustc_lint/src/lib.rs +++ b/compiler/rustc_lint/src/lib.rs @@ -31,6 +31,7 @@ #![feature(array_windows)] #![feature(box_patterns)] #![feature(control_flow_enum)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(iter_order_by)] #![feature(let_chains)] diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 7445e2e80b407..da59ffebdc5a9 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -1,7 +1,6 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] - -use std::num::NonZeroU32; +use std::num::NonZero; use crate::errors::RequestedLevel; use crate::fluent_generated as fluent; @@ -402,7 +401,7 @@ pub struct BuiltinIncompleteFeaturesHelp; #[derive(Subdiagnostic)] #[note(lint_note)] pub struct BuiltinFeatureIssueNote { - pub n: NonZeroU32, + pub n: NonZero, } pub struct BuiltinUnpermittedTypeInit<'a> { diff --git a/compiler/rustc_metadata/src/lib.rs b/compiler/rustc_metadata/src/lib.rs index 2e7130f356579..70ad859895724 100644 --- a/compiler/rustc_metadata/src/lib.rs +++ b/compiler/rustc_metadata/src/lib.rs @@ -5,6 +5,7 @@ #![feature(decl_macro)] #![feature(extract_if)] #![feature(coroutines)] +#![feature(generic_nonzero)] #![feature(iter_from_coroutine)] #![feature(let_chains)] #![feature(if_let_guard)] diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 72e9744295bc9..2cfbaff35ef29 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -327,7 +327,7 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> { } #[inline] - fn read_lazy_offset_then(&mut self, f: impl Fn(NonZeroUsize) -> T) -> T { + fn read_lazy_offset_then(&mut self, f: impl Fn(NonZero) -> T) -> T { let distance = self.read_usize(); let position = match self.lazy_state { LazyState::NoNode => bug!("read_lazy_with_meta: outside of a metadata node"), @@ -338,7 +338,7 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> { } LazyState::Previous(last_pos) => last_pos.get() + distance, }; - let position = NonZeroUsize::new(position).unwrap(); + let position = NonZero::new(position).unwrap(); self.lazy_state = LazyState::Previous(position); f(position) } @@ -685,15 +685,15 @@ impl MetadataBlob { } pub(crate) fn get_rustc_version(&self) -> String { - LazyValue::::from_position(NonZeroUsize::new(METADATA_HEADER.len() + 8).unwrap()) + LazyValue::::from_position(NonZero::new(METADATA_HEADER.len() + 8).unwrap()) .decode(self) } - fn root_pos(&self) -> NonZeroUsize { + fn root_pos(&self) -> NonZero { let offset = METADATA_HEADER.len(); let pos_bytes = self.blob()[offset..][..8].try_into().unwrap(); let pos = u64::from_le_bytes(pos_bytes); - NonZeroUsize::new(pos as usize).unwrap() + NonZero::new(pos as usize).unwrap() } pub(crate) fn get_header(&self) -> CrateHeader { @@ -1749,8 +1749,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { self.root.tables.attr_flags.get(self, index) } - fn get_is_intrinsic(self, index: DefIndex) -> bool { - self.root.tables.is_intrinsic.get(self, index) + fn get_intrinsic(self, index: DefIndex) -> Option { + self.root.tables.intrinsic.get(self, index).map(|d| d.decode(self)) } fn get_doc_link_resolutions(self, index: DefIndex) -> DocLinkResMap { diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 178bfc3a380c7..9df28799f4f76 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -356,7 +356,7 @@ provide! { tcx, def_id, other, cdata, cdata.get_stability_implications(tcx).iter().copied().collect() } stripped_cfg_items => { cdata.get_stripped_cfg_items(cdata.cnum, tcx) } - is_intrinsic => { cdata.get_is_intrinsic(def_id.index) } + intrinsic => { cdata.get_intrinsic(def_id.index) } defined_lang_items => { cdata.get_lang_items(tcx) } diagnostic_items => { cdata.get_diagnostic_items() } missing_lang_items => { cdata.get_missing_lang_items(tcx) } diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 6f908f7752ad2..fdb2b4f202415 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -421,7 +421,7 @@ macro_rules! record_defaulted_array { } impl<'a, 'tcx> EncodeContext<'a, 'tcx> { - fn emit_lazy_distance(&mut self, position: NonZeroUsize) { + fn emit_lazy_distance(&mut self, position: NonZero) { let pos = position.get(); let distance = match self.lazy_state { LazyState::NoNode => bug!("emit_lazy_distance: outside of a metadata node"), @@ -439,7 +439,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { position.get() - last_pos.get() } }; - self.lazy_state = LazyState::Previous(NonZeroUsize::new(pos).unwrap()); + self.lazy_state = LazyState::Previous(NonZero::new(pos).unwrap()); self.emit_usize(distance); } @@ -447,7 +447,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZeroUsize::new(self.position()).unwrap(); + let pos = NonZero::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); @@ -466,7 +466,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZeroUsize::new(self.position()).unwrap(); + let pos = NonZero::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); @@ -1409,7 +1409,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { if let DefKind::Fn | DefKind::AssocFn = def_kind { self.tables.asyncness.set_some(def_id.index, tcx.asyncness(def_id)); record_array!(self.tables.fn_arg_names[def_id] <- tcx.fn_arg_names(def_id)); - self.tables.is_intrinsic.set(def_id.index, tcx.is_intrinsic(def_id)); + if let Some(name) = tcx.intrinsic(def_id) { + record!(self.tables.intrinsic[def_id] <- name); + } } if let DefKind::TyParam = def_kind { let default = self.tcx.object_lifetime_default(def_id); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index eac78a3cd7c22..9c0e8029571d3 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -37,7 +37,7 @@ use rustc_target::abi::{FieldIdx, VariantIdx}; use rustc_target::spec::{PanicStrategy, TargetTriple}; use std::marker::PhantomData; -use std::num::NonZeroUsize; +use std::num::NonZero; use decoder::DecodeContext; pub(crate) use decoder::{CrateMetadata, CrateNumMap, MetadataBlob}; @@ -83,7 +83,7 @@ pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_V /// order than they were encoded in. #[must_use] struct LazyValue { - position: NonZeroUsize, + position: NonZero, _marker: PhantomData T>, } @@ -92,7 +92,7 @@ impl ParameterizedOverTcx for LazyValue { } impl LazyValue { - fn from_position(position: NonZeroUsize) -> LazyValue { + fn from_position(position: NonZero) -> LazyValue { LazyValue { position, _marker: PhantomData } } } @@ -108,7 +108,7 @@ impl LazyValue { /// the minimal distance the length of the sequence, i.e. /// it's assumed there's no 0-byte element in the sequence. struct LazyArray { - position: NonZeroUsize, + position: NonZero, num_elems: usize, _marker: PhantomData T>, } @@ -119,12 +119,12 @@ impl ParameterizedOverTcx for LazyArray { impl Default for LazyArray { fn default() -> LazyArray { - LazyArray::from_position_and_num_elems(NonZeroUsize::new(1).unwrap(), 0) + LazyArray::from_position_and_num_elems(NonZero::new(1).unwrap(), 0) } } impl LazyArray { - fn from_position_and_num_elems(position: NonZeroUsize, num_elems: usize) -> LazyArray { + fn from_position_and_num_elems(position: NonZero, num_elems: usize) -> LazyArray { LazyArray { position, num_elems, _marker: PhantomData } } } @@ -135,7 +135,7 @@ impl LazyArray { /// `LazyArray`, but without requiring encoding or decoding all the values /// eagerly and in-order. struct LazyTable { - position: NonZeroUsize, + position: NonZero, /// The encoded size of the elements of a table is selected at runtime to drop /// trailing zeroes. This is the number of bytes used for each table element. width: usize, @@ -150,7 +150,7 @@ impl ParameterizedOverTcx for LazyTable LazyTable { fn from_position_and_encoded_size( - position: NonZeroUsize, + position: NonZero, width: usize, len: usize, ) -> LazyTable { @@ -187,11 +187,11 @@ enum LazyState { /// Inside a metadata node, and before any `Lazy`s. /// The position is that of the node itself. - NodeStart(NonZeroUsize), + NodeStart(NonZero), /// Inside a metadata node, with a previous `Lazy`s. /// The position is where that previous `Lazy` would start. - Previous(NonZeroUsize), + Previous(NonZero), } type SyntaxContextTable = LazyTable>>; @@ -375,7 +375,7 @@ macro_rules! define_tables { define_tables! { - defaulted: - is_intrinsic: Table, + intrinsic: Table>>, is_macro_rules: Table, is_type_alias_impl_trait: Table, type_alias_is_lazy: Table, diff --git a/compiler/rustc_metadata/src/rmeta/table.rs b/compiler/rustc_metadata/src/rmeta/table.rs index 306bf07a97608..c5f281964df02 100644 --- a/compiler/rustc_metadata/src/rmeta/table.rs +++ b/compiler/rustc_metadata/src/rmeta/table.rs @@ -339,7 +339,7 @@ impl FixedSizeEncoding for Option> { #[inline] fn from_bytes(b: &[u8; 8]) -> Self { - let position = NonZeroUsize::new(u64::from_bytes(b) as usize)?; + let position = NonZero::new(u64::from_bytes(b) as usize)?; Some(LazyValue::from_position(position)) } @@ -366,7 +366,7 @@ impl LazyArray { } fn from_bytes_impl(position: &[u8; 8], meta: &[u8; 8]) -> Option> { - let position = NonZeroUsize::new(u64::from_bytes(position) as usize)?; + let position = NonZero::new(u64::from_bytes(position) as usize)?; let len = u64::from_bytes(meta) as usize; Some(LazyArray::from_position_and_num_elems(position, len)) } @@ -497,7 +497,7 @@ impl> TableBui } LazyTable::from_position_and_encoded_size( - NonZeroUsize::new(pos).unwrap(), + NonZero::new(pos).unwrap(), width, self.blocks.len(), ) diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 2aaece1060a1f..9c0846e9fb199 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -34,6 +34,7 @@ #![feature(discriminant_kind)] #![feature(exhaustive_patterns)] #![feature(coroutines)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(inline_const)] #![feature(iter_from_coroutine)] diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index afb6937b43b94..2f624ab052710 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -21,7 +21,7 @@ use rustc_session::parse::feature_err_issue; use rustc_session::Session; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(PartialEq, Clone, Copy, Debug)] pub enum StabilityLevel { @@ -102,7 +102,7 @@ pub fn report_unstable( sess: &Session, feature: Symbol, reason: Option, - issue: Option, + issue: Option>, suggestion: Option<(Span, String, String, Applicability)>, is_soft: bool, span: Span, @@ -235,7 +235,7 @@ pub enum EvalResult { Deny { feature: Symbol, reason: Option, - issue: Option, + issue: Option>, suggestion: Option<(Span, String, String, Applicability)>, is_soft: bool, }, @@ -433,7 +433,7 @@ impl<'tcx> TyCtxt<'tcx> { // the `-Z force-unstable-if-unmarked` flag present (we're // compiling a compiler crate), then let this missing feature // annotation slide. - if feature == sym::rustc_private && issue == NonZeroU32::new(27812) { + if feature == sym::rustc_private && issue == NonZero::new(27812) { if self.sess.opts.unstable_opts.force_unstable_if_unmarked { return EvalResult::Allow; } diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 9d4ec7d25bb69..125fac48df877 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -12,6 +12,7 @@ use rustc_macros::HashStable; use rustc_session::CtfeBacktrace; use rustc_span::{def_id::DefId, Span, DUMMY_SP}; use rustc_target::abi::{call, Align, Size, VariantIdx, WrappingRange}; +use rustc_type_ir::Mutability; use std::borrow::Cow; use std::{any::Any, backtrace::Backtrace, fmt}; @@ -367,7 +368,7 @@ pub enum UndefinedBehaviorInfo<'tcx> { #[derive(Debug, Clone, Copy)] pub enum PointerKind { - Ref, + Ref(Mutability), Box, } @@ -375,7 +376,7 @@ impl IntoDiagnosticArg for PointerKind { fn into_diagnostic_arg(self) -> DiagnosticArgValue { DiagnosticArgValue::Str( match self { - Self::Ref => "ref", + Self::Ref(_) => "ref", Self::Box => "box", } .into(), @@ -408,7 +409,7 @@ impl From for ExpectedKind { fn from(x: PointerKind) -> ExpectedKind { match x { PointerKind::Box => ExpectedKind::Box, - PointerKind::Ref => ExpectedKind::Reference, + PointerKind::Ref(_) => ExpectedKind::Reference, } } } @@ -419,7 +420,7 @@ pub enum ValidationErrorKind<'tcx> { PartialPointer, PtrToUninhabited { ptr_kind: PointerKind, ty: Ty<'tcx> }, PtrToStatic { ptr_kind: PointerKind }, - MutableRefInConst, + MutableRefInConstOrStatic, ConstRefToMutable, ConstRefToExtern, MutableRefToImmutable, diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index ec2af393639c7..5be09b06d9e4b 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -122,7 +122,7 @@ mod value; use std::fmt; use std::io; use std::io::{Read, Write}; -use std::num::{NonZeroU32, NonZeroU64}; +use std::num::NonZero; use std::sync::atomic::{AtomicU32, Ordering}; use rustc_ast::LitKind; @@ -206,7 +206,7 @@ pub enum LitToConstError { } #[derive(Copy, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct AllocId(pub NonZeroU64); +pub struct AllocId(pub NonZero); // We want the `Debug` output to be readable as it is used by `derive(Debug)` for // all the Miri types. @@ -261,7 +261,7 @@ pub fn specialized_encode_alloc_id<'tcx, E: TyEncoder>>( } // Used to avoid infinite recursion when decoding cyclic allocations. -type DecodingSessionId = NonZeroU32; +type DecodingSessionId = NonZero; #[derive(Clone)] enum State { @@ -501,7 +501,7 @@ impl<'tcx> AllocMap<'tcx> { AllocMap { alloc_map: Default::default(), dedup: Default::default(), - next_id: AllocId(NonZeroU64::new(1).unwrap()), + next_id: AllocId(NonZero::new(1).unwrap()), } } fn reserve(&mut self) -> AllocId { diff --git a/compiler/rustc_middle/src/mir/interpret/pointer.rs b/compiler/rustc_middle/src/mir/interpret/pointer.rs index dabf6297aa9c8..e2767ee298958 100644 --- a/compiler/rustc_middle/src/mir/interpret/pointer.rs +++ b/compiler/rustc_middle/src/mir/interpret/pointer.rs @@ -3,7 +3,7 @@ use super::{AllocId, InterpResult}; use rustc_macros::HashStable; use rustc_target::abi::{HasDataLayout, Size}; -use std::{fmt, num::NonZeroU64}; +use std::{fmt, num::NonZero}; //////////////////////////////////////////////////////////////////////////////// // Pointer arithmetic @@ -129,7 +129,7 @@ pub trait Provenance: Copy + fmt::Debug + 'static { /// The type of provenance in the compile-time interpreter. /// This is a packed representation of an `AllocId` and an `immutable: bool`. #[derive(Copy, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct CtfeProvenance(NonZeroU64); +pub struct CtfeProvenance(NonZero); impl From for CtfeProvenance { fn from(value: AllocId) -> Self { @@ -155,7 +155,7 @@ impl CtfeProvenance { /// Returns the `AllocId` of this provenance. #[inline(always)] pub fn alloc_id(self) -> AllocId { - AllocId(NonZeroU64::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) + AllocId(NonZero::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) } /// Returns whether this provenance is immutable. diff --git a/compiler/rustc_middle/src/query/erase.rs b/compiler/rustc_middle/src/query/erase.rs index 7ac7fa0ac33a4..2cdcdcb1492b0 100644 --- a/compiler/rustc_middle/src/query/erase.rs +++ b/compiler/rustc_middle/src/query/erase.rs @@ -241,6 +241,7 @@ trivial! { Option, Option, Option, + Option, Result<(), rustc_errors::ErrorGuaranteed>, Result<(), rustc_middle::traits::query::NoSolution>, Result, diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index a7f4e75e2143a..5be45c33e1124 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1760,8 +1760,8 @@ rustc_queries! { separate_provide_extern } /// Whether the function is an intrinsic - query is_intrinsic(def_id: DefId) -> bool { - desc { |tcx| "checking whether `{}` is an intrinsic", tcx.def_path_str(def_id) } + query intrinsic(def_id: DefId) -> Option { + desc { |tcx| "fetch intrinsic name if `{}` is an intrinsic", tcx.def_path_str(def_id) } separate_provide_extern } /// Returns the lang items defined in another crate by loading it from metadata. diff --git a/compiler/rustc_middle/src/ty/consts/int.rs b/compiler/rustc_middle/src/ty/consts/int.rs index 515d564e81db7..5d50510338c61 100644 --- a/compiler/rustc_middle/src/ty/consts/int.rs +++ b/compiler/rustc_middle/src/ty/consts/int.rs @@ -4,7 +4,7 @@ use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg}; use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; use rustc_target::abi::Size; use std::fmt; -use std::num::NonZeroU8; +use std::num::NonZero; use crate::ty::TyCtxt; @@ -132,7 +132,7 @@ pub struct ScalarInt { /// The first `size` bytes of `data` are the value. /// Do not try to read less or more bytes than that. The remaining bytes must be 0. data: u128, - size: NonZeroU8, + size: NonZero, } // Cannot derive these, as the derives take references to the fields, and we @@ -161,14 +161,14 @@ impl Decodable for ScalarInt { let mut data = [0u8; 16]; let size = d.read_u8(); data[..size as usize].copy_from_slice(d.read_raw_bytes(size as usize)); - ScalarInt { data: u128::from_le_bytes(data), size: NonZeroU8::new(size).unwrap() } + ScalarInt { data: u128::from_le_bytes(data), size: NonZero::new(size).unwrap() } } } impl ScalarInt { - pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZeroU8::new(1).unwrap() }; + pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZero::new(1).unwrap() }; - pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZeroU8::new(1).unwrap() }; + pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZero::new(1).unwrap() }; #[inline] pub fn size(self) -> Size { @@ -196,7 +196,7 @@ impl ScalarInt { #[inline] pub fn null(size: Size) -> Self { - Self { data: 0, size: NonZeroU8::new(size.bytes() as u8).unwrap() } + Self { data: 0, size: NonZero::new(size.bytes() as u8).unwrap() } } #[inline] @@ -208,7 +208,7 @@ impl ScalarInt { pub fn try_from_uint(i: impl Into, size: Size) -> Option { let data = i.into(); if size.truncate(data) == data { - Some(Self { data, size: NonZeroU8::new(size.bytes() as u8).unwrap() }) + Some(Self { data, size: NonZero::new(size.bytes() as u8).unwrap() }) } else { None } @@ -220,7 +220,7 @@ impl ScalarInt { // `into` performed sign extension, we have to truncate let truncated = size.truncate(i as u128); if size.sign_extend(truncated) as i128 == i { - Some(Self { data: truncated, size: NonZeroU8::new(size.bytes() as u8).unwrap() }) + Some(Self { data: truncated, size: NonZero::new(size.bytes() as u8).unwrap() }) } else { None } @@ -388,7 +388,7 @@ macro_rules! from { fn from(u: $ty) -> Self { Self { data: u128::from(u), - size: NonZeroU8::new(std::mem::size_of::<$ty>() as u8).unwrap(), + size: NonZero::new(std::mem::size_of::<$ty>() as u8).unwrap(), } } } @@ -427,7 +427,7 @@ impl TryFrom for bool { impl From for ScalarInt { #[inline] fn from(c: char) -> Self { - Self { data: c as u128, size: NonZeroU8::new(std::mem::size_of::() as u8).unwrap() } + Self { data: c as u128, size: NonZero::new(std::mem::size_of::() as u8).unwrap() } } } @@ -454,7 +454,7 @@ impl From for ScalarInt { #[inline] fn from(f: Single) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZeroU8::new((Single::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::new((Single::BITS / 8) as u8).unwrap() } } } @@ -470,7 +470,7 @@ impl From for ScalarInt { #[inline] fn from(f: Double) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZeroU8::new((Double::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::new((Double::BITS / 8) as u8).unwrap() } } } diff --git a/compiler/rustc_middle/src/ty/generic_args.rs b/compiler/rustc_middle/src/ty/generic_args.rs index 84de12b23a06e..813a7a64daf00 100644 --- a/compiler/rustc_middle/src/ty/generic_args.rs +++ b/compiler/rustc_middle/src/ty/generic_args.rs @@ -18,7 +18,7 @@ use core::intrinsics; use std::cmp::Ordering; use std::marker::PhantomData; use std::mem; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::{ControlFlow, Deref}; use std::ptr::NonNull; @@ -143,9 +143,8 @@ impl<'tcx> From> for GenericArg<'tcx> { impl<'tcx> GenericArg<'tcx> { #[inline] pub fn unpack(self) -> GenericArgKind<'tcx> { - let ptr = unsafe { - self.ptr.map_addr(|addr| NonZeroUsize::new_unchecked(addr.get() & !TAG_MASK)) - }; + let ptr = + unsafe { self.ptr.map_addr(|addr| NonZero::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, // and this is just going in the other direction. diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 8d8d06b7c0b7f..2b34f5daaf63f 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -20,7 +20,7 @@ use rustc_target::spec::{abi::Abi as SpecAbi, HasTargetSpec, PanicStrategy, Targ use std::cmp; use std::fmt; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::Bound; pub trait IntegerExt { @@ -761,7 +761,7 @@ where }; tcx.mk_layout(LayoutS { variants: Variants::Single { index: variant_index }, - fields: match NonZeroUsize::new(fields) { + fields: match NonZero::new(fields) { Some(fields) => FieldsShape::Union(fields), None => FieldsShape::Arbitrary { offsets: IndexVec::new(), memory_index: IndexVec::new() }, }, diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 15bddb2a64fb8..eea3624898c8c 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -61,7 +61,7 @@ use std::fmt::Debug; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::mem; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::ControlFlow; use std::ptr::NonNull; use std::{fmt, str}; @@ -617,9 +617,8 @@ impl<'tcx, D: TyDecoder>> Decodable for Term<'tcx> { impl<'tcx> Term<'tcx> { #[inline] pub fn unpack(self) -> TermKind<'tcx> { - let ptr = unsafe { - self.ptr.map_addr(|addr| NonZeroUsize::new_unchecked(addr.get() & !TAG_MASK)) - }; + let ptr = + unsafe { self.ptr.map_addr(|addr| NonZero::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, // and this is just going in the other direction. diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 09bb06de483a8..2addfa37f8b4d 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -18,7 +18,7 @@ use rustc_hir::def_id::{CrateNum, DefId, LocalDefId}; use rustc_index::bit_set::GrowableBitSet; use rustc_macros::HashStable; use rustc_session::Limit; -use rustc_span::sym; +use rustc_span::{sym, Symbol}; use rustc_target::abi::{Integer, IntegerType, Primitive, Size}; use rustc_target::spec::abi::Abi; use smallvec::SmallVec; @@ -1552,9 +1552,15 @@ pub fn is_doc_notable_trait(tcx: TyCtxt<'_>, def_id: DefId) -> bool { .any(|items| items.iter().any(|item| item.has_name(sym::notable_trait))) } -/// Determines whether an item is an intrinsic by Abi. -pub fn is_intrinsic(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { - matches!(tcx.fn_sig(def_id).skip_binder().abi(), Abi::RustIntrinsic | Abi::PlatformIntrinsic) +/// Determines whether an item is an intrinsic by Abi. or by whether it has a `rustc_intrinsic` attribute +pub fn intrinsic(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option { + if matches!(tcx.fn_sig(def_id).skip_binder().abi(), Abi::RustIntrinsic | Abi::PlatformIntrinsic) + || tcx.has_attr(def_id, sym::rustc_intrinsic) + { + Some(tcx.item_name(def_id.into())) + } else { + None + } } pub fn provide(providers: &mut Providers) { @@ -1562,7 +1568,7 @@ pub fn provide(providers: &mut Providers) { reveal_opaque_types_in_bounds, is_doc_hidden, is_doc_notable_trait, - is_intrinsic, + intrinsic, ..*providers } } diff --git a/compiler/rustc_mir_dataflow/src/rustc_peek.rs b/compiler/rustc_mir_dataflow/src/rustc_peek.rs index cbbf3548c07ef..1575f31e75e0e 100644 --- a/compiler/rustc_mir_dataflow/src/rustc_peek.rs +++ b/compiler/rustc_mir_dataflow/src/rustc_peek.rs @@ -202,8 +202,7 @@ impl PeekCall { &terminator.kind { if let ty::FnDef(def_id, fn_args) = *func.const_.ty().kind() { - let name = tcx.item_name(def_id); - if !tcx.is_intrinsic(def_id) || name != sym::rustc_peek { + if tcx.intrinsic(def_id)? != sym::rustc_peek { return None; } diff --git a/compiler/rustc_mir_transform/src/cost_checker.rs b/compiler/rustc_mir_transform/src/cost_checker.rs index 79bed960b950f..2c692c9500303 100644 --- a/compiler/rustc_mir_transform/src/cost_checker.rs +++ b/compiler/rustc_mir_transform/src/cost_checker.rs @@ -70,7 +70,7 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> { TerminatorKind::Call { func: Operand::Constant(ref f), unwind, .. } => { let fn_ty = self.instantiate_ty(f.const_.ty()); self.cost += if let ty::FnDef(def_id, _) = *fn_ty.kind() - && tcx.is_intrinsic(def_id) + && tcx.intrinsic(def_id).is_some() { // Don't give intrinsics the extra penalty for calls INSTR_COST diff --git a/compiler/rustc_mir_transform/src/instsimplify.rs b/compiler/rustc_mir_transform/src/instsimplify.rs index d936c64c55cb2..73102a5f026d9 100644 --- a/compiler/rustc_mir_transform/src/instsimplify.rs +++ b/compiler/rustc_mir_transform/src/instsimplify.rs @@ -289,9 +289,9 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> { if args.is_empty() { return; } - let ty = args.type_at(0); - let known_is_valid = intrinsic_assert_panics(self.tcx, self.param_env, ty, intrinsic_name); + let known_is_valid = + intrinsic_assert_panics(self.tcx, self.param_env, args[0], intrinsic_name); match known_is_valid { // We don't know the layout or it's not validity assertion at all, don't touch it None => {} @@ -310,10 +310,11 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> { fn intrinsic_assert_panics<'tcx>( tcx: TyCtxt<'tcx>, param_env: ty::ParamEnv<'tcx>, - ty: Ty<'tcx>, + arg: ty::GenericArg<'tcx>, intrinsic_name: Symbol, ) -> Option { let requirement = ValidityRequirement::from_intrinsic(intrinsic_name)?; + let ty = arg.expect_ty(); Some(!tcx.check_validity_requirement((requirement, param_env.and(ty))).ok()?) } @@ -322,9 +323,8 @@ fn resolve_rust_intrinsic<'tcx>( func_ty: Ty<'tcx>, ) -> Option<(Symbol, GenericArgsRef<'tcx>)> { if let ty::FnDef(def_id, args) = *func_ty.kind() { - if tcx.is_intrinsic(def_id) { - return Some((tcx.item_name(def_id), args)); - } + let name = tcx.intrinsic(def_id)?; + return Some((name, args)); } None } diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index fb174192b8492..7f0e6f90dbb15 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -161,8 +161,7 @@ fn remap_mir_for_const_eval_select<'tcx>( fn_span, .. } if let ty::FnDef(def_id, _) = *const_.ty().kind() - && tcx.item_name(def_id) == sym::const_eval_select - && tcx.is_intrinsic(def_id) => + && matches!(tcx.intrinsic(def_id), Some(sym::const_eval_select)) => { let [tupled_args, called_in_const, called_at_rt]: [_; 3] = std::mem::take(args).try_into().unwrap(); diff --git a/compiler/rustc_mir_transform/src/lower_intrinsics.rs b/compiler/rustc_mir_transform/src/lower_intrinsics.rs index f43b85173d428..a0af902c4e109 100644 --- a/compiler/rustc_mir_transform/src/lower_intrinsics.rs +++ b/compiler/rustc_mir_transform/src/lower_intrinsics.rs @@ -14,9 +14,8 @@ impl<'tcx> MirPass<'tcx> for LowerIntrinsics { if let TerminatorKind::Call { func, args, destination, target, .. } = &mut terminator.kind && let ty::FnDef(def_id, generic_args) = *func.ty(local_decls, tcx).kind() - && tcx.is_intrinsic(def_id) + && let Some(intrinsic_name) = tcx.intrinsic(def_id) { - let intrinsic_name = tcx.item_name(def_id); match intrinsic_name { sym::unreachable => { terminator.kind = TerminatorKind::Unreachable; diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 1c9913fa20367..5593de607844d 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -956,19 +956,24 @@ fn visit_instance_use<'tcx>( if !should_codegen_locally(tcx, &instance) { return; } - - // The intrinsics assert_inhabited, assert_zero_valid, and assert_mem_uninitialized_valid will - // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any - // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to - // codegen a call to that function without generating code for the function itself. if let ty::InstanceDef::Intrinsic(def_id) = instance.def { let name = tcx.item_name(def_id); if let Some(_requirement) = ValidityRequirement::from_intrinsic(name) { + // The intrinsics assert_inhabited, assert_zero_valid, and assert_mem_uninitialized_valid will + // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any + // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to + // codegen a call to that function without generating code for the function itself. let def_id = tcx.lang_items().get(LangItem::PanicNounwind).unwrap(); let panic_instance = Instance::mono(tcx, def_id); if should_codegen_locally(tcx, &panic_instance) { output.push(create_fn_mono_item(tcx, panic_instance, source)); } + } else if tcx.has_attr(def_id, sym::rustc_intrinsic) { + // Codegen the fallback body of intrinsics with fallback bodies + let instance = ty::Instance::new(def_id, instance.args); + if should_codegen_locally(tcx, &instance) { + output.push(create_fn_mono_item(tcx, instance, source)); + } } } diff --git a/compiler/rustc_passes/src/lib.rs b/compiler/rustc_passes/src/lib.rs index e795537e84ad7..7227b185f4d3b 100644 --- a/compiler/rustc_passes/src/lib.rs +++ b/compiler/rustc_passes/src/lib.rs @@ -8,6 +8,7 @@ #![doc(rust_logo)] #![feature(rustdoc_internals)] #![allow(internal_features)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(map_try_insert)] #![feature(try_blocks)] diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 17ad08b0569b6..19272b52b32e6 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -27,7 +27,7 @@ use rustc_span::Span; use rustc_target::spec::abi::Abi; use std::mem::replace; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(PartialEq)] enum AnnotationKind { @@ -645,7 +645,7 @@ fn stability_index(tcx: TyCtxt<'_>, (): ()) -> Index { let stability = Stability { level: attr::StabilityLevel::Unstable { reason: UnstableReason::Default, - issue: NonZeroU32::new(27812), + issue: NonZero::new(27812), is_soft: false, implied_by: None, }, diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 0fe5b9c664a35..33116737a4203 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -3,6 +3,7 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(rustdoc_internals)] +#![feature(generic_nonzero)] #![feature(min_specialization)] #![feature(rustc_attrs)] #![allow(rustc::potential_query_instability, unused_parens)] diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index a827717d9bbd1..5917d79983d02 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -30,7 +30,7 @@ use rustc_serialize::Decodable; use rustc_serialize::Encodable; use rustc_session::Limit; use rustc_span::def_id::LOCAL_CRATE; -use std::num::NonZeroU64; +use std::num::NonZero; use thin_vec::ThinVec; #[derive(Copy, Clone)] @@ -68,10 +68,8 @@ impl QueryContext for QueryCtxt<'_> { #[inline] fn next_job_id(self) -> QueryJobId { QueryJobId( - NonZeroU64::new( - self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed), - ) - .unwrap(), + NonZero::new(self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed)) + .unwrap(), ) } diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs index 416f556f57d28..6a959a99e5d42 100644 --- a/compiler/rustc_query_system/src/lib.rs +++ b/compiler/rustc_query_system/src/lib.rs @@ -1,5 +1,6 @@ #![feature(assert_matches)] #![feature(core_intrinsics)] +#![feature(generic_nonzero)] #![feature(hash_raw_entry)] #![feature(min_specialization)] #![feature(let_chains)] diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 8d7c0ca014490..bf89bc7f7c3c4 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -11,7 +11,7 @@ use rustc_span::Span; use std::hash::Hash; use std::io::Write; -use std::num::NonZeroU64; +use std::num::NonZero; #[cfg(parallel_compiler)] use { @@ -36,7 +36,7 @@ pub type QueryMap = FxHashMap; /// A value uniquely identifying an active query job. #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] -pub struct QueryJobId(pub NonZeroU64); +pub struct QueryJobId(pub NonZero); impl QueryJobId { fn query(self, map: &QueryMap) -> QueryStackFrame { diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 6bd221ff05874..3ea4df1d2a436 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -18,6 +18,7 @@ use rustc_ast::*; use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; use rustc_errors::{ codes::*, struct_span_code_err, Applicability, DiagnosticArgValue, ErrCode, IntoDiagnosticArg, + StashKey, }; use rustc_hir::def::Namespace::{self, *}; use rustc_hir::def::{self, CtorKind, DefKind, LifetimeRes, NonMacroAttrKind, PartialRes, PerNS}; @@ -3890,6 +3891,23 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { finalize, ) { Ok(Some(partial_res)) if let Some(res) = partial_res.full_res() => { + // if we also have an associated type that matches the ident, stash a suggestion + if let Some(items) = self.diagnostic_metadata.current_trait_assoc_items + && let [Segment { ident, .. }] = path + && items.iter().any(|item| { + item.ident == *ident && matches!(item.kind, AssocItemKind::Type(_)) + }) + { + let mut diag = self.r.tcx.dcx().struct_allow(""); + diag.span_suggestion_verbose( + path_span.shrink_to_lo(), + "there is an associated type with the same name", + "Self::", + Applicability::MaybeIncorrect, + ); + diag.stash(path_span, StashKey::AssociatedTypeSuggestion); + } + if source.is_expected(res) || res == Res::Err { partial_res } else { diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index 95833f532f4d8..bb822c611a170 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -11,6 +11,7 @@ #![feature(associated_type_bounds)] #![feature(const_option)] #![feature(core_intrinsics)] +#![feature(generic_nonzero)] #![feature(inline_const)] #![feature(min_specialization)] #![feature(never_type)] diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index 287e317b10f33..412f7eced433c 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -6,6 +6,7 @@ use std::cell::{Cell, RefCell}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}; use std::hash::{BuildHasher, Hash}; use std::marker::PhantomData; +use std::num::NonZero; use std::path; use std::rc::Rc; use std::sync::Arc; @@ -216,15 +217,15 @@ impl Decodable for ! { } } -impl Encodable for ::std::num::NonZeroU32 { +impl Encodable for NonZero { fn encode(&self, s: &mut S) { s.emit_u32(self.get()); } } -impl Decodable for ::std::num::NonZeroU32 { +impl Decodable for NonZero { fn decode(d: &mut D) -> Self { - ::std::num::NonZeroU32::new(d.read_u32()).unwrap() + NonZero::new(d.read_u32()).unwrap() } } diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index a8b9ff056c258..ef0512bf6862c 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -3230,7 +3230,7 @@ pub(crate) mod dep_tracking { }; use std::collections::BTreeMap; use std::hash::{DefaultHasher, Hash}; - use std::num::NonZeroUsize; + use std::num::NonZero; use std::path::PathBuf; pub trait DepTrackingHash { @@ -3272,7 +3272,7 @@ pub(crate) mod dep_tracking { impl_dep_tracking_hash_via_hash!( bool, usize, - NonZeroUsize, + NonZero, u64, Hash64, String, diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index 82846e3b4e827..de7e04ba00f8d 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -1,4 +1,4 @@ -use std::num::NonZeroU32; +use std::num::NonZero; use rustc_ast::token; use rustc_ast::util::literal::LitError; @@ -27,7 +27,7 @@ impl<'a> IntoDiagnostic<'a> for FeatureGateError { #[derive(Subdiagnostic)] #[note(session_feature_diagnostic_for_issue)] pub struct FeatureDiagnosticForIssue { - pub n: NonZeroU32, + pub n: NonZero, } #[derive(Subdiagnostic)] diff --git a/compiler/rustc_session/src/lib.rs b/compiler/rustc_session/src/lib.rs index 58e1394c09071..c63af90a7f312 100644 --- a/compiler/rustc_session/src/lib.rs +++ b/compiler/rustc_session/src/lib.rs @@ -1,3 +1,4 @@ +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(lazy_cell)] #![feature(option_get_or_insert_default)] diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index ea93ac5841fe9..743f476033935 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -21,7 +21,7 @@ use rustc_span::SourceFileHashAlgorithm; use std::collections::BTreeMap; use std::hash::{DefaultHasher, Hasher}; -use std::num::{IntErrorKind, NonZeroUsize}; +use std::num::{IntErrorKind, NonZero}; use std::path::PathBuf; use std::str; @@ -617,7 +617,7 @@ mod parse { pub(crate) fn parse_threads(slot: &mut usize, v: Option<&str>) -> bool { match v.and_then(|s| s.parse().ok()) { Some(0) => { - *slot = std::thread::available_parallelism().map_or(1, std::num::NonZeroUsize::get); + *slot = std::thread::available_parallelism().map_or(1, NonZero::::get); true } Some(i) => { @@ -991,7 +991,10 @@ mod parse { true } - pub(crate) fn parse_treat_err_as_bug(slot: &mut Option, v: Option<&str>) -> bool { + pub(crate) fn parse_treat_err_as_bug( + slot: &mut Option>, + v: Option<&str>, + ) -> bool { match v { Some(s) => match s.parse() { Ok(val) => { @@ -1004,7 +1007,7 @@ mod parse { } }, None => { - *slot = NonZeroUsize::new(1); + *slot = NonZero::new(1); true } } @@ -1950,7 +1953,7 @@ written to standard error output)"), "translate remapped paths into local paths when possible (default: yes)"), trap_unreachable: Option = (None, parse_opt_bool, [TRACKED], "generate trap instructions for unreachable intrinsics (default: use target setting, usually yes)"), - treat_err_as_bug: Option = (None, parse_treat_err_as_bug, [TRACKED], + treat_err_as_bug: Option> = (None, parse_treat_err_as_bug, [TRACKED], "treat the `val`th error that occurs as bug (default if not specified: 0 - don't treat errors as bugs. \ default if specified without a value: 1 - treat the first error as bug)"), trim_diagnostic_paths: bool = (true, parse_bool, [UNTRACKED], diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 134aa9efc01b6..29c88783357b7 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1422,6 +1422,7 @@ symbols! { rustc_if_this_changed, rustc_inherit_overflow_checks, rustc_insignificant_dtor, + rustc_intrinsic, rustc_layout, rustc_layout_scalar_valid_range_end, rustc_layout_scalar_valid_range_start, diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index 68b1a0d4e61cd..661a444d04990 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -2993,6 +2993,15 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { &mut Default::default(), ); self.suggest_unsized_bound_if_applicable(err, obligation); + if let Some(span) = err.span.primary_span() + && let Some(mut diag) = + self.tcx.dcx().steal_diagnostic(span, StashKey::AssociatedTypeSuggestion) + && let Ok(ref mut s1) = err.suggestions + && let Ok(ref mut s2) = diag.suggestions + { + s1.append(s2); + diag.cancel() + } } } diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index 7fa416197b35f..5fc93d666ab16 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -28,7 +28,8 @@ fn resolve_instance<'tcx>( tcx.normalize_erasing_regions(param_env, args), ) } else { - let def = if matches!(tcx.def_kind(def_id), DefKind::Fn) && tcx.is_intrinsic(def_id) { + let def = if matches!(tcx.def_kind(def_id), DefKind::Fn) && tcx.intrinsic(def_id).is_some() + { debug!(" => intrinsic"); ty::InstanceDef::Intrinsic(def_id) } else if Some(def_id) == tcx.lang_items().drop_in_place_fn() { diff --git a/config.example.toml b/config.example.toml index a5ef4022d39d5..098811195d7c9 100644 --- a/config.example.toml +++ b/config.example.toml @@ -829,6 +829,11 @@ # target triples containing `-none`, `nvptx`, `switch`, or `-uefi`. #no-std = (bool) +# This is an array of the codegen backends that will be compiled a rustc +# compiled for this target, overriding the global rust.codegen-backends option. +# See that option for more info. +#codegen-backends = rust.codegen-backends (array) + # ============================================================================= # Distribution options # diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 00a101541c589..c89a380628020 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -147,7 +147,7 @@ use core::alloc::Allocator; use core::fmt; use core::iter::{FusedIterator, InPlaceIterable, SourceIter, TrustedFused, TrustedLen}; use core::mem::{self, swap, ManuallyDrop}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::{Deref, DerefMut}; use core::ptr; @@ -296,7 +296,7 @@ pub struct PeekMut< heap: &'a mut BinaryHeap, // If a set_len + sift_down are required, this is Some. If a &mut T has not // yet been exposed to peek_mut()'s caller, it's None. - original_len: Option, + original_len: Option>, } #[stable(feature = "collection_debug", since = "1.17.0")] @@ -350,7 +350,7 @@ impl DerefMut for PeekMut<'_, T, A> { // the standard library as "leak amplification". unsafe { // SAFETY: len > 1 so len != 0. - self.original_len = Some(NonZeroUsize::new_unchecked(len)); + self.original_len = Some(NonZero::new_unchecked(len)); // SAFETY: len > 1 so all this does for now is leak elements, // which is safe. self.heap.data.set_len(1); @@ -1576,8 +1576,8 @@ unsafe impl SourceIter for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option = NonZeroUsize::new(1); - const MERGE_BY: Option = NonZeroUsize::new(1); + const EXPAND_BY: Option> = NonZero::new(1); + const MERGE_BY: Option> = NonZero::new(1); } unsafe impl AsVecIntoIter for IntoIter { diff --git a/library/alloc/src/collections/vec_deque/into_iter.rs b/library/alloc/src/collections/vec_deque/into_iter.rs index d9e274df0f5f2..692af7c197a30 100644 --- a/library/alloc/src/collections/vec_deque/into_iter.rs +++ b/library/alloc/src/collections/vec_deque/into_iter.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::{array, fmt, mem::MaybeUninit, ops::Try, ptr}; use crate::alloc::{Allocator, Global}; @@ -54,7 +54,7 @@ impl Iterator for IntoIter { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let len = self.inner.len; let rem = if len < n { self.inner.clear(); @@ -63,7 +63,7 @@ impl Iterator for IntoIter { self.inner.drain(..n); 0 }; - NonZeroUsize::new(rem).map_or(Ok(()), Err) + NonZero::new(rem).map_or(Ok(()), Err) } #[inline] @@ -183,7 +183,7 @@ impl DoubleEndedIterator for IntoIter { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let len = self.inner.len; let rem = if len < n { self.inner.clear(); @@ -192,7 +192,7 @@ impl DoubleEndedIterator for IntoIter { self.inner.truncate(len - n); 0 }; - NonZeroUsize::new(rem).map_or(Ok(()), Err) + NonZero::new(rem).map_or(Ok(()), Err) } fn try_rfold(&mut self, mut init: B, mut f: F) -> R diff --git a/library/alloc/src/collections/vec_deque/iter.rs b/library/alloc/src/collections/vec_deque/iter.rs index 646a2a991e701..5a5e7f70854d8 100644 --- a/library/alloc/src/collections/vec_deque/iter.rs +++ b/library/alloc/src/collections/vec_deque/iter.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::Try; use core::{fmt, mem, slice}; @@ -56,7 +56,7 @@ impl<'a, T> Iterator for Iter<'a, T> { } } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let remaining = self.i1.advance_by(n); match remaining { Ok(()) => return Ok(()), @@ -128,7 +128,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { } } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i2.advance_back_by(n) { Ok(()) => return Ok(()), Err(n) => { diff --git a/library/alloc/src/collections/vec_deque/iter_mut.rs b/library/alloc/src/collections/vec_deque/iter_mut.rs index 7defbb1090ffd..5061931afb7b7 100644 --- a/library/alloc/src/collections/vec_deque/iter_mut.rs +++ b/library/alloc/src/collections/vec_deque/iter_mut.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::Try; use core::{fmt, mem, slice}; @@ -48,7 +48,7 @@ impl<'a, T> Iterator for IterMut<'a, T> { } } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i1.advance_by(n) { Ok(()) => return Ok(()), Err(remaining) => { @@ -119,7 +119,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { } } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i2.advance_back_by(n) { Ok(()) => return Ok(()), Err(remaining) => { diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 3341b564d1f65..b84273848ee95 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -128,6 +128,7 @@ #![feature(extend_one)] #![feature(fmt_internals)] #![feature(fn_traits)] +#![feature(generic_nonzero)] #![feature(hasher_prefixfree_extras)] #![feature(hint_assert_unchecked)] #![feature(inline_const)] diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs index 5dc3c69e49320..07eb91c900597 100644 --- a/library/alloc/src/vec/in_place_collect.rs +++ b/library/alloc/src/vec/in_place_collect.rs @@ -160,14 +160,14 @@ use core::alloc::Layout; use core::iter::{InPlaceIterable, SourceIter, TrustedRandomAccessNoCoerce}; use core::marker::PhantomData; use core::mem::{self, ManuallyDrop, SizedTypeProperties}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr::{self, NonNull}; use super::{InPlaceDrop, InPlaceDstDataSrcBufDrop, SpecFromIter, SpecFromIterNested, Vec}; const fn in_place_collectible( - step_merge: Option, - step_expand: Option, + step_merge: Option>, + step_expand: Option>, ) -> bool { // Require matching alignments because an alignment-changing realloc is inefficient on many // system allocators and better implementations would require the unstable Allocator trait. diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs index 7800560da94f9..63d8fe19ac35c 100644 --- a/library/alloc/src/vec/into_iter.rs +++ b/library/alloc/src/vec/into_iter.rs @@ -12,7 +12,7 @@ use core::iter::{ }; use core::marker::PhantomData; use core::mem::{self, ManuallyDrop, MaybeUninit, SizedTypeProperties}; -use core::num::NonZeroUsize; +use core::num::NonZero; #[cfg(not(no_global_oom_handling))] use core::ops::Deref; use core::ptr::{self, NonNull}; @@ -234,7 +234,7 @@ impl Iterator for IntoIter { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let step_size = self.len().min(n); let to_drop = ptr::slice_from_raw_parts_mut(self.ptr.as_ptr(), step_size); if T::IS_ZST { @@ -248,7 +248,7 @@ impl Iterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } #[inline] @@ -336,7 +336,7 @@ impl DoubleEndedIterator for IntoIter { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let step_size = self.len().min(n); if T::IS_ZST { // SAFETY: same as for advance_by() @@ -350,7 +350,7 @@ impl DoubleEndedIterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } } @@ -457,8 +457,8 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option = NonZeroUsize::new(1); - const MERGE_BY: Option = NonZeroUsize::new(1); + const EXPAND_BY: Option> = NonZero::new(1); + const MERGE_BY: Option> = NonZero::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index ca17dab55b027..c4e89a58a05ac 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -13,6 +13,7 @@ #![feature(core_intrinsics)] #![feature(extract_if)] #![feature(exact_size_is_empty)] +#![feature(generic_nonzero)] #![feature(linked_list_cursors)] #![feature(map_try_insert)] #![feature(new_uninit)] diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 38a68df79cc73..04bb20e96b792 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1,5 +1,5 @@ use core::alloc::{Allocator, Layout}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr::NonNull; use core::{assert_eq, assert_ne}; use std::alloc::System; @@ -1089,9 +1089,9 @@ fn test_into_iter_advance_by() { assert_eq!(i.advance_back_by(1), Ok(())); assert_eq!(i.as_slice(), [2, 3, 4]); - assert_eq!(i.advance_back_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX - 3).unwrap())); + assert_eq!(i.advance_back_by(usize::MAX), Err(NonZero::new(usize::MAX - 3).unwrap())); - assert_eq!(i.advance_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX).unwrap())); + assert_eq!(i.advance_by(usize::MAX), Err(NonZero::new(usize::MAX).unwrap())); assert_eq!(i.advance_by(0), Ok(())); assert_eq!(i.advance_back_by(0), Ok(())); @@ -1192,7 +1192,7 @@ fn test_from_iter_specialization_with_iterator_adapters() { .map(|(a, b)| a + b) .map_while(Option::Some) .skip(1) - .map(|e| if e != usize::MAX { Ok(std::num::NonZeroUsize::new(e)) } else { Err(()) }); + .map(|e| if e != usize::MAX { Ok(NonZero::new(e)) } else { Err(()) }); assert_in_place_trait(&iter); let sink = iter.collect::, _>>().unwrap(); let sinkptr = sink.as_ptr(); diff --git a/library/alloc/tests/vec_deque.rs b/library/alloc/tests/vec_deque.rs index f6fb1f73e5cf9..eda2f8bb812b5 100644 --- a/library/alloc/tests/vec_deque.rs +++ b/library/alloc/tests/vec_deque.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; use std::assert_matches::assert_matches; use std::collections::TryReserveErrorKind::*; use std::collections::{vec_deque::Drain, VecDeque}; @@ -445,9 +445,9 @@ fn test_into_iter() { assert_eq!(it.next_back(), Some(3)); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_by(10), Err(NonZeroUsize::new(5).unwrap())); + assert_eq!(it.advance_by(10), Err(NonZero::new(5).unwrap())); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_back_by(10), Err(NonZeroUsize::new(5).unwrap())); + assert_eq!(it.advance_back_by(10), Err(NonZero::new(5).unwrap())); } } diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index 2b22488b8ffc5..e3d2cd2a31fbc 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -1,6 +1,6 @@ //! Defines the `IntoIter` owned iterator for arrays. -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::{ fmt, intrinsics::transmute_unchecked, @@ -280,7 +280,7 @@ impl Iterator for IntoIter { self.next_back() } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { // This also moves the start, which marks them as conceptually "dropped", // so if anything goes bad then our drop impl won't double-free them. let range_to_drop = self.alive.take_prefix(n); @@ -292,7 +292,7 @@ impl Iterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZeroUsize::new(remaining).map_or(Ok(()), Err) + NonZero::new(remaining).map_or(Ok(()), Err) } #[inline] @@ -335,7 +335,7 @@ impl DoubleEndedIterator for IntoIter { }) } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // This also moves the end, which marks them as conceptually "dropped", // so if anything goes bad then our drop impl won't double-free them. let range_to_drop = self.alive.take_suffix(n); @@ -347,7 +347,7 @@ impl DoubleEndedIterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZeroUsize::new(remaining).map_or(Ok(()), Err) + NonZero::new(remaining).map_or(Ok(()), Err) } } diff --git a/library/core/src/ascii.rs b/library/core/src/ascii.rs index 02867789b79dd..c29e5565d514a 100644 --- a/library/core/src/ascii.rs +++ b/library/core/src/ascii.rs @@ -12,7 +12,7 @@ use crate::escape; use crate::fmt; use crate::iter::FusedIterator; -use crate::num::NonZeroUsize; +use crate::num::NonZero; mod ascii_char; #[unstable(feature = "ascii_char", issue = "110998")] @@ -133,7 +133,7 @@ impl Iterator for EscapeDefault { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } @@ -146,7 +146,7 @@ impl DoubleEndedIterator for EscapeDefault { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_back_by(n) } } diff --git a/library/core/src/char/mod.rs b/library/core/src/char/mod.rs index 5c42912874c66..12bca0b438cc3 100644 --- a/library/core/src/char/mod.rs +++ b/library/core/src/char/mod.rs @@ -43,7 +43,7 @@ use crate::error::Error; use crate::escape; use crate::fmt::{self, Write}; use crate::iter::FusedIterator; -use crate::num::NonZeroUsize; +use crate::num::NonZero; pub(crate) use self::methods::EscapeDebugExtArgs; @@ -185,7 +185,7 @@ impl Iterator for EscapeUnicode { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } @@ -260,7 +260,7 @@ impl Iterator for EscapeDefault { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } diff --git a/library/core/src/cmp/bytewise.rs b/library/core/src/cmp/bytewise.rs index 2548d9e24c9db..b19eef8e25587 100644 --- a/library/core/src/cmp/bytewise.rs +++ b/library/core/src/cmp/bytewise.rs @@ -33,7 +33,7 @@ is_bytewise_comparable!(u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, // so we can compare them directly. is_bytewise_comparable!(bool, char, super::Ordering); -// SAFETY: Similarly, the non-zero types have a niche, but no undef and no pointers, +// SAFETY: Similarly, the `NonZero` type has a niche, but no undef and no pointers, // and they compare like their underlying numeric type. is_bytewise_comparable!( NonZeroU8, @@ -50,7 +50,7 @@ is_bytewise_comparable!( NonZeroIsize, ); -// SAFETY: The NonZero types have the "null" optimization guaranteed, and thus +// SAFETY: The `NonZero` type has the "null" optimization guaranteed, and thus // are also safe to equality-compare bitwise inside an `Option`. // The way `PartialOrd` is defined for `Option` means that this wouldn't work // for `<` or `>` on the signed types, but since we only do `==` it's fine. diff --git a/library/core/src/escape.rs b/library/core/src/escape.rs index 60b5df752ca85..143e277283e2c 100644 --- a/library/core/src/escape.rs +++ b/library/core/src/escape.rs @@ -1,7 +1,7 @@ //! Helper code for character escaping. use crate::ascii; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Range; const HEX_DIGITS: [ascii::Char; 16] = *b"0123456789abcdef".as_ascii().unwrap(); @@ -106,11 +106,11 @@ impl EscapeIterInner { self.alive.next_back().map(|i| self.data[usize::from(i)].to_u8()) } - pub fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + pub fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.alive.advance_by(n) } - pub fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + pub fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.alive.advance_back_by(n) } } diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index c8259c0024c75..fc6c1eab803d7 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2368,32 +2368,6 @@ extern "rust-intrinsic" { #[rustc_nounwind] pub fn ptr_guaranteed_cmp(ptr: *const T, other: *const T) -> u8; - /// Allocates a block of memory at compile time. - /// At runtime, just returns a null pointer. - /// - /// # Safety - /// - /// - The `align` argument must be a power of two. - /// - At compile time, a compile error occurs if this constraint is violated. - /// - At runtime, it is not checked. - #[rustc_const_unstable(feature = "const_heap", issue = "79597")] - #[rustc_nounwind] - pub fn const_allocate(size: usize, align: usize) -> *mut u8; - - /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time. - /// At runtime, does nothing. - /// - /// # Safety - /// - /// - The `align` argument must be a power of two. - /// - At compile time, a compile error occurs if this constraint is violated. - /// - At runtime, it is not checked. - /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it. - /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it. - #[rustc_const_unstable(feature = "const_heap", issue = "79597")] - #[rustc_nounwind] - pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize); - /// Determines whether the raw bytes of the two values are equal. /// /// This is particularly handy for arrays, since it allows things like just @@ -2517,83 +2491,112 @@ extern "rust-intrinsic" { where G: FnOnce, F: FnOnce; +} - /// Returns whether the argument's value is statically known at - /// compile-time. - /// - /// This is useful when there is a way of writing the code that will - /// be *faster* when some variables have known values, but *slower* - /// in the general case: an `if is_val_statically_known(var)` can be used - /// to select between these two variants. The `if` will be optimized away - /// and only the desired branch remains. - /// - /// Formally speaking, this function non-deterministically returns `true` - /// or `false`, and the caller has to ensure sound behavior for both cases. - /// In other words, the following code has *Undefined Behavior*: - /// - /// ```no_run - /// #![feature(is_val_statically_known)] - /// #![feature(core_intrinsics)] - /// # #![allow(internal_features)] - /// use std::hint::unreachable_unchecked; - /// use std::intrinsics::is_val_statically_known; - /// - /// unsafe { - /// if !is_val_statically_known(0) { unreachable_unchecked(); } - /// } - /// ``` - /// - /// This also means that the following code's behavior is unspecified; it - /// may panic, or it may not: - /// - /// ```no_run - /// #![feature(is_val_statically_known)] - /// #![feature(core_intrinsics)] - /// # #![allow(internal_features)] - /// use std::intrinsics::is_val_statically_known; - /// - /// unsafe { - /// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); - /// } - /// ``` - /// - /// Unsafe code may not rely on `is_val_statically_known` returning any - /// particular value, ever. However, the compiler will generally make it - /// return `true` only if the value of the argument is actually known. - /// - /// When calling this in a `const fn`, both paths must be semantically - /// equivalent, that is, the result of the `true` branch and the `false` - /// branch must return the same value and have the same side-effects *no - /// matter what*. - #[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")] - #[rustc_nounwind] - pub fn is_val_statically_known(arg: T) -> bool; - - /// Returns the value of `cfg!(debug_assertions)`, but after monomorphization instead of in - /// macro expansion. - /// - /// This always returns `false` in const eval and Miri. The interpreter provides better - /// diagnostics than the checks that this is used to implement. However, this means - /// you should only be using this intrinsic to guard requirements that, if violated, - /// immediately lead to UB. Otherwise, const-eval and Miri will miss out on those - /// checks entirely. - /// - /// Since this is evaluated after monomorphization, branching on this value can be used to - /// implement debug assertions that are included in the precompiled standard library, but can - /// be optimized out by builds that monomorphize the standard library code with debug - /// assertions disabled. This intrinsic is primarily used by [`assert_unsafe_precondition`]. - #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] - #[rustc_safe_intrinsic] - #[cfg(not(bootstrap))] - pub(crate) fn debug_assertions() -> bool; +/// Returns whether the argument's value is statically known at +/// compile-time. +/// +/// This is useful when there is a way of writing the code that will +/// be *faster* when some variables have known values, but *slower* +/// in the general case: an `if is_val_statically_known(var)` can be used +/// to select between these two variants. The `if` will be optimized away +/// and only the desired branch remains. +/// +/// Formally speaking, this function non-deterministically returns `true` +/// or `false`, and the caller has to ensure sound behavior for both cases. +/// In other words, the following code has *Undefined Behavior*: +/// +/// ```no_run +/// #![feature(is_val_statically_known)] +/// #![feature(core_intrinsics)] +/// # #![allow(internal_features)] +/// use std::hint::unreachable_unchecked; +/// use std::intrinsics::is_val_statically_known; +/// +/// if !is_val_statically_known(0) { unsafe { unreachable_unchecked(); } } +/// ``` +/// +/// This also means that the following code's behavior is unspecified; it +/// may panic, or it may not: +/// +/// ```no_run +/// #![feature(is_val_statically_known)] +/// #![feature(core_intrinsics)] +/// # #![allow(internal_features)] +/// use std::intrinsics::is_val_statically_known; +/// +/// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); +/// ``` +/// +/// Unsafe code may not rely on `is_val_statically_known` returning any +/// particular value, ever. However, the compiler will generally make it +/// return `true` only if the value of the argument is actually known. +/// +/// When calling this in a `const fn`, both paths must be semantically +/// equivalent, that is, the result of the `true` branch and the `false` +/// branch must return the same value and have the same side-effects *no +/// matter what*. +#[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")] +#[rustc_nounwind] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const fn is_val_statically_known(_arg: T) -> bool { + false } -#[cfg(bootstrap)] +/// Returns the value of `cfg!(debug_assertions)`, but after monomorphization instead of in +/// macro expansion. +/// +/// This always returns `false` in const eval and Miri. The interpreter provides better +/// diagnostics than the checks that this is used to implement. However, this means +/// you should only be using this intrinsic to guard requirements that, if violated, +/// immediately lead to UB. Otherwise, const-eval and Miri will miss out on those +/// checks entirely. +/// +/// Since this is evaluated after monomorphization, branching on this value can be used to +/// implement debug assertions that are included in the precompiled standard library, but can +/// be optimized out by builds that monomorphize the standard library code with debug +/// assertions disabled. This intrinsic is primarily used by [`assert_unsafe_precondition`]. #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] pub(crate) const fn debug_assertions() -> bool { cfg!(debug_assertions) } +/// Allocates a block of memory at compile time. +/// At runtime, just returns a null pointer. +/// +/// # Safety +/// +/// - The `align` argument must be a power of two. +/// - At compile time, a compile error occurs if this constraint is violated. +/// - At runtime, it is not checked. +#[rustc_const_unstable(feature = "const_heap", issue = "79597")] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[rustc_nounwind] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 { + // const eval overrides this function, but runtime code should always just return null pointers. + crate::ptr::null_mut() +} + +/// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time. +/// At runtime, does nothing. +/// +/// # Safety +/// +/// - The `align` argument must be a power of two. +/// - At compile time, a compile error occurs if this constraint is violated. +/// - At runtime, it is not checked. +/// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it. +/// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it. +#[rustc_const_unstable(feature = "const_heap", issue = "79597")] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[rustc_nounwind] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + // Some functions are defined here because they accidentally got made // available in this module on stable. See . // (`transmute` also falls into this category, but it cannot be wrapped due to the diff --git a/library/core/src/io/borrowed_buf.rs b/library/core/src/io/borrowed_buf.rs index fe25cac280fe3..ed06ce6927e05 100644 --- a/library/core/src/io/borrowed_buf.rs +++ b/library/core/src/io/borrowed_buf.rs @@ -233,6 +233,26 @@ impl<'a> BorrowedCursor<'a> { &mut self.buf.buf[self.buf.filled..] } + /// Advance the cursor by asserting that `n` bytes have been filled. + /// + /// After advancing, the `n` bytes are no longer accessible via the cursor and can only be + /// accessed via the underlying buffer. I.e., the buffer's filled portion grows by `n` elements + /// and its unfilled portion (and the capacity of this cursor) shrinks by `n` elements. + /// + /// If less than `n` bytes initialized (by the cursor's point of view), `set_init` should be + /// called first. + /// + /// # Panics + /// + /// Panics if there are less than `n` bytes initialized. + #[inline] + pub fn advance(&mut self, n: usize) -> &mut Self { + assert!(self.buf.init >= self.buf.filled + n); + + self.buf.filled += n; + self + } + /// Advance the cursor by asserting that `n` bytes have been filled. /// /// After advancing, the `n` bytes are no longer accessible via the cursor and can only be @@ -244,7 +264,7 @@ impl<'a> BorrowedCursor<'a> { /// The caller must ensure that the first `n` bytes of the cursor have been properly /// initialised. #[inline] - pub unsafe fn advance(&mut self, n: usize) -> &mut Self { + pub unsafe fn advance_unchecked(&mut self, n: usize) -> &mut Self { self.buf.filled += n; self.buf.init = cmp::max(self.buf.init, self.buf.filled); self @@ -289,7 +309,7 @@ impl<'a> BorrowedCursor<'a> { // SAFETY: we do not de-initialize any of the elements of the slice unsafe { - MaybeUninit::write_slice(&mut self.as_mut()[..buf.len()], buf); + MaybeUninit::copy_from_slice(&mut self.as_mut()[..buf.len()], buf); } // SAFETY: We just added the entire contents of buf to the filled section. diff --git a/library/core/src/iter/adapters/array_chunks.rs b/library/core/src/iter/adapters/array_chunks.rs index 946d0051ccec3..8c68ea114dbd2 100644 --- a/library/core/src/iter/adapters/array_chunks.rs +++ b/library/core/src/iter/adapters/array_chunks.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::SourceIter; use crate::iter::{ ByRefSized, FusedIterator, InPlaceIterable, TrustedFused, TrustedRandomAccessNoCoerce, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, NeverShortCircuit, Try}; /// An iterator over `N` elements of the iterator at a time. @@ -253,9 +253,9 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for ArrayChunks { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = const { - match (I::MERGE_BY, NonZeroUsize::new(N)) { + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = const { + match (I::MERGE_BY, NonZero::new(N)) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } diff --git a/library/core/src/iter/adapters/by_ref_sized.rs b/library/core/src/iter/adapters/by_ref_sized.rs index 4e0e19ddc7822..d084bede1eba6 100644 --- a/library/core/src/iter/adapters/by_ref_sized.rs +++ b/library/core/src/iter/adapters/by_ref_sized.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{NeverShortCircuit, Try}; /// Like `Iterator::by_ref`, but requiring `Sized` so it can forward generics. @@ -27,7 +27,7 @@ impl Iterator for ByRefSized<'_, I> { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { I::advance_by(self.0, n) } @@ -63,7 +63,7 @@ impl DoubleEndedIterator for ByRefSized<'_, I> { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { I::advance_back_by(self.0, n) } diff --git a/library/core/src/iter/adapters/chain.rs b/library/core/src/iter/adapters/chain.rs index c748336cd7fa0..bcaac2f42cf04 100644 --- a/library/core/src/iter/adapters/chain.rs +++ b/library/core/src/iter/adapters/chain.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that links two iterators together, in a chain. @@ -96,7 +96,7 @@ where } #[inline] - fn advance_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { if let Some(ref mut a) = self.a { n = match a.advance_by(n) { Ok(()) => return Ok(()), @@ -110,7 +110,7 @@ where // we don't fuse the second iterator } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[inline] @@ -182,7 +182,7 @@ where } #[inline] - fn advance_back_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, mut n: usize) -> Result<(), NonZero> { if let Some(ref mut b) = self.b { n = match b.advance_back_by(n) { Ok(()) => return Ok(()), @@ -196,7 +196,7 @@ where // we don't fuse the second iterator } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/src/iter/adapters/cloned.rs b/library/core/src/iter/adapters/cloned.rs index 3de91267cf5d9..1a106ef97942b 100644 --- a/library/core/src/iter/adapters/cloned.rs +++ b/library/core/src/iter/adapters/cloned.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::{ }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen, UncheckedIterator}; use crate::ops::Try; -use core::num::NonZeroUsize; +use core::num::NonZero; /// An iterator that clones the elements of an underlying iterator. /// @@ -185,6 +185,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Cloned { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/copied.rs b/library/core/src/iter/adapters/copied.rs index 52a5add1132a4..6d82d1581f79d 100644 --- a/library/core/src/iter/adapters/copied.rs +++ b/library/core/src/iter/adapters/copied.rs @@ -4,7 +4,7 @@ use crate::iter::adapters::{ use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen}; use crate::mem::MaybeUninit; use crate::mem::SizedTypeProperties; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; use crate::{array, ptr}; @@ -90,7 +90,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.it.advance_by(n) } @@ -131,7 +131,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.it.advance_back_by(n) } } @@ -272,6 +272,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Copied { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/cycle.rs b/library/core/src/iter/adapters/cycle.rs index 51bd09b6effe1..b35ed8442032d 100644 --- a/library/core/src/iter/adapters/cycle.rs +++ b/library/core/src/iter/adapters/cycle.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::{iter::FusedIterator, ops::Try}; /// An iterator that repeats endlessly. @@ -82,7 +82,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let mut n = match self.iter.advance_by(n) { Ok(()) => return Ok(()), Err(rem) => rem.get(), @@ -97,7 +97,7 @@ where }; } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } // No `fold` override, because `fold` doesn't make much sense for `Cycle`, diff --git a/library/core/src/iter/adapters/enumerate.rs b/library/core/src/iter/adapters/enumerate.rs index 92f465ccdb4e8..ef46040f0a703 100644 --- a/library/core/src/iter/adapters/enumerate.rs +++ b/library/core/src/iter/adapters/enumerate.rs @@ -2,7 +2,7 @@ use crate::iter::adapters::{ zip::try_get_unchecked, SourceIter, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedFused, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that yields the current count and the element during iteration. @@ -115,7 +115,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let remaining = self.iter.advance_by(n); let advanced = match remaining { Ok(()) => n, @@ -206,7 +206,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // we do not need to update the count since that only tallies the number of items // consumed from the front. consuming items from the back can never reduce that. self.iter.advance_back_by(n) @@ -265,8 +265,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Enumerate { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[stable(feature = "default_iters", since = "1.70.0")] diff --git a/library/core/src/iter/adapters/filter.rs b/library/core/src/iter/adapters/filter.rs index 882f3e3bc60f5..a7f1fde6975c0 100644 --- a/library/core/src/iter/adapters/filter.rs +++ b/library/core/src/iter/adapters/filter.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; use core::array; use core::mem::{ManuallyDrop, MaybeUninit}; @@ -209,6 +209,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Filter { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/filter_map.rs b/library/core/src/iter/adapters/filter_map.rs index 81ac0eaa67e95..64bd5b3e2b668 100644 --- a/library/core/src/iter/adapters/filter_map.rs +++ b/library/core/src/iter/adapters/filter_map.rs @@ -1,6 +1,6 @@ use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; use crate::mem::{ManuallyDrop, MaybeUninit}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; use crate::{array, fmt}; @@ -210,6 +210,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for FilterMap { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/flatten.rs b/library/core/src/iter/adapters/flatten.rs index 7d6f746845e31..99344a88efc3f 100644 --- a/library/core/src/iter/adapters/flatten.rs +++ b/library/core/src/iter/adapters/flatten.rs @@ -4,7 +4,7 @@ use crate::iter::{ TrustedLen, }; use crate::iter::{Once, OnceWith}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; use crate::result; use crate::{array, fmt, option}; @@ -90,7 +90,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_by(n) } @@ -135,7 +135,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_back_by(n) } } @@ -165,13 +165,13 @@ where I: InPlaceIterable, U: BoundedSize + IntoIterator, { - const EXPAND_BY: Option = const { + const EXPAND_BY: Option> = const { match (I::EXPAND_BY, U::UPPER_BOUND) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } }; - const MERGE_BY: Option = I::MERGE_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -200,7 +200,7 @@ where #[rustc_specialization_trait] #[unstable(issue = "none", feature = "inplace_iteration")] unsafe trait BoundedSize { - const UPPER_BOUND: Option = NonZeroUsize::new(1); + const UPPER_BOUND: Option> = NonZero::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -217,31 +217,31 @@ unsafe impl BoundedSize for Once {} unsafe impl BoundedSize for OnceWith {} #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for [T; N] { - const UPPER_BOUND: Option = NonZeroUsize::new(N); + const UPPER_BOUND: Option> = NonZero::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for array::IntoIter { - const UPPER_BOUND: Option = NonZeroUsize::new(N); + const UPPER_BOUND: Option> = NonZero::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Filter { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for FilterMap { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Map { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Copied { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Cloned { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } /// An iterator that flattens one level of nesting in an iterator of things @@ -322,7 +322,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_by(n) } @@ -367,7 +367,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_back_by(n) } } @@ -394,13 +394,13 @@ where I: InPlaceIterable + Iterator, ::Item: IntoIterator + BoundedSize, { - const EXPAND_BY: Option = const { + const EXPAND_BY: Option> = const { match (I::EXPAND_BY, I::Item::UPPER_BOUND) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } }; - const MERGE_BY: Option = I::MERGE_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -669,7 +669,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { #[inline] #[rustc_inherit_overflow_checks] fn advance(n: usize, iter: &mut U) -> ControlFlow<(), usize> { @@ -680,7 +680,7 @@ where } match self.iter_try_fold(n, advance) { - ControlFlow::Continue(remaining) => NonZeroUsize::new(remaining).map_or(Ok(()), Err), + ControlFlow::Continue(remaining) => NonZero::new(remaining).map_or(Ok(()), Err), _ => Ok(()), } } @@ -759,7 +759,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { #[inline] #[rustc_inherit_overflow_checks] fn advance(n: usize, iter: &mut U) -> ControlFlow<(), usize> { @@ -770,7 +770,7 @@ where } match self.iter_try_rfold(n, advance) { - ControlFlow::Continue(remaining) => NonZeroUsize::new(remaining).map_or(Ok(()), Err), + ControlFlow::Continue(remaining) => NonZero::new(remaining).map_or(Ok(()), Err), _ => Ok(()), } } diff --git a/library/core/src/iter/adapters/inspect.rs b/library/core/src/iter/adapters/inspect.rs index fd2d830b693d1..1c4656a649a37 100644 --- a/library/core/src/iter/adapters/inspect.rs +++ b/library/core/src/iter/adapters/inspect.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that calls a function with a reference to each element before @@ -168,6 +168,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Inspect { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/map.rs b/library/core/src/iter/adapters/map.rs index c882c9e7f3f51..6e163e20d8ec4 100644 --- a/library/core/src/iter/adapters/map.rs +++ b/library/core/src/iter/adapters/map.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::{ zip::try_get_unchecked, SourceIter, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedFused, TrustedLen, UncheckedIterator}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that maps the values of `iter` with `f`. @@ -237,6 +237,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Map { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/map_while.rs b/library/core/src/iter/adapters/map_while.rs index bcae73cbe09cf..9ad50048c25ea 100644 --- a/library/core/src/iter/adapters/map_while.rs +++ b/library/core/src/iter/adapters/map_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, InPlaceIterable}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only accepts elements while `predicate` returns `Some(_)`. @@ -84,6 +84,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for MapWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs index 4037e2e2839c0..cc514bd914f14 100644 --- a/library/core/src/iter/adapters/mod.rs +++ b/library/core/src/iter/adapters/mod.rs @@ -1,5 +1,5 @@ use crate::iter::InPlaceIterable; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ChangeOutputType, ControlFlow, FromResidual, Residual, Try}; mod array_chunks; @@ -234,6 +234,6 @@ unsafe impl InPlaceIterable for GenericShunt<'_, I, R> where I: InPlaceIterable, { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/rev.rs b/library/core/src/iter/adapters/rev.rs index 4aaf7c61f50d6..06ab15d5e900d 100644 --- a/library/core/src/iter/adapters/rev.rs +++ b/library/core/src/iter/adapters/rev.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// A double-ended iterator with the direction inverted. @@ -39,7 +39,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.iter.advance_back_by(n) } @@ -84,7 +84,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.iter.advance_by(n) } diff --git a/library/core/src/iter/adapters/scan.rs b/library/core/src/iter/adapters/scan.rs index 635bad199ff95..d261a535b183a 100644 --- a/library/core/src/iter/adapters/scan.rs +++ b/library/core/src/iter/adapters/scan.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, InPlaceIterable}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator to maintain state while iterating another iterator. @@ -94,6 +94,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Scan { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/skip.rs b/library/core/src/iter/adapters/skip.rs index f5188dd458df9..f51a2c39b8e28 100644 --- a/library/core/src/iter/adapters/skip.rs +++ b/library/core/src/iter/adapters/skip.rs @@ -5,7 +5,7 @@ use crate::iter::{ adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that skips over `n` elements of `iter`. @@ -134,7 +134,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { let skip_inner = self.n; let skip_and_advance = skip_inner.saturating_add(n); @@ -154,7 +154,7 @@ where } } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[doc(hidden)] @@ -234,11 +234,11 @@ where impl_fold_via_try_fold! { rfold -> try_rfold } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let min = crate::cmp::min(self.len(), n); let rem = self.iter.advance_back_by(min); assert!(rem.is_ok(), "ExactSizeIterator contract violation"); - NonZeroUsize::new(n - min).map_or(Ok(()), Err) + NonZero::new(n - min).map_or(Ok(()), Err) } } @@ -264,8 +264,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Skip { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[doc(hidden)] diff --git a/library/core/src/iter/adapters/skip_while.rs b/library/core/src/iter/adapters/skip_while.rs index 3a661973e5fe0..8001e6e64713a 100644 --- a/library/core/src/iter/adapters/skip_while.rs +++ b/library/core/src/iter/adapters/skip_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that rejects elements while `predicate` returns `true`. @@ -124,6 +124,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for SkipWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/take.rs b/library/core/src/iter/adapters/take.rs index 80e06066d28f9..6870c677b1e07 100644 --- a/library/core/src/iter/adapters/take.rs +++ b/library/core/src/iter/adapters/take.rs @@ -3,7 +3,7 @@ use crate::iter::{ adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused, TrustedLen, TrustedRandomAccess, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only iterates over the first `n` iterations of `iter`. @@ -117,7 +117,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let min = self.n.min(n); let rem = match self.iter.advance_by(min) { Ok(()) => 0, @@ -125,7 +125,7 @@ where }; let advanced = min - rem; self.n -= advanced; - NonZeroUsize::new(n - advanced).map_or(Ok(()), Err) + NonZero::new(n - advanced).map_or(Ok(()), Err) } } @@ -145,8 +145,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Take { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[stable(feature = "double_ended_take_iterator", since = "1.38.0")] @@ -219,7 +219,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // The amount by which the inner iterator needs to be shortened for it to be // at most as long as the take() amount. let trim_inner = self.iter.len().saturating_sub(self.n); @@ -235,7 +235,7 @@ where let advanced_by_inner = advance_by - remainder; let advanced_by = advanced_by_inner - trim_inner; self.n -= advanced_by; - NonZeroUsize::new(n - advanced_by).map_or(Ok(()), Err) + NonZero::new(n - advanced_by).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/adapters/take_while.rs b/library/core/src/iter/adapters/take_while.rs index e55d55a6d2377..d3f09ab356ad8 100644 --- a/library/core/src/iter/adapters/take_while.rs +++ b/library/core/src/iter/adapters/take_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only accepts elements while `predicate` returns `true`. @@ -125,6 +125,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for TakeWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index b33400fab476f..2e885f06b5272 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -2,7 +2,7 @@ use crate::cmp; use crate::fmt::{self, Debug}; use crate::iter::{FusedIterator, TrustedFused}; use crate::iter::{InPlaceIterable, SourceIter, TrustedLen, UncheckedIterator}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// An iterator that iterates two other iterators simultaneously. /// @@ -489,8 +489,8 @@ where // Since SourceIter forwards the left hand side we do the same here #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Zip { - const EXPAND_BY: Option = A::EXPAND_BY; - const MERGE_BY: Option = A::MERGE_BY; + const EXPAND_BY: Option> = A::EXPAND_BY; + const MERGE_BY: Option> = A::MERGE_BY; } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 0e03d0c2d4e4f..68937161e046a 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -2,7 +2,7 @@ use crate::ascii::Char as AsciiChar; use crate::convert::TryFrom; use crate::mem; use crate::net::{Ipv4Addr, Ipv6Addr}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{self, Try}; use super::{ @@ -629,12 +629,12 @@ trait RangeIteratorImpl { // Iterator fn spec_next(&mut self) -> Option; fn spec_nth(&mut self, n: usize) -> Option; - fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>; + fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero>; // DoubleEndedIterator fn spec_next_back(&mut self) -> Option; fn spec_nth_back(&mut self, n: usize) -> Option; - fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>; + fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero>; } impl RangeIteratorImpl for ops::Range { @@ -666,7 +666,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - default fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + default fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -678,7 +678,7 @@ impl RangeIteratorImpl for ops::Range { self.start = Step::forward_checked(self.start.clone(), taken).expect("`Step` invariants not upheld"); - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -707,7 +707,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - default fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + default fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -719,7 +719,7 @@ impl RangeIteratorImpl for ops::Range { self.end = Step::backward_checked(self.end.clone(), taken).expect("`Step` invariants not upheld"); - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } } @@ -751,7 +751,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -766,7 +766,7 @@ impl RangeIteratorImpl for ops::Range { // Otherwise 0 is returned which always safe to use. self.start = unsafe { Step::forward_unchecked(self.start, taken) }; - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -795,7 +795,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -807,7 +807,7 @@ impl RangeIteratorImpl for ops::Range { // SAFETY: same as the spec_advance_by() implementation self.end = unsafe { Step::backward_unchecked(self.end, taken) }; - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } } @@ -871,7 +871,7 @@ impl Iterator for ops::Range { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.spec_advance_by(n) } @@ -949,7 +949,7 @@ impl DoubleEndedIterator for ops::Range { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.spec_advance_back_by(n) } } diff --git a/library/core/src/iter/sources/repeat.rs b/library/core/src/iter/sources/repeat.rs index 67051f6e97bdd..0168b11c7394a 100644 --- a/library/core/src/iter/sources/repeat.rs +++ b/library/core/src/iter/sources/repeat.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Creates a new iterator that endlessly repeats a single element. /// @@ -81,7 +81,7 @@ impl Iterator for Repeat { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { // Advancing an infinite iterator of a single element is a no-op. let _ = n; Ok(()) @@ -110,7 +110,7 @@ impl DoubleEndedIterator for Repeat { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // Advancing an infinite iterator of a single element is a no-op. let _ = n; Ok(()) diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs index db2f8b7ac283f..8224e4b12a0eb 100644 --- a/library/core/src/iter/sources/repeat_n.rs +++ b/library/core/src/iter/sources/repeat_n.rs @@ -1,6 +1,6 @@ use crate::iter::{FusedIterator, TrustedLen}; use crate::mem::ManuallyDrop; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Creates a new iterator that repeats a single element a given number of times. /// @@ -136,7 +136,7 @@ impl Iterator for RepeatN { } #[inline] - fn advance_by(&mut self, skip: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, skip: usize) -> Result<(), NonZero> { let len = self.count; if skip >= len { @@ -145,7 +145,7 @@ impl Iterator for RepeatN { if skip > len { // SAFETY: we just checked that the difference is positive - Err(unsafe { NonZeroUsize::new_unchecked(skip - len) }) + Err(unsafe { NonZero::new_unchecked(skip - len) }) } else { self.count = len - skip; Ok(()) @@ -178,7 +178,7 @@ impl DoubleEndedIterator for RepeatN { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.advance_by(n) } diff --git a/library/core/src/iter/traits/double_ended.rs b/library/core/src/iter/traits/double_ended.rs index 4c8af4eba7889..48aae73d928a0 100644 --- a/library/core/src/iter/traits/double_ended.rs +++ b/library/core/src/iter/traits/double_ended.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator able to yield elements from both ends. @@ -119,8 +119,8 @@ pub trait DoubleEndedIterator: Iterator { /// /// ``` /// #![feature(iter_advance_by)] - /// /// use std::num::NonZeroUsize; + /// /// let a = [3, 4, 5, 6]; /// let mut iter = a.iter(); /// @@ -134,11 +134,11 @@ pub trait DoubleEndedIterator: Iterator { /// [`Err(k)`]: Err #[inline] #[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { for i in 0..n { if self.next_back().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZeroUsize::new_unchecked(n - i) }); + return Err(unsafe { NonZero::new_unchecked(n - i) }); } } Ok(()) @@ -373,7 +373,7 @@ impl<'a, I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for &'a mut I { fn next_back(&mut self) -> Option { (**self).next_back() } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { (**self).advance_back_by(n) } fn nth_back(&mut self, n: usize) -> Option { diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 20dd95a3a4623..522e75a5683b2 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -1,6 +1,6 @@ use crate::array; use crate::cmp::{self, Ordering}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ChangeOutputType, ControlFlow, FromResidual, Residual, Try}; use super::super::try_process; @@ -320,8 +320,8 @@ pub trait Iterator { /// /// ``` /// #![feature(iter_advance_by)] - /// /// use std::num::NonZeroUsize; + /// /// let a = [1, 2, 3, 4]; /// let mut iter = a.iter(); /// @@ -333,11 +333,11 @@ pub trait Iterator { #[inline] #[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")] #[rustc_do_not_const_check] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { for i in 0..n { if self.next().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZeroUsize::new_unchecked(n - i) }); + return Err(unsafe { NonZero::new_unchecked(n - i) }); } } Ok(()) @@ -4138,7 +4138,7 @@ impl Iterator for &mut I { fn size_hint(&self) -> (usize, Option) { (**self).size_hint() } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { (**self).advance_by(n) } fn nth(&mut self, n: usize) -> Option { diff --git a/library/core/src/iter/traits/marker.rs b/library/core/src/iter/traits/marker.rs index e7c1f195aacc6..8bdbca120d7f9 100644 --- a/library/core/src/iter/traits/marker.rs +++ b/library/core/src/iter/traits/marker.rs @@ -1,5 +1,5 @@ use crate::iter::Step; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Same as FusedIterator /// @@ -91,12 +91,12 @@ pub unsafe trait InPlaceIterable { /// E.g. [[u8; 4]; 4].iter().flatten().flatten() would have a `EXPAND_BY` of 16. /// This is an upper bound, i.e. the transformations will produce at most this many items per /// input. It's meant for layout calculations. - const EXPAND_BY: Option; + const EXPAND_BY: Option>; /// The product of many-to-one item reductions that happen throughout the iterator pipeline. /// E.g. [u8].iter().array_chunks::<4>().array_chunks::<4>() would have a `MERGE_BY` of 16. /// This is a lower bound, i.e. the transformations will consume at least this many items per /// output. - const MERGE_BY: Option; + const MERGE_BY: Option>; } /// A type that upholds all invariants of [`Step`]. diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index 53e9a32e30554..c19b5791562ce 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -1016,7 +1016,7 @@ impl MaybeUninit { /// Copies the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`. /// - /// If `T` does not implement `Copy`, use [`write_slice_cloned`] + /// If `T` does not implement `Copy`, use [`clone_from_slice`] /// /// This is similar to [`slice::copy_from_slice`]. /// @@ -1033,7 +1033,7 @@ impl MaybeUninit { /// let mut dst = [MaybeUninit::uninit(); 32]; /// let src = [0; 32]; /// - /// let init = MaybeUninit::write_slice(&mut dst, &src); + /// let init = MaybeUninit::copy_from_slice(&mut dst, &src); /// /// assert_eq!(init, src); /// ``` @@ -1045,7 +1045,7 @@ impl MaybeUninit { /// let mut vec = Vec::with_capacity(32); /// let src = [0; 16]; /// - /// MaybeUninit::write_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); + /// MaybeUninit::copy_from_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); /// /// // SAFETY: we have just copied all the elements of len into the spare capacity /// // the first src.len() elements of the vec are valid now. @@ -1056,9 +1056,9 @@ impl MaybeUninit { /// assert_eq!(vec, src); /// ``` /// - /// [`write_slice_cloned`]: MaybeUninit::write_slice_cloned + /// [`clone_from_slice`]: MaybeUninit::clone_from_slice #[unstable(feature = "maybe_uninit_write_slice", issue = "79995")] - pub fn write_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] + pub fn copy_from_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] where T: Copy, { @@ -1074,7 +1074,7 @@ impl MaybeUninit { /// Clones the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`. /// Any already initialized elements will not be dropped. /// - /// If `T` implements `Copy`, use [`write_slice`] + /// If `T` implements `Copy`, use [`copy_from_slice`] /// /// This is similar to [`slice::clone_from_slice`] but does not drop existing elements. /// @@ -1093,7 +1093,7 @@ impl MaybeUninit { /// let mut dst = [MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit()]; /// let src = ["wibbly".to_string(), "wobbly".to_string(), "timey".to_string(), "wimey".to_string(), "stuff".to_string()]; /// - /// let init = MaybeUninit::write_slice_cloned(&mut dst, &src); + /// let init = MaybeUninit::clone_from_slice(&mut dst, &src); /// /// assert_eq!(init, src); /// ``` @@ -1105,7 +1105,7 @@ impl MaybeUninit { /// let mut vec = Vec::with_capacity(32); /// let src = ["rust", "is", "a", "pretty", "cool", "language"]; /// - /// MaybeUninit::write_slice_cloned(&mut vec.spare_capacity_mut()[..src.len()], &src); + /// MaybeUninit::clone_from_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); /// /// // SAFETY: we have just cloned all the elements of len into the spare capacity /// // the first src.len() elements of the vec are valid now. @@ -1116,9 +1116,9 @@ impl MaybeUninit { /// assert_eq!(vec, src); /// ``` /// - /// [`write_slice`]: MaybeUninit::write_slice + /// [`copy_from_slice`]: MaybeUninit::copy_from_slice #[unstable(feature = "maybe_uninit_write_slice", issue = "79995")] - pub fn write_slice_cloned<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] + pub fn clone_from_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] where T: Clone, { @@ -1261,7 +1261,7 @@ impl MaybeUninit { /// /// let mut uninit = [MaybeUninit::::uninit(), MaybeUninit::::uninit()]; /// let uninit_bytes = MaybeUninit::slice_as_bytes_mut(&mut uninit); - /// MaybeUninit::write_slice(uninit_bytes, &[0x12, 0x34, 0x56, 0x78]); + /// MaybeUninit::copy_from_slice(uninit_bytes, &[0x12, 0x34, 0x56, 0x78]); /// let vals = unsafe { MaybeUninit::slice_assume_init_ref(&uninit) }; /// if cfg!(target_endian = "little") { /// assert_eq!(vals, &[0x3412u16, 0x7856u16]); diff --git a/library/core/src/net/display_buffer.rs b/library/core/src/net/display_buffer.rs index 7aadf06e92fc6..b7e778605fc0a 100644 --- a/library/core/src/net/display_buffer.rs +++ b/library/core/src/net/display_buffer.rs @@ -30,7 +30,7 @@ impl fmt::Write for DisplayBuffer { let bytes = s.as_bytes(); if let Some(buf) = self.buf.get_mut(self.len..(self.len + bytes.len())) { - MaybeUninit::write_slice(buf, bytes); + MaybeUninit::copy_from_slice(buf, bytes); self.len += bytes.len(); Ok(()) } else { diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 288ad8e8d8784..fe2873261751d 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -160,6 +160,27 @@ where } } } + + /// Returns the contained value as a primitive type. + #[stable(feature = "nonzero", since = "1.28.0")] + #[rustc_const_stable(feature = "const_nonzero_get", since = "1.34.0")] + #[inline] + pub const fn get(self) -> T { + // FIXME: This can be changed to simply `self.0` once LLVM supports `!range` metadata + // for function arguments: https://github.com/llvm/llvm-project/issues/76628 + // + // Rustc can set range metadata only if it loads `self` from + // memory somewhere. If the value of `self` was from by-value argument + // of some not-inlined function, LLVM don't have range metadata + // to understand that the value cannot be zero. + match Self::new(self.0) { + Some(Self(n)) => n, + None => { + // SAFETY: `NonZero` is guaranteed to only contain non-zero values, so this is unreachable. + unsafe { intrinsics::unreachable() } + } + } + } } macro_rules! impl_nonzero_fmt { @@ -221,26 +242,6 @@ macro_rules! nonzero_integer { pub type $Ty = NonZero<$Int>; impl $Ty { - /// Returns the value as a primitive type. - #[$stability] - #[inline] - #[rustc_const_stable(feature = "const_nonzero_get", since = "1.34.0")] - pub const fn get(self) -> $Int { - // FIXME: Remove this after LLVM supports `!range` metadata for function - // arguments https://github.com/llvm/llvm-project/issues/76628 - // - // Rustc can set range metadata only if it loads `self` from - // memory somewhere. If the value of `self` was from by-value argument - // of some not-inlined function, LLVM don't have range metadata - // to understand that the value cannot be zero. - - // SAFETY: It is an invariant of this type. - unsafe { - intrinsics::assume(self.0 != 0); - } - self.0 - } - /// The size of this non-zero integer type in bits. /// #[doc = concat!("This value is equal to [`", stringify!($Int), "::BITS`].")] @@ -312,10 +313,10 @@ macro_rules! nonzero_integer { /// #![feature(non_zero_count_ones)] /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { - #[doc = concat!("# use std::num::{self, ", stringify!($Ty), "};")] - /// - /// let one = num::NonZeroU32::new(1)?; - /// let three = num::NonZeroU32::new(3)?; + /// # use std::num::*; + /// # + /// let one = NonZeroU32::new(1)?; + /// let three = NonZeroU32::new(3)?; #[doc = concat!("let a = ", stringify!($Ty), "::new(0b100_0000)?;")] #[doc = concat!("let b = ", stringify!($Ty), "::new(0b100_0011)?;")] /// @@ -336,7 +337,7 @@ macro_rules! nonzero_integer { // SAFETY: // `self` is non-zero, which means it has at least one bit set, which means // that the result of `count_ones` is non-zero. - unsafe { NonZeroU32::new_unchecked(self.get().count_ones()) } + unsafe { NonZero::new_unchecked(self.get().count_ones()) } } nonzero_integer_signedness_dependent_methods! { diff --git a/library/core/src/ops/index_range.rs b/library/core/src/ops/index_range.rs index 743799c4b3edf..07ea2e930d57a 100644 --- a/library/core/src/ops/index_range.rs +++ b/library/core/src/ops/index_range.rs @@ -1,6 +1,6 @@ use crate::intrinsics::{unchecked_add, unchecked_sub}; use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Like a `Range`, but with a safety invariant that `start <= end`. /// @@ -130,9 +130,9 @@ impl Iterator for IndexRange { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_prefix(n); - NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::new(n - taken.len()).map_or(Ok(()), Err) } } @@ -148,9 +148,9 @@ impl DoubleEndedIterator for IndexRange { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_suffix(n); - NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::new(n - taken.len()).map_or(Ok(()), Err) } } diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs index ce176e6fc18f3..d2422bb80ae58 100644 --- a/library/core/src/ptr/alignment.rs +++ b/library/core/src/ptr/alignment.rs @@ -1,5 +1,5 @@ use crate::convert::{TryFrom, TryInto}; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroUsize}; use crate::{cmp, fmt, hash, mem, num}; /// A type storing a `usize` which is a power of two, and thus @@ -100,7 +100,7 @@ impl Alignment { #[inline] pub const fn as_nonzero(self) -> NonZeroUsize { // SAFETY: All the discriminants are non-zero. - unsafe { NonZeroUsize::new_unchecked(self.as_usize()) } + unsafe { NonZero::new_unchecked(self.as_usize()) } } /// Returns the base-2 logarithm of the alignment. diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 320cd5eb3b2ae..16e903439936d 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -6,7 +6,7 @@ use crate::intrinsics::assert_unsafe_precondition; use crate::marker::Unsize; use crate::mem::SizedTypeProperties; use crate::mem::{self, MaybeUninit}; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroUsize}; use crate::ops::{CoerceUnsized, DispatchFromDyn}; use crate::ptr; use crate::ptr::Unique; @@ -295,7 +295,7 @@ impl NonNull { pub fn addr(self) -> NonZeroUsize { // SAFETY: The pointer is guaranteed by the type to be non-null, // meaning that the address will be non-zero. - unsafe { NonZeroUsize::new_unchecked(self.pointer.addr()) } + unsafe { NonZero::new_unchecked(self.pointer.addr()) } } /// Creates a new pointer with the given address. diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index 1429313c89064..617b385a960c4 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -11,7 +11,7 @@ use crate::iter::{ }; use crate::marker::PhantomData; use crate::mem::{self, SizedTypeProperties}; -use crate::num::{NonZero, NonZeroUsize}; +use crate::num::NonZero; use crate::ptr::{self, invalid, invalid_mut, NonNull}; use super::{from_raw_parts, from_raw_parts_mut}; diff --git a/library/core/src/slice/iter/macros.rs b/library/core/src/slice/iter/macros.rs index fc6af45fb9077..7910981d0f5ee 100644 --- a/library/core/src/slice/iter/macros.rs +++ b/library/core/src/slice/iter/macros.rs @@ -196,11 +196,11 @@ macro_rules! iterator { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.post_inc_start(advance) }; - NonZeroUsize::new(n - advance).map_or(Ok(()), Err) + NonZero::new(n - advance).map_or(Ok(()), Err) } #[inline] @@ -421,11 +421,11 @@ macro_rules! iterator { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.pre_dec_end(advance) }; - NonZeroUsize::new(n - advance).map_or(Ok(()), Err) + NonZero::new(n - advance).map_or(Ok(()), Err) } } diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 73e92ed1dad63..1d8ac6aa04394 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -11,7 +11,7 @@ use crate::fmt; use crate::hint; use crate::intrinsics::exact_div; use crate::mem::{self, SizedTypeProperties}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{Bound, OneSidedRange, Range, RangeBounds}; use crate::panic::debug_assert_nounwind; use crate::ptr; @@ -1086,7 +1086,7 @@ impl [T] { #[inline] #[track_caller] pub fn windows(&self, size: usize) -> Windows<'_, T> { - let size = NonZeroUsize::new(size).expect("window size must be non-zero"); + let size = NonZero::new(size).expect("window size must be non-zero"); Windows::new(self, size) } diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index 4d6239e11a399..00b4405faaefb 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -8,7 +8,7 @@ use crate::iter::{TrustedRandomAccess, TrustedRandomAccessNoCoerce}; use crate::ops::Try; use crate::option; use crate::slice::{self, Split as SliceSplit}; -use core::num::NonZeroUsize; +use core::num::{NonZero, NonZeroUsize}; use super::from_utf8_unchecked; use super::pattern::Pattern; @@ -96,7 +96,7 @@ impl<'a> Iterator for Chars<'a> { unsafe { self.iter.advance_by(slurp).unwrap_unchecked() }; } - NonZeroUsize::new(remainder).map_or(Ok(()), Err) + NonZero::new(remainder).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs index ed52de3cbec16..e7773d138c255 100644 --- a/library/core/tests/array.rs +++ b/library/core/tests/array.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; use core::sync::atomic::{AtomicUsize, Ordering}; use core::{array, assert_eq}; @@ -548,7 +548,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 13); let r = it.advance_by(123456); - assert_eq!(r, Err(NonZeroUsize::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -558,7 +558,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 100); let r = it.advance_by(10); - assert_eq!(r, Err(NonZeroUsize::new(10).unwrap())); + assert_eq!(r, Err(NonZero::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } @@ -601,7 +601,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 13); let r = it.advance_back_by(123456); - assert_eq!(r, Err(NonZeroUsize::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -611,7 +611,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 100); let r = it.advance_back_by(10); - assert_eq!(r, Err(NonZeroUsize::new(10).unwrap())); + assert_eq!(r, Err(NonZero::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } diff --git a/library/core/tests/io/borrowed_buf.rs b/library/core/tests/io/borrowed_buf.rs index 69511e49acdbc..a5dd4e525777a 100644 --- a/library/core/tests/io/borrowed_buf.rs +++ b/library/core/tests/io/borrowed_buf.rs @@ -40,9 +40,7 @@ fn advance_filled() { let buf: &mut [_] = &mut [0; 16]; let mut rbuf: BorrowedBuf<'_> = buf.into(); - unsafe { - rbuf.unfilled().advance(1); - } + rbuf.unfilled().advance(1); assert_eq!(rbuf.filled().len(), 1); assert_eq!(rbuf.unfilled().capacity(), 15); @@ -53,9 +51,7 @@ fn clear() { let buf: &mut [_] = &mut [255; 16]; let mut rbuf: BorrowedBuf<'_> = buf.into(); - unsafe { - rbuf.unfilled().advance(16); - } + rbuf.unfilled().advance(16); assert_eq!(rbuf.filled().len(), 16); assert_eq!(rbuf.unfilled().capacity(), 0); @@ -79,9 +75,7 @@ fn set_init() { assert_eq!(rbuf.init_len(), 8); - unsafe { - rbuf.unfilled().advance(4); - } + rbuf.unfilled().advance(4); unsafe { rbuf.set_init(2); @@ -153,9 +147,7 @@ fn cursor_set_init() { assert_eq!(rbuf.unfilled().uninit_mut().len(), 8); assert_eq!(unsafe { rbuf.unfilled().as_mut() }.len(), 16); - unsafe { - rbuf.unfilled().advance(4); - } + rbuf.unfilled().advance(4); unsafe { rbuf.unfilled().set_init(2); diff --git a/library/core/tests/iter/adapters/chain.rs b/library/core/tests/iter/adapters/chain.rs index ad78a85a88dcb..b2429588de12b 100644 --- a/library/core/tests/iter/adapters/chain.rs +++ b/library/core/tests/iter/adapters/chain.rs @@ -1,6 +1,6 @@ use super::*; use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_chain() { @@ -34,7 +34,7 @@ fn test_iterator_chain_advance_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next(), Some(&xs[i])); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (len - i - 1)).unwrap())); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (len - i - 1)).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -42,10 +42,7 @@ fn test_iterator_chain_advance_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_by(xs.len() + i), Ok(())); assert_eq!(iter.next(), Some(&ys[i])); - assert_eq!( - iter.advance_by(100), - Err(NonZeroUsize::new(100 - (ys.len() - i - 1)).unwrap()) - ); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (ys.len() - i - 1)).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -55,7 +52,7 @@ fn test_iterator_chain_advance_by() { assert_eq!(iter.advance_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_by(len + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_by(len + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -74,10 +71,7 @@ fn test_iterator_chain_advance_back_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back(), Some(&ys[ys.len() - i - 1])); - assert_eq!( - iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (len - i - 1)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (len - i - 1)).unwrap())); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -87,7 +81,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.next_back(), Some(&xs[xs.len() - i - 1])); assert_eq!( iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (xs.len() - i - 1)).unwrap()) + Err(NonZero::new(100 - (xs.len() - i - 1)).unwrap()) ); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -98,7 +92,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.advance_back_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_back_by(len + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_back_by(len + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/enumerate.rs b/library/core/tests/iter/adapters/enumerate.rs index ff57973a62a4b..b57d51c077e9b 100644 --- a/library/core/tests/iter/adapters/enumerate.rs +++ b/library/core/tests/iter/adapters/enumerate.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_enumerate() { @@ -66,7 +66,7 @@ fn test_iterator_enumerate_advance_by() { assert_eq!(it.next(), Some((2, &2))); assert_eq!(it.advance_by(2), Ok(())); assert_eq!(it.next(), Some((5, &5))); - assert_eq!(it.advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(it.advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!(it.next(), None); } diff --git a/library/core/tests/iter/adapters/flatten.rs b/library/core/tests/iter/adapters/flatten.rs index f429d90cd7ddd..2af7e0c388a3b 100644 --- a/library/core/tests/iter/adapters/flatten.rs +++ b/library/core/tests/iter/adapters/flatten.rs @@ -1,7 +1,7 @@ use super::*; use core::assert_eq; use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_flatten() { @@ -72,8 +72,8 @@ fn test_flatten_advance_by() { assert_eq!(it.advance_back_by(9), Ok(())); assert_eq!(it.next_back(), Some(25)); - assert_eq!(it.advance_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX - 9).unwrap())); - assert_eq!(it.advance_back_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX).unwrap())); + assert_eq!(it.advance_by(usize::MAX), Err(NonZero::new(usize::MAX - 9).unwrap())); + assert_eq!(it.advance_back_by(usize::MAX), Err(NonZero::new(usize::MAX).unwrap())); assert_eq!(it.advance_by(0), Ok(())); assert_eq!(it.advance_back_by(0), Ok(())); assert_eq!(it.size_hint(), (0, Some(0))); diff --git a/library/core/tests/iter/adapters/skip.rs b/library/core/tests/iter/adapters/skip.rs index e3e88a84fadf6..8d5d06ad9fb3a 100644 --- a/library/core/tests/iter/adapters/skip.rs +++ b/library/core/tests/iter/adapters/skip.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; use super::Unfuse; @@ -75,14 +75,14 @@ fn test_iterator_skip_nth() { #[test] fn test_skip_advance_by() { assert_eq!((0..0).skip(10).advance_by(0), Ok(())); - assert_eq!((0..0).skip(10).advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..0).skip(10).advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!( (0u128..(usize::MAX as u128) + 1).skip(usize::MAX - 10).advance_by(usize::MAX - 5), - Err(NonZeroUsize::new(usize::MAX - 16).unwrap()) + Err(NonZero::new(usize::MAX - 16).unwrap()) ); assert_eq!((0u128..u128::MAX).skip(usize::MAX - 10).advance_by(20), Ok(())); - assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZeroUsize::new(9).unwrap())); + assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZero::new(9).unwrap())); assert_eq!((0..0).skip(1).advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/take.rs b/library/core/tests/iter/adapters/take.rs index ff6e362b065c6..39afa2cbfcaf2 100644 --- a/library/core/tests/iter/adapters/take.rs +++ b/library/core/tests/iter/adapters/take.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_take() { @@ -79,23 +79,23 @@ fn test_take_advance_by() { let mut take = (0..10).take(3); assert_eq!(take.advance_by(2), Ok(())); assert_eq!(take.next(), Some(2)); - assert_eq!(take.advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(take.advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!((0..0).take(10).advance_by(0), Ok(())); - assert_eq!((0..0).take(10).advance_by(1), Err(NonZeroUsize::new(1).unwrap())); - assert_eq!((0..10).take(4).advance_by(5), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..0).take(10).advance_by(1), Err(NonZero::new(1).unwrap())); + assert_eq!((0..10).take(4).advance_by(5), Err(NonZero::new(1).unwrap())); let mut take = (0..10).take(3); assert_eq!(take.advance_back_by(2), Ok(())); assert_eq!(take.next(), Some(0)); - assert_eq!(take.advance_back_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(take.advance_back_by(1), Err(NonZero::new(1).unwrap())); - assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZeroUsize::new(9).unwrap())); - assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZero::new(9).unwrap())); + assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZero::new(1).unwrap())); assert_eq!((0..0).take(1).advance_back_by(0), Ok(())); assert_eq!( (0..usize::MAX).take(100).advance_back_by(usize::MAX), - Err(NonZeroUsize::new(usize::MAX - 100).unwrap()) + Err(NonZero::new(usize::MAX - 100).unwrap()) ); } diff --git a/library/core/tests/iter/range.rs b/library/core/tests/iter/range.rs index a6b9f1cb7c889..9af07119a89a2 100644 --- a/library/core/tests/iter/range.rs +++ b/library/core/tests/iter/range.rs @@ -1,6 +1,6 @@ use super::*; use core::ascii::Char as AsciiChar; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_range() { @@ -314,7 +314,7 @@ fn test_range_advance_by() { assert_eq!((r.start, r.end), (1, usize::MAX - 1)); - assert_eq!(Err(NonZeroUsize::new(2).unwrap()), r.advance_by(usize::MAX)); + assert_eq!(Err(NonZero::new(2).unwrap()), r.advance_by(usize::MAX)); assert_eq!(Ok(()), r.advance_by(0)); assert_eq!(Ok(()), r.advance_back_by(0)); diff --git a/library/core/tests/iter/traits/iterator.rs b/library/core/tests/iter/traits/iterator.rs index 4c2d843eaa0dc..93ef9c0812b16 100644 --- a/library/core/tests/iter/traits/iterator.rs +++ b/library/core/tests/iter/traits/iterator.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; /// A wrapper struct that implements `Eq` and `Ord` based on the wrapped /// integer modulo 3. Used to test that `Iterator::max` and `Iterator::min` @@ -152,11 +152,11 @@ fn test_iterator_advance_by() { let mut iter = v.iter(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[i]); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap())); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -167,14 +167,11 @@ fn test_iterator_advance_back_by() { let mut iter = v.iter(); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back().unwrap(), &v[v.len() - 1 - i]); - assert_eq!( - iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().advance_back_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_back_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_back_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -185,14 +182,11 @@ fn test_iterator_rev_advance_back_by() { let mut iter = v.iter().rev(); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back().unwrap(), &v[i]); - assert_eq!( - iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().rev().advance_back_by(v.len()), Ok(())); - assert_eq!(v.iter().rev().advance_back_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().rev().advance_back_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -460,11 +454,11 @@ fn test_iterator_rev_advance_by() { let mut iter = v.iter().rev(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[v.len() - 1 - i]); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap())); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().rev().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().rev().advance_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().rev().advance_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 2fe79650dbfd4..fa0e9a979d060 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -40,6 +40,7 @@ #![feature(float_minimum_maximum)] #![feature(future_join)] #![feature(generic_assert_internals)] +#![feature(generic_nonzero)] #![feature(array_try_from_fn)] #![feature(hasher_prefixfree_extras)] #![feature(hashmap_internals)] diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs index 20498b16cb22b..0f7fde747690a 100644 --- a/library/core/tests/mem.rs +++ b/library/core/tests/mem.rs @@ -205,7 +205,7 @@ fn uninit_write_slice() { let mut dst = [MaybeUninit::new(255); 64]; let src = [0; 64]; - assert_eq!(MaybeUninit::write_slice(&mut dst, &src), &src); + assert_eq!(MaybeUninit::copy_from_slice(&mut dst, &src), &src); } #[test] @@ -214,7 +214,7 @@ fn uninit_write_slice_panic_lt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 32]; - MaybeUninit::write_slice(&mut dst, &src); + MaybeUninit::copy_from_slice(&mut dst, &src); } #[test] @@ -223,7 +223,7 @@ fn uninit_write_slice_panic_gt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 128]; - MaybeUninit::write_slice(&mut dst, &src); + MaybeUninit::copy_from_slice(&mut dst, &src); } #[test] @@ -231,7 +231,7 @@ fn uninit_clone_from_slice() { let mut dst = [MaybeUninit::new(255); 64]; let src = [0; 64]; - assert_eq!(MaybeUninit::write_slice_cloned(&mut dst, &src), &src); + assert_eq!(MaybeUninit::clone_from_slice(&mut dst, &src), &src); } #[test] @@ -240,7 +240,7 @@ fn uninit_write_slice_cloned_panic_lt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 32]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); } #[test] @@ -249,7 +249,7 @@ fn uninit_write_slice_cloned_panic_gt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 128]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); } #[test] @@ -290,7 +290,7 @@ fn uninit_write_slice_cloned_mid_panic() { ]; let err = panic::catch_unwind(panic::AssertUnwindSafe(|| { - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); })); drop(src); @@ -322,7 +322,7 @@ fn uninit_write_slice_cloned_no_drop() { let mut dst = [MaybeUninit::uninit()]; let src = [Bomb]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); forget(src); } diff --git a/library/core/tests/nonzero.rs b/library/core/tests/nonzero.rs index 8873d26880ced..d728513a4e297 100644 --- a/library/core/tests/nonzero.rs +++ b/library/core/tests/nonzero.rs @@ -1,32 +1,29 @@ -use core::num::{ - IntErrorKind, NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, - NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, -}; +use core::num::{IntErrorKind, NonZero}; use core::option::Option::None; use std::mem::size_of; #[test] fn test_create_nonzero_instance() { - let _a = unsafe { NonZeroU32::new_unchecked(21) }; + let _a = unsafe { NonZero::new_unchecked(21) }; } #[test] fn test_size_nonzero_in_option() { - assert_eq!(size_of::(), size_of::>()); - assert_eq!(size_of::(), size_of::>()); + assert_eq!(size_of::>(), size_of::>>()); + assert_eq!(size_of::>(), size_of::>>()); } #[test] fn test_match_on_nonzero_option() { - let a = Some(unsafe { NonZeroU32::new_unchecked(42) }); + let a = Some(unsafe { NonZero::::new_unchecked(42) }); match a { Some(val) => assert_eq!(val.get(), 42), - None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), + None => panic!("unexpected None while matching on Some(NonZero(_))"), } - match unsafe { Some(NonZeroU32::new_unchecked(43)) } { + match unsafe { Some(NonZero::::new_unchecked(43)) } { Some(val) => assert_eq!(val.get(), 43), - None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), + None => panic!("unexpected None while matching on Some(NonZero(_))"), } } @@ -89,13 +86,14 @@ fn test_match_option_string() { } mod atom { - use core::num::NonZeroU32; + use core::num::NonZero; #[derive(PartialEq, Eq)] pub struct Atom { - index: NonZeroU32, // private + index: NonZero, // private } - pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZeroU32::new_unchecked(7) } }; + + pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZero::new_unchecked(7) } }; } macro_rules! atom { @@ -115,62 +113,65 @@ fn test_match_nonzero_const_pattern() { #[test] fn test_from_nonzero() { - let nz = NonZeroU32::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let num: u32 = nz.into(); assert_eq!(num, 1u32); } #[test] fn test_from_signed_nonzero() { - let nz = NonZeroI32::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let num: i32 = nz.into(); assert_eq!(num, 1i32); } #[test] fn test_from_str() { - assert_eq!("123".parse::(), Ok(NonZeroU8::new(123).unwrap())); - assert_eq!("0".parse::().err().map(|e| e.kind().clone()), Some(IntErrorKind::Zero)); + assert_eq!("123".parse::>(), Ok(NonZero::new(123).unwrap())); + assert_eq!( + "0".parse::>().err().map(|e| e.kind().clone()), + Some(IntErrorKind::Zero) + ); assert_eq!( - "-1".parse::().err().map(|e| e.kind().clone()), + "-1".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::InvalidDigit) ); assert_eq!( - "-129".parse::().err().map(|e| e.kind().clone()), + "-129".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::NegOverflow) ); assert_eq!( - "257".parse::().err().map(|e| e.kind().clone()), + "257".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::PosOverflow) ); } #[test] fn test_nonzero_bitor() { - let nz_alt = NonZeroU8::new(0b1010_1010).unwrap(); - let nz_low = NonZeroU8::new(0b0000_1111).unwrap(); + let nz_alt = NonZero::new(0b1010_1010).unwrap(); + let nz_low = NonZero::new(0b0000_1111).unwrap(); - let both_nz: NonZeroU8 = nz_alt | nz_low; + let both_nz: NonZero = nz_alt | nz_low; assert_eq!(both_nz.get(), 0b1010_1111); - let rhs_int: NonZeroU8 = nz_low | 0b1100_0000u8; + let rhs_int: NonZero = nz_low | 0b1100_0000u8; assert_eq!(rhs_int.get(), 0b1100_1111); - let rhs_zero: NonZeroU8 = nz_alt | 0u8; + let rhs_zero: NonZero = nz_alt | 0u8; assert_eq!(rhs_zero.get(), 0b1010_1010); - let lhs_int: NonZeroU8 = 0b0110_0110u8 | nz_alt; + let lhs_int: NonZero = 0b0110_0110u8 | nz_alt; assert_eq!(lhs_int.get(), 0b1110_1110); - let lhs_zero: NonZeroU8 = 0u8 | nz_low; + let lhs_zero: NonZero = 0u8 | nz_low; assert_eq!(lhs_zero.get(), 0b0000_1111); } #[test] fn test_nonzero_bitor_assign() { - let mut target = NonZeroU8::new(0b1010_1010).unwrap(); + let mut target = NonZero::::new(0b1010_1010).unwrap(); - target |= NonZeroU8::new(0b0000_1111).unwrap(); + target |= NonZero::new(0b0000_1111).unwrap(); assert_eq!(target.get(), 0b1010_1111); target |= 0b0001_0000; @@ -182,147 +183,147 @@ fn test_nonzero_bitor_assign() { #[test] fn test_nonzero_from_int_on_success() { - assert_eq!(NonZeroU8::try_from(5), Ok(NonZeroU8::new(5).unwrap())); - assert_eq!(NonZeroU32::try_from(5), Ok(NonZeroU32::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::new(5).unwrap())); - assert_eq!(NonZeroI8::try_from(-5), Ok(NonZeroI8::new(-5).unwrap())); - assert_eq!(NonZeroI32::try_from(-5), Ok(NonZeroI32::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::new(-5).unwrap())); } #[test] fn test_nonzero_from_int_on_err() { - assert!(NonZeroU8::try_from(0).is_err()); - assert!(NonZeroU32::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); - assert!(NonZeroI8::try_from(0).is_err()); - assert!(NonZeroI32::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); } #[test] fn nonzero_const() { // test that the methods of `NonZeroX>` are usable in a const context - // Note: only tests NonZero8 + // Note: only tests NonZero - const NONZERO_U8: NonZeroU8 = unsafe { NonZeroU8::new_unchecked(5) }; + const NONZERO_U8: NonZero = unsafe { NonZero::new_unchecked(5) }; const GET: u8 = NONZERO_U8.get(); assert_eq!(GET, 5); - const ZERO: Option = NonZeroU8::new(0); + const ZERO: Option> = NonZero::new(0); assert!(ZERO.is_none()); - const ONE: Option = NonZeroU8::new(1); + const ONE: Option> = NonZero::new(1); assert!(ONE.is_some()); /* FIXME(#110395) const FROM_NONZERO_U8: u8 = u8::from(NONZERO_U8); assert_eq!(FROM_NONZERO_U8, 5); - const NONZERO_CONVERT: NonZeroU32 = NonZeroU32::from(NONZERO_U8); + const NONZERO_CONVERT: NonZero = NonZero::::from(NONZERO_U8); assert_eq!(NONZERO_CONVERT.get(), 5); */ } #[test] fn nonzero_leading_zeros() { - assert_eq!(NonZeroU8::new(1).unwrap().leading_zeros(), 7); - assert_eq!(NonZeroI8::new(1).unwrap().leading_zeros(), 7); - assert_eq!(NonZeroU16::new(1).unwrap().leading_zeros(), 15); - assert_eq!(NonZeroI16::new(1).unwrap().leading_zeros(), 15); - assert_eq!(NonZeroU32::new(1).unwrap().leading_zeros(), 31); - assert_eq!(NonZeroI32::new(1).unwrap().leading_zeros(), 31); - assert_eq!(NonZeroU64::new(1).unwrap().leading_zeros(), 63); - assert_eq!(NonZeroI64::new(1).unwrap().leading_zeros(), 63); - assert_eq!(NonZeroU128::new(1).unwrap().leading_zeros(), 127); - assert_eq!(NonZeroI128::new(1).unwrap().leading_zeros(), 127); - assert_eq!(NonZeroUsize::new(1).unwrap().leading_zeros(), usize::BITS - 1); - assert_eq!(NonZeroIsize::new(1).unwrap().leading_zeros(), usize::BITS - 1); - - assert_eq!(NonZeroU8::new(u8::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI8::new((u8::MAX >> 2) as i8).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU16::new(u16::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI16::new((u16::MAX >> 2) as i16).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU32::new(u32::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI32::new((u32::MAX >> 2) as i32).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU64::new(u64::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI64::new((u64::MAX >> 2) as i64).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU128::new(u128::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI128::new((u128::MAX >> 2) as i128).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroUsize::new(usize::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroIsize::new((usize::MAX >> 2) as isize).unwrap().leading_zeros(), 2); - - assert_eq!(NonZeroU8::new(u8::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI8::new(-1i8).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU16::new(u16::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI16::new(-1i16).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU32::new(u32::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI32::new(-1i32).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU64::new(u64::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI64::new(-1i64).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU128::new(u128::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI128::new(-1i128).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroUsize::new(usize::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroIsize::new(-1isize).unwrap().leading_zeros(), 0); - - const LEADING_ZEROS: u32 = NonZeroU16::new(1).unwrap().leading_zeros(); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 7); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 7); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 15); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 15); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 31); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 31); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 63); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 63); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), usize::BITS - 1); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), usize::BITS - 1); + + assert_eq!(NonZero::::new(u8::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u8::MAX >> 2) as i8).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u16::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u16::MAX >> 2) as i16).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u32::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u32::MAX >> 2) as i32).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u64::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u64::MAX >> 2) as i64).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u128::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u128::MAX >> 2) as i128).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(usize::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((usize::MAX >> 2) as isize).unwrap().leading_zeros(), 2); + + assert_eq!(NonZero::::new(u8::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i8).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u16::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i16).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u32::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i32).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u64::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i64).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u128::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i128).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(usize::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1isize).unwrap().leading_zeros(), 0); + + const LEADING_ZEROS: u32 = NonZero::::new(1).unwrap().leading_zeros(); assert_eq!(LEADING_ZEROS, 15); } #[test] fn nonzero_trailing_zeros() { - assert_eq!(NonZeroU8::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI8::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU16::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI16::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU32::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI32::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU64::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI64::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU128::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI128::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroUsize::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroIsize::new(1).unwrap().trailing_zeros(), 0); - - assert_eq!(NonZeroU8::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI8::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU16::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI16::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU32::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI32::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU64::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI64::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU128::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI128::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroUsize::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroIsize::new(1 << 2).unwrap().trailing_zeros(), 2); - - assert_eq!(NonZeroU8::new(1 << 7).unwrap().trailing_zeros(), 7); - assert_eq!(NonZeroI8::new(1 << 7).unwrap().trailing_zeros(), 7); - assert_eq!(NonZeroU16::new(1 << 15).unwrap().trailing_zeros(), 15); - assert_eq!(NonZeroI16::new(1 << 15).unwrap().trailing_zeros(), 15); - assert_eq!(NonZeroU32::new(1 << 31).unwrap().trailing_zeros(), 31); - assert_eq!(NonZeroI32::new(1 << 31).unwrap().trailing_zeros(), 31); - assert_eq!(NonZeroU64::new(1 << 63).unwrap().trailing_zeros(), 63); - assert_eq!(NonZeroI64::new(1 << 63).unwrap().trailing_zeros(), 63); - assert_eq!(NonZeroU128::new(1 << 127).unwrap().trailing_zeros(), 127); - assert_eq!(NonZeroI128::new(1 << 127).unwrap().trailing_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + + assert_eq!(NonZero::::new(1 << 7).unwrap().trailing_zeros(), 7); + assert_eq!(NonZero::::new(1 << 7).unwrap().trailing_zeros(), 7); + assert_eq!(NonZero::::new(1 << 15).unwrap().trailing_zeros(), 15); + assert_eq!(NonZero::::new(1 << 15).unwrap().trailing_zeros(), 15); + assert_eq!(NonZero::::new(1 << 31).unwrap().trailing_zeros(), 31); + assert_eq!(NonZero::::new(1 << 31).unwrap().trailing_zeros(), 31); + assert_eq!(NonZero::::new(1 << 63).unwrap().trailing_zeros(), 63); + assert_eq!(NonZero::::new(1 << 63).unwrap().trailing_zeros(), 63); + assert_eq!(NonZero::::new(1 << 127).unwrap().trailing_zeros(), 127); + assert_eq!(NonZero::::new(1 << 127).unwrap().trailing_zeros(), 127); assert_eq!( - NonZeroUsize::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), + NonZero::::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), usize::BITS - 1 ); assert_eq!( - NonZeroIsize::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), + NonZero::::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), usize::BITS - 1 ); - const TRAILING_ZEROS: u32 = NonZeroU16::new(1 << 2).unwrap().trailing_zeros(); + const TRAILING_ZEROS: u32 = NonZero::::new(1 << 2).unwrap().trailing_zeros(); assert_eq!(TRAILING_ZEROS, 2); } #[test] fn test_nonzero_uint_div() { - let nz = NonZeroU32::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let x: u32 = 42u32 / nz; assert_eq!(x, 42u32); @@ -330,7 +331,7 @@ fn test_nonzero_uint_div() { #[test] fn test_nonzero_uint_rem() { - let nz = NonZeroU32::new(10).unwrap(); + let nz = NonZero::new(10).unwrap(); let x: u32 = 42u32 % nz; assert_eq!(x, 2u32); @@ -338,18 +339,18 @@ fn test_nonzero_uint_rem() { #[test] fn test_signed_nonzero_neg() { - assert_eq!((-NonZeroI8::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI8::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI16::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI16::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI32::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI32::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI64::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI64::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI128::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI128::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); } diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index b68f2a50b3211..b3f7dfa1fb9c7 100644 --- a/library/core/tests/ptr.rs +++ b/library/core/tests/ptr.rs @@ -1,6 +1,6 @@ use core::cell::RefCell; use core::mem::{self, MaybeUninit}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr; use core::ptr::*; use std::fmt::{Debug, Display}; @@ -1050,9 +1050,8 @@ fn nonnull_tagged_pointer_with_provenance() { /// memory location. pub fn pointer(self) -> NonNull { // SAFETY: The `addr` guaranteed to have bits set in the Self::ADDRESS_MASK, so the result will be non-null. - self.0.map_addr(|addr| unsafe { - NonZeroUsize::new_unchecked(addr.get() & Self::ADDRESS_MASK) - }) + self.0 + .map_addr(|addr| unsafe { NonZero::new_unchecked(addr.get() & Self::ADDRESS_MASK) }) } /// Consume this tagged pointer and produce the data it carries. @@ -1073,7 +1072,7 @@ fn nonnull_tagged_pointer_with_provenance() { // ADDRESS_MASK) will always be non-zero. This a property of the type and its // construction. self.0 = self.0.map_addr(|addr| unsafe { - NonZeroUsize::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) + NonZero::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) }) } } diff --git a/library/core/tests/result.rs b/library/core/tests/result.rs index 50926da3ce799..6c008ab2cb196 100644 --- a/library/core/tests/result.rs +++ b/library/core/tests/result.rs @@ -406,13 +406,14 @@ fn result_opt_conversions() { #[test] fn result_try_trait_v2_branch() { - use core::num::NonZeroU32; + use core::num::NonZero; use core::ops::{ControlFlow::*, Try}; + assert_eq!(Ok::(4).branch(), Continue(4)); assert_eq!(Err::(4).branch(), Break(Err(4))); - let one = NonZeroU32::new(1).unwrap(); - assert_eq!(Ok::<(), NonZeroU32>(()).branch(), Continue(())); - assert_eq!(Err::<(), NonZeroU32>(one).branch(), Break(Err(one))); - assert_eq!(Ok::(one).branch(), Continue(one)); - assert_eq!(Err::(()).branch(), Break(Err(()))); + let one = NonZero::new(1).unwrap(); + assert_eq!(Ok::<(), NonZero>(()).branch(), Continue(())); + assert_eq!(Err::<(), NonZero>(one).branch(), Break(Err(one))); + assert_eq!(Ok::, ()>(one).branch(), Continue(one)); + assert_eq!(Err::, ()>(()).branch(), Break(Err(()))); } diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index bcf7b5e59775a..c5743eda3e802 100644 --- a/library/core/tests/slice.rs +++ b/library/core/tests/slice.rs @@ -1,7 +1,7 @@ use core::cell::Cell; use core::cmp::Ordering; use core::mem::MaybeUninit; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::slice; #[test] @@ -147,7 +147,7 @@ fn test_iterator_advance_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_by(v.len() + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_by(v.len() + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); @@ -169,7 +169,7 @@ fn test_iterator_advance_back_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); diff --git a/library/proc_macro/src/bridge/arena.rs b/library/proc_macro/src/bridge/arena.rs index c2b046ae41ebf..f81f2152cd046 100644 --- a/library/proc_macro/src/bridge/arena.rs +++ b/library/proc_macro/src/bridge/arena.rs @@ -105,7 +105,7 @@ impl Arena { #[allow(clippy::mut_from_ref)] // arena allocator pub(crate) fn alloc_str<'a>(&'a self, string: &str) -> &'a mut str { let alloc = self.alloc_raw(string.len()); - let bytes = MaybeUninit::write_slice(alloc, string.as_bytes()); + let bytes = MaybeUninit::copy_from_slice(alloc, string.as_bytes()); // SAFETY: we convert from `&str` to `&[u8]`, clone it into the arena, // and immediately convert the clone back to `&str`. diff --git a/library/proc_macro/src/bridge/handle.rs b/library/proc_macro/src/bridge/handle.rs index b3a763069974f..894acae217e44 100644 --- a/library/proc_macro/src/bridge/handle.rs +++ b/library/proc_macro/src/bridge/handle.rs @@ -2,13 +2,13 @@ use std::collections::BTreeMap; use std::hash::Hash; -use std::num::NonZeroU32; +use std::num::NonZero; use std::ops::{Index, IndexMut}; use std::sync::atomic::{AtomicU32, Ordering}; use super::fxhash::FxHashMap; -pub(super) type Handle = NonZeroU32; +pub(super) type Handle = NonZero; /// A store that associates values of type `T` with numeric handles. A value can /// be looked up using its handle. @@ -20,7 +20,7 @@ pub(super) struct OwnedStore { impl OwnedStore { pub(super) fn new(counter: &'static AtomicU32) -> Self { // Ensure the handle counter isn't 0, which would panic later, - // when `NonZeroU32::new` (aka `Handle::new`) is called in `alloc`. + // when `NonZero::new` (aka `Handle::new`) is called in `alloc`. assert_ne!(counter.load(Ordering::SeqCst), 0); OwnedStore { counter, data: BTreeMap::new() } diff --git a/library/proc_macro/src/bridge/rpc.rs b/library/proc_macro/src/bridge/rpc.rs index 5b1bfb30983b2..6d75a5a627c82 100644 --- a/library/proc_macro/src/bridge/rpc.rs +++ b/library/proc_macro/src/bridge/rpc.rs @@ -2,7 +2,7 @@ use std::any::Any; use std::io::Write; -use std::num::NonZeroU32; +use std::num::NonZero; use std::str; pub(super) type Writer = super::buffer::Buffer; @@ -157,13 +157,13 @@ impl DecodeMut<'_, '_, S> for char { } } -impl Encode for NonZeroU32 { +impl Encode for NonZero { fn encode(self, w: &mut Writer, s: &mut S) { self.get().encode(w, s); } } -impl DecodeMut<'_, '_, S> for NonZeroU32 { +impl DecodeMut<'_, '_, S> for NonZero { fn decode(r: &mut Reader<'_>, s: &mut S) -> Self { Self::new(u32::decode(r, s)).unwrap() } diff --git a/library/proc_macro/src/bridge/symbol.rs b/library/proc_macro/src/bridge/symbol.rs index 930c111455df0..712f6b4545828 100644 --- a/library/proc_macro/src/bridge/symbol.rs +++ b/library/proc_macro/src/bridge/symbol.rs @@ -10,14 +10,14 @@ //! proc_macro, this module should probably be removed or simplified. use std::cell::RefCell; -use std::num::NonZeroU32; +use std::num::NonZero; use std::str; use super::*; /// Handle for a symbol string stored within the Interner. #[derive(Copy, Clone, PartialEq, Eq, Hash)] -pub struct Symbol(NonZeroU32); +pub struct Symbol(NonZero); impl !Send for Symbol {} impl !Sync for Symbol {} @@ -137,7 +137,7 @@ thread_local! { names: fxhash::FxHashMap::default(), strings: Vec::new(), // Start with a base of 1 to make sure that `NonZeroU32` works. - sym_base: NonZeroU32::new(1).unwrap(), + sym_base: NonZero::new(1).unwrap(), }); } @@ -152,7 +152,7 @@ struct Interner { // The offset to apply to symbol names stored in the interner. This is used // to ensure that symbol names are not re-used after the interner is // cleared. - sym_base: NonZeroU32, + sym_base: NonZero, } impl Interner { diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 7c49294171320..d05458a6944ac 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -26,6 +26,7 @@ #![feature(staged_api)] #![feature(allow_internal_unstable)] #![feature(decl_macro)] +#![feature(generic_nonzero)] #![feature(maybe_uninit_write_slice)] #![feature(negative_impls)] #![feature(new_uninit)] diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 3383a8cfa41ef..db8de1b1e3de1 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -776,14 +776,14 @@ impl Read for &File { // Reserves space in the buffer based on the file size when available. fn read_to_end(&mut self, buf: &mut Vec) -> io::Result { let size = buffer_capacity_required(self); - buf.try_reserve_exact(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; + buf.try_reserve(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; io::default_read_to_end(self, buf, size) } // Reserves space in the buffer based on the file size when available. fn read_to_string(&mut self, buf: &mut String) -> io::Result { let size = buffer_capacity_required(self); - buf.try_reserve_exact(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; + buf.try_reserve(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; io::default_read_to_string(self, buf, size) } } diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index a238e74ed95cf..f842a0b6d554e 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -578,15 +578,7 @@ where F: FnOnce(&mut [u8]) -> Result, { let n = read(cursor.ensure_init().init_mut())?; - assert!( - n <= cursor.capacity(), - "read should not return more bytes than there is capacity for in the read buffer" - ); - unsafe { - // SAFETY: we initialised using `ensure_init` so there is no uninit data to advance to - // and we have checked that the read amount is not over capacity (see #120603) - cursor.advance(n); - } + cursor.advance(n); Ok(()) } @@ -2915,7 +2907,7 @@ impl Read for Take { unsafe { // SAFETY: filled bytes have been filled and therefore initialized - buf.advance(filled); + buf.advance_unchecked(filled); // SAFETY: new_init bytes of buf's unfilled buffer have been initialized buf.set_init(new_init); } diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs index 33e9d8efed511..fd7e51688cdeb 100644 --- a/library/std/src/io/tests.rs +++ b/library/std/src/io/tests.rs @@ -655,7 +655,7 @@ fn bench_take_read_buf(b: &mut test::Bencher) { // Issue #120603 #[test] -#[should_panic = "read should not return more bytes than there is capacity for in the read buffer"] +#[should_panic] fn read_buf_broken_read() { struct MalformedRead; diff --git a/library/std/src/io/util.rs b/library/std/src/io/util.rs index a04bc4811460b..16eaed15e720c 100644 --- a/library/std/src/io/util.rs +++ b/library/std/src/io/util.rs @@ -198,7 +198,7 @@ impl Read for Repeat { // SAFETY: the entire unfilled portion of buf has been initialized unsafe { - buf.advance(remaining); + buf.advance_unchecked(remaining); } Ok(()) diff --git a/library/std/src/sys/pal/hermit/net.rs b/library/std/src/sys/pal/hermit/net.rs index 3cf63fccf2e71..871a2ccdfa49c 100644 --- a/library/std/src/sys/pal/hermit/net.rs +++ b/library/std/src/sys/pal/hermit/net.rs @@ -156,7 +156,7 @@ impl Socket { ) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/hermit/thread.rs b/library/std/src/sys/pal/hermit/thread.rs index 3384906a15e3b..fee80c02d4a6f 100644 --- a/library/std/src/sys/pal/hermit/thread.rs +++ b/library/std/src/sys/pal/hermit/thread.rs @@ -5,7 +5,7 @@ use super::thread_local_dtor::run_dtors; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::time::Duration; @@ -97,8 +97,8 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { - unsafe { Ok(NonZeroUsize::new_unchecked(abi::get_processor_count())) } +pub fn available_parallelism() -> io::Result> { + unsafe { Ok(NonZero::new_unchecked(abi::get_processor_count())) } } pub mod guard { diff --git a/library/std/src/sys/pal/itron/thread.rs b/library/std/src/sys/pal/itron/thread.rs index ae0f718535b26..9c1387bf4083a 100644 --- a/library/std/src/sys/pal/itron/thread.rs +++ b/library/std/src/sys/pal/itron/thread.rs @@ -11,6 +11,7 @@ use crate::{ ffi::CStr, hint, io, mem::ManuallyDrop, + num::NonZero, ptr::NonNull, sync::atomic::{AtomicUsize, Ordering}, sys::thread_local_dtor::run_dtors, @@ -363,6 +364,6 @@ unsafe fn terminate_and_delete_current_task() -> ! { unsafe { crate::hint::unreachable_unchecked() }; } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { super::unsupported() } diff --git a/library/std/src/sys/pal/sgx/abi/tls/mod.rs b/library/std/src/sys/pal/sgx/abi/tls/mod.rs index 09c4ab3d3e901..6762a43b483a4 100644 --- a/library/std/src/sys/pal/sgx/abi/tls/mod.rs +++ b/library/std/src/sys/pal/sgx/abi/tls/mod.rs @@ -3,7 +3,7 @@ mod sync_bitset; use self::sync_bitset::*; use crate::cell::Cell; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sync::atomic::{AtomicUsize, Ordering}; @@ -30,7 +30,7 @@ extern "C" { #[derive(Copy, Clone)] #[repr(C)] -pub struct Key(NonZeroUsize); +pub struct Key(NonZero); impl Key { fn to_index(self) -> usize { @@ -38,7 +38,7 @@ impl Key { } fn from_index(index: usize) -> Self { - Key(NonZeroUsize::new(index + 1).unwrap()) + Key(NonZero::new(index + 1).unwrap()) } pub fn as_usize(self) -> usize { @@ -46,7 +46,7 @@ impl Key { } pub fn from_usize(index: usize) -> Self { - Key(NonZeroUsize::new(index).unwrap()) + Key(NonZero::new(index).unwrap()) } } diff --git a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs index 10c1456d4fd05..943b771498f8f 100644 --- a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs +++ b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs @@ -3,14 +3,15 @@ #[unstable(feature = "sgx_platform", issue = "56975")] pub use fortanix_sgx_abi::*; -use crate::num::NonZeroU64; +use crate::num::NonZero; use crate::ptr::NonNull; #[repr(C)] struct UsercallReturn(u64, u64); extern "C" { - fn usercall(nr: NonZeroU64, p1: u64, p2: u64, abort: u64, p3: u64, p4: u64) -> UsercallReturn; + fn usercall(nr: NonZero, p1: u64, p2: u64, abort: u64, p3: u64, p4: u64) + -> UsercallReturn; } /// Performs the raw usercall operation as defined in the ABI calling convention. @@ -26,7 +27,7 @@ extern "C" { #[unstable(feature = "sgx_platform", issue = "56975")] #[inline] pub unsafe fn do_usercall( - nr: NonZeroU64, + nr: NonZero, p1: u64, p2: u64, p3: u64, @@ -194,7 +195,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3, $n4: $t4) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -210,7 +211,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -226,7 +227,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), 0,0, @@ -241,7 +242,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), 0,0,0, return_type_is_abort!($r) @@ -255,7 +256,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f() -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), 0,0,0,0, return_type_is_abort!($r) ) }) diff --git a/library/std/src/sys/pal/sgx/rwlock.rs b/library/std/src/sys/pal/sgx/rwlock.rs index d89de18ca5ff8..ebae1cff0ee17 100644 --- a/library/std/src/sys/pal/sgx/rwlock.rs +++ b/library/std/src/sys/pal/sgx/rwlock.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys_common::lazy_box::{LazyBox, LazyInit}; use super::waitqueue::{ @@ -10,7 +10,7 @@ use super::waitqueue::{ use crate::alloc::Layout; struct AllocatedRwLock { - readers: SpinMutex>>, + readers: SpinMutex>>>, writer: SpinMutex>, } @@ -53,8 +53,7 @@ impl RwLock { // Another thread has passed the lock to us } else { // No waiting writers, acquire the read lock - *rguard.lock_var_mut() = - NonZeroUsize::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); } } @@ -68,8 +67,7 @@ impl RwLock { false } else { // No waiting writers, acquire the read lock - *rguard.lock_var_mut() = - NonZeroUsize::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); true } } @@ -108,10 +106,10 @@ impl RwLock { #[inline] unsafe fn __read_unlock( &self, - mut rguard: SpinMutexGuard<'_, WaitVariable>>, + mut rguard: SpinMutexGuard<'_, WaitVariable>>>, wguard: SpinMutexGuard<'_, WaitVariable>, ) { - *rguard.lock_var_mut() = NonZeroUsize::new(rguard.lock_var().unwrap().get() - 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().unwrap().get() - 1); if rguard.lock_var().is_some() { // There are other active readers } else { @@ -137,7 +135,7 @@ impl RwLock { #[inline] unsafe fn __write_unlock( &self, - rguard: SpinMutexGuard<'_, WaitVariable>>, + rguard: SpinMutexGuard<'_, WaitVariable>>>, wguard: SpinMutexGuard<'_, WaitVariable>, ) { match WaitQueue::notify_one(wguard) { diff --git a/library/std/src/sys/pal/sgx/thread.rs b/library/std/src/sys/pal/sgx/thread.rs index 7ac9d1d64b420..c797fde7fbdca 100644 --- a/library/std/src/sys/pal/sgx/thread.rs +++ b/library/std/src/sys/pal/sgx/thread.rs @@ -2,7 +2,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::time::Duration; use super::abi::usercalls; @@ -142,7 +142,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/sgx/waitqueue/mod.rs b/library/std/src/sys/pal/sgx/waitqueue/mod.rs index 25eca61d67b66..2d952b7ebbca3 100644 --- a/library/std/src/sys/pal/sgx/waitqueue/mod.rs +++ b/library/std/src/sys/pal/sgx/waitqueue/mod.rs @@ -16,7 +16,7 @@ mod tests; mod spin_mutex; mod unsafe_list; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{Deref, DerefMut}; use crate::panic::{self, AssertUnwindSafe}; use crate::time::Duration; @@ -68,7 +68,7 @@ impl WaitVariable { #[derive(Copy, Clone)] pub enum NotifiedTcs { Single(Tcs), - All { count: NonZeroUsize }, + All { count: NonZero }, } /// An RAII guard that will notify a set of target threads as well as unlock @@ -252,7 +252,7 @@ impl WaitQueue { entry_guard.wake = true; } - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::new(count) { Ok(WaitGuard { mutex_guard: Some(guard), notified_tcs: NotifiedTcs::All { count } }) } else { Err(guard) diff --git a/library/std/src/sys/pal/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs index 6c66b93a3e1a3..a6c1336109ad7 100644 --- a/library/std/src/sys/pal/solid/fs.rs +++ b/library/std/src/sys/pal/solid/fs.rs @@ -388,7 +388,7 @@ impl File { // Safety: `num_bytes_read` bytes were written to the unfilled // portion of the buffer - cursor.advance(num_bytes_read); + cursor.advance_unchecked(num_bytes_read); Ok(()) } diff --git a/library/std/src/sys/pal/solid/net.rs b/library/std/src/sys/pal/solid/net.rs index 1c310648a3db5..6ea874e509e20 100644 --- a/library/std/src/sys/pal/solid/net.rs +++ b/library/std/src/sys/pal/solid/net.rs @@ -209,7 +209,7 @@ impl Socket { netc::recv(self.as_raw_fd(), buf.as_mut().as_mut_ptr().cast(), buf.capacity(), flags) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/teeos/thread.rs b/library/std/src/sys/pal/teeos/thread.rs index 155f333f90616..77f9040ead540 100644 --- a/library/std/src/sys/pal/teeos/thread.rs +++ b/library/std/src/sys/pal/teeos/thread.rs @@ -4,7 +4,7 @@ use crate::cmp; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sys::os; use crate::time::Duration; @@ -140,7 +140,7 @@ impl Drop for Thread { // Note: Both `sched_getaffinity` and `sysconf` are available but not functional on // teeos, so this function always returns an Error! -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { Err(io::Error::new( io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform", diff --git a/library/std/src/sys/pal/uefi/thread.rs b/library/std/src/sys/pal/uefi/thread.rs index ddfc3af2f5011..3d8fa27251f01 100644 --- a/library/std/src/sys/pal/uefi/thread.rs +++ b/library/std/src/sys/pal/uefi/thread.rs @@ -1,7 +1,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr::NonNull; use crate::time::Duration; @@ -44,9 +44,9 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { // UEFI is single threaded - Ok(NonZeroUsize::new(1).unwrap()) + Ok(NonZero::new(1).unwrap()) } pub mod guard { diff --git a/library/std/src/sys/pal/unix/fd.rs b/library/std/src/sys/pal/unix/fd.rs index bf1fb3123c4ce..a1c0321876fa8 100644 --- a/library/std/src/sys/pal/unix/fd.rs +++ b/library/std/src/sys/pal/unix/fd.rs @@ -161,7 +161,7 @@ impl FileDesc { // Safety: `ret` bytes were written to the initialized portion of the buffer unsafe { - cursor.advance(ret as usize); + cursor.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/unix/net.rs b/library/std/src/sys/pal/unix/net.rs index 8f537de7026f5..1b6a6bb2c5c77 100644 --- a/library/std/src/sys/pal/unix/net.rs +++ b/library/std/src/sys/pal/unix/net.rs @@ -272,7 +272,7 @@ impl Socket { ) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/unix/process/process_common/tests.rs b/library/std/src/sys/pal/unix/process/process_common/tests.rs index 4e41efc90962a..823b4a5633629 100644 --- a/library/std/src/sys/pal/unix/process/process_common/tests.rs +++ b/library/std/src/sys/pal/unix/process/process_common/tests.rs @@ -170,7 +170,7 @@ fn test_program_kind() { )))] #[test] fn unix_exit_statuses() { - use crate::num::NonZeroI32; + use crate::num::NonZero; use crate::os::unix::process::ExitStatusExt; use crate::process::*; @@ -182,7 +182,7 @@ fn unix_exit_statuses() { assert_eq!(exit_status.code(), Some(exit_code)); - if let Ok(nz) = NonZeroI32::try_from(exit_code) { + if let Ok(nz) = NonZero::try_from(exit_code) { assert!(!exit_status.success()); let es_error = exit_status.exit_ok().unwrap_err(); assert_eq!(es_error.code().unwrap(), i32::from(nz)); diff --git a/library/std/src/sys/pal/unix/process/process_fuchsia.rs b/library/std/src/sys/pal/unix/process/process_fuchsia.rs index 9931c2af2f1e0..b6a74fb48318c 100644 --- a/library/std/src/sys/pal/unix/process/process_fuchsia.rs +++ b/library/std/src/sys/pal/unix/process/process_fuchsia.rs @@ -1,7 +1,7 @@ use crate::fmt; use crate::io; use crate::mem; -use crate::num::{NonZeroI32, NonZeroI64}; +use crate::num::NonZero; use crate::ptr; use crate::sys::process::process_common::*; @@ -240,7 +240,7 @@ pub struct ExitStatus(i64); impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { - match NonZeroI64::try_from(self.0) { + match NonZero::try_from(self.0) { /* was nonzero */ Ok(failure) => Err(ExitStatusError(failure)), /* was zero, couldn't convert */ Err(_) => Ok(()), } @@ -314,7 +314,7 @@ impl fmt::Display for ExitStatus { } #[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub struct ExitStatusError(NonZeroI64); +pub struct ExitStatusError(NonZero); impl Into for ExitStatusError { fn into(self) -> ExitStatus { @@ -323,7 +323,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { // fixme: affected by the same bug as ExitStatus::code() ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } diff --git a/library/std/src/sys/pal/unix/process/process_unix.rs b/library/std/src/sys/pal/unix/process/process_unix.rs index 94c4c56bd51cf..d5a77085725c5 100644 --- a/library/std/src/sys/pal/unix/process/process_unix.rs +++ b/library/std/src/sys/pal/unix/process/process_unix.rs @@ -1,7 +1,7 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; use crate::mem; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys; use crate::sys::cvt; use crate::sys::process::process_common::*; @@ -1106,7 +1106,7 @@ impl fmt::Debug for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/process/process_unsupported.rs b/library/std/src/sys/pal/unix/process/process_unsupported.rs index 89a2a0c6e567b..33d359d3f8411 100644 --- a/library/std/src/sys/pal/unix/process/process_unsupported.rs +++ b/library/std/src/sys/pal/unix/process/process_unsupported.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::io; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys::pal::unix::unsupported::*; use crate::sys::process::process_common::*; @@ -67,7 +67,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus::from(c_int::from(self.0)).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/process/process_vxworks.rs b/library/std/src/sys/pal/unix/process/process_vxworks.rs index 5b4e94d0f1b97..76179e0910d9e 100644 --- a/library/std/src/sys/pal/unix/process/process_vxworks.rs +++ b/library/std/src/sys/pal/unix/process/process_vxworks.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys; use crate::sys::cvt; use crate::sys::process::process_common::*; @@ -257,7 +257,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index ba8d31c23a51a..97976407bb40f 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -2,7 +2,7 @@ use crate::cmp; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sys::{os, stack_overflow}; use crate::time::Duration; @@ -306,7 +306,7 @@ fn truncate_cstr(cstr: &CStr) -> [libc::c_char; MAX_W result } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { cfg_if::cfg_if! { if #[cfg(any( target_os = "android", @@ -338,7 +338,7 @@ pub fn available_parallelism() -> io::Result { // some old MIPS kernels were buggy and zero-initialized the mask if // none was explicitly set. // In that case we use the sysconf fallback. - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::new(count) { return Ok(count) } } @@ -351,7 +351,7 @@ pub fn available_parallelism() -> io::Result { let count = cpus as usize; // Cover the unusual situation where we were able to get the quota but not the affinity mask let count = count.min(quota); - Ok(unsafe { NonZeroUsize::new_unchecked(count) }) + Ok(unsafe { NonZero::new_unchecked(count) }) } } } else if #[cfg(any( @@ -375,7 +375,7 @@ pub fn available_parallelism() -> io::Result { ) == 0 { let count = libc::CPU_COUNT(&set) as usize; if count > 0 { - return Ok(NonZeroUsize::new_unchecked(count)); + return Ok(NonZero::new_unchecked(count)); } } } @@ -397,7 +397,7 @@ pub fn available_parallelism() -> io::Result { } } libc::_cpuset_destroy(set); - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::new(count) { return Ok(count); } } @@ -433,7 +433,7 @@ pub fn available_parallelism() -> io::Result { } } - Ok(unsafe { NonZeroUsize::new_unchecked(cpus as usize) }) + Ok(unsafe { NonZero::new_unchecked(cpus as usize) }) } else if #[cfg(target_os = "nto")] { unsafe { use libc::_syspage_ptr; @@ -441,7 +441,7 @@ pub fn available_parallelism() -> io::Result { Err(io::const_io_error!(io::ErrorKind::NotFound, "No syspage available")) } else { let cpus = (*_syspage_ptr).num_cpu; - NonZeroUsize::new(cpus as usize) + NonZero::new(cpus as usize) .ok_or(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")) } } @@ -456,7 +456,7 @@ pub fn available_parallelism() -> io::Result { return Err(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")); } - Ok(NonZeroUsize::new_unchecked(sinfo.cpu_count as usize)) + Ok(NonZero::new_unchecked(sinfo.cpu_count as usize)) } } else { // FIXME: implement on vxWorks, Redox, l4re diff --git a/library/std/src/sys/pal/unsupported/process.rs b/library/std/src/sys/pal/unsupported/process.rs index a639afcc674ed..6a989dd3e76bb 100644 --- a/library/std/src/sys/pal/unsupported/process.rs +++ b/library/std/src/sys/pal/unsupported/process.rs @@ -2,7 +2,7 @@ use crate::ffi::OsStr; use crate::fmt; use crate::io; use crate::marker::PhantomData; -use crate::num::NonZeroI32; +use crate::num::NonZero; use crate::path::Path; use crate::sys::fs::File; use crate::sys::pipe::AnonPipe; @@ -170,7 +170,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { self.0 } } diff --git a/library/std/src/sys/pal/unsupported/thread.rs b/library/std/src/sys/pal/unsupported/thread.rs index a8db251de2017..cd1ae7f7d11cd 100644 --- a/library/std/src/sys/pal/unsupported/thread.rs +++ b/library/std/src/sys/pal/unsupported/thread.rs @@ -1,7 +1,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::time::Duration; pub struct Thread(!); @@ -31,7 +31,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/wasi/fd.rs b/library/std/src/sys/pal/wasi/fd.rs index d7295a799daab..8966e4b80ad37 100644 --- a/library/std/src/sys/pal/wasi/fd.rs +++ b/library/std/src/sys/pal/wasi/fd.rs @@ -60,7 +60,7 @@ impl WasiFd { }]; match wasi::fd_read(self.as_raw_fd() as wasi::Fd, &bufs) { Ok(n) => { - buf.advance(n); + buf.advance_unchecked(n); Ok(()) } Err(e) => Err(err2io(e)), diff --git a/library/std/src/sys/pal/wasi/thread.rs b/library/std/src/sys/pal/wasi/thread.rs index a0eefa8811a39..77d8b4378e7d5 100644 --- a/library/std/src/sys/pal/wasi/thread.rs +++ b/library/std/src/sys/pal/wasi/thread.rs @@ -1,7 +1,7 @@ use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys::unsupported; use crate::time::Duration; @@ -186,7 +186,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/wasm/atomics/thread.rs b/library/std/src/sys/pal/wasm/atomics/thread.rs index 714b704922794..49f936f14498c 100644 --- a/library/std/src/sys/pal/wasm/atomics/thread.rs +++ b/library/std/src/sys/pal/wasm/atomics/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys::unsupported; use crate::time::Duration; @@ -40,7 +40,7 @@ impl Thread { pub fn join(self) {} } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/windows/args.rs b/library/std/src/sys/pal/windows/args.rs index fbbdbc2126595..2ecfe088d107b 100644 --- a/library/std/src/sys/pal/windows/args.rs +++ b/library/std/src/sys/pal/windows/args.rs @@ -10,7 +10,7 @@ use super::os::current_exe; use crate::ffi::OsString; use crate::fmt; use crate::io; -use crate::num::NonZeroU16; +use crate::num::NonZero; use crate::os::windows::prelude::*; use crate::path::{Path, PathBuf}; use crate::sys::path::get_long_path; @@ -21,12 +21,12 @@ use crate::vec; use crate::iter; -/// This is the const equivalent to `NonZeroU16::new(n).unwrap()` +/// This is the const equivalent to `NonZero::new(n).unwrap()` /// /// FIXME: This can be removed once `Option::unwrap` is stably const. /// See the `const_option` feature (#67441). -const fn non_zero_u16(n: u16) -> NonZeroU16 { - match NonZeroU16::new(n) { +const fn non_zero_u16(n: u16) -> NonZero { + match NonZero::new(n) { Some(n) => n, None => panic!("called `unwrap` on a `None` value"), } @@ -69,10 +69,10 @@ fn parse_lp_cmd_line<'a, F: Fn() -> OsString>( lp_cmd_line: Option>, exe_name: F, ) -> Vec { - const BACKSLASH: NonZeroU16 = non_zero_u16(b'\\' as u16); - const QUOTE: NonZeroU16 = non_zero_u16(b'"' as u16); - const TAB: NonZeroU16 = non_zero_u16(b'\t' as u16); - const SPACE: NonZeroU16 = non_zero_u16(b' ' as u16); + const BACKSLASH: NonZero = non_zero_u16(b'\\' as u16); + const QUOTE: NonZero = non_zero_u16(b'"' as u16); + const TAB: NonZero = non_zero_u16(b'\t' as u16); + const SPACE: NonZero = non_zero_u16(b' ' as u16); let mut ret_val = Vec::new(); // If the cmd line pointer is null or it points to an empty string then diff --git a/library/std/src/sys/pal/windows/handle.rs b/library/std/src/sys/pal/windows/handle.rs index c4495f81a5a3a..3f85bb0a099a9 100644 --- a/library/std/src/sys/pal/windows/handle.rs +++ b/library/std/src/sys/pal/windows/handle.rs @@ -121,7 +121,7 @@ impl Handle { Ok(read) => { // Safety: `read` bytes were written to the initialized portion of the buffer unsafe { - cursor.advance(read); + cursor.advance_unchecked(read); } Ok(()) } diff --git a/library/std/src/sys/pal/windows/net.rs b/library/std/src/sys/pal/windows/net.rs index c34e01e000aca..e37fbe9ef83e4 100644 --- a/library/std/src/sys/pal/windows/net.rs +++ b/library/std/src/sys/pal/windows/net.rs @@ -234,7 +234,7 @@ impl Socket { } } _ => { - unsafe { buf.advance(result as usize) }; + unsafe { buf.advance_unchecked(result as usize) }; Ok(()) } } diff --git a/library/std/src/sys/pal/windows/pipe.rs b/library/std/src/sys/pal/windows/pipe.rs index 7624e746f5c89..fd10df82d8b47 100644 --- a/library/std/src/sys/pal/windows/pipe.rs +++ b/library/std/src/sys/pal/windows/pipe.rs @@ -273,7 +273,7 @@ impl AnonPipe { Err(e) => Err(e), Ok(n) => { unsafe { - buf.advance(n); + buf.advance_unchecked(n); } Ok(()) } diff --git a/library/std/src/sys/pal/windows/process.rs b/library/std/src/sys/pal/windows/process.rs index 9ec775959fd45..6a94d37714038 100644 --- a/library/std/src/sys/pal/windows/process.rs +++ b/library/std/src/sys/pal/windows/process.rs @@ -12,7 +12,7 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; use crate::mem; use crate::mem::MaybeUninit; -use crate::num::NonZeroI32; +use crate::num::NonZero; use crate::os::windows::ffi::{OsStrExt, OsStringExt}; use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle, FromRawHandle, IntoRawHandle}; use crate::path::{Path, PathBuf}; @@ -747,7 +747,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { Some((u32::from(self.0) as i32).try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/windows/thread.rs b/library/std/src/sys/pal/windows/thread.rs index 1fe744935193c..0f709e2ec7ba7 100644 --- a/library/std/src/sys/pal/windows/thread.rs +++ b/library/std/src/sys/pal/windows/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::os::windows::io::AsRawHandle; use crate::os::windows::io::HandleOrNull; use crate::ptr; @@ -110,7 +110,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { let res = unsafe { let mut sysinfo: c::SYSTEM_INFO = crate::mem::zeroed(); c::GetSystemInfo(&mut sysinfo); @@ -121,7 +121,7 @@ pub fn available_parallelism() -> io::Result { io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform", )), - cpus => Ok(unsafe { NonZeroUsize::new_unchecked(cpus) }), + cpus => Ok(unsafe { NonZero::new_unchecked(cpus) }), } } diff --git a/library/std/src/sys/pal/xous/thread.rs b/library/std/src/sys/pal/xous/thread.rs index 0f452e07a5c58..21f5954d6e2d2 100644 --- a/library/std/src/sys/pal/xous/thread.rs +++ b/library/std/src/sys/pal/xous/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::os::xous::ffi::{ blocking_scalar, create_thread, do_yield, join_thread, map_memory, update_memory_flags, MemoryFlags, Syscall, ThreadId, @@ -132,9 +132,9 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { // We're unicore right now. - Ok(unsafe { NonZeroUsize::new_unchecked(1) }) + Ok(unsafe { NonZero::new_unchecked(1) }) } pub mod guard { diff --git a/library/std/src/sys_common/wstr.rs b/library/std/src/sys_common/wstr.rs index b230fd1a829f7..8eae160648502 100644 --- a/library/std/src/sys_common/wstr.rs +++ b/library/std/src/sys_common/wstr.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] use crate::marker::PhantomData; -use crate::num::NonZeroU16; +use crate::num::NonZero; use crate::ptr::NonNull; /// A safe iterator over a LPWSTR @@ -23,15 +23,15 @@ impl WStrUnits<'_> { Some(Self { lpwstr: NonNull::new(lpwstr as _)?, lifetime: PhantomData }) } - pub fn peek(&self) -> Option { + pub fn peek(&self) -> Option> { // SAFETY: It's always safe to read the current item because we don't // ever move out of the array's bounds. - unsafe { NonZeroU16::new(*self.lpwstr.as_ptr()) } + unsafe { NonZero::new(*self.lpwstr.as_ptr()) } } /// Advance the iterator while `predicate` returns true. /// Returns the number of items it advanced by. - pub fn advance_while bool>(&mut self, mut predicate: P) -> usize { + pub fn advance_while) -> bool>(&mut self, mut predicate: P) -> usize { let mut counter = 0; while let Some(w) = self.peek() { if !predicate(w) { @@ -46,8 +46,9 @@ impl WStrUnits<'_> { impl Iterator for WStrUnits<'_> { // This can never return zero as that marks the end of the string. - type Item = NonZeroU16; - fn next(&mut self) -> Option { + type Item = NonZero; + + fn next(&mut self) -> Option { // SAFETY: If NULL is reached we immediately return. // Therefore it's safe to advance the pointer after that. unsafe { diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index eb837c8f6c63f..4f0f010984ab9 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -165,8 +165,7 @@ use crate::fmt; use crate::io; use crate::marker::PhantomData; use crate::mem::{self, forget}; -use crate::num::NonZeroU64; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroU64, NonZeroUsize}; use crate::panic; use crate::panicking; use crate::pin::Pin; @@ -1166,7 +1165,7 @@ pub fn park_timeout(dur: Duration) { /// [`id`]: Thread::id #[stable(feature = "thread_id", since = "1.19.0")] #[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)] -pub struct ThreadId(NonZeroU64); +pub struct ThreadId(NonZero); impl ThreadId { // Generate a new unique thread ID. @@ -1189,7 +1188,7 @@ impl ThreadId { }; match COUNTER.compare_exchange_weak(last, id, Relaxed, Relaxed) { - Ok(_) => return ThreadId(NonZeroU64::new(id).unwrap()), + Ok(_) => return ThreadId(NonZero::new(id).unwrap()), Err(id) => last = id, } } @@ -1208,7 +1207,7 @@ impl ThreadId { *counter = id; drop(counter); - ThreadId(NonZeroU64::new(id).unwrap()) + ThreadId(NonZero::new(id).unwrap()) } } } diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 64bef2d301582..9d7f88a9d42ba 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1039,7 +1039,7 @@ impl Step for Rustc { pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection, stage: u32) { cargo .arg("--features") - .arg(builder.rustc_features(builder.kind)) + .arg(builder.rustc_features(builder.kind, target)) .arg("--manifest-path") .arg(builder.src.join("compiler/rustc/Cargo.toml")); @@ -1096,7 +1096,7 @@ pub fn rustc_cargo_env( cargo.env("CFG_OMIT_GIT_HASH", "1"); } - if let Some(backend) = builder.config.default_codegen_backend() { + if let Some(backend) = builder.config.default_codegen_backend(target) { cargo.env("CFG_DEFAULT_CODEGEN_BACKEND", backend); } @@ -1137,7 +1137,7 @@ pub fn rustc_cargo_env( // build. If we are in a check build we still go ahead here presuming we've // detected that LLVM is already built and good to go which helps prevent // busting caches (e.g. like #71152). - if builder.config.llvm_enabled() { + if builder.config.llvm_enabled(target) { let building_is_expensive = crate::core::build_steps::llvm::prebuilt_llvm_config(builder, target).is_err(); // `top_stage == stage` might be false for `check --stage 1`, if we are building the stage 1 compiler @@ -1281,7 +1281,7 @@ pub(crate) const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_"; fn is_codegen_cfg_needed(path: &TaskPath, run: &RunConfig<'_>) -> bool { if path.path.to_str().unwrap().contains(&CODEGEN_BACKEND_PREFIX) { let mut needs_codegen_backend_config = true; - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if path .path .to_str() @@ -1318,7 +1318,7 @@ impl Step for CodegenBackend { return; } - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1425,7 +1425,7 @@ fn copy_codegen_backends_to_sysroot( return; } - for backend in builder.config.rust_codegen_backends.iter() { + for backend in builder.config.codegen_backends(target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1732,7 +1732,7 @@ impl Step for Assemble { // to not fail while linking the artifacts. build_compiler.stage = actual_stage; - for &backend in builder.config.rust_codegen_backends.iter() { + for &backend in builder.config.codegen_backends(target_compiler.host) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1817,7 +1817,7 @@ impl Step for Assemble { } } - if builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) { + if builder.config.llvm_enabled(target_compiler.host) { let llvm::LlvmResult { llvm_config, .. } = builder.ensure(llvm::Llvm { target: target_compiler.host }); if !builder.config.dry_run() && builder.config.llvm_tools_enabled { diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index f50026368dabd..6d56492e41b56 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1278,7 +1278,7 @@ impl Step for CodegenBackend { } fn make_run(run: RunConfig<'_>) { - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1302,7 +1302,7 @@ impl Step for CodegenBackend { return None; } - if !builder.config.rust_codegen_backends.contains(&self.backend) { + if !builder.config.codegen_backends(self.compiler.host).contains(&self.backend) { return None; } diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 1dbda405128ab..0c7e751c8daac 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1798,7 +1798,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the let mut llvm_components_passed = false; let mut copts_passed = false; - if builder.config.llvm_enabled() { + if builder.config.llvm_enabled(compiler.host) { let llvm::LlvmResult { llvm_config, .. } = builder.ensure(llvm::Llvm { target: builder.config.build }); if !builder.config.dry_run() { @@ -3121,7 +3121,8 @@ impl Step for CodegenCranelift { return; } - if !builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("cranelift")) { + if !builder.config.codegen_backends(run.target).contains(&INTERNER.intern_str("cranelift")) + { builder.info("cranelift not in rust.codegen-backends. skipping"); return; } @@ -3245,7 +3246,7 @@ impl Step for CodegenGCC { return; } - if !builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("gcc")) { + if !builder.config.codegen_backends(run.target).contains(&INTERNER.intern_str("gcc")) { builder.info("gcc not in rust.codegen-backends. skipping"); return; } diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index b21ffe868e145..2c4013d78bf68 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -1229,7 +1229,7 @@ impl<'a> Builder<'a> { /// Note that this returns `None` if LLVM is disabled, or if we're in a /// check build or dry-run, where there's no need to build all of LLVM. fn llvm_config(&self, target: TargetSelection) -> Option { - if self.config.llvm_enabled() && self.kind != Kind::Check && !self.config.dry_run() { + if self.config.llvm_enabled(target) && self.kind != Kind::Check && !self.config.dry_run() { let llvm::LlvmResult { llvm_config, .. } = self.ensure(llvm::Llvm { target }); if llvm_config.is_file() { return Some(llvm_config); @@ -1991,7 +1991,8 @@ impl<'a> Builder<'a> { }; if let Some(limit) = limit { - if stage == 0 || self.config.default_codegen_backend().unwrap_or_default() == "llvm" + if stage == 0 + || self.config.default_codegen_backend(target).unwrap_or_default() == "llvm" { rustflags.arg(&format!("-Cllvm-args=-import-instr-limit={limit}")); } diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 4c64850c0e04b..05b9c73401814 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -577,6 +577,7 @@ pub struct Target { pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, + pub codegen_backends: Option>>, } impl Target { @@ -1135,6 +1136,7 @@ define_config! { wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", + codegen_backends: Option> = "codegen-backends", } } @@ -1840,6 +1842,24 @@ impl Config { target.profiler = cfg.profiler; target.rpath = cfg.rpath; + if let Some(ref backends) = cfg.codegen_backends { + let available_backends = vec!["llvm", "cranelift", "gcc"]; + + target.codegen_backends = Some(backends.iter().map(|s| { + if let Some(backend) = s.strip_prefix(CODEGEN_BACKEND_PREFIX) { + if available_backends.contains(&backend) { + panic!("Invalid value '{s}' for 'target.{triple}.codegen-backends'. Instead, please use '{backend}'."); + } else { + println!("HELP: '{s}' for 'target.{triple}.codegen-backends' might fail. \ + Codegen backends are mostly defined without the '{CODEGEN_BACKEND_PREFIX}' prefix. \ + In this case, it would be referred to as '{backend}'."); + } + } + + INTERNER.intern_str(s) + }).collect()); + } + config.target_config.insert(TargetSelection::from_user(&triple), target); } } @@ -2222,8 +2242,8 @@ impl Config { self.target_config.get(&target).map(|t| t.rpath).flatten().unwrap_or(self.rust_rpath) } - pub fn llvm_enabled(&self) -> bool { - self.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) + pub fn llvm_enabled(&self, target: TargetSelection) -> bool { + self.codegen_backends(target).contains(&INTERNER.intern_str("llvm")) } pub fn llvm_libunwind(&self, target: TargetSelection) -> LlvmLibunwind { @@ -2242,8 +2262,15 @@ impl Config { self.submodules.unwrap_or(rust_info.is_managed_git_subrepository()) } - pub fn default_codegen_backend(&self) -> Option> { - self.rust_codegen_backends.get(0).cloned() + pub fn codegen_backends(&self, target: TargetSelection) -> &[Interned] { + self.target_config + .get(&target) + .and_then(|cfg| cfg.codegen_backends.as_deref()) + .unwrap_or(&self.rust_codegen_backends) + } + + pub fn default_codegen_backend(&self, target: TargetSelection) -> Option> { + self.codegen_backends(target).get(0).cloned() } pub fn git_config(&self) -> GitConfig<'_> { diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 5f1ca5de74afb..1dce8d8ac7184 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -16,7 +16,6 @@ use std::path::PathBuf; use std::process::Command; use crate::core::config::Target; -use crate::utils::cache::INTERNER; use crate::utils::helpers::output; use crate::Build; @@ -88,19 +87,19 @@ pub fn check(build: &mut Build) { } // We need cmake, but only if we're actually building LLVM or sanitizers. - let building_llvm = build.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) - && build - .hosts - .iter() - .map(|host| { - build + let building_llvm = build + .hosts + .iter() + .map(|host| { + build.config.llvm_enabled(*host) + && build .config .target_config .get(host) .map(|config| config.llvm_config.is_none()) .unwrap_or(true) - }) - .any(|build_llvm_ourselves| build_llvm_ourselves); + }) + .any(|build_llvm_ourselves| build_llvm_ourselves); let need_cmake = building_llvm || build.config.any_sanitizers_to_build(); if need_cmake && cmd_finder.maybe_have("cmake").is_none() { @@ -190,13 +189,16 @@ than building it. if !build.config.dry_run() { cmd_finder.must_have(build.cxx(*host).unwrap()); } - } - if build.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) { - // Externally configured LLVM requires FileCheck to exist - let filecheck = build.llvm_filecheck(build.build); - if !filecheck.starts_with(&build.out) && !filecheck.exists() && build.config.codegen_tests { - panic!("FileCheck executable {filecheck:?} does not exist"); + if build.config.llvm_enabled(*host) { + // Externally configured LLVM requires FileCheck to exist + let filecheck = build.llvm_filecheck(build.build); + if !filecheck.starts_with(&build.out) + && !filecheck.exists() + && build.config.codegen_tests + { + panic!("FileCheck executable {filecheck:?} does not exist"); + } } } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 0e9a9791fb251..121ed88c92fea 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -731,12 +731,12 @@ impl Build { } /// Gets the space-separated set of activated features for the compiler. - fn rustc_features(&self, kind: Kind) -> String { + fn rustc_features(&self, kind: Kind, target: TargetSelection) -> String { let mut features = vec![]; if self.config.jemalloc { features.push("jemalloc"); } - if self.config.llvm_enabled() || kind == Kind::Check { + if self.config.llvm_enabled(target) || kind == Kind::Check { features.push("llvm"); } // keep in sync with `bootstrap/compile.rs:rustc_cargo_env` @@ -1561,7 +1561,8 @@ impl Build { || target .map(|t| self.config.profiler_enabled(t)) .unwrap_or_else(|| self.config.any_profiler_enabled())) - && (dep != "rustc_codegen_llvm" || self.config.llvm_enabled()) + && (dep != "rustc_codegen_llvm" + || self.config.hosts.iter().any(|host| self.config.llvm_enabled(*host))) { list.push(*dep); } diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index 0d5e2600b73a9..ec62f9f1f8c1a 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -114,4 +114,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Warning, summary: "A new `optimized-compiler-builtins` option has been introduced. Whether to build llvm's `compiler-rt` from source is no longer implicitly controlled by git state. See the PR for more details.", }, + ChangeInfo { + change_id: 120348, + severity: ChangeSeverity::Info, + summary: "New option `target..codegen-backends` added to config.toml.", + }, ]; diff --git a/src/doc/unstable-book/src/language-features/intrinsics.md b/src/doc/unstable-book/src/language-features/intrinsics.md index 8fa8f567d7eed..9d07ae6fc67e1 100644 --- a/src/doc/unstable-book/src/language-features/intrinsics.md +++ b/src/doc/unstable-book/src/language-features/intrinsics.md @@ -2,13 +2,60 @@ The tracking issue for this feature is: None. -Intrinsics are never intended to be stable directly, but intrinsics are often +Intrinsics are rarely intended to be stable directly, but are usually exported in some sort of stable manner. Prefer using the stable interfaces to the intrinsic directly when you can. ------------------------ +## Intrinsics with fallback logic + +Many intrinsics can be written in pure rust, albeit inefficiently or without supporting +some features that only exist on some backends. Backends can simply not implement those +intrinsics without causing any code miscompilations or failures to compile. + +```rust +#![feature(rustc_attrs, effects)] +#![allow(internal_features)] + +#[rustc_intrinsic] +const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} +``` + +Since these are just regular functions, it is perfectly ok to create the intrinsic twice: + +```rust +#![feature(rustc_attrs, effects)] +#![allow(internal_features)] + +#[rustc_intrinsic] +const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + +mod foo { + #[rustc_intrinsic] + const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) { + panic!("noisy const dealloc") + } +} + +``` + +The behaviour on backends that override the intrinsic is exactly the same. On other +backends, the intrinsic behaviour depends on which implementation is called, just like +with any regular function. + +## Intrinsics lowered to MIR instructions + +Various intrinsics have native MIR operations that they correspond to. Instead of requiring +backends to implement both the intrinsic and the MIR operation, the `lower_intrinsics` pass +will convert the calls to the MIR operation. Backends do not need to know about these intrinsics +at all. + +## Intrinsics without fallback logic + +These must be implemented by all backends. + These are imported as if they were FFI functions, with the special `rust-intrinsic` ABI. For example, if one was in a freestanding context, but wished to be able to `transmute` between types, and @@ -27,4 +74,5 @@ extern "rust-intrinsic" { } ``` -As with any other FFI functions, these are always `unsafe` to call. +As with any other FFI functions, these are by default always `unsafe` to call. +You can add `#[rustc_safe_intrinsic]` to the intrinsic to make it safe to call. diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 85e7a915c536a..30cadfe7dac64 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -643,7 +643,7 @@ impl Item { let abi = tcx.fn_sig(def_id).skip_binder().abi(); hir::FnHeader { unsafety: if abi == Abi::RustIntrinsic { - intrinsic_operation_unsafety(tcx, self.def_id().unwrap()) + intrinsic_operation_unsafety(tcx, def_id.expect_local()) } else { hir::Unsafety::Unsafe }, diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index 8d5bcd665ad25..47195fcc17b48 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs @@ -335,7 +335,7 @@ fn check_terminator<'tcx>( // within const fns. `transmute` is allowed in all other const contexts. // This won't really scale to more intrinsics or functions. Let's allow const // transmutes in const fn before we add more hacks to this. - if tcx.is_intrinsic(fn_def_id) && tcx.item_name(fn_def_id) == sym::transmute { + if matches!(tcx.intrinsic(fn_def_id), Some(sym::transmute)) { return Err(( span, "can only call `transmute` from const items, not `const fn`".into(), diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index daec391414582..4ceb8a646e060 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -6,6 +6,7 @@ use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process::Command; +use regex::Regex; use tracing::*; use crate::common::{Config, Debugger, FailMode, Mode, PassMode}; @@ -46,18 +47,32 @@ impl EarlyProps { pub fn from_reader(config: &Config, testfile: &Path, rdr: R) -> Self { let mut props = EarlyProps::default(); - iter_header(testfile, rdr, &mut |_, ln, _| { - config.push_name_value_directive(ln, directives::AUX_BUILD, &mut props.aux, |r| { - r.trim().to_string() - }); - config.push_name_value_directive( - ln, - directives::AUX_CRATE, - &mut props.aux_crate, - Config::parse_aux_crate, - ); - config.parse_and_update_revisions(ln, &mut props.revisions); - }); + let mut poisoned = false; + iter_header( + config.mode, + &config.suite, + &mut poisoned, + testfile, + rdr, + &mut |_, _, ln, _| { + config.push_name_value_directive(ln, directives::AUX_BUILD, &mut props.aux, |r| { + r.trim().to_string() + }); + config.push_name_value_directive( + ln, + directives::AUX_CRATE, + &mut props.aux_crate, + Config::parse_aux_crate, + ); + config.parse_and_update_revisions(ln, &mut props.revisions); + }, + ); + + if poisoned { + eprintln!("errors encountered during EarlyProps parsing: {}", testfile.display()); + panic!("errors encountered during EarlyProps parsing"); + } + return props; } } @@ -306,205 +321,233 @@ impl TestProps { if !testfile.is_dir() { let file = File::open(testfile).unwrap(); - iter_header(testfile, file, &mut |revision, ln, _| { - if revision.is_some() && revision != cfg { - return; - } + let mut poisoned = false; - use directives::*; + iter_header( + config.mode, + &config.suite, + &mut poisoned, + testfile, + file, + &mut |revision, _, ln, _| { + if revision.is_some() && revision != cfg { + return; + } - config.push_name_value_directive( - ln, - ERROR_PATTERN, - &mut self.error_patterns, - |r| r, - ); - config.push_name_value_directive( - ln, - REGEX_ERROR_PATTERN, - &mut self.regex_error_patterns, - |r| r, - ); + use directives::*; + + config.push_name_value_directive( + ln, + ERROR_PATTERN, + &mut self.error_patterns, + |r| r, + ); + config.push_name_value_directive( + ln, + REGEX_ERROR_PATTERN, + &mut self.regex_error_patterns, + |r| r, + ); - fn split_flags(flags: &str) -> Vec { - // Individual flags can be single-quoted to preserve spaces; see - // . - flags - .split("'") - .enumerate() - .flat_map( - |(i, f)| { + fn split_flags(flags: &str) -> Vec { + // Individual flags can be single-quoted to preserve spaces; see + // . + flags + .split("'") + .enumerate() + .flat_map(|(i, f)| { if i % 2 == 1 { vec![f] } else { f.split_whitespace().collect() } - }, - ) - .map(move |s| s.to_owned()) - .collect::>() - } + }) + .map(move |s| s.to_owned()) + .collect::>() + } - if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) { - self.compile_flags.extend(split_flags(&flags)); - } - if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() { - panic!("`compiler-flags` directive should be spelled `compile-flags`"); - } + if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) { + self.compile_flags.extend(split_flags(&flags)); + } + if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() { + panic!("`compiler-flags` directive should be spelled `compile-flags`"); + } - if let Some(edition) = config.parse_edition(ln) { - self.compile_flags.push(format!("--edition={}", edition.trim())); - has_edition = true; - } + if let Some(edition) = config.parse_edition(ln) { + self.compile_flags.push(format!("--edition={}", edition.trim())); + has_edition = true; + } - config.parse_and_update_revisions(ln, &mut self.revisions); + config.parse_and_update_revisions(ln, &mut self.revisions); - config.set_name_value_directive(ln, RUN_FLAGS, &mut self.run_flags, |r| r); + config.set_name_value_directive(ln, RUN_FLAGS, &mut self.run_flags, |r| r); - if self.pp_exact.is_none() { - self.pp_exact = config.parse_pp_exact(ln, testfile); - } + if self.pp_exact.is_none() { + self.pp_exact = config.parse_pp_exact(ln, testfile); + } - config.set_name_directive(ln, SHOULD_ICE, &mut self.should_ice); - config.set_name_directive(ln, BUILD_AUX_DOCS, &mut self.build_aux_docs); - config.set_name_directive(ln, FORCE_HOST, &mut self.force_host); - config.set_name_directive(ln, CHECK_STDOUT, &mut self.check_stdout); - config.set_name_directive(ln, CHECK_RUN_RESULTS, &mut self.check_run_results); - config.set_name_directive( - ln, - DONT_CHECK_COMPILER_STDOUT, - &mut self.dont_check_compiler_stdout, - ); - config.set_name_directive( - ln, - DONT_CHECK_COMPILER_STDERR, - &mut self.dont_check_compiler_stderr, - ); - config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic); - config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded); + config.set_name_directive(ln, SHOULD_ICE, &mut self.should_ice); + config.set_name_directive(ln, BUILD_AUX_DOCS, &mut self.build_aux_docs); + config.set_name_directive(ln, FORCE_HOST, &mut self.force_host); + config.set_name_directive(ln, CHECK_STDOUT, &mut self.check_stdout); + config.set_name_directive(ln, CHECK_RUN_RESULTS, &mut self.check_run_results); + config.set_name_directive( + ln, + DONT_CHECK_COMPILER_STDOUT, + &mut self.dont_check_compiler_stdout, + ); + config.set_name_directive( + ln, + DONT_CHECK_COMPILER_STDERR, + &mut self.dont_check_compiler_stderr, + ); + config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic); + config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded); - if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) { - self.pretty_mode = m; - } + if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) { + self.pretty_mode = m; + } - config.set_name_directive(ln, PRETTY_COMPARE_ONLY, &mut self.pretty_compare_only); - config.push_name_value_directive(ln, AUX_BUILD, &mut self.aux_builds, |r| { - r.trim().to_string() - }); - config.push_name_value_directive( - ln, - AUX_CRATE, - &mut self.aux_crates, - Config::parse_aux_crate, - ); - config.push_name_value_directive( - ln, - EXEC_ENV, - &mut self.exec_env, - Config::parse_env, - ); - config.push_name_value_directive( - ln, - UNSET_EXEC_ENV, - &mut self.unset_exec_env, - |r| r, - ); - config.push_name_value_directive( - ln, - RUSTC_ENV, - &mut self.rustc_env, - Config::parse_env, - ); - config.push_name_value_directive( - ln, - UNSET_RUSTC_ENV, - &mut self.unset_rustc_env, - |r| r, - ); - config.push_name_value_directive(ln, FORBID_OUTPUT, &mut self.forbid_output, |r| r); - config.set_name_directive( - ln, - CHECK_TEST_LINE_NUMBERS_MATCH, - &mut self.check_test_line_numbers_match, - ); + config.set_name_directive( + ln, + PRETTY_COMPARE_ONLY, + &mut self.pretty_compare_only, + ); + config.push_name_value_directive(ln, AUX_BUILD, &mut self.aux_builds, |r| { + r.trim().to_string() + }); + config.push_name_value_directive( + ln, + AUX_CRATE, + &mut self.aux_crates, + Config::parse_aux_crate, + ); + config.push_name_value_directive( + ln, + EXEC_ENV, + &mut self.exec_env, + Config::parse_env, + ); + config.push_name_value_directive( + ln, + UNSET_EXEC_ENV, + &mut self.unset_exec_env, + |r| r, + ); + config.push_name_value_directive( + ln, + RUSTC_ENV, + &mut self.rustc_env, + Config::parse_env, + ); + config.push_name_value_directive( + ln, + UNSET_RUSTC_ENV, + &mut self.unset_rustc_env, + |r| r, + ); + config.push_name_value_directive( + ln, + FORBID_OUTPUT, + &mut self.forbid_output, + |r| r, + ); + config.set_name_directive( + ln, + CHECK_TEST_LINE_NUMBERS_MATCH, + &mut self.check_test_line_numbers_match, + ); - self.update_pass_mode(ln, cfg, config); - self.update_fail_mode(ln, config); + self.update_pass_mode(ln, cfg, config); + self.update_fail_mode(ln, config); - config.set_name_directive(ln, IGNORE_PASS, &mut self.ignore_pass); + config.set_name_directive(ln, IGNORE_PASS, &mut self.ignore_pass); - if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { - self.normalize_stdout.push(rule); - } - if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stderr") { - self.normalize_stderr.push(rule); - } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { + self.normalize_stdout.push(rule); + } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stderr") { + self.normalize_stderr.push(rule); + } - if let Some(code) = config - .parse_name_value_directive(ln, FAILURE_STATUS) - .and_then(|code| code.trim().parse::().ok()) - { - self.failure_status = Some(code); - } + if let Some(code) = config + .parse_name_value_directive(ln, FAILURE_STATUS) + .and_then(|code| code.trim().parse::().ok()) + { + self.failure_status = Some(code); + } - config.set_name_directive( - ln, - DONT_CHECK_FAILURE_STATUS, - &mut self.dont_check_failure_status, - ); + config.set_name_directive( + ln, + DONT_CHECK_FAILURE_STATUS, + &mut self.dont_check_failure_status, + ); - config.set_name_directive(ln, RUN_RUSTFIX, &mut self.run_rustfix); - config.set_name_directive( - ln, - RUSTFIX_ONLY_MACHINE_APPLICABLE, - &mut self.rustfix_only_machine_applicable, - ); - config.set_name_value_directive( - ln, - ASSEMBLY_OUTPUT, - &mut self.assembly_output, - |r| r.trim().to_string(), - ); - config.set_name_directive(ln, STDERR_PER_BITWIDTH, &mut self.stderr_per_bitwidth); - config.set_name_directive(ln, INCREMENTAL, &mut self.incremental); - - // Unlike the other `name_value_directive`s this needs to be handled manually, - // because it sets a `bool` flag. - if let Some(known_bug) = config.parse_name_value_directive(ln, KNOWN_BUG) { - let known_bug = known_bug.trim(); - if known_bug == "unknown" - || known_bug.split(',').all(|issue_ref| { - issue_ref - .trim() - .split_once('#') - .filter(|(_, number)| { - number.chars().all(|digit| digit.is_numeric()) - }) - .is_some() - }) - { - self.known_bug = true; - } else { + config.set_name_directive(ln, RUN_RUSTFIX, &mut self.run_rustfix); + config.set_name_directive( + ln, + RUSTFIX_ONLY_MACHINE_APPLICABLE, + &mut self.rustfix_only_machine_applicable, + ); + config.set_name_value_directive( + ln, + ASSEMBLY_OUTPUT, + &mut self.assembly_output, + |r| r.trim().to_string(), + ); + config.set_name_directive( + ln, + STDERR_PER_BITWIDTH, + &mut self.stderr_per_bitwidth, + ); + config.set_name_directive(ln, INCREMENTAL, &mut self.incremental); + + // Unlike the other `name_value_directive`s this needs to be handled manually, + // because it sets a `bool` flag. + if let Some(known_bug) = config.parse_name_value_directive(ln, KNOWN_BUG) { + let known_bug = known_bug.trim(); + if known_bug == "unknown" + || known_bug.split(',').all(|issue_ref| { + issue_ref + .trim() + .split_once('#') + .filter(|(_, number)| { + number.chars().all(|digit| digit.is_numeric()) + }) + .is_some() + }) + { + self.known_bug = true; + } else { + panic!( + "Invalid known-bug value: {known_bug}\nIt requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + ); + } + } else if config.parse_name_directive(ln, KNOWN_BUG) { panic!( - "Invalid known-bug value: {known_bug}\nIt requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + "Invalid known-bug attribute, requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." ); } - } else if config.parse_name_directive(ln, KNOWN_BUG) { - panic!( - "Invalid known-bug attribute, requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + + config.set_name_value_directive( + ln, + MIR_UNIT_TEST, + &mut self.mir_unit_test, + |s| s.trim().to_string(), + ); + config.set_name_directive(ln, REMAP_SRC_BASE, &mut self.remap_src_base); + config.set_name_directive( + ln, + COMPARE_OUTPUT_LINES_BY_SUBSET, + &mut self.compare_output_lines_by_subset, ); - } - config.set_name_value_directive(ln, MIR_UNIT_TEST, &mut self.mir_unit_test, |s| { - s.trim().to_string() - }); - config.set_name_directive(ln, REMAP_SRC_BASE, &mut self.remap_src_base); - config.set_name_directive( - ln, - COMPARE_OUTPUT_LINES_BY_SUBSET, - &mut self.compare_output_lines_by_subset, - ); + if let Some(flags) = config.parse_name_value_directive(ln, LLVM_COV_FLAGS) { + self.llvm_cov_flags.extend(split_flags(&flags)); + } + }, + ); - if let Some(flags) = config.parse_name_value_directive(ln, LLVM_COV_FLAGS) { - self.llvm_cov_flags.extend(split_flags(&flags)); - } - }); + if poisoned { + eprintln!("errors encountered during TestProps parsing: {}", testfile.display()); + panic!("errors encountered during TestProps parsing"); + } } if self.should_ice { @@ -628,15 +671,143 @@ pub fn line_directive<'line>( } } -fn iter_header(testfile: &Path, rdr: R, it: &mut dyn FnMut(Option<&str>, &str, usize)) { - iter_header_extra(testfile, rdr, &[], it) +fn iter_header( + mode: Mode, + suite: &str, + poisoned: &mut bool, + testfile: &Path, + rdr: R, + it: &mut dyn FnMut(Option<&str>, &str, &str, usize), +) { + iter_header_extra(mode, suite, poisoned, testfile, rdr, &[], it) } +/// This is generated by collecting directives from ui tests and then extracting their directive +/// names. This is **not** an exhaustive list of all possible directives. Instead, this is a +/// best-effort approximation for diagnostics. +const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ + "aux-build", + "aux-crate", + "build-fail", + "build-pass", + "check-fail", + "check-pass", + "check-run-results", + "check-stdout", + "compile-flags", + "dont-check-compiler-stderr", + "dont-check-compiler-stdout", + "dont-check-failure-status", + "edition", + "error-pattern", + "exec-env", + "failure-status", + "forbid-output", + "force-host", + "ignore-32bit", + "ignore-64bit", + "ignore-aarch64", + "ignore-aarch64-unknown-linux-gnu", + "ignore-android", + "ignore-arm", + "ignore-compare-mode-next-solver", + "ignore-compare-mode-polonius", + "ignore-cross-compile", + "ignore-debug", + "ignore-emscripten", + "ignore-endian-big", + "ignore-freebsd", + "ignore-fuchsia", + "ignore-gnu", + "ignore-haiku", + "ignore-horizon", + "ignore-i686-pc-windows-msvc", + "ignore-ios", + "ignore-llvm-version", + "ignore-macos", + "ignore-msvc", + "ignore-musl", + "ignore-netbsd", + "ignore-nightly", + "ignore-nto", + "ignore-nvptx64", + "ignore-openbsd", + "ignore-pass", + "ignore-sgx", + "ignore-spirv", + "ignore-test", + "ignore-thumbv8m.base-none-eabi", + "ignore-thumbv8m.main-none-eabi", + "ignore-uwp", + "ignore-vxworks", + "ignore-wasm", + "ignore-wasm32", + "ignore-wasm32-bare", + "ignore-windows", + "ignore-x86", + "incremental", + "known-bug", + "min-llvm-version", + "needs-asm-support", + "needs-dlltool", + "needs-dynamic-linking", + "needs-llvm-components", + "needs-profiler-support", + "needs-relocation-model-pic", + "needs-run-enabled", + "needs-sanitizer-address", + "needs-sanitizer-cfi", + "needs-sanitizer-hwaddress", + "needs-sanitizer-leak", + "needs-sanitizer-memory", + "needs-sanitizer-support", + "needs-sanitizer-thread", + "needs-unwind", + "needs-xray", + "no-prefer-dynamic", + "normalize-stderr-32bit", + "normalize-stderr-64bit", + "normalize-stderr-test", + "normalize-stdout-test", + "only-32bit", + "only-64bit", + "only-aarch64", + "only-gnu", + "only-i686-pc-windows-msvc", + "only-linux", + "only-macos", + "only-msvc", + "only-nightly", + "only-wasm32", + "only-windows", + "only-x86", + "only-x86_64", + "only-x86_64-pc-windows-msvc", + "only-x86_64-unknown-linux-gnu", + "pp-exact", + "pretty-expanded", + "regex-error-pattern", + "remap-src-base", + "revisions", + "run-fail", + "run-flags", + "run-pass", + "run-rustfix", + "rustc-env", + "rustfix-only-machine-applicable", + "should-fail", + "stderr-per-bitwidth", + "unset-rustc-env", +]; + fn iter_header_extra( + mode: Mode, + suite: &str, + poisoned: &mut bool, testfile: &Path, rdr: impl Read, extra_directives: &[&str], - it: &mut dyn FnMut(Option<&str>, &str, usize), + it: &mut dyn FnMut(Option<&str>, &str, &str, usize), ) { if testfile.is_dir() { return; @@ -645,15 +816,21 @@ fn iter_header_extra( // Process any extra directives supplied by the caller (e.g. because they // are implied by the test mode), with a dummy line number of 0. for directive in extra_directives { - it(None, directive, 0); + it(None, directive, directive, 0); } - let comment = if testfile.extension().is_some_and(|e| e == "rs") { "//" } else { "#" }; + let comment = if testfile.extension().is_some_and(|e| e == "rs") { + if mode == Mode::Ui && suite == "ui" { "//@" } else { "//" } + } else { + "#" + }; let mut rdr = BufReader::with_capacity(1024, rdr); let mut ln = String::new(); let mut line_number = 0; + let revision_magic_comment = Regex::new("//(\\[.*\\])?~.*").unwrap(); + loop { line_number += 1; ln.clear(); @@ -664,11 +841,56 @@ fn iter_header_extra( // Assume that any directives will be found before the first // module or function. This doesn't seem to be an optimization // with a warm page cache. Maybe with a cold one. + let orig_ln = &ln; let ln = ln.trim(); if ln.starts_with("fn") || ln.starts_with("mod") { return; + + // First try to accept `ui_test` style comments } else if let Some((lncfg, ln)) = line_directive(comment, ln) { - it(lncfg, ln, line_number); + it(lncfg, orig_ln, ln, line_number); + } else if mode == Mode::Ui && suite == "ui" && !revision_magic_comment.is_match(ln) { + let Some((_, rest)) = line_directive("//", ln) else { + continue; + }; + + if rest.trim_start().starts_with(':') { + // This is likely a markdown link: + // `[link_name]: https://example.org` + continue; + } + + let rest = rest.trim_start(); + + for candidate in DIAGNOSTICS_DIRECTIVE_NAMES.iter() { + if rest.starts_with(candidate) { + let Some(prefix_removed) = rest.strip_prefix(candidate) else { + // We have a comment that's *successfully* parsed as an legacy-style + // directive. We emit an error here to warn the user. + *poisoned = true; + eprintln!( + "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", + testfile.display(), + line_number, + line_directive("//", ln), + ); + return; + }; + + if prefix_removed.starts_with([' ', ':']) { + // We have a comment that's *successfully* parsed as an legacy-style + // directive. We emit an error here to warn the user. + *poisoned = true; + eprintln!( + "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", + testfile.display(), + line_number, + line_directive("//", ln), + ); + return; + } + } + } } } } @@ -946,49 +1168,77 @@ pub fn make_test_description( _ => &[], }; - iter_header_extra(path, src, extra_directives, &mut |revision, ln, line_number| { - if revision.is_some() && revision != cfg { - return; - } + let mut local_poisoned = false; + + iter_header_extra( + config.mode, + &config.suite, + &mut local_poisoned, + path, + src, + extra_directives, + &mut |revision, og_ln, ln, line_number| { + if revision.is_some() && revision != cfg { + return; + } - macro_rules! decision { - ($e:expr) => { - match $e { - IgnoreDecision::Ignore { reason } => { - ignore = true; - // The ignore reason must be a &'static str, so we have to leak memory to - // create it. This is fine, as the header is parsed only at the start of - // compiletest so it won't grow indefinitely. - ignore_message = Some(&*Box::leak(Box::::from(reason))); + macro_rules! decision { + ($e:expr) => { + match $e { + IgnoreDecision::Ignore { reason } => { + ignore = true; + // The ignore reason must be a &'static str, so we have to leak memory to + // create it. This is fine, as the header is parsed only at the start of + // compiletest so it won't grow indefinitely. + ignore_message = Some(&*Box::leak(Box::::from(reason))); + } + IgnoreDecision::Error { message } => { + eprintln!("error: {}:{line_number}: {message}", path.display()); + *poisoned = true; + return; + } + IgnoreDecision::Continue => {} } - IgnoreDecision::Error { message } => { - eprintln!("error: {}:{line_number}: {message}", path.display()); - *poisoned = true; - return; - } - IgnoreDecision::Continue => {} + }; + } + + if let Some((_, post)) = og_ln.trim_start().split_once("//") { + let post = post.trim_start(); + if post.starts_with("ignore-tidy") + && config.mode == Mode::Ui + && config.suite == "ui" + { + // not handled by compiletest under the ui test mode and ui test suite. + } else { + decision!(cfg::handle_ignore(config, ln)); } - }; - } + } else { + decision!(cfg::handle_ignore(config, ln)); + } - decision!(cfg::handle_ignore(config, ln)); - decision!(cfg::handle_only(config, ln)); - decision!(needs::handle_needs(&cache.needs, config, ln)); - decision!(ignore_llvm(config, ln)); - decision!(ignore_cdb(config, ln)); - decision!(ignore_gdb(config, ln)); - decision!(ignore_lldb(config, ln)); - - if config.target == "wasm32-unknown-unknown" { - if config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) { - decision!(IgnoreDecision::Ignore { - reason: "ignored when checking the run results on WASM".into(), - }); + decision!(cfg::handle_only(config, ln)); + decision!(needs::handle_needs(&cache.needs, config, ln)); + decision!(ignore_llvm(config, ln)); + decision!(ignore_cdb(config, ln)); + decision!(ignore_gdb(config, ln)); + decision!(ignore_lldb(config, ln)); + + if config.target == "wasm32-unknown-unknown" { + if config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) { + decision!(IgnoreDecision::Ignore { + reason: "ignored when checking the run results on WASM".into(), + }); + } } - } - should_fail |= config.parse_name_directive(ln, "should-fail"); - }); + should_fail |= config.parse_name_directive(ln, "should-fail"); + }, + ); + + if local_poisoned { + eprintln!("errors encountered when trying to make test description: {}", path.display()); + panic!("errors encountered when trying to make test description"); + } // The `should-fail` annotation doesn't apply to pretty tests, // since we run the pretty printer across all tests by default. diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs index c859e8acadebd..274006ae8c16c 100644 --- a/src/tools/compiletest/src/header/tests.rs +++ b/src/tools/compiletest/src/header/tests.rs @@ -210,7 +210,7 @@ fn should_fail() { let d = make_test_description(&config, tn.clone(), p, std::io::Cursor::new(""), None); assert_eq!(d.should_panic, test::ShouldPanic::No); - let d = make_test_description(&config, tn, p, std::io::Cursor::new("// should-fail"), None); + let d = make_test_description(&config, tn, p, std::io::Cursor::new("//@ should-fail"), None); assert_eq!(d.should_panic, test::ShouldPanic::Yes); } @@ -218,7 +218,7 @@ fn should_fail() { fn revisions() { let config: Config = cfg().build(); - assert_eq!(parse_rs(&config, "// revisions: a b c").revisions, vec!["a", "b", "c"],); + assert_eq!(parse_rs(&config, "//@ revisions: a b c").revisions, vec!["a", "b", "c"],); assert_eq!( parse_makefile(&config, "# revisions: hello there").revisions, vec!["hello", "there"], @@ -233,8 +233,8 @@ fn aux_build() { parse_rs( &config, r" - // aux-build: a.rs - // aux-build: b.rs + //@ aux-build: a.rs + //@ aux-build: b.rs " ) .aux, @@ -245,128 +245,128 @@ fn aux_build() { #[test] fn llvm_version() { let config: Config = cfg().llvm_version("8.1.2").build(); - assert!(check_ignore(&config, "// min-llvm-version: 9.0")); + assert!(check_ignore(&config, "//@ min-llvm-version: 9.0")); let config: Config = cfg().llvm_version("9.0.1").build(); - assert!(check_ignore(&config, "// min-llvm-version: 9.2")); + assert!(check_ignore(&config, "//@ min-llvm-version: 9.2")); let config: Config = cfg().llvm_version("9.3.1").build(); - assert!(!check_ignore(&config, "// min-llvm-version: 9.2")); + assert!(!check_ignore(&config, "//@ min-llvm-version: 9.2")); let config: Config = cfg().llvm_version("10.0.0").build(); - assert!(!check_ignore(&config, "// min-llvm-version: 9.0")); + assert!(!check_ignore(&config, "//@ min-llvm-version: 9.0")); } #[test] fn system_llvm_version() { let config: Config = cfg().system_llvm(true).llvm_version("17.0.0").build(); - assert!(check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(check_ignore(&config, "//@ min-system-llvm-version: 18.0")); let config: Config = cfg().system_llvm(true).llvm_version("18.0.0").build(); - assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(!check_ignore(&config, "//@ min-system-llvm-version: 18.0")); let config: Config = cfg().llvm_version("17.0.0").build(); - assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(!check_ignore(&config, "//@ min-system-llvm-version: 18.0")); } #[test] fn ignore_target() { let config: Config = cfg().target("x86_64-unknown-linux-gnu").build(); - assert!(check_ignore(&config, "// ignore-x86_64-unknown-linux-gnu")); - assert!(check_ignore(&config, "// ignore-x86_64")); - assert!(check_ignore(&config, "// ignore-linux")); - assert!(check_ignore(&config, "// ignore-gnu")); - assert!(check_ignore(&config, "// ignore-64bit")); + assert!(check_ignore(&config, "//@ ignore-x86_64-unknown-linux-gnu")); + assert!(check_ignore(&config, "//@ ignore-x86_64")); + assert!(check_ignore(&config, "//@ ignore-linux")); + assert!(check_ignore(&config, "//@ ignore-gnu")); + assert!(check_ignore(&config, "//@ ignore-64bit")); - assert!(!check_ignore(&config, "// ignore-x86")); - assert!(!check_ignore(&config, "// ignore-windows")); - assert!(!check_ignore(&config, "// ignore-msvc")); - assert!(!check_ignore(&config, "// ignore-32bit")); + assert!(!check_ignore(&config, "//@ ignore-x86")); + assert!(!check_ignore(&config, "//@ ignore-windows")); + assert!(!check_ignore(&config, "//@ ignore-msvc")); + assert!(!check_ignore(&config, "//@ ignore-32bit")); } #[test] fn only_target() { let config: Config = cfg().target("x86_64-pc-windows-gnu").build(); - assert!(check_ignore(&config, "// only-x86")); - assert!(check_ignore(&config, "// only-linux")); - assert!(check_ignore(&config, "// only-msvc")); - assert!(check_ignore(&config, "// only-32bit")); + assert!(check_ignore(&config, "//@ only-x86")); + assert!(check_ignore(&config, "//@ only-linux")); + assert!(check_ignore(&config, "//@ only-msvc")); + assert!(check_ignore(&config, "//@ only-32bit")); - assert!(!check_ignore(&config, "// only-x86_64-pc-windows-gnu")); - assert!(!check_ignore(&config, "// only-x86_64")); - assert!(!check_ignore(&config, "// only-windows")); - assert!(!check_ignore(&config, "// only-gnu")); - assert!(!check_ignore(&config, "// only-64bit")); + assert!(!check_ignore(&config, "//@ only-x86_64-pc-windows-gnu")); + assert!(!check_ignore(&config, "//@ only-x86_64")); + assert!(!check_ignore(&config, "//@ only-windows")); + assert!(!check_ignore(&config, "//@ only-gnu")); + assert!(!check_ignore(&config, "//@ only-64bit")); } #[test] fn stage() { let config: Config = cfg().stage_id("stage1-x86_64-unknown-linux-gnu").build(); - assert!(check_ignore(&config, "// ignore-stage1")); - assert!(!check_ignore(&config, "// ignore-stage2")); + assert!(check_ignore(&config, "//@ ignore-stage1")); + assert!(!check_ignore(&config, "//@ ignore-stage2")); } #[test] fn cross_compile() { let config: Config = cfg().host("x86_64-apple-darwin").target("wasm32-unknown-unknown").build(); - assert!(check_ignore(&config, "// ignore-cross-compile")); + assert!(check_ignore(&config, "//@ ignore-cross-compile")); let config: Config = cfg().host("x86_64-apple-darwin").target("x86_64-apple-darwin").build(); - assert!(!check_ignore(&config, "// ignore-cross-compile")); + assert!(!check_ignore(&config, "//@ ignore-cross-compile")); } #[test] fn debugger() { let mut config = cfg().build(); config.debugger = None; - assert!(!check_ignore(&config, "// ignore-cdb")); + assert!(!check_ignore(&config, "//@ ignore-cdb")); config.debugger = Some(Debugger::Cdb); - assert!(check_ignore(&config, "// ignore-cdb")); + assert!(check_ignore(&config, "//@ ignore-cdb")); config.debugger = Some(Debugger::Gdb); - assert!(check_ignore(&config, "// ignore-gdb")); + assert!(check_ignore(&config, "//@ ignore-gdb")); config.debugger = Some(Debugger::Lldb); - assert!(check_ignore(&config, "// ignore-lldb")); + assert!(check_ignore(&config, "//@ ignore-lldb")); } #[test] fn git_hash() { let config: Config = cfg().git_hash(false).build(); - assert!(check_ignore(&config, "// needs-git-hash")); + assert!(check_ignore(&config, "//@ needs-git-hash")); let config: Config = cfg().git_hash(true).build(); - assert!(!check_ignore(&config, "// needs-git-hash")); + assert!(!check_ignore(&config, "//@ needs-git-hash")); } #[test] fn sanitizers() { // Target that supports all sanitizers: let config: Config = cfg().target("x86_64-unknown-linux-gnu").build(); - assert!(!check_ignore(&config, "// needs-sanitizer-address")); - assert!(!check_ignore(&config, "// needs-sanitizer-leak")); - assert!(!check_ignore(&config, "// needs-sanitizer-memory")); - assert!(!check_ignore(&config, "// needs-sanitizer-thread")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-address")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-leak")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-memory")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-thread")); // Target that doesn't support sanitizers: let config: Config = cfg().target("wasm32-unknown-emscripten").build(); - assert!(check_ignore(&config, "// needs-sanitizer-address")); - assert!(check_ignore(&config, "// needs-sanitizer-leak")); - assert!(check_ignore(&config, "// needs-sanitizer-memory")); - assert!(check_ignore(&config, "// needs-sanitizer-thread")); + assert!(check_ignore(&config, "//@ needs-sanitizer-address")); + assert!(check_ignore(&config, "//@ needs-sanitizer-leak")); + assert!(check_ignore(&config, "//@ needs-sanitizer-memory")); + assert!(check_ignore(&config, "//@ needs-sanitizer-thread")); } #[test] fn profiler_support() { let config: Config = cfg().profiler_support(false).build(); - assert!(check_ignore(&config, "// needs-profiler-support")); + assert!(check_ignore(&config, "//@ needs-profiler-support")); let config: Config = cfg().profiler_support(true).build(); - assert!(!check_ignore(&config, "// needs-profiler-support")); + assert!(!check_ignore(&config, "//@ needs-profiler-support")); } #[test] @@ -382,7 +382,7 @@ fn asm_support() { for (target, has_asm) in asms { let config = cfg().target(target).build(); assert_eq!(config.has_asm_support(), has_asm); - assert_eq!(check_ignore(&config, "// needs-asm-support"), !has_asm) + assert_eq!(check_ignore(&config, "//@ needs-asm-support"), !has_asm) } } @@ -390,13 +390,13 @@ fn asm_support() { fn channel() { let config: Config = cfg().channel("beta").build(); - assert!(check_ignore(&config, "// ignore-beta")); - assert!(check_ignore(&config, "// only-nightly")); - assert!(check_ignore(&config, "// only-stable")); + assert!(check_ignore(&config, "//@ ignore-beta")); + assert!(check_ignore(&config, "//@ only-nightly")); + assert!(check_ignore(&config, "//@ only-stable")); - assert!(!check_ignore(&config, "// only-beta")); - assert!(!check_ignore(&config, "// ignore-nightly")); - assert!(!check_ignore(&config, "// ignore-stable")); + assert!(!check_ignore(&config, "//@ only-beta")); + assert!(!check_ignore(&config, "//@ ignore-nightly")); + assert!(!check_ignore(&config, "//@ ignore-stable")); } #[test] @@ -418,7 +418,7 @@ fn test_extract_version_range() { #[should_panic(expected = "Duplicate revision: `rpass1` in line ` rpass1 rpass1`")] fn test_duplicate_revisions() { let config: Config = cfg().build(); - parse_rs(&config, "// revisions: rpass1 rpass1"); + parse_rs(&config, "//@ revisions: rpass1 rpass1"); } #[test] @@ -432,7 +432,7 @@ fn ignore_arch() { for (target, arch) in archs { let config: Config = cfg().target(target).build(); assert!(config.matches_arch(arch), "{target} {arch}"); - assert!(check_ignore(&config, &format!("// ignore-{arch}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{arch}"))); } } @@ -447,7 +447,7 @@ fn matches_os() { for (target, os) in oss { let config = cfg().target(target).build(); assert!(config.matches_os(os), "{target} {os}"); - assert!(check_ignore(&config, &format!("// ignore-{os}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{os}"))); } } @@ -461,7 +461,7 @@ fn matches_env() { for (target, env) in envs { let config: Config = cfg().target(target).build(); assert!(config.matches_env(env), "{target} {env}"); - assert!(check_ignore(&config, &format!("// ignore-{env}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{env}"))); } } @@ -475,7 +475,7 @@ fn matches_abi() { for (target, abi) in abis { let config: Config = cfg().target(target).build(); assert!(config.matches_abi(abi), "{target} {abi}"); - assert!(check_ignore(&config, &format!("// ignore-{abi}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{abi}"))); } } @@ -491,7 +491,7 @@ fn is_big_endian() { for (target, is_big) in endians { let config = cfg().target(target).build(); assert_eq!(config.is_big_endian(), is_big, "{target} {is_big}"); - assert_eq!(check_ignore(&config, "// ignore-endian-big"), is_big); + assert_eq!(check_ignore(&config, "//@ ignore-endian-big"), is_big); } } @@ -506,9 +506,9 @@ fn pointer_width() { for (target, width) in widths { let config: Config = cfg().target(target).build(); assert_eq!(config.get_pointer_width(), width, "{target} {width}"); - assert_eq!(check_ignore(&config, "// ignore-16bit"), width == 16); - assert_eq!(check_ignore(&config, "// ignore-32bit"), width == 32); - assert_eq!(check_ignore(&config, "// ignore-64bit"), width == 64); + assert_eq!(check_ignore(&config, "//@ ignore-16bit"), width == 16); + assert_eq!(check_ignore(&config, "//@ ignore-32bit"), width == 32); + assert_eq!(check_ignore(&config, "//@ ignore-64bit"), width == 64); } } @@ -534,7 +534,7 @@ fn wasm_special() { for (target, pattern, ignore) in ignores { let config: Config = cfg().target(target).build(); assert_eq!( - check_ignore(&config, &format!("// ignore-{pattern}")), + check_ignore(&config, &format!("//@ ignore-{pattern}")), ignore, "{target} {pattern}" ); @@ -555,8 +555,8 @@ fn families() { assert!(config.matches_family(family)); let other = if family == "windows" { "unix" } else { "windows" }; assert!(!config.matches_family(other)); - assert!(check_ignore(&config, &format!("// ignore-{family}"))); - assert!(!check_ignore(&config, &format!("// ignore-{other}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{family}"))); + assert!(!check_ignore(&config, &format!("//@ ignore-{other}"))); } } @@ -566,10 +566,17 @@ fn ignore_mode() { // Indicate profiler support so that "coverage-run" tests aren't skipped. let config: Config = cfg().mode(mode).profiler_support(true).build(); let other = if mode == "coverage-run" { "coverage-map" } else { "coverage-run" }; + assert_ne!(mode, other); assert_eq!(config.mode, Mode::from_str(mode).unwrap()); assert_ne!(config.mode, Mode::from_str(other).unwrap()); - assert!(check_ignore(&config, &format!("// ignore-mode-{mode}"))); - assert!(!check_ignore(&config, &format!("// ignore-mode-{other}"))); + + if mode == "ui" { + assert!(check_ignore(&config, &format!("//@ ignore-mode-{mode}"))); + assert!(!check_ignore(&config, &format!("//@ ignore-mode-{other}"))); + } else { + assert!(check_ignore(&config, &format!("// ignore-mode-{mode}"))); + assert!(!check_ignore(&config, &format!("// ignore-mode-{other}"))); + } } } diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 2115e482c64a1..ab6f899cd3a5e 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -0f806a9812b62c36bdab08d33c14cf2d3ecf4355 +4316d0c6252cb1f833e582dfa68adb98efd5ddfb diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 9319877472e24..db4c4a28debb4 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -1,3 +1,4 @@ +#![feature(generic_nonzero)] #![feature(rustc_private, stmt_expr_attributes)] #![allow( clippy::manual_range_contains, @@ -19,7 +20,7 @@ extern crate rustc_session; extern crate tracing; use std::env::{self, VarError}; -use std::num::NonZeroU64; +use std::num::NonZero; use std::path::PathBuf; use std::str::FromStr; @@ -524,7 +525,7 @@ fn main() { } } } else if let Some(param) = arg.strip_prefix("-Zmiri-track-alloc-id=") { - let ids: Vec = match parse_comma_list::(param) { + let ids: Vec = match parse_comma_list::>(param) { Ok(ids) => ids.into_iter().map(miri::AllocId).collect(), Err(err) => show_error!( diff --git a/src/tools/miri/src/borrow_tracker/mod.rs b/src/tools/miri/src/borrow_tracker/mod.rs index f50aaa292fd77..711323b51c20d 100644 --- a/src/tools/miri/src/borrow_tracker/mod.rs +++ b/src/tools/miri/src/borrow_tracker/mod.rs @@ -1,6 +1,6 @@ use std::cell::RefCell; use std::fmt; -use std::num::NonZeroU64; +use std::num::NonZero; use smallvec::SmallVec; @@ -12,22 +12,22 @@ use crate::*; pub mod stacked_borrows; pub mod tree_borrows; -pub type CallId = NonZeroU64; +pub type CallId = NonZero; /// Tracking pointer provenance #[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct BorTag(NonZeroU64); +pub struct BorTag(NonZero); impl BorTag { pub fn new(i: u64) -> Option { - NonZeroU64::new(i).map(BorTag) + NonZero::new(i).map(BorTag) } pub fn get(&self) -> u64 { self.0.get() } - pub fn inner(&self) -> NonZeroU64 { + pub fn inner(&self) -> NonZero { self.0 } @@ -183,7 +183,7 @@ impl GlobalStateInner { borrow_tracker_method, next_ptr_tag: BorTag::one(), base_ptr_tags: FxHashMap::default(), - next_call_id: NonZeroU64::new(1).unwrap(), + next_call_id: NonZero::new(1).unwrap(), protected_tags: FxHashMap::default(), tracked_pointer_tags, tracked_call_ids, @@ -205,7 +205,7 @@ impl GlobalStateInner { if self.tracked_call_ids.contains(&call_id) { machine.emit_diagnostic(NonHaltingDiagnostic::CreatedCallId(call_id)); } - self.next_call_id = NonZeroU64::new(call_id.get() + 1).unwrap(); + self.next_call_id = NonZero::new(call_id.get() + 1).unwrap(); FrameState { call_id, protected_tags: SmallVec::new() } } diff --git a/src/tools/miri/src/concurrency/init_once.rs b/src/tools/miri/src/concurrency/init_once.rs index 9a848d50341a4..35dcfecbbe334 100644 --- a/src/tools/miri/src/concurrency/init_once.rs +++ b/src/tools/miri/src/concurrency/init_once.rs @@ -1,5 +1,4 @@ use std::collections::VecDeque; -use std::num::NonZeroU32; use rustc_index::Idx; use rustc_middle::ty::layout::TyAndLayout; diff --git a/src/tools/miri/src/concurrency/sync.rs b/src/tools/miri/src/concurrency/sync.rs index 6863119032544..956a02ded0f13 100644 --- a/src/tools/miri/src/concurrency/sync.rs +++ b/src/tools/miri/src/concurrency/sync.rs @@ -1,5 +1,4 @@ use std::collections::{hash_map::Entry, VecDeque}; -use std::num::NonZeroU32; use std::ops::Not; use rustc_data_structures::fx::FxHashMap; @@ -24,12 +23,12 @@ macro_rules! declare_id { /// 0 is used to indicate that the id was not yet assigned and, /// therefore, is not a valid identifier. #[derive(Clone, Copy, Debug, PartialOrd, Ord, PartialEq, Eq, Hash)] - pub struct $name(NonZeroU32); + pub struct $name(std::num::NonZero); impl SyncId for $name { // Panics if `id == 0`. fn from_u32(id: u32) -> Self { - Self(NonZeroU32::new(id).unwrap()) + Self(std::num::NonZero::new(id).unwrap()) } fn to_u32(&self) -> u32 { self.0.get() @@ -42,11 +41,11 @@ macro_rules! declare_id { // therefore, need to shift by one when converting from an index // into a vector. let shifted_idx = u32::try_from(idx).unwrap().checked_add(1).unwrap(); - $name(NonZeroU32::new(shifted_idx).unwrap()) + $name(std::num::NonZero::new(shifted_idx).unwrap()) } fn index(self) -> usize { // See the comment in `Self::new`. - // (This cannot underflow because self is NonZeroU32.) + // (This cannot underflow because `self.0` is `NonZero`.) usize::try_from(self.0.get() - 1).unwrap() } } diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 7825673db00e9..d47f446716b7d 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -1,5 +1,5 @@ use std::fmt::{self, Write}; -use std::num::NonZeroU64; +use std::num::NonZero; use rustc_errors::{DiagnosticBuilder, DiagnosticMessage, Level}; use rustc_span::{SpanData, Symbol, DUMMY_SP}; @@ -110,7 +110,7 @@ pub enum NonHaltingDiagnostic { /// (new_tag, new_perm, (alloc_id, base_offset, orig_tag)) /// /// new_perm is `None` for base tags. - CreatedPointerTag(NonZeroU64, Option, Option<(AllocId, AllocRange, ProvenanceExtra)>), + CreatedPointerTag(NonZero, Option, Option<(AllocId, AllocRange, ProvenanceExtra)>), /// This `Item` was popped from the borrow stack. The string explains the reason. PoppedPointerTag(Item, String), CreatedCallId(CallId), diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 932a35d9bf047..d9b4363d604b4 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -1,6 +1,6 @@ use std::cmp; use std::iter; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::time::Duration; use rustc_apfloat::ieee::{Double, Single}; @@ -572,7 +572,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { fn visit_union( &mut self, _v: &MPlaceTy<'tcx, Provenance>, - _fields: NonZeroUsize, + _fields: NonZero, ) -> InterpResult<'tcx> { bug!("we should have already handled unions in `visit_value`") } diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index adc547aa6cd3f..c567949102f63 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -1,6 +1,7 @@ #![feature(rustc_private)] #![feature(cell_update)] #![feature(float_gamma)] +#![feature(generic_nonzero)] #![feature(map_try_insert)] #![feature(never_type)] #![feature(try_blocks)] diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index f4d6905534465..0645c1f176ef7 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -475,7 +475,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let [id, show_unnamed] = this.check_shim(abi, Abi::Rust, link_name, args)?; let id = this.read_scalar(id)?.to_u64()?; let show_unnamed = this.read_scalar(show_unnamed)?.to_bool()?; - if let Some(id) = std::num::NonZeroU64::new(id) { + if let Some(id) = std::num::NonZero::new(id) { this.print_borrow_state(AllocId(id), show_unnamed)?; } } diff --git a/src/tools/miri/tests/pass/intrinsics.rs b/src/tools/miri/tests/pass/intrinsics.rs index 8e46bd7ad48fb..0dda5aadce20a 100644 --- a/src/tools/miri/tests/pass/intrinsics.rs +++ b/src/tools/miri/tests/pass/intrinsics.rs @@ -37,7 +37,7 @@ fn main() { let mut saw_false = false; for _ in 0..50 { - if unsafe { intrinsics::is_val_statically_known(0) } { + if intrinsics::is_val_statically_known(0) { saw_true = true; } else { saw_false = true; diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 8b0e80a94b0b3..a8aae6f5bc9d3 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -55,11 +55,14 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[ "// CHECK", "// EMIT_MIR", "// compile-flags", + "//@ compile-flags", "// error-pattern", + "//@ error-pattern", "// gdb", "// lldb", "// cdb", "// normalize-stderr-test", + "//@ normalize-stderr-test", ]; // Intentionally written in decimal rather than hex @@ -128,7 +131,15 @@ fn should_ignore(line: &str) -> bool { // This mirrors the regex in src/tools/compiletest/src/runtest.rs, please // update both if either are changed. let re = Regex::new("\\s*//(\\[.*\\])?~.*").unwrap(); - re.is_match(line) || ANNOTATIONS_TO_IGNORE.iter().any(|a| line.contains(a)) + // For `ui_test`-style UI test directives, also ignore + // - `//@[rev] compile-flags` + // - `//@[rev] normalize-stderr-test` + let ui_test_long_directives = + Regex::new("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*") + .unwrap(); + re.is_match(line) + || ANNOTATIONS_TO_IGNORE.iter().any(|a| line.contains(a)) + || ui_test_long_directives.is_match(line) } /// Returns `true` if `line` is allowed to be longer than the normal limit. diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 1dbd221fde574..5517b9fdcece6 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -14,8 +14,9 @@ use std::path::{Path, PathBuf}; // #73494. const ENTRY_LIMIT: usize = 900; // FIXME: The following limits should be reduced eventually. + const ISSUES_ENTRY_LIMIT: usize = 1781; -const ROOT_ENTRY_LIMIT: usize = 870; +const ROOT_ENTRY_LIMIT: usize = 871; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/codegen/is_val_statically_known.rs b/tests/codegen/is_val_statically_known.rs index 8f084f6c54bdc..95f6466b2548f 100644 --- a/tests/codegen/is_val_statically_known.rs +++ b/tests/codegen/is_val_statically_known.rs @@ -11,7 +11,7 @@ pub enum B { #[inline] pub fn _u32(a: u32) -> i32 { - if unsafe { is_val_statically_known(a) } { 1 } else { 0 } + if is_val_statically_known(a) { 1 } else { 0 } } // CHECK-LABEL: @_u32_true( @@ -30,7 +30,7 @@ pub fn _u32_false(a: u32) -> i32 { #[inline] pub fn _bool(b: bool) -> i32 { - if unsafe { is_val_statically_known(b) } { 3 } else { 2 } + if is_val_statically_known(b) { 3 } else { 2 } } // CHECK-LABEL: @_bool_true( diff --git a/tests/ui/README.md b/tests/ui/README.md new file mode 100644 index 0000000000000..c14d0ee78c8df --- /dev/null +++ b/tests/ui/README.md @@ -0,0 +1,35 @@ +# UI Tests + +This folder contains `rustc`'s +[UI tests](https://rustc-dev-guide.rust-lang.org/tests/ui.html). + +## Test Directives (Headers) + +Typically, a UI test will have some test directives / headers which are +special comments that tell compiletest how to build and intepret a test. + +As part of an on-going effort to rewrite compiletest +(see ), a major +change proposal to change legacy compiletest-style headers `// ` +to [`ui_test`](https://github.com/oli-obk/ui_test)-style headers +`//@ ` was accepted (see +. + +An example directive is `ignore-test`. In legacy compiletest style, the header +would be written as + +```rs +// ignore-test +``` + +but in `ui_test` style, the header would be written as + +```rs +//@ ignore-test +``` + +compiletest is changed to accept only `//@` directives for UI tests +(currently), and will reject and report an error if it encounters any +comments `// ` that may be parsed as an legacy compiletest-style +test header. To fix this, you should migrate to the `ui_test`-style header +`//@ `. diff --git a/tests/ui/abi/abi-sysv64-arg-passing.rs b/tests/ui/abi/abi-sysv64-arg-passing.rs index c87353b93a7c0..04942e984a813 100644 --- a/tests/ui/abi/abi-sysv64-arg-passing.rs +++ b/tests/ui/abi/abi-sysv64-arg-passing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks if the "sysv64" calling convention behaves the same as the // "C" calling convention on platforms where both should be the same @@ -24,10 +24,10 @@ // issue-62350-sysv-neg-reg-counts // struct-return -// ignore-android -// ignore-arm -// ignore-aarch64 -// ignore-windows +//@ ignore-android +//@ ignore-arm +//@ ignore-aarch64 +//@ ignore-windows // note: windows is ignored as rust_test_helpers does not have the sysv64 abi on windows diff --git a/tests/ui/abi/abi-sysv64-register-usage.rs b/tests/ui/abi/abi-sysv64-register-usage.rs index 39330693677eb..d2fb2ae53ac73 100644 --- a/tests/ui/abi/abi-sysv64-register-usage.rs +++ b/tests/ui/abi/abi-sysv64-register-usage.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Checks if the correct registers are being used to pass arguments // when the sysv64 ABI is specified. -// ignore-android -// ignore-arm -// ignore-aarch64 -// needs-asm-support +//@ ignore-android +//@ ignore-arm +//@ ignore-aarch64 +//@ needs-asm-support #[cfg(target_arch = "x86_64")] pub extern "sysv64" fn all_the_registers( diff --git a/tests/ui/abi/anon-extern-mod.rs b/tests/ui/abi/anon-extern-mod.rs index 6c7d60d4cb0b4..692cb0850b92d 100644 --- a/tests/ui/abi/anon-extern-mod.rs +++ b/tests/ui/abi/anon-extern-mod.rs @@ -1,6 +1,6 @@ -// run-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/arm-unadjusted-intrinsic.rs b/tests/ui/abi/arm-unadjusted-intrinsic.rs index 33ea792752630..7a728d4b241d9 100644 --- a/tests/ui/abi/arm-unadjusted-intrinsic.rs +++ b/tests/ui/abi/arm-unadjusted-intrinsic.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: arm -//[arm] compile-flags: --target arm-unknown-linux-gnueabi -//[arm] needs-llvm-components: arm -// revisions: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 +//@ build-pass +//@ revisions: arm +//@[arm] compile-flags: --target arm-unknown-linux-gnueabi +//@[arm] needs-llvm-components: arm +//@ revisions: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 #![feature( no_core, lang_items, link_llvm_intrinsics, abi_unadjusted, repr_simd, arm_target_feature, diff --git a/tests/ui/abi/c-stack-as-value.rs b/tests/ui/abi/c-stack-as-value.rs index 5bece0ba2d15b..5b9b6e566f9ac 100644 --- a/tests/ui/abi/c-stack-as-value.rs +++ b/tests/ui/abi/c-stack-as-value.rs @@ -1,6 +1,6 @@ -// run-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/c-stack-returning-int64.rs b/tests/ui/abi/c-stack-returning-int64.rs index fb3cb2083e4b9..5caa395d7a5f9 100644 --- a/tests/ui/abi/c-stack-returning-int64.rs +++ b/tests/ui/abi/c-stack-returning-int64.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test with +//@ ignore-sgx no libc #![feature(rustc_private)] diff --git a/tests/ui/abi/cabi-int-widening.rs b/tests/ui/abi/cabi-int-widening.rs index 1dbab275225cd..6129808244905 100644 --- a/tests/ui/abi/cabi-int-widening.rs +++ b/tests/ui/abi/cabi-int-widening.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs index c6bba7186da71..911438e0d5406 100644 --- a/tests/ui/abi/compatibility.rs +++ b/tests/ui/abi/compatibility.rs @@ -1,57 +1,57 @@ -// check-pass -// revisions: host -// revisions: i686 -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -// revisions: x86-64 -//[x86-64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86-64] needs-llvm-components: x86 -// revisions: x86-64-win -//[x86-64-win] compile-flags: --target x86_64-pc-windows-msvc -//[x86-64-win] needs-llvm-components: x86 -// revisions: arm -//[arm] compile-flags: --target arm-unknown-linux-gnueabi -//[arm] needs-llvm-components: arm -// revisions: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 -// revisions: s390x -//[s390x] compile-flags: --target s390x-unknown-linux-gnu -//[s390x] needs-llvm-components: systemz -// revisions: mips -//[mips] compile-flags: --target mips-unknown-linux-gnu -//[mips] needs-llvm-components: mips -// revisions: mips64 -//[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 -//[mips64] needs-llvm-components: mips -// revisions: sparc -//[sparc] compile-flags: --target sparc-unknown-linux-gnu -//[sparc] needs-llvm-components: sparc -// revisions: sparc64 -//[sparc64] compile-flags: --target sparc64-unknown-linux-gnu -//[sparc64] needs-llvm-components: sparc -// revisions: powerpc64 -//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu -//[powerpc64] needs-llvm-components: powerpc -// revisions: riscv -//[riscv] compile-flags: --target riscv64gc-unknown-linux-gnu -//[riscv] needs-llvm-components: riscv -// revisions: loongarch64 -//[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu -//[loongarch64] needs-llvm-components: loongarch -//[loongarch64] min-llvm-version: 17 -// revisions: wasm -//[wasm] compile-flags: --target wasm32-unknown-unknown -//[wasm] needs-llvm-components: webassembly -// revisions: wasi -//[wasi] compile-flags: --target wasm32-wasi -//[wasi] needs-llvm-components: webassembly -// revisions: bpf -//[bpf] compile-flags: --target bpfeb-unknown-none -//[bpf] needs-llvm-components: bpf -// revisions: m68k -//[m68k] compile-flags: --target m68k-unknown-linux-gnu -//[m68k] needs-llvm-components: m68k +//@ check-pass +//@ revisions: host +//@ revisions: i686 +//@[i686] compile-flags: --target i686-unknown-linux-gnu +//@[i686] needs-llvm-components: x86 +//@ revisions: x86-64 +//@[x86-64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86-64] needs-llvm-components: x86 +//@ revisions: x86-64-win +//@[x86-64-win] compile-flags: --target x86_64-pc-windows-msvc +//@[x86-64-win] needs-llvm-components: x86 +//@ revisions: arm +//@[arm] compile-flags: --target arm-unknown-linux-gnueabi +//@[arm] needs-llvm-components: arm +//@ revisions: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 +//@ revisions: s390x +//@[s390x] compile-flags: --target s390x-unknown-linux-gnu +//@[s390x] needs-llvm-components: systemz +//@ revisions: mips +//@[mips] compile-flags: --target mips-unknown-linux-gnu +//@[mips] needs-llvm-components: mips +//@ revisions: mips64 +//@[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 +//@[mips64] needs-llvm-components: mips +//@ revisions: sparc +//@[sparc] compile-flags: --target sparc-unknown-linux-gnu +//@[sparc] needs-llvm-components: sparc +//@ revisions: sparc64 +//@[sparc64] compile-flags: --target sparc64-unknown-linux-gnu +//@[sparc64] needs-llvm-components: sparc +//@ revisions: powerpc64 +//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu +//@[powerpc64] needs-llvm-components: powerpc +//@ revisions: riscv +//@[riscv] compile-flags: --target riscv64gc-unknown-linux-gnu +//@[riscv] needs-llvm-components: riscv +//@ revisions: loongarch64 +//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu +//@[loongarch64] needs-llvm-components: loongarch +//@[loongarch64] min-llvm-version: 17 +//@ revisions: wasm +//@[wasm] compile-flags: --target wasm32-unknown-unknown +//@[wasm] needs-llvm-components: webassembly +//@ revisions: wasi +//@[wasi] compile-flags: --target wasm32-wasi +//@[wasi] needs-llvm-components: webassembly +//@ revisions: bpf +//@[bpf] compile-flags: --target bpfeb-unknown-none +//@[bpf] needs-llvm-components: bpf +//@ revisions: m68k +//@[m68k] compile-flags: --target m68k-unknown-linux-gnu +//@[m68k] needs-llvm-components: m68k // FIXME: disabled on nvptx64 since the target ABI fails the sanity check // see https://github.com/rust-lang/rust/issues/117480 /* revisions: nvptx64 diff --git a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs index 77168be5374b2..47402acc93ae4 100644 --- a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs +++ b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:anon-extern-mod-cross-crate-1.rs -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with extern crate anonexternmod; diff --git a/tests/ui/abi/cross-crate/duplicated-external-mods.rs b/tests/ui/abi/cross-crate/duplicated-external-mods.rs index 05a279a3014ba..d1fc3b7c910a3 100644 --- a/tests/ui/abi/cross-crate/duplicated-external-mods.rs +++ b/tests/ui/abi/cross-crate/duplicated-external-mods.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:anon-extern-mod-cross-crate-1.rs -// aux-build:anon-extern-mod-cross-crate-1.rs -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with extern crate anonexternmod; diff --git a/tests/ui/abi/debug.rs b/tests/ui/abi/debug.rs index 77715ee4023b8..ceb88d4e9faa8 100644 --- a/tests/ui/abi/debug.rs +++ b/tests/ui/abi/debug.rs @@ -1,11 +1,11 @@ -// normalize-stderr-test "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" -// normalize-stderr-test "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" -// normalize-stderr-test "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" -// normalize-stderr-test "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL" +//@ normalize-stderr-test "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr-test "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" +//@ normalize-stderr-test "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" +//@ normalize-stderr-test "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL" // This pattern is prepared for when we account for alignment in the niche. -// normalize-stderr-test "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" +//@ normalize-stderr-test "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" // Some attributes are only computed for release builds: -// compile-flags: -O +//@ compile-flags: -O #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/abi/explicit_repr_rust.rs b/tests/ui/abi/explicit_repr_rust.rs index 4f8cab3bf0efb..6b131227d5bab 100644 --- a/tests/ui/abi/explicit_repr_rust.rs +++ b/tests/ui/abi/explicit_repr_rust.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[repr(Rust)] struct A; diff --git a/tests/ui/abi/extern/extern-call-deep.rs b/tests/ui/abi/extern/extern-call-deep.rs index db5f2ca652fa5..0c549e6222b90 100644 --- a/tests/ui/abi/extern/extern-call-deep.rs +++ b/tests/ui/abi/extern/extern-call-deep.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-emscripten blows the JS stack +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-emscripten blows the JS stack #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-call-deep2.rs b/tests/ui/abi/extern/extern-call-deep2.rs index 60e8db1592e94..80c492e302216 100644 --- a/tests/ui/abi/extern/extern-call-deep2.rs +++ b/tests/ui/abi/extern/extern-call-deep2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/extern/extern-call-direct.rs b/tests/ui/abi/extern/extern-call-direct.rs index 19b901d49a428..70b6eb085c3e7 100644 --- a/tests/ui/abi/extern/extern-call-direct.rs +++ b/tests/ui/abi/extern/extern-call-direct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test direct calls to extern fns. diff --git a/tests/ui/abi/extern/extern-call-indirect.rs b/tests/ui/abi/extern/extern-call-indirect.rs index 886e8f6be1099..3e874e2654258 100644 --- a/tests/ui/abi/extern/extern-call-indirect.rs +++ b/tests/ui/abi/extern/extern-call-indirect.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-call-scrub.rs b/tests/ui/abi/extern/extern-call-scrub.rs index ff33cf31af85e..873f5d2e7748f 100644 --- a/tests/ui/abi/extern/extern-call-scrub.rs +++ b/tests/ui/abi/extern/extern-call-scrub.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // This time we're testing repeatedly going up and down both stacks to // make sure the stack pointers are maintained properly in both // directions -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/extern/extern-crosscrate.rs b/tests/ui/abi/extern/extern-crosscrate.rs index 123ce20ca262f..5a4a339882d51 100644 --- a/tests/ui/abi/extern/extern-crosscrate.rs +++ b/tests/ui/abi/extern/extern-crosscrate.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:extern-crosscrate-source.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:extern-crosscrate-source.rs +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-pass-TwoU16s.rs b/tests/ui/abi/extern/extern-pass-TwoU16s.rs index cff25511cc95d..69afe7b25321d 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU16s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU16s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU32s.rs b/tests/ui/abi/extern/extern-pass-TwoU32s.rs index 03a8ecf241da8..ca7630fe42156 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU32s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU32s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU64s.rs b/tests/ui/abi/extern/extern-pass-TwoU64s.rs index 8bbc987c821b4..a8f629f0906d5 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU64s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU64s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU8s.rs b/tests/ui/abi/extern/extern-pass-TwoU8s.rs index 55a53c250bf38..2bf913e4e4f60 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU8s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU8s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-char.rs b/tests/ui/abi/extern/extern-pass-char.rs index 2b10d26d1ddf2..a0ebd43e07677 100644 --- a/tests/ui/abi/extern/extern-pass-char.rs +++ b/tests/ui/abi/extern/extern-pass-char.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a function that takes/returns a u8. diff --git a/tests/ui/abi/extern/extern-pass-double.rs b/tests/ui/abi/extern/extern-pass-double.rs index 0b556c99e8d0b..11e23abb78262 100644 --- a/tests/ui/abi/extern/extern-pass-double.rs +++ b/tests/ui/abi/extern/extern-pass-double.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/extern/extern-pass-empty.rs b/tests/ui/abi/extern/extern-pass-empty.rs index ee974f6dbdeed..f168f5faa1786 100644 --- a/tests/ui/abi/extern/extern-pass-empty.rs +++ b/tests/ui/abi/extern/extern-pass-empty.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] // FIXME: this test is inherently not FFI-safe. // Test a foreign function that accepts empty struct. -// pretty-expanded FIXME #23616 -// ignore-msvc -// ignore-emscripten emcc asserts on an empty struct as an argument +//@ pretty-expanded FIXME #23616 +//@ ignore-msvc +//@ ignore-emscripten emcc asserts on an empty struct as an argument #[repr(C)] struct TwoU8s { diff --git a/tests/ui/abi/extern/extern-pass-u32.rs b/tests/ui/abi/extern/extern-pass-u32.rs index c9b8d52cf5be9..69570fc935813 100644 --- a/tests/ui/abi/extern/extern-pass-u32.rs +++ b/tests/ui/abi/extern/extern-pass-u32.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a function that takes/returns a u32. diff --git a/tests/ui/abi/extern/extern-pass-u64.rs b/tests/ui/abi/extern/extern-pass-u64.rs index 5103129abaa4d..43880b96c2d67 100644 --- a/tests/ui/abi/extern/extern-pass-u64.rs +++ b/tests/ui/abi/extern/extern-pass-u64.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a call to a function that takes/returns a u64. diff --git a/tests/ui/abi/extern/extern-return-TwoU16s.rs b/tests/ui/abi/extern/extern-return-TwoU16s.rs index 2551c93a76541..723933cd7e737 100644 --- a/tests/ui/abi/extern/extern-return-TwoU16s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU16s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU16s { one: u16, diff --git a/tests/ui/abi/extern/extern-return-TwoU32s.rs b/tests/ui/abi/extern/extern-return-TwoU32s.rs index 70a42895d91df..7795e4f040101 100644 --- a/tests/ui/abi/extern/extern-return-TwoU32s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU32s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU32s { one: u32, diff --git a/tests/ui/abi/extern/extern-return-TwoU64s.rs b/tests/ui/abi/extern/extern-return-TwoU64s.rs index dd264fb9c196b..a980b7f1cdeae 100644 --- a/tests/ui/abi/extern/extern-return-TwoU64s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU64s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU64s { one: u64, diff --git a/tests/ui/abi/extern/extern-return-TwoU8s.rs b/tests/ui/abi/extern/extern-return-TwoU8s.rs index b60387aed99de..73263a9da0488 100644 --- a/tests/ui/abi/extern/extern-return-TwoU8s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU8s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU8s { one: u8, diff --git a/tests/ui/abi/foreign/foreign-call-no-runtime.rs b/tests/ui/abi/foreign/foreign-call-no-runtime.rs index d5b90a3592b3e..7f847d55721c3 100644 --- a/tests/ui/abi/foreign/foreign-call-no-runtime.rs +++ b/tests/ui/abi/foreign/foreign-call-no-runtime.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support #![feature(rustc_private)] diff --git a/tests/ui/abi/foreign/foreign-dupe.rs b/tests/ui/abi/foreign/foreign-dupe.rs index 3c9f0f583d487..6469f5d2ce72b 100644 --- a/tests/ui/abi/foreign/foreign-dupe.rs +++ b/tests/ui/abi/foreign/foreign-dupe.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:foreign_lib.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:foreign_lib.rs +//@ ignore-wasm32-bare no libc to test ffi with // Check that we can still call duplicated extern (imported) functions // which were declared in another crate. See issues #32740 and #32783. diff --git a/tests/ui/abi/foreign/foreign-fn-with-byval.rs b/tests/ui/abi/foreign/foreign-fn-with-byval.rs index e20ee0da45d9d..89bbf40669363 100644 --- a/tests/ui/abi/foreign/foreign-fn-with-byval.rs +++ b/tests/ui/abi/foreign/foreign-fn-with-byval.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes, improper_ctypes_definitions)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct S { diff --git a/tests/ui/abi/foreign/foreign-no-abi.rs b/tests/ui/abi/foreign/foreign-no-abi.rs index 3f4f70c99e6a8..84e21660f1c7e 100644 --- a/tests/ui/abi/foreign/foreign-no-abi.rs +++ b/tests/ui/abi/foreign/foreign-no-abi.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // ABI is cdecl by default -// ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] diff --git a/tests/ui/abi/foreign/invoke-external-foreign.rs b/tests/ui/abi/foreign/invoke-external-foreign.rs index dbd2b4ad8655e..5eccfaf204bfc 100644 --- a/tests/ui/abi/foreign/invoke-external-foreign.rs +++ b/tests/ui/abi/foreign/invoke-external-foreign.rs @@ -1,12 +1,12 @@ -// run-pass -// aux-build:foreign_lib.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:foreign_lib.rs +//@ ignore-wasm32-bare no libc to test ffi with // The purpose of this test is to check that we can // successfully (and safely) invoke external, cdecl // functions from outside the crate. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate foreign_lib; diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs index 4600bd090cc64..34d3b91d404f5 100644 --- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs @@ -4,9 +4,9 @@ // This is basically the same test as tests/ui/simd/target-feature-mixup.rs but for floats and // without #[repr(simd)] -// run-pass -// ignore-emscripten -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten +//@ ignore-sgx no processes #![feature(avx512_target_feature)] diff --git a/tests/ui/abi/issue-28676.rs b/tests/ui/abi/issue-28676.rs index 347a840296ddd..2457d1d79579e 100644 --- a/tests/ui/abi/issue-28676.rs +++ b/tests/ui/abi/issue-28676.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct Quad { diff --git a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs index 29b2405189cc3..21720db5143ba 100644 --- a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs +++ b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct QuadFloats { diff --git a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs index fba880d4f9a52..316ac7a4880ee 100644 --- a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs +++ b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm +//@ run-pass +//@ ignore-wasm #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/tests/ui/abi/lib-defaults.rs b/tests/ui/abi/lib-defaults.rs index cd0b0bb232116..e3caccee62c16 100644 --- a/tests/ui/abi/lib-defaults.rs +++ b/tests/ui/abi/lib-defaults.rs @@ -1,9 +1,9 @@ -// run-pass -// dont-check-compiler-stderr (rust-lang/rust#54222) +//@ run-pass +//@ dont-check-compiler-stderr (rust-lang/rust#54222) -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with -// compile-flags: -lrust_test_helpers +//@ compile-flags: -lrust_test_helpers #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs index b3392b9c60715..ff515b6626937 100644 --- a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs +++ b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/nullable-pointer-ffi-compat.rs b/tests/ui/abi/nullable-pointer-ffi-compat.rs index 0647a18c3c45d..f94f838723a56 100644 --- a/tests/ui/abi/nullable-pointer-ffi-compat.rs +++ b/tests/ui/abi/nullable-pointer-ffi-compat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #11303, #11040: // This would previously crash on i686 Linux due to abi differences // between returning an Option and T, where T is a non nullable diff --git a/tests/ui/abi/numbers-arithmetic/i128-ffi.rs b/tests/ui/abi/numbers-arithmetic/i128-ffi.rs index 19edf9779f35e..26d65e8bbf853 100644 --- a/tests/ui/abi/numbers-arithmetic/i128-ffi.rs +++ b/tests/ui/abi/numbers-arithmetic/i128-ffi.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] // MSVC doesn't support 128 bit integers, and other Windows // C compilers have very inconsistent views on how the ABI // should look like. -// ignore-windows -// ignore-32bit +//@ ignore-windows +//@ ignore-32bit #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/relocation_model_pic.rs b/tests/ui/abi/relocation_model_pic.rs index cca2e8db74d75..e15b47acf1094 100644 --- a/tests/ui/abi/relocation_model_pic.rs +++ b/tests/ui/abi/relocation_model_pic.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C relocation-model=pic -// needs-relocation-model-pic +//@ run-pass +//@ compile-flags: -C relocation-model=pic +//@ needs-relocation-model-pic #![feature(cfg_relocation_model)] diff --git a/tests/ui/abi/riscv-discoverability-guidance.rs b/tests/ui/abi/riscv-discoverability-guidance.rs index 361ed8f3d9106..a09a0edba85b2 100644 --- a/tests/ui/abi/riscv-discoverability-guidance.rs +++ b/tests/ui/abi/riscv-discoverability-guidance.rs @@ -1,10 +1,10 @@ // ignore-tidy-linelength -// revisions: riscv32 riscv64 +//@ revisions: riscv32 riscv64 // -// [riscv32] needs-llvm-components: riscv -// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib -// [riscv64] needs-llvm-components: riscv -// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib +//@ [riscv32] needs-llvm-components: riscv +//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib +//@ [riscv64] needs-llvm-components: riscv +//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib #![no_core] #![feature( no_core, diff --git a/tests/ui/abi/rustcall-generic.rs b/tests/ui/abi/rustcall-generic.rs index 6eaccc436b699..fdd419b4e3c14 100644 --- a/tests/ui/abi/rustcall-generic.rs +++ b/tests/ui/abi/rustcall-generic.rs @@ -1,6 +1,6 @@ -// revisions: normal opt -// check-pass -//[opt] compile-flags: -Zmir-opt-level=3 +//@ revisions: normal opt +//@ check-pass +//@[opt] compile-flags: -Zmir-opt-level=3 #![feature(unboxed_closures, tuple_trait)] diff --git a/tests/ui/abi/segfault-no-out-of-stack.rs b/tests/ui/abi/segfault-no-out-of-stack.rs index ab2b308948509..d03cff8009877 100644 --- a/tests/ui/abi/segfault-no-out-of-stack.rs +++ b/tests/ui/abi/segfault-no-out-of-stack.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-emscripten can't run commands -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) +//@ ignore-emscripten can't run commands +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs index fb47867175491..5451b72d97925 100644 --- a/tests/ui/abi/stack-probes-lto.rs +++ b/tests/ui/abi/stack-probes-lto.rs @@ -1,14 +1,14 @@ -// revisions: aarch64 x32 x64 -// run-pass -//[aarch64] only-aarch64 -//[aarch64] min-llvm-version: 18 -//[x32] only-x86 -//[x64] only-x86_64 -// ignore-sgx no processes -// ignore-musl FIXME #31506 -// ignore-fuchsia no exception handler registered for segfault -// compile-flags: -C lto -// no-prefer-dynamic -// ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino +//@ revisions: aarch64 x32 x64 +//@ run-pass +//@[aarch64] only-aarch64 +//@[aarch64] min-llvm-version: 18 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ ignore-sgx no processes +//@ ignore-musl FIXME #31506 +//@ ignore-fuchsia no exception handler registered for segfault +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino include!("stack-probes.rs"); diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs index e5c7a1a680481..32d4d6cd31e68 100644 --- a/tests/ui/abi/stack-probes.rs +++ b/tests/ui/abi/stack-probes.rs @@ -1,13 +1,13 @@ -// revisions: aarch64 x32 x64 -// run-pass -//[aarch64] only-aarch64 -//[aarch64] min-llvm-version: 18 -//[x32] only-x86 -//[x64] only-x86_64 -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no exception handler registered for segfault -// ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino +//@ revisions: aarch64 x32 x64 +//@ run-pass +//@[aarch64] only-aarch64 +//@[aarch64] min-llvm-version: 18 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no exception handler registered for segfault +//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino use std::env; use std::mem::MaybeUninit; diff --git a/tests/ui/abi/stack-protector.rs b/tests/ui/abi/stack-protector.rs index e94aa816d90a1..29332861977b7 100644 --- a/tests/ui/abi/stack-protector.rs +++ b/tests/ui/abi/stack-protector.rs @@ -1,9 +1,9 @@ -// run-pass -// only-x86_64-unknown-linux-gnu -// revisions: ssp no-ssp -// [ssp] compile-flags: -Z stack-protector=all -// compile-flags: -C opt-level=2 -// compile-flags: -g +//@ run-pass +//@ only-x86_64-unknown-linux-gnu +//@ revisions: ssp no-ssp +//@ [ssp] compile-flags: -Z stack-protector=all +//@ compile-flags: -C opt-level=2 +//@ compile-flags: -g use std::env; use std::process::{Command, ExitStatus}; diff --git a/tests/ui/abi/statics/static-mut-foreign.rs b/tests/ui/abi/statics/static-mut-foreign.rs index eb732e7c2c31f..fdd775da57842 100644 --- a/tests/ui/abi/statics/static-mut-foreign.rs +++ b/tests/ui/abi/statics/static-mut-foreign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Constants (static variables) can be used to match in patterns, but mutable // statics cannot. This ensures that there's some form of error if this is // attempted. -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/struct-enums/struct-return.rs b/tests/ui/abi/struct-enums/struct-return.rs index 1a7984ea5cd17..b00f8d8cc2e7b 100644 --- a/tests/ui/abi/struct-enums/struct-return.rs +++ b/tests/ui/abi/struct-enums/struct-return.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/abi/union/union-c-interop.rs b/tests/ui/abi/union/union-c-interop.rs index 00f04d5b7ff3d..508b07a98336f 100644 --- a/tests/ui/abi/union/union-c-interop.rs +++ b/tests/ui/abi/union/union-c-interop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Clone, Copy)] #[repr(C)] diff --git a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs index a32cc6500f829..376630b8d33f7 100644 --- a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs +++ b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(improper_ctypes_definitions)] #![feature(unsized_tuple_coercion)] #![feature(unsized_fn_params)] diff --git a/tests/ui/abi/unsupported.rs b/tests/ui/abi/unsupported.rs index 9b99e51905da2..cd7e76c7158f4 100644 --- a/tests/ui/abi/unsupported.rs +++ b/tests/ui/abi/unsupported.rs @@ -1,17 +1,17 @@ -// revisions: x64 i686 aarch64 arm riscv32 riscv64 +//@ revisions: x64 i686 aarch64 arm riscv32 riscv64 // -// [x64] needs-llvm-components: x86 -// [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -// [i686] needs-llvm-components: x86 -// [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib -// [aarch64] needs-llvm-components: aarch64 -// [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib -// [arm] needs-llvm-components: arm -// [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -// [riscv32] needs-llvm-components: riscv -// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib -// [riscv64] needs-llvm-components: riscv -// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib +//@ [x64] needs-llvm-components: x86 +//@ [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib +//@ [i686] needs-llvm-components: x86 +//@ [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib +//@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib +//@ [arm] needs-llvm-components: arm +//@ [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib +//@ [riscv32] needs-llvm-components: riscv +//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib +//@ [riscv64] needs-llvm-components: riscv +//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib #![no_core] #![feature( no_core, diff --git a/tests/ui/abi/variadic-ffi.rs b/tests/ui/abi/variadic-ffi.rs index 1862177005f93..6b42f268bb9e4 100644 --- a/tests/ui/abi/variadic-ffi.rs +++ b/tests/ui/abi/variadic-ffi.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #![feature(c_variadic)] use std::ffi::VaList; diff --git a/tests/ui/abi/x86stdcall.rs b/tests/ui/abi/x86stdcall.rs index d1cf1319fb090..c1bd35b80d266 100644 --- a/tests/ui/abi/x86stdcall.rs +++ b/tests/ui/abi/x86stdcall.rs @@ -1,5 +1,5 @@ -// run-pass -// only-windows +//@ run-pass +//@ only-windows // GetLastError doesn't seem to work with stack switching #[cfg(windows)] diff --git a/tests/ui/abi/x86stdcall2.rs b/tests/ui/abi/x86stdcall2.rs index 4d508ecb2422e..a61d0cbcfdf03 100644 --- a/tests/ui/abi/x86stdcall2.rs +++ b/tests/ui/abi/x86stdcall2.rs @@ -1,5 +1,5 @@ -// run-pass -// only-windows +//@ run-pass +//@ only-windows #![allow(non_camel_case_types)] pub type HANDLE = usize; diff --git a/tests/ui/alias-uninit-value.rs b/tests/ui/alias-uninit-value.rs index 932c93245e6f9..3223bac18201d 100644 --- a/tests/ui/alias-uninit-value.rs +++ b/tests/ui/alias-uninit-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] @@ -7,7 +7,7 @@ // Regression test for issue #374 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum sty { ty_nil, } diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs index cd06423e3a557..a50535ab726fd 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs index 4f76257fc7267..4bd4ab4570c4c 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs index ea9ad39a70d81..f0985d74456f5 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/default-alloc-error-hook.rs b/tests/ui/alloc-error/default-alloc-error-hook.rs index 8be09500f4e4e..a8a2027cc4518 100644 --- a/tests/ui/alloc-error/default-alloc-error-hook.rs +++ b/tests/ui/alloc-error/default-alloc-error-hook.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::alloc::{Layout, handle_alloc_error}; use std::env; diff --git a/tests/ui/allocator/auxiliary/custom-as-global.rs b/tests/ui/allocator/auxiliary/custom-as-global.rs index a5e96e7750184..89e7e779b097f 100644 --- a/tests/ui/allocator/auxiliary/custom-as-global.rs +++ b/tests/ui/allocator/auxiliary/custom-as-global.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/custom.rs b/tests/ui/allocator/auxiliary/custom.rs index b0ec9ab09299f..b6835307dec2f 100644 --- a/tests/ui/allocator/auxiliary/custom.rs +++ b/tests/ui/allocator/auxiliary/custom.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(allocator_api)] #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/helper.rs b/tests/ui/allocator/auxiliary/helper.rs index 008fb3501d90d..c638546a9475f 100644 --- a/tests/ui/allocator/auxiliary/helper.rs +++ b/tests/ui/allocator/auxiliary/helper.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/allocator/auxiliary/system-allocator.rs b/tests/ui/allocator/auxiliary/system-allocator.rs index 97b86bbc96d07..bfd04e1e0ba2e 100644 --- a/tests/ui/allocator/auxiliary/system-allocator.rs +++ b/tests/ui/allocator/auxiliary/system-allocator.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/system-allocator2.rs b/tests/ui/allocator/auxiliary/system-allocator2.rs index 97b86bbc96d07..bfd04e1e0ba2e 100644 --- a/tests/ui/allocator/auxiliary/system-allocator2.rs +++ b/tests/ui/allocator/auxiliary/system-allocator2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/custom-in-block.rs b/tests/ui/allocator/custom-in-block.rs index 12813a1fc8bd4..4a8501aa3d266 100644 --- a/tests/ui/allocator/custom-in-block.rs +++ b/tests/ui/allocator/custom-in-block.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs extern crate custom; extern crate helper; diff --git a/tests/ui/allocator/custom-in-submodule.rs b/tests/ui/allocator/custom-in-submodule.rs index ea341b1ac14ae..f9b1b5237d791 100644 --- a/tests/ui/allocator/custom-in-submodule.rs +++ b/tests/ui/allocator/custom-in-submodule.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs extern crate custom; extern crate helper; diff --git a/tests/ui/allocator/custom.rs b/tests/ui/allocator/custom.rs index 10cbc23c427f0..97de54dd4d6e3 100644 --- a/tests/ui/allocator/custom.rs +++ b/tests/ui/allocator/custom.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] #![feature(slice_ptr_get)] diff --git a/tests/ui/allocator/hygiene.rs b/tests/ui/allocator/hygiene.rs index 9bd8406a27608..9bf04e20f18b1 100644 --- a/tests/ui/allocator/hygiene.rs +++ b/tests/ui/allocator/hygiene.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs #![allow(nonstandard_style)] diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs index 2323cf46d6f1e..f4825a910b0ca 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs @@ -1,11 +1,11 @@ -// run-pass -// ignore-android no libc -// ignore-emscripten no libc -// ignore-sgx no libc -// ignore-wasm32 no libc -// only-linux -// compile-flags:-C panic=abort -// aux-build:helper.rs +//@ run-pass +//@ ignore-android no libc +//@ ignore-emscripten no libc +//@ ignore-sgx no libc +//@ ignore-wasm32 no libc +//@ only-linux +//@ compile-flags:-C panic=abort +//@ aux-build:helper.rs #![feature(rustc_private, lang_items)] #![feature(alloc_error_handler)] diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs index 488434a9a720c..1fa1797bf9cb0 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs @@ -1,11 +1,11 @@ -// run-pass -// ignore-android no libc -// ignore-emscripten no libc -// ignore-sgx no libc -// ignore-wasm32 no libc -// only-linux -// compile-flags:-C panic=abort -// aux-build:helper.rs +//@ run-pass +//@ ignore-android no libc +//@ ignore-emscripten no libc +//@ ignore-sgx no libc +//@ ignore-wasm32 no libc +//@ only-linux +//@ compile-flags:-C panic=abort +//@ aux-build:helper.rs #![feature(rustc_private, lang_items)] #![no_std] diff --git a/tests/ui/allocator/object-safe.rs b/tests/ui/allocator/object-safe.rs index fae7ab7fe3319..1c1f4fe0bf6ce 100644 --- a/tests/ui/allocator/object-safe.rs +++ b/tests/ui/allocator/object-safe.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that `Allocator` is object safe, this allows for polymorphic allocators diff --git a/tests/ui/allocator/two-allocators2.rs b/tests/ui/allocator/two-allocators2.rs index 6dfefe19c7fa4..b3bb4598c778b 100644 --- a/tests/ui/allocator/two-allocators2.rs +++ b/tests/ui/allocator/two-allocators2.rs @@ -1,6 +1,6 @@ -// aux-build:system-allocator.rs -// no-prefer-dynamic -// error-pattern: the `#[global_allocator]` in +//@ aux-build:system-allocator.rs +//@ no-prefer-dynamic +//@ error-pattern: the `#[global_allocator]` in extern crate system_allocator; diff --git a/tests/ui/allocator/two-allocators3.rs b/tests/ui/allocator/two-allocators3.rs index 31dea2d4478f7..0cb3879666da3 100644 --- a/tests/ui/allocator/two-allocators3.rs +++ b/tests/ui/allocator/two-allocators3.rs @@ -1,7 +1,7 @@ -// aux-build:system-allocator.rs -// aux-build:system-allocator2.rs -// no-prefer-dynamic -// error-pattern: the `#[global_allocator]` in +//@ aux-build:system-allocator.rs +//@ aux-build:system-allocator2.rs +//@ no-prefer-dynamic +//@ error-pattern: the `#[global_allocator]` in extern crate system_allocator; diff --git a/tests/ui/allocator/xcrate-use.rs b/tests/ui/allocator/xcrate-use.rs index edd4df75e8b83..5934d73981305 100644 --- a/tests/ui/allocator/xcrate-use.rs +++ b/tests/ui/allocator/xcrate-use.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// aux-build:custom.rs -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] #![feature(slice_ptr_get)] diff --git a/tests/ui/allocator/xcrate-use2.rs b/tests/ui/allocator/xcrate-use2.rs index d8478fb5eaa41..a48b0beeb07e3 100644 --- a/tests/ui/allocator/xcrate-use2.rs +++ b/tests/ui/allocator/xcrate-use2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass -// aux-build:custom.rs -// aux-build:custom-as-global.rs -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:custom-as-global.rs +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] diff --git a/tests/ui/annotate-snippet/auxiliary/multispan.rs b/tests/ui/annotate-snippet/auxiliary/multispan.rs index c05d15643dbb1..b5f1ed9b56a9e 100644 --- a/tests/ui/annotate-snippet/auxiliary/multispan.rs +++ b/tests/ui/annotate-snippet/auxiliary/multispan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/annotate-snippet/missing-type.rs b/tests/ui/annotate-snippet/missing-type.rs index f5facc16b3180..ea1c2521103e8 100644 --- a/tests/ui/annotate-snippet/missing-type.rs +++ b/tests/ui/annotate-snippet/missing-type.rs @@ -1,5 +1,5 @@ -// compile-flags: --error-format human-annotate-rs -Z unstable-options -// error-pattern:cannot find type `Iter` in this scope +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ error-pattern:cannot find type `Iter` in this scope pub fn main() { let x: Iter; diff --git a/tests/ui/annotate-snippet/multiple-files.rs b/tests/ui/annotate-snippet/multiple-files.rs index 981cdbb10a917..c67a31d8f0714 100644 --- a/tests/ui/annotate-snippet/multiple-files.rs +++ b/tests/ui/annotate-snippet/multiple-files.rs @@ -1,5 +1,5 @@ -// aux-build:other_file.rs -// compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ aux-build:other_file.rs +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options extern crate other_file; diff --git a/tests/ui/annotate-snippet/multispan.rs b/tests/ui/annotate-snippet/multispan.rs index d7241b8036492..c9ec4043e374f 100644 --- a/tests/ui/annotate-snippet/multispan.rs +++ b/tests/ui/annotate-snippet/multispan.rs @@ -1,6 +1,6 @@ -// aux-build:multispan.rs -// error-pattern:hello to you, too! -// compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ aux-build:multispan.rs +//@ error-pattern:hello to you, too! +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options #![feature(proc_macro_hygiene)] diff --git a/tests/ui/anon-params/anon-params-denied-2018.rs b/tests/ui/anon-params/anon-params-denied-2018.rs index 95533cf3dfbf1..3602b401f857b 100644 --- a/tests/ui/anon-params/anon-params-denied-2018.rs +++ b/tests/ui/anon-params/anon-params-denied-2018.rs @@ -1,6 +1,6 @@ // Tests that anonymous parameters are a hard error in edition 2018. -// edition:2018 +//@ edition:2018 trait T { fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)` diff --git a/tests/ui/anon-params/anon-params-deprecated.fixed b/tests/ui/anon-params/anon-params-deprecated.fixed index 8ec1d41a70985..2a506d4b3e1c6 100644 --- a/tests/ui/anon-params/anon-params-deprecated.fixed +++ b/tests/ui/anon-params/anon-params-deprecated.fixed @@ -1,9 +1,9 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// check-pass -// edition:2015 -// run-rustfix +//@ check-pass +//@ edition:2015 +//@ run-rustfix #[allow(dead_code)] trait T { diff --git a/tests/ui/anon-params/anon-params-deprecated.rs b/tests/ui/anon-params/anon-params-deprecated.rs index 108ba60a02f58..e436760f31452 100644 --- a/tests/ui/anon-params/anon-params-deprecated.rs +++ b/tests/ui/anon-params/anon-params-deprecated.rs @@ -1,9 +1,9 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// check-pass -// edition:2015 -// run-rustfix +//@ check-pass +//@ edition:2015 +//@ run-rustfix #[allow(dead_code)] trait T { diff --git a/tests/ui/anon-params/anon-params-edition-hygiene.rs b/tests/ui/anon-params/anon-params-edition-hygiene.rs index 0b69081d4eda5..607412f44c4c3 100644 --- a/tests/ui/anon-params/anon-params-edition-hygiene.rs +++ b/tests/ui/anon-params/anon-params-edition-hygiene.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:anon-params-edition-hygiene.rs +//@ edition:2018 +//@ aux-build:anon-params-edition-hygiene.rs // This warning is still surfaced #![allow(anonymous_parameters)] diff --git a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs index 2836565529315..188f5350256da 100644 --- a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs +++ b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! generate_trait_2015_ident { diff --git a/tests/ui/argument-suggestions/issue-109425.fixed b/tests/ui/argument-suggestions/issue-109425.fixed index 143ddf99586f0..5d96f457c883e 100644 --- a/tests/ui/argument-suggestions/issue-109425.fixed +++ b/tests/ui/argument-suggestions/issue-109425.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn f() {} fn i(_: u32) {} diff --git a/tests/ui/argument-suggestions/issue-109425.rs b/tests/ui/argument-suggestions/issue-109425.rs index a845c419555c2..bb9d37ee0ff9e 100644 --- a/tests/ui/argument-suggestions/issue-109425.rs +++ b/tests/ui/argument-suggestions/issue-109425.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn f() {} fn i(_: u32) {} 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 8ee225f5cdfea..30338e0ab87cd 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 +//@ run-pass #![allow(dead_code)] #![allow(stable_features)] diff --git a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs index 577853a4e9111..4614df44084f2 100644 --- a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs +++ b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs index 2b3ece67b34a0..d64df4f7e4d9a 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] // Test that we cleanup a fixed size Box<[D; k]> properly when D has a // destructor. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs index c0ca458750776..5ca3d60ad1dc9 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] // Test that we cleanup dynamic sized Box<[D]> properly when D has a // destructor. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/array-slice-vec/byte-literals.rs b/tests/ui/array-slice-vec/byte-literals.rs index 2649c2eac33db..950c118c07f61 100644 --- a/tests/ui/array-slice-vec/byte-literals.rs +++ b/tests/ui/array-slice-vec/byte-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // 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 b112dcaef3e42..cb5072564b2e1 100644 --- a/tests/ui/array-slice-vec/cast-in-array-size.rs +++ b/tests/ui/array-slice-vec/cast-in-array-size.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // issues #10618 and #16382 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 const SIZE: isize = 25; diff --git a/tests/ui/array-slice-vec/check-static-slice.rs b/tests/ui/array-slice-vec/check-static-slice.rs index 1c607d1342610..820a9ea4fff17 100644 --- a/tests/ui/array-slice-vec/check-static-slice.rs +++ b/tests/ui/array-slice-vec/check-static-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that the various ways of getting to a reference to a vec (both sized // and unsized) work properly. 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 c6d311148d07e..894ca2f930277 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 +//@ run-pass // Ensure that we can copy out of a fixed-size array. // diff --git a/tests/ui/array-slice-vec/destructure-array-1.rs b/tests/ui/array-slice-vec/destructure-array-1.rs index 74d893ee5b282..09eef1dc67fcd 100644 --- a/tests/ui/array-slice-vec/destructure-array-1.rs +++ b/tests/ui/array-slice-vec/destructure-array-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that we can do a destructuring bind of a fixed-size array, // even when the element type has a destructor. diff --git a/tests/ui/array-slice-vec/dst-raw-slice.rs b/tests/ui/array-slice-vec/dst-raw-slice.rs index 371d16f093a74..f1281f4e302f2 100644 --- a/tests/ui/array-slice-vec/dst-raw-slice.rs +++ b/tests/ui/array-slice-vec/dst-raw-slice.rs @@ -1,8 +1,8 @@ // Test bounds checking for DST raw slices -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/array-slice-vec/empty-mutable-vec.rs b/tests/ui/array-slice-vec/empty-mutable-vec.rs index 91ab280b9c7ec..663071bf61335 100644 --- a/tests/ui/array-slice-vec/empty-mutable-vec.rs +++ b/tests/ui/array-slice-vec/empty-mutable-vec.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_mut)] diff --git a/tests/ui/array-slice-vec/estr-slice.rs b/tests/ui/array-slice-vec/estr-slice.rs index cd2c17220655a..6cac3d721f197 100644 --- a/tests/ui/array-slice-vec/estr-slice.rs +++ b/tests/ui/array-slice-vec/estr-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/array-slice-vec/evec-slice.rs b/tests/ui/array-slice-vec/evec-slice.rs index 4bdf2dbdd6e4b..0ed9cd1f6f883 100644 --- a/tests/ui/array-slice-vec/evec-slice.rs +++ b/tests/ui/array-slice-vec/evec-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] pub fn main() { diff --git a/tests/ui/array-slice-vec/fixed_length_copy.rs b/tests/ui/array-slice-vec/fixed_length_copy.rs index f73173e848472..64f8480f8af3a 100644 --- a/tests/ui/array-slice-vec/fixed_length_copy.rs +++ b/tests/ui/array-slice-vec/fixed_length_copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/array-slice-vec/huge-largest-array.rs b/tests/ui/array-slice-vec/huge-largest-array.rs index 9e78162c8136b..ff314a4ab1d6f 100644 --- a/tests/ui/array-slice-vec/huge-largest-array.rs +++ b/tests/ui/array-slice-vec/huge-largest-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/infer_array_len.rs b/tests/ui/array-slice-vec/infer_array_len.rs index 547c1f5727f19..2a342681e0fcb 100644 --- a/tests/ui/array-slice-vec/infer_array_len.rs +++ b/tests/ui/array-slice-vec/infer_array_len.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; impl From for [u8; 2] { diff --git a/tests/ui/array-slice-vec/issue-15730.rs b/tests/ui/array-slice-vec/issue-15730.rs index dacffd154fc29..fe9d908a1ff7c 100644 --- a/tests/ui/array-slice-vec/issue-15730.rs +++ b/tests/ui/array-slice-vec/issue-15730.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut array = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/issue-18425.rs b/tests/ui/array-slice-vec/issue-18425.rs index 354c14a756aaf..22345718ad8e4 100644 --- a/tests/ui/array-slice-vec/issue-18425.rs +++ b/tests/ui/array-slice-vec/issue-18425.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that codegen doesn't ICE when codegenning an array repeat // expression with a count of 1 and a non-Copy element type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let _ = [Box::new(1_usize); 1]; 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 e22aef96330bb..67657859408b0 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 +//@ run-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 75b309a4839b0..809c001b0797f 100644 --- a/tests/ui/array-slice-vec/mut-vstore-expr.rs +++ b/tests/ui/array-slice-vec/mut-vstore-expr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: &mut [isize] = &mut [ 1, 2, 3 ]; diff --git a/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs b/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs index 7afb9d8461f85..ca78db63ce0b6 100644 --- a/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs +++ b/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1() { diff --git a/tests/ui/array-slice-vec/mutable-alias-vec.rs b/tests/ui/array-slice-vec/mutable-alias-vec.rs index 98dd46824fa6e..870a4f12fecfb 100644 --- a/tests/ui/array-slice-vec/mutable-alias-vec.rs +++ b/tests/ui/array-slice-vec/mutable-alias-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn grow(v: &mut Vec ) { v.push(1); diff --git a/tests/ui/array-slice-vec/nested-vec-1.rs b/tests/ui/array-slice-vec/nested-vec-1.rs index 02a3ccf46f2ea..60dbb5e5061ab 100644 --- a/tests/ui/array-slice-vec/nested-vec-1.rs +++ b/tests/ui/array-slice-vec/nested-vec-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that using the `vec!` macro nested within itself works diff --git a/tests/ui/array-slice-vec/nested-vec-2.rs b/tests/ui/array-slice-vec/nested-vec-2.rs index d4a704d767efc..3897a52a1cb1f 100644 --- a/tests/ui/array-slice-vec/nested-vec-2.rs +++ b/tests/ui/array-slice-vec/nested-vec-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that using the `vec!` macro nested within itself works // when the contents implement Drop diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs index b3ae683a8a61a..ce61401aab451 100644 --- a/tests/ui/array-slice-vec/nested-vec-3.rs +++ b/tests/ui/array-slice-vec/nested-vec-3.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that using the `vec!` macro nested within itself works when // the contents implement Drop and we hit a panic in the middle of diff --git a/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs b/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs index 454f94be8762c..95ff2539a5da0 100644 --- a/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs +++ b/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: [isize; 3] = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs b/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs index 17cf7e335b9a9..dd767241ddbf8 100644 --- a/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs +++ b/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/array-slice-vec/repeated-vector-syntax.rs b/tests/ui/array-slice-vec/repeated-vector-syntax.rs index 4458eb06dd5f3..ee6114e0dc792 100644 --- a/tests/ui/array-slice-vec/repeated-vector-syntax.rs +++ b/tests/ui/array-slice-vec/repeated-vector-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [ [true]; 512 ]; diff --git a/tests/ui/array-slice-vec/show-boxed-slice.rs b/tests/ui/array-slice-vec/show-boxed-slice.rs index 3ae3686e423fe..89521eaf3fef1 100644 --- a/tests/ui/array-slice-vec/show-boxed-slice.rs +++ b/tests/ui/array-slice-vec/show-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct Foo(#[allow(dead_code)] Box<[u8]>); diff --git a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs index 83b08a3db4c37..7aa8a251fec5e 100644 --- a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs +++ b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions #![feature(iter_to_slice)] diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs index 3829078aba592..4436b63385641 100644 --- a/tests/ui/array-slice-vec/slice-panic-1.rs +++ b/tests/ui/array-slice-vec/slice-panic-1.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs index d83c611d3bb55..4bd139884244e 100644 --- a/tests/ui/array-slice-vec/slice-panic-2.rs +++ b/tests/ui/array-slice-vec/slice-panic-2.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/array-slice-vec/slice.rs b/tests/ui/array-slice-vec/slice.rs index a514e20277365..2adcd96f5984a 100644 --- a/tests/ui/array-slice-vec/slice.rs +++ b/tests/ui/array-slice-vec/slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test slicing sugar. diff --git a/tests/ui/array-slice-vec/slice_binary_search.rs b/tests/ui/array-slice-vec/slice_binary_search.rs index 4d8022ecba73c..1981afa7f0590 100644 --- a/tests/ui/array-slice-vec/slice_binary_search.rs +++ b/tests/ui/array-slice-vec/slice_binary_search.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test binary_search_by_key lifetime. Issue #34683 diff --git a/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs b/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs index 073280d0fab1f..31f59f8f7242d 100644 --- a/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs +++ b/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for https://github.com/rust-lang/rust/issues/53485#issuecomment-885393452 #![feature(is_sorted)] diff --git a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs index 5a6283e9f13df..273dd500c0895 100644 --- a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs +++ b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs @@ -1,6 +1,6 @@ // Test that slice subslice patterns are correctly handled in const evaluation. -// run-pass +//@ run-pass #[derive(PartialEq, Debug, Clone)] struct N(u8); diff --git a/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs b/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs index 0b793fa0120e9..4995a8420081c 100644 --- a/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs +++ b/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs @@ -1,6 +1,6 @@ // Test that array subslice patterns are correctly handled in const evaluation. -// run-pass +//@ run-pass #[derive(PartialEq, Debug, Clone)] struct N(u8); diff --git a/tests/ui/array-slice-vec/suggest-array-length.fixed b/tests/ui/array-slice-vec/suggest-array-length.fixed index 867c18a7d5e6b..29f85da56e578 100644 --- a/tests/ui/array-slice-vec/suggest-array-length.fixed +++ b/tests/ui/array-slice-vec/suggest-array-length.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, non_upper_case_globals)] fn main() { diff --git a/tests/ui/array-slice-vec/suggest-array-length.rs b/tests/ui/array-slice-vec/suggest-array-length.rs index f66b3d4a89991..82d871cf8754a 100644 --- a/tests/ui/array-slice-vec/suggest-array-length.rs +++ b/tests/ui/array-slice-vec/suggest-array-length.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, non_upper_case_globals)] fn main() { diff --git a/tests/ui/array-slice-vec/variance-vec-covariant.rs b/tests/ui/array-slice-vec/variance-vec-covariant.rs index d7e64132f89e7..710f7e24aa4aa 100644 --- a/tests/ui/array-slice-vec/variance-vec-covariant.rs +++ b/tests/ui/array-slice-vec/variance-vec-covariant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that vec is now covariant in its argument type. diff --git a/tests/ui/array-slice-vec/vec-dst.rs b/tests/ui/array-slice-vec/vec-dst.rs index c58ddbc423946..39575fbfa14f4 100644 --- a/tests/ui/array-slice-vec/vec-dst.rs +++ b/tests/ui/array-slice-vec/vec-dst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Tests for indexing into Box<[T; n]>/& [T; n] diff --git a/tests/ui/array-slice-vec/vec-fixed-length.rs b/tests/ui/array-slice-vec/vec-fixed-length.rs index 908c39c7951c0..70ceb7f85bc5b 100644 --- a/tests/ui/array-slice-vec/vec-fixed-length.rs +++ b/tests/ui/array-slice-vec/vec-fixed-length.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/vec-late-init.rs b/tests/ui/array-slice-vec/vec-late-init.rs index 5dee36082561c..039f3838ec256 100644 --- a/tests/ui/array-slice-vec/vec-late-init.rs +++ b/tests/ui/array-slice-vec/vec-late-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/array-slice-vec/vec-macro-no-std.rs b/tests/ui/array-slice-vec/vec-macro-no-std.rs index 443895f7c4824..76a1b4951d6e3 100644 --- a/tests/ui/array-slice-vec/vec-macro-no-std.rs +++ b/tests/ui/array-slice-vec/vec-macro-no-std.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// ignore-emscripten no no_std executables +//@ ignore-emscripten no no_std executables #![feature(lang_items, start, rustc_private)] #![no_std] diff --git a/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs b/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs index bde01037181a9..7437de5d805fa 100644 --- a/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs +++ b/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn one() -> i32 { 1 } 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 6c95bd50007f5..65ca182b61567 100644 --- a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs +++ b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 macro_rules! vec [ ($($e:expr),*) => ({ diff --git a/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs b/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs index f7a51f9c45696..eca4a1cc37fba 100644 --- a/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs +++ b/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/array-slice-vec/vec-matching-autoslice.rs b/tests/ui/array-slice-vec/vec-matching-autoslice.rs index f839cd62b1a5d..b790cc16ec101 100644 --- a/tests/ui/array-slice-vec/vec-matching-autoslice.rs +++ b/tests/ui/array-slice-vec/vec-matching-autoslice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/vec-matching-fixed.rs b/tests/ui/array-slice-vec/vec-matching-fixed.rs index fdeb7e4fda640..c7fc09ffd2a87 100644 --- a/tests/ui/array-slice-vec/vec-matching-fixed.rs +++ b/tests/ui/array-slice-vec/vec-matching-fixed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn a() { let x = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/vec-matching-fold.rs b/tests/ui/array-slice-vec/vec-matching-fold.rs index 998899271e411..a38c16062087c 100644 --- a/tests/ui/array-slice-vec/vec-matching-fold.rs +++ b/tests/ui/array-slice-vec/vec-matching-fold.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs b/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs index ed34f074a929a..2493eca2c3aa0 100644 --- a/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs +++ b/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/array-slice-vec/vec-matching.rs b/tests/ui/array-slice-vec/vec-matching.rs index 7009244aa189a..ea882518b644e 100644 --- a/tests/ui/array-slice-vec/vec-matching.rs +++ b/tests/ui/array-slice-vec/vec-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn a() { let x = [1]; diff --git a/tests/ui/array-slice-vec/vec-overrun.rs b/tests/ui/array-slice-vec/vec-overrun.rs index bdc7d507d5305..10f8350869fb8 100644 --- a/tests/ui/array-slice-vec/vec-overrun.rs +++ b/tests/ui/array-slice-vec/vec-overrun.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 1 but the index is 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 1 but the index is 2 +//@ ignore-emscripten no processes fn main() { let v: Vec = vec![10]; 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 3e0e18873ab0f..4af38d9cf3286 100644 --- a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs +++ b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs @@ -1,5 +1,5 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _a = [0; 1 as usize]; } diff --git a/tests/ui/array-slice-vec/vec-tail-matching.rs b/tests/ui/array-slice-vec/vec-tail-matching.rs index 5f1699227d8e6..aaeb05e6d77a7 100644 --- a/tests/ui/array-slice-vec/vec-tail-matching.rs +++ b/tests/ui/array-slice-vec/vec-tail-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { string: &'static str 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 e2055f551acc4..b130c6bc2ffb5 100644 --- a/tests/ui/array-slice-vec/vector-no-ann-2.rs +++ b/tests/ui/array-slice-vec/vector-no-ann-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _quux: Box> = Box::new(Vec::new()); diff --git a/tests/ui/artificial-block.rs b/tests/ui/artificial-block.rs index 2e383e1a7c685..037163b4174e2 100644 --- a/tests/ui/artificial-block.rs +++ b/tests/ui/artificial-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { { return 3; } } diff --git a/tests/ui/as-precedence.rs b/tests/ui/as-precedence.rs index feb0cb30ccacc..5021a3b677f2b 100644 --- a/tests/ui/as-precedence.rs +++ b/tests/ui/as-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused_parens)] fn main() { diff --git a/tests/ui/asm/aarch64/bad-options.rs b/tests/ui/asm/aarch64/bad-options.rs index 6172027a2fa5a..33b77367a4fb1 100644 --- a/tests/ui/asm/aarch64/bad-options.rs +++ b/tests/ui/asm/aarch64/bad-options.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/aarch64/bad-reg.rs b/tests/ui/asm/aarch64/bad-reg.rs index f71418161f297..1e54b6505db87 100644 --- a/tests/ui/asm/aarch64/bad-reg.rs +++ b/tests/ui/asm/aarch64/bad-reg.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/const.rs b/tests/ui/asm/aarch64/const.rs index 0b02c99abf662..a1fadb2115ba6 100644 --- a/tests/ui/asm/aarch64/const.rs +++ b/tests/ui/asm/aarch64/const.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// run-pass -// needs-asm-support +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/duplicate-options.fixed b/tests/ui/asm/aarch64/duplicate-options.fixed index fa1dd4aef5d1c..b221c7c78bc7c 100644 --- a/tests/ui/asm/aarch64/duplicate-options.fixed +++ b/tests/ui/asm/aarch64/duplicate-options.fixed @@ -1,6 +1,6 @@ -// only-aarch64 -// needs-asm-support -// run-rustfix +//@ only-aarch64 +//@ needs-asm-support +//@ run-rustfix use std::arch::asm; diff --git a/tests/ui/asm/aarch64/duplicate-options.rs b/tests/ui/asm/aarch64/duplicate-options.rs index b2d3fe7d9a737..44a45187d2d5a 100644 --- a/tests/ui/asm/aarch64/duplicate-options.rs +++ b/tests/ui/asm/aarch64/duplicate-options.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// needs-asm-support -// run-rustfix +//@ only-aarch64 +//@ needs-asm-support +//@ run-rustfix use std::arch::asm; diff --git a/tests/ui/asm/aarch64/interpolated-idents.rs b/tests/ui/asm/aarch64/interpolated-idents.rs index e87a88434991b..3d9cf763e4d72 100644 --- a/tests/ui/asm/aarch64/interpolated-idents.rs +++ b/tests/ui/asm/aarch64/interpolated-idents.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// needs-asm-support +//@ only-aarch64 +//@ needs-asm-support use std::arch::asm; macro_rules! m { diff --git a/tests/ui/asm/aarch64/llvm-58384.rs b/tests/ui/asm/aarch64/llvm-58384.rs index 308f789082959..b11b2f3c0b9ae 100644 --- a/tests/ui/asm/aarch64/llvm-58384.rs +++ b/tests/ui/asm/aarch64/llvm-58384.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// run-pass -// needs-asm-support +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support // Test that we properly work around this LLVM issue: // https://github.com/llvm/llvm-project/issues/58384 diff --git a/tests/ui/asm/aarch64/may_unwind.rs b/tests/ui/asm/aarch64/may_unwind.rs index cfb75078264df..a483008c3649e 100644 --- a/tests/ui/asm/aarch64/may_unwind.rs +++ b/tests/ui/asm/aarch64/may_unwind.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// run-pass -// needs-asm-support -// needs-unwind +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support +//@ needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/asm/aarch64/parse-error.rs b/tests/ui/asm/aarch64/parse-error.rs index 9b8170840bb07..fbb1e08df912c 100644 --- a/tests/ui/asm/aarch64/parse-error.rs +++ b/tests/ui/asm/aarch64/parse-error.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/srcloc.rs b/tests/ui/asm/aarch64/srcloc.rs index dbb6cbb9437b5..c635fa6ba700a 100644 --- a/tests/ui/asm/aarch64/srcloc.rs +++ b/tests/ui/asm/aarch64/srcloc.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// build-fail -// needs-asm-support -// compile-flags: -Ccodegen-units=1 +//@ only-aarch64 +//@ build-fail +//@ needs-asm-support +//@ compile-flags: -Ccodegen-units=1 use std::arch::asm; diff --git a/tests/ui/asm/aarch64/sym.rs b/tests/ui/asm/aarch64/sym.rs index 6a6cdb00d5173..87c6d5ddfdc48 100644 --- a/tests/ui/asm/aarch64/sym.rs +++ b/tests/ui/asm/aarch64/sym.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// only-linux -// needs-asm-support -// run-pass +//@ only-aarch64 +//@ only-linux +//@ needs-asm-support +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/asm/aarch64/type-check-2-2.rs b/tests/ui/asm/aarch64/type-check-2-2.rs index 89f2b3bb7d0fe..f442ce81476ed 100644 --- a/tests/ui/asm/aarch64/type-check-2-2.rs +++ b/tests/ui/asm/aarch64/type-check-2-2.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/aarch64/type-check-2.rs b/tests/ui/asm/aarch64/type-check-2.rs index 1c71c1185d465..ba68cdd26d94c 100644 --- a/tests/ui/asm/aarch64/type-check-2.rs +++ b/tests/ui/asm/aarch64/type-check-2.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/aarch64/type-check-3.rs b/tests/ui/asm/aarch64/type-check-3.rs index 77524ba7aa5e4..3fc8e5060693a 100644 --- a/tests/ui/asm/aarch64/type-check-3.rs +++ b/tests/ui/asm/aarch64/type-check-3.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(repr_simd, asm_const)] diff --git a/tests/ui/asm/aarch64/type-check-4.rs b/tests/ui/asm/aarch64/type-check-4.rs index a14010481fc1d..f00b4d4c46fa5 100644 --- a/tests/ui/asm/aarch64/type-check-4.rs +++ b/tests/ui/asm/aarch64/type-check-4.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(repr_simd, asm_const)] diff --git a/tests/ui/asm/bad-arch.rs b/tests/ui/asm/bad-arch.rs index 3eeb76f3d0035..f84b9944b3666 100644 --- a/tests/ui/asm/bad-arch.rs +++ b/tests/ui/asm/bad-arch.rs @@ -1,5 +1,5 @@ -// compile-flags: --target sparc-unknown-linux-gnu -// needs-llvm-components: sparc +//@ compile-flags: --target sparc-unknown-linux-gnu +//@ needs-llvm-components: sparc #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/bad-template.rs b/tests/ui/asm/bad-template.rs index b70da4921c20f..41a906e32a4ba 100644 --- a/tests/ui/asm/bad-template.rs +++ b/tests/ui/asm/bad-template.rs @@ -1,10 +1,10 @@ -// revisions: x86_64 aarch64 +//@ revisions: x86_64 aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-linux-gnu -// [aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@ [x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@ [aarch64] compile-flags: --target aarch64-unknown-linux-gnu -// [x86_64] needs-llvm-components: x86 -// [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] needs-llvm-components: x86 +//@ [aarch64] needs-llvm-components: aarch64 #![feature(no_core, lang_items, rustc_attrs, asm_const)] #![no_core] diff --git a/tests/ui/asm/const-error.rs b/tests/ui/asm/const-error.rs index 4e14becf74bef..f2cead399b6fb 100644 --- a/tests/ui/asm/const-error.rs +++ b/tests/ui/asm/const-error.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// needs-asm-support +//@ only-x86_64 +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/generic-const.rs b/tests/ui/asm/generic-const.rs index caa9b7dbce6a8..133d093d200ec 100644 --- a/tests/ui/asm/generic-const.rs +++ b/tests/ui/asm/generic-const.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// build-pass +//@ needs-asm-support +//@ build-pass #![feature(asm_const)] diff --git a/tests/ui/asm/inline-syntax.rs b/tests/ui/asm/inline-syntax.rs index a8c6c71b805f2..6da1b89ed6740 100644 --- a/tests/ui/asm/inline-syntax.rs +++ b/tests/ui/asm/inline-syntax.rs @@ -1,17 +1,17 @@ -// revisions: x86_64 arm arm_llvm_18 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] check-pass -//[x86_64] needs-llvm-components: x86 -//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf -//[arm] build-fail -//[arm] needs-llvm-components: arm -//[arm] ignore-llvm-version: 18 - 99 +//@ revisions: x86_64 arm arm_llvm_18 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] check-pass +//@[x86_64] needs-llvm-components: x86 +//@[arm] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[arm] build-fail +//@[arm] needs-llvm-components: arm +//@[arm] ignore-llvm-version: 18 - 99 //Newer LLVM produces extra error notes. -//[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf -//[arm_llvm_18] build-fail -//[arm_llvm_18] needs-llvm-components: arm -//[arm_llvm_18] min-llvm-version: 18 -// needs-asm-support +//@[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[arm_llvm_18] build-fail +//@[arm_llvm_18] needs-llvm-components: arm +//@[arm_llvm_18] min-llvm-version: 18 +//@ needs-asm-support #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/ui/asm/issue-113788.rs b/tests/ui/asm/issue-113788.rs index 903b444767f6a..3b11e253eda27 100644 --- a/tests/ui/asm/issue-113788.rs +++ b/tests/ui/asm/issue-113788.rs @@ -1,6 +1,6 @@ // test that "error: arguments for inline assembly must be copyable" doesn't show up in this code -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 fn main() { let peb: *const PEB; //~ ERROR cannot find type `PEB` in this scope [E0412] unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); } diff --git a/tests/ui/asm/issue-72570.rs b/tests/ui/asm/issue-72570.rs index ac589de2303f9..2b0e3628de566 100644 --- a/tests/ui/asm/issue-72570.rs +++ b/tests/ui/asm/issue-72570.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/asm/issue-85247.rs b/tests/ui/asm/issue-85247.rs index e64f5e8af5238..b55b1876ac8c2 100644 --- a/tests/ui/asm/issue-85247.rs +++ b/tests/ui/asm/issue-85247.rs @@ -1,10 +1,10 @@ -// revisions: ropi rwpi +//@ revisions: ropi rwpi -// [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi -// [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi -// [ropi] needs-llvm-components: arm -// [rwpi] needs-llvm-components: arm -// [ropi] build-pass +//@ [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi +//@ [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi +//@ [ropi] needs-llvm-components: arm +//@ [rwpi] needs-llvm-components: arm +//@ [ropi] build-pass #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-87802.rs b/tests/ui/asm/issue-87802.rs index 5b2e636c29f2b..d93de9ee57fa3 100644 --- a/tests/ui/asm/issue-87802.rs +++ b/tests/ui/asm/issue-87802.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 // Make sure rustc doesn't ICE on asm! when output type is !. use std::arch::asm; diff --git a/tests/ui/asm/issue-89305.rs b/tests/ui/asm/issue-89305.rs index 05677912dff47..84425c4a8f647 100644 --- a/tests/ui/asm/issue-89305.rs +++ b/tests/ui/asm/issue-89305.rs @@ -1,8 +1,8 @@ // Regression test for #89305, where a variable was erroneously reported // as both unused and possibly-uninitialized. -// check-pass -// needs-asm-support +//@ check-pass +//@ needs-asm-support #![warn(unused)] diff --git a/tests/ui/asm/issue-92378.rs b/tests/ui/asm/issue-92378.rs index 809b0d1555ae4..3cbdabf8134f4 100644 --- a/tests/ui/asm/issue-92378.rs +++ b/tests/ui/asm/issue-92378.rs @@ -1,7 +1,7 @@ -// compile-flags: --target armv5te-unknown-linux-gnueabi -// needs-llvm-components: arm -// needs-asm-support -// build-pass +//@ compile-flags: --target armv5te-unknown-linux-gnueabi +//@ needs-llvm-components: arm +//@ needs-asm-support +//@ build-pass #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-97490.rs b/tests/ui/asm/issue-97490.rs index 37862cf349cfc..5f364a22bc437 100644 --- a/tests/ui/asm/issue-97490.rs +++ b/tests/ui/asm/issue-97490.rs @@ -1,6 +1,6 @@ -// check-pass -// only-x86_64 -// needs-asm-support +//@ check-pass +//@ only-x86_64 +//@ needs-asm-support pub type Yes = extern "sysv64" fn(&'static u8) -> !; diff --git a/tests/ui/asm/issue-99071.rs b/tests/ui/asm/issue-99071.rs index bb6201861dff6..bc3f781551148 100644 --- a/tests/ui/asm/issue-99071.rs +++ b/tests/ui/asm/issue-99071.rs @@ -1,6 +1,6 @@ -// compile-flags: --target thumbv6m-none-eabi -// needs-llvm-components: arm -// needs-asm-support +//@ compile-flags: --target thumbv6m-none-eabi +//@ needs-llvm-components: arm +//@ needs-asm-support #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-99122-2.rs b/tests/ui/asm/issue-99122-2.rs index cfb9fd90a55b7..6ac5f059a624e 100644 --- a/tests/ui/asm/issue-99122-2.rs +++ b/tests/ui/asm/issue-99122-2.rs @@ -1,6 +1,6 @@ -// check-pass -// needs-asm-support -// only-x86_64 +//@ check-pass +//@ needs-asm-support +//@ only-x86_64 // This demonstrates why we need to erase regions before sized check in intrinsicck diff --git a/tests/ui/asm/issue-99122.rs b/tests/ui/asm/issue-99122.rs index 744a563d3d147..e2675dc431d96 100644 --- a/tests/ui/asm/issue-99122.rs +++ b/tests/ui/asm/issue-99122.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 pub unsafe fn test() { let pointer = 1u32 as *const _; diff --git a/tests/ui/asm/may_unwind.rs b/tests/ui/asm/may_unwind.rs index b9479c44bf11d..216408b38733a 100644 --- a/tests/ui/asm/may_unwind.rs +++ b/tests/ui/asm/may_unwind.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-asm-support +//@ run-pass +//@ needs-asm-support #![feature(asm_unwind)] diff --git a/tests/ui/asm/naked-functions-ffi.rs b/tests/ui/asm/naked-functions-ffi.rs index c8bee504d02bb..93d23885b1353 100644 --- a/tests/ui/asm/naked-functions-ffi.rs +++ b/tests/ui/asm/naked-functions-ffi.rs @@ -1,5 +1,5 @@ -// check-pass -// needs-asm-support +//@ check-pass +//@ needs-asm-support #![feature(naked_functions)] #![crate_type = "lib"] diff --git a/tests/ui/asm/naked-functions-unused.rs b/tests/ui/asm/naked-functions-unused.rs index 044a0e5b94089..745d30e6a84a9 100644 --- a/tests/ui/asm/naked-functions-unused.rs +++ b/tests/ui/asm/naked-functions-unused.rs @@ -1,7 +1,7 @@ -// revisions: x86_64 aarch64 -// needs-asm-support -//[x86_64] only-x86_64 -//[aarch64] only-aarch64 +//@ revisions: x86_64 aarch64 +//@ needs-asm-support +//@[x86_64] only-x86_64 +//@[aarch64] only-aarch64 #![deny(unused)] #![feature(naked_functions)] #![crate_type = "lib"] diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs index b18d01730f299..41d6393996d2c 100644 --- a/tests/ui/asm/naked-functions.rs +++ b/tests/ui/asm/naked-functions.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 #![feature(naked_functions)] #![feature(asm_const, asm_unwind)] diff --git a/tests/ui/asm/naked-invalid-attr.rs b/tests/ui/asm/naked-invalid-attr.rs index ea8f560ff5d9e..57edd57de998e 100644 --- a/tests/ui/asm/naked-invalid-attr.rs +++ b/tests/ui/asm/naked-invalid-attr.rs @@ -1,6 +1,6 @@ // Checks that #[naked] attribute can be placed on function definitions only. // -// needs-asm-support +//@ needs-asm-support #![feature(naked_functions)] #![naked] //~ ERROR should be applied to a function definition diff --git a/tests/ui/asm/named-asm-labels.rs b/tests/ui/asm/named-asm-labels.rs index 24586b39aacc0..2e21d56e32311 100644 --- a/tests/ui/asm/named-asm-labels.rs +++ b/tests/ui/asm/named-asm-labels.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 // Tests that the use of named labels in the `asm!` macro are linted against // except for in `#[naked]` fns. diff --git a/tests/ui/asm/noreturn.rs b/tests/ui/asm/noreturn.rs index 03fa087ae3766..c99715e9f8064 100644 --- a/tests/ui/asm/noreturn.rs +++ b/tests/ui/asm/noreturn.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// check-pass +//@ needs-asm-support +//@ check-pass #![feature(never_type)] #![crate_type = "rlib"] diff --git a/tests/ui/asm/parse-error.rs b/tests/ui/asm/parse-error.rs index 9e002b1550f34..6f32293511bf6 100644 --- a/tests/ui/asm/parse-error.rs +++ b/tests/ui/asm/parse-error.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/reg-conflict.rs b/tests/ui/asm/reg-conflict.rs index 983788a93ccd9..bdde12af6df32 100644 --- a/tests/ui/asm/reg-conflict.rs +++ b/tests/ui/asm/reg-conflict.rs @@ -1,5 +1,5 @@ -// compile-flags: --target armv7-unknown-linux-gnueabihf -// needs-llvm-components: arm +//@ compile-flags: --target armv7-unknown-linux-gnueabihf +//@ needs-llvm-components: arm #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/type-check-1.rs b/tests/ui/asm/type-check-1.rs index 59f7b36afcd89..b18c487fc4b4d 100644 --- a/tests/ui/asm/type-check-1.rs +++ b/tests/ui/asm/type-check-1.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 #![feature(asm_const)] diff --git a/tests/ui/asm/type-check-4.rs b/tests/ui/asm/type-check-4.rs index 666d2c677834b..0529811d3ba4b 100644 --- a/tests/ui/asm/type-check-4.rs +++ b/tests/ui/asm/type-check-4.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 use std::arch::asm; diff --git a/tests/ui/asm/unpretty-expanded.rs b/tests/ui/asm/unpretty-expanded.rs index 25cf1c3d730eb..1da2c7704f41f 100644 --- a/tests/ui/asm/unpretty-expanded.rs +++ b/tests/ui/asm/unpretty-expanded.rs @@ -1,4 +1,4 @@ -// needs-asm-support -// check-pass -// compile-flags: -Zunpretty=expanded +//@ needs-asm-support +//@ check-pass +//@ compile-flags: -Zunpretty=expanded core::arch::global_asm!("x: .byte 42"); diff --git a/tests/ui/asm/unpretty-expanded.stdout b/tests/ui/asm/unpretty-expanded.stdout index ab1b5f45e5c8a..80ccd127d506d 100644 --- a/tests/ui/asm/unpretty-expanded.stdout +++ b/tests/ui/asm/unpretty-expanded.stdout @@ -4,7 +4,7 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// needs-asm-support -// check-pass -// compile-flags: -Zunpretty=expanded +//@ needs-asm-support +//@ check-pass +//@ compile-flags: -Zunpretty=expanded global_asm! ("x: .byte 42"); diff --git a/tests/ui/asm/x86_64/bad-clobber-abi.rs b/tests/ui/asm/x86_64/bad-clobber-abi.rs index ddcd2065bfedf..5205a084162ba 100644 --- a/tests/ui/asm/x86_64/bad-clobber-abi.rs +++ b/tests/ui/asm/x86_64/bad-clobber-abi.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/bad-options.rs b/tests/ui/asm/x86_64/bad-options.rs index f7c2cd6c5056a..a6d5022ecf130 100644 --- a/tests/ui/asm/x86_64/bad-options.rs +++ b/tests/ui/asm/x86_64/bad-options.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/bad-reg.rs b/tests/ui/asm/x86_64/bad-reg.rs index e19221bc04e5f..d41c46d57bb13 100644 --- a/tests/ui/asm/x86_64/bad-reg.rs +++ b/tests/ui/asm/x86_64/bad-reg.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx2 +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx2 #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/const.rs b/tests/ui/asm/x86_64/const.rs index f9a2ab6269fa2..817a338a5b99f 100644 --- a/tests/ui/asm/x86_64/const.rs +++ b/tests/ui/asm/x86_64/const.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// run-pass -// needs-asm-support +//@ only-x86_64 +//@ run-pass +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/duplicate-options.fixed b/tests/ui/asm/x86_64/duplicate-options.fixed index c5f14f5f75ce0..38a98a30ece22 100644 --- a/tests/ui/asm/x86_64/duplicate-options.fixed +++ b/tests/ui/asm/x86_64/duplicate-options.fixed @@ -1,5 +1,5 @@ -// only-x86_64 -// run-rustfix +//@ only-x86_64 +//@ run-rustfix use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/duplicate-options.rs b/tests/ui/asm/x86_64/duplicate-options.rs index a8dce1f8d7126..1f043b964ded5 100644 --- a/tests/ui/asm/x86_64/duplicate-options.rs +++ b/tests/ui/asm/x86_64/duplicate-options.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// run-rustfix +//@ only-x86_64 +//@ run-rustfix use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/evex512-implicit-feature.rs b/tests/ui/asm/x86_64/evex512-implicit-feature.rs index a15060857eccb..ea2acd424e2c6 100644 --- a/tests/ui/asm/x86_64/evex512-implicit-feature.rs +++ b/tests/ui/asm/x86_64/evex512-implicit-feature.rs @@ -1,6 +1,6 @@ -// build-pass -// only-x86_64 -// compile-flags: --crate-type=lib -C target-cpu=skylake +//@ build-pass +//@ only-x86_64 +//@ compile-flags: --crate-type=lib -C target-cpu=skylake #![feature(avx512_target_feature)] #![feature(stdarch_x86_avx512)] diff --git a/tests/ui/asm/x86_64/interpolated-idents.rs b/tests/ui/asm/x86_64/interpolated-idents.rs index c05633ae88560..4f349c5b2134a 100644 --- a/tests/ui/asm/x86_64/interpolated-idents.rs +++ b/tests/ui/asm/x86_64/interpolated-idents.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/issue-82869.rs b/tests/ui/asm/x86_64/issue-82869.rs index 67933666eb5d3..5d3f417f7337b 100644 --- a/tests/ui/asm/x86_64/issue-82869.rs +++ b/tests/ui/asm/x86_64/issue-82869.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 // Make sure rustc doesn't ICE on asm! for a foreign architecture. #![crate_type = "rlib"] diff --git a/tests/ui/asm/x86_64/issue-89875.rs b/tests/ui/asm/x86_64/issue-89875.rs index 39c6456402223..af940f05fead7 100644 --- a/tests/ui/asm/x86_64/issue-89875.rs +++ b/tests/ui/asm/x86_64/issue-89875.rs @@ -1,6 +1,6 @@ -// build-pass -// needs-asm-support -// only-x86_64 +//@ build-pass +//@ needs-asm-support +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/asm/x86_64/issue-96797.rs b/tests/ui/asm/x86_64/issue-96797.rs index 6c22c2f6c9463..531e16795dd8d 100644 --- a/tests/ui/asm/x86_64/issue-96797.rs +++ b/tests/ui/asm/x86_64/issue-96797.rs @@ -1,8 +1,8 @@ -// build-pass -// compile-flags: -O -// needs-asm-support -// only-x86_64 -// only-linux +//@ build-pass +//@ compile-flags: -O +//@ needs-asm-support +//@ only-x86_64 +//@ only-linux // regression test for #96797 diff --git a/tests/ui/asm/x86_64/may_unwind.rs b/tests/ui/asm/x86_64/may_unwind.rs index c11f0938d0b6c..3b2c1edcd4786 100644 --- a/tests/ui/asm/x86_64/may_unwind.rs +++ b/tests/ui/asm/x86_64/may_unwind.rs @@ -1,7 +1,7 @@ -// only-x86_64 -// run-pass -// needs-asm-support -// needs-unwind +//@ only-x86_64 +//@ run-pass +//@ needs-asm-support +//@ needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/asm/x86_64/multiple-clobber-abi.rs b/tests/ui/asm/x86_64/multiple-clobber-abi.rs index 06589431a445f..bf241b9771b43 100644 --- a/tests/ui/asm/x86_64/multiple-clobber-abi.rs +++ b/tests/ui/asm/x86_64/multiple-clobber-abi.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-asm-support -// only-x86_64 +//@ run-pass +//@ needs-asm-support +//@ only-x86_64 // Checks that multiple clobber_abi options can be used diff --git a/tests/ui/asm/x86_64/srcloc.rs b/tests/ui/asm/x86_64/srcloc.rs index 1135ad2e1c643..2938bafe5e70c 100644 --- a/tests/ui/asm/x86_64/srcloc.rs +++ b/tests/ui/asm/x86_64/srcloc.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// build-fail -// compile-flags: -Ccodegen-units=1 +//@ only-x86_64 +//@ build-fail +//@ compile-flags: -Ccodegen-units=1 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/sym.rs b/tests/ui/asm/x86_64/sym.rs index 93ef4f090622e..0a86bd66ccbc1 100644 --- a/tests/ui/asm/x86_64/sym.rs +++ b/tests/ui/asm/x86_64/sym.rs @@ -1,7 +1,7 @@ -// only-x86_64 -// only-linux -// needs-asm-support -// run-pass +//@ only-x86_64 +//@ only-linux +//@ needs-asm-support +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/asm/x86_64/target-feature-attr.rs b/tests/ui/asm/x86_64/target-feature-attr.rs index 14490c3e0f23d..820be132ef794 100644 --- a/tests/ui/asm/x86_64/target-feature-attr.rs +++ b/tests/ui/asm/x86_64/target-feature-attr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(avx512_target_feature)] diff --git a/tests/ui/asm/x86_64/type-check-2.rs b/tests/ui/asm/x86_64/type-check-2.rs index 80b29ec870fc1..c866f9fd8cc4d 100644 --- a/tests/ui/asm/x86_64/type-check-2.rs +++ b/tests/ui/asm/x86_64/type-check-2.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/x86_64/type-check-3.rs b/tests/ui/asm/x86_64/type-check-3.rs index 89c849c75234e..bd242af3dbc07 100644 --- a/tests/ui/asm/x86_64/type-check-3.rs +++ b/tests/ui/asm/x86_64/type-check-3.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx512f +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx512f #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/type-check-4.rs b/tests/ui/asm/x86_64/type-check-4.rs index d0dacda4afb78..f7bf60d04dfdf 100644 --- a/tests/ui/asm/x86_64/type-check-4.rs +++ b/tests/ui/asm/x86_64/type-check-4.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx512f +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx512f #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/type-check-5.rs b/tests/ui/asm/x86_64/type-check-5.rs index 1d579ccc90eec..b5b51f6116890 100644 --- a/tests/ui/asm/x86_64/type-check-5.rs +++ b/tests/ui/asm/x86_64/type-check-5.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/x86_64/x86_64_parse_error.rs b/tests/ui/asm/x86_64/x86_64_parse_error.rs index 715a67687d124..850033d4ce03b 100644 --- a/tests/ui/asm/x86_64/x86_64_parse_error.rs +++ b/tests/ui/asm/x86_64/x86_64_parse_error.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(asm_const)] diff --git a/tests/ui/assign-assign.rs b/tests/ui/assign-assign.rs index 9db8fb008cf2e..002393f5bffbb 100644 --- a/tests/ui/assign-assign.rs +++ b/tests/ui/assign-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 483 - Assignment expressions result in nil fn test_assign() { diff --git a/tests/ui/assoc-oddities-3.rs b/tests/ui/assoc-oddities-3.rs index cd025dc8beecb..ffde2ccf78635 100644 --- a/tests/ui/assoc-oddities-3.rs +++ b/tests/ui/assoc-oddities-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn that_odd_parse(c: bool, n: usize) -> u32 { let x = 2; diff --git a/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs index de9008bfcf9ec..4ff05112897c7 100644 --- a/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs +++ b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs @@ -6,7 +6,7 @@ // FIXME(fmease): Extend this test to cover supertraits again // once #118040 is fixed. See initial version of PR #118360. -// check-pass +//@ check-pass #![feature(associated_const_equality)] diff --git a/tests/ui/associated-consts/assoc-const.rs b/tests/ui/associated-consts/assoc-const.rs index 9c7884c80734c..5b272cfeb0c28 100644 --- a/tests/ui/associated-consts/assoc-const.rs +++ b/tests/ui/associated-consts/assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_const_equality)] #![allow(unused)] diff --git a/tests/ui/associated-consts/associated-const-const-eval.rs b/tests/ui/associated-consts/associated-const-const-eval.rs index 5a34bb97ca5de..5dc94b87ff96b 100644 --- a/tests/ui/associated-consts/associated-const-const-eval.rs +++ b/tests/ui/associated-consts/associated-const-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const NUM: usize; diff --git a/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs b/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs index 611639b84be74..a9d7e2f706bc8 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs b/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs index 92d9cffecddde..2990e507ab2bd 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-cross-crate.rs b/tests/ui/associated-consts/associated-const-cross-crate.rs index ecdc112e02dce..39f5427bf77ce 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-in-global-const.rs b/tests/ui/associated-consts/associated-const-in-global-const.rs index 18d7a12155887..10b8f8ebada41 100644 --- a/tests/ui/associated-consts/associated-const-in-global-const.rs +++ b/tests/ui/associated-consts/associated-const-in-global-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/associated-consts/associated-const-inherent-impl.rs b/tests/ui/associated-consts/associated-const-inherent-impl.rs index c6d956dffe1ef..e8a313140a3bd 100644 --- a/tests/ui/associated-consts/associated-const-inherent-impl.rs +++ b/tests/ui/associated-consts/associated-const-inherent-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; 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 68eb4e25d3311..123650cfd0b3c 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 +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/associated-consts/associated-const-match-patterns.rs b/tests/ui/associated-consts/associated-const-match-patterns.rs index 62c1cb983d1b4..df297cc390d90 100644 --- a/tests/ui/associated-consts/associated-const-match-patterns.rs +++ b/tests/ui/associated-consts/associated-const-match-patterns.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:empty-struct.rs +//@ run-pass +//@ aux-build:empty-struct.rs extern crate empty_struct; diff --git a/tests/ui/associated-consts/associated-const-outer-ty-refs.rs b/tests/ui/associated-consts/associated-const-outer-ty-refs.rs index d5e9a2bde0060..460811353f0e6 100644 --- a/tests/ui/associated-consts/associated-const-outer-ty-refs.rs +++ b/tests/ui/associated-consts/associated-const-outer-ty-refs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Lattice { const BOTTOM: Self; diff --git a/tests/ui/associated-consts/associated-const-overwrite-default.rs b/tests/ui/associated-consts/associated-const-overwrite-default.rs index 445135aef2b1f..3838145e54f6c 100644 --- a/tests/ui/associated-consts/associated-const-overwrite-default.rs +++ b/tests/ui/associated-consts/associated-const-overwrite-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32 = 2; diff --git a/tests/ui/associated-consts/associated-const-public-impl.rs b/tests/ui/associated-consts/associated-const-public-impl.rs index 787bee0ff0203..ee847dcc1f5c8 100644 --- a/tests/ui/associated-consts/associated-const-public-impl.rs +++ b/tests/ui/associated-consts/associated-const-public-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod bar1 { pub use self::bar2::Foo; diff --git a/tests/ui/associated-consts/associated-const-range-match-patterns.rs b/tests/ui/associated-consts/associated-const-range-match-patterns.rs index 5276869a702ee..84cc4dbca9cf8 100644 --- a/tests/ui/associated-consts/associated-const-range-match-patterns.rs +++ b/tests/ui/associated-consts/associated-const-range-match-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unreachable_patterns)] #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/associated-consts/associated-const-resolution-order.rs b/tests/ui/associated-consts/associated-const-resolution-order.rs index d2ccd30a6e2b7..3e8f15d41b983 100644 --- a/tests/ui/associated-consts/associated-const-resolution-order.rs +++ b/tests/ui/associated-consts/associated-const-resolution-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct MyType; diff --git a/tests/ui/associated-consts/associated-const-self-type.rs b/tests/ui/associated-consts/associated-const-self-type.rs index 36e1e4ecce7c9..b7d9f99e21673 100644 --- a/tests/ui/associated-consts/associated-const-self-type.rs +++ b/tests/ui/associated-consts/associated-const-self-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait MyInt { const ONE: Self; diff --git a/tests/ui/associated-consts/associated-const-trait-bound.rs b/tests/ui/associated-consts/associated-const-trait-bound.rs index 403cdbd7ff330..6dfdbff85c03a 100644 --- a/tests/ui/associated-consts/associated-const-trait-bound.rs +++ b/tests/ui/associated-consts/associated-const-trait-bound.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait ConstDefault { const DEFAULT: Self; diff --git a/tests/ui/associated-consts/associated-const-type-parameters.rs b/tests/ui/associated-consts/associated-const-type-parameters.rs index a233b09ff89c6..2ab0f2df417a8 100644 --- a/tests/ui/associated-consts/associated-const-type-parameters.rs +++ b/tests/ui/associated-consts/associated-const-type-parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const X: i32; diff --git a/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs b/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs index ca44c9f45fc78..0fb36f103ee50 100644 --- a/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs +++ b/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32; diff --git a/tests/ui/associated-consts/associated-const-use-default.rs b/tests/ui/associated-consts/associated-const-use-default.rs index adf36b1fff266..273db9c74af8c 100644 --- a/tests/ui/associated-consts/associated-const-use-default.rs +++ b/tests/ui/associated-consts/associated-const-use-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32 = 1; diff --git a/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs b/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs index 8f01bae4fcf78..968eaf3cf14c5 100644 --- a/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs +++ b/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The main purpose of this test is to ensure that different impls of the same // trait can refer to each other without setting off the static recursion check diff --git a/tests/ui/associated-consts/associated-const.rs b/tests/ui/associated-consts/associated-const.rs index e4b1c29f371ee..2d9af05331d04 100644 --- a/tests/ui/associated-consts/associated-const.rs +++ b/tests/ui/associated-consts/associated-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32; diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.rs b/tests/ui/associated-consts/defaults-cyclic-fail.rs index 9ef0003da173f..b868ef310041e 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.rs +++ b/tests/ui/associated-consts/defaults-cyclic-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Cyclic assoc. const defaults don't error unless *used* trait Tr { diff --git a/tests/ui/associated-consts/defaults-cyclic-pass.rs b/tests/ui/associated-consts/defaults-cyclic-pass.rs index 82105f25f9240..19ec0a6918efa 100644 --- a/tests/ui/associated-consts/defaults-cyclic-pass.rs +++ b/tests/ui/associated-consts/defaults-cyclic-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Cyclic assoc. const defaults don't error unless *used* trait Tr { diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.rs b/tests/ui/associated-consts/defaults-not-assumed-fail.rs index 495dfb338ae31..3dc709cf633a7 100644 --- a/tests/ui/associated-consts/defaults-not-assumed-fail.rs +++ b/tests/ui/associated-consts/defaults-not-assumed-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Tr { const A: u8 = 255; diff --git a/tests/ui/associated-consts/defaults-not-assumed-pass.rs b/tests/ui/associated-consts/defaults-not-assumed-pass.rs index c08e05c8a3073..bafaf969fb756 100644 --- a/tests/ui/associated-consts/defaults-not-assumed-pass.rs +++ b/tests/ui/associated-consts/defaults-not-assumed-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr { const A: u8 = 255; diff --git a/tests/ui/associated-consts/issue-110933.rs b/tests/ui/associated-consts/issue-110933.rs index aa4882ae53577..efd7e13e4bcdc 100644 --- a/tests/ui/associated-consts/issue-110933.rs +++ b/tests/ui/associated-consts/issue-110933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_const_equality)] diff --git a/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs b/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs index d4af6e8641440..938ef83af2727 100644 --- a/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs +++ b/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs @@ -1,7 +1,7 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O #![crate_type="lib"] diff --git a/tests/ui/associated-consts/issue-88599-ref-self.rs b/tests/ui/associated-consts/issue-88599-ref-self.rs index f1144db44ca44..4150d39ed5641 100644 --- a/tests/ui/associated-consts/issue-88599-ref-self.rs +++ b/tests/ui/associated-consts/issue-88599-ref-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-consts/issue-93775.rs b/tests/ui/associated-consts/issue-93775.rs index db788fe6e6af1..c9044e27e0e7f 100644 --- a/tests/ui/associated-consts/issue-93775.rs +++ b/tests/ui/associated-consts/issue-93775.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-linelength // Regression for #93775, needs build-pass to test it. diff --git a/tests/ui/associated-consts/mismatched_impl_ty_1.rs b/tests/ui/associated-consts/mismatched_impl_ty_1.rs index 4dc6c2e47a9ea..55db10bd0e4a0 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 +//@ run-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 539becfdc7c82..c6cbc69503d88 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 +//@ run-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 17bcc8fe5768c..7945441f1c9ec 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 +//@ run-pass trait Trait { const ASSOC: for<'a, 'b> fn(&'a u32, &'b u32); } diff --git a/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs index b6993f66fe795..9f3798b27afa2 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs index 152bb7a60a704..ddb9278bafa3c 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs @@ -1,5 +1,5 @@ -// aux-crate:aux=assoc-inherent-unstable.rs -// edition: 2021 +//@ aux-crate:aux=assoc-inherent-unstable.rs +//@ edition: 2021 #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/assoc-inherent-use.rs b/tests/ui/associated-inherent-types/assoc-inherent-use.rs index 7ae425e2aaafb..c634c89a5405b 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-use.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs index 33c73c3db897b..64168cb8c14f8 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs @@ -1,4 +1,4 @@ -// known-bug: #108491 +//@ known-bug: #108491 #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs index 0c2a38b1173d9..902094b986286 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs index c7f66e645bb57..3159500393e6a 100644 --- a/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs +++ b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs @@ -1,5 +1,5 @@ -// known-bug: #100041 -// check-pass +//@ known-bug: #100041 +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/const-generics.rs b/tests/ui/associated-inherent-types/const-generics.rs index 5b7c00bccba70..9a4e4a3db789f 100644 --- a/tests/ui/associated-inherent-types/const-generics.rs +++ b/tests/ui/associated-inherent-types/const-generics.rs @@ -1,5 +1,5 @@ // Regression test for issue #109759. -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs index 83be4f43b5e94..ae2aa9c97ba00 100644 --- a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs +++ b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs b/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs index 9b0fa8dc6f32c..5fe7dd8d89998 100644 --- a/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs +++ b/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types, auto_traits, negative_impls)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/former-subst-ice.rs b/tests/ui/associated-inherent-types/former-subst-ice.rs index 48390b9430b60..b27a16acc4bc6 100644 --- a/tests/ui/associated-inherent-types/former-subst-ice.rs +++ b/tests/ui/associated-inherent-types/former-subst-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs index f5deec422f59a..fdc2a0f64e491 100644 --- a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs +++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs @@ -1,4 +1,4 @@ -// revisions: item local region +//@ revisions: item local region #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/generic-const-exprs.rs b/tests/ui/associated-inherent-types/generic-const-exprs.rs index a4ac0ecfa4cf9..2c6965edc6b65 100644 --- a/tests/ui/associated-inherent-types/generic-const-exprs.rs +++ b/tests/ui/associated-inherent-types/generic-const-exprs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs index 054034b4c2897..f520c610685f0 100644 --- a/tests/ui/associated-inherent-types/inference.rs +++ b/tests/ui/associated-inherent-types/inference.rs @@ -1,7 +1,7 @@ // Testing inference capabilities. -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-104260.rs b/tests/ui/associated-inherent-types/issue-104260.rs index a73cd1775b462..4a0bab2cb4b87 100644 --- a/tests/ui/associated-inherent-types/issue-104260.rs +++ b/tests/ui/associated-inherent-types/issue-104260.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-109071.rs b/tests/ui/associated-inherent-types/issue-109071.rs index cbe8cce092457..29eef081a3278 100644 --- a/tests/ui/associated-inherent-types/issue-109071.rs +++ b/tests/ui/associated-inherent-types/issue-109071.rs @@ -1,4 +1,4 @@ -// revisions: with_gate no_gate +//@ revisions: with_gate no_gate #![cfg_attr(with_gate, feature(inherent_associated_types))] #![cfg_attr(with_gate, allow(incomplete_features))] diff --git a/tests/ui/associated-inherent-types/issue-109768.rs b/tests/ui/associated-inherent-types/issue-109768.rs index 400f4f7de66f5..00873ccc8cf48 100644 --- a/tests/ui/associated-inherent-types/issue-109768.rs +++ b/tests/ui/associated-inherent-types/issue-109768.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental struct Wrapper(T); diff --git a/tests/ui/associated-inherent-types/issue-109790.rs b/tests/ui/associated-inherent-types/issue-109790.rs index 88327f864237a..ecfe2ad707f76 100644 --- a/tests/ui/associated-inherent-types/issue-109790.rs +++ b/tests/ui/associated-inherent-types/issue-109790.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-111404-0.rs b/tests/ui/associated-inherent-types/issue-111404-0.rs index 1180577bd5421..f8837b4e13d8b 100644 --- a/tests/ui/associated-inherent-types/issue-111404-0.rs +++ b/tests/ui/associated-inherent-types/issue-111404-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/normalize-projection-0.rs b/tests/ui/associated-inherent-types/normalize-projection-0.rs index 50763ecddf99c..2380f48dc22eb 100644 --- a/tests/ui/associated-inherent-types/normalize-projection-0.rs +++ b/tests/ui/associated-inherent-types/normalize-projection-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/normalize-projection-1.rs b/tests/ui/associated-inherent-types/normalize-projection-1.rs index 2f7b2551a03ec..238550667edae 100644 --- a/tests/ui/associated-inherent-types/normalize-projection-1.rs +++ b/tests/ui/associated-inherent-types/normalize-projection-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs index d2efb24c66620..c205cb800d2f6 100644 --- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs +++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs @@ -7,7 +7,7 @@ // anyway if the IAT didn't exist. // FIXME(inherent_associated_types): Figure out which error would be more helpful here. -// revisions: shadowed uncovered +//@ revisions: shadowed uncovered struct S(T); diff --git a/tests/ui/associated-inherent-types/private-in-public.rs b/tests/ui/associated-inherent-types/private-in-public.rs index 7797a2a16a58c..a950d1735c6d7 100644 --- a/tests/ui/associated-inherent-types/private-in-public.rs +++ b/tests/ui/associated-inherent-types/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/substitute-params.rs b/tests/ui/associated-inherent-types/substitute-params.rs index 631340b2b4d9e..3ccb7028bb9d2 100644 --- a/tests/ui/associated-inherent-types/substitute-params.rs +++ b/tests/ui/associated-inherent-types/substitute-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs index 9976969234234..5ac7e1e58b8b2 100644 --- a/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs +++ b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed index 23f7152004008..cb738d08a932d 100644 --- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed +++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} trait Assoc { diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs b/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs index 9c26e339a449b..ecc7c657ee0be 100644 --- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs +++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} trait Assoc { diff --git a/tests/ui/associated-item/associated-item-two-bounds.rs b/tests/ui/associated-item/associated-item-two-bounds.rs index 25b0d5a56bfb3..62d3b3d828811 100644 --- a/tests/ui/associated-item/associated-item-two-bounds.rs +++ b/tests/ui/associated-item/associated-item-two-bounds.rs @@ -1,6 +1,6 @@ // This test is a regression test for #34792 -// check-pass +//@ check-pass pub struct A; pub struct B; diff --git a/tests/ui/associated-item/issue-105449.rs b/tests/ui/associated-item/issue-105449.rs index dd14e05fd49b2..5ccc317562bc6 100644 --- a/tests/ui/associated-item/issue-105449.rs +++ b/tests/ui/associated-item/issue-105449.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -C debug_assertions=yes -Zunstable-options +//@ check-pass +//@ compile-flags: -C debug_assertions=yes -Zunstable-options #[allow(dead_code)] fn problematic_function() diff --git a/tests/ui/associated-item/issue-87638.fixed b/tests/ui/associated-item/issue-87638.fixed index b689777685f3d..36184e7862557 100644 --- a/tests/ui/associated-item/issue-87638.fixed +++ b/tests/ui/associated-item/issue-87638.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait { const FOO: usize; diff --git a/tests/ui/associated-item/issue-87638.rs b/tests/ui/associated-item/issue-87638.rs index 5a60b20fdf382..30187625ff3da 100644 --- a/tests/ui/associated-item/issue-87638.rs +++ b/tests/ui/associated-item/issue-87638.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait { const FOO: usize; diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs index 9c47a003dfd09..4e6d8b9dd0a67 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs b/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs index 49f11140741c2..e7e3836996890 100644 --- a/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs +++ b/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs @@ -1,6 +1,6 @@ // Check that `where Self::Output: Copy` is turned into a bound on `Op::Output`. -//check-pass +//@check-pass trait Op where diff --git a/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs b/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs index 3eb50ab554735..b672cc76a02e2 100644 --- a/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs +++ b/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Item; diff --git a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index 1c48aadecceb9..edde549bb4b67 100644 --- a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs index 7bc2970ade9a2..dad1f644284d8 100644 --- a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/const-projection-err.rs b/tests/ui/associated-type-bounds/const-projection-err.rs index bead85630016b..22f1897c07f15 100644 --- a/tests/ui/associated-type-bounds/const-projection-err.rs +++ b/tests/ui/associated-type-bounds/const-projection-err.rs @@ -1,4 +1,4 @@ -// revisions: stock gce +//@ revisions: stock gce #![feature(associated_const_equality)] #![cfg_attr(gce, feature(generic_const_exprs))] diff --git a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs index f5a9bac6e3549..211c67061e669 100644 --- a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs +++ b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/enum-bounds.rs b/tests/ui/associated-type-bounds/enum-bounds.rs index 193f2efe19929..b5087acb6b8ea 100644 --- a/tests/ui/associated-type-bounds/enum-bounds.rs +++ b/tests/ui/associated-type-bounds/enum-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] #![allow(dead_code)] diff --git a/tests/ui/associated-type-bounds/fn-apit.rs b/tests/ui/associated-type-bounds/fn-apit.rs index 3c9f511338f69..8e1897cc3d457 100644 --- a/tests/ui/associated-type-bounds/fn-apit.rs +++ b/tests/ui/associated-type-bounds/fn-apit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-aux.rs b/tests/ui/associated-type-bounds/fn-aux.rs index 434bdbe996c63..6aaa0cc895fe4 100644 --- a/tests/ui/associated-type-bounds/fn-aux.rs +++ b/tests/ui/associated-type-bounds/fn-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-inline.rs b/tests/ui/associated-type-bounds/fn-inline.rs index 8fa7212d6275b..8435cb44a9a4f 100644 --- a/tests/ui/associated-type-bounds/fn-inline.rs +++ b/tests/ui/associated-type-bounds/fn-inline.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-where.rs b/tests/ui/associated-type-bounds/fn-where.rs index 9c4f82ac991c8..3b6b557fb113e 100644 --- a/tests/ui/associated-type-bounds/fn-where.rs +++ b/tests/ui/associated-type-bounds/fn-where.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-wrap-apit.rs b/tests/ui/associated-type-bounds/fn-wrap-apit.rs index 96df13e372a24..4ce714d432f35 100644 --- a/tests/ui/associated-type-bounds/fn-wrap-apit.rs +++ b/tests/ui/associated-type-bounds/fn-wrap-apit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![feature(associated_type_bounds)] #![allow(dead_code)] diff --git a/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs b/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs index b1e54ec04493b..a79f270da4594 100644 --- a/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs +++ b/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} trait Bar { diff --git a/tests/ui/associated-type-bounds/higher-ranked.rs b/tests/ui/associated-type-bounds/higher-ranked.rs index 2bd5f316811d9..9e783c4bdcae3 100644 --- a/tests/ui/associated-type-bounds/higher-ranked.rs +++ b/tests/ui/associated-type-bounds/higher-ranked.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/hrtb.rs b/tests/ui/associated-type-bounds/hrtb.rs index 7ab3836493b01..73c7a1a56777c 100644 --- a/tests/ui/associated-type-bounds/hrtb.rs +++ b/tests/ui/associated-type-bounds/hrtb.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/implied-in-supertrait.rs b/tests/ui/associated-type-bounds/implied-in-supertrait.rs index ea7e7c984da9a..83cb07d700ac8 100644 --- a/tests/ui/associated-type-bounds/implied-in-supertrait.rs +++ b/tests/ui/associated-type-bounds/implied-in-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-61752.rs b/tests/ui/associated-type-bounds/issue-61752.rs index f38ec640e1781..22e43ea875e3e 100644 --- a/tests/ui/associated-type-bounds/issue-61752.rs +++ b/tests/ui/associated-type-bounds/issue-61752.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-70292.rs b/tests/ui/associated-type-bounds/issue-70292.rs index 945d7688ce65f..4b8e19904d03b 100644 --- a/tests/ui/associated-type-bounds/issue-70292.rs +++ b/tests/ui/associated-type-bounds/issue-70292.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-71443-2.rs b/tests/ui/associated-type-bounds/issue-71443-2.rs index 813dcd60ad105..bd072f4465002 100644 --- a/tests/ui/associated-type-bounds/issue-71443-2.rs +++ b/tests/ui/associated-type-bounds/issue-71443-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-73818.rs b/tests/ui/associated-type-bounds/issue-73818.rs index bb890f72a32cf..748cfbb3d8e7a 100644 --- a/tests/ui/associated-type-bounds/issue-73818.rs +++ b/tests/ui/associated-type-bounds/issue-73818.rs @@ -1,6 +1,6 @@ // Test that associated type bounds are correctly normalized when checking // default associated type values. -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(specialization)] diff --git a/tests/ui/associated-type-bounds/issue-79949.rs b/tests/ui/associated-type-bounds/issue-79949.rs index 9dd37f98150b6..4513f0a0b6296 100644 --- a/tests/ui/associated-type-bounds/issue-79949.rs +++ b/tests/ui/associated-type-bounds/issue-79949.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-81193.rs b/tests/ui/associated-type-bounds/issue-81193.rs index d2aa54ab9512e..1247f835be979 100644 --- a/tests/ui/associated-type-bounds/issue-81193.rs +++ b/tests/ui/associated-type-bounds/issue-81193.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-83017.rs b/tests/ui/associated-type-bounds/issue-83017.rs index a02208661f1f7..a059b940e66b5 100644 --- a/tests/ui/associated-type-bounds/issue-83017.rs +++ b/tests/ui/associated-type-bounds/issue-83017.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs index 05e4e323d879d..ee4de509da6c9 100644 --- a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs +++ b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs b/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs index 77e4bd4d6f528..f6d3c1adaf12b 100644 --- a/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs +++ b/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/54121/ // diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs index 4f332fa13d024..50a8cd8e04b2c 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.rs b/tests/ui/associated-type-bounds/return-type-notation/basic.rs index 7f0647534f268..9755fd01c9764 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/basic.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.rs @@ -1,6 +1,6 @@ -// revisions: with without -// edition: 2021 -// [with] check-pass +//@ revisions: with without +//@ edition: 2021 +//@ [with] check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs index d5a29616ac5fc..ae38dce1818c9 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/equality.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs b/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs index 3b350e14fd937..11728b879900e 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs index e6270ec3166c5..9a8b77d00b714 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs index 9129f37e0c6b6..0a98f0d2c8d10 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// compile-flags: -Zunpretty=expanded +//@ edition: 2021 +//@ compile-flags: -Zunpretty=expanded trait Trait { async fn method() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout index b3dea8f6eca71..17c3b9580ca85 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout @@ -3,8 +3,8 @@ use std::prelude::rust_2021::*; #[macro_use] extern crate std; -// edition: 2021 -// compile-flags: -Zunpretty=expanded +//@ edition: 2021 +//@ compile-flags: -Zunpretty=expanded trait Trait { async fn method() {} diff --git a/tests/ui/associated-type-bounds/rpit.rs b/tests/ui/associated-type-bounds/rpit.rs index 557e63b5f71fa..78710621caded 100644 --- a/tests/ui/associated-type-bounds/rpit.rs +++ b/tests/ui/associated-type-bounds/rpit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/struct-bounds.rs b/tests/ui/associated-type-bounds/struct-bounds.rs index 2c1ce1c3785ae..2c46832cb99a4 100644 --- a/tests/ui/associated-type-bounds/struct-bounds.rs +++ b/tests/ui/associated-type-bounds/struct-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed index 128c7dfdda2ed..fadc0960f9b50 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait O { type M; diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs index 6b6478419b4c0..5e7e2136b9501 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait O { type M; diff --git a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs index b6f37cb908e4e..62b23b5fbab85 100644 --- a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs +++ b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we don't look into associated type bounds when looking for // supertraits that define an associated type. Fixes #76593. diff --git a/tests/ui/associated-type-bounds/supertrait-referencing-self.rs b/tests/ui/associated-type-bounds/supertrait-referencing-self.rs index c82ec01f4d61d..bb6a2fd1035ff 100644 --- a/tests/ui/associated-type-bounds/supertrait-referencing-self.rs +++ b/tests/ui/associated-type-bounds/supertrait-referencing-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar; } diff --git a/tests/ui/associated-type-bounds/supertrait-referencing.rs b/tests/ui/associated-type-bounds/supertrait-referencing.rs index 2e97535157fd2..06b5489f8535b 100644 --- a/tests/ui/associated-type-bounds/supertrait-referencing.rs +++ b/tests/ui/associated-type-bounds/supertrait-referencing.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // The goal of this test is to ensure that T: Bar // in the where clause does not cycle diff --git a/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs b/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs index 72a6be9ffc388..5b03cdf16011e 100644 --- a/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs +++ b/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we do not get a cycle due to // resolving `Self::Bar` in the where clauses diff --git a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs index 60088e443f300..6ca9f80ccaff1 100644 --- a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs +++ b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/trait-params.rs b/tests/ui/associated-type-bounds/trait-params.rs index b0703a4ee22b3..6782d68812627 100644 --- a/tests/ui/associated-type-bounds/trait-params.rs +++ b/tests/ui/associated-type-bounds/trait-params.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs b/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs index a9d6eed810a6b..87b7ba791b385 100644 --- a/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs +++ b/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct LookupInternedStorage; diff --git a/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs b/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs index d854dce382fc4..ad5c75425daa0 100644 --- a/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs +++ b/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental // This test case makes sure that we can compile with incremental compilation // enabled when there are macros, traits, inheritance and associated types involved. diff --git a/tests/ui/associated-type-bounds/type-alias.rs b/tests/ui/associated-type-bounds/type-alias.rs index f74c5ff1eddfc..819a7656a4429 100644 --- a/tests/ui/associated-type-bounds/type-alias.rs +++ b/tests/ui/associated-type-bounds/type-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/union-bounds.rs b/tests/ui/associated-type-bounds/union-bounds.rs index 46e5aef04031a..8a7ba6f5ebf90 100644 --- a/tests/ui/associated-type-bounds/union-bounds.rs +++ b/tests/ui/associated-type-bounds/union-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-types/associate-type-bound-normalization.rs b/tests/ui/associated-types/associate-type-bound-normalization.rs index db092970f79b8..4ce6308c1b064 100644 --- a/tests/ui/associated-types/associate-type-bound-normalization.rs +++ b/tests/ui/associated-types/associate-type-bound-normalization.rs @@ -1,7 +1,7 @@ // Make sure that we normalize bounds on associated types before checking them // as candidates. -// check-pass +//@ check-pass trait Mul { type Output; diff --git a/tests/ui/associated-types/associated-item-long-paths.rs b/tests/ui/associated-types/associated-item-long-paths.rs index aad8c487c5a0a..6d5d403d1064b 100644 --- a/tests/ui/associated-types/associated-item-long-paths.rs +++ b/tests/ui/associated-types/associated-item-long-paths.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/associated-types/associated-type-destructuring-assignment.rs b/tests/ui/associated-types/associated-type-destructuring-assignment.rs index f038c9ce7ba2b..2ab94908b6042 100644 --- a/tests/ui/associated-types/associated-type-destructuring-assignment.rs +++ b/tests/ui/associated-types/associated-type-destructuring-assignment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(more_qualified_paths)] diff --git a/tests/ui/associated-types/associated-type-struct-construction.rs b/tests/ui/associated-types/associated-type-struct-construction.rs index f8f8048fb717f..422fd5a0c3a9b 100644 --- a/tests/ui/associated-types/associated-type-struct-construction.rs +++ b/tests/ui/associated-types/associated-type-struct-construction.rs @@ -3,7 +3,7 @@ #![feature(more_qualified_paths)] -// check-pass +//@ check-pass fn main() { let ::Assoc { br } = ::Assoc { br: 2 }; assert!(br == 2); diff --git a/tests/ui/associated-types/associated-types-basic.rs b/tests/ui/associated-types/associated-types-basic.rs index b7f6721ec4f36..911073a6a32c8 100644 --- a/tests/ui/associated-types/associated-types-basic.rs +++ b/tests/ui/associated-types/associated-types-basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { type T; } diff --git a/tests/ui/associated-types/associated-types-binding-in-trait.rs b/tests/ui/associated-types/associated-types-binding-in-trait.rs index 2e42b3a2a44dc..50fbe515101c5 100644 --- a/tests/ui/associated-types/associated-types-binding-in-trait.rs +++ b/tests/ui/associated-types/associated-types-binding-in-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a case where the associated type binding (to `bool`, in this // case) is derived from the trait definition. Issue #21636. 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 c54bc3cd6230c..ed2cebb5f7e87 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,7 +1,7 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types in a where clause. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type A; diff --git a/tests/ui/associated-types/associated-types-bound-ambiguity.rs b/tests/ui/associated-types/associated-types-bound-ambiguity.rs index 9f179b6454e52..bed8eeafd065d 100644 --- a/tests/ui/associated-types/associated-types-bound-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-bound-ambiguity.rs @@ -3,7 +3,7 @@ // `Self::Repr: From<_>`, which is ambiguous until we later infer `_` to // `{integer}`. -// check-pass +//@ check-pass trait PrimeField: Sized { type Repr: From + From; diff --git a/tests/ui/associated-types/associated-types-bound-failure.fixed b/tests/ui/associated-types/associated-types-bound-failure.fixed index 68ee38d16b3f3..f18a0aa1a9a73 100644 --- a/tests/ui/associated-types/associated-types-bound-failure.fixed +++ b/tests/ui/associated-types/associated-types-bound-failure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test equality constraints on associated types in a where clause. #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-bound-failure.rs b/tests/ui/associated-types/associated-types-bound-failure.rs index 31e073cc7a8bd..1c58c8a1a3c23 100644 --- a/tests/ui/associated-types/associated-types-bound-failure.rs +++ b/tests/ui/associated-types/associated-types-bound-failure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test equality constraints on associated types in a where clause. #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-bound.rs b/tests/ui/associated-types/associated-types-bound.rs index 0e9a229a5e592..1a9c0bf31999b 100644 --- a/tests/ui/associated-types/associated-types-bound.rs +++ b/tests/ui/associated-types/associated-types-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test equality constrai32s on associated types in a where clause. diff --git a/tests/ui/associated-types/associated-types-cc.rs b/tests/ui/associated-types/associated-types-cc.rs index 13f1d27203ad8..361b0cfce1345 100644 --- a/tests/ui/associated-types/associated-types-cc.rs +++ b/tests/ui/associated-types/associated-types-cc.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:associated-types-cc-lib.rs +//@ aux-build:associated-types-cc-lib.rs // Test that we are able to reference cross-crate traits that employ // associated types. diff --git a/tests/ui/associated-types/associated-types-conditional-dispatch.rs b/tests/ui/associated-types/associated-types-conditional-dispatch.rs index 70ee60517ae86..d30ea66e9b97f 100644 --- a/tests/ui/associated-types/associated-types-conditional-dispatch.rs +++ b/tests/ui/associated-types/associated-types-conditional-dispatch.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-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 // `Target=[A]`, then the impl marked with `(*)` is seen to conflict // with all the others. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; use std::ops::Deref; diff --git a/tests/ui/associated-types/associated-types-constant-type.rs b/tests/ui/associated-types/associated-types-constant-type.rs index 1e4c113a5fbed..80a99cce0a346 100644 --- a/tests/ui/associated-types/associated-types-constant-type.rs +++ b/tests/ui/associated-types/associated-types-constant-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait SignedUnsigned { type Opposite; diff --git a/tests/ui/associated-types/associated-types-doubleendediterator-object.rs b/tests/ui/associated-types/associated-types-doubleendediterator-object.rs index 05498ba63e994..9b1f43b53ab2a 100644 --- a/tests/ui/associated-types/associated-types-doubleendediterator-object.rs +++ b/tests/ui/associated-types/associated-types-doubleendediterator-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairwise_sub(mut t: Box>) -> isize { let mut result = 0; 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 12ca100435a47..e2c13716a6948 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,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that we do not report ambiguities when equivalent predicates // (modulo bound lifetime names) appears in the environment // twice. Issue #21965. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(t: T) -> i32 where T : for<'a> Fn(&'a u8) -> i32, 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 9ffccd3d8ff0d..d1ff4b222b789 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,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that we do not report ambiguities when the same predicate // appears in the environment twice. Issue #21965. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type B; diff --git a/tests/ui/associated-types/associated-types-enum-field-named.rs b/tests/ui/associated-types/associated-types-enum-field-named.rs index 896d67213e9b1..19fc51f4a2088 100644 --- a/tests/ui/associated-types/associated-types-enum-field-named.rs +++ b/tests/ui/associated-types/associated-types-enum-field-named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated types appearing in struct-like enum variants. diff --git a/tests/ui/associated-types/associated-types-enum-field-numbered.rs b/tests/ui/associated-types/associated-types-enum-field-numbered.rs index 77ced3c078106..06ece6ce81385 100644 --- a/tests/ui/associated-types/associated-types-enum-field-numbered.rs +++ b/tests/ui/associated-types/associated-types-enum-field-numbered.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated types appearing in tuple-like enum variants. diff --git a/tests/ui/associated-types/associated-types-eq-obj.rs b/tests/ui/associated-types/associated-types-eq-obj.rs index c202c376c5fe6..1236d770b95c7 100644 --- a/tests/ui/associated-types/associated-types-eq-obj.rs +++ b/tests/ui/associated-types/associated-types-eq-obj.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types inside of an object type -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type A; diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed index e713db025e8be..bce6148f9e199 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs index c5d7ba3a75537..94c9a1ee1e622 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/associated-types-from-supertrait.rs b/tests/ui/associated-types/associated-types-from-supertrait.rs index 8f40b94c09992..d0d3878ed06ca 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 +//@ run-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 8fa20cdf4b7a1..65e6a094b77df 100644 --- a/tests/ui/associated-types/associated-types-impl-redirect.rs +++ b/tests/ui/associated-types/associated-types-impl-redirect.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-in-ambiguous-context.rs b/tests/ui/associated-types/associated-types-in-ambiguous-context.rs index 5d6b1b5918100..98bbff794ca43 100644 --- a/tests/ui/associated-types/associated-types-in-ambiguous-context.rs +++ b/tests/ui/associated-types/associated-types-in-ambiguous-context.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "and \d+ other candidates" -> "and N other candidates" +//@ normalize-stderr-test: "and \d+ other candidates" -> "and N other candidates" trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-bound-type-arg.rs b/tests/ui/associated-types/associated-types-in-bound-type-arg.rs index 05e66a168d9cf..225b29d87bb46 100644 --- a/tests/ui/associated-types/associated-types-in-bound-type-arg.rs +++ b/tests/ui/associated-types/associated-types-in-bound-type-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test the case where we resolve `C::Result` and the trait bound // itself includes a `Self::Item` shorthand. // diff --git a/tests/ui/associated-types/associated-types-in-default-method.rs b/tests/ui/associated-types/associated-types-in-default-method.rs index 80ffbf585fb71..fa25c92fde5c4 100644 --- a/tests/ui/associated-types/associated-types-in-default-method.rs +++ b/tests/ui/associated-types/associated-types-in-default-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-fn.rs b/tests/ui/associated-types/associated-types-in-fn.rs index 9c588a528fe88..6f34f4f9a8306 100644 --- a/tests/ui/associated-types/associated-types-in-fn.rs +++ b/tests/ui/associated-types/associated-types-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-impl-generics.rs b/tests/ui/associated-types/associated-types-in-impl-generics.rs index 0ddd99cbfa839..6f46cb4aafff7 100644 --- a/tests/ui/associated-types/associated-types-in-impl-generics.rs +++ b/tests/ui/associated-types/associated-types-in-impl-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-inherent-method.rs b/tests/ui/associated-types/associated-types-in-inherent-method.rs index 1f29e96685149..35f7bdc2f67b3 100644 --- a/tests/ui/associated-types/associated-types-in-inherent-method.rs +++ b/tests/ui/associated-types/associated-types-in-inherent-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-issue-20220.rs b/tests/ui/associated-types/associated-types-issue-20220.rs index 89efce198340f..90106e4c36d14 100644 --- a/tests/ui/associated-types/associated-types-issue-20220.rs +++ b/tests/ui/associated-types/associated-types-issue-20220.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test references to `Self::Item` in the trait. Issue #20220. diff --git a/tests/ui/associated-types/associated-types-issue-20371.rs b/tests/ui/associated-types/associated-types-issue-20371.rs index cbec83d45b29d..32fe1ca1c00af 100644 --- a/tests/ui/associated-types/associated-types-issue-20371.rs +++ b/tests/ui/associated-types/associated-types-issue-20371.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // Test that we are able to have an impl that defines an associated type // before the actual trait. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 impl X for f64 { type Y = isize; } trait X { type Y; } diff --git a/tests/ui/associated-types/associated-types-issue-21212.rs b/tests/ui/associated-types/associated-types-issue-21212.rs index ce27eac4d0ebe..4d177b69bf891 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 +//@ run-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-iterator-binding.rs b/tests/ui/associated-types/associated-types-iterator-binding.rs index 7c5528c986ee9..720ceaa7f815e 100644 --- a/tests/ui/associated-types/associated-types-iterator-binding.rs +++ b/tests/ui/associated-types/associated-types-iterator-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairwise_sub>(mut t: T) -> isize { let mut result = 0; diff --git a/tests/ui/associated-types/associated-types-method.rs b/tests/ui/associated-types/associated-types-method.rs index 6a6456cbbecdc..63b2a925e9bbc 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 +//@ run-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 440f35c8bdef4..90ff170a6a711 100644 --- a/tests/ui/associated-types/associated-types-nested-projections.rs +++ b/tests/ui/associated-types/associated-types-nested-projections.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that we can resolve nested projection types. Issue #20666. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::slice; 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 7c54efb83c26a..bd9b91b002eec 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,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in a bound that // contains a binding. Issue #21664. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs index 6612598b1b8b4..884b1a17a2cbc 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs index df0a82ee7ceb0..8da60e1d9cba0 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; 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 a04525dcd462a..ab36240ed636d 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 +//@ run-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-overridden-default.rs b/tests/ui/associated-types/associated-types-overridden-default.rs index 3e12c92289618..3265c2295291b 100644 --- a/tests/ui/associated-types/associated-types-overridden-default.rs +++ b/tests/ui/associated-types/associated-types-overridden-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Before RFC 2532, overriding one assoc. type default required overriding all // provided defaults. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed index bca69a9767782..8abef2ef569ca 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed @@ -1,5 +1,5 @@ #![allow(dead_code, unused_variables)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a function signature. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs index 1e23dd8890b9c..f0a5a11a219e8 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs @@ -1,5 +1,5 @@ #![allow(dead_code, unused_variables)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a function signature. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed index 66d8613f184ac..0d98af78ef414 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed @@ -1,5 +1,5 @@ #![allow(dead_code)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a method definition in a trait. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs index 0a1b29de19e38..d62e722274748 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a method definition in a trait. diff --git a/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs b/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs index fc1dba97dfd95..44fae6000a96f 100644 --- a/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs +++ b/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Various uses of `T::Item` syntax where the bound that supplies // `Item` originates in a where-clause, not the declaration of // `T`. Issue #20300. diff --git a/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs b/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs index 353f82e7c6e63..5b5d8881589f8 100644 --- a/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs @@ -1,7 +1,7 @@ // Check that if we have multiple applicable projection bounds we pick one (for // backwards compatibility reasons). -// check-pass +//@ check-pass use std::ops::Mul; trait A { diff --git a/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs b/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs index e99d0112ec4fd..caa7c61365ba0 100644 --- a/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs +++ b/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we correctly handle projection bounds appearing in the // supertrait list (and in conjunction with overloaded operators). In diff --git a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs index e172c6e5611d3..22d9cf0909055 100644 --- a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs +++ b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test where the impl self type uses a projection from a constant type. 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 eec95a141f5cf..4cf1c256f3d3f 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // Corrected regression test for #20831. The original did not compile. @@ -6,7 +6,7 @@ // appear in associated type bindings in object types, which were not // being properly flagged. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::{Shl, Shr}; use std::cell::RefCell; diff --git a/tests/ui/associated-types/associated-types-projection-in-supertrait.rs b/tests/ui/associated-types/associated-types-projection-in-supertrait.rs index ead405fcf0119..476bf5760f361 100644 --- a/tests/ui/associated-types/associated-types-projection-in-supertrait.rs +++ b/tests/ui/associated-types/associated-types-projection-in-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we are handle to correctly handle a projection type // that appears in a supertrait bound. Issue #20559. diff --git a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs index e9a26e53c3c7d..ed8259396d11b 100644 --- a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs +++ b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test a where clause that uses a non-normalized projection type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Int { diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed index 01f49d52ee212..cf766ffd7f1a7 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we get an error when you use `::Value` in // the trait definition even if there is no default method. diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs index 7068a754a12c1..3ea5f808de142 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we get an error when you use `::Value` in // the trait definition even if there is no default method. diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs index a2d6c9ff5a45b..6a287e1792cd1 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that we do not get an error when you use `::Value` in // the trait definition if there is no default method and for every impl, // `Self` does implement `Get`. diff --git a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs index 1768fd1687b4e..f0a3432519646 100644 --- a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs +++ b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { type Bar; 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 c89f6046e6bf2..c16bb8651c3c7 100644 --- a/tests/ui/associated-types/associated-types-ref-from-struct.rs +++ b/tests/ui/associated-types/associated-types-ref-from-struct.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test associated type references in structure fields. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Test { type V; diff --git a/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs b/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs index 4a490ed0387d2..c39e6deaf3943 100644 --- a/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs +++ b/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated type references in a struct literal. Issue #20535. 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 b722506dbbf0e..dec3a3c924563 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,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #20582. This test caused an ICE related to // inconsistent region erasure in codegen. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { buf: &'a[u8] diff --git a/tests/ui/associated-types/associated-types-resolve-lifetime.rs b/tests/ui/associated-types/associated-types-resolve-lifetime.rs index 563d0c1182211..6be2fa6f2ab49 100644 --- a/tests/ui/associated-types/associated-types-resolve-lifetime.rs +++ b/tests/ui/associated-types/associated-types-resolve-lifetime.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Get { fn get(&self) -> T; diff --git a/tests/ui/associated-types/associated-types-return.rs b/tests/ui/associated-types/associated-types-return.rs index 997a48b0379a9..cd4614df3e315 100644 --- a/tests/ui/associated-types/associated-types-return.rs +++ b/tests/ui/associated-types/associated-types-return.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types in a where clause. diff --git a/tests/ui/associated-types/associated-types-simple.rs b/tests/ui/associated-types/associated-types-simple.rs index 2e2dfd80726cd..ce821c25cbc93 100644 --- a/tests/ui/associated-types/associated-types-simple.rs +++ b/tests/ui/associated-types/associated-types-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-stream.rs b/tests/ui/associated-types/associated-types-stream.rs index c9b302b96919f..a03df341583e1 100644 --- a/tests/ui/associated-types/associated-types-stream.rs +++ b/tests/ui/associated-types/associated-types-stream.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test references to the trait `Stream` in the bounds for associated // types defined on `Stream`. Issue #20551. diff --git a/tests/ui/associated-types/associated-types-struct-field-named.rs b/tests/ui/associated-types/associated-types-struct-field-named.rs index c400bf943e182..cac0049c4f97c 100644 --- a/tests/ui/associated-types/associated-types-struct-field-named.rs +++ b/tests/ui/associated-types/associated-types-struct-field-named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we correctly normalize the type of a struct field // which has an associated type. diff --git a/tests/ui/associated-types/associated-types-struct-field-numbered.rs b/tests/ui/associated-types/associated-types-struct-field-numbered.rs index b71b71b25f55f..98f5516e85892 100644 --- a/tests/ui/associated-types/associated-types-struct-field-numbered.rs +++ b/tests/ui/associated-types/associated-types-struct-field-numbered.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we correctly normalize the type of a struct field // which has an associated type. diff --git a/tests/ui/associated-types/associated-types-sugar-path.rs b/tests/ui/associated-types/associated-types-sugar-path.rs index 66f7672aa43dc..7b57e4a0ea0f7 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-unsized.fixed b/tests/ui/associated-types/associated-types-unsized.fixed index 328c8f944e2e0..7c91793b520bb 100644 --- a/tests/ui/associated-types/associated-types-unsized.fixed +++ b/tests/ui/associated-types/associated-types-unsized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] trait Get { diff --git a/tests/ui/associated-types/associated-types-unsized.rs b/tests/ui/associated-types/associated-types-unsized.rs index bdba4c7ff16a1..5cdb4a6133c6b 100644 --- a/tests/ui/associated-types/associated-types-unsized.rs +++ b/tests/ui/associated-types/associated-types-unsized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] trait Get { 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 f2a4c6e42a93f..dcfa3532cdfb5 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,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // Test how resolving a projection interacts with inference. In this diff --git a/tests/ui/associated-types/bound-lifetime-constrained.rs b/tests/ui/associated-types/bound-lifetime-constrained.rs index 4e6754c865dce..880d350bdf602 100644 --- a/tests/ui/associated-types/bound-lifetime-constrained.rs +++ b/tests/ui/associated-types/bound-lifetime-constrained.rs @@ -1,4 +1,4 @@ -// revisions: func object clause +//@ revisions: func object clause #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/bound-lifetime-in-binding-only.rs b/tests/ui/associated-types/bound-lifetime-in-binding-only.rs index e714457ef7b38..e973e58b629fd 100644 --- a/tests/ui/associated-types/bound-lifetime-in-binding-only.rs +++ b/tests/ui/associated-types/bound-lifetime-in-binding-only.rs @@ -1,4 +1,4 @@ -// revisions: angle paren ok elision +//@ revisions: angle paren ok elision #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.rs b/tests/ui/associated-types/bound-lifetime-in-return-only.rs index a60ccb6c4b28d..bf3aa6149cce3 100644 --- a/tests/ui/associated-types/bound-lifetime-in-return-only.rs +++ b/tests/ui/associated-types/bound-lifetime-in-return-only.rs @@ -1,4 +1,4 @@ -// revisions: sig local structure ok elision +//@ revisions: sig local structure ok elision #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/cache/chrono-scan.rs b/tests/ui/associated-types/cache/chrono-scan.rs index 964ddc9b625de..83fdfa60d0d70 100644 --- a/tests/ui/associated-types/cache/chrono-scan.rs +++ b/tests/ui/associated-types/cache/chrono-scan.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(deprecated)] diff --git a/tests/ui/associated-types/cache/elision.rs b/tests/ui/associated-types/cache/elision.rs index b3e1ec8ad703c..12765fc581108 100644 --- a/tests/ui/associated-types/cache/elision.rs +++ b/tests/ui/associated-types/cache/elision.rs @@ -2,7 +2,7 @@ // trait without elision (a bug in this cropped up during // bootstrapping, so this is a regression test). -// check-pass +//@ check-pass pub struct SplitWhitespace<'a> { x: &'a u8 diff --git a/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs b/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs index f1ea6627aab86..6763155790086 100644 --- a/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs +++ b/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs @@ -5,9 +5,9 @@ // if we do it just once. In this variant, the region `'a` is used in // an contravariant position, which affects the results. -// revisions: ok oneuse transmute krisskross -//[ok] check-pass -//[oneuse] check-pass +//@ revisions: ok oneuse transmute krisskross +//@[ok] check-pass +//@[oneuse] check-pass #![allow(dead_code, unused_variables)] diff --git a/tests/ui/associated-types/cache/project-fn-ret-invariant.rs b/tests/ui/associated-types/cache/project-fn-ret-invariant.rs index e043379133ab0..4ac642c0e04b5 100644 --- a/tests/ui/associated-types/cache/project-fn-ret-invariant.rs +++ b/tests/ui/associated-types/cache/project-fn-ret-invariant.rs @@ -4,8 +4,8 @@ // if we do it just once. In this variant, the region `'a` is used in // an invariant position, which affects the results. -// revisions: ok oneuse transmute krisskross -//[ok] check-pass +//@ revisions: ok oneuse transmute krisskross +//@[ok] check-pass #![allow(dead_code, unused_variables)] diff --git a/tests/ui/associated-types/default-associated-types.rs b/tests/ui/associated-types/default-associated-types.rs index aae70bffa3837..00b14305244b2 100644 --- a/tests/ui/associated-types/default-associated-types.rs +++ b/tests/ui/associated-types/default-associated-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-cyclic-pass-1.rs b/tests/ui/associated-types/defaults-cyclic-pass-1.rs index 97c6e5bade233..8f73ea0fb639e 100644 --- a/tests/ui/associated-types/defaults-cyclic-pass-1.rs +++ b/tests/ui/associated-types/defaults-cyclic-pass-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-cyclic-pass-2.rs b/tests/ui/associated-types/defaults-cyclic-pass-2.rs index 69315a022100b..0646dbf6055e7 100644 --- a/tests/ui/associated-types/defaults-cyclic-pass-2.rs +++ b/tests/ui/associated-types/defaults-cyclic-pass-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs b/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs index a3bfcd8efe29a..5d66494f79691 100644 --- a/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs +++ b/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/higher-ranked-projection.rs b/tests/ui/associated-types/higher-ranked-projection.rs index 7e6c509a2722d..443d759e80b85 100644 --- a/tests/ui/associated-types/higher-ranked-projection.rs +++ b/tests/ui/associated-types/higher-ranked-projection.rs @@ -1,5 +1,5 @@ -// revisions: good bad -//[good] check-pass +//@ revisions: good bad +//@[good] check-pass trait Mirror { type Image; diff --git a/tests/ui/associated-types/impl-wf-cycle-5.fixed b/tests/ui/associated-types/impl-wf-cycle-5.fixed index 2b8f1e0d865ee..1c2c0811a5006 100644 --- a/tests/ui/associated-types/impl-wf-cycle-5.fixed +++ b/tests/ui/associated-types/impl-wf-cycle-5.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-5.rs b/tests/ui/associated-types/impl-wf-cycle-5.rs index e6de292ca5c91..88a0b762c37bf 100644 --- a/tests/ui/associated-types/impl-wf-cycle-5.rs +++ b/tests/ui/associated-types/impl-wf-cycle-5.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-6.fixed b/tests/ui/associated-types/impl-wf-cycle-6.fixed index 5ddf1faefe088..45143be1e74fe 100644 --- a/tests/ui/associated-types/impl-wf-cycle-6.fixed +++ b/tests/ui/associated-types/impl-wf-cycle-6.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-6.rs b/tests/ui/associated-types/impl-wf-cycle-6.rs index 28f6deb77ce1f..a05ffcd6b4c3e 100644 --- a/tests/ui/associated-types/impl-wf-cycle-6.rs +++ b/tests/ui/associated-types/impl-wf-cycle-6.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/issue-18655.rs b/tests/ui/associated-types/issue-18655.rs index 3d18542acdcb2..b163fa6929651 100644 --- a/tests/ui/associated-types/issue-18655.rs +++ b/tests/ui/associated-types/issue-18655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Factory { type Product; fn create(&self) -> ::Product; diff --git a/tests/ui/associated-types/issue-19081.rs b/tests/ui/associated-types/issue-19081.rs index fbfe4c6f83911..f502915eac3b1 100644 --- a/tests/ui/associated-types/issue-19081.rs +++ b/tests/ui/associated-types/issue-19081.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Hasher { type State; diff --git a/tests/ui/associated-types/issue-20825-2.rs b/tests/ui/associated-types/issue-20825-2.rs index b79a297308279..d0b6fff7e38b4 100644 --- a/tests/ui/associated-types/issue-20825-2.rs +++ b/tests/ui/associated-types/issue-20825-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Subscriber { type Input; } diff --git a/tests/ui/associated-types/issue-21363.rs b/tests/ui/associated-types/issue-21363.rs index acc28cb430b27..0dcebafd95b05 100644 --- a/tests/ui/associated-types/issue-21363.rs +++ b/tests/ui/associated-types/issue-21363.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![no_implicit_prelude] diff --git a/tests/ui/associated-types/issue-21726.rs b/tests/ui/associated-types/issue-21726.rs index b98cf21669587..f014c64478630 100644 --- a/tests/ui/associated-types/issue-21726.rs +++ b/tests/ui/associated-types/issue-21726.rs @@ -1,10 +1,10 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #21726: an issue arose around the rules for // subtyping of projection types that resulted in an unconstrained // region, yielding region inference failures. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { } diff --git a/tests/ui/associated-types/issue-22066.rs b/tests/ui/associated-types/issue-22066.rs index 8e8ba5dc46c9a..6c8339b9c092a 100644 --- a/tests/ui/associated-types/issue-22066.rs +++ b/tests/ui/associated-types/issue-22066.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait LineFormatter<'a> { type Iter: Iterator + 'a; fn iter(&'a self, line: &'a str) -> Self::Iter; diff --git a/tests/ui/associated-types/issue-22828.rs b/tests/ui/associated-types/issue-22828.rs index adf4dd6ce75a0..2f65f1c230386 100644 --- a/tests/ui/associated-types/issue-22828.rs +++ b/tests/ui/associated-types/issue-22828.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type A; diff --git a/tests/ui/associated-types/issue-23208.rs b/tests/ui/associated-types/issue-23208.rs index fd4ffe5d6e1e1..fabcffb5cf060 100644 --- a/tests/ui/associated-types/issue-23208.rs +++ b/tests/ui/associated-types/issue-23208.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait TheTrait : TheSuperTrait<::Item> { type Item; } diff --git a/tests/ui/associated-types/issue-24159.rs b/tests/ui/associated-types/issue-24159.rs index 49753e7bf1660..acd523f465d4f 100644 --- a/tests/ui/associated-types/issue-24159.rs +++ b/tests/ui/associated-types/issue-24159.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/associated-types/issue-24204.rs b/tests/ui/associated-types/issue-24204.rs index 5a7b3459589eb..5ce8dfbc4d21a 100644 --- a/tests/ui/associated-types/issue-24204.rs +++ b/tests/ui/associated-types/issue-24204.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-24338.rs b/tests/ui/associated-types/issue-24338.rs index 3a2c790f85203..854eeea8833f2 100644 --- a/tests/ui/associated-types/issue-24338.rs +++ b/tests/ui/associated-types/issue-24338.rs @@ -1,5 +1,5 @@ // -// check-pass +//@ check-pass trait DictLike<'a> { type ItemsIterator: Iterator; diff --git a/tests/ui/associated-types/issue-25339.rs b/tests/ui/associated-types/issue-25339.rs index 6f8ec700951e2..a18ddc2f20714 100644 --- a/tests/ui/associated-types/issue-25339.rs +++ b/tests/ui/associated-types/issue-25339.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-25700-1.rs b/tests/ui/associated-types/issue-25700-1.rs index 79652dc882b54..7ab82438d07b9 100644 --- a/tests/ui/associated-types/issue-25700-1.rs +++ b/tests/ui/associated-types/issue-25700-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S(#[allow(dead_code)] Option<&'static T>); trait Tr { type Out; } diff --git a/tests/ui/associated-types/issue-25700-2.rs b/tests/ui/associated-types/issue-25700-2.rs index f745da4a5cb07..7323e1e39ac16 100644 --- a/tests/ui/associated-types/issue-25700-2.rs +++ b/tests/ui/associated-types/issue-25700-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Parser { type Input; } diff --git a/tests/ui/associated-types/issue-27901.rs b/tests/ui/associated-types/issue-27901.rs index ffd90b689839b..3955de2b70536 100644 --- a/tests/ui/associated-types/issue-27901.rs +++ b/tests/ui/associated-types/issue-27901.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Stream { type Item; } impl<'a> Stream for &'a str { type Item = u8; } fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) { diff --git a/tests/ui/associated-types/issue-28871.rs b/tests/ui/associated-types/issue-28871.rs index 210c783de79fe..ce0decd066d98 100644 --- a/tests/ui/associated-types/issue-28871.rs +++ b/tests/ui/associated-types/issue-28871.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #28871. The problem is that rustc encountered // two ways to project, one from a where clause and one from the where // clauses on the trait definition. (In fact, in this case, the where diff --git a/tests/ui/associated-types/issue-31597.rs b/tests/ui/associated-types/issue-31597.rs index 2872be6d6c855..4f7dcd250d179 100644 --- a/tests/ui/associated-types/issue-31597.rs +++ b/tests/ui/associated-types/issue-31597.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Make { type Out; diff --git a/tests/ui/associated-types/issue-32350.rs b/tests/ui/associated-types/issue-32350.rs index bda21eb0e0ac8..0edcf1d6e060f 100644 --- a/tests/ui/associated-types/issue-32350.rs +++ b/tests/ui/associated-types/issue-32350.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is another instance of the "normalizations don't work" issue with // defaulted associated types. diff --git a/tests/ui/associated-types/issue-36499.rs b/tests/ui/associated-types/issue-36499.rs index 3d6f11faff78c..25f4060fa6f58 100644 --- a/tests/ui/associated-types/issue-36499.rs +++ b/tests/ui/associated-types/issue-36499.rs @@ -1,4 +1,4 @@ -// error-pattern: aborting due to 1 previous error +//@ error-pattern: aborting due to 1 previous error fn main() { 2 + +2; diff --git a/tests/ui/associated-types/issue-37808.rs b/tests/ui/associated-types/issue-37808.rs index 3701c37d0c86f..3022167c2df5f 100644 --- a/tests/ui/associated-types/issue-37808.rs +++ b/tests/ui/associated-types/issue-37808.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Parent { type Ty; diff --git a/tests/ui/associated-types/issue-37883.rs b/tests/ui/associated-types/issue-37883.rs index d854f6af3ea94..181882f251ec8 100644 --- a/tests/ui/associated-types/issue-37883.rs +++ b/tests/ui/associated-types/issue-37883.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Mul; diff --git a/tests/ui/associated-types/issue-38917.rs b/tests/ui/associated-types/issue-38917.rs index 7e898851aa83a..c3713106f1160 100644 --- a/tests/ui/associated-types/issue-38917.rs +++ b/tests/ui/associated-types/issue-38917.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Borrow; diff --git a/tests/ui/associated-types/issue-39532.rs b/tests/ui/associated-types/issue-39532.rs index 52652cedec961..a0036ef860e3f 100644 --- a/tests/ui/associated-types/issue-39532.rs +++ b/tests/ui/associated-types/issue-39532.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/associated-types/issue-40093.rs b/tests/ui/associated-types/issue-40093.rs index fd325ae100861..ae922be25d036 100644 --- a/tests/ui/associated-types/issue-40093.rs +++ b/tests/ui/associated-types/issue-40093.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Test { type Item; diff --git a/tests/ui/associated-types/issue-41868.rs b/tests/ui/associated-types/issue-41868.rs index 52bbd1f5d2863..279b942d0e3bb 100644 --- a/tests/ui/associated-types/issue-41868.rs +++ b/tests/ui/associated-types/issue-41868.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Defaulted assoc. types should normalize properly in impls that don't // override them. diff --git a/tests/ui/associated-types/issue-43475.rs b/tests/ui/associated-types/issue-43475.rs index 5f177333c93d5..939a9b2a6ca93 100644 --- a/tests/ui/associated-types/issue-43475.rs +++ b/tests/ui/associated-types/issue-43475.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type FooT: Foo; } impl Foo for () { type FooT = (); } diff --git a/tests/ui/associated-types/issue-47139-1.rs b/tests/ui/associated-types/issue-47139-1.rs index c55fc34346cbc..8c25ee118f6fb 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 +//@ run-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 d2ef89425304a..f99beee7f8f58 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 +//@ run-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-47385.rs b/tests/ui/associated-types/issue-47385.rs index d43d674e9c3a0..7627e34ba7148 100644 --- a/tests/ui/associated-types/issue-47385.rs +++ b/tests/ui/associated-types/issue-47385.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-48010.rs b/tests/ui/associated-types/issue-48010.rs index 70e30c132d05c..ad37c0f82c24b 100644 --- a/tests/ui/associated-types/issue-48010.rs +++ b/tests/ui/associated-types/issue-48010.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/associated-types/issue-48551.rs b/tests/ui/associated-types/issue-48551.rs index b95a4832bb209..8c7dfa5a479e6 100644 --- a/tests/ui/associated-types/issue-48551.rs +++ b/tests/ui/associated-types/issue-48551.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #48551. Covers a case where duplicate candidates // arose during associated type projection. diff --git a/tests/ui/associated-types/issue-50301.rs b/tests/ui/associated-types/issue-50301.rs index 47ee3e7ad70e8..f6febf80cf52a 100644 --- a/tests/ui/associated-types/issue-50301.rs +++ b/tests/ui/associated-types/issue-50301.rs @@ -1,5 +1,5 @@ // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301 -// check-pass +//@ check-pass trait Trait where for<'a> &'a Self::IntoIter: IntoIterator, diff --git a/tests/ui/associated-types/issue-54182-1.rs b/tests/ui/associated-types/issue-54182-1.rs index 1a1e98cbac27f..1ebcca758c0fc 100644 --- a/tests/ui/associated-types/issue-54182-1.rs +++ b/tests/ui/associated-types/issue-54182-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the return type of trait methods is correctly normalized when // checking that a method in an impl matches the trait definition when the diff --git a/tests/ui/associated-types/issue-54182-2.rs b/tests/ui/associated-types/issue-54182-2.rs index c88c766313671..b90982b2d6698 100644 --- a/tests/ui/associated-types/issue-54182-2.rs +++ b/tests/ui/associated-types/issue-54182-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Before RFC 2532, normalizing a defaulted assoc. type didn't work at all, // unless the impl in question overrides that type, which makes the default diff --git a/tests/ui/associated-types/issue-54467.rs b/tests/ui/associated-types/issue-54467.rs index 734bf2768c2a3..87fb0caf1d5f1 100644 --- a/tests/ui/associated-types/issue-54467.rs +++ b/tests/ui/associated-types/issue-54467.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Stream { type Item; diff --git a/tests/ui/associated-types/issue-55846.rs b/tests/ui/associated-types/issue-55846.rs index bd766752360a1..1b29f2cccfa81 100644 --- a/tests/ui/associated-types/issue-55846.rs +++ b/tests/ui/associated-types/issue-55846.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #55846, which once caused an ICE. diff --git a/tests/ui/associated-types/issue-63591.rs b/tests/ui/associated-types/issue-63591.rs index d07c123499892..33826a24ddb9a 100644 --- a/tests/ui/associated-types/issue-63591.rs +++ b/tests/ui/associated-types/issue-63591.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/associated-types/issue-64848.rs b/tests/ui/associated-types/issue-64848.rs index 77712168a0fd9..c107a1515aafa 100644 --- a/tests/ui/associated-types/issue-64848.rs +++ b/tests/ui/associated-types/issue-64848.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait AssociatedConstant { const DATA: (); diff --git a/tests/ui/associated-types/issue-64855-2.rs b/tests/ui/associated-types/issue-64855-2.rs index 1d53bd5703165..30cb37b5198e2 100644 --- a/tests/ui/associated-types/issue-64855-2.rs +++ b/tests/ui/associated-types/issue-64855-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Bar<'a>(&'a Self) where Self: ; diff --git a/tests/ui/associated-types/issue-65934.rs b/tests/ui/associated-types/issue-65934.rs index e17b11c5eae1c..ad9dc388728f3 100644 --- a/tests/ui/associated-types/issue-65934.rs +++ b/tests/ui/associated-types/issue-65934.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/associated-types/issue-67684.rs b/tests/ui/associated-types/issue-67684.rs index c6920cf8d40c1..3122c670b4406 100644 --- a/tests/ui/associated-types/issue-67684.rs +++ b/tests/ui/associated-types/issue-67684.rs @@ -1,10 +1,10 @@ -// revisions: check build -// [check]check-pass +//@ revisions: check build +//@ [check]check-pass // // This second configuration aims to verify that we do not ICE in ConstProp because of // normalization failure. -// [build]build-pass -// [build]compile-flags: -Zmir-opt-level=3 --emit=mir +//@ [build]build-pass +//@ [build]compile-flags: -Zmir-opt-level=3 --emit=mir #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-69398.rs b/tests/ui/associated-types/issue-69398.rs index ca3d66b1c8eb7..654c0f6e4b54a 100644 --- a/tests/ui/associated-types/issue-69398.rs +++ b/tests/ui/associated-types/issue-69398.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/associated-types/issue-71113.rs b/tests/ui/associated-types/issue-71113.rs index 48de89127f4a5..51429f9ee6738 100644 --- a/tests/ui/associated-types/issue-71113.rs +++ b/tests/ui/associated-types/issue-71113.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Cow; diff --git a/tests/ui/associated-types/issue-76179.rs b/tests/ui/associated-types/issue-76179.rs index 0e086968b9056..efff473c26e41 100644 --- a/tests/ui/associated-types/issue-76179.rs +++ b/tests/ui/associated-types/issue-76179.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-82079.rs b/tests/ui/associated-types/issue-82079.rs index 8b3bad707d3f2..a2d04c22edb3b 100644 --- a/tests/ui/associated-types/issue-82079.rs +++ b/tests/ui/associated-types/issue-82079.rs @@ -1,6 +1,6 @@ -// revisions: default miropt -// check-pass -//[miropt]compile-flags: -Z mir-opt-level=3 +//@ revisions: default miropt +//@ check-pass +//@[miropt]compile-flags: -Z mir-opt-level=3 // -^ This flag is for #96395 as a regression test. mod convenience_operators { diff --git a/tests/ui/associated-types/issue-88856.rs b/tests/ui/associated-types/issue-88856.rs index 7cae7c71cd2d0..47585a508fdeb 100644 --- a/tests/ui/associated-types/issue-88856.rs +++ b/tests/ui/associated-types/issue-88856.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-types/issue-91069.rs b/tests/ui/associated-types/issue-91069.rs index 109c2eed27a33..dc686c05b98b6 100644 --- a/tests/ui/associated-types/issue-91069.rs +++ b/tests/ui/associated-types/issue-91069.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Associate { type Associated; diff --git a/tests/ui/associated-types/issue-91231.rs b/tests/ui/associated-types/issue-91231.rs index 3c1cb81f09756..d1c99fd44fa02 100644 --- a/tests/ui/associated-types/issue-91231.rs +++ b/tests/ui/associated-types/issue-91231.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(extern_types)] #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-91234.rs b/tests/ui/associated-types/issue-91234.rs index 2f6c2d3aebd0a..4828155ba3947 100644 --- a/tests/ui/associated-types/issue-91234.rs +++ b/tests/ui/associated-types/issue-91234.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Struct; diff --git a/tests/ui/associated-types/normalization-debruijn-1.rs b/tests/ui/associated-types/normalization-debruijn-1.rs index a5abf1ba99d6a..ced2d193e69e6 100644 --- a/tests/ui/associated-types/normalization-debruijn-1.rs +++ b/tests/ui/associated-types/normalization-debruijn-1.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-debruijn-2.rs b/tests/ui/associated-types/normalization-debruijn-2.rs index abe248e16a198..d33ff57021f2c 100644 --- a/tests/ui/associated-types/normalization-debruijn-2.rs +++ b/tests/ui/associated-types/normalization-debruijn-2.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-debruijn-3.rs b/tests/ui/associated-types/normalization-debruijn-3.rs index bd9a8fcf4925f..f12860fe6db72 100644 --- a/tests/ui/associated-types/normalization-debruijn-3.rs +++ b/tests/ui/associated-types/normalization-debruijn-3.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-generality-2.rs b/tests/ui/associated-types/normalization-generality-2.rs index d8790bb2d12fc..50287f9ee9b8e 100644 --- a/tests/ui/associated-types/normalization-generality-2.rs +++ b/tests/ui/associated-types/normalization-generality-2.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Ensures that we don't regress on "implementation is not general enough" when // normalizating under binders. Unlike `normalization-generality.rs`, this also produces diff --git a/tests/ui/associated-types/normalization-generality.rs b/tests/ui/associated-types/normalization-generality.rs index f8e3f5b58d1b3..35fcf53b64141 100644 --- a/tests/ui/associated-types/normalization-generality.rs +++ b/tests/ui/associated-types/normalization-generality.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Ensures that we don't regress on "implementation is not general enough" when // normalizating under binders. diff --git a/tests/ui/associated-types/normalization-probe-cycle.rs b/tests/ui/associated-types/normalization-probe-cycle.rs index 9c1a488e95175..c501b2f3f245c 100644 --- a/tests/ui/associated-types/normalization-probe-cycle.rs +++ b/tests/ui/associated-types/normalization-probe-cycle.rs @@ -1,6 +1,6 @@ // Regression test for #77656 -// check-pass +//@ check-pass trait Value: PartialOrd {} diff --git a/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs b/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs index 0fd2c707938c6..60e5d594202e6 100644 --- a/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs +++ b/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs @@ -1,6 +1,6 @@ // Case that the fix for #74868 also allowed to compile -// check-pass +//@ check-pass trait BoxedDsl { type Output; diff --git a/tests/ui/associated-types/normalize-cycle-in-eval.rs b/tests/ui/associated-types/normalize-cycle-in-eval.rs index dff4c9051f47a..6a50ee6e76f78 100644 --- a/tests/ui/associated-types/normalize-cycle-in-eval.rs +++ b/tests/ui/associated-types/normalize-cycle-in-eval.rs @@ -1,6 +1,6 @@ // regression test for #74868 -// check-pass +//@ check-pass trait BoxedDsl<'a> { type Output; diff --git a/tests/ui/associated-types/object-method-numbering.rs b/tests/ui/associated-types/object-method-numbering.rs index bf80a80f4060c..7fe2a81bd59b7 100644 --- a/tests/ui/associated-types/object-method-numbering.rs +++ b/tests/ui/associated-types/object-method-numbering.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for using an object with an associated type binding as the // instantiation for a generic type with a bound. diff --git a/tests/ui/associated-types/object-normalization.rs b/tests/ui/associated-types/object-normalization.rs index 1f93248e10ec4..658905995a07f 100644 --- a/tests/ui/associated-types/object-normalization.rs +++ b/tests/ui/associated-types/object-normalization.rs @@ -2,7 +2,7 @@ // Check that we normalize super predicates for object candidates. -// check-pass +//@ check-pass use std::ops::Index; diff --git a/tests/ui/associated-types/param-env-normalize-cycle.rs b/tests/ui/associated-types/param-env-normalize-cycle.rs index 12db595ed2572..c50149b34436e 100644 --- a/tests/ui/associated-types/param-env-normalize-cycle.rs +++ b/tests/ui/associated-types/param-env-normalize-cycle.rs @@ -9,7 +9,7 @@ // - But first we tried normalizing the whole obligation, including the // ParamEnv, which leads to a cycle error. -// check-pass +//@ check-pass trait PrivateSquareRoot {} diff --git a/tests/ui/associated-types/project-defer-unification.rs b/tests/ui/associated-types/project-defer-unification.rs index 547ff45c22968..cec088496fd38 100644 --- a/tests/ui/associated-types/project-defer-unification.rs +++ b/tests/ui/associated-types/project-defer-unification.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/project-recursion-limit-non-fatal.rs b/tests/ui/associated-types/project-recursion-limit-non-fatal.rs index 3e68b1401020f..614c80de51299 100644 --- a/tests/ui/associated-types/project-recursion-limit-non-fatal.rs +++ b/tests/ui/associated-types/project-recursion-limit-non-fatal.rs @@ -2,7 +2,7 @@ // is non-fatal. The above code, minimised from wundergraph shows a case // where this is relied on. -// check-pass +//@ check-pass struct AlternateTable {} struct AlternateQuery {} diff --git a/tests/ui/associated-types/substs-ppaux.rs b/tests/ui/associated-types/substs-ppaux.rs index db6e7a4cf051f..d32cdd2465863 100644 --- a/tests/ui/associated-types/substs-ppaux.rs +++ b/tests/ui/associated-types/substs-ppaux.rs @@ -1,7 +1,7 @@ // -// revisions: verbose normal +//@ revisions: verbose normal // -//[verbose] compile-flags: -Z verbose-internals +//@[verbose] compile-flags: -Z verbose-internals trait Foo<'b, 'c, S=u32> { fn bar<'a, T>() where T: 'a {} diff --git a/tests/ui/associated-types/wf-cycle-2.rs b/tests/ui/associated-types/wf-cycle-2.rs index d7467ac22371f..36f79e34f3eaa 100644 --- a/tests/ui/associated-types/wf-cycle-2.rs +++ b/tests/ui/associated-types/wf-cycle-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait IntoIt { type Item; diff --git a/tests/ui/associated-types/wf-cycle.rs b/tests/ui/associated-types/wf-cycle.rs index cf6508551a558..f54a0b523e2a8 100644 --- a/tests/ui/associated-types/wf-cycle.rs +++ b/tests/ui/associated-types/wf-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type U: Copy; diff --git a/tests/ui/async-await/argument-patterns.rs b/tests/ui/async-await/argument-patterns.rs index b9fc1a88cee13..658e8f9b9073f 100644 --- a/tests/ui/async-await/argument-patterns.rs +++ b/tests/ui/async-await/argument-patterns.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs b/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs index 8e08b82b9d3e3..28705bfc0c8f8 100644 --- a/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs +++ b/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // Check that the anonymous lifetimes used here aren't considered to shadow one // another. Note that `async fn` is different to `fn` here because the lifetimes // are numbered by HIR lowering, rather than lifetime resolution. -// edition:2018 +//@ edition:2018 struct A<'a, 'b>(&'a &'b i32); struct B<'a>(&'a i32); diff --git a/tests/ui/async-await/async-await-let-else.rs b/tests/ui/async-await/async-await-let-else.rs index a3c7226056b29..a7b4bf8903aea 100644 --- a/tests/ui/async-await/async-await-let-else.rs +++ b/tests/ui/async-await/async-await-let-else.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::rc::Rc; diff --git a/tests/ui/async-await/async-await.rs b/tests/ui/async-await/async-await.rs index 63941a7913948..b3b22ab05266b 100644 --- a/tests/ui/async-await/async-await.rs +++ b/tests/ui/async-await/async-await.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused)] -// edition: 2018 -// aux-build:arc_wake.rs +//@ edition: 2018 +//@ aux-build:arc_wake.rs extern crate arc_wake; diff --git a/tests/ui/async-await/async-block-control-flow-static-semantics.rs b/tests/ui/async-await/async-block-control-flow-static-semantics.rs index bc9d127931d59..0ef7cb7574a90 100644 --- a/tests/ui/async-await/async-block-control-flow-static-semantics.rs +++ b/tests/ui/async-await/async-block-control-flow-static-semantics.rs @@ -3,7 +3,7 @@ // 2. get targeted by `return` and not the parent function. // 3. get targeted by `?` and not the parent function. // -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/async-await/async-borrowck-escaping-block-error.fixed b/tests/ui/async-await/async-borrowck-escaping-block-error.fixed index 605cfdfe747a3..0b926bcb28681 100644 --- a/tests/ui/async-await/async-borrowck-escaping-block-error.fixed +++ b/tests/ui/async-await/async-borrowck-escaping-block-error.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix fn test_boxed() -> Box> { let x = 0u32; diff --git a/tests/ui/async-await/async-borrowck-escaping-block-error.rs b/tests/ui/async-await/async-borrowck-escaping-block-error.rs index ec752c15fa284..d3e47c5579b96 100644 --- a/tests/ui/async-await/async-borrowck-escaping-block-error.rs +++ b/tests/ui/async-await/async-borrowck-escaping-block-error.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix fn test_boxed() -> Box> { let x = 0u32; diff --git a/tests/ui/async-await/async-borrowck-escaping-closure-error.rs b/tests/ui/async-await/async-borrowck-escaping-closure-error.rs index 2a3e382e11868..1990d0ffe2a3f 100644 --- a/tests/ui/async-await/async-borrowck-escaping-closure-error.rs +++ b/tests/ui/async-await/async-borrowck-escaping-closure-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] fn foo() -> Box> { diff --git a/tests/ui/async-await/async-closure-matches-expr.rs b/tests/ui/async-await/async-closure-matches-expr.rs index d82fbcdc5505b..75ce14a4947c0 100644 --- a/tests/ui/async-await/async-closure-matches-expr.rs +++ b/tests/ui/async-await/async-closure-matches-expr.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closure.rs b/tests/ui/async-await/async-closure.rs index 12d66b19e07d4..77c00bbdc9f8d 100644 --- a/tests/ui/async-await/async-closure.rs +++ b/tests/ui/async-await/async-closure.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 -// edition:2018 -// aux-build:arc_wake.rs +//@ edition:2018 +//@ aux-build:arc_wake.rs #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/arg-mismatch.rs b/tests/ui/async-await/async-closures/arg-mismatch.rs index 650e13677bc95..c8dddee6275e5 100644 --- a/tests/ui/async-await/async-closures/arg-mismatch.rs +++ b/tests/ui/async-await/async-closures/arg-mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs b/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs index 897def791feac..5ed65425f34e3 100644 --- a/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs +++ b/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs b/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs index 0e9b25e6d3043..9c3b458cd3adf 100644 --- a/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs +++ b/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/auxiliary/block-on.rs b/tests/ui/async-await/async-closures/auxiliary/block-on.rs index 902e033cfe711..dcb710fc97c97 100644 --- a/tests/ui/async-await/async-closures/auxiliary/block-on.rs +++ b/tests/ui/async-await/async-closures/auxiliary/block-on.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(async_closure, noop_waker)] diff --git a/tests/ui/async-await/async-closures/auxiliary/foreign.rs b/tests/ui/async-await/async-closures/auxiliary/foreign.rs index e11dfc22213b1..2c935f5e1fa84 100644 --- a/tests/ui/async-await/async-closures/auxiliary/foreign.rs +++ b/tests/ui/async-await/async-closures/auxiliary/foreign.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/await-inference-guidance.rs b/tests/ui/async-await/async-closures/await-inference-guidance.rs index 3702915cbadd1..1ddc1f8d1c5d3 100644 --- a/tests/ui/async-await/async-closures/await-inference-guidance.rs +++ b/tests/ui/async-await/async-closures/await-inference-guidance.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/brand.rs b/tests/ui/async-await/async-closures/brand.rs index 26d2ed5a6ef65..5168f3696d7d4 100644 --- a/tests/ui/async-await/async-closures/brand.rs +++ b/tests/ui/async-await/async-closures/brand.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/def-path.rs b/tests/ui/async-await/async-closures/def-path.rs index 87e99ddda64b3..70450697816fe 100644 --- a/tests/ui/async-await/async-closures/def-path.rs +++ b/tests/ui/async-await/async-closures/def-path.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zverbose-internals -// edition:2021 +//@ compile-flags: -Zverbose-internals +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/drop.rs b/tests/ui/async-await/async-closures/drop.rs index a243d20774d27..2884a20f244ef 100644 --- a/tests/ui/async-await/async-closures/drop.rs +++ b/tests/ui/async-await/async-closures/drop.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// edition:2018 -// run-pass -// check-run-results +//@ aux-build:block-on.rs +//@ edition:2018 +//@ run-pass +//@ check-run-results #![feature(async_closure)] #![allow(unused)] diff --git a/tests/ui/async-await/async-closures/foreign.rs b/tests/ui/async-await/async-closures/foreign.rs index 60fea90980102..50bef9cf11d5f 100644 --- a/tests/ui/async-await/async-closures/foreign.rs +++ b/tests/ui/async-await/async-closures/foreign.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// aux-build:foreign.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ aux-build:foreign.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/higher-ranked-return.rs b/tests/ui/async-await/async-closures/higher-ranked-return.rs index d98779c6ea320..d6bea5dd103cd 100644 --- a/tests/ui/async-await/async-closures/higher-ranked-return.rs +++ b/tests/ui/async-await/async-closures/higher-ranked-return.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 -// known-bug: unknown +//@ known-bug: unknown // Borrow checking doesn't like that higher-ranked output... #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/higher-ranked.rs b/tests/ui/async-await/async-closures/higher-ranked.rs index 17b5116cceb02..5b34bfce96187 100644 --- a/tests/ui/async-await/async-closures/higher-ranked.rs +++ b/tests/ui/async-await/async-closures/higher-ranked.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/is-not-fn.rs b/tests/ui/async-await/async-closures/is-not-fn.rs index 81666cada31c6..f877513043db2 100644 --- a/tests/ui/async-await/async-closures/is-not-fn.rs +++ b/tests/ui/async-await/async-closures/is-not-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/mangle.rs b/tests/ui/async-await/async-closures/mangle.rs index 9d231d551765e..632f1657436ac 100644 --- a/tests/ui/async-await/async-closures/mangle.rs +++ b/tests/ui/async-await/async-closures/mangle.rs @@ -1,12 +1,12 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass -// revisions: v0 legacy -//[v0] compile-flags: -Csymbol-mangling-version=v0 -//[legacy] compile-flags: -Csymbol-mangling-version=legacy -Zunstable-options +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass +//@ revisions: v0 legacy +//@[v0] compile-flags: -Csymbol-mangling-version=v0 +//@[legacy] compile-flags: -Csymbol-mangling-version=legacy -Zunstable-options // FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this. -// ignore-pass (test emits codegen-time warnings) +//@ ignore-pass (test emits codegen-time warnings) #![feature(async_closure, noop_waker)] diff --git a/tests/ui/async-await/async-closures/move-consuming-capture.rs b/tests/ui/async-await/async-closures/move-consuming-capture.rs index b8964c571f92e..17925fc89ba28 100644 --- a/tests/ui/async-await/async-closures/move-consuming-capture.rs +++ b/tests/ui/async-await/async-closures/move-consuming-capture.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/move-is-async-fn.rs b/tests/ui/async-await/async-closures/move-is-async-fn.rs index 943c062954185..0ccd137266d53 100644 --- a/tests/ui/async-await/async-closures/move-is-async-fn.rs +++ b/tests/ui/async-await/async-closures/move-is-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/mutate.rs b/tests/ui/async-await/async-closures/mutate.rs index cc1df5f034ff0..562a7271c668a 100644 --- a/tests/ui/async-await/async-closures/mutate.rs +++ b/tests/ui/async-await/async-closures/mutate.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/not-fn.rs b/tests/ui/async-await/async-closures/not-fn.rs index 4505e6243e966..5322a6d5d7ad3 100644 --- a/tests/ui/async-await/async-closures/not-fn.rs +++ b/tests/ui/async-await/async-closures/not-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // FIXME(async_closures): This needs a better error message! diff --git a/tests/ui/async-await/async-closures/not-lending.rs b/tests/ui/async-await/async-closures/not-lending.rs index 90832e1a0745d..2e5542207cfb1 100644 --- a/tests/ui/async-await/async-closures/not-lending.rs +++ b/tests/ui/async-await/async-closures/not-lending.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/once.rs b/tests/ui/async-await/async-closures/once.rs index a1c56c5de6afd..55e4cedb267a9 100644 --- a/tests/ui/async-await/async-closures/once.rs +++ b/tests/ui/async-await/async-closures/once.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/refd.rs b/tests/ui/async-await/async-closures/refd.rs index 7c61ff2d9bd87..1d9bc1a601bdd 100644 --- a/tests/ui/async-await/async-closures/refd.rs +++ b/tests/ui/async-await/async-closures/refd.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass // check that `&{async-closure}` implements `AsyncFn`. diff --git a/tests/ui/async-await/async-closures/return-type-mismatch.rs b/tests/ui/async-await/async-closures/return-type-mismatch.rs index 9ad6be0b6e61e..992f033180e3a 100644 --- a/tests/ui/async-await/async-closures/return-type-mismatch.rs +++ b/tests/ui/async-await/async-closures/return-type-mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/tainted-body.rs b/tests/ui/async-await/async-closures/tainted-body.rs index 62c28e7e58576..e42d9d6e36ade 100644 --- a/tests/ui/async-await/async-closures/tainted-body.rs +++ b/tests/ui/async-await/async-closures/tainted-body.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/wrong-fn-kind.rs b/tests/ui/async-await/async-closures/wrong-fn-kind.rs index 1e372deb984e2..7c3c7337e2ef0 100644 --- a/tests/ui/async-await/async-closures/wrong-fn-kind.rs +++ b/tests/ui/async-await/async-closures/wrong-fn-kind.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // FIXME(async_closures): This needs a better error message! diff --git a/tests/ui/async-await/async-error-span.rs b/tests/ui/async-await/async-error-span.rs index c8127df625e68..486a07d3dd1ae 100644 --- a/tests/ui/async-await/async-error-span.rs +++ b/tests/ui/async-await/async-error-span.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Regression test for issue #62382. diff --git a/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs b/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs index 1c369fd7415db..80f8b5aaa206f 100644 --- a/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs +++ b/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs @@ -3,8 +3,8 @@ // // Regression test for #63500. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a u8); diff --git a/tests/ui/async-await/async-fn-nonsend.rs b/tests/ui/async-await/async-fn-nonsend.rs index c5453b67ef5b6..62b28ec869fe0 100644 --- a/tests/ui/async-await/async-fn-nonsend.rs +++ b/tests/ui/async-await/async-fn-nonsend.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::{cell::RefCell, fmt::Debug, rc::Rc}; diff --git a/tests/ui/async-await/async-fn-path-elision.rs b/tests/ui/async-await/async-fn-path-elision.rs index 3f1f51c20ca0c..7f2fb5a908a2a 100644 --- a/tests/ui/async-await/async-fn-path-elision.rs +++ b/tests/ui/async-await/async-fn-path-elision.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct HasLifetime<'a>(&'a bool); diff --git a/tests/ui/async-await/async-fn-send-uses-nonsend.rs b/tests/ui/async-await/async-fn-send-uses-nonsend.rs index 35d9cb15540d1..53016854f1581 100644 --- a/tests/ui/async-await/async-fn-send-uses-nonsend.rs +++ b/tests/ui/async-await/async-fn-send-uses-nonsend.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::{ cell::RefCell, diff --git a/tests/ui/async-await/async-fn-size-moved-locals.rs b/tests/ui/async-await/async-fn-size-moved-locals.rs index fb64bb6db6335..b74c23b57c360 100644 --- a/tests/ui/async-await/async-fn-size-moved-locals.rs +++ b/tests/ui/async-await/async-fn-size-moved-locals.rs @@ -7,10 +7,10 @@ // // See issue #59123 for a full explanation. -// needs-unwind Size of Futures change on panic=abort -// run-pass +//@ needs-unwind Size of Futures change on panic=abort +//@ run-pass -// edition:2018 +//@ edition:2018 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/async-fn-size-uninit-locals.rs b/tests/ui/async-await/async-fn-size-uninit-locals.rs index fee3e27cfb843..b27d0bbd58d78 100644 --- a/tests/ui/async-await/async-fn-size-uninit-locals.rs +++ b/tests/ui/async-await/async-fn-size-uninit-locals.rs @@ -4,11 +4,11 @@ // What we don't want to see is the wrong multiple of 1024 (the size of `Big`) // being reflected in the size. -// ignore-emscripten (sizes don't match) -// needs-unwind Size of Futures change on panic=abort -// run-pass +//@ ignore-emscripten (sizes don't match) +//@ needs-unwind Size of Futures change on panic=abort +//@ run-pass -// edition:2018 +//@ edition:2018 #![allow(unused_variables, unused_assignments)] diff --git a/tests/ui/async-await/async-fn-size.rs b/tests/ui/async-await/async-fn-size.rs index 0c1f3636446c9..805a123cc1a91 100644 --- a/tests/ui/async-await/async-fn-size.rs +++ b/tests/ui/async-await/async-fn-size.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:arc_wake.rs -// edition:2018 +//@ run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 extern crate arc_wake; diff --git a/tests/ui/async-await/async-fn/dyn-pos.rs b/tests/ui/async-await/async-fn/dyn-pos.rs index 3201fb8dbf309..e817a1b518f37 100644 --- a/tests/ui/async-await/async-fn/dyn-pos.rs +++ b/tests/ui/async-await/async-fn/dyn-pos.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs index 6436787b665d7..d222ddc081eff 100644 --- a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs +++ b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we don't eagerly recover `async ::Bound` in edition 2015. mod async { diff --git a/tests/ui/async-await/async-fn/impl-header.rs b/tests/ui/async-await/async-fn/impl-header.rs index fb1844384ae08..b9ae90292bb2c 100644 --- a/tests/ui/async-await/async-fn/impl-header.rs +++ b/tests/ui/async-await/async-fn/impl-header.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct F; diff --git a/tests/ui/async-await/async-fn/impl-trait.rs b/tests/ui/async-await/async-fn/impl-trait.rs index 97f6696fe1434..686addcb1a91c 100644 --- a/tests/ui/async-await/async-fn/impl-trait.rs +++ b/tests/ui/async-await/async-fn/impl-trait.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(async_closure, type_alias_impl_trait)] diff --git a/tests/ui/async-await/async-fn/method-call-pos.rs b/tests/ui/async-await/async-fn/method-call-pos.rs index aaa0245b9868f..1f06bb136502e 100644 --- a/tests/ui/async-await/async-fn/method-call-pos.rs +++ b/tests/ui/async-await/async-fn/method-call-pos.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { <_ as async Fn()>(|| async {}); diff --git a/tests/ui/async-await/async-fn/not-a-trait.rs b/tests/ui/async-await/async-fn/not-a-trait.rs index a8fa21e556888..0d22cbd2c0730 100644 --- a/tests/ui/async-await/async-fn/not-a-trait.rs +++ b/tests/ui/async-await/async-fn/not-a-trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/simple.rs b/tests/ui/async-await/async-fn/simple.rs index 172ede7098a2b..e2a183a8c0ba0 100644 --- a/tests/ui/async-await/async-fn/simple.rs +++ b/tests/ui/async-await/async-fn/simple.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-pass +//@ edition: 2021 +//@ build-pass #![feature(async_fn_traits)] diff --git a/tests/ui/async-await/async-fn/sugar.rs b/tests/ui/async-await/async-fn/sugar.rs index 868fb799ae4f9..29b6abc814a42 100644 --- a/tests/ui/async-await/async-fn/sugar.rs +++ b/tests/ui/async-await/async-fn/sugar.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/wrong-trait.rs b/tests/ui/async-await/async-fn/wrong-trait.rs index c431a362b1ea9..e6fb0b46712de 100644 --- a/tests/ui/async-await/async-fn/wrong-trait.rs +++ b/tests/ui/async-await/async-fn/wrong-trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-is-unwindsafe.rs b/tests/ui/async-await/async-is-unwindsafe.rs index 56ed2847292d1..53009b6e7410f 100644 --- a/tests/ui/async-await/async-is-unwindsafe.rs +++ b/tests/ui/async-await/async-is-unwindsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn is_unwindsafe(_: impl std::panic::UnwindSafe) {} diff --git a/tests/ui/async-await/async-matches-expr.rs b/tests/ui/async-await/async-matches-expr.rs index 299faa0587bd5..a632ffa603a1e 100644 --- a/tests/ui/async-await/async-matches-expr.rs +++ b/tests/ui/async-await/async-matches-expr.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 macro_rules! match_expr { ($x:expr) => {} diff --git a/tests/ui/async-await/async-trait-fn.rs b/tests/ui/async-await/async-trait-fn.rs index 4e5e3ba83e49e..47b3b8526cf4e 100644 --- a/tests/ui/async-await/async-trait-fn.rs +++ b/tests/ui/async-await/async-trait-fn.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait T { async fn foo() {} diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs index 7695853000d79..81d774c10dff9 100644 --- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs +++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/async-with-closure.rs b/tests/ui/async-await/async-with-closure.rs index 0b2255266753d..75b98b2ce039d 100644 --- a/tests/ui/async-await/async-with-closure.rs +++ b/tests/ui/async-await/async-with-closure.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 trait MyClosure { type Args; diff --git a/tests/ui/async-await/auxiliary/arc_wake.rs b/tests/ui/async-await/auxiliary/arc_wake.rs index c21886f26f467..cdb7a4daf5714 100644 --- a/tests/ui/async-await/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/auxiliary/arc_wake.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::Arc; use std::task::{ diff --git a/tests/ui/async-await/auxiliary/issue-107036.rs b/tests/ui/async-await/auxiliary/issue-107036.rs index c3f6141b28403..5d11dd232185b 100644 --- a/tests/ui/async-await/auxiliary/issue-107036.rs +++ b/tests/ui/async-await/auxiliary/issue-107036.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait T {} impl T for () {} diff --git a/tests/ui/async-await/auxiliary/issue-72470-lib.rs b/tests/ui/async-await/auxiliary/issue-72470-lib.rs index 8383eba89124a..5e5ddc4f59408 100644 --- a/tests/ui/async-await/auxiliary/issue-72470-lib.rs +++ b/tests/ui/async-await/auxiliary/issue-72470-lib.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -// edition:2018 +//@ compile-flags: -C opt-level=3 +//@ edition:2018 use std::future::Future; use std::marker::PhantomData; diff --git a/tests/ui/async-await/await-into-future.rs b/tests/ui/async-await/await-into-future.rs index 8bf1385b3c5cd..e694c5ffc05f5 100644 --- a/tests/ui/async-await/await-into-future.rs +++ b/tests/ui/async-await/await-into-future.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build: issue-72470-lib.rs -// edition:2021 +//@ run-pass +//@ aux-build: issue-72470-lib.rs +//@ edition:2021 extern crate issue_72470_lib; use std::{future::{Future, IntoFuture}, pin::Pin}; diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed index 117495e130f92..4cb8017c7ee36 100644 --- a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed +++ b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.rs b/tests/ui/async-await/await-keyword/2015-edition-warning.rs index b3c64895c6dd6..d591a5af8218c 100644 --- a/tests/ui/async-await/await-keyword/2015-edition-warning.rs +++ b/tests/ui/async-await/await-keyword/2015-edition-warning.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs b/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs index 9e78f7c512014..519a1dc220a37 100644 --- a/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs +++ b/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/async-await/await-keyword/2018-edition-error.rs b/tests/ui/async-await/await-keyword/2018-edition-error.rs index 7ce52259acac3..f4747ec9b8a7e 100644 --- a/tests/ui/async-await/await-keyword/2018-edition-error.rs +++ b/tests/ui/async-await/await-keyword/2018-edition-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] mod outer_mod { diff --git a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs index ab675d0a1a609..adfc26826c9c7 100644 --- a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs +++ b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn bar() -> Result<(), ()> { Ok(()) diff --git a/tests/ui/async-await/await-keyword/post_expansion_error.rs b/tests/ui/async-await/await-keyword/post_expansion_error.rs index b4c899b0d0295..58c85761cbcb2 100644 --- a/tests/ui/async-await/await-keyword/post_expansion_error.rs +++ b/tests/ui/async-await/await-keyword/post_expansion_error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 macro_rules! r#await { () => { println!("Hello, world!") } diff --git a/tests/ui/async-await/await-sequence.rs b/tests/ui/async-await/await-sequence.rs index 79f68dd606cda..43c2e571eabab 100644 --- a/tests/ui/async-await/await-sequence.rs +++ b/tests/ui/async-await/await-sequence.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass use std::collections::HashMap; diff --git a/tests/ui/async-await/await-unsize.rs b/tests/ui/async-await/await-unsize.rs index aa09d4bdf0883..95ac3abdc3aa3 100644 --- a/tests/ui/async-await/await-unsize.rs +++ b/tests/ui/async-await/await-unsize.rs @@ -1,7 +1,7 @@ // Regression test for #62312 -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn make_boxed_object() -> Box { Box::new(()) as _ diff --git a/tests/ui/async-await/awaiting-unsized-param.rs b/tests/ui/async-await/awaiting-unsized-param.rs index e8b18bf37f866..45611eae41f5c 100644 --- a/tests/ui/async-await/awaiting-unsized-param.rs +++ b/tests/ui/async-await/awaiting-unsized-param.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(unsized_fn_params, unsized_locals)] //~^ WARN the feature `unsized_locals` is incomplete diff --git a/tests/ui/async-await/bound-normalization.rs b/tests/ui/async-await/bound-normalization.rs index 5d260682f1d81..563e28d34cf55 100644 --- a/tests/ui/async-await/bound-normalization.rs +++ b/tests/ui/async-await/bound-normalization.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // See issue 60414 diff --git a/tests/ui/async-await/clone-suggestion.fixed b/tests/ui/async-await/clone-suggestion.fixed index 3514cd63df198..3a0abc8426334 100644 --- a/tests/ui/async-await/clone-suggestion.fixed +++ b/tests/ui/async-await/clone-suggestion.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/async-await/clone-suggestion.rs b/tests/ui/async-await/clone-suggestion.rs index 5a4f70cbf4437..cde4222ffe39b 100644 --- a/tests/ui/async-await/clone-suggestion.rs +++ b/tests/ui/async-await/clone-suggestion.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/async-await/conditional-and-guaranteed-initialization.rs b/tests/ui/async-await/conditional-and-guaranteed-initialization.rs index 56f4cbbd190f8..eecb414716cdf 100644 --- a/tests/ui/async-await/conditional-and-guaranteed-initialization.rs +++ b/tests/ui/async-await/conditional-and-guaranteed-initialization.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ check-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn conditional_and_guaranteed_initialization(x: usize) -> usize { let y; diff --git a/tests/ui/async-await/const-async-fn-in-main.rs b/tests/ui/async-await/const-async-fn-in-main.rs index 5d1aa4d83f38e..1a868c72d248f 100644 --- a/tests/ui/async-await/const-async-fn-in-main.rs +++ b/tests/ui/async-await/const-async-fn-in-main.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check what happens when a const async fn is in the main function (#102796) fn main() { diff --git a/tests/ui/async-await/coroutine-desc.rs b/tests/ui/async-await/coroutine-desc.rs index 5008120166711..9a61c9719db84 100644 --- a/tests/ui/async-await/coroutine-desc.rs +++ b/tests/ui/async-await/coroutine-desc.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/async-await/coroutine-not-future.rs b/tests/ui/async-await/coroutine-not-future.rs index b18635fea3974..2993f58378a44 100644 --- a/tests/ui/async-await/coroutine-not-future.rs +++ b/tests/ui/async-await/coroutine-not-future.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(coroutines, coroutine_trait)] use std::future::Future; diff --git a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs index ced4434a7a7cf..3b16e078d932b 100644 --- a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs +++ b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs @@ -1,5 +1,5 @@ -// check-fail -// edition:2021 +//@ check-fail +//@ edition:2021 // test for issue-114912 - debug ice: attempted to add with overflow diff --git a/tests/ui/async-await/deep-futures-are-freeze.rs b/tests/ui/async-await/deep-futures-are-freeze.rs index dd676d5e18c02..c4300163db1a4 100644 --- a/tests/ui/async-await/deep-futures-are-freeze.rs +++ b/tests/ui/async-await/deep-futures-are-freeze.rs @@ -1,7 +1,7 @@ -// build-pass -// compile-flags: -Copt-level=s -Clto=fat -// no-prefer-dynamic -// edition: 2021 +//@ build-pass +//@ compile-flags: -Copt-level=s -Clto=fat +//@ no-prefer-dynamic +//@ edition: 2021 #![recursion_limit = "256"] diff --git a/tests/ui/async-await/default-struct-update.rs b/tests/ui/async-await/default-struct-update.rs index f4757e7cbaeb3..8011404ed11bb 100644 --- a/tests/ui/async-await/default-struct-update.rs +++ b/tests/ui/async-await/default-struct-update.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 fn main() { let _ = foo(); diff --git a/tests/ui/async-await/dont-print-desugared-async.rs b/tests/ui/async-await/dont-print-desugared-async.rs index 68341a24c4e5d..4a87688efff57 100644 --- a/tests/ui/async-await/dont-print-desugared-async.rs +++ b/tests/ui/async-await/dont-print-desugared-async.rs @@ -1,6 +1,6 @@ // Test that we don't show variables with from async fn desugaring -// edition:2018 +//@ edition:2018 async fn async_fn(&ref mut s: &[i32]) {} //~^ ERROR cannot borrow data in a `&` reference as mutable [E0596] diff --git a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs index f2f87a908178c..237410e0749a2 100644 --- a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs +++ b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we do not suggest `.await` when it doesn't make sense. diff --git a/tests/ui/async-await/dont-suggest-missing-await.rs b/tests/ui/async-await/dont-suggest-missing-await.rs index a8e5b38ec1dd8..20e71b623a1bf 100644 --- a/tests/ui/async-await/dont-suggest-missing-await.rs +++ b/tests/ui/async-await/dont-suggest-missing-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test ensures we don't make the suggestion in bodies that aren't `async`. diff --git a/tests/ui/async-await/drop-and-assign.rs b/tests/ui/async-await/drop-and-assign.rs index ef39033a9d4bb..ed8f0599958ec 100644 --- a/tests/ui/async-await/drop-and-assign.rs +++ b/tests/ui/async-await/drop-and-assign.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass struct A; impl Drop for A { fn drop(&mut self) {} } diff --git a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs index c21886f26f467..cdb7a4daf5714 100644 --- a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::Arc; use std::task::{ diff --git a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs index 9817d377a7886..ee155bd4105d1 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs @@ -1,6 +1,6 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs index 6c10ead3690b2..6767e4baee879 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs index 15cc9fbc81fb7..8b2131d07f785 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs @@ -1,6 +1,6 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass #![deny(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs b/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs index edfecb9103692..8174f50cdce67 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs index 79dedb1ba285e..d4897a1caf39d 100644 --- a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs +++ b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) { assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425] diff --git a/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs b/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs index cfd68bc0d2345..f8afa38a0fd09 100644 --- a/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs +++ b/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 // Test that the drop order for parameters in a fn and async fn matches up. Also test that // parameters (used or unused) are not dropped until the async fn is cancelled. diff --git a/tests/ui/async-await/drop-track-bad-field-in-fru.rs b/tests/ui/async-await/drop-track-bad-field-in-fru.rs index 667b288e676df..465e1d94f39dc 100644 --- a/tests/ui/async-await/drop-track-bad-field-in-fru.rs +++ b/tests/ui/async-await/drop-track-bad-field-in-fru.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn main() {} diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.rs b/tests/ui/async-await/drop-track-field-assign-nonsend.rs index 19315ef19f90f..7002836ee47ff 100644 --- a/tests/ui/async-await/drop-track-field-assign-nonsend.rs +++ b/tests/ui/async-await/drop-track-field-assign-nonsend.rs @@ -1,5 +1,5 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/async-await/drop-track-field-assign.rs b/tests/ui/async-await/drop-track-field-assign.rs index 4887eff7efa29..491f80d062bbb 100644 --- a/tests/ui/async-await/drop-track-field-assign.rs +++ b/tests/ui/async-await/drop-track-field-assign.rs @@ -1,6 +1,6 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs index 9f80b9c6e9f4b..e6c295405e2b6 100644 --- a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs +++ b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs @@ -1,5 +1,5 @@ -// incremental -// edition: 2021 +//@ incremental +//@ edition: 2021 use std::future::*; use std::marker::PhantomData; diff --git a/tests/ui/async-await/edition-deny-async-fns-2015.rs b/tests/ui/async-await/edition-deny-async-fns-2015.rs index 9059f99ba66ac..c9b7bb1be3252 100644 --- a/tests/ui/async-await/edition-deny-async-fns-2015.rs +++ b/tests/ui/async-await/edition-deny-async-fns-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 diff --git a/tests/ui/async-await/expansion-in-attrs.rs b/tests/ui/async-await/expansion-in-attrs.rs index af77c3463b5dd..040c8d9834be4 100644 --- a/tests/ui/async-await/expansion-in-attrs.rs +++ b/tests/ui/async-await/expansion-in-attrs.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 macro_rules! with_doc { ($doc: expr) => { diff --git a/tests/ui/async-await/feature-async-closure.rs b/tests/ui/async-await/feature-async-closure.rs index d07116b13a2b5..15108aa5a33c1 100644 --- a/tests/ui/async-await/feature-async-closure.rs +++ b/tests/ui/async-await/feature-async-closure.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // gate-test-async_closure fn f() { diff --git a/tests/ui/async-await/feature-async-for-loop.rs b/tests/ui/async-await/feature-async-for-loop.rs index 42247dd14b0d1..67817cbfa5f3f 100644 --- a/tests/ui/async-await/feature-async-for-loop.rs +++ b/tests/ui/async-await/feature-async-for-loop.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-async_for_loop #![feature(async_iter_from_iter, async_iterator)] diff --git a/tests/ui/async-await/feature-self-return-type.rs b/tests/ui/async-await/feature-self-return-type.rs index ae6f766d247e6..f3a9239be2bbc 100644 --- a/tests/ui/async-await/feature-self-return-type.rs +++ b/tests/ui/async-await/feature-self-return-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test checks that we emit the correct borrowck error when `Self` is used as a return type. // See #61949 for context. diff --git a/tests/ui/async-await/field-assign-nonsend.rs b/tests/ui/async-await/field-assign-nonsend.rs index 19315ef19f90f..7002836ee47ff 100644 --- a/tests/ui/async-await/field-assign-nonsend.rs +++ b/tests/ui/async-await/field-assign-nonsend.rs @@ -1,5 +1,5 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/async-await/field-assign.rs b/tests/ui/async-await/field-assign.rs index 4887eff7efa29..491f80d062bbb 100644 --- a/tests/ui/async-await/field-assign.rs +++ b/tests/ui/async-await/field-assign.rs @@ -1,6 +1,6 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/async-await/for-await-2015.rs b/tests/ui/async-await/for-await-2015.rs index c1b7c016d1fc0..89ff256da1ddf 100644 --- a/tests/ui/async-await/for-await-2015.rs +++ b/tests/ui/async-await/for-await-2015.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(async_for_loop)] diff --git a/tests/ui/async-await/for-await-consumes-iter.rs b/tests/ui/async-await/for-await-consumes-iter.rs index 65bb9e88448ff..38dfe46c8145e 100644 --- a/tests/ui/async-await/for-await-consumes-iter.rs +++ b/tests/ui/async-await/for-await-consumes-iter.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker)] use std::future::Future; diff --git a/tests/ui/async-await/for-await-passthrough.rs b/tests/ui/async-await/for-await-passthrough.rs index b1a382958a157..3769ef60b017d 100644 --- a/tests/ui/async-await/for-await-passthrough.rs +++ b/tests/ui/async-await/for-await-passthrough.rs @@ -1,6 +1,6 @@ -// run-pass -// edition: 2024 -// compile-flags: -Zunstable-options +//@ run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker, gen_blocks)] diff --git a/tests/ui/async-await/for-await.rs b/tests/ui/async-await/for-await.rs index 00dbdfb2389d5..acd9f01640a1a 100644 --- a/tests/ui/async-await/for-await.rs +++ b/tests/ui/async-await/for-await.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker)] use std::future::Future; diff --git a/tests/ui/async-await/future-contains-err-issue-115188.rs b/tests/ui/async-await/future-contains-err-issue-115188.rs index bf643c9267173..686d955ac7ce9 100644 --- a/tests/ui/async-await/future-contains-err-issue-115188.rs +++ b/tests/ui/async-await/future-contains-err-issue-115188.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // Makes sure we don't spew a bunch of unrelated opaque errors when the reason // for this error is just a missing struct field in `foo`. diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs index 1816d842d6c41..a3f0bdc851481 100644 --- a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs +++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// edition:2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ edition:2021 +//@ build-pass +//@ ignore-pass async fn wait() {} diff --git a/tests/ui/async-await/future-sizes/future-as-arg.rs b/tests/ui/async-await/future-sizes/future-as-arg.rs index 93c69b05254dc..317c17b9b3e59 100644 --- a/tests/ui/async-await/future-sizes/future-as-arg.rs +++ b/tests/ui/async-await/future-sizes/future-as-arg.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-pass +//@ edition: 2021 +//@ run-pass async fn test(_arg: [u8; 16]) {} diff --git a/tests/ui/async-await/future-sizes/large-arg.rs b/tests/ui/async-await/future-sizes/large-arg.rs index 7e7ff9d8d00e8..5fbae22a7714d 100644 --- a/tests/ui/async-await/future-sizes/large-arg.rs +++ b/tests/ui/async-await/future-sizes/large-arg.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// edition: 2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ edition: 2021 +//@ build-pass +//@ ignore-pass pub async fn test() { let _ = a([0u8; 1024]).await; diff --git a/tests/ui/async-await/futures-api.rs b/tests/ui/async-await/futures-api.rs index a7da058de3081..66d2bf1204bc1 100644 --- a/tests/ui/async-await/futures-api.rs +++ b/tests/ui/async-await/futures-api.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:arc_wake.rs +//@ aux-build:arc_wake.rs extern crate arc_wake; diff --git a/tests/ui/async-await/generics-and-bounds.rs b/tests/ui/async-await/generics-and-bounds.rs index 963b19b34a620..98ae283184364 100644 --- a/tests/ui/async-await/generics-and-bounds.rs +++ b/tests/ui/async-await/generics-and-bounds.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-associated-types.rs b/tests/ui/async-await/in-trait/async-associated-types.rs index 8d89500477bb2..1f29c19de20df 100644 --- a/tests/ui/async-await/in-trait/async-associated-types.rs +++ b/tests/ui/async-await/in-trait/async-associated-types.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::fmt::Debug; diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs index 8c01f1bddefd6..9b0ce8663c203 100644 --- a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs +++ b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 #![feature(noop_waker)] diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs index c26f6625f0096..8d3dbaf6ca1f1 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs index 69871d0dca01d..1b1c858f91626 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs index ce93bd626081e..b4fbcb78c1340 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![feature(lint_reasons)] diff --git a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs index f7a351efff562..e6c8ccf53efd5 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs index c6e8f1ae90607..1d9a7640f5482 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass use std::future::Future; use std::task::Poll; diff --git a/tests/ui/async-await/in-trait/async-example-desugared.rs b/tests/ui/async-await/in-trait/async-example-desugared.rs index 78904d87abcd2..149a880ad754a 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-example.rs b/tests/ui/async-await/in-trait/async-example.rs index a32f979df6baa..6cdf0e96edf91 100644 --- a/tests/ui/async-await/in-trait/async-example.rs +++ b/tests/ui/async-await/in-trait/async-example.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 trait MyTrait { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs index 8dc0574c757ad..aede820f6fd06 100644 --- a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs +++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: #102682 -// edition: 2021 +//@ check-fail +//@ known-bug: #102682 +//@ edition: 2021 use std::fmt::Debug; use std::hash::Hash; diff --git a/tests/ui/async-await/in-trait/async-generics.rs b/tests/ui/async-await/in-trait/async-generics.rs index 6004916a4e509..eedc63fa24c60 100644 --- a/tests/ui/async-await/in-trait/async-generics.rs +++ b/tests/ui/async-await/in-trait/async-generics.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: #102682 -// edition: 2021 +//@ check-fail +//@ known-bug: #102682 +//@ edition: 2021 trait MyTrait { async fn foo(&self) -> &(T, U); diff --git a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs index 3721b01350d74..81f70afa2a72b 100644 --- a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs +++ b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::fmt::Debug; diff --git a/tests/ui/async-await/in-trait/async-lifetimes.rs b/tests/ui/async-await/in-trait/async-lifetimes.rs index cb4b871cbe15b..d78944553221c 100644 --- a/tests/ui/async-await/in-trait/async-lifetimes.rs +++ b/tests/ui/async-await/in-trait/async-lifetimes.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 trait MyTrait<'a, 'b, T> { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.rs b/tests/ui/async-await/in-trait/async-recursive-generic.rs index 33eb2b2de131b..8f91a4b2f6ab9 100644 --- a/tests/ui/async-await/in-trait/async-recursive-generic.rs +++ b/tests/ui/async-await/in-trait/async-recursive-generic.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait MyTrait { async fn foo_recursive(&self, n: usize) -> T; diff --git a/tests/ui/async-await/in-trait/async-recursive.rs b/tests/ui/async-await/in-trait/async-recursive.rs index 2534c43413ed2..ab22e3f1dbf68 100644 --- a/tests/ui/async-await/in-trait/async-recursive.rs +++ b/tests/ui/async-await/in-trait/async-recursive.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait MyTrait { async fn foo_recursive(&self, n: usize) -> i32; diff --git a/tests/ui/async-await/in-trait/auxiliary/bad-region.rs b/tests/ui/async-await/in-trait/auxiliary/bad-region.rs index 02dc25aaa16bb..2bfd9bb37308e 100644 --- a/tests/ui/async-await/in-trait/auxiliary/bad-region.rs +++ b/tests/ui/async-await/in-trait/auxiliary/bad-region.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs b/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs index 57c9b3ae8b3c4..ed5789d17a2e3 100644 --- a/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs +++ b/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait Foo { async fn test(); diff --git a/tests/ui/async-await/in-trait/bad-region.rs b/tests/ui/async-await/in-trait/bad-region.rs index 444368e21a497..5d5d8783a324f 100644 --- a/tests/ui/async-await/in-trait/bad-region.rs +++ b/tests/ui/async-await/in-trait/bad-region.rs @@ -1,5 +1,5 @@ -// aux-build:bad-region.rs -// edition:2021 +//@ aux-build:bad-region.rs +//@ edition:2021 #![allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/bad-signatures.rs b/tests/ui/async-await/in-trait/bad-signatures.rs index 5adede5b5cf1d..57a0ccb0d18e0 100644 --- a/tests/ui/async-await/in-trait/bad-signatures.rs +++ b/tests/ui/async-await/in-trait/bad-signatures.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait { diff --git a/tests/ui/async-await/in-trait/coherence-constrained.rs b/tests/ui/async-await/in-trait/coherence-constrained.rs index 82c8724ca3e61..a9823327cc073 100644 --- a/tests/ui/async-await/in-trait/coherence-constrained.rs +++ b/tests/ui/async-await/in-trait/coherence-constrained.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait Foo { type T; diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs index e2fd9f9dfea4c..e0901dc6886e4 100644 --- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs +++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// known-bug: #108309 +//@ edition: 2021 +//@ known-bug: #108309 #![feature(min_specialization)] #![feature(noop_waker)] diff --git a/tests/ui/async-await/in-trait/early-bound-1.rs b/tests/ui/async-await/in-trait/early-bound-1.rs index ddcb477a1dc40..fd1282908abec 100644 --- a/tests/ui/async-await/in-trait/early-bound-1.rs +++ b/tests/ui/async-await/in-trait/early-bound-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 pub trait Foo { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/early-bound-2.rs b/tests/ui/async-await/in-trait/early-bound-2.rs index 3eba5bf757fcd..c25835c68dd58 100644 --- a/tests/ui/async-await/in-trait/early-bound-2.rs +++ b/tests/ui/async-await/in-trait/early-bound-2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/fn-not-async-err.rs b/tests/ui/async-await/in-trait/fn-not-async-err.rs index ecd5737cf3c23..dab100b2e22de 100644 --- a/tests/ui/async-await/in-trait/fn-not-async-err.rs +++ b/tests/ui/async-await/in-trait/fn-not-async-err.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/fn-not-async-err2.rs b/tests/ui/async-await/in-trait/fn-not-async-err2.rs index ed626edc4c4c1..983d650764e99 100644 --- a/tests/ui/async-await/in-trait/fn-not-async-err2.rs +++ b/tests/ui/async-await/in-trait/fn-not-async-err2.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/generics-mismatch.rs b/tests/ui/async-await/in-trait/generics-mismatch.rs index 51fdc2fe8a87a..1f7095ae72b52 100644 --- a/tests/ui/async-await/in-trait/generics-mismatch.rs +++ b/tests/ui/async-await/in-trait/generics-mismatch.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/implied-bounds.rs b/tests/ui/async-await/in-trait/implied-bounds.rs index 0d8177c8e6006..eda4cf5647f9e 100644 --- a/tests/ui/async-await/in-trait/implied-bounds.rs +++ b/tests/ui/async-await/in-trait/implied-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs index 4b615343a05f2..aa8667a00ca30 100644 --- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs +++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs @@ -1,7 +1,7 @@ -// edition: 2021 +//@ edition: 2021 // Test doesn't fail until monomorphization time, unfortunately. -// build-fail +//@ build-fail fn main() { let _ = async { diff --git a/tests/ui/async-await/in-trait/issue-102138.rs b/tests/ui/async-await/in-trait/issue-102138.rs index 221b830fc5fa8..fde5f36f39c04 100644 --- a/tests/ui/async-await/in-trait/issue-102138.rs +++ b/tests/ui/async-await/in-trait/issue-102138.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-102219.rs b/tests/ui/async-await/in-trait/issue-102219.rs index 1f32cf691ebf1..954e9e8bc5d99 100644 --- a/tests/ui/async-await/in-trait/issue-102219.rs +++ b/tests/ui/async-await/in-trait/issue-102219.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-type=lib -// edition:2021 -// check-pass +//@ compile-flags:--crate-type=lib +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-102310.rs b/tests/ui/async-await/in-trait/issue-102310.rs index c6321dfcbe890..ea0646edd17c1 100644 --- a/tests/ui/async-await/in-trait/issue-102310.rs +++ b/tests/ui/async-await/in-trait/issue-102310.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-104678.rs b/tests/ui/async-await/in-trait/issue-104678.rs index db2fa3026fcb2..5265c4486a17d 100644 --- a/tests/ui/async-await/in-trait/issue-104678.rs +++ b/tests/ui/async-await/in-trait/issue-104678.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.rs b/tests/ui/async-await/in-trait/lifetime-mismatch.rs index b45d1758da43e..df9227029d497 100644 --- a/tests/ui/async-await/in-trait/lifetime-mismatch.rs +++ b/tests/ui/async-await/in-trait/lifetime-mismatch.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait { diff --git a/tests/ui/async-await/in-trait/missing-feature-flag.rs b/tests/ui/async-await/in-trait/missing-feature-flag.rs index 898299a7d9d7d..5bcbffbea4816 100644 --- a/tests/ui/async-await/in-trait/missing-feature-flag.rs +++ b/tests/ui/async-await/in-trait/missing-feature-flag.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(min_specialization)] diff --git a/tests/ui/async-await/in-trait/missing-send-bound.rs b/tests/ui/async-await/in-trait/missing-send-bound.rs index 596aece748dc3..2ad43deb687cc 100644 --- a/tests/ui/async-await/in-trait/missing-send-bound.rs +++ b/tests/ui/async-await/in-trait/missing-send-bound.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { diff --git a/tests/ui/async-await/in-trait/nested-rpit.rs b/tests/ui/async-await/in-trait/nested-rpit.rs index ccae08accb6f8..3a6b9f3760c84 100644 --- a/tests/ui/async-await/in-trait/nested-rpit.rs +++ b/tests/ui/async-await/in-trait/nested-rpit.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs b/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs index 9eb396f3202a5..0c1b2b70c0914 100644 --- a/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs +++ b/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2021 -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 // We were not normalizing opaques with escaping bound vars during codegen, // leading to later errors during debuginfo computation. diff --git a/tests/ui/async-await/in-trait/object-safety.rs b/tests/ui/async-await/in-trait/object-safety.rs index 5e5375b082bbf..8174a803e7951 100644 --- a/tests/ui/async-await/in-trait/object-safety.rs +++ b/tests/ui/async-await/in-trait/object-safety.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.rs b/tests/ui/async-await/in-trait/return-not-existing-pair.rs index 2286316dd88c2..68be1358f812b 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-pair.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-pair.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait<'a, 'b, T> { diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs index d23ef093be187..e45fca6de770f 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct Wrapper(T); diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.rs b/tests/ui/async-await/in-trait/return-type-suggestion.rs index 2b19b24cf7a6d..480b5ab5bf92c 100644 --- a/tests/ui/async-await/in-trait/return-type-suggestion.rs +++ b/tests/ui/async-await/in-trait/return-type-suggestion.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait A { diff --git a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs index 72f02679d7712..5fa82163a314b 100644 --- a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs +++ b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![deny(opaque_hidden_inferred_bound)] diff --git a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed index affe6cded8f23..c69605b4c22e0 100644 --- a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed +++ b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition: 2021 +//@ run-rustfix +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs index 02bfee1a25f87..0025b95716273 100644 --- a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs +++ b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition: 2021 +//@ run-rustfix +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs index f0d750714cd0b..a6da3f7c81c2e 100644 --- a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs +++ b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs @@ -1,5 +1,5 @@ -// aux-build:foreign-async-fn.rs -// edition:2021 +//@ aux-build:foreign-async-fn.rs +//@ edition:2021 extern crate foreign_async_fn; use foreign_async_fn::Foo; diff --git a/tests/ui/async-await/in-trait/unconstrained-impl-region.rs b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs index c06f9f005f19e..9382c2323643b 100644 --- a/tests/ui/async-await/in-trait/unconstrained-impl-region.rs +++ b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 pub(crate) trait Inbox { async fn next(self) -> M; diff --git a/tests/ui/async-await/in-trait/warn.rs b/tests/ui/async-await/in-trait/warn.rs index 71f3822dfb187..8cdb8887f4205 100644 --- a/tests/ui/async-await/in-trait/warn.rs +++ b/tests/ui/async-await/in-trait/warn.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(async_fn_in_trait)] diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed index 055800d23b6c6..c74a32e442f3f 100644 --- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed +++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Regression test for issue 79694 diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs index e8be16516d6d3..81ffbacc3273f 100644 --- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs +++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Regression test for issue 79694 diff --git a/tests/ui/async-await/inference_var_self_argument.rs b/tests/ui/async-await/inference_var_self_argument.rs index fd8482f86b4fc..f4bb8884b0587 100644 --- a/tests/ui/async-await/inference_var_self_argument.rs +++ b/tests/ui/async-await/inference_var_self_argument.rs @@ -1,5 +1,5 @@ //! This is a regression test for an ICE. -// edition: 2021 +//@ edition: 2021 trait Foo { async fn foo(self: &dyn Foo) { 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 86ba7582d3833..22e1cea223812 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 +//@ edition:2018 +//@ run-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/async-await/issue-101715.rs b/tests/ui/async-await/issue-101715.rs index 1be5d02482e84..289fc5d30f55c 100644 --- a/tests/ui/async-await/issue-101715.rs +++ b/tests/ui/async-await/issue-101715.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/issue-105501.rs b/tests/ui/async-await/issue-105501.rs index f30d2a9d81a6a..30a08abeb498b 100644 --- a/tests/ui/async-await/issue-105501.rs +++ b/tests/ui/async-await/issue-105501.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This is a regression test for https://github.com/rust-lang/rust/issues/105501. // It was minified from the published `msf-ice:0.2.1` crate which failed in a crater run. diff --git a/tests/ui/async-await/issue-107036.rs b/tests/ui/async-await/issue-107036.rs index 6a22de2c94354..917eef2e5ced9 100644 --- a/tests/ui/async-await/issue-107036.rs +++ b/tests/ui/async-await/issue-107036.rs @@ -1,6 +1,6 @@ -// aux-build:issue-107036.rs -// edition:2021 -// check-pass +//@ aux-build:issue-107036.rs +//@ edition:2021 +//@ check-pass extern crate issue_107036; use issue_107036::S; diff --git a/tests/ui/async-await/issue-108572.fixed b/tests/ui/async-await/issue-108572.fixed index 8f0133d97b547..0e8a7b7848140 100644 --- a/tests/ui/async-await/issue-108572.fixed +++ b/tests/ui/async-await/issue-108572.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused_must_use, dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-108572.rs b/tests/ui/async-await/issue-108572.rs index 3596580763c5a..0861fb1f91b84 100644 --- a/tests/ui/async-await/issue-108572.rs +++ b/tests/ui/async-await/issue-108572.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused_must_use, dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs b/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs index 16cf7ad52e4f9..ff825180bf89e 100644 --- a/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs +++ b/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs @@ -1,6 +1,6 @@ // Regression test for #54239, shouldn't trigger lint. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![deny(missing_debug_implementations)] diff --git a/tests/ui/async-await/issue-60709.rs b/tests/ui/async-await/issue-60709.rs index c206f01b98f78..8634d6f7768ba 100644 --- a/tests/ui/async-await/issue-60709.rs +++ b/tests/ui/async-await/issue-60709.rs @@ -1,8 +1,8 @@ // This used to compile the future down to ud2, due to uninhabited types being // handled incorrectly in coroutines. -// compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018 +//@ compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018 -// run-pass +//@ run-pass use std::future::Future; use std::task::Poll; diff --git a/tests/ui/async-await/issue-61076.rs b/tests/ui/async-await/issue-61076.rs index cf6e5b4e436f2..f78abfd6d0f60 100644 --- a/tests/ui/async-await/issue-61076.rs +++ b/tests/ui/async-await/issue-61076.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::future::Future; use core::pin::Pin; diff --git a/tests/ui/async-await/issue-61452.rs b/tests/ui/async-await/issue-61452.rs index 9381251ad6968..718f0e9efc13c 100644 --- a/tests/ui/async-await/issue-61452.rs +++ b/tests/ui/async-await/issue-61452.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub async fn f(x: Option) { x.take(); diff --git a/tests/ui/async-await/issue-61793.rs b/tests/ui/async-await/issue-61793.rs index bb861cf60b114..5fc2f069a672a 100644 --- a/tests/ui/async-await/issue-61793.rs +++ b/tests/ui/async-await/issue-61793.rs @@ -3,8 +3,8 @@ // while those two fields were at the same offset (which is impossible). // That is, memory ordering of `(X, ())`, but offsets of `((), X)`. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 async fn foo(_: &(), _: F) {} diff --git a/tests/ui/async-await/issue-62658.rs b/tests/ui/async-await/issue-62658.rs index 8e6d070ea3f6f..0aaeeb68a52b6 100644 --- a/tests/ui/async-await/issue-62658.rs +++ b/tests/ui/async-await/issue-62658.rs @@ -1,8 +1,8 @@ // This test created a coroutine whose size was not rounded to a multiple of its // alignment. This caused an assertion error in codegen. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 async fn noop() {} diff --git a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs index 54059b29f72e2..646a664ffc372 100644 --- a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs +++ b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Test(String); diff --git a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs index c5ea2b821ad78..3a1e10cf68e6c 100644 --- a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs +++ b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn foo(x: &[Vec]) -> u32 { 0 diff --git a/tests/ui/async-await/issue-64130-1-sync.rs b/tests/ui/async-await/issue-64130-1-sync.rs index 7769085a0db8e..67bb4f468be98 100644 --- a/tests/ui/async-await/issue-64130-1-sync.rs +++ b/tests/ui/async-await/issue-64130-1-sync.rs @@ -1,5 +1,5 @@ #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Sync) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-2-send.rs b/tests/ui/async-await/issue-64130-2-send.rs index 0195afe6b3924..20a89b5d05c1f 100644 --- a/tests/ui/async-await/issue-64130-2-send.rs +++ b/tests/ui/async-await/issue-64130-2-send.rs @@ -1,5 +1,5 @@ #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Send) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-3-other.rs b/tests/ui/async-await/issue-64130-3-other.rs index 074d67aa3fb87..c7df8b6de74ed 100644 --- a/tests/ui/async-await/issue-64130-3-other.rs +++ b/tests/ui/async-await/issue-64130-3-other.rs @@ -1,6 +1,6 @@ #![feature(auto_traits)] #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the unspecialized async-await-specific error when futures don't implement an // auto trait (which is not Send or Sync) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-4-async-move.rs b/tests/ui/async-await/issue-64130-4-async-move.rs index 359813f637957..3f82cdd091629 100644 --- a/tests/ui/async-await/issue-64130-4-async-move.rs +++ b/tests/ui/async-await/issue-64130-4-async-move.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass use std::any::Any; use std::future::Future; diff --git a/tests/ui/async-await/issue-64130-non-send-future-diags.rs b/tests/ui/async-await/issue-64130-non-send-future-diags.rs index b652d23915330..e23b38ce8e9fc 100644 --- a/tests/ui/async-await/issue-64130-non-send-future-diags.rs +++ b/tests/ui/async-await/issue-64130-non-send-future-diags.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![allow(must_not_suspend)] diff --git a/tests/ui/async-await/issue-64391.rs b/tests/ui/async-await/issue-64391.rs index c6faad3aad064..29f1da10deda5 100644 --- a/tests/ui/async-await/issue-64391.rs +++ b/tests/ui/async-await/issue-64391.rs @@ -4,8 +4,8 @@ // example. The drop order itself is directly tested in // `drop-order/drop-order-for-temporary-in-tail-return-expr.rs`. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn add(x: u32, y: u32) -> u32 { async { x + y }.await diff --git a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs index 03dd0340c9d69..ef5760f4846b7 100644 --- a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs +++ b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs @@ -1,5 +1,5 @@ -// revisions: edition2015 edition2018 -//[edition2018]edition:2018 +//@ revisions: edition2015 edition2018 +//@[edition2018]edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/async-await/issue-66312.rs b/tests/ui/async-await/issue-66312.rs index fbc58697d4865..396679885ce7b 100644 --- a/tests/ui/async-await/issue-66312.rs +++ b/tests/ui/async-await/issue-66312.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Test { fn is_some(self: T); //~ ERROR invalid `self` parameter type diff --git a/tests/ui/async-await/issue-66387-if-without-else.rs b/tests/ui/async-await/issue-66387-if-without-else.rs index 3ab8220b4aff3..00f223206d628 100644 --- a/tests/ui/async-await/issue-66387-if-without-else.rs +++ b/tests/ui/async-await/issue-66387-if-without-else.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn f() -> i32 { if true { //~ ERROR `if` may be missing an `else` clause return 0; diff --git a/tests/ui/async-await/issue-67252-unnamed-future.rs b/tests/ui/async-await/issue-67252-unnamed-future.rs index 60717d99346ac..822b1bea5b1ca 100644 --- a/tests/ui/async-await/issue-67252-unnamed-future.rs +++ b/tests/ui/async-await/issue-67252-unnamed-future.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/async-await/issue-67651.rs b/tests/ui/async-await/issue-67651.rs index bd96a3b709bae..7a7bf2d7b134b 100644 --- a/tests/ui/async-await/issue-67651.rs +++ b/tests/ui/async-await/issue-67651.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait From { fn from(); diff --git a/tests/ui/async-await/issue-67765-async-diagnostic.rs b/tests/ui/async-await/issue-67765-async-diagnostic.rs index 5093916e73a45..7fe1baef952e1 100644 --- a/tests/ui/async-await/issue-67765-async-diagnostic.rs +++ b/tests/ui/async-await/issue-67765-async-diagnostic.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #67765 // Tests that we point at the proper location when giving diff --git a/tests/ui/async-await/issue-68112.rs b/tests/ui/async-await/issue-68112.rs index fd6089e0c03b9..ad44f39ac11cb 100644 --- a/tests/ui/async-await/issue-68112.rs +++ b/tests/ui/async-await/issue-68112.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{ cell::RefCell, diff --git a/tests/ui/async-await/issue-68523-start.rs b/tests/ui/async-await/issue-68523-start.rs index 5adc28b203a47..ee3baf4990c39 100644 --- a/tests/ui/async-await/issue-68523-start.rs +++ b/tests/ui/async-await/issue-68523-start.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(start)] diff --git a/tests/ui/async-await/issue-68523.rs b/tests/ui/async-await/issue-68523.rs index 7a67661a0197b..167da22b8a8e8 100644 --- a/tests/ui/async-await/issue-68523.rs +++ b/tests/ui/async-await/issue-68523.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn main() -> Result { //~^ ERROR `main` function is not allowed to be `async` diff --git a/tests/ui/async-await/issue-69446-fnmut-capture.rs b/tests/ui/async-await/issue-69446-fnmut-capture.rs index 842115538c9d8..608f1e6cce7bb 100644 --- a/tests/ui/async-await/issue-69446-fnmut-capture.rs +++ b/tests/ui/async-await/issue-69446-fnmut-capture.rs @@ -1,6 +1,6 @@ // Regression test for issue #69446 - we should display // which variable is captured -// edition:2018 +//@ edition:2018 use core::future::Future; diff --git a/tests/ui/async-await/issue-70594.rs b/tests/ui/async-await/issue-70594.rs index 4c8209348b37a..422248c9eba15 100644 --- a/tests/ui/async-await/issue-70594.rs +++ b/tests/ui/async-await/issue-70594.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn fun() { [1; ().await]; diff --git a/tests/ui/async-await/issue-70818.rs b/tests/ui/async-await/issue-70818.rs index 019c56eb2fa3e..36295a84e7ad7 100644 --- a/tests/ui/async-await/issue-70818.rs +++ b/tests/ui/async-await/issue-70818.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; fn foo(ty: T, ty1: U) -> impl Future + Send { diff --git a/tests/ui/async-await/issue-70935-complex-spans.rs b/tests/ui/async-await/issue-70935-complex-spans.rs index 81f6961840c14..a74bd9890ca11 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.rs +++ b/tests/ui/async-await/issue-70935-complex-spans.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // #70935: Check if we do not emit snippet // with newlines which lead complex diagnostics. diff --git a/tests/ui/async-await/issue-71137.rs b/tests/ui/async-await/issue-71137.rs index 7695e0325ff31..551cf85047cae 100644 --- a/tests/ui/async-await/issue-71137.rs +++ b/tests/ui/async-await/issue-71137.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![allow(must_not_suspend)] diff --git a/tests/ui/async-await/issue-72442.rs b/tests/ui/async-await/issue-72442.rs index 2280154c7157c..de24fc9fdcb99 100644 --- a/tests/ui/async-await/issue-72442.rs +++ b/tests/ui/async-await/issue-72442.rs @@ -1,5 +1,5 @@ -// edition:2018 -// incremental +//@ edition:2018 +//@ incremental use std::fs::File; use std::future::Future; diff --git a/tests/ui/async-await/issue-72470-llvm-dominate.rs b/tests/ui/async-await/issue-72470-llvm-dominate.rs index 5bb69a0730525..24f3f8bd4632e 100644 --- a/tests/ui/async-await/issue-72470-llvm-dominate.rs +++ b/tests/ui/async-await/issue-72470-llvm-dominate.rs @@ -1,7 +1,7 @@ -// compile-flags: -C opt-level=3 -// aux-build: issue-72470-lib.rs -// edition:2018 -// build-pass +//@ compile-flags: -C opt-level=3 +//@ aux-build: issue-72470-lib.rs +//@ edition:2018 +//@ build-pass // Regression test for issue #72470, using the minimization // in https://github.com/jonas-schievink/llvm-error diff --git a/tests/ui/async-await/issue-72590-type-error-sized.rs b/tests/ui/async-await/issue-72590-type-error-sized.rs index 00e098d43e073..a29859b6afe94 100644 --- a/tests/ui/async-await/issue-72590-type-error-sized.rs +++ b/tests/ui/async-await/issue-72590-type-error-sized.rs @@ -1,6 +1,6 @@ // Regression test for issue #72590 // Tests that we don't emit a spurious "size cannot be statically determined" error -// edition:2018 +//@ edition:2018 struct Foo { foo: Nonexistent, //~ ERROR cannot find diff --git a/tests/ui/async-await/issue-73050.rs b/tests/ui/async-await/issue-73050.rs index 790f24a230b7e..97d2cfed8b1b2 100644 --- a/tests/ui/async-await/issue-73050.rs +++ b/tests/ui/async-await/issue-73050.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(unused)] async fn foo<'a>() { diff --git a/tests/ui/async-await/issue-73137.rs b/tests/ui/async-await/issue-73137.rs index 2d16f19364457..36a12a26a00fa 100644 --- a/tests/ui/async-await/issue-73137.rs +++ b/tests/ui/async-await/issue-73137.rs @@ -1,7 +1,7 @@ // Regression test for -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-73541-1.rs b/tests/ui/async-await/issue-73541-1.rs index 7fb0d6c39ff6b..c962f968db26f 100644 --- a/tests/ui/async-await/issue-73541-1.rs +++ b/tests/ui/async-await/issue-73541-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { 'a: loop { diff --git a/tests/ui/async-await/issue-73541-2.rs b/tests/ui/async-await/issue-73541-2.rs index 70b4ab2537626..481bbbab72200 100644 --- a/tests/ui/async-await/issue-73541-2.rs +++ b/tests/ui/async-await/issue-73541-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn c() { 'a: loop { diff --git a/tests/ui/async-await/issue-73741-type-err.rs b/tests/ui/async-await/issue-73741-type-err.rs index c5b9e34edf703..6f38e654a8055 100644 --- a/tests/ui/async-await/issue-73741-type-err.rs +++ b/tests/ui/async-await/issue-73741-type-err.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #73741 // Ensures that we don't emit spurious errors when diff --git a/tests/ui/async-await/issue-74047.rs b/tests/ui/async-await/issue-74047.rs index 2e4f3e675c3b1..769772c17e7b4 100644 --- a/tests/ui/async-await/issue-74047.rs +++ b/tests/ui/async-await/issue-74047.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::convert::{TryFrom, TryInto}; use std::io; diff --git a/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs b/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs index 904d28fb0a78d..58509642b10bc 100644 --- a/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs +++ b/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs b/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs index 2d765eb41be07..e5b91420a135e 100644 --- a/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs +++ b/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // test that names give to anonymous lifetimes in opaque types like `impl Future` are correctly // introduced in error messages diff --git a/tests/ui/async-await/issue-75785-confusing-named-region.rs b/tests/ui/async-await/issue-75785-confusing-named-region.rs index 452614087be94..527343c192b00 100644 --- a/tests/ui/async-await/issue-75785-confusing-named-region.rs +++ b/tests/ui/async-await/issue-75785-confusing-named-region.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #75785 // Tests that we don't point to a confusing named diff --git a/tests/ui/async-await/issue-76547.rs b/tests/ui/async-await/issue-76547.rs index 587feb6247ce8..30a39c8943789 100644 --- a/tests/ui/async-await/issue-76547.rs +++ b/tests/ui/async-await/issue-76547.rs @@ -1,5 +1,5 @@ // Test for diagnostic improvement issue #76547 -// edition:2018 +//@ edition:2018 use std::{ future::Future, diff --git a/tests/ui/async-await/issue-77993-2.rs b/tests/ui/async-await/issue-77993-2.rs index 4d554a0a1d0e1..6225eaebd032f 100644 --- a/tests/ui/async-await/issue-77993-2.rs +++ b/tests/ui/async-await/issue-77993-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn test() -> Result<(), Box> { macro!(); diff --git a/tests/ui/async-await/issue-78115.rs b/tests/ui/async-await/issue-78115.rs index ac18470c62113..e05de4217fea1 100644 --- a/tests/ui/async-await/issue-78115.rs +++ b/tests/ui/async-await/issue-78115.rs @@ -1,7 +1,7 @@ // Regression test for issue #78115: "ICE: variable should be placed in scope earlier" -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(dead_code)] struct Foo { diff --git a/tests/ui/async-await/issue-84841.rs b/tests/ui/async-await/issue-84841.rs index ba3a1617b9c1d..736dbaed7d89b 100644 --- a/tests/ui/async-await/issue-84841.rs +++ b/tests/ui/async-await/issue-84841.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { diff --git a/tests/ui/async-await/issue-86507.rs b/tests/ui/async-await/issue-86507.rs index 317f0317664b6..484122a1ddcfd 100644 --- a/tests/ui/async-await/issue-86507.rs +++ b/tests/ui/async-await/issue-86507.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use ::core::pin::Pin; use ::core::future::Future; diff --git a/tests/ui/async-await/issue-93197.rs b/tests/ui/async-await/issue-93197.rs index 05ec013d0afd8..b0f5e1f0f0e80 100644 --- a/tests/ui/async-await/issue-93197.rs +++ b/tests/ui/async-await/issue-93197.rs @@ -1,6 +1,6 @@ // Regression test for #93197 -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(try_blocks)] diff --git a/tests/ui/async-await/issue-93648.rs b/tests/ui/async-await/issue-93648.rs index b27a79a428bd6..062c9d97a7575 100644 --- a/tests/ui/async-await/issue-93648.rs +++ b/tests/ui/async-await/issue-93648.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass fn main() { let _ = async { diff --git a/tests/ui/async-await/issue-98634.rs b/tests/ui/async-await/issue-98634.rs index 169cc7f9b21ea..02e869f4325f3 100644 --- a/tests/ui/async-await/issue-98634.rs +++ b/tests/ui/async-await/issue-98634.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::{ future::Future, diff --git a/tests/ui/async-await/issues/auxiliary/issue-60674.rs b/tests/ui/async-await/issues/auxiliary/issue-60674.rs index 680c6e55e5668..da11142a3a4ac 100644 --- a/tests/ui/async-await/issues/auxiliary/issue-60674.rs +++ b/tests/ui/async-await/issues/auxiliary/issue-60674.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/async-await/issues/auxiliary/issue_67893.rs b/tests/ui/async-await/issues/auxiliary/issue_67893.rs index efde4d2864d13..0591ec5dfe821 100644 --- a/tests/ui/async-await/issues/auxiliary/issue_67893.rs +++ b/tests/ui/async-await/issues/auxiliary/issue_67893.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::{Arc, Mutex}; diff --git a/tests/ui/async-await/issues/issue-102206.rs b/tests/ui/async-await/issues/issue-102206.rs index a3a2ebc58961b..98da133a07998 100644 --- a/tests/ui/async-await/issues/issue-102206.rs +++ b/tests/ui/async-await/issues/issue-102206.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() {} diff --git a/tests/ui/async-await/issues/issue-107280.rs b/tests/ui/async-await/issues/issue-107280.rs index 81ae9553cf01e..18c1962669f3d 100644 --- a/tests/ui/async-await/issues/issue-107280.rs +++ b/tests/ui/async-await/issues/issue-107280.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() { inner::().await diff --git a/tests/ui/async-await/issues/issue-112225-1.rs b/tests/ui/async-await/issues/issue-112225-1.rs index e28cbee214e1a..531da01934f1b 100644 --- a/tests/ui/async-await/issues/issue-112225-1.rs +++ b/tests/ui/async-await/issues/issue-112225-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use core::future::Future; diff --git a/tests/ui/async-await/issues/issue-112225-2.rs b/tests/ui/async-await/issues/issue-112225-2.rs index 50fa1a79b6beb..6a4da91b1475a 100644 --- a/tests/ui/async-await/issues/issue-112225-2.rs +++ b/tests/ui/async-await/issues/issue-112225-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // With the current compiler logic, we cannot have both the `112225-1` case, // and this `112225-2` case working, as the type inference depends on the evaluation diff --git a/tests/ui/async-await/issues/issue-51719.rs b/tests/ui/async-await/issues/issue-51719.rs index 1cf388cd8ab6f..dd47dad453342 100644 --- a/tests/ui/async-await/issues/issue-51719.rs +++ b/tests/ui/async-await/issues/issue-51719.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Tests that the .await syntax can't be used to make a coroutine diff --git a/tests/ui/async-await/issues/issue-51751.rs b/tests/ui/async-await/issues/issue-51751.rs index bc85a96cea99e..7c405e3653b3e 100644 --- a/tests/ui/async-await/issues/issue-51751.rs +++ b/tests/ui/async-await/issues/issue-51751.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn inc(limit: i64) -> i64 { limit + 1 diff --git a/tests/ui/async-await/issues/issue-53249.rs b/tests/ui/async-await/issues/issue-53249.rs index 3a33af2d2eec8..da86c0c7b26c1 100644 --- a/tests/ui/async-await/issues/issue-53249.rs +++ b/tests/ui/async-await/issues/issue-53249.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(arbitrary_self_types)] 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 a8165ae6c3269..452b6794bee06 100644 --- a/tests/ui/async-await/issues/issue-54752-async-block.rs +++ b/tests/ui/async-await/issues/issue-54752-async-block.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// edition:2018 -// pp-exact +//@ edition:2018 +//@ pp-exact fn main() { let _a = (async { }); } //~^ WARNING unnecessary parentheses around assigned value diff --git a/tests/ui/async-await/issues/issue-54974.rs b/tests/ui/async-await/issues/issue-54974.rs index b602ef153e621..a8b063821e4fa 100644 --- a/tests/ui/async-await/issues/issue-54974.rs +++ b/tests/ui/async-await/issues/issue-54974.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::sync::Arc; diff --git a/tests/ui/async-await/issues/issue-55324.rs b/tests/ui/async-await/issues/issue-55324.rs index 9ecb3b1295ee4..c7f7447b0ea9a 100644 --- a/tests/ui/async-await/issues/issue-55324.rs +++ b/tests/ui/async-await/issues/issue-55324.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/async-await/issues/issue-55809.rs b/tests/ui/async-await/issues/issue-55809.rs index 3b271775a3851..07661f4c263cf 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 +//@ edition:2018 +//@ run-pass trait Foo { } diff --git a/tests/ui/async-await/issues/issue-58885.rs b/tests/ui/async-await/issues/issue-58885.rs index 11920b07243e6..bae92075dec35 100644 --- a/tests/ui/async-await/issues/issue-58885.rs +++ b/tests/ui/async-await/issues/issue-58885.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-59001.rs b/tests/ui/async-await/issues/issue-59001.rs index 4ddebcf20a368..6901bd932aceb 100644 --- a/tests/ui/async-await/issues/issue-59001.rs +++ b/tests/ui/async-await/issues/issue-59001.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/async-await/issues/issue-59972.rs b/tests/ui/async-await/issues/issue-59972.rs index f60ec04c31ebb..c30477fcd30ce 100644 --- a/tests/ui/async-await/issues/issue-59972.rs +++ b/tests/ui/async-await/issues/issue-59972.rs @@ -2,9 +2,9 @@ // types as entirely uninhabited, when they were in fact constructible. This // caused us to hit "unreachable" code (illegal instruction on x86). -// run-pass +//@ run-pass -// compile-flags: --edition=2018 -Aunused +//@ compile-flags: --edition=2018 -Aunused pub enum Uninhabited { } diff --git a/tests/ui/async-await/issues/issue-60518.rs b/tests/ui/async-await/issues/issue-60518.rs index 69bbdd0e83a5d..cf8f205a820ec 100644 --- a/tests/ui/async-await/issues/issue-60518.rs +++ b/tests/ui/async-await/issues/issue-60518.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This is a regression test to ensure that simple bindings (where replacement arguments aren't // created during async fn lowering) that have their DefId used during HIR lowering (such as impl diff --git a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs index ee28a2733adca..4a8b5af5769bd 100644 --- a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -1,7 +1,7 @@ // Test that opaque `impl Trait` types are allowed to contain late-bound regions. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/async-await/issues/issue-60674.rs b/tests/ui/async-await/issues/issue-60674.rs index c0e34a8df77a4..9def3552e6773 100644 --- a/tests/ui/async-await/issues/issue-60674.rs +++ b/tests/ui/async-await/issues/issue-60674.rs @@ -1,6 +1,6 @@ -// aux-build:issue-60674.rs -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ aux-build:issue-60674.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // This is a regression test that ensures that `mut` patterns are not lost when provided as input // to a proc macro. diff --git a/tests/ui/async-await/issues/issue-61187.rs b/tests/ui/async-await/issues/issue-61187.rs index 8585a42511104..ec972d6b9185a 100644 --- a/tests/ui/async-await/issues/issue-61187.rs +++ b/tests/ui/async-await/issues/issue-61187.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/async-await/issues/issue-61986.rs b/tests/ui/async-await/issues/issue-61986.rs index 879bc6912fce9..c48c847a4e75b 100644 --- a/tests/ui/async-await/issues/issue-61986.rs +++ b/tests/ui/async-await/issues/issue-61986.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // // Tests that we properly handle StorageDead/StorageLives for temporaries // created in async loop bodies. diff --git a/tests/ui/async-await/issues/issue-62009-1.rs b/tests/ui/async-await/issues/issue-62009-1.rs index 51d216408d7ee..42cad311c0861 100644 --- a/tests/ui/async-await/issues/issue-62009-1.rs +++ b/tests/ui/async-await/issues/issue-62009-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn print_dur() {} diff --git a/tests/ui/async-await/issues/issue-62009-2.rs b/tests/ui/async-await/issues/issue-62009-2.rs index cb7336e613422..f7cba29a74708 100644 --- a/tests/ui/async-await/issues/issue-62009-2.rs +++ b/tests/ui/async-await/issues/issue-62009-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/issues/issue-62097.rs b/tests/ui/async-await/issues/issue-62097.rs index 13c72abb13639..ded535acf070f 100644 --- a/tests/ui/async-await/issues/issue-62097.rs +++ b/tests/ui/async-await/issues/issue-62097.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foo(fun: F) where F: FnOnce() + 'static diff --git a/tests/ui/async-await/issues/issue-62517-1.rs b/tests/ui/async-await/issues/issue-62517-1.rs index 4689ce36a78c0..f730f2ea1244b 100644 --- a/tests/ui/async-await/issues/issue-62517-1.rs +++ b/tests/ui/async-await/issues/issue-62517-1.rs @@ -2,8 +2,8 @@ // fn` with an `impl Trait` return that mentioned a `dyn Bar` with no // explicit lifetime bound. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait FirstTrait {} trait SecondTrait { diff --git a/tests/ui/async-await/issues/issue-62517-2.rs b/tests/ui/async-await/issues/issue-62517-2.rs index aaf28d6c132e3..f2c0d1256134b 100644 --- a/tests/ui/async-await/issues/issue-62517-2.rs +++ b/tests/ui/async-await/issues/issue-62517-2.rs @@ -2,8 +2,8 @@ // fn` with an `impl Trait` return that mentioned a `dyn Bar` with no // explicit lifetime bound. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Object {} diff --git a/tests/ui/async-await/issues/issue-63388-1.rs b/tests/ui/async-await/issues/issue-63388-1.rs index 32bcbb111169e..32026a22a1616 100644 --- a/tests/ui/async-await/issues/issue-63388-1.rs +++ b/tests/ui/async-await/issues/issue-63388-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-2.rs b/tests/ui/async-await/issues/issue-63388-2.rs index 90b59f96e5f55..85718f4112151 100644 --- a/tests/ui/async-await/issues/issue-63388-2.rs +++ b/tests/ui/async-await/issues/issue-63388-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-3.rs b/tests/ui/async-await/issues/issue-63388-3.rs index 1a9822e02fa01..13682923a94ec 100644 --- a/tests/ui/async-await/issues/issue-63388-3.rs +++ b/tests/ui/async-await/issues/issue-63388-3.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-4.rs b/tests/ui/async-await/issues/issue-63388-4.rs index 58f9dacb3bcfa..075dd148a8780 100644 --- a/tests/ui/async-await/issues/issue-63388-4.rs +++ b/tests/ui/async-await/issues/issue-63388-4.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct A; diff --git a/tests/ui/async-await/issues/issue-64391-2.rs b/tests/ui/async-await/issues/issue-64391-2.rs index eef2c1fb20ab4..54bd013df8998 100644 --- a/tests/ui/async-await/issues/issue-64391-2.rs +++ b/tests/ui/async-await/issues/issue-64391-2.rs @@ -5,8 +5,8 @@ // led us to believe that the future might be dropped after `config` // had been dropped. This cannot, in fact, happen. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn connect() { let config = 666; diff --git a/tests/ui/async-await/issues/issue-64433.rs b/tests/ui/async-await/issues/issue-64433.rs index d900f8ed9ba12..73e7e9bc3b9f3 100644 --- a/tests/ui/async-await/issues/issue-64433.rs +++ b/tests/ui/async-await/issues/issue-64433.rs @@ -3,8 +3,8 @@ // See issue-64391-2.rs for more details, as that was fixed by the // same PR. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[derive(Debug)] struct A<'a> { diff --git a/tests/ui/async-await/issues/issue-64477-2.rs b/tests/ui/async-await/issues/issue-64477-2.rs index 53ec3b0656652..3da415edaaf96 100644 --- a/tests/ui/async-await/issues/issue-64477-2.rs +++ b/tests/ui/async-await/issues/issue-64477-2.rs @@ -6,8 +6,8 @@ // See https://github.com/rust-lang/rust/issues/64477#issuecomment-534669068 for details // and https://github.com/rust-lang/rust/issues/64477#issuecomment-531882958 for an example. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn foo(_: String) {} diff --git a/tests/ui/async-await/issues/issue-64477.rs b/tests/ui/async-await/issues/issue-64477.rs index 5bd52d44a5827..c1c62d207d609 100644 --- a/tests/ui/async-await/issues/issue-64477.rs +++ b/tests/ui/async-await/issues/issue-64477.rs @@ -3,8 +3,8 @@ // We were incorrectly claiming that the `f(x).await` future captured // a value of type `T`, and hence that `T: Send` would have to hold. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/issues/issue-64964.rs b/tests/ui/async-await/issues/issue-64964.rs index 6d6eff4864ee3..257b67521cf4a 100644 --- a/tests/ui/async-await/issues/issue-64964.rs +++ b/tests/ui/async-await/issues/issue-64964.rs @@ -1,7 +1,7 @@ -// check-pass -// incremental -// compile-flags: -Z query-dep-graph -// edition:2018 +//@ check-pass +//@ incremental +//@ compile-flags: -Z query-dep-graph +//@ edition:2018 // Regression test for ICE related to `await`ing in a method + incr. comp. (#64964) diff --git a/tests/ui/async-await/issues/issue-65159.rs b/tests/ui/async-await/issues/issue-65159.rs index 7197a4fb91a0b..781f8fe88d4d1 100644 --- a/tests/ui/async-await/issues/issue-65159.rs +++ b/tests/ui/async-await/issues/issue-65159.rs @@ -1,6 +1,6 @@ // Regression test for #65159. We used to ICE. // -// edition:2018 +//@ edition:2018 async fn copy() -> Result<()> //~^ ERROR enum takes 2 generic arguments diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs index 9ed7a5d210e6f..a6e53c06e3195 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs @@ -1,12 +1,12 @@ // issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should // be talking about `async fn`s instead. -// run-fail -// error-pattern: thread 'main' panicked -// error-pattern: `async fn` resumed after completion -// edition:2018 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ error-pattern: thread 'main' panicked +//@ error-pattern: `async fn` resumed after completion +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs index 51e9a54e48aef..d64184c101251 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs @@ -1,12 +1,12 @@ // issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should // be talking about `async fn`s instead. Should also test what happens when it panics. -// run-fail -// needs-unwind -// error-pattern: thread 'main' panicked -// error-pattern: `async fn` resumed after panicking -// edition:2018 -// ignore-wasm no panic or subprocess support +//@ run-fail +//@ needs-unwind +//@ error-pattern: thread 'main' panicked +//@ error-pattern: `async fn` resumed after panicking +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs index e16b86f957920..7a23457e62af3 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs @@ -2,11 +2,11 @@ // be talking about `async fn`s instead. Regression test added to make sure coroutines still // panic when resumed after completion. -// run-fail -// error-pattern:coroutine resumed after completion -// edition:2018 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ error-pattern:coroutine resumed after completion +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs index ef6f105f34abb..12d22c330ae6d 100644 --- a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs +++ b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass struct Foo(*const u8); diff --git a/tests/ui/async-await/issues/issue-66695-static-refs.rs b/tests/ui/async-await/issues/issue-66695-static-refs.rs index 1b0e1c6c9e77d..5bf92f966f429 100644 --- a/tests/ui/async-await/issues/issue-66695-static-refs.rs +++ b/tests/ui/async-await/issues/issue-66695-static-refs.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs index b7a976a0af696..7d874398d30df 100644 --- a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs +++ b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Ia(S); diff --git a/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs b/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs index caed762691e4d..51e85931dbf20 100644 --- a/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs +++ b/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/issues/issue-67893.rs b/tests/ui/async-await/issues/issue-67893.rs index 359c75f170c39..73cce38c94a0a 100644 --- a/tests/ui/async-await/issues/issue-67893.rs +++ b/tests/ui/async-await/issues/issue-67893.rs @@ -1,5 +1,5 @@ -// aux-build: issue_67893.rs -// edition:2018 +//@ aux-build: issue_67893.rs +//@ edition:2018 extern crate issue_67893; diff --git a/tests/ui/async-await/issues/issue-69307-nested.rs b/tests/ui/async-await/issues/issue-69307-nested.rs index b7cdf3987f1cb..fdffb72f64b07 100644 --- a/tests/ui/async-await/issues/issue-69307-nested.rs +++ b/tests/ui/async-await/issues/issue-69307-nested.rs @@ -4,8 +4,8 @@ // expression was causing an ICE due to a failure to save/restore // state in the AST numbering pass when entering a nested body. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn block_on(_: F) -> usize { 0 diff --git a/tests/ui/async-await/issues/issue-69307.rs b/tests/ui/async-await/issues/issue-69307.rs index 59309a7f2888b..b22e078a309f9 100644 --- a/tests/ui/async-await/issues/issue-69307.rs +++ b/tests/ui/async-await/issues/issue-69307.rs @@ -4,8 +4,8 @@ // expression was causing an ICE due to a failure to save/restore // state in the AST numbering pass when entering a nested body. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn block_on(_: F) -> usize { 0 diff --git a/tests/ui/async-await/issues/issue-72312.rs b/tests/ui/async-await/issues/issue-72312.rs index 74122cf00a9d4..ba4c391058586 100644 --- a/tests/ui/async-await/issues/issue-72312.rs +++ b/tests/ui/async-await/issues/issue-72312.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn require_static(val: T) -> T { val } diff --git a/tests/ui/async-await/issues/issue-78600.rs b/tests/ui/async-await/issues/issue-78600.rs index 4303fc7952f2b..1326546e930fe 100644 --- a/tests/ui/async-await/issues/issue-78600.rs +++ b/tests/ui/async-await/issues/issue-78600.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct S<'a>(&'a i32); diff --git a/tests/ui/async-await/issues/issue-78654.rs b/tests/ui/async-await/issues/issue-78654.rs index cc6dc38346907..eb8bf27ff837d 100644 --- a/tests/ui/async-await/issues/issue-78654.rs +++ b/tests/ui/async-await/issues/issue-78654.rs @@ -1,5 +1,5 @@ -// edition:2018 -// revisions: full min +//@ edition:2018 +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/async-await/issues/issue-78938-async-block.rs b/tests/ui/async-await/issues/issue-78938-async-block.rs index 36f7160198526..1aeefa58e0202 100644 --- a/tests/ui/async-await/issues/issue-78938-async-block.rs +++ b/tests/ui/async-await/issues/issue-78938-async-block.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{sync::Arc, future::Future, pin::Pin, task::{Context, Poll}}; diff --git a/tests/ui/async-await/issues/issue-95307.rs b/tests/ui/async-await/issues/issue-95307.rs index 35dce2c62171d..40700c610f33b 100644 --- a/tests/ui/async-await/issues/issue-95307.rs +++ b/tests/ui/async-await/issues/issue-95307.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Regression test for #95307. // The ICE occurred on all the editions, specifying edition:2018 to reduce diagnostics. diff --git a/tests/ui/async-await/issues/non-async-enclosing-span.rs b/tests/ui/async-await/issues/non-async-enclosing-span.rs index d47c2137725d6..3943a66c6e710 100644 --- a/tests/ui/async-await/issues/non-async-enclosing-span.rs +++ b/tests/ui/async-await/issues/non-async-enclosing-span.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn do_the_thing() -> u8 { 8 diff --git a/tests/ui/async-await/missed-capture-issue-107414.rs b/tests/ui/async-await/missed-capture-issue-107414.rs index bb14eb74b3a51..0249fd9bbb0f2 100644 --- a/tests/ui/async-await/missed-capture-issue-107414.rs +++ b/tests/ui/async-await/missed-capture-issue-107414.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/missing-return-in-async-block.fixed b/tests/ui/async-await/missing-return-in-async-block.fixed index 3dbac7945b6e1..625079c3fbc29 100644 --- a/tests/ui/async-await/missing-return-in-async-block.fixed +++ b/tests/ui/async-await/missing-return-in-async-block.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 use std::future::Future; use std::pin::Pin; pub struct S; diff --git a/tests/ui/async-await/missing-return-in-async-block.rs b/tests/ui/async-await/missing-return-in-async-block.rs index 7d04e0e0fad14..a5b03fd3c90ea 100644 --- a/tests/ui/async-await/missing-return-in-async-block.rs +++ b/tests/ui/async-await/missing-return-in-async-block.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 use std::future::Future; use std::pin::Pin; pub struct S; diff --git a/tests/ui/async-await/move-part-await-return-rest-struct.rs b/tests/ui/async-await/move-part-await-return-rest-struct.rs index 39ea2aae563a4..ee817f16ace76 100644 --- a/tests/ui/async-await/move-part-await-return-rest-struct.rs +++ b/tests/ui/async-await/move-part-await-return-rest-struct.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib struct Small { x: Vec, diff --git a/tests/ui/async-await/move-part-await-return-rest-tuple.rs b/tests/ui/async-await/move-part-await-return-rest-tuple.rs index 7b958b98b414f..c7c15e66fc04a 100644 --- a/tests/ui/async-await/move-part-await-return-rest-tuple.rs +++ b/tests/ui/async-await/move-part-await-return-rest-tuple.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn move_part_await_return_rest_tuple() -> Vec { let x = (vec![3], vec![4, 4]); diff --git a/tests/ui/async-await/multiple-lifetimes/elided.rs b/tests/ui/async-await/multiple-lifetimes/elided.rs index 8258e2eff521b..954695d0aa8fc 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 +//@ edition:2018 +//@ run-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 3912b854747de..5ff06b1c3c557 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 +//@ edition:2018 +//@ run-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/hrtb.rs b/tests/ui/async-await/multiple-lifetimes/hrtb.rs index e788ca5ff49c3..f9c062fc36312 100644 --- a/tests/ui/async-await/multiple-lifetimes/hrtb.rs +++ b/tests/ui/async-await/multiple-lifetimes/hrtb.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs b/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs index 614f189729126..c53fa27438215 100644 --- a/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs +++ b/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs @@ -1,7 +1,7 @@ // Regression test for #63033. -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 async fn test1(_: &'static u8, _: &'_ u8, _: &'_ u8) {} diff --git a/tests/ui/async-await/multiple-lifetimes/named.rs b/tests/ui/async-await/multiple-lifetimes/named.rs index e8eb98102f478..c933765c91037 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 +//@ edition:2018 +//@ run-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 7375cb6d3a0dd..8a82cc9e220e7 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 +//@ edition:2018 +//@ run-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 f1002947fb978..3c6b847caaf46 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 +//@ edition:2018 +//@ run-pass // Test member constraints that appear in the `impl Trait` // return type of an async function. diff --git a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs index aebc77d265e38..54d55ee67ca43 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that a feature gate is needed to use `impl Trait` as the // return type of an async. diff --git a/tests/ui/async-await/multiple-lifetimes/ret-ref.rs b/tests/ui/async-await/multiple-lifetimes/ret-ref.rs index 149c020f9cb9c..0d7b870d31b93 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-ref.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-ref.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that we get the expected borrow check errors when an async // function (which takes multiple lifetimes) only returns data from diff --git a/tests/ui/async-await/multiple-lifetimes/variance.rs b/tests/ui/async-await/multiple-lifetimes/variance.rs index 6ed8bef956a52..b578819c67b7a 100644 --- a/tests/ui/async-await/multiple-lifetimes/variance.rs +++ b/tests/ui/async-await/multiple-lifetimes/variance.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test for async fn where the parameters have distinct lifetime // parameters that appear in all possible variances. diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs index fedc814b0418a..645a136eeb4ee 100644 --- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs +++ b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. diff --git a/tests/ui/async-await/nested-in-impl.rs b/tests/ui/async-await/nested-in-impl.rs index 76ed827d5973e..aebcf43c42762 100644 --- a/tests/ui/async-await/nested-in-impl.rs +++ b/tests/ui/async-await/nested-in-impl.rs @@ -1,8 +1,8 @@ // Test that async fn works when nested inside of // impls with lifetime parameters. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a ()); diff --git a/tests/ui/async-await/no-async-const.rs b/tests/ui/async-await/no-async-const.rs index c9941d1c5a00a..c5485ebc9b624 100644 --- a/tests/ui/async-await/no-async-const.rs +++ b/tests/ui/async-await/no-async-const.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib pub async const fn x() {} //~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const` diff --git a/tests/ui/async-await/no-const-async.rs b/tests/ui/async-await/no-const-async.rs index b3c59734e036f..937a1c4bdf778 100644 --- a/tests/ui/async-await/no-const-async.rs +++ b/tests/ui/async-await/no-const-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib pub const async fn x() {} //~^ ERROR functions cannot be both `const` and `async` diff --git a/tests/ui/async-await/no-move-across-await-struct.rs b/tests/ui/async-await/no-move-across-await-struct.rs index 51c9a42b3f4e3..4087b29264811 100644 --- a/tests/ui/async-await/no-move-across-await-struct.rs +++ b/tests/ui/async-await/no-move-across-await-struct.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_move_across_await_struct() -> Vec { let s = Small { x: vec![31], y: vec![19, 1441] }; diff --git a/tests/ui/async-await/no-move-across-await-tuple.rs b/tests/ui/async-await/no-move-across-await-tuple.rs index a656332698c43..972aed87d34aa 100644 --- a/tests/ui/async-await/no-move-across-await-tuple.rs +++ b/tests/ui/async-await/no-move-across-await-tuple.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_move_across_await_tuple() -> Vec { let x = (vec![3], vec![4, 4]); diff --git a/tests/ui/async-await/no-non-guaranteed-initialization.rs b/tests/ui/async-await/no-non-guaranteed-initialization.rs index c4d81bf83a3c4..f5ab5309e2d6a 100644 --- a/tests/ui/async-await/no-non-guaranteed-initialization.rs +++ b/tests/ui/async-await/no-non-guaranteed-initialization.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_non_guaranteed_initialization(x: usize) -> usize { let y; diff --git a/tests/ui/async-await/no-params-non-move-async-closure.rs b/tests/ui/async-await/no-params-non-move-async-closure.rs index 1440d918c50eb..e9e43b3484aa0 100644 --- a/tests/ui/async-await/no-params-non-move-async-closure.rs +++ b/tests/ui/async-await/no-params-non-move-async-closure.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/no-std.rs b/tests/ui/async-await/no-std.rs index 63e93cdff7e77..92f7d996882ec 100644 --- a/tests/ui/async-await/no-std.rs +++ b/tests/ui/async-await/no-std.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![no_std] #![crate_type = "rlib"] diff --git a/tests/ui/async-await/no-unsafe-async.rs b/tests/ui/async-await/no-unsafe-async.rs index 7c6811d81eeae..e58d878c3db04 100644 --- a/tests/ui/async-await/no-unsafe-async.rs +++ b/tests/ui/async-await/no-unsafe-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/non-trivial-drop.rs b/tests/ui/async-await/non-trivial-drop.rs index 1004303d5c137..71b8812421972 100644 --- a/tests/ui/async-await/non-trivial-drop.rs +++ b/tests/ui/async-await/non-trivial-drop.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(coroutines)] diff --git a/tests/ui/async-await/normalize-output-in-signature-deduction.rs b/tests/ui/async-await/normalize-output-in-signature-deduction.rs index e07fe9e98ecf4..177e8625531c3 100644 --- a/tests/ui/async-await/normalize-output-in-signature-deduction.rs +++ b/tests/ui/async-await/normalize-output-in-signature-deduction.rs @@ -1,7 +1,7 @@ -// edition:2021 -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ edition:2021 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 815cc916b41f6..36b3f2bc9ff65 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(negative_impls)] #![allow(unused)] diff --git a/tests/ui/async-await/partial-initialization-across-await.rs b/tests/ui/async-await/partial-initialization-across-await.rs index 7577aee3fb7d6..b355739f70b3b 100644 --- a/tests/ui/async-await/partial-initialization-across-await.rs +++ b/tests/ui/async-await/partial-initialization-across-await.rs @@ -1,7 +1,7 @@ // Test that we don't allow awaiting from an async fn while a local is partially // initialized. -// edition:2018 +//@ edition:2018 struct S { x: i32, y: i32 } struct T(i32, i32); diff --git a/tests/ui/async-await/proper-span-for-type-error.fixed b/tests/ui/async-await/proper-span-for-type-error.fixed index 7d43b575d2f66..03e808fe7a677 100644 --- a/tests/ui/async-await/proper-span-for-type-error.fixed +++ b/tests/ui/async-await/proper-span-for-type-error.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] async fn a() {} diff --git a/tests/ui/async-await/proper-span-for-type-error.rs b/tests/ui/async-await/proper-span-for-type-error.rs index 00ccde1bf9962..b0c8d5f9b9986 100644 --- a/tests/ui/async-await/proper-span-for-type-error.rs +++ b/tests/ui/async-await/proper-span-for-type-error.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] async fn a() {} diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.rs b/tests/ui/async-await/recursive-async-impl-trait-type.rs index 9351ee53f0754..c68f8c31ded50 100644 --- a/tests/ui/async-await/recursive-async-impl-trait-type.rs +++ b/tests/ui/async-await/recursive-async-impl-trait-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. diff --git a/tests/ui/async-await/repeat_count_const_in_async_fn.rs b/tests/ui/async-await/repeat_count_const_in_async_fn.rs index ebabc3fbf10f9..5e40df271164b 100644 --- a/tests/ui/async-await/repeat_count_const_in_async_fn.rs +++ b/tests/ui/async-await/repeat_count_const_in_async_fn.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// compile-flags: --crate-type=lib +//@ check-pass +//@ edition:2018 +//@ compile-flags: --crate-type=lib pub async fn test() { const C: usize = 4; diff --git a/tests/ui/async-await/return-ty-raw-ptr-coercion.rs b/tests/ui/async-await/return-ty-raw-ptr-coercion.rs index 9fe0869cad6c0..b4a102e8efc28 100644 --- a/tests/ui/async-await/return-ty-raw-ptr-coercion.rs +++ b/tests/ui/async-await/return-ty-raw-ptr-coercion.rs @@ -2,8 +2,8 @@ // // Also serves as a regression test for #60424. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/async-await/return-ty-unsize-coercion.rs b/tests/ui/async-await/return-ty-unsize-coercion.rs index 93832ef7eddb5..5bc1644d74ed2 100644 --- a/tests/ui/async-await/return-ty-unsize-coercion.rs +++ b/tests/ui/async-await/return-ty-unsize-coercion.rs @@ -2,8 +2,8 @@ // // Also serves as a regression test for #60424. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.rs b/tests/ui/async-await/return-type-notation/issue-110963-early.rs index 07f2130bab566..4090912f528c4 100644 --- a/tests/ui/async-await/return-type-notation/issue-110963-early.rs +++ b/tests/ui/async-await/return-type-notation/issue-110963-early.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// known-bug: #110963 +//@ edition: 2021 +//@ known-bug: #110963 #![feature(return_type_notation)] diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.rs b/tests/ui/async-await/return-type-notation/issue-110963-late.rs index 7533844fb4351..e0e59b6c6adb2 100644 --- a/tests/ui/async-await/return-type-notation/issue-110963-late.rs +++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs index 5341c39a975aa..0e167b149f389 100644 --- a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs +++ b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver -// edition:2021 +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ edition:2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs index 0ceb62d449a17..365ca57400652 100644 --- a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs +++ b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs index 73c085315990c..fa647ea0bc781 100644 --- a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs +++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.rs b/tests/ui/async-await/return-type-notation/super-method-bound.rs index 6025cda2f5d4c..ad7ed5b283cf1 100644 --- a/tests/ui/async-await/return-type-notation/super-method-bound.rs +++ b/tests/ui/async-await/return-type-notation/super-method-bound.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/supertrait-bound.rs b/tests/ui/async-await/return-type-notation/supertrait-bound.rs index a85596a9fee9b..adb286a21d216 100644 --- a/tests/ui/async-await/return-type-notation/supertrait-bound.rs +++ b/tests/ui/async-await/return-type-notation/supertrait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete and may not be safe to use diff --git a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs b/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs index ac320cfc679c5..328cd8d2ad02e 100644 --- a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs +++ b/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/send-bound-async-closure.rs b/tests/ui/async-await/send-bound-async-closure.rs index 2ec006da359d1..2732fa5d466c3 100644 --- a/tests/ui/async-await/send-bound-async-closure.rs +++ b/tests/ui/async-await/send-bound-async-closure.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass // This test verifies that we do not create a query cycle when typechecking has several inference // variables that point to the same coroutine interior type. diff --git a/tests/ui/async-await/suggest-missing-await-closure.fixed b/tests/ui/async-await/suggest-missing-await-closure.fixed index febcd02184261..1ec3456a2655a 100644 --- a/tests/ui/async-await/suggest-missing-await-closure.fixed +++ b/tests/ui/async-await/suggest-missing-await-closure.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![feature(async_closure)] diff --git a/tests/ui/async-await/suggest-missing-await-closure.rs b/tests/ui/async-await/suggest-missing-await-closure.rs index faabf6ee3f16f..3a448ad411bba 100644 --- a/tests/ui/async-await/suggest-missing-await-closure.rs +++ b/tests/ui/async-await/suggest-missing-await-closure.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![feature(async_closure)] diff --git a/tests/ui/async-await/suggest-missing-await.rs b/tests/ui/async-await/suggest-missing-await.rs index 796f82e779c2b..96996af0bd2d8 100644 --- a/tests/ui/async-await/suggest-missing-await.rs +++ b/tests/ui/async-await/suggest-missing-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn take_u32(_x: u32) {} diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs index 4a3195174df49..e5a3d54c5d036 100644 --- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs +++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs @@ -1,4 +1,4 @@ -// rustc-env:CARGO=/usr/bin/cargo +//@ rustc-env:CARGO=/usr/bin/cargo use std::pin::Pin; use std::future::Future; diff --git a/tests/ui/async-await/task-context-arg.rs b/tests/ui/async-await/task-context-arg.rs index 45b18d56b1cf0..c377fd2d1450a 100644 --- a/tests/ui/async-await/task-context-arg.rs +++ b/tests/ui/async-await/task-context-arg.rs @@ -1,9 +1,9 @@ // Checks that we don't get conflicting arguments in our debug info with a particular async function // structure. -// edition:2021 -// compile-flags: -Cdebuginfo=2 -// build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/async-await/track-caller/async-block.rs b/tests/ui/async-await/track-caller/async-block.rs index 24711b966b5d8..900d5ef25504d 100644 --- a/tests/ui/async-await/track-caller/async-block.rs +++ b/tests/ui/async-await/track-caller/async-block.rs @@ -1,5 +1,5 @@ -// edition:2021 -// revisions: afn nofeat +//@ edition:2021 +//@ revisions: afn nofeat #![feature(stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/track-caller/async-closure-gate.rs b/tests/ui/async-await/track-caller/async-closure-gate.rs index 911934a223276..4b88255bc364c 100644 --- a/tests/ui/async-await/track-caller/async-closure-gate.rs +++ b/tests/ui/async-await/track-caller/async-closure-gate.rs @@ -1,5 +1,5 @@ -// edition:2021 -// revisions: afn nofeat +//@ edition:2021 +//@ revisions: afn nofeat #![feature(async_closure, stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/track-caller/issue-105134.rs b/tests/ui/async-await/track-caller/issue-105134.rs index 4e52b8e250b9f..c9f3d7e8c2261 100644 --- a/tests/ui/async-await/track-caller/issue-105134.rs +++ b/tests/ui/async-await/track-caller/issue-105134.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #[track_caller] fn f() { diff --git a/tests/ui/async-await/track-caller/panic-track-caller.rs b/tests/ui/async-await/track-caller/panic-track-caller.rs index df8290e5fffc7..c693a446eed47 100644 --- a/tests/ui/async-await/track-caller/panic-track-caller.rs +++ b/tests/ui/async-await/track-caller/panic-track-caller.rs @@ -1,7 +1,7 @@ -// run-pass -// edition:2021 -// revisions: afn cls nofeat -// needs-unwind +//@ run-pass +//@ edition:2021 +//@ revisions: afn cls nofeat +//@ needs-unwind // gate-test-async_fn_track_caller #![feature(async_closure, stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/try-on-option-in-async.rs b/tests/ui/async-await/try-on-option-in-async.rs index afaaed2ef6e4e..fda848141d347 100644 --- a/tests/ui/async-await/try-on-option-in-async.rs +++ b/tests/ui/async-await/try-on-option-in-async.rs @@ -1,5 +1,5 @@ #![feature(async_closure)] -// edition:2018 +//@ edition:2018 fn main() {} async fn an_async_block() -> u32 { diff --git a/tests/ui/async-await/type-parameter-send.rs b/tests/ui/async-await/type-parameter-send.rs index ab2b62aa5aa1c..8ca0555e09637 100644 --- a/tests/ui/async-await/type-parameter-send.rs +++ b/tests/ui/async-await/type-parameter-send.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --crate-type lib -// edition:2018 +//@ check-pass +//@ compile-flags: --crate-type lib +//@ edition:2018 fn assert_send(_: F) {} diff --git a/tests/ui/async-await/unnecessary-await.rs b/tests/ui/async-await/unnecessary-await.rs index 93b68f018e4ca..71df83fa350dd 100644 --- a/tests/ui/async-await/unnecessary-await.rs +++ b/tests/ui/async-await/unnecessary-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foo () { } fn bar() -> impl std::future::Future { async {} } diff --git a/tests/ui/async-await/unreachable-lint-1.rs b/tests/ui/async-await/unreachable-lint-1.rs index d63d643c4e70b..b2639e2533cdf 100644 --- a/tests/ui/async-await/unreachable-lint-1.rs +++ b/tests/ui/async-await/unreachable-lint-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unreachable_code)] async fn foo() { diff --git a/tests/ui/async-await/unreachable-lint.rs b/tests/ui/async-await/unreachable-lint.rs index ca18cfde4f2f5..e8a58df384ed0 100644 --- a/tests/ui/async-await/unreachable-lint.rs +++ b/tests/ui/async-await/unreachable-lint.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![deny(unreachable_code)] async fn foo() { diff --git a/tests/ui/async-await/unresolved_type_param.rs b/tests/ui/async-await/unresolved_type_param.rs index dd5aa0dd077ae..ec874e3753f3f 100644 --- a/tests/ui/async-await/unresolved_type_param.rs +++ b/tests/ui/async-await/unresolved_type_param.rs @@ -1,7 +1,7 @@ // Provoke an unresolved type error (T). // Error message should pinpoint the type parameter T as needing to be bound // (rather than give a general error message) -// edition:2018 +//@ edition:2018 async fn bar() -> () {} diff --git a/tests/ui/async-await/unsized-across-await.rs b/tests/ui/async-await/unsized-across-await.rs index 32cb4f88eaef6..b6bd5567fb221 100644 --- a/tests/ui/async-await/unsized-across-await.rs +++ b/tests/ui/async-await/unsized-across-await.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(unsized_locals)] //~^ WARN the feature `unsized_locals` is incomplete diff --git a/tests/ui/async-await/unused-lifetime.rs b/tests/ui/async-await/unused-lifetime.rs index 6cfd36ba9e843..5d827cf8df1e1 100644 --- a/tests/ui/async-await/unused-lifetime.rs +++ b/tests/ui/async-await/unused-lifetime.rs @@ -1,7 +1,7 @@ // Check "unused_lifetimes" lint on both async and sync functions // Both cases should be diagnosed the same way. -// edition:2018 +//@ edition:2018 #![deny(unused_lifetimes)] diff --git a/tests/ui/atomic-from-mut-not-available.rs b/tests/ui/atomic-from-mut-not-available.rs index bf94616007570..8326187838a20 100644 --- a/tests/ui/atomic-from-mut-not-available.rs +++ b/tests/ui/atomic-from-mut-not-available.rs @@ -1,5 +1,5 @@ -// only-x86 -// only-linux +//@ only-x86 +//@ only-linux fn main() { core::sync::atomic::AtomicU64::from_mut(&mut 0u64); diff --git a/tests/ui/attr-bad-crate-attr.rs b/tests/ui/attr-bad-crate-attr.rs index 89ba26dfd6f4b..b9100ecfb6761 100644 --- a/tests/ui/attr-bad-crate-attr.rs +++ b/tests/ui/attr-bad-crate-attr.rs @@ -1,4 +1,4 @@ -// error-pattern: expected item +//@ error-pattern: expected item #![attr = "val"] #[attr = "val"] // Unterminated diff --git a/tests/ui/attr-shebang.rs b/tests/ui/attr-shebang.rs index 3b0dc096f58fb..67c371aeaace3 100644 --- a/tests/ui/attr-shebang.rs +++ b/tests/ui/attr-shebang.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(rust1)] diff --git a/tests/ui/attr-start.rs b/tests/ui/attr-start.rs index 6777631484b79..27cf35601fdf7 100644 --- a/tests/ui/attr-start.rs +++ b/tests/ui/attr-start.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(start)] diff --git a/tests/ui/attributes/attr-before-view-item.rs b/tests/ui/attributes/attr-before-view-item.rs index e1588aadab62c..e0e086ea476ac 100644 --- a/tests/ui/attributes/attr-before-view-item.rs +++ b/tests/ui/attributes/attr-before-view-item.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] #![feature(test)] diff --git a/tests/ui/attributes/attr-before-view-item2.rs b/tests/ui/attributes/attr-before-view-item2.rs index c1f667372f515..8d74d73fe2ec8 100644 --- a/tests/ui/attributes/attr-before-view-item2.rs +++ b/tests/ui/attributes/attr-before-view-item2.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] #![feature(test)] diff --git a/tests/ui/attributes/attr-mix-new.rs b/tests/ui/attributes/attr-mix-new.rs index 8119df0c40cb0..bb2bab8f26781 100644 --- a/tests/ui/attributes/attr-mix-new.rs +++ b/tests/ui/attributes/attr-mix-new.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/auxiliary/key-value-expansion.rs b/tests/ui/attributes/auxiliary/key-value-expansion.rs index b4eb80bb51649..9db82cec6356f 100644 --- a/tests/ui/attributes/auxiliary/key-value-expansion.rs +++ b/tests/ui/attributes/auxiliary/key-value-expansion.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/attributes/class-attributes-1.rs b/tests/ui/attributes/class-attributes-1.rs index 027b701e591ba..0c8f5f324a3ef 100644 --- a/tests/ui/attributes/class-attributes-1.rs +++ b/tests/ui/attributes/class-attributes-1.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we actually print the attributes +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we actually print the attributes #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/class-attributes-2.rs b/tests/ui/attributes/class-attributes-2.rs index 6aba6b89427e4..0ec0cd225969b 100644 --- a/tests/ui/attributes/class-attributes-2.rs +++ b/tests/ui/attributes/class-attributes-2.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/duplicated-attributes.rs b/tests/ui/attributes/duplicated-attributes.rs index 84a5abcf8b4bc..65cab297af715 100644 --- a/tests/ui/attributes/duplicated-attributes.rs +++ b/tests/ui/attributes/duplicated-attributes.rs @@ -2,8 +2,8 @@ // emitted. // Tests https://github.com/rust-lang/rust/issues/90979 -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #![feature(test)] #![feature(cfg_eval)] diff --git a/tests/ui/attributes/extented-attribute-macro-error.rs b/tests/ui/attributes/extented-attribute-macro-error.rs index 492f84f56c3a0..5dcb38d7da9d4 100644 --- a/tests/ui/attributes/extented-attribute-macro-error.rs +++ b/tests/ui/attributes/extented-attribute-macro-error.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" +//@ normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" #![doc = include_str!("../not_existing_file.md")] struct Documented {} diff --git a/tests/ui/attributes/invalid_macro_export_argument.rs b/tests/ui/attributes/invalid_macro_export_argument.rs index a0ed5fd1c8fa2..96f66991e0414 100644 --- a/tests/ui/attributes/invalid_macro_export_argument.rs +++ b/tests/ui/attributes/invalid_macro_export_argument.rs @@ -1,5 +1,5 @@ -// revisions: deny allow -//[allow] check-pass +//@ revisions: deny allow +//@[allow] check-pass #![cfg_attr(deny, deny(invalid_macro_export_arguments))] #![cfg_attr(allow, allow(invalid_macro_export_arguments))] diff --git a/tests/ui/attributes/issue-105594-invalid-attr-validation.rs b/tests/ui/attributes/issue-105594-invalid-attr-validation.rs index 096ce97ab0481..bea5faf7253ff 100644 --- a/tests/ui/attributes/issue-105594-invalid-attr-validation.rs +++ b/tests/ui/attributes/issue-105594-invalid-attr-validation.rs @@ -1,7 +1,7 @@ // This checks that the attribute validation ICE in issue #105594 doesn't // recur. // -// ignore-thumbv8m.base-none-eabi +//@ ignore-thumbv8m.base-none-eabi #![feature(cmse_nonsecure_entry)] fn main() {} diff --git a/tests/ui/attributes/issue-115264-expr-field.rs b/tests/ui/attributes/issue-115264-expr-field.rs index f53ac4aee66b5..8adb68deb5b4f 100644 --- a/tests/ui/attributes/issue-115264-expr-field.rs +++ b/tests/ui/attributes/issue-115264-expr-field.rs @@ -2,7 +2,7 @@ // Tests that retrieving the ident of the X::foo field // in main() does not cause an ICE -// check-pass +//@ check-pass #[allow(dead_code)] struct X { diff --git a/tests/ui/attributes/issue-115264-pat-field.rs b/tests/ui/attributes/issue-115264-pat-field.rs index 8c6bbe167264c..53e3b4524d60e 100644 --- a/tests/ui/attributes/issue-115264-pat-field.rs +++ b/tests/ui/attributes/issue-115264-pat-field.rs @@ -2,7 +2,7 @@ // Tests that retrieving the ident of 'foo' variable in // the pattern inside main() does not cause an ICE -// check-pass +//@ check-pass struct X { foo: i32, diff --git a/tests/ui/attributes/issue-40962.rs b/tests/ui/attributes/issue-40962.rs index 7b91c06819f05..bd80d31277c41 100644 --- a/tests/ui/attributes/issue-40962.rs +++ b/tests/ui/attributes/issue-40962.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { ($i:meta) => { #[derive($i)] diff --git a/tests/ui/attributes/item-attributes.rs b/tests/ui/attributes/item-attributes.rs index c6bf6c6560277..7fe7fdd97584e 100644 --- a/tests/ui/attributes/item-attributes.rs +++ b/tests/ui/attributes/item-attributes.rs @@ -2,7 +2,7 @@ // for completeness since .rs files linked from .rc files support this // notation to specify their module's attributes -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![rustc_dummy = "val"] diff --git a/tests/ui/attributes/key-value-expansion.rs b/tests/ui/attributes/key-value-expansion.rs index 3065c12749c2c..dd408ebb77e4c 100644 --- a/tests/ui/attributes/key-value-expansion.rs +++ b/tests/ui/attributes/key-value-expansion.rs @@ -1,7 +1,7 @@ // Regression tests for issue #55414, expansion happens in the value of a key-value attribute, // and the expanded expression is more complex than simply a macro call. -// aux-build:key-value-expansion.rs +//@ aux-build:key-value-expansion.rs #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/log-backtrace.rs b/tests/ui/attributes/log-backtrace.rs index e42edf1d4af51..9af1d318eb063 100644 --- a/tests/ui/attributes/log-backtrace.rs +++ b/tests/ui/attributes/log-backtrace.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // // This test makes sure that log-backtrace option at least parses correctly // -// dont-check-compiler-stdout -// dont-check-compiler-stderr -// rustc-env:RUSTC_LOG=info -// rustc-env:RUSTC_LOG_BACKTRACE=rustc_metadata::creader +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr +//@ rustc-env:RUSTC_LOG=info +//@ rustc-env:RUSTC_LOG_BACKTRACE=rustc_metadata::creader fn main() {} diff --git a/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs b/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs index 196b5be2dd086..25879d17027bc 100644 --- a/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs +++ b/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/attributes/main-removed-2/main.rs b/tests/ui/attributes/main-removed-2/main.rs index e8fecf825fa83..e4a3de79ec99d 100644 --- a/tests/ui/attributes/main-removed-2/main.rs +++ b/tests/ui/attributes/main-removed-2/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:tokyo.rs -// compile-flags:--extern tokyo -// edition:2021 +//@ run-pass +//@ aux-build:tokyo.rs +//@ compile-flags:--extern tokyo +//@ edition:2021 use tokyo::main; diff --git a/tests/ui/attributes/method-attributes.rs b/tests/ui/attributes/method-attributes.rs index 67439718bd3cc..4a7f042c20a62 100644 --- a/tests/ui/attributes/method-attributes.rs +++ b/tests/ui/attributes/method-attributes.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we print all the attributes -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we print all the attributes +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/rustc_confusables.rs b/tests/ui/attributes/rustc_confusables.rs index 352e91d065f40..a88432ead7535 100644 --- a/tests/ui/attributes/rustc_confusables.rs +++ b/tests/ui/attributes/rustc_confusables.rs @@ -1,4 +1,4 @@ -// aux-build: rustc_confusables_across_crate.rs +//@ aux-build: rustc_confusables_across_crate.rs #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/tool_attributes.rs b/tests/ui/attributes/tool_attributes.rs index be4a10c0ee933..fc05488e44c4a 100644 --- a/tests/ui/attributes/tool_attributes.rs +++ b/tests/ui/attributes/tool_attributes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Scoped attributes should not trigger an unused attributes lint. #![deny(unused_attributes)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs index 0a42a5b5ef16b..ccd6c67866018 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs index 4f864807752c2..db3407a7d55fc 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs index 100b4ce9f74fc..778e06cb3effe 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs fn main() { extern crate sigpipe_utils; diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs index b5adc2e55721f..6bbe4a8d0d688 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs index 6befb9e956594..02a3f48f3b395 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs index 238c0d57a68d2..30f2a9b143062 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unnamed-field-attributes-dup.rs b/tests/ui/attributes/unnamed-field-attributes-dup.rs index 7edfd0337945b..f4d7a77cd6ef5 100644 --- a/tests/ui/attributes/unnamed-field-attributes-dup.rs +++ b/tests/ui/attributes/unnamed-field-attributes-dup.rs @@ -1,6 +1,6 @@ // Duplicate non-builtin attributes can be used on unnamed fields. -// check-pass +//@ check-pass struct S ( #[rustfmt::skip] diff --git a/tests/ui/attributes/unnamed-field-attributes-vis.rs b/tests/ui/attributes/unnamed-field-attributes-vis.rs index d12155f6d81fd..dd582ab7fba80 100644 --- a/tests/ui/attributes/unnamed-field-attributes-vis.rs +++ b/tests/ui/attributes/unnamed-field-attributes-vis.rs @@ -1,6 +1,6 @@ // Unnamed fields don't lose their visibility due to non-builtin attributes on them. -// check-pass +//@ check-pass mod m { pub struct S(#[rustfmt::skip] pub u8); diff --git a/tests/ui/attributes/unnamed-field-attributes.rs b/tests/ui/attributes/unnamed-field-attributes.rs index 93f364047e9a5..4bbc598fd6885 100644 --- a/tests/ui/attributes/unnamed-field-attributes.rs +++ b/tests/ui/attributes/unnamed-field-attributes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S( #[rustfmt::skip] u8, diff --git a/tests/ui/attributes/unrestricted-attribute-tokens.rs b/tests/ui/attributes/unrestricted-attribute-tokens.rs index e31bc91a00aad..9f91afb59bf81 100644 --- a/tests/ui/attributes/unrestricted-attribute-tokens.rs +++ b/tests/ui/attributes/unrestricted-attribute-tokens.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/used_with_arg_no_mangle.rs b/tests/ui/attributes/used_with_arg_no_mangle.rs index d0bbe76ef3e57..1470e5b691cf4 100644 --- a/tests/ui/attributes/used_with_arg_no_mangle.rs +++ b/tests/ui/attributes/used_with_arg_no_mangle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(used_with_arg)] diff --git a/tests/ui/attributes/variant-attributes.rs b/tests/ui/attributes/variant-attributes.rs index ffcdeb52a042f..57423ad61b219 100644 --- a/tests/ui/attributes/variant-attributes.rs +++ b/tests/ui/attributes/variant-attributes.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we actually print the attributes -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we actually print the attributes +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/z-crate-attr.rs b/tests/ui/attributes/z-crate-attr.rs index 1021774fc5f31..119a48d5d6529 100644 --- a/tests/ui/attributes/z-crate-attr.rs +++ b/tests/ui/attributes/z-crate-attr.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // This test checks if an unstable feature is enabled with the -Zcrate-attr=feature(foo) flag. If // the exact feature used here is causing problems feel free to replace it with another // perma-unstable feature. -// compile-flags: -Zcrate-attr=feature(abi_unadjusted) +//@ compile-flags: -Zcrate-attr=feature(abi_unadjusted) #![allow(dead_code)] diff --git a/tests/ui/attrs-resolution.rs b/tests/ui/attrs-resolution.rs index 6809773237d2c..38dd3812d6892 100644 --- a/tests/ui/attrs-resolution.rs +++ b/tests/ui/attrs-resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum FooEnum { #[rustfmt::skip] diff --git a/tests/ui/augmented-assignments-feature-gate-cross.rs b/tests/ui/augmented-assignments-feature-gate-cross.rs index 84988feb6f574..d402d20061779 100644 --- a/tests/ui/augmented-assignments-feature-gate-cross.rs +++ b/tests/ui/augmented-assignments-feature-gate-cross.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:augmented_assignments.rs +//@ run-pass +//@ aux-build:augmented_assignments.rs extern crate augmented_assignments; diff --git a/tests/ui/augmented-assignments-rpass.rs b/tests/ui/augmented-assignments-rpass.rs index fb383cc57a693..755ecb466ceb7 100644 --- a/tests/ui/augmented-assignments-rpass.rs +++ b/tests/ui/augmented-assignments-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![deny(unused_assignments)] diff --git a/tests/ui/auto-instantiate.rs b/tests/ui/auto-instantiate.rs index a58b178287fba..73ad5d701e182 100644 --- a/tests/ui/auto-instantiate.rs +++ b/tests/ui/auto-instantiate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] diff --git a/tests/ui/auto-traits/auto-is-contextual.rs b/tests/ui/auto-traits/auto-is-contextual.rs index a2ddd5374c08b..2183a8c110c68 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 +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/auto-traits/auto-trait-projection-recursion.rs b/tests/ui/auto-traits/auto-trait-projection-recursion.rs index a36f26f02e9f4..31dd83ba68832 100644 --- a/tests/ui/auto-traits/auto-trait-projection-recursion.rs +++ b/tests/ui/auto-traits/auto-trait-projection-recursion.rs @@ -11,7 +11,7 @@ // lowest unified region vid. This means we instead have to prove // `Box>>: Send`, which we can because auto traits are coinductive. -// check-pass +//@ check-pass // Avoid a really long error message if this regresses. #![recursion_limit="20"] diff --git a/tests/ui/auto-traits/auto-trait-validation.fixed b/tests/ui/auto-traits/auto-trait-validation.fixed index e37fed9faabae..f65952e00f588 100644 --- a/tests/ui/auto-traits/auto-trait-validation.fixed +++ b/tests/ui/auto-traits/auto-trait-validation.fixed @@ -1,7 +1,7 @@ #![feature(auto_traits)] #![allow(dead_code)] -// run-rustfix +//@ run-rustfix auto trait Generic {} //~^ auto traits cannot have generic parameters [E0567] diff --git a/tests/ui/auto-traits/auto-trait-validation.rs b/tests/ui/auto-traits/auto-trait-validation.rs index e209aa1322081..c83d7426e47ce 100644 --- a/tests/ui/auto-traits/auto-trait-validation.rs +++ b/tests/ui/auto-traits/auto-trait-validation.rs @@ -1,7 +1,7 @@ #![feature(auto_traits)] #![allow(dead_code)] -// run-rustfix +//@ run-rustfix auto trait Generic {} //~^ auto traits cannot have generic parameters [E0567] diff --git a/tests/ui/auto-traits/auto-traits.rs b/tests/ui/auto-traits/auto-traits.rs index 1e0fbcc1fdf63..22b210eb3fabd 100644 --- a/tests/ui/auto-traits/auto-traits.rs +++ b/tests/ui/auto-traits/auto-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_doc_comments)] #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/auto-traits/issue-23080-2.rs b/tests/ui/auto-traits/issue-23080-2.rs index d63cd9d5dd601..2bfddd449b9f7 100644 --- a/tests/ui/auto-traits/issue-23080-2.rs +++ b/tests/ui/auto-traits/issue-23080-2.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/auto-traits/pre-cfg.rs b/tests/ui/auto-traits/pre-cfg.rs index e6e840dcbab6f..e806686f965c3 100644 --- a/tests/ui/auto-traits/pre-cfg.rs +++ b/tests/ui/auto-traits/pre-cfg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] auto trait Foo {} 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 2482e1878f596..47e2072461e88 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 +//@ run-pass trait Foo { fn f(&self); } diff --git a/tests/ui/autoref-autoderef/auto-ref-sliceable.rs b/tests/ui/autoref-autoderef/auto-ref-sliceable.rs index e5f79d7805118..2fa28465bdc33 100644 --- a/tests/ui/autoref-autoderef/auto-ref-sliceable.rs +++ b/tests/ui/autoref-autoderef/auto-ref-sliceable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Pushable { diff --git a/tests/ui/autoref-autoderef/auto-ref.rs b/tests/ui/autoref-autoderef/auto-ref.rs index b77f9c3421353..1109a82b8d580 100644 --- a/tests/ui/autoref-autoderef/auto-ref.rs +++ b/tests/ui/autoref-autoderef/auto-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 874f4228277e1..b44e2a8cd37cb 100644 --- a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs +++ b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { x: isize, diff --git a/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs b/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs index af747cc76e9a0..0d4052f73cf0d 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-priority.rs b/tests/ui/autoref-autoderef/autoderef-method-priority.rs index 88a5140dc752b..dfa048e205842 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-priority.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-priority.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs b/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs index 3657e61d42534..ace078bb1d907 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-twice.rs b/tests/ui/autoref-autoderef/autoderef-method-twice.rs index ed86b31b8bbed..719f660400ee1 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-twice.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-twice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method.rs b/tests/ui/autoref-autoderef/autoderef-method.rs index 5b7965e9553fe..faefdafb4c024 100644 --- a/tests/ui/autoref-autoderef/autoderef-method.rs +++ b/tests/ui/autoref-autoderef/autoderef-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-privacy.rs b/tests/ui/autoref-autoderef/autoderef-privacy.rs index 841be930b774a..d2a217257e5f7 100644 --- a/tests/ui/autoref-autoderef/autoderef-privacy.rs +++ b/tests/ui/autoref-autoderef/autoderef-privacy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check we do not select a private method or field when computing autoderefs #![allow(unused)] diff --git a/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs b/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs index 3bdc248ff0f7f..e3fcb530bee63 100644 --- a/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs +++ b/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn foo(&self) -> String; diff --git a/tests/ui/autoref-autoderef/deref-into-array.rs b/tests/ui/autoref-autoderef/deref-into-array.rs index 855a82d2f9c8f..519ead54de4ac 100644 --- a/tests/ui/autoref-autoderef/deref-into-array.rs +++ b/tests/ui/autoref-autoderef/deref-into-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Test([T; 1]); diff --git a/tests/ui/auxiliary/edition-kw-macro-2015.rs b/tests/ui/auxiliary/edition-kw-macro-2015.rs index 553ba69303a6b..7f479fa93708a 100644 --- a/tests/ui/auxiliary/edition-kw-macro-2015.rs +++ b/tests/ui/auxiliary/edition-kw-macro-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! produces_async { diff --git a/tests/ui/auxiliary/edition-kw-macro-2018.rs b/tests/ui/auxiliary/edition-kw-macro-2018.rs index f1f4ee28093b2..ba8ecc4d83b3f 100644 --- a/tests/ui/auxiliary/edition-kw-macro-2018.rs +++ b/tests/ui/auxiliary/edition-kw-macro-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! produces_async { diff --git a/tests/ui/auxiliary/issue-13560-1.rs b/tests/ui/auxiliary/issue-13560-1.rs index c3a2ae679bf74..baca1567e1b08 100644 --- a/tests/ui/auxiliary/issue-13560-1.rs +++ b/tests/ui/auxiliary/issue-13560-1.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "dylib"] diff --git a/tests/ui/auxiliary/issue-13560-2.rs b/tests/ui/auxiliary/issue-13560-2.rs index 39c261e1162f1..1adaf2b0379d2 100644 --- a/tests/ui/auxiliary/issue-13560-2.rs +++ b/tests/ui/auxiliary/issue-13560-2.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/issue-13560-3.rs b/tests/ui/auxiliary/issue-13560-3.rs index e991bcc1a0242..4aab2ddc73a01 100644 --- a/tests/ui/auxiliary/issue-13560-3.rs +++ b/tests/ui/auxiliary/issue-13560-3.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/issue-76387.rs b/tests/ui/auxiliary/issue-76387.rs index 873d2bedd4d30..d540bceff93e9 100644 --- a/tests/ui/auxiliary/issue-76387.rs +++ b/tests/ui/auxiliary/issue-76387.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 pub struct FatPtr { ptr: *mut u8, diff --git a/tests/ui/auxiliary/msvc-data-only-lib.rs b/tests/ui/auxiliary/msvc-data-only-lib.rs index ccaa6d8edcf9a..b8a8f905e8b54 100644 --- a/tests/ui/auxiliary/msvc-data-only-lib.rs +++ b/tests/ui/auxiliary/msvc-data-only-lib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/rustc-rust-log-aux.rs b/tests/ui/auxiliary/rustc-rust-log-aux.rs index daa8e9f495e06..8080428d56319 100644 --- a/tests/ui/auxiliary/rustc-rust-log-aux.rs +++ b/tests/ui/auxiliary/rustc-rust-log-aux.rs @@ -1 +1 @@ -// rustc-env:RUSTC_LOG=debug +//@ rustc-env:RUSTC_LOG=debug diff --git a/tests/ui/backtrace-apple-no-dsymutil.rs b/tests/ui/backtrace-apple-no-dsymutil.rs index 3844ebcfd30d7..9924cd13b0a79 100644 --- a/tests/ui/backtrace-apple-no-dsymutil.rs +++ b/tests/ui/backtrace-apple-no-dsymutil.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// compile-flags:-Cstrip=none -// compile-flags:-g -Csplit-debuginfo=unpacked -// only-macos +//@ compile-flags:-Cstrip=none +//@ compile-flags:-g -Csplit-debuginfo=unpacked +//@ only-macos use std::process::Command; use std::str; diff --git a/tests/ui/backtrace.rs b/tests/ui/backtrace.rs index 84be333beffe3..5c138b75de736 100644 --- a/tests/ui/backtrace.rs +++ b/tests/ui/backtrace.rs @@ -1,12 +1,12 @@ -// run-pass -// ignore-android FIXME #17520 -// ignore-emscripten spawning processes is not supported -// ignore-openbsd no support for libbacktrace without filename -// ignore-sgx no processes -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-fuchsia Backtraces not symbolized -// compile-flags:-g -// compile-flags:-Cstrip=none +//@ run-pass +//@ ignore-android FIXME #17520 +//@ ignore-emscripten spawning processes is not supported +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-sgx no processes +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-fuchsia Backtraces not symbolized +//@ compile-flags:-g +//@ compile-flags:-Cstrip=none use std::env; use std::process::{Command, Stdio}; diff --git a/tests/ui/bare-fn-implements-fn-mut.rs b/tests/ui/bare-fn-implements-fn-mut.rs index d6ecd6b654bf7..49b31f28f8a0a 100644 --- a/tests/ui/bare-fn-implements-fn-mut.rs +++ b/tests/ui/bare-fn-implements-fn-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_f(mut f: F) { f(); diff --git a/tests/ui/bare-static-string.rs b/tests/ui/bare-static-string.rs index d336dc7c6a083..b71cf38cfe819 100644 --- a/tests/ui/bare-static-string.rs +++ b/tests/ui/bare-static-string.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: &'static str = "foo"; diff --git a/tests/ui/bench/issue-32062.rs b/tests/ui/bench/issue-32062.rs index 99b8b7c6012c5..84de427a20063 100644 --- a/tests/ui/bench/issue-32062.rs +++ b/tests/ui/bench/issue-32062.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let _ = test(Some(0).into_iter()); diff --git a/tests/ui/big-literals.rs b/tests/ui/big-literals.rs index 96ea115c877f0..d2f447a595c99 100644 --- a/tests/ui/big-literals.rs +++ b/tests/ui/big-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Catch mistakes in the overflowing literals lint. #![deny(overflowing_literals)] diff --git a/tests/ui/bind-by-move.rs b/tests/ui/bind-by-move.rs index f0a9ebdd08c4d..99f3536e533fb 100644 --- a/tests/ui/bind-by-move.rs +++ b/tests/ui/bind-by-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; fn dispose(_x: Arc) { } diff --git a/tests/ui/binding/bind-field-short-with-modifiers.rs b/tests/ui/binding/bind-field-short-with-modifiers.rs index b271f84e9ce65..1edccf0f03721 100644 --- a/tests/ui/binding/bind-field-short-with-modifiers.rs +++ b/tests/ui/binding/bind-field-short-with-modifiers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/binding/borrowed-ptr-pattern-2.rs b/tests/ui/binding/borrowed-ptr-pattern-2.rs index 40df85b1479b4..ba80cc49477b7 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-2.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(s: &String) -> bool { match &**s { diff --git a/tests/ui/binding/borrowed-ptr-pattern-3.rs b/tests/ui/binding/borrowed-ptr-pattern-3.rs index f2607eee8158d..2e3680b76c862 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-3.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo<'r>(s: &'r usize) -> bool { match s { diff --git a/tests/ui/binding/borrowed-ptr-pattern-infallible.rs b/tests/ui/binding/borrowed-ptr-pattern-infallible.rs index 1bbc03e19bafa..d41e9a343a5f0 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-infallible.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-infallible.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/binding/borrowed-ptr-pattern-option.rs b/tests/ui/binding/borrowed-ptr-pattern-option.rs index 319b8631e8dde..33fd282d83204 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-option.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn select<'r>(x: &'r Option, y: &'r Option) -> &'r Option { match (x, y) { diff --git a/tests/ui/binding/borrowed-ptr-pattern.rs b/tests/ui/binding/borrowed-ptr-pattern.rs index d5f94ab54e30f..0cdd2754e130c 100644 --- a/tests/ui/binding/borrowed-ptr-pattern.rs +++ b/tests/ui/binding/borrowed-ptr-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &T) -> T{ match x { diff --git a/tests/ui/binding/empty-types-in-patterns.rs b/tests/ui/binding/empty-types-in-patterns.rs index 0d0dbcaf40f43..48a8c4197241e 100644 --- a/tests/ui/binding/empty-types-in-patterns.rs +++ b/tests/ui/binding/empty-types-in-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type, never_type_fallback)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/binding/exhaustive-bool-match-sanity.rs b/tests/ui/binding/exhaustive-bool-match-sanity.rs index f83def2106016..9bdab3ad02c86 100644 --- a/tests/ui/binding/exhaustive-bool-match-sanity.rs +++ b/tests/ui/binding/exhaustive-bool-match-sanity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #33540 // We previously used to generate a 3-armed boolean `SwitchInt` in the // MIR of the function `foo` below. #33583 changed rustc to diff --git a/tests/ui/binding/expr-match-generic-unique1.rs b/tests/ui/binding/expr-match-generic-unique1.rs index c5f38d815593a..e4c984ec6edda 100644 --- a/tests/ui/binding/expr-match-generic-unique1.rs +++ b/tests/ui/binding/expr-match-generic-unique1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: Box, eq: F) where F: FnOnce(Box, Box) -> bool { let actual: Box = match true { diff --git a/tests/ui/binding/expr-match-generic-unique2.rs b/tests/ui/binding/expr-match-generic-unique2.rs index 8977ca68efa67..51aa22d1f3060 100644 --- a/tests/ui/binding/expr-match-generic-unique2.rs +++ b/tests/ui/binding/expr-match-generic-unique2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { let actual: T = match true { diff --git a/tests/ui/binding/expr-match-generic.rs b/tests/ui/binding/expr-match-generic.rs index 530fc676f7ceb..975eec42fd054 100644 --- a/tests/ui/binding/expr-match-generic.rs +++ b/tests/ui/binding/expr-match-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] type compare = extern "Rust" fn(T, T) -> bool; diff --git a/tests/ui/binding/expr-match-panic-all.rs b/tests/ui/binding/expr-match-panic-all.rs index ac31b49a1e99e..928f4d012b452 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 +//@ run-pass diff --git a/tests/ui/binding/expr-match-panic.rs b/tests/ui/binding/expr-match-panic.rs index 4b6b6e072c096..b3adc80cb8e19 100644 --- a/tests/ui/binding/expr-match-panic.rs +++ b/tests/ui/binding/expr-match-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_simple() { diff --git a/tests/ui/binding/expr-match-unique.rs b/tests/ui/binding/expr-match-unique.rs index eec9e1f8b4ae1..e22841e76f393 100644 --- a/tests/ui/binding/expr-match-unique.rs +++ b/tests/ui/binding/expr-match-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for match as expressions resulting in boxed types fn test_box() { diff --git a/tests/ui/binding/expr-match.rs b/tests/ui/binding/expr-match.rs index 575b38fbc951e..049beaaf51bf6 100644 --- a/tests/ui/binding/expr-match.rs +++ b/tests/ui/binding/expr-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/binding/fat-arrow-match.rs b/tests/ui/binding/fat-arrow-match.rs index aaf5be8cf748d..d9a75c62096dc 100644 --- a/tests/ui/binding/fat-arrow-match.rs +++ b/tests/ui/binding/fat-arrow-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs b/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs index 0450fe8abbd14..1c74a6a43b8b8 100644 --- a/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs +++ b/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Check that partially moved from function parameters are dropped after the // named bindings that move from them. diff --git a/tests/ui/binding/fn-pattern-expected-type-2.rs b/tests/ui/binding/fn-pattern-expected-type-2.rs index 130ff3d4465e4..33e4d54f55795 100644 --- a/tests/ui/binding/fn-pattern-expected-type-2.rs +++ b/tests/ui/binding/fn-pattern-expected-type-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let v : &[(isize,isize)] = &[ (1, 2), (3, 4), (5, 6) ]; for &(x, y) in v { diff --git a/tests/ui/binding/fn-pattern-expected-type.rs b/tests/ui/binding/fn-pattern-expected-type.rs index faeb764963694..ca61fa536dc95 100644 --- a/tests/ui/binding/fn-pattern-expected-type.rs +++ b/tests/ui/binding/fn-pattern-expected-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let f = |(x, y): (isize, isize)| { diff --git a/tests/ui/binding/func-arg-incomplete-pattern.rs b/tests/ui/binding/func-arg-incomplete-pattern.rs index eb94ee48f9249..010310fed8c89 100644 --- a/tests/ui/binding/func-arg-incomplete-pattern.rs +++ b/tests/ui/binding/func-arg-incomplete-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we do not leak when the arg pattern must drop part of the // argument (in this case, the `y` field). diff --git a/tests/ui/binding/func-arg-ref-pattern.rs b/tests/ui/binding/func-arg-ref-pattern.rs index 2d75c12140bf3..56634544bc9e2 100644 --- a/tests/ui/binding/func-arg-ref-pattern.rs +++ b/tests/ui/binding/func-arg-ref-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test argument patterns where we create refs to the inside of // boxes. Make sure that we don't free the box as we match the diff --git a/tests/ui/binding/func-arg-wild-pattern.rs b/tests/ui/binding/func-arg-wild-pattern.rs index bcd82c679a57e..35cc9463aea22 100644 --- a/tests/ui/binding/func-arg-wild-pattern.rs +++ b/tests/ui/binding/func-arg-wild-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can compile code that uses a `_` in function argument // patterns. diff --git a/tests/ui/binding/if-let.rs b/tests/ui/binding/if-let.rs index 28d57e92c3731..495d5ce949588 100644 --- a/tests/ui/binding/if-let.rs +++ b/tests/ui/binding/if-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/binding/inconsistent-lifetime-mismatch.rs b/tests/ui/binding/inconsistent-lifetime-mismatch.rs index 87768c28cf4a1..b45c72cd9bdc8 100644 --- a/tests/ui/binding/inconsistent-lifetime-mismatch.rs +++ b/tests/ui/binding/inconsistent-lifetime-mismatch.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_: &[&str]) {} diff --git a/tests/ui/binding/inferred-suffix-in-pattern-range.rs b/tests/ui/binding/inferred-suffix-in-pattern-range.rs index 079cc0a16db99..0cffc35f34441 100644 --- a/tests/ui/binding/inferred-suffix-in-pattern-range.rs +++ b/tests/ui/binding/inferred-suffix-in-pattern-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 2; diff --git a/tests/ui/binding/irrefutable-if-let-without-else.fixed b/tests/ui/binding/irrefutable-if-let-without-else.fixed index 3d7f4695ca864..0485119522b6a 100644 --- a/tests/ui/binding/irrefutable-if-let-without-else.fixed +++ b/tests/ui/binding/irrefutable-if-let-without-else.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum Enum { Variant(i32), } diff --git a/tests/ui/binding/irrefutable-if-let-without-else.rs b/tests/ui/binding/irrefutable-if-let-without-else.rs index 5aaf4ace3f821..a970cf1980a14 100644 --- a/tests/ui/binding/irrefutable-if-let-without-else.rs +++ b/tests/ui/binding/irrefutable-if-let-without-else.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum Enum { Variant(i32), } diff --git a/tests/ui/binding/irrefutable-slice-patterns.rs b/tests/ui/binding/irrefutable-slice-patterns.rs index 048e1e5e9b4b6..b8b5844e1fab5 100644 --- a/tests/ui/binding/irrefutable-slice-patterns.rs +++ b/tests/ui/binding/irrefutable-slice-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #47096. diff --git a/tests/ui/binding/issue-53114-borrow-checks.rs b/tests/ui/binding/issue-53114-borrow-checks.rs index 6ab1f4f47dfb3..032106647e0cb 100644 --- a/tests/ui/binding/issue-53114-borrow-checks.rs +++ b/tests/ui/binding/issue-53114-borrow-checks.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Issue #53114: NLL's borrow check had some deviations from the old borrow // checker, and both had some deviations from our ideal state. This test // captures the behavior of how `_` bindings are handled with respect to how we diff --git a/tests/ui/binding/let-assignability.rs b/tests/ui/binding/let-assignability.rs index b85f4a96a6d50..dab71253364ee 100644 --- a/tests/ui/binding/let-assignability.rs +++ b/tests/ui/binding/let-assignability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() { let a: Box<_> = Box::new(1); diff --git a/tests/ui/binding/let-destruct-ref.rs b/tests/ui/binding/let-destruct-ref.rs index 28d7294ebc882..824ac6f5f0242 100644 --- a/tests/ui/binding/let-destruct-ref.rs +++ b/tests/ui/binding/let-destruct-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 3_usize; diff --git a/tests/ui/binding/let-var-hygiene.rs b/tests/ui/binding/let-var-hygiene.rs index 571207bd7d6f6..ef080c5ff4fb7 100644 --- a/tests/ui/binding/let-var-hygiene.rs +++ b/tests/ui/binding/let-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex: macro_rules! bad_macro { diff --git a/tests/ui/binding/match-arm-statics.rs b/tests/ui/binding/match-arm-statics.rs index 5f7e357eeb2a9..21d0aac260de1 100644 --- a/tests/ui/binding/match-arm-statics.rs +++ b/tests/ui/binding/match-arm-statics.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -g +//@ compile-flags: -g #[derive(PartialEq, Eq)] struct NewBool(bool); diff --git a/tests/ui/binding/match-beginning-vert.rs b/tests/ui/binding/match-beginning-vert.rs index 93c08f0b710a2..ac07181e06330 100644 --- a/tests/ui/binding/match-beginning-vert.rs +++ b/tests/ui/binding/match-beginning-vert.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard)] diff --git a/tests/ui/binding/match-borrowed_str.rs b/tests/ui/binding/match-borrowed_str.rs index 22782032ebfc0..440f2a002dea8 100644 --- a/tests/ui/binding/match-borrowed_str.rs +++ b/tests/ui/binding/match-borrowed_str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f1(ref_string: &str) -> String { match ref_string { diff --git a/tests/ui/binding/match-bot-2.rs b/tests/ui/binding/match-bot-2.rs index 95b3406f0b579..014247417a6d9 100644 --- a/tests/ui/binding/match-bot-2.rs +++ b/tests/ui/binding/match-bot-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // n.b. This was only ever failing with optimization disabled. diff --git a/tests/ui/binding/match-bot.rs b/tests/ui/binding/match-bot.rs index 5c4472c7aea67..4a5b7f1315f6c 100644 --- a/tests/ui/binding/match-bot.rs +++ b/tests/ui/binding/match-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: isize = diff --git a/tests/ui/binding/match-byte-array-patterns.rs b/tests/ui/binding/match-byte-array-patterns.rs index f0c988c01c2b8..f66feb4300b8b 100644 --- a/tests/ui/binding/match-byte-array-patterns.rs +++ b/tests/ui/binding/match-byte-array-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let buf = &[0u8; 4]; diff --git a/tests/ui/binding/match-enum-struct-0.rs b/tests/ui/binding/match-enum-struct-0.rs index e2623ece84ca5..6885cffadc912 100644 --- a/tests/ui/binding/match-enum-struct-0.rs +++ b/tests/ui/binding/match-enum-struct-0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // regression test for issue #5625 diff --git a/tests/ui/binding/match-enum-struct-1.rs b/tests/ui/binding/match-enum-struct-1.rs index f035432ec99b8..5780134690563 100644 --- a/tests/ui/binding/match-enum-struct-1.rs +++ b/tests/ui/binding/match-enum-struct-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/binding/match-implicit-copy-unique.rs b/tests/ui/binding/match-implicit-copy-unique.rs index 74ffe2ecdb3a5..ab3b018e759a5 100644 --- a/tests/ui/binding/match-implicit-copy-unique.rs +++ b/tests/ui/binding/match-implicit-copy-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Pair { a: Box, b: Box } diff --git a/tests/ui/binding/match-in-macro.rs b/tests/ui/binding/match-in-macro.rs index 0840cc4404da6..1f4521f568e22 100644 --- a/tests/ui/binding/match-in-macro.rs +++ b/tests/ui/binding/match-in-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { B { b1: isize, bb1: isize}, diff --git a/tests/ui/binding/match-join.rs b/tests/ui/binding/match-join.rs index 60f2a4584899a..06ac261ec10b0 100644 --- a/tests/ui/binding/match-join.rs +++ b/tests/ui/binding/match-join.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] fn foo(y: Option) { let mut x: isize; diff --git a/tests/ui/binding/match-larger-const.rs b/tests/ui/binding/match-larger-const.rs index 6f9a353207fed..4d9e587fdce40 100644 --- a/tests/ui/binding/match-larger-const.rs +++ b/tests/ui/binding/match-larger-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 c23ff8c949580..c6557cc10d669 100644 --- a/tests/ui/binding/match-naked-record-expr.rs +++ b/tests/ui/binding/match-naked-record-expr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct X { x: isize } diff --git a/tests/ui/binding/match-naked-record.rs b/tests/ui/binding/match-naked-record.rs index f7479152ebcac..24d7aec00e7b8 100644 --- a/tests/ui/binding/match-naked-record.rs +++ b/tests/ui/binding/match-naked-record.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct X { x: isize } diff --git a/tests/ui/binding/match-path.rs b/tests/ui/binding/match-path.rs index 286214eb8ace8..9bcef9914d152 100644 --- a/tests/ui/binding/match-path.rs +++ b/tests/ui/binding/match-path.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m1 { pub enum foo { foo1, foo2, } diff --git a/tests/ui/binding/match-pattern-bindings.rs b/tests/ui/binding/match-pattern-bindings.rs index 4ec533677d6c4..f9cdaacbe3eb8 100644 --- a/tests/ui/binding/match-pattern-bindings.rs +++ b/tests/ui/binding/match-pattern-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let value = Some(1); diff --git a/tests/ui/binding/match-pattern-lit.rs b/tests/ui/binding/match-pattern-lit.rs index c9c6135e2e661..2c453594905cf 100644 --- a/tests/ui/binding/match-pattern-lit.rs +++ b/tests/ui/binding/match-pattern-lit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn altlit(f: isize) -> isize { diff --git a/tests/ui/binding/match-pattern-no-type-params.rs b/tests/ui/binding/match-pattern-no-type-params.rs index 1fc7ddda023f6..f4fb3e46e92fd 100644 --- a/tests/ui/binding/match-pattern-no-type-params.rs +++ b/tests/ui/binding/match-pattern-no-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 3f56cd4796d87..2e43b702fae94 100644 --- a/tests/ui/binding/match-pattern-simple.rs +++ b/tests/ui/binding/match-pattern-simple.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn altsimple(f: isize) { match f { _x => () } } diff --git a/tests/ui/binding/match-phi.rs b/tests/ui/binding/match-phi.rs index 92a3f6e0f7f60..cfef03adaa47a 100644 --- a/tests/ui/binding/match-phi.rs +++ b/tests/ui/binding/match-phi.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] #![allow(unused_variables)] diff --git a/tests/ui/binding/match-pipe-binding.rs b/tests/ui/binding/match-pipe-binding.rs index 7d4a7c708ddd7..616de521ed5c8 100644 --- a/tests/ui/binding/match-pipe-binding.rs +++ b/tests/ui/binding/match-pipe-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1() { // from issue 6338 diff --git a/tests/ui/binding/match-range-infer.rs b/tests/ui/binding/match-range-infer.rs index 19d1cb89d4a35..aebfa0376516d 100644 --- a/tests/ui/binding/match-range-infer.rs +++ b/tests/ui/binding/match-range-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that type inference for range patterns works correctly (is bi-directional). pub fn main() { diff --git a/tests/ui/binding/match-range-static.rs b/tests/ui/binding/match-range-static.rs index f01a3505ee618..478dfb3cf4149 100644 --- a/tests/ui/binding/match-range-static.rs +++ b/tests/ui/binding/match-range-static.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] const s: isize = 1; diff --git a/tests/ui/binding/match-range.rs b/tests/ui/binding/match-range.rs index cb7b93e7cc65f..a024e5e585ae7 100644 --- a/tests/ui/binding/match-range.rs +++ b/tests/ui/binding/match-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(exclusive_range_pattern)] pub fn main() { diff --git a/tests/ui/binding/match-reassign.rs b/tests/ui/binding/match-reassign.rs index 19b48579cb43e..bf4fb45ed9288 100644 --- a/tests/ui/binding/match-reassign.rs +++ b/tests/ui/binding/match-reassign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #23698: The reassignment checker only cared // about the last assignment in a match arm body diff --git a/tests/ui/binding/match-ref-binding-in-guard-3256.rs b/tests/ui/binding/match-ref-binding-in-guard-3256.rs index 9075a34d41089..52e2745f2d6e1 100644 --- a/tests/ui/binding/match-ref-binding-in-guard-3256.rs +++ b/tests/ui/binding/match-ref-binding-in-guard-3256.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Mutex; diff --git a/tests/ui/binding/match-ref-binding-mut-option.rs b/tests/ui/binding/match-ref-binding-mut-option.rs index c25639b7213be..f500e05c572aa 100644 --- a/tests/ui/binding/match-ref-binding-mut-option.rs +++ b/tests/ui/binding/match-ref-binding-mut-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut v = Some(22); diff --git a/tests/ui/binding/match-ref-binding-mut.rs b/tests/ui/binding/match-ref-binding-mut.rs index d7afd61bc8e32..ab48148083260 100644 --- a/tests/ui/binding/match-ref-binding-mut.rs +++ b/tests/ui/binding/match-ref-binding-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Rec { diff --git a/tests/ui/binding/match-ref-binding.rs b/tests/ui/binding/match-ref-binding.rs index ac6a07eabe1c8..d211c455e1639 100644 --- a/tests/ui/binding/match-ref-binding.rs +++ b/tests/ui/binding/match-ref-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn destructure(x: Option) -> isize { match x { diff --git a/tests/ui/binding/match-ref-unsized.rs b/tests/ui/binding/match-ref-unsized.rs index 53784ebb9fcfc..204308dc9ec95 100644 --- a/tests/ui/binding/match-ref-unsized.rs +++ b/tests/ui/binding/match-ref-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Binding unsized expressions to ref patterns pub fn main() { diff --git a/tests/ui/binding/match-str.rs b/tests/ui/binding/match-str.rs index 0ee18ea18de25..0444f487b115c 100644 --- a/tests/ui/binding/match-str.rs +++ b/tests/ui/binding/match-str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #53 #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-struct-0.rs b/tests/ui/binding/match-struct-0.rs index c49f3ed617836..8f7dbbd9a0842 100644 --- a/tests/ui/binding/match-struct-0.rs +++ b/tests/ui/binding/match-struct-0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo{ f : isize, diff --git a/tests/ui/binding/match-tag.rs b/tests/ui/binding/match-tag.rs index 6914a1c6b6d12..c2dfbbddde47f 100644 --- a/tests/ui/binding/match-tag.rs +++ b/tests/ui/binding/match-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-unique-bind.rs b/tests/ui/binding/match-unique-bind.rs index 507478983f681..02f1945f5718f 100644 --- a/tests/ui/binding/match-unique-bind.rs +++ b/tests/ui/binding/match-unique-bind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] pub fn main() { diff --git a/tests/ui/binding/match-unsized.rs b/tests/ui/binding/match-unsized.rs index 41937a557ef72..95019a6f22273 100644 --- a/tests/ui/binding/match-unsized.rs +++ b/tests/ui/binding/match-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let data: &'static str = "Hello, World!"; match data { 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 0d750da79e71c..a1f939cadca4e 100644 --- a/tests/ui/binding/match-value-binding-in-guard-3291.rs +++ b/tests/ui/binding/match-value-binding-in-guard-3291.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(x: Option>, b: bool) -> isize { match x { diff --git a/tests/ui/binding/match-var-hygiene.rs b/tests/ui/binding/match-var-hygiene.rs index 43740bbcf1d55..b076082a5f413 100644 --- a/tests/ui/binding/match-var-hygiene.rs +++ b/tests/ui/binding/match-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex. macro_rules! bad_macro { ($ex:expr) => ( {match 9 {_x => $ex}} diff --git a/tests/ui/binding/match-vec-alternatives.rs b/tests/ui/binding/match-vec-alternatives.rs index af95eb95df04c..83e3d9bd5da74 100644 --- a/tests/ui/binding/match-vec-alternatives.rs +++ b/tests/ui/binding/match-vec-alternatives.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str { match (l1, l2) { diff --git a/tests/ui/binding/match-vec-rvalue.rs b/tests/ui/binding/match-vec-rvalue.rs index fead2254c75ce..f21cc37a35bda 100644 --- a/tests/ui/binding/match-vec-rvalue.rs +++ b/tests/ui/binding/match-vec-rvalue.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that matching rvalues with drops does not crash. diff --git a/tests/ui/binding/match-with-ret-arm.rs b/tests/ui/binding/match-with-ret-arm.rs index 58a9096412155..d5e1a973ad195 100644 --- a/tests/ui/binding/match-with-ret-arm.rs +++ b/tests/ui/binding/match-with-ret-arm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // sometimes we have had trouble finding // the right type for f, as we unified diff --git a/tests/ui/binding/multi-let.rs b/tests/ui/binding/multi-let.rs index 064d32a708424..7f8671a5a6589 100644 --- a/tests/ui/binding/multi-let.rs +++ b/tests/ui/binding/multi-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 10; diff --git a/tests/ui/binding/mut-in-ident-patterns.rs b/tests/ui/binding/mut-in-ident-patterns.rs index 1d1dd660e51e4..40b7e5b73986c 100644 --- a/tests/ui/binding/mut-in-ident-patterns.rs +++ b/tests/ui/binding/mut-in-ident-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/nested-matchs.rs b/tests/ui/binding/nested-matchs.rs index 29490fd48887b..03e688ec50ef5 100644 --- a/tests/ui/binding/nested-matchs.rs +++ b/tests/ui/binding/nested-matchs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // under NLL we get warning about `bar` below fn baz() -> ! { panic!(); } diff --git a/tests/ui/binding/nested-pattern.rs b/tests/ui/binding/nested-pattern.rs index 7d14c9ad9b730..c4b5824fb0a38 100644 --- a/tests/ui/binding/nested-pattern.rs +++ b/tests/ui/binding/nested-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/nil-pattern.rs b/tests/ui/binding/nil-pattern.rs index 268af351d0879..757d701c15a7f 100644 --- a/tests/ui/binding/nil-pattern.rs +++ b/tests/ui/binding/nil-pattern.rs @@ -1,4 +1,4 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = (); match x { () => { } } } diff --git a/tests/ui/binding/nullary-or-pattern.rs b/tests/ui/binding/nullary-or-pattern.rs index 7a3d9d60edaa8..7cd3b6ac08fc5 100644 --- a/tests/ui/binding/nullary-or-pattern.rs +++ b/tests/ui/binding/nullary-or-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum blah { a, b, } diff --git a/tests/ui/binding/optional_comma_in_match_arm.rs b/tests/ui/binding/optional_comma_in_match_arm.rs index 71e2f07bb6b0b..16fc72bbac0c0 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 +//@ run-pass #![allow(unused_unsafe)] #![allow(while_true)] diff --git a/tests/ui/binding/or-pattern.rs b/tests/ui/binding/or-pattern.rs index 07559e414dcf5..943b2cae25342 100644 --- a/tests/ui/binding/or-pattern.rs +++ b/tests/ui/binding/or-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum blah { a(isize, isize, #[allow(dead_code)] usize), b(isize, isize), c, } diff --git a/tests/ui/binding/order-drop-with-match.rs b/tests/ui/binding/order-drop-with-match.rs index f50632ede9f7d..c12c5e4c62779 100644 --- a/tests/ui/binding/order-drop-with-match.rs +++ b/tests/ui/binding/order-drop-with-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test to make sure the destructors run in the right order. // Each destructor sets it's tag in the corresponding entry diff --git a/tests/ui/binding/pat-ranges.rs b/tests/ui/binding/pat-ranges.rs index 19b3045784f86..7d43b8b5cfba7 100644 --- a/tests/ui/binding/pat-ranges.rs +++ b/tests/ui/binding/pat-ranges.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Parsing of range patterns #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/binding/pat-tuple-1.rs b/tests/ui/binding/pat-tuple-1.rs index b09d4a22df059..dc2d0496f428a 100644 --- a/tests/ui/binding/pat-tuple-1.rs +++ b/tests/ui/binding/pat-tuple-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); match x { diff --git a/tests/ui/binding/pat-tuple-2.rs b/tests/ui/binding/pat-tuple-2.rs index 810fd26413937..71dc29ada10ff 100644 --- a/tests/ui/binding/pat-tuple-2.rs +++ b/tests/ui/binding/pat-tuple-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1,); match x { diff --git a/tests/ui/binding/pat-tuple-3.rs b/tests/ui/binding/pat-tuple-3.rs index 9bec898611e4d..839e3bb3bdd15 100644 --- a/tests/ui/binding/pat-tuple-3.rs +++ b/tests/ui/binding/pat-tuple-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); let branch = match x { diff --git a/tests/ui/binding/pat-tuple-4.rs b/tests/ui/binding/pat-tuple-4.rs index 71a5485026868..f1193568520d1 100644 --- a/tests/ui/binding/pat-tuple-4.rs +++ b/tests/ui/binding/pat-tuple-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); match x { diff --git a/tests/ui/binding/pat-tuple-5.rs b/tests/ui/binding/pat-tuple-5.rs index c8cdd37dd856e..928fc743417f2 100644 --- a/tests/ui/binding/pat-tuple-5.rs +++ b/tests/ui/binding/pat-tuple-5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { struct S; struct Z; diff --git a/tests/ui/binding/pat-tuple-6.rs b/tests/ui/binding/pat-tuple-6.rs index 877f0e4140e29..7c47e836275a8 100644 --- a/tests/ui/binding/pat-tuple-6.rs +++ b/tests/ui/binding/pat-tuple-6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3, 4, 5); match x { diff --git a/tests/ui/binding/pat-tuple-7.rs b/tests/ui/binding/pat-tuple-7.rs index 7835e2c352fad..ad2bb7715afcb 100644 --- a/tests/ui/binding/pat-tuple-7.rs +++ b/tests/ui/binding/pat-tuple-7.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { #[allow(unused_parens)] diff --git a/tests/ui/binding/pattern-bound-var-in-for-each.rs b/tests/ui/binding/pattern-bound-var-in-for-each.rs index 3f725cddc5b33..0932e9d195929 100644 --- a/tests/ui/binding/pattern-bound-var-in-for-each.rs +++ b/tests/ui/binding/pattern-bound-var-in-for-each.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that codegen_path checks whether a // pattern-bound var is an upvar (when codegenning // the for-each body) diff --git a/tests/ui/binding/pattern-in-closure.rs b/tests/ui/binding/pattern-in-closure.rs index 3ac8d57681ac6..928c179a8b3c8 100644 --- a/tests/ui/binding/pattern-in-closure.rs +++ b/tests/ui/binding/pattern-in-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Foo { diff --git a/tests/ui/binding/range-inclusive-pattern-precedence.rs b/tests/ui/binding/range-inclusive-pattern-precedence.rs index 858239bb177c9..378ea00ee6917 100644 --- a/tests/ui/binding/range-inclusive-pattern-precedence.rs +++ b/tests/ui/binding/range-inclusive-pattern-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] const VALUE: usize = 21; diff --git a/tests/ui/binding/shadow.rs b/tests/ui/binding/shadow.rs index 2495c8f47e7e0..d13737cdc1303 100644 --- a/tests/ui/binding/shadow.rs +++ b/tests/ui/binding/shadow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/binding/simple-generic-match.rs b/tests/ui/binding/simple-generic-match.rs index acac32b8231b8..910bab03e1f53 100644 --- a/tests/ui/binding/simple-generic-match.rs +++ b/tests/ui/binding/simple-generic-match.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(#[allow(dead_code)] T), } diff --git a/tests/ui/binding/use-uninit-match.rs b/tests/ui/binding/use-uninit-match.rs index 9250dbf0c43b4..de55334ffc87a 100644 --- a/tests/ui/binding/use-uninit-match.rs +++ b/tests/ui/binding/use-uninit-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/use-uninit-match2.rs b/tests/ui/binding/use-uninit-match2.rs index 9102730629b98..48fe449c5b3e9 100644 --- a/tests/ui/binding/use-uninit-match2.rs +++ b/tests/ui/binding/use-uninit-match2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/zero_sized_subslice_match.rs b/tests/ui/binding/zero_sized_subslice_match.rs index 187c2983633e7..6da9f9593b44f 100644 --- a/tests/ui/binding/zero_sized_subslice_match.rs +++ b/tests/ui/binding/zero_sized_subslice_match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = [(), ()]; diff --git a/tests/ui/binop/binary-minus-without-space.rs b/tests/ui/binop/binary-minus-without-space.rs index 2fbd5300dd1a9..c80c0c88fcbc4 100644 --- a/tests/ui/binop/binary-minus-without-space.rs +++ b/tests/ui/binop/binary-minus-without-space.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that issue #954 stays fixed diff --git a/tests/ui/binop/binary-op-on-double-ref.fixed b/tests/ui/binop/binary-op-on-double-ref.fixed index 586d2568c306f..c471c20b0a0fe 100644 --- a/tests/ui/binop/binary-op-on-double-ref.fixed +++ b/tests/ui/binop/binary-op-on-double-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9]; let vr = v.iter().filter(|x| { diff --git a/tests/ui/binop/binary-op-on-double-ref.rs b/tests/ui/binop/binary-op-on-double-ref.rs index 48ee445466e35..18b5906120a6d 100644 --- a/tests/ui/binop/binary-op-on-double-ref.rs +++ b/tests/ui/binop/binary-op-on-double-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9]; let vr = v.iter().filter(|x| { 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 8e20640b58d94..a5ec63587f96e 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 +//@ run-pass // Tests equality between supertype and subtype of a function // See the issue #91636 fn foo(_a: &str) {} diff --git a/tests/ui/binop/binop-bitxor-str.rs b/tests/ui/binop/binop-bitxor-str.rs index 3085cce3f3ef7..d59e46167fe03 100644 --- a/tests/ui/binop/binop-bitxor-str.rs +++ b/tests/ui/binop/binop-bitxor-str.rs @@ -1,3 +1,3 @@ -// error-pattern:no implementation for `String ^ String` +//@ error-pattern:no implementation for `String ^ String` fn main() { let x = "a".to_string() ^ "b".to_string(); } diff --git a/tests/ui/binop/binop-fail-3.rs b/tests/ui/binop/binop-fail-3.rs index 49f635e0c11d6..b1e70a1c5961c 100644 --- a/tests/ui/binop/binop-fail-3.rs +++ b/tests/ui/binop/binop-fail-3.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn foo() -> ! { panic!("quux"); diff --git a/tests/ui/binop/binop-mul-bool.rs b/tests/ui/binop/binop-mul-bool.rs index 41494c7a017ed..0b4ed21a12d00 100644 --- a/tests/ui/binop/binop-mul-bool.rs +++ b/tests/ui/binop/binop-mul-bool.rs @@ -1,3 +1,3 @@ -// error-pattern:cannot multiply `bool` by `bool` +//@ error-pattern:cannot multiply `bool` by `bool` fn main() { let x = true * false; } diff --git a/tests/ui/binop/binop-panic.rs b/tests/ui/binop/binop-panic.rs index 44cdfffeeb7a7..8dbf62a922e45 100644 --- a/tests/ui/binop/binop-panic.rs +++ b/tests/ui/binop/binop-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/binop/binops-issue-22743.rs b/tests/ui/binop/binops-issue-22743.rs index 393ba0a56cbc0..d8f7d94ab41a1 100644 --- a/tests/ui/binop/binops-issue-22743.rs +++ b/tests/ui/binop/binops-issue-22743.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Mul; diff --git a/tests/ui/binop/binops.rs b/tests/ui/binop/binops.rs index a7abf6087b303..0adbb49b14a37 100644 --- a/tests/ui/binop/binops.rs +++ b/tests/ui/binop/binops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Binop corner cases diff --git a/tests/ui/binop/borrow-suggestion-109352.fixed b/tests/ui/binop/borrow-suggestion-109352.fixed index 3374a9d78b2de..1554828915545 100644 --- a/tests/ui/binop/borrow-suggestion-109352.fixed +++ b/tests/ui/binop/borrow-suggestion-109352.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/binop/borrow-suggestion-109352.rs b/tests/ui/binop/borrow-suggestion-109352.rs index 4e8510e0de532..b01b7f04ce928 100644 --- a/tests/ui/binop/borrow-suggestion-109352.rs +++ b/tests/ui/binop/borrow-suggestion-109352.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.fixed b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed index b47372c906486..6ad6aa0ccef08 100644 --- a/tests/ui/binop/false-binop-caused-by-missing-semi.fixed +++ b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() {} fn main() { let mut y = 42; diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.rs b/tests/ui/binop/false-binop-caused-by-missing-semi.rs index 14671de7e5111..39270d767fe25 100644 --- a/tests/ui/binop/false-binop-caused-by-missing-semi.rs +++ b/tests/ui/binop/false-binop-caused-by-missing-semi.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() {} fn main() { let mut y = 42; diff --git a/tests/ui/binop/issue-25916.rs b/tests/ui/binop/issue-25916.rs index 0b4159479651b..c6721fab71051 100644 --- a/tests/ui/binop/issue-25916.rs +++ b/tests/ui/binop/issue-25916.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn main() { diff --git a/tests/ui/binop/operator-multidispatch.rs b/tests/ui/binop/operator-multidispatch.rs index 0d1dcfd8bddb0..5ac4074b79743 100644 --- a/tests/ui/binop/operator-multidispatch.rs +++ b/tests/ui/binop/operator-multidispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can overload the `+` operator for points so that two // points can be added, and a point can be added to an integer. diff --git a/tests/ui/binop/operator-overloading.rs b/tests/ui/binop/operator-overloading.rs index 6b3abcbc76cc2..7f29856194e09 100644 --- a/tests/ui/binop/operator-overloading.rs +++ b/tests/ui/binop/operator-overloading.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::cmp; diff --git a/tests/ui/binop/structured-compare.rs b/tests/ui/binop/structured-compare.rs index 63d30c4da896f..164760cd7a040 100644 --- a/tests/ui/binop/structured-compare.rs +++ b/tests/ui/binop/structured-compare.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/bitwise.rs b/tests/ui/bitwise.rs index f79ff3c6efb69..0779e7f229c2c 100644 --- a/tests/ui/bitwise.rs +++ b/tests/ui/bitwise.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(any(target_pointer_width = "32"))] fn target() { diff --git a/tests/ui/block-result/consider-removing-last-semi.fixed b/tests/ui/block-result/consider-removing-last-semi.fixed index 36a769fe5292a..80d86c80ff0d2 100644 --- a/tests/ui/block-result/consider-removing-last-semi.fixed +++ b/tests/ui/block-result/consider-removing-last-semi.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn f() -> String { //~ ERROR mismatched types 0u8; diff --git a/tests/ui/block-result/consider-removing-last-semi.rs b/tests/ui/block-result/consider-removing-last-semi.rs index b9a7314890290..6d65fb61b32a4 100644 --- a/tests/ui/block-result/consider-removing-last-semi.rs +++ b/tests/ui/block-result/consider-removing-last-semi.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn f() -> String { //~ ERROR mismatched types 0u8; diff --git a/tests/ui/borrow-by-val-method-receiver.rs b/tests/ui/borrow-by-val-method-receiver.rs index 465bef1614d43..aee1108d96d86 100644 --- a/tests/ui/borrow-by-val-method-receiver.rs +++ b/tests/ui/borrow-by-val-method-receiver.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn foo(self); diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds.rs b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs index 3ccdc78e60a0b..3f9246f68fcd3 100644 --- a/tests/ui/borrowck/alias-liveness/escaping-bounds.rs +++ b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that we don't ICE when an alias that has escaping bound vars is // required to be live. This is because the code that allows us to deduce an diff --git a/tests/ui/borrowck/alias-liveness/gat-static.rs b/tests/ui/borrowck/alias-liveness/gat-static.rs index 92153124af932..2fadd200e427b 100644 --- a/tests/ui/borrowck/alias-liveness/gat-static.rs +++ b/tests/ui/borrowck/alias-liveness/gat-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc<'a> diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs index 1f26c7babf210..ca780d5cf26c7 100644 --- a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs +++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs @@ -1,4 +1,4 @@ -// known-bug: #42940 +//@ known-bug: #42940 trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked.rs b/tests/ui/borrowck/alias-liveness/higher-ranked.rs index afd0d3b31e3f3..3af125299829b 100644 --- a/tests/ui/borrowck/alias-liveness/higher-ranked.rs +++ b/tests/ui/borrowck/alias-liveness/higher-ranked.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/opaque-capture.rs b/tests/ui/borrowck/alias-liveness/opaque-capture.rs index f4ca2728bdbed..35b7d04d2ef39 100644 --- a/tests/ui/borrowck/alias-liveness/opaque-capture.rs +++ b/tests/ui/borrowck/alias-liveness/opaque-capture.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that opaques capturing early and late-bound vars correctly mark // regions required to be live using the item bounds. diff --git a/tests/ui/borrowck/alias-liveness/opaque-type-param.rs b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs index a292463b2ac45..e7309b5135f35 100644 --- a/tests/ui/borrowck/alias-liveness/opaque-type-param.rs +++ b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs @@ -1,4 +1,4 @@ -// known-bug: #42940 +//@ known-bug: #42940 trait Trait {} impl Trait for () {} diff --git a/tests/ui/borrowck/alias-liveness/rpit-static.rs b/tests/ui/borrowck/alias-liveness/rpit-static.rs index 45da3edb8780b..98209f5f3b9fd 100644 --- a/tests/ui/borrowck/alias-liveness/rpit-static.rs +++ b/tests/ui/borrowck/alias-liveness/rpit-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/rpitit-static.rs b/tests/ui/borrowck/alias-liveness/rpitit-static.rs index 2cc68d2bf3d81..47f757c35add5 100644 --- a/tests/ui/borrowck/alias-liveness/rpitit-static.rs +++ b/tests/ui/borrowck/alias-liveness/rpitit-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { fn rpitit(&mut self) -> impl Sized + 'static; diff --git a/tests/ui/borrowck/alias-liveness/rtn-static.rs b/tests/ui/borrowck/alias-liveness/rtn-static.rs index 1f136b8b998b2..37f634a8e23cd 100644 --- a/tests/ui/borrowck/alias-liveness/rtn-static.rs +++ b/tests/ui/borrowck/alias-liveness/rtn-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/borrowck/argument_number_mismatch_ice.rs b/tests/ui/borrowck/argument_number_mismatch_ice.rs new file mode 100644 index 0000000000000..67af899fdffa0 --- /dev/null +++ b/tests/ui/borrowck/argument_number_mismatch_ice.rs @@ -0,0 +1,15 @@ +trait Hello { + fn example(val: ()); +} + +struct Test1(i32); + +impl Hello for Test1 { + fn example(&self, input: &i32) { + //~^ ERROR `&self` declaration in the impl, but not in the trait + *input = self.0; + //~^ ERROR cannot assign to `*input`, which is behind a `&` reference + } +} + +fn main() {} diff --git a/tests/ui/borrowck/argument_number_mismatch_ice.stderr b/tests/ui/borrowck/argument_number_mismatch_ice.stderr new file mode 100644 index 0000000000000..2a6a6dbc64c71 --- /dev/null +++ b/tests/ui/borrowck/argument_number_mismatch_ice.stderr @@ -0,0 +1,19 @@ +error[E0185]: method `example` has a `&self` declaration in the impl, but not in the trait + --> $DIR/argument_number_mismatch_ice.rs:8:5 + | +LL | fn example(val: ()); + | -------------------- trait method declared without `&self` +... +LL | fn example(&self, input: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl + +error[E0594]: cannot assign to `*input`, which is behind a `&` reference + --> $DIR/argument_number_mismatch_ice.rs:10:9 + | +LL | *input = self.0; + | ^^^^^^^^^^^^^^^ `input` is a `&` reference, so the data it refers to cannot be written + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0185, E0594. +For more information about an error, try `rustc --explain E0185`. diff --git a/tests/ui/borrowck/assign-never-type.rs b/tests/ui/borrowck/assign-never-type.rs index 4f30ea1467023..17993bfc08f47 100644 --- a/tests/ui/borrowck/assign-never-type.rs +++ b/tests/ui/borrowck/assign-never-type.rs @@ -1,6 +1,6 @@ // Regression test for issue 62165 -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/borrowck/async-reference-generality.rs b/tests/ui/borrowck/async-reference-generality.rs index 668df9ea7101d..9818504f66cfb 100644 --- a/tests/ui/borrowck/async-reference-generality.rs +++ b/tests/ui/borrowck/async-reference-generality.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::marker::PhantomData; diff --git a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs index e381384fe65ec..0dfced34c7e2e 100644 --- a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs +++ b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs b/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs index e1cf2dc53869b..7b0232a9d4550 100644 --- a/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs +++ b/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/borrowck/borrowck-assign-to-subfield.rs b/tests/ui/borrowck/borrowck-assign-to-subfield.rs index 050d702b625ab..807941d9c8547 100644 --- a/tests/ui/borrowck/borrowck-assign-to-subfield.rs +++ b/tests/ui/borrowck/borrowck-assign-to-subfield.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { struct A { diff --git a/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs b/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs index 72bf43da95e57..3b7b1089c29ef 100644 --- a/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs +++ b/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641) diff --git a/tests/ui/borrowck/borrowck-binding-mutbl.rs b/tests/ui/borrowck/borrowck-binding-mutbl.rs index c2d2e02ec1566..b7d30134b5a11 100644 --- a/tests/ui/borrowck/borrowck-binding-mutbl.rs +++ b/tests/ui/borrowck/borrowck-binding-mutbl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct F { f: Vec } diff --git a/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs b/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs index 24efadc305511..3718d7fd23c8f 100644 --- a/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs +++ b/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn borrow(x: &isize, f: F) where F: FnOnce(&isize) { f(x) diff --git a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs index 5ef282c0ca007..a815253d7147d 100644 --- a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs +++ b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] @@ -7,7 +7,7 @@ // // Example from compiler/rustc_borrowck/borrowck/README.md -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a>(mut t0: &'a mut isize, mut t1: &'a mut isize) { diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed index 8bf6a2f6db396..17480cdc24d47 100644 --- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed +++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs index 85481336a305f..33c4c04c1063d 100644 --- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs +++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/borrowck/borrowck-box-sensitivity.rs b/tests/ui/borrowck/borrowck-box-sensitivity.rs index e880f876f91a9..421d6a53a17dd 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 +//@ run-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 60128c9419d11..ec01db2948a28 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 +//@ run-pass fn arr_by_ref(x: [String; 3]) { let r = &x; diff --git a/tests/ui/borrowck/borrowck-closures-two-imm.rs b/tests/ui/borrowck/borrowck-closures-two-imm.rs index ab135194a0911..f2a65ac88cf46 100644 --- a/tests/ui/borrowck/borrowck-closures-two-imm.rs +++ b/tests/ui/borrowck/borrowck-closures-two-imm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that two closures can simultaneously have immutable // access to the variable, whether that immutable access be used // for direct reads or for taking immutable ref. Also check diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs index 78e965cc4bc7b..d78d8a9d96666 100644 --- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs +++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] #![allow(dropping_copy_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A { a: isize, b: Box } struct B { a: Box, b: Box } diff --git a/tests/ui/borrowck/borrowck-fixed-length-vecs.rs b/tests/ui/borrowck/borrowck-fixed-length-vecs.rs index 126323d8d242b..3441ae0e3bba9 100644 --- a/tests/ui/borrowck/borrowck-fixed-length-vecs.rs +++ b/tests/ui/borrowck/borrowck-fixed-length-vecs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [22]; diff --git a/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs b/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs index 199931d6d1e05..af316c164975f 100644 --- a/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs +++ b/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a `&mut` inside of an `&` is freezable. diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.fixed b/tests/ui/borrowck/borrowck-issue-2657-2.fixed index 625e7c3cad590..e5aaf7d2de740 100644 --- a/tests/ui/borrowck/borrowck-issue-2657-2.fixed +++ b/tests/ui/borrowck/borrowck-issue-2657-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x: Option> = Some(Box::new(1)); diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.rs b/tests/ui/borrowck/borrowck-issue-2657-2.rs index f79a846e70e7b..fb26239943a2f 100644 --- a/tests/ui/borrowck/borrowck-issue-2657-2.rs +++ b/tests/ui/borrowck/borrowck-issue-2657-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x: Option> = Some(Box::new(1)); diff --git a/tests/ui/borrowck/borrowck-lend-args.rs b/tests/ui/borrowck/borrowck-lend-args.rs index d0ef2dcdd2867..08a7aea162793 100644 --- a/tests/ui/borrowck/borrowck-lend-args.rs +++ b/tests/ui/borrowck/borrowck-lend-args.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn borrow(_v: &isize) {} diff --git a/tests/ui/borrowck/borrowck-local-borrow.rs b/tests/ui/borrowck/borrowck-local-borrow.rs index 0aaa4e4c6841c..de6ee5983c864 100644 --- a/tests/ui/borrowck/borrowck-local-borrow.rs +++ b/tests/ui/borrowck/borrowck-local-borrow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic 1 +//@ ignore-emscripten no processes fn main() { let x = 2; diff --git a/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs b/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs index 4e969f6ed83d3..af4fdc48da1c2 100644 --- a/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs +++ b/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unconditional_recursion)] diff --git a/tests/ui/borrowck/borrowck-move-by-capture-ok.rs b/tests/ui/borrowck/borrowck-move-by-capture-ok.rs index e7a48ebf6ca9b..b466654814d0e 100644 --- a/tests/ui/borrowck/borrowck-move-by-capture-ok.rs +++ b/tests/ui/borrowck/borrowck-move-by-capture-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let bar: Box<_> = Box::new(3); diff --git a/tests/ui/borrowck/borrowck-move-error-with-note.fixed b/tests/ui/borrowck/borrowck-move-error-with-note.fixed index cf6c382a692b2..ad98b2db414ff 100644 --- a/tests/ui/borrowck/borrowck-move-error-with-note.fixed +++ b/tests/ui/borrowck/borrowck-move-error-with-note.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] enum Foo { Foo1(Box, Box), diff --git a/tests/ui/borrowck/borrowck-move-error-with-note.rs b/tests/ui/borrowck/borrowck-move-error-with-note.rs index f336ac4f994fa..2596b321bfbbf 100644 --- a/tests/ui/borrowck/borrowck-move-error-with-note.rs +++ b/tests/ui/borrowck/borrowck-move-error-with-note.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] enum Foo { Foo1(Box, Box), diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs index 1e401b7e92e26..a74d3175a3806 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Due to #53114, which causes a "read" of the `_` patterns, // the borrow-checker refuses this code, while it should probably be allowed. // Once the bug is fixed, the test, which is derived from a diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs index c91b4286b6478..ec17a5afbb2a0 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn array() -> [(String, String); 3] { Default::default() diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs index 2f6ce430b35e8..fc446826c3416 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Due to #53114, which causes a "read" of the `_` patterns, // the borrow-checker refuses this code, while it should probably be allowed. // Once the bug is fixed, the test, which is derived from a diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs index e3498cef37719..3aef0b897e713 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn array() -> [(String, String); 3] { Default::default() diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed index 0b7551b97af94..8d5ebbc774408 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::rc::Rc; pub fn main() { diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs index 5cb8ceaca0866..cf734fb6f68d3 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::rc::Rc; pub fn main() { diff --git a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed index c463c6559386c..02c455f01de72 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S {f:String} impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs index 93183062d61b3..6b20b6e465abe 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S {f:String} impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed index bc2ddf85fb4a8..75474af46aea6 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S(String); impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs index f050bce874067..f5b7e8a74a43b 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S(String); impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs index 96d2663500ef0..ab2e43c54d85d 100644 --- a/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs +++ b/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test case from #39963. diff --git a/tests/ui/borrowck/borrowck-mut-uniq.rs b/tests/ui/borrowck/borrowck-mut-uniq.rs index 255b4995b640d..fb0016ef94ea3 100644 --- a/tests/ui/borrowck/borrowck-mut-uniq.rs +++ b/tests/ui/borrowck/borrowck-mut-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs b/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs index d2b0c01545efe..51c0aa28c2f50 100644 --- a/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs +++ b/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn want_slice(v: &[isize]) -> isize { diff --git a/tests/ui/borrowck/borrowck-pat-enum.rs b/tests/ui/borrowck/borrowck-pat-enum.rs index 6e51a2b2e0274..7f8927c4fd81b 100644 --- a/tests/ui/borrowck/borrowck-pat-enum.rs +++ b/tests/ui/borrowck/borrowck-pat-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn match_ref(v: Option) -> isize { diff --git a/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs b/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs index 1362fd8ce4cef..656547c976ab0 100644 --- a/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs +++ b/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x = None; diff --git a/tests/ui/borrowck/borrowck-rvalues-mutable.rs b/tests/ui/borrowck/borrowck-rvalues-mutable.rs index c4695c942e148..1b058707d35af 100644 --- a/tests/ui/borrowck/borrowck-rvalues-mutable.rs +++ b/tests/ui/borrowck/borrowck-rvalues-mutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Counter { value: usize diff --git a/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs b/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs index e89332ae31a5d..99f0c83cc87c7 100644 --- a/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs +++ b/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the scope of the pointer returned from `get()` is // limited to the deref operation itself, and does not infect the // block as a whole. diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs index a8e56f648e2e5..a6261a046e6cc 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn nop(_s: &[& i32]) {} fn nop_subslice(_s: &[i32]) {} diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs index 4367596c6ea88..cfbc39fe9f443 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mut_head_tail<'a, A>(v: &'a mut [A]) -> Option<(&'a mut A, &'a mut [A])> { match *v { diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs index 6390dc3a91a0d..810b9803abd16 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn nop(_s: &[& i32]) {} fn nop_subslice(_s: &[i32]) {} diff --git a/tests/ui/borrowck/borrowck-static-item-in-fn.rs b/tests/ui/borrowck/borrowck-static-item-in-fn.rs index 5f4379325a58a..9cdd4c891320c 100644 --- a/tests/ui/borrowck/borrowck-static-item-in-fn.rs +++ b/tests/ui/borrowck/borrowck-static-item-in-fn.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for issue #7740 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { static A: &'static char = &'A'; diff --git a/tests/ui/borrowck/borrowck-trait-lifetime.rs b/tests/ui/borrowck/borrowck-trait-lifetime.rs index 8a6dfe76d6065..e43201fb10b3e 100644 --- a/tests/ui/borrowck/borrowck-trait-lifetime.rs +++ b/tests/ui/borrowck/borrowck-trait-lifetime.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/borrowck/borrowck-uniq-via-ref.rs b/tests/ui/borrowck/borrowck-uniq-via-ref.rs index bdf7cc57a539e..d3190d66bd31b 100644 --- a/tests/ui/borrowck/borrowck-uniq-via-ref.rs +++ b/tests/ui/borrowck/borrowck-uniq-via-ref.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Rec { f: Box, diff --git a/tests/ui/borrowck/borrowck-univariant-enum.rs b/tests/ui/borrowck/borrowck-univariant-enum.rs index c78e947523353..0453a9219539f 100644 --- a/tests/ui/borrowck/borrowck-univariant-enum.rs +++ b/tests/ui/borrowck/borrowck-univariant-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs index 1bf079e24cae4..a89cad20f9710 100644 --- a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs +++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test file taken from issue 45129 (https://github.com/rust-lang/rust/issues/45129) diff --git a/tests/ui/borrowck/borrowck-unused-mut-locals.rs b/tests/ui/borrowck/borrowck-unused-mut-locals.rs index 23ef975cbbca1..3ae51a5a977b6 100644 --- a/tests/ui/borrowck/borrowck-unused-mut-locals.rs +++ b/tests/ui/borrowck/borrowck-unused-mut-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![deny(unused_mut)] diff --git a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs index 9acb1ec5e43a6..9649f48447138 100644 --- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs +++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dropping_copy_types)] diff --git a/tests/ui/borrowck/clone-span-on-try-operator.fixed b/tests/ui/borrowck/clone-span-on-try-operator.fixed index 4fad75b9a3d61..59253c98079b2 100644 --- a/tests/ui/borrowck/clone-span-on-try-operator.fixed +++ b/tests/ui/borrowck/clone-span-on-try-operator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/borrowck/clone-span-on-try-operator.rs b/tests/ui/borrowck/clone-span-on-try-operator.rs index 031a35e2026df..22d5eb6126da0 100644 --- a/tests/ui/borrowck/clone-span-on-try-operator.rs +++ b/tests/ui/borrowck/clone-span-on-try-operator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/borrowck/copy-suggestion-region-vid.fixed b/tests/ui/borrowck/copy-suggestion-region-vid.fixed index ec16469757a71..7fe18615408bd 100644 --- a/tests/ui/borrowck/copy-suggestion-region-vid.fixed +++ b/tests/ui/borrowck/copy-suggestion-region-vid.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct DataStruct(); pub struct HelperStruct<'n> { diff --git a/tests/ui/borrowck/copy-suggestion-region-vid.rs b/tests/ui/borrowck/copy-suggestion-region-vid.rs index f95c6b03e014a..daafba71ece74 100644 --- a/tests/ui/borrowck/copy-suggestion-region-vid.rs +++ b/tests/ui/borrowck/copy-suggestion-region-vid.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct DataStruct(); pub struct HelperStruct<'n> { diff --git a/tests/ui/borrowck/fn-item-check-trait-ref.rs b/tests/ui/borrowck/fn-item-check-trait-ref.rs index bdbb52e974f60..8b193430e9e97 100644 --- a/tests/ui/borrowck/fn-item-check-trait-ref.rs +++ b/tests/ui/borrowck/fn-item-check-trait-ref.rs @@ -1,7 +1,7 @@ // The method `assert_static` should be callable only for static values, // because the impl has an implied bound `where T: 'static`. -// check-fail +//@ check-fail trait AnyStatic: Sized { fn assert_static(self) {} diff --git a/tests/ui/borrowck/fn-item-check-type-params.rs b/tests/ui/borrowck/fn-item-check-type-params.rs index 805c0d00de5de..d952ebe33a599 100644 --- a/tests/ui/borrowck/fn-item-check-type-params.rs +++ b/tests/ui/borrowck/fn-item-check-type-params.rs @@ -3,7 +3,7 @@ // Previously, different borrowck implementations used to disagree here. // The status of each is documented on `fn test_*`. -// check-fail +//@ check-fail use std::fmt::Display; diff --git a/tests/ui/borrowck/fsu-moves-and-copies.rs b/tests/ui/borrowck/fsu-moves-and-copies.rs index 85e0a840a1961..397e4199bc054 100644 --- a/tests/ui/borrowck/fsu-moves-and-copies.rs +++ b/tests/ui/borrowck/fsu-moves-and-copies.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(stable_features)] diff --git a/tests/ui/borrowck/issue-103095.rs b/tests/ui/borrowck/issue-103095.rs index 0340f39243fa8..3c29bc7615537 100644 --- a/tests/ui/borrowck/issue-103095.rs +++ b/tests/ui/borrowck/issue-103095.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait FnOnceForGenericRef: FnOnce(&T) -> Self::FnOutput { type FnOutput; diff --git a/tests/ui/borrowck/issue-103250.rs b/tests/ui/borrowck/issue-103250.rs index 46565f61ca9a4..92ac0dc811862 100644 --- a/tests/ui/borrowck/issue-103250.rs +++ b/tests/ui/borrowck/issue-103250.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 type TranslateFn = Box String>; diff --git a/tests/ui/borrowck/issue-103624.rs b/tests/ui/borrowck/issue-103624.rs index d95a40bd4a019..9196789ec6332 100644 --- a/tests/ui/borrowck/issue-103624.rs +++ b/tests/ui/borrowck/issue-103624.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct StructA { b: StructB, diff --git a/tests/ui/borrowck/issue-104639-lifetime-order.rs b/tests/ui/borrowck/issue-104639-lifetime-order.rs index db1f8f8d58848..9dd6e6ee643ff 100644 --- a/tests/ui/borrowck/issue-104639-lifetime-order.rs +++ b/tests/ui/borrowck/issue-104639-lifetime-order.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(dead_code)] async fn fail<'a, 'b, 'c>(_: &'static str) where 'a: 'c, 'b: 'c, {} diff --git a/tests/ui/borrowck/issue-10876.rs b/tests/ui/borrowck/issue-10876.rs index 22eaa119f2467..c7c52f12a4e5a 100644 --- a/tests/ui/borrowck/issue-10876.rs +++ b/tests/ui/borrowck/issue-10876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Nat { S(Box), diff --git a/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed b/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed index 4a8831dab9567..6eef44d8e590a 100644 --- a/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed +++ b/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs b/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs index fcd855f862d71..cd5121d7d4561 100644 --- a/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs +++ b/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/borrowck/issue-11493.fixed b/tests/ui/borrowck/issue-11493.fixed index 139bd9a073973..adf442a266a8a 100644 --- a/tests/ui/borrowck/issue-11493.fixed +++ b/tests/ui/borrowck/issue-11493.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/borrowck/issue-11493.rs b/tests/ui/borrowck/issue-11493.rs index cb77f89fb2b1e..d83320a2cdb74 100644 --- a/tests/ui/borrowck/issue-11493.rs +++ b/tests/ui/borrowck/issue-11493.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed b/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed index 4653fe7375d38..14ac4a9ff5d0a 100644 --- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed +++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs b/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs index e0f6ab1321f83..b0e0d8aeb5638 100644 --- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs +++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-17263.rs b/tests/ui/borrowck/issue-17263.rs index 4f560b065f1b5..d9aab5eeef507 100644 --- a/tests/ui/borrowck/issue-17263.rs +++ b/tests/ui/borrowck/issue-17263.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { a: isize, b: isize } diff --git a/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs b/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs index d45aaa843fb6e..b0cab97dd2db3 100644 --- a/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs +++ b/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is largely checking that we now accept code where temp values // are borrowing from the input parameters (the `foo` case below). // diff --git a/tests/ui/borrowck/issue-28934.rs b/tests/ui/borrowck/issue-28934.rs index 1e48878f632e5..a3ac663c5b5c6 100644 --- a/tests/ui/borrowck/issue-28934.rs +++ b/tests/ui/borrowck/issue-28934.rs @@ -1,9 +1,9 @@ // Regression test: issue had to do with "givens" in region inference, // which were not being considered during the contraction phase. -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/tests/ui/borrowck/issue-29166.rs b/tests/ui/borrowck/issue-29166.rs index ca819ba39a20d..4ae4b41b7f04c 100644 --- a/tests/ui/borrowck/issue-29166.rs +++ b/tests/ui/borrowck/issue-29166.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test ensures that vec.into_iter does not overconstrain element lifetime. pub fn main() { diff --git a/tests/ui/borrowck/issue-36082.fixed b/tests/ui/borrowck/issue-36082.fixed index 8fc963a85664e..2209c56048e45 100644 --- a/tests/ui/borrowck/issue-36082.fixed +++ b/tests/ui/borrowck/issue-36082.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::cell::RefCell; fn main() { diff --git a/tests/ui/borrowck/issue-36082.rs b/tests/ui/borrowck/issue-36082.rs index 20f66b4d45de4..da8b0068882b5 100644 --- a/tests/ui/borrowck/issue-36082.rs +++ b/tests/ui/borrowck/issue-36082.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::cell::RefCell; fn main() { diff --git a/tests/ui/borrowck/issue-46095.rs b/tests/ui/borrowck/issue-46095.rs index 59ddb60c9f239..52a814e96ebc3 100644 --- a/tests/ui/borrowck/issue-46095.rs +++ b/tests/ui/borrowck/issue-46095.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; impl A { diff --git a/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs b/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs index 7d5acb95751ed..a6848fa8fb244 100644 --- a/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs +++ b/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs @@ -6,7 +6,7 @@ // trying to double check that we are matching against the right part // of the input data based on which candidate pattern actually fired. -// run-pass +//@ run-pass fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 { match *x { diff --git a/tests/ui/borrowck/issue-51415.fixed b/tests/ui/borrowck/issue-51415.fixed index 92943f6c9ecb2..f6804e6a01e49 100644 --- a/tests/ui/borrowck/issue-51415.fixed +++ b/tests/ui/borrowck/issue-51415.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #51415: match default bindings were failing to // see the "move out" implied by `&s` below. diff --git a/tests/ui/borrowck/issue-51415.rs b/tests/ui/borrowck/issue-51415.rs index 56ed57a61a0fe..b77039f7c566d 100644 --- a/tests/ui/borrowck/issue-51415.rs +++ b/tests/ui/borrowck/issue-51415.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #51415: match default bindings were failing to // see the "move out" implied by `&s` below. diff --git a/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs b/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs index fc8a075540b3f..a63fd97eaa810 100644 --- a/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs +++ b/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs @@ -2,10 +2,10 @@ // the initial deployment of NLL for the 2018 edition, I forgot to // turn on two-phase-borrows in addition to `-Z borrowck=migrate`. -// revisions: edition2015 edition2018 -//[edition2018]edition:2018 +//@ revisions: edition2015 edition2018 +//@[edition2018]edition:2018 -// run-pass +//@ run-pass fn the_bug() { let mut stuff = ("left", "right"); diff --git a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs index b87ef3baa4aa7..800d295a75432 100644 --- a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs +++ b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#55552: The strategy pnkfelix landed in PR #55274 // (for ensuring that NLL respects user-provided lifetime annotations) diff --git a/tests/ui/borrowck/issue-62007-assign-box.rs b/tests/ui/borrowck/issue-62007-assign-box.rs index f6fbea821b521..eb082d35f2898 100644 --- a/tests/ui/borrowck/issue-62007-assign-box.rs +++ b/tests/ui/borrowck/issue-62007-assign-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #62007: assigning over a deref projection of a box (in this // case, `*list = n;`) should be able to kill all borrows of `*list`, diff --git a/tests/ui/borrowck/issue-62007-assign-field.rs b/tests/ui/borrowck/issue-62007-assign-field.rs index 5b21c083816a4..d5d6e67cac604 100644 --- a/tests/ui/borrowck/issue-62007-assign-field.rs +++ b/tests/ui/borrowck/issue-62007-assign-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #62007: assigning over a field projection (`list.0 = n;` in // this case) should be able to kill all borrows of `list.0`, so that diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed index f02374d8e11de..90d09db338fda 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] use std::path::PathBuf; diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs index 2d0b837a946ca..7640898b349f7 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] use std::path::PathBuf; diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed b/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed index 8bf2625de6da6..00913988ab6de 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs b/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs index 39bc30bf29452..d46c5abed436b 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-70919-drop-in-loop.rs b/tests/ui/borrowck/issue-70919-drop-in-loop.rs index a8d5849a31c0b..be70f0501110b 100644 --- a/tests/ui/borrowck/issue-70919-drop-in-loop.rs +++ b/tests/ui/borrowck/issue-70919-drop-in-loop.rs @@ -2,7 +2,7 @@ // Tests that we don't emit a spurious "borrow might be used" error // when we have an explicit `drop` in a loop -// check-pass +//@ check-pass struct WrapperWithDrop<'a>(&'a mut bool); impl<'a> Drop for WrapperWithDrop<'a> { diff --git a/tests/ui/borrowck/issue-71546.rs b/tests/ui/borrowck/issue-71546.rs index 42100edeaa712..ee4e2232c70b9 100644 --- a/tests/ui/borrowck/issue-71546.rs +++ b/tests/ui/borrowck/issue-71546.rs @@ -2,7 +2,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass pub fn serialize_as_csv(value: &V) -> Result where diff --git a/tests/ui/borrowck/issue-80772.rs b/tests/ui/borrowck/issue-80772.rs index 1b8caa3f8ac8b..5776fc4a2e346 100644 --- a/tests/ui/borrowck/issue-80772.rs +++ b/tests/ui/borrowck/issue-80772.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait SomeTrait {} diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs index b52939ffc119c..15be5fb3fac05 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs @@ -1,7 +1,7 @@ // Regression test for #82126. Checks that mismatched lifetimes and types are // properly handled. -// edition:2018 +//@ edition:2018 use std::sync::Mutex; diff --git a/tests/ui/borrowck/issue-83760.fixed b/tests/ui/borrowck/issue-83760.fixed index 4544eeb6e1966..9dcc025859635 100644 --- a/tests/ui/borrowck/issue-83760.fixed +++ b/tests/ui/borrowck/issue-83760.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] #[derive(Clone)] struct Struct; diff --git a/tests/ui/borrowck/issue-83760.rs b/tests/ui/borrowck/issue-83760.rs index 81bfdf0fcc769..8a4825e5607de 100644 --- a/tests/ui/borrowck/issue-83760.rs +++ b/tests/ui/borrowck/issue-83760.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] struct Struct; struct Struct2; diff --git a/tests/ui/borrowck/issue-83924.fixed b/tests/ui/borrowck/issue-83924.fixed index aa40da12b875d..891b0bf06509a 100644 --- a/tests/ui/borrowck/issue-83924.fixed +++ b/tests/ui/borrowck/issue-83924.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut values = vec![10, 11, 12]; diff --git a/tests/ui/borrowck/issue-83924.rs b/tests/ui/borrowck/issue-83924.rs index 22b80fe2f383f..9781f6e527b3d 100644 --- a/tests/ui/borrowck/issue-83924.rs +++ b/tests/ui/borrowck/issue-83924.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut values = vec![10, 11, 12]; diff --git a/tests/ui/borrowck/issue-93093.rs b/tests/ui/borrowck/issue-93093.rs index f4db5ecafac40..e85b296c983f4 100644 --- a/tests/ui/borrowck/issue-93093.rs +++ b/tests/ui/borrowck/issue-93093.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S { foo: usize, } diff --git a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed index 1a08470064cd7..a2027fb8dee91 100644 --- a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed +++ b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, path_statements)] fn foo1(s: &str) -> impl Iterator + '_ { None.into_iter() diff --git a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs index b93292e3589d3..ceddf52d292b6 100644 --- a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs +++ b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, path_statements)] fn foo1(s: &str) -> impl Iterator + '_ { None.into_iter() diff --git a/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs b/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs index 5b5d86eec2c0e..22ed8bd3beefa 100644 --- a/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs +++ b/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/lazy-init.rs b/tests/ui/borrowck/lazy-init.rs index a4b5d18bb33f0..3728e9e492942 100644 --- a/tests/ui/borrowck/lazy-init.rs +++ b/tests/ui/borrowck/lazy-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/borrowck/let_underscore_temporary.rs b/tests/ui/borrowck/let_underscore_temporary.rs index a5ea3b3a7ab2e..0a24df08925f8 100644 --- a/tests/ui/borrowck/let_underscore_temporary.rs +++ b/tests/ui/borrowck/let_underscore_temporary.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn let_underscore(string: &Option<&str>, mut num: Option) { let _ = if let Some(s) = *string { s.len() } else { 0 }; diff --git a/tests/ui/borrowck/move-error-snippets-ext.rs b/tests/ui/borrowck/move-error-snippets-ext.rs index 27041d55d8fa3..f8103228cf81c 100644 --- a/tests/ui/borrowck/move-error-snippets-ext.rs +++ b/tests/ui/borrowck/move-error-snippets-ext.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) macro_rules! aaa { ($c:ident) => {{ diff --git a/tests/ui/borrowck/move-error-snippets.rs b/tests/ui/borrowck/move-error-snippets.rs index 64f9565382886..f9e97e73f5c87 100644 --- a/tests/ui/borrowck/move-error-snippets.rs +++ b/tests/ui/borrowck/move-error-snippets.rs @@ -1,6 +1,6 @@ // Test that we don't ICE after trying to construct a cross-file snippet #63800. -// compile-flags: --test +//@ compile-flags: --test #[macro_use] #[path = "move-error-snippets-ext.rs"] diff --git a/tests/ui/borrowck/move-in-pattern.fixed b/tests/ui/borrowck/move-in-pattern.fixed index 145893d3343bc..be0a6c7b8d43a 100644 --- a/tests/ui/borrowck/move-in-pattern.fixed +++ b/tests/ui/borrowck/move-in-pattern.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #63988 #[derive(Debug)] struct S; diff --git a/tests/ui/borrowck/move-in-pattern.rs b/tests/ui/borrowck/move-in-pattern.rs index 14851d0f6fcff..1e88174a60fdd 100644 --- a/tests/ui/borrowck/move-in-pattern.rs +++ b/tests/ui/borrowck/move-in-pattern.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #63988 #[derive(Debug)] struct S; diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.fixed b/tests/ui/borrowck/mut-borrow-in-loop-2.fixed index ceeba30a90f29..cff3c372cdb90 100644 --- a/tests/ui/borrowck/mut-borrow-in-loop-2.fixed +++ b/tests/ui/borrowck/mut-borrow-in-loop-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Events(R); diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.rs b/tests/ui/borrowck/mut-borrow-in-loop-2.rs index d13fb7e567939..ba79b12042fba 100644 --- a/tests/ui/borrowck/mut-borrow-in-loop-2.rs +++ b/tests/ui/borrowck/mut-borrow-in-loop-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Events(R); diff --git a/tests/ui/borrowck/suggest-mut-iterator.fixed b/tests/ui/borrowck/suggest-mut-iterator.fixed index 16512b8a3cd8c..4197b10eae526 100644 --- a/tests/ui/borrowck/suggest-mut-iterator.fixed +++ b/tests/ui/borrowck/suggest-mut-iterator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Test { a: u32 } diff --git a/tests/ui/borrowck/suggest-mut-iterator.rs b/tests/ui/borrowck/suggest-mut-iterator.rs index 276edeccb22a8..6f6aab481fa94 100644 --- a/tests/ui/borrowck/suggest-mut-iterator.rs +++ b/tests/ui/borrowck/suggest-mut-iterator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Test { a: u32 } diff --git a/tests/ui/borrowck/two-phase-activation-sharing-interference.rs b/tests/ui/borrowck/two-phase-activation-sharing-interference.rs index 8b880ff6416c4..beee9916fca2c 100644 --- a/tests/ui/borrowck/two-phase-activation-sharing-interference.rs +++ b/tests/ui/borrowck/two-phase-activation-sharing-interference.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The following revisions are disabled due to missing support from two-phase beyond autorefs -//[nll_beyond] compile-flags: -Z two-phase-beyond-autoref +//@[nll_beyond] compile-flags: -Z two-phase-beyond-autoref // This is an important corner case pointed out by Niko: one is // allowed to initiate a shared borrow during a reservation, but it diff --git a/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs b/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs index 67d0842070ff2..e6b2501c1ebde 100644 --- a/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs +++ b/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The following revisions are disabled due to missing support for two_phase_beyond_autoref -//[nll_beyond] compile-flags: -Z two_phase_beyond_autoref +//@[nll_beyond] compile-flags: -Z two_phase_beyond_autoref // This is the second counter-example from Niko's blog post // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ diff --git a/tests/ui/borrowck/two-phase-baseline.rs b/tests/ui/borrowck/two-phase-baseline.rs index 994dc823dfc0c..07aea5fbff68a 100644 --- a/tests/ui/borrowck/two-phase-baseline.rs +++ b/tests/ui/borrowck/two-phase-baseline.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is the "goto example" for why we want two phase borrows. diff --git a/tests/ui/borrowck/two-phase-bin-ops.rs b/tests/ui/borrowck/two-phase-bin-ops.rs index 1242ae307d39c..2369c35dac9fb 100644 --- a/tests/ui/borrowck/two-phase-bin-ops.rs +++ b/tests/ui/borrowck/two-phase-bin-ops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign}; use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign}; 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 0b20e1945e6f2..921e7351c0fcd 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 +//@ run-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 6b879af5aecda..147b70d0cfbf4 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 +//@ run-pass struct Foo<'a> { x: &'a i32 diff --git a/tests/ui/borrowck/two-phase-multiple-activations.rs b/tests/ui/borrowck/two-phase-multiple-activations.rs index 53fb71ebed498..4efb0ae28d5a2 100644 --- a/tests/ui/borrowck/two-phase-multiple-activations.rs +++ b/tests/ui/borrowck/two-phase-multiple-activations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::io::Result; diff --git a/tests/ui/borrowck/two-phase-nonrecv-autoref.rs b/tests/ui/borrowck/two-phase-nonrecv-autoref.rs index da238205b402f..f52e9c2e3fdcb 100644 --- a/tests/ui/borrowck/two-phase-nonrecv-autoref.rs +++ b/tests/ui/borrowck/two-phase-nonrecv-autoref.rs @@ -1,6 +1,6 @@ -// revisions: base +//@ revisions: base -//[g2p]compile-flags: -Z two-phase-beyond-autoref +//@[g2p]compile-flags: -Z two-phase-beyond-autoref // the above revision is disabled until two-phase-beyond-autoref support is better // This is a test checking that when we limit two-phase borrows to diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs b/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs index 27e599c6cd529..f049cde60cccc 100644 --- a/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs +++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs @@ -2,7 +2,7 @@ // accidentally allowed under migrate/nll, then linted against in migrate mode // but disallowed under NLL. Now, we accept it everywhere. -//ignore-compare-mode-polonius +//@ignore-compare-mode-polonius fn double_conflicts() { let mut v = vec![0, 1, 2]; diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs index 0463e22b3c2d1..ac0d4f6e09975 100644 --- a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs +++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs -//[nll_beyond]compile-flags: -Z two-phase-beyond-autoref +//@[nll_beyond]compile-flags: -Z two-phase-beyond-autoref //[nll_beyond]should-fail // This is a corner case that the current implementation is (probably) diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed index 85acafd88f671..8add3a5f2b6f5 100644 --- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed +++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that a by-ref `FnMut` closure gets an error when it tries to // consume a value. diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs index 4666b8a337353..1403ede4a717f 100644 --- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs +++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that a by-ref `FnMut` closure gets an error when it tries to // consume a value. diff --git a/tests/ui/box/alloc-unstable.rs b/tests/ui/box/alloc-unstable.rs index 640cadcc8e3dc..b8c8bc0c70af4 100644 --- a/tests/ui/box/alloc-unstable.rs +++ b/tests/ui/box/alloc-unstable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(allocator_api)] fn main() { let _boxed: Box = Box::new(10); diff --git a/tests/ui/box/into-boxed-slice.rs b/tests/ui/box/into-boxed-slice.rs index 86866ac2f7ecc..1487cd651459a 100644 --- a/tests/ui/box/into-boxed-slice.rs +++ b/tests/ui/box/into-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_into_boxed_slice)] fn main() { assert_eq!(Box::into_boxed_slice(Box::new(5u8)), Box::new([5u8]) as Box<[u8]>); diff --git a/tests/ui/box/issue-95036.rs b/tests/ui/box/issue-95036.rs index 0611fabc15c08..f20f4b98437fd 100644 --- a/tests/ui/box/issue-95036.rs +++ b/tests/ui/box/issue-95036.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// build-pass +//@ compile-flags: -O +//@ build-pass #![feature(allocator_api)] diff --git a/tests/ui/box/large-allocator-ice.rs b/tests/ui/box/large-allocator-ice.rs index b3a882ff089b0..d5c7069cfb951 100644 --- a/tests/ui/box/large-allocator-ice.rs +++ b/tests/ui/box/large-allocator-ice.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(allocator_api)] #![allow(unused_must_use)] diff --git a/tests/ui/box/new-box-syntax.rs b/tests/ui/box/new-box-syntax.rs index e3b1550d60bc5..f2899ff3dde06 100644 --- a/tests/ui/box/new-box-syntax.rs +++ b/tests/ui/box/new-box-syntax.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/box/new-box.rs b/tests/ui/box/new-box.rs index 96a3b197f461c..f33620a01ef21 100644 --- a/tests/ui/box/new-box.rs +++ b/tests/ui/box/new-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Box) { let y: &isize = &*x; diff --git a/tests/ui/box/new.rs b/tests/ui/box/new.rs index be1a40cf779da..682a998ae1993 100644 --- a/tests/ui/box/new.rs +++ b/tests/ui/box/new.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let _a = Box::new(1); diff --git a/tests/ui/box/thin_align.rs b/tests/ui/box/thin_align.rs index 3c61d0090e42b..d3240046b85b4 100644 --- a/tests/ui/box/thin_align.rs +++ b/tests/ui/box/thin_align.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::ops::Deref; diff --git a/tests/ui/box/thin_drop.rs b/tests/ui/box/thin_drop.rs index 965613c114e3a..6319aeca370a1 100644 --- a/tests/ui/box/thin_drop.rs +++ b/tests/ui/box/thin_drop.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::ops::Deref; diff --git a/tests/ui/box/thin_new.rs b/tests/ui/box/thin_new.rs index 53f46478be403..cba63aee9b190 100644 --- a/tests/ui/box/thin_new.rs +++ b/tests/ui/box/thin_new.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::{fmt, mem}; diff --git a/tests/ui/box/thin_zst.rs b/tests/ui/box/thin_zst.rs index 77c400d17bbe5..7c62fbd799ec4 100644 --- a/tests/ui/box/thin_zst.rs +++ b/tests/ui/box/thin_zst.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::{fmt, mem}; diff --git a/tests/ui/box/unit/expr-block-generic-unique1.rs b/tests/ui/box/unit/expr-block-generic-unique1.rs index 14603a2c71fc4..1326a1510e8fc 100644 --- a/tests/ui/box/unit/expr-block-generic-unique1.rs +++ b/tests/ui/box/unit/expr-block-generic-unique1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: Box, eq: F) where T: Clone, F: FnOnce(Box, Box) -> bool { diff --git a/tests/ui/box/unit/expr-block-generic-unique2.rs b/tests/ui/box/unit/expr-block-generic-unique2.rs index 7879c144b1092..204eaac4b1d8f 100644 --- a/tests/ui/box/unit/expr-block-generic-unique2.rs +++ b/tests/ui/box/unit/expr-block-generic-unique2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: T, eq: F) where T: Clone, F: FnOnce(T, T) -> bool { diff --git a/tests/ui/box/unit/expr-if-unique.rs b/tests/ui/box/unit/expr-if-unique.rs index 86232683549b6..344c9dc4f6ae4 100644 --- a/tests/ui/box/unit/expr-if-unique.rs +++ b/tests/ui/box/unit/expr-if-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for if as expressions returning boxed types fn test_box() { diff --git a/tests/ui/box/unit/unique-assign-copy.rs b/tests/ui/box/unit/unique-assign-copy.rs index b742973ce327d..f62984cca6607 100644 --- a/tests/ui/box/unit/unique-assign-copy.rs +++ b/tests/ui/box/unit/unique-assign-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-assign-drop.rs b/tests/ui/box/unit/unique-assign-drop.rs index e7685b589ca8e..3d37344ae961e 100644 --- a/tests/ui/box/unit/unique-assign-drop.rs +++ b/tests/ui/box/unit/unique-assign-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] pub fn main() { diff --git a/tests/ui/box/unit/unique-assign-generic.rs b/tests/ui/box/unit/unique-assign-generic.rs index d4932d8333ab7..9dc7fb8dcead2 100644 --- a/tests/ui/box/unit/unique-assign-generic.rs +++ b/tests/ui/box/unit/unique-assign-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(t: T) -> T { let t1 = t; diff --git a/tests/ui/box/unit/unique-assign.rs b/tests/ui/box/unit/unique-assign.rs index d598744f145b2..9a2edd806073f 100644 --- a/tests/ui/box/unit/unique-assign.rs +++ b/tests/ui/box/unit/unique-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-autoderef-field.rs b/tests/ui/box/unit/unique-autoderef-field.rs index 64147e11f1c0c..f751801d8dfd6 100644 --- a/tests/ui/box/unit/unique-autoderef-field.rs +++ b/tests/ui/box/unit/unique-autoderef-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct J { j: isize } diff --git a/tests/ui/box/unit/unique-autoderef-index.rs b/tests/ui/box/unit/unique-autoderef-index.rs index ea6598a7f6b35..336b6f615b422 100644 --- a/tests/ui/box/unit/unique-autoderef-index.rs +++ b/tests/ui/box/unit/unique-autoderef-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(vec![100]); diff --git a/tests/ui/box/unit/unique-cmp.rs b/tests/ui/box/unit/unique-cmp.rs index ee05dd5a31d5b..1bf3ec0bef403 100644 --- a/tests/ui/box/unit/unique-cmp.rs +++ b/tests/ui/box/unit/unique-cmp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_allocation)] pub fn main() { diff --git a/tests/ui/box/unit/unique-containing-tag.rs b/tests/ui/box/unit/unique-containing-tag.rs index 6c31ae99b8eef..cd88cfab4254f 100644 --- a/tests/ui/box/unit/unique-containing-tag.rs +++ b/tests/ui/box/unit/unique-containing-tag.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { enum t { t1(isize), t2(isize), } diff --git a/tests/ui/box/unit/unique-create.rs b/tests/ui/box/unit/unique-create.rs index c566e79620a95..bf3826156b1d4 100644 --- a/tests/ui/box/unit/unique-create.rs +++ b/tests/ui/box/unit/unique-create.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-decl-init-copy.rs b/tests/ui/box/unit/unique-decl-init-copy.rs index 5b9576fcc7a5b..abb1113ebdc2a 100644 --- a/tests/ui/box/unit/unique-decl-init-copy.rs +++ b/tests/ui/box/unit/unique-decl-init-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-decl-init.rs b/tests/ui/box/unit/unique-decl-init.rs index 1d70860c7cec0..70aad8cf57d5a 100644 --- a/tests/ui/box/unit/unique-decl-init.rs +++ b/tests/ui/box/unit/unique-decl-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-decl-move.rs b/tests/ui/box/unit/unique-decl-move.rs index 21187510ff0c5..11e94f1576da2 100644 --- a/tests/ui/box/unit/unique-decl-move.rs +++ b/tests/ui/box/unit/unique-decl-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-decl.rs b/tests/ui/box/unit/unique-decl.rs index 84a1b2a5b83fc..1ff5c9007f4d2 100644 --- a/tests/ui/box/unit/unique-decl.rs +++ b/tests/ui/box/unit/unique-decl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/box/unit/unique-deref.rs b/tests/ui/box/unit/unique-deref.rs index 33a1e9932b5d1..aa69a936308db 100644 --- a/tests/ui/box/unit/unique-deref.rs +++ b/tests/ui/box/unit/unique-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-destructure.rs b/tests/ui/box/unit/unique-destructure.rs index 7207ac962953e..2ddb3c452cd59 100644 --- a/tests/ui/box/unit/unique-destructure.rs +++ b/tests/ui/box/unit/unique-destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] struct Foo { a: isize, b: isize } diff --git a/tests/ui/box/unit/unique-drop-complex.rs b/tests/ui/box/unit/unique-drop-complex.rs index 2324f1e1a652f..f23635e59cd50 100644 --- a/tests/ui/box/unit/unique-drop-complex.rs +++ b/tests/ui/box/unit/unique-drop-complex.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: Box<_> = Box::new(vec![0,0,0,0,0]); diff --git a/tests/ui/box/unit/unique-ffi-symbols.rs b/tests/ui/box/unit/unique-ffi-symbols.rs index 77b5ead26337a..65a9a32b2bb0c 100644 --- a/tests/ui/box/unit/unique-ffi-symbols.rs +++ b/tests/ui/box/unit/unique-ffi-symbols.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We used to have a __rust_abi shim that resulted in duplicated symbols // whenever the item path wasn't enough to disambiguate between them. fn main() { diff --git a/tests/ui/box/unit/unique-fn-arg-move.rs b/tests/ui/box/unit/unique-fn-arg-move.rs index 6d42df218fbfd..a57e9b932f115 100644 --- a/tests/ui/box/unit/unique-fn-arg-move.rs +++ b/tests/ui/box/unit/unique-fn-arg-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: Box) { assert_eq!(*i, 100); diff --git a/tests/ui/box/unit/unique-fn-arg-mut.rs b/tests/ui/box/unit/unique-fn-arg-mut.rs index 01510200b11b7..08d1055c61302 100644 --- a/tests/ui/box/unit/unique-fn-arg-mut.rs +++ b/tests/ui/box/unit/unique-fn-arg-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: &mut Box) { *i = Box::new(200); diff --git a/tests/ui/box/unit/unique-fn-arg.rs b/tests/ui/box/unit/unique-fn-arg.rs index b4f3bc4b294ba..80bb2b61ff6ea 100644 --- a/tests/ui/box/unit/unique-fn-arg.rs +++ b/tests/ui/box/unit/unique-fn-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: Box) { assert_eq!(*i, 100); diff --git a/tests/ui/box/unit/unique-fn-ret.rs b/tests/ui/box/unit/unique-fn-ret.rs index 773a9bce1adb0..a819dc4a5ab63 100644 --- a/tests/ui/box/unit/unique-fn-ret.rs +++ b/tests/ui/box/unit/unique-fn-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> Box { Box::new(100) diff --git a/tests/ui/box/unit/unique-generic-assign.rs b/tests/ui/box/unit/unique-generic-assign.rs index 9c4405aa8ac2a..ef9c34c41a393 100644 --- a/tests/ui/box/unit/unique-generic-assign.rs +++ b/tests/ui/box/unit/unique-generic-assign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #976 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(x: Box) { let _x2 = x; diff --git a/tests/ui/box/unit/unique-in-tag.rs b/tests/ui/box/unit/unique-in-tag.rs index 6daa06fb12de6..2da5ed1b5e919 100644 --- a/tests/ui/box/unit/unique-in-tag.rs +++ b/tests/ui/box/unit/unique-in-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/box/unit/unique-in-vec-copy.rs b/tests/ui/box/unit/unique-in-vec-copy.rs index ce52d15ef1acb..40a0f878285c7 100644 --- a/tests/ui/box/unit/unique-in-vec-copy.rs +++ b/tests/ui/box/unit/unique-in-vec-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut a: Vec> = vec![Box::new(10)]; diff --git a/tests/ui/box/unit/unique-in-vec.rs b/tests/ui/box/unit/unique-in-vec.rs index 1e8d05e3d269f..8c6552ad16357 100644 --- a/tests/ui/box/unit/unique-in-vec.rs +++ b/tests/ui/box/unit/unique-in-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let vect : Vec> = vec![Box::new(100)]; diff --git a/tests/ui/box/unit/unique-init.rs b/tests/ui/box/unit/unique-init.rs index d19605046e1bc..ad2390c2ca01b 100644 --- a/tests/ui/box/unit/unique-init.rs +++ b/tests/ui/box/unit/unique-init.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-kinds.rs b/tests/ui/box/unit/unique-kinds.rs index 1ef09d7195a95..71e99277a7526 100644 --- a/tests/ui/box/unit/unique-kinds.rs +++ b/tests/ui/box/unit/unique-kinds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/box/unit/unique-log.rs b/tests/ui/box/unit/unique-log.rs index 0715d16628f87..86c8cfac81466 100644 --- a/tests/ui/box/unit/unique-log.rs +++ b/tests/ui/box/unit/unique-log.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-match-discrim.rs b/tests/ui/box/unit/unique-match-discrim.rs index 6e6d7432277d9..97b502004f514 100644 --- a/tests/ui/box/unit/unique-match-discrim.rs +++ b/tests/ui/box/unit/unique-match-discrim.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #961 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn altsimple() { match Box::new(true) { diff --git a/tests/ui/box/unit/unique-move-drop.rs b/tests/ui/box/unit/unique-move-drop.rs index c0f5d8f90532d..1dff5f0bc87a9 100644 --- a/tests/ui/box/unit/unique-move-drop.rs +++ b/tests/ui/box/unit/unique-move-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/box/unit/unique-move-temp.rs b/tests/ui/box/unit/unique-move-temp.rs index 103af8e1f1e02..f86a2a3b7e452 100644 --- a/tests/ui/box/unit/unique-move-temp.rs +++ b/tests/ui/box/unit/unique-move-temp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-move.rs b/tests/ui/box/unit/unique-move.rs index 40a2718e4e5f6..04f7d8f051a87 100644 --- a/tests/ui/box/unit/unique-move.rs +++ b/tests/ui/box/unit/unique-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-mutable.rs b/tests/ui/box/unit/unique-mutable.rs index 0367c08099a83..284b419f5a1d4 100644 --- a/tests/ui/box/unit/unique-mutable.rs +++ b/tests/ui/box/unit/unique-mutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(0); diff --git a/tests/ui/box/unit/unique-object-move.rs b/tests/ui/box/unit/unique-object-move.rs index bb35a9b2d73e2..f30fc5c8e64f3 100644 --- a/tests/ui/box/unit/unique-object-move.rs +++ b/tests/ui/box/unit/unique-object-move.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #5192 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait EventLoop { fn foo(&self) {} } diff --git a/tests/ui/box/unit/unique-pat-2.rs b/tests/ui/box/unit/unique-pat-2.rs index 9c73fd2204c38..85f0fbd5e4f13 100644 --- a/tests/ui/box/unit/unique-pat-2.rs +++ b/tests/ui/box/unit/unique-pat-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/box/unit/unique-pat-3.rs b/tests/ui/box/unit/unique-pat-3.rs index 2e81f898d0c98..4816b5945f12a 100644 --- a/tests/ui/box/unit/unique-pat-3.rs +++ b/tests/ui/box/unit/unique-pat-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/box/unit/unique-pat.rs b/tests/ui/box/unit/unique-pat.rs index c2474d0e77214..395d06127d653 100644 --- a/tests/ui/box/unit/unique-pat.rs +++ b/tests/ui/box/unit/unique-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/box/unit/unique-rec.rs b/tests/ui/box/unit/unique-rec.rs index 9f8ad9bb05043..f13ca0c4acb37 100644 --- a/tests/ui/box/unit/unique-rec.rs +++ b/tests/ui/box/unit/unique-rec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { x: isize } diff --git a/tests/ui/box/unit/unique-send-2.rs b/tests/ui/box/unit/unique-send-2.rs index 23ddd2cdca25d..20474fee4d8d5 100644 --- a/tests/ui/box/unit/unique-send-2.rs +++ b/tests/ui/box/unit/unique-send-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/box/unit/unique-send.rs b/tests/ui/box/unit/unique-send.rs index 431cc2be5d20e..f4ca2d13d09ed 100644 --- a/tests/ui/box/unit/unique-send.rs +++ b/tests/ui/box/unit/unique-send.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/box/unit/unique-swap.rs b/tests/ui/box/unit/unique-swap.rs index 4f33ff9a8a35e..c41ff10fe56a6 100644 --- a/tests/ui/box/unit/unique-swap.rs +++ b/tests/ui/box/unit/unique-swap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/box/unit/unwind-unique.rs b/tests/ui/box/unit/unwind-unique.rs index 50ecf751a86db..512327c9af456 100644 --- a/tests/ui/box/unit/unwind-unique.rs +++ b/tests/ui/box/unit/unwind-unique.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs b/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs index fda825bc65e80..59909d8c0e581 100644 --- a/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs +++ b/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::collections::{BTreeMap, HashMap}; diff --git a/tests/ui/builtin-clone-unwind.rs b/tests/ui/builtin-clone-unwind.rs index 16add6ff2f68f..507ea045b4f86 100644 --- a/tests/ui/builtin-clone-unwind.rs +++ b/tests/ui/builtin-clone-unwind.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs index 1f997d37122c4..fcb77ab047868 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests "transitivity" of super-builtin-kinds on traits. Here, if // we have a Foo, we know we have a Bar, and if we have a Bar, we // know we have a Send. So if we have a Foo we should know we have diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs index 8416bb3a3773f..5ed2be84a5690 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:trait_superkinds_in_metadata.rs +//@ run-pass +//@ aux-build:trait_superkinds_in_metadata.rs // Tests "capabilities" granted by traits with super-builtin-kinds, // even when using them cross-crate. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs index e936f921a8203..407b0b391b414 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests "capabilities" granted by traits that inherit from super- // builtin-kinds, e.g., if a trait requires Send to implement, then // at usage site of that trait, we know we have the Send capability. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs index b4555a1809ad4..af445e56fa0cf 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs @@ -1,4 +1,4 @@ -// aux-build:trait_superkinds_in_metadata.rs +//@ aux-build:trait_superkinds_in_metadata.rs // Test for traits inheriting from the builtin kinds cross-crate. // Mostly tests correctness of metadata. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs index 7e8820cb2c65d..5d699a133857a 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// aux-build:trait_superkinds_in_metadata.rs +//@ aux-build:trait_superkinds_in_metadata.rs // Tests (correct) usage of trait super-builtin-kinds cross-crate. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs index 9b80664b04e17..8a2fa4685771f 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Tests that even when a type parameter doesn't implement a required // super-builtin-kind of a trait, if the type parameter is never used, // the type can implement the trait anyway. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs index 50914b1de53f2..1354b4ac18811 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Simple test case of implementing a trait with super-builtin-kinds. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo : Send { } diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs index 0577acc572ad5..15b867dd5e005 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // Tests correct implementation of traits with super-builtin-kinds // using a bounded type parameter. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo : Send { } diff --git a/tests/ui/c-variadic/issue-86053-1.rs b/tests/ui/c-variadic/issue-86053-1.rs index 49d5c0390bc13..f952235be9811 100644 --- a/tests/ui/c-variadic/issue-86053-1.rs +++ b/tests/ui/c-variadic/issue-86053-1.rs @@ -1,7 +1,7 @@ // Regression test for the ICE described in issue #86053. -// error-pattern:unexpected `self` parameter in function -// error-pattern:`...` must be the last argument of a C-variadic function -// error-pattern:cannot find type `F` in this scope +//@ error-pattern:unexpected `self` parameter in function +//@ error-pattern:`...` must be the last argument of a C-variadic function +//@ error-pattern:cannot find type `F` in this scope #![feature(c_variadic)] diff --git a/tests/ui/c-variadic/variadic-ffi-1.rs b/tests/ui/c-variadic/variadic-ffi-1.rs index acd8a25dc533b..e41ab26921112 100644 --- a/tests/ui/c-variadic/variadic-ffi-1.rs +++ b/tests/ui/c-variadic/variadic-ffi-1.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/c-variadic/variadic-ffi-2.rs b/tests/ui/c-variadic/variadic-ffi-2.rs index a412a58d7c59c..a7261ebe9365e 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.rs +++ b/tests/ui/c-variadic/variadic-ffi-2.rs @@ -1,4 +1,4 @@ -// ignore-arm stdcall isn't supported +//@ ignore-arm stdcall isn't supported #![feature(extended_varargs_abi_support)] fn baz(f: extern "stdcall" fn(usize, ...)) { diff --git a/tests/ui/c-variadic/variadic-unreachable-arg-error.rs b/tests/ui/c-variadic/variadic-unreachable-arg-error.rs index f60f6f3e80872..e3fd24a088cfd 100644 --- a/tests/ui/c-variadic/variadic-unreachable-arg-error.rs +++ b/tests/ui/c-variadic/variadic-unreachable-arg-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_variadic)] diff --git a/tests/ui/can-copy-pod.rs b/tests/ui/can-copy-pod.rs index e6c57ca3f7116..dd4cf54040aaf 100644 --- a/tests/ui/can-copy-pod.rs +++ b/tests/ui/can-copy-pod.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs index a0a561ab2d21e..0575c29bffdb3 100644 --- a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs +++ b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(x: &mut Box) { *x = Box::new(5); diff --git a/tests/ui/capture1.rs b/tests/ui/capture1.rs index 2938c084537d0..9bf6532a7d382 100644 --- a/tests/ui/capture1.rs +++ b/tests/ui/capture1.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn main() { let bar: isize = 5; diff --git a/tests/ui/cast/cast-does-fallback.rs b/tests/ui/cast/cast-does-fallback.rs index 770f7a31c7642..553bf51a53d8c 100644 --- a/tests/ui/cast/cast-does-fallback.rs +++ b/tests/ui/cast/cast-does-fallback.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Test that these type check correctly. diff --git a/tests/ui/cast/cast-from-nil.rs b/tests/ui/cast/cast-from-nil.rs index b5ceef76ac20e..8a677603aa9fd 100644 --- a/tests/ui/cast/cast-from-nil.rs +++ b/tests/ui/cast/cast-from-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `()` as `u32` +//@ error-pattern: non-primitive cast: `()` as `u32` fn main() { let u = (assert!(true) as u32); } diff --git a/tests/ui/cast/cast-pointee-projection.rs b/tests/ui/cast/cast-pointee-projection.rs index f51c5f20f167c..1786152699adb 100644 --- a/tests/ui/cast/cast-pointee-projection.rs +++ b/tests/ui/cast/cast-pointee-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tag<'a> { type Type: ?Sized; diff --git a/tests/ui/cast/cast-region-to-uint.rs b/tests/ui/cast/cast-region-to-uint.rs index 33ec2d27610e4..6f4edadafee51 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 +//@ run-pass pub fn main() { let x: isize = 3; diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs index be6a6bb8b1755..410e15d024fab 100644 --- a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs +++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that you can cast between different pointers to trait objects // whose vtable have the same kind (both lengths, or both trait pointers). diff --git a/tests/ui/cast/cast-rfc0401.rs b/tests/ui/cast/cast-rfc0401.rs index 424feeba0c467..f917f93a1c824 100644 --- a/tests/ui/cast/cast-rfc0401.rs +++ b/tests/ui/cast/cast-rfc0401.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/cast/cast-to-infer-ty.rs b/tests/ui/cast/cast-to-infer-ty.rs index 053ebb621a7fe..d82eaa9f8ea93 100644 --- a/tests/ui/cast/cast-to-infer-ty.rs +++ b/tests/ui/cast/cast-to-infer-ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that we allow a cast to `_` so long as the target type can be // inferred elsewhere. diff --git a/tests/ui/cast/cast-to-nil.rs b/tests/ui/cast/cast-to-nil.rs index 085bb09e631db..d91f9a16a07f5 100644 --- a/tests/ui/cast/cast-to-nil.rs +++ b/tests/ui/cast/cast-to-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `u32` as `()` +//@ error-pattern: non-primitive cast: `u32` as `()` fn main() { let u = 0u32 as (); } diff --git a/tests/ui/cast/cast.rs b/tests/ui/cast/cast.rs index 218275c4d99ae..b9f21792816d6 100644 --- a/tests/ui/cast/cast.rs +++ b/tests/ui/cast/cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/cast/codegen-object-shim.rs b/tests/ui/cast/codegen-object-shim.rs index 9a85a50ebd9b1..6256ab17ec6ad 100644 --- a/tests/ui/cast/codegen-object-shim.rs +++ b/tests/ui/cast/codegen-object-shim.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!((ToString::to_string as fn(&(dyn ToString+'static)) -> String)(&"foo"), diff --git a/tests/ui/cast/fat-ptr-cast-rpass.rs b/tests/ui/cast/fat-ptr-cast-rpass.rs index c79468cadddd9..be9e29f215041 100644 --- a/tests/ui/cast/fat-ptr-cast-rpass.rs +++ b/tests/ui/cast/fat-ptr-cast-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] diff --git a/tests/ui/cast/issue-84213.fixed b/tests/ui/cast/issue-84213.fixed index b5c4a77529664..a0dc4a896668d 100644 --- a/tests/ui/cast/issue-84213.fixed +++ b/tests/ui/cast/issue-84213.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-84213.rs b/tests/ui/cast/issue-84213.rs index 6eb81291abc7f..93b584c6d35a3 100644 --- a/tests/ui/cast/issue-84213.rs +++ b/tests/ui/cast/issue-84213.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-89497.fixed b/tests/ui/cast/issue-89497.fixed index 04c10a5f79ed4..4229199fa43a1 100644 --- a/tests/ui/cast/issue-89497.fixed +++ b/tests/ui/cast/issue-89497.fixed @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/issue-89497.rs b/tests/ui/cast/issue-89497.rs index 76301b704c81c..e934560ddabab 100644 --- a/tests/ui/cast/issue-89497.rs +++ b/tests/ui/cast/issue-89497.rs @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/ptr-to-ptr-different-regions.rs b/tests/ui/cast/ptr-to-ptr-different-regions.rs index 5592e613ac1ee..0d525edc1332f 100644 --- a/tests/ui/cast/ptr-to-ptr-different-regions.rs +++ b/tests/ui/cast/ptr-to-ptr-different-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/113257 diff --git a/tests/ui/cast/supported-cast.rs b/tests/ui/cast/supported-cast.rs index ff41ce6c79ac1..4862d7a4125bb 100644 --- a/tests/ui/cast/supported-cast.rs +++ b/tests/ui/cast/supported-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let f = 1_usize as *const String; diff --git a/tests/ui/catch-unwind-bang.rs b/tests/ui/catch-unwind-bang.rs index fb3503937cb54..c874c649f3330 100644 --- a/tests/ui/catch-unwind-bang.rs +++ b/tests/ui/catch-unwind-bang.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind fn worker() -> ! { panic!() diff --git a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs index 24d2dc645519d..b04b1e0c32624 100644 --- a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs +++ b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:ver-cfg-rel.rs -// revisions: assume no_assume -// [assume]compile-flags: -Z assume-incomplete-release +//@ run-pass +//@ aux-build:ver-cfg-rel.rs +//@ revisions: assume no_assume +//@ [assume]compile-flags: -Z assume-incomplete-release #![feature(cfg_version)] diff --git a/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs b/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs index 067c620f5fe85..e06ee94a1e96f 100644 --- a/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs +++ b/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs b/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs index 8e89545b8f40d..a5c14be4c29de 100644 --- a/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs +++ b/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs @@ -1,7 +1,7 @@ // `#![no_std]` on a fully unconfigured crate is respected if it's placed before `cfg(FALSE)`. // Therefore this crate doesn't link to libstd. -// no-prefer-dynamic +//@ no-prefer-dynamic #![no_std] #![crate_type = "lib"] diff --git a/tests/ui/cfg/cfg-attr-cfg.rs b/tests/ui/cfg/cfg-attr-cfg.rs index 61794e0bfa90e..5b49966d54451 100644 --- a/tests/ui/cfg/cfg-attr-cfg.rs +++ b/tests/ui/cfg/cfg-attr-cfg.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // main is conditionally compiled, but the conditional compilation // is conditional too! -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg_attr(foo, cfg(bar))] fn main() { } diff --git a/tests/ui/cfg/cfg-attr-crate.rs b/tests/ui/cfg/cfg-attr-crate.rs index 1d70f2f84f29b..7868b006e27d0 100644 --- a/tests/ui/cfg/cfg-attr-crate.rs +++ b/tests/ui/cfg/cfg-attr-crate.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![cfg_attr(not_used, no_core)] diff --git a/tests/ui/cfg/cfg-false-feature.rs b/tests/ui/cfg/cfg-false-feature.rs index 84c231562f1e1..6645f667d7e65 100644 --- a/tests/ui/cfg/cfg-false-feature.rs +++ b/tests/ui/cfg/cfg-false-feature.rs @@ -1,7 +1,7 @@ // Features above `cfg(FALSE)` are in effect in a fully unconfigured crate (issue #104633). -// check-pass -// compile-flags: --crate-type lib +//@ check-pass +//@ compile-flags: --crate-type lib #![feature(decl_macro)] #![cfg(FALSE)] diff --git a/tests/ui/cfg/cfg-family.rs b/tests/ui/cfg/cfg-family.rs index c7d196a2aa6eb..b90656a0b41f4 100644 --- a/tests/ui/cfg/cfg-family.rs +++ b/tests/ui/cfg/cfg-family.rs @@ -1,7 +1,7 @@ -// build-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no bare family -// ignore-sgx +//@ build-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no bare family +//@ ignore-sgx #[cfg(windows)] pub fn main() { diff --git a/tests/ui/cfg/cfg-in-crate-1.rs b/tests/ui/cfg/cfg-in-crate-1.rs index e84300aa331af..07e1c3727f988 100644 --- a/tests/ui/cfg/cfg-in-crate-1.rs +++ b/tests/ui/cfg/cfg-in-crate-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg bar -D warnings +//@ run-pass +//@ compile-flags: --cfg bar -D warnings #![cfg(bar)] fn main() {} diff --git a/tests/ui/cfg/cfg-macros-foo.rs b/tests/ui/cfg/cfg-macros-foo.rs index 8b112c7961b89..7cdf2df5c8f61 100644 --- a/tests/ui/cfg/cfg-macros-foo.rs +++ b/tests/ui/cfg/cfg-macros-foo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo +//@ run-pass +//@ compile-flags: --cfg foo // check that cfg correctly chooses between the macro impls (see also // cfg-macros-notfoo.rs) diff --git a/tests/ui/cfg/cfg-macros-notfoo.rs b/tests/ui/cfg/cfg-macros-notfoo.rs index 292d97821cdb0..c47f4332aa3c3 100644 --- a/tests/ui/cfg/cfg-macros-notfoo.rs +++ b/tests/ui/cfg/cfg-macros-notfoo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: +//@ run-pass +//@ compile-flags: // check that cfg correctly chooses between the macro impls (see also // cfg-macros-foo.rs) diff --git a/tests/ui/cfg/cfg-match-arm.rs b/tests/ui/cfg/cfg-match-arm.rs index 071008f9eb6a4..a41337a19a373 100644 --- a/tests/ui/cfg/cfg-match-arm.rs +++ b/tests/ui/cfg/cfg-match-arm.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar, diff --git a/tests/ui/cfg/cfg-method-receiver-ok.rs b/tests/ui/cfg/cfg-method-receiver-ok.rs index 61ad3b8c17ab2..2f4881de6723e 100644 --- a/tests/ui/cfg/cfg-method-receiver-ok.rs +++ b/tests/ui/cfg/cfg-method-receiver-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { () => { diff --git a/tests/ui/cfg/cfg-panic-abort.rs b/tests/ui/cfg/cfg-panic-abort.rs index 3853b598a7a79..49adfd55c6835 100644 --- a/tests/ui/cfg/cfg-panic-abort.rs +++ b/tests/ui/cfg/cfg-panic-abort.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ build-pass +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #[cfg(panic = "unwind")] diff --git a/tests/ui/cfg/cfg-panic.rs b/tests/ui/cfg/cfg-panic.rs index 2de72d54a481a..0f1f539ebe3ea 100644 --- a/tests/ui/cfg/cfg-panic.rs +++ b/tests/ui/cfg/cfg-panic.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -C panic=unwind -// needs-unwind +//@ build-pass +//@ compile-flags: -C panic=unwind +//@ needs-unwind #[cfg(panic = "abort")] diff --git a/tests/ui/cfg/cfg-path-error.rs b/tests/ui/cfg/cfg-path-error.rs index 5bf80bd74b843..1e52922d0793f 100644 --- a/tests/ui/cfg/cfg-path-error.rs +++ b/tests/ui/cfg/cfg-path-error.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[cfg(any(foo, foo::bar))] //~^ERROR `cfg` predicate key must be an identifier diff --git a/tests/ui/cfg/cfg-target-abi.rs b/tests/ui/cfg/cfg-target-abi.rs index acc570fc84314..5d13337c1c303 100644 --- a/tests/ui/cfg/cfg-target-abi.rs +++ b/tests/ui/cfg/cfg-target-abi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(cfg_target_abi)] #[cfg(target_abi = "eabihf")] diff --git a/tests/ui/cfg/cfg-target-compact-errors.rs b/tests/ui/cfg/cfg-target-compact-errors.rs index bca2275b1a957..daacbb2851d17 100644 --- a/tests/ui/cfg/cfg-target-compact-errors.rs +++ b/tests/ui/cfg/cfg-target-compact-errors.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(cfg_target_compact)] diff --git a/tests/ui/cfg/cfg-target-compact.rs b/tests/ui/cfg/cfg-target-compact.rs index dc95a80915c43..7698b36333575 100644 --- a/tests/ui/cfg/cfg-target-compact.rs +++ b/tests/ui/cfg/cfg-target-compact.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(cfg_target_compact)] #[cfg(target(os = "linux", pointer_width = "64"))] diff --git a/tests/ui/cfg/cfg-target-family.rs b/tests/ui/cfg/cfg-target-family.rs index 5182cdc8940a0..ab3be302e6400 100644 --- a/tests/ui/cfg/cfg-target-family.rs +++ b/tests/ui/cfg/cfg-target-family.rs @@ -1,7 +1,7 @@ -// build-pass -// ignore-sgx +//@ build-pass +//@ ignore-sgx -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg(target_family = "windows")] pub fn main() {} diff --git a/tests/ui/cfg/cfg-target-vendor.rs b/tests/ui/cfg/cfg-target-vendor.rs index 7824585162e5c..e5de95d04e54e 100644 --- a/tests/ui/cfg/cfg-target-vendor.rs +++ b/tests/ui/cfg/cfg-target-vendor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(target_vendor = "unknown")] pub fn main() { } diff --git a/tests/ui/cfg/cfg_attr.rs b/tests/ui/cfg/cfg_attr.rs index c959e68acf966..4bd024ef5f40c 100644 --- a/tests/ui/cfg/cfg_attr.rs +++ b/tests/ui/cfg/cfg_attr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--cfg set1 --cfg set2 +//@ run-pass +//@ compile-flags:--cfg set1 --cfg set2 #![allow(dead_code)] use std::fmt::Debug; diff --git a/tests/ui/cfg/cfg_false_no_std-1.rs b/tests/ui/cfg/cfg_false_no_std-1.rs index bcb49e5135364..17286e219b866 100644 --- a/tests/ui/cfg/cfg_false_no_std-1.rs +++ b/tests/ui/cfg/cfg_false_no_std-1.rs @@ -1,7 +1,7 @@ // No error, panic handler is supplied by libstd linked though the empty library. -// check-pass -// aux-build: cfg_false_lib_no_std_after.rs +//@ check-pass +//@ aux-build: cfg_false_lib_no_std_after.rs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs index 0a2bfd5f68b12..cd33756587210 100644 --- a/tests/ui/cfg/cfg_false_no_std-2.rs +++ b/tests/ui/cfg/cfg_false_no_std-2.rs @@ -1,8 +1,8 @@ // Error, the linked empty library is `no_std` and doesn't provide a panic handler. -// dont-check-compiler-stderr -// error-pattern: `#[panic_handler]` function required, but not found -// aux-build: cfg_false_lib_no_std_before.rs +//@ dont-check-compiler-stderr +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ aux-build: cfg_false_lib_no_std_before.rs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std.rs b/tests/ui/cfg/cfg_false_no_std.rs index 4fa831715ede1..910f3f8b9ae1f 100644 --- a/tests/ui/cfg/cfg_false_no_std.rs +++ b/tests/ui/cfg/cfg_false_no_std.rs @@ -1,7 +1,7 @@ // No error, panic handler is supplied by libstd linked though the empty library. -// check-pass -// aux-build: cfg_false_lib.rs +//@ check-pass +//@ aux-build: cfg_false_lib.rs #![no_std] diff --git a/tests/ui/cfg/cfg_inner_static.rs b/tests/ui/cfg/cfg_inner_static.rs index 45dbbcc10844b..f4e2dc092f878 100644 --- a/tests/ui/cfg/cfg_inner_static.rs +++ b/tests/ui/cfg/cfg_inner_static.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:cfg_inner_static.rs +//@ run-pass +//@ aux-build:cfg_inner_static.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate cfg_inner_static; diff --git a/tests/ui/cfg/cfg_stmt_expr.rs b/tests/ui/cfg/cfg_stmt_expr.rs index f9f4c98102c99..6de5eb5c4c6ab 100644 --- a/tests/ui/cfg/cfg_stmt_expr.rs +++ b/tests/ui/cfg/cfg_stmt_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/cfg/cfgs-on-items.rs b/tests/ui/cfg/cfgs-on-items.rs index 9f2fc49423e7b..b3b38cfadb553 100644 --- a/tests/ui/cfg/cfgs-on-items.rs +++ b/tests/ui/cfg/cfgs-on-items.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg fooA --cfg fooB +//@ run-pass +//@ compile-flags: --cfg fooA --cfg fooB // fooA AND !bar diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs index c6ecf4807364d..678b32c6a4e82 100644 --- a/tests/ui/cfg/conditional-compile-arch.rs +++ b/tests/ui/cfg/conditional-compile-arch.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[cfg(target_arch = "x86")] pub fn main() { } diff --git a/tests/ui/cfg/conditional-compile.rs b/tests/ui/cfg/conditional-compile.rs index 69f4de43186d5..f39663adda276 100644 --- a/tests/ui/cfg/conditional-compile.rs +++ b/tests/ui/cfg/conditional-compile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] diff --git a/tests/ui/cfg/crt-static-off-works.rs b/tests/ui/cfg/crt-static-off-works.rs index 911467ee54ea7..1d77dba24b1cd 100644 --- a/tests/ui/cfg/crt-static-off-works.rs +++ b/tests/ui/cfg/crt-static-off-works.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// compile-flags:-C target-feature=-crt-static -Z unstable-options -// ignore-musl - requires changing the linker which is hard +//@ compile-flags:-C target-feature=-crt-static -Z unstable-options +//@ ignore-musl - requires changing the linker which is hard #![feature(cfg_target_feature)] diff --git a/tests/ui/cfg/crt-static-on-works.rs b/tests/ui/cfg/crt-static-on-works.rs index f89d1edd6586a..13b7d4bc51995 100644 --- a/tests/ui/cfg/crt-static-on-works.rs +++ b/tests/ui/cfg/crt-static-on-works.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:-C target-feature=+crt-static -// only-msvc +//@ run-pass +//@ compile-flags:-C target-feature=+crt-static +//@ only-msvc #[cfg(target_feature = "crt-static")] fn main() {} diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs index ad4e47b7b2e06..77dd91d6c2823 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.rs +++ b/tests/ui/cfg/diagnostics-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cfged_out.rs +//@ aux-build:cfged_out.rs extern crate cfged_out; diff --git a/tests/ui/cfg/expanded-cfg.rs b/tests/ui/cfg/expanded-cfg.rs index baa161af76abc..75860146e745f 100644 --- a/tests/ui/cfg/expanded-cfg.rs +++ b/tests/ui/cfg/expanded-cfg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! mac { {} => { diff --git a/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs b/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs index 1f23dadc43226..96e326e02ad44 100644 --- a/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs +++ b/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags:--cfg foo +//@ check-fail +//@ compile-flags:--cfg foo #![cfg_attr(foo, crate_type="bin")] //~^ERROR `crate_type` within diff --git a/tests/ui/cfguard-run.rs b/tests/ui/cfguard-run.rs index 3c4f9a1f5ee2c..52ad3e3cc042b 100644 --- a/tests/ui/cfguard-run.rs +++ b/tests/ui/cfguard-run.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C control-flow-guard +//@ run-pass +//@ compile-flags: -C control-flow-guard pub fn main() { println!("hello, world"); diff --git a/tests/ui/char.rs b/tests/ui/char.rs index cfb7a37af0111..a7842f16fa7a6 100644 --- a/tests/ui/char.rs +++ b/tests/ui/char.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let c: char = 'x'; diff --git a/tests/ui/check-cfg/allow-at-crate-level.rs b/tests/ui/check-cfg/allow-at-crate-level.rs index 1629d2e0b6739..48258b97ccc4e 100644 --- a/tests/ui/check-cfg/allow-at-crate-level.rs +++ b/tests/ui/check-cfg/allow-at-crate-level.rs @@ -1,7 +1,7 @@ // This test check that #![allow(unexpected_cfgs)] works with --cfg // -// check-pass -// compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-macro-cfg.rs b/tests/ui/check-cfg/allow-macro-cfg.rs index ea26355aca8fc..d3999af776631 100644 --- a/tests/ui/check-cfg/allow-macro-cfg.rs +++ b/tests/ui/check-cfg/allow-macro-cfg.rs @@ -1,7 +1,7 @@ // This test check that local #[allow(unexpected_cfgs)] works // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] fn foo() { diff --git a/tests/ui/check-cfg/allow-same-level.rs b/tests/ui/check-cfg/allow-same-level.rs index 29491e0b39e21..231ad522c8d0a 100644 --- a/tests/ui/check-cfg/allow-same-level.rs +++ b/tests/ui/check-cfg/allow-same-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] #[cfg(FALSE)] diff --git a/tests/ui/check-cfg/allow-top-level.rs b/tests/ui/check-cfg/allow-top-level.rs index df06f655d9af2..c77a0c7c97bae 100644 --- a/tests/ui/check-cfg/allow-top-level.rs +++ b/tests/ui/check-cfg/allow-top-level.rs @@ -1,7 +1,7 @@ // This test check that a top-level #![allow(unexpected_cfgs)] works // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-upper-level.rs b/tests/ui/check-cfg/allow-upper-level.rs index bd5c97815f2de..97339a887bf5d 100644 --- a/tests/ui/check-cfg/allow-upper-level.rs +++ b/tests/ui/check-cfg/allow-upper-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] work if put on an upper level // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] mod aa { diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs index 8542174d0c099..a91068ca05ae7 100644 --- a/tests/ui/check-cfg/cargo-feature.rs +++ b/tests/ui/check-cfg/cargo-feature.rs @@ -2,14 +2,14 @@ // suggest adding some in the Cargo.toml instead of vomitting a // list of all the expected names // -// check-pass -// revisions: some none -// rustc-env:CARGO=/usr/bin/cargo -// compile-flags: -Z unstable-options -// [none]compile-flags: --check-cfg=cfg(feature,values()) -// [some]compile-flags: --check-cfg=cfg(feature,values("bitcode")) -// [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y")) -// [none]error-pattern:Cargo.toml +//@ check-pass +//@ revisions: some none +//@ rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: -Z unstable-options +//@ [none]compile-flags: --check-cfg=cfg(feature,values()) +//@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode")) +//@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y")) +//@ [none]error-pattern:Cargo.toml #[cfg(feature = "serde")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs index a6e68e1b7101c..35c5f2ae31cc4 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs @@ -1,9 +1,9 @@ // #120427 // This test checks we won't suggest more than 3 span suggestions for cfg names // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value")) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value")) #[cfg(value)] //~^ WARNING unexpected `cfg` condition name: `value` diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs index edde6244ed1a9..6caedbe719e5e 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs @@ -1,9 +1,9 @@ // #120427 // This test checks that when a single cfg has a value for user's specified name // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value")) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value")) #[cfg(my_value)] //~^ WARNING unexpected `cfg` condition name: `my_value` diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs index 7a0c345b7ca76..eade190a75cc6 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs @@ -2,9 +2,9 @@ // This test checks that when a single cfg has a value for user's specified name // suggest to use `#[cfg(target_os = "linux")]` instead of `#[cfg(linux)]` // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg() +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[cfg(linux)] //~^ WARNING unexpected `cfg` condition name: `linux` diff --git a/tests/ui/check-cfg/compact-names.rs b/tests/ui/check-cfg/compact-names.rs index 4f7168255cf3b..6592d2acb82df 100644 --- a/tests/ui/check-cfg/compact-names.rs +++ b/tests/ui/check-cfg/compact-names.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/compact-values.rs b/tests/ui/check-cfg/compact-values.rs index 80cf75d2770d5..8df2bf55264f7 100644 --- a/tests/ui/check-cfg/compact-values.rs +++ b/tests/ui/check-cfg/compact-values.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/concat-values.rs b/tests/ui/check-cfg/concat-values.rs index ad922f8c9088e..0b2c1949ca39b 100644 --- a/tests/ui/check-cfg/concat-values.rs +++ b/tests/ui/check-cfg/concat-values.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar")) -// compile-flags: --check-cfg=cfg(my_cfg,values()) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar")) +//@ compile-flags: --check-cfg=cfg(my_cfg,values()) #[cfg(my_cfg)] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs index 33073f05f6979..54138d158904d 100644 --- a/tests/ui/check-cfg/diagnotics.rs +++ b/tests/ui/check-cfg/diagnotics.rs @@ -1,8 +1,8 @@ -// check-pass -// revisions: cargo rustc -// [rustc]unset-rustc-env:CARGO -// [cargo]rustc-env:CARGO=/usr/bin/cargo -// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options +//@ check-pass +//@ revisions: cargo rustc +//@ [rustc]unset-rustc-env:CARGO +//@ [cargo]rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options #[cfg(featur)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/empty-values.rs b/tests/ui/check-cfg/empty-values.rs index 7e6ba6ae84a86..07462951e1bf7 100644 --- a/tests/ui/check-cfg/empty-values.rs +++ b/tests/ui/check-cfg/empty-values.rs @@ -1,7 +1,7 @@ // Check that we detect unexpected value when none are allowed // -// check-pass -// compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options #[cfg(foo = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/exhaustive-names-values.rs b/tests/ui/check-cfg/exhaustive-names-values.rs index 956992a1e777d..d554c19ef25ab 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.rs +++ b/tests/ui/check-cfg/exhaustive-names-values.rs @@ -1,11 +1,11 @@ // Check warning for unexpected cfg in the code. // -// check-pass -// revisions: empty_cfg feature full -// compile-flags: -Z unstable-options -// [empty_cfg]compile-flags: --check-cfg=cfg() -// [feature]compile-flags: --check-cfg=cfg(feature,values("std")) -// [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg() +//@ check-pass +//@ revisions: empty_cfg feature full +//@ compile-flags: -Z unstable-options +//@ [empty_cfg]compile-flags: --check-cfg=cfg() +//@ [feature]compile-flags: --check-cfg=cfg(feature,values("std")) +//@ [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg() #[cfg(unknown_key = "value")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/exhaustive-names.rs b/tests/ui/check-cfg/exhaustive-names.rs index 8066802069957..edfb3705a7dc3 100644 --- a/tests/ui/check-cfg/exhaustive-names.rs +++ b/tests/ui/check-cfg/exhaustive-names.rs @@ -1,7 +1,7 @@ // Check warning for unexpected cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(unknown_key = "value")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/exhaustive-values.rs b/tests/ui/check-cfg/exhaustive-values.rs index 430d3b89e7abd..5e65caa6aea7c 100644 --- a/tests/ui/check-cfg/exhaustive-values.rs +++ b/tests/ui/check-cfg/exhaustive-values.rs @@ -1,9 +1,9 @@ // Check warning for unexpected cfg value // -// check-pass -// revisions: empty_cfg without_names -// [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options -// [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options +//@ check-pass +//@ revisions: empty_cfg without_names +//@ [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options +//@ [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options #[cfg(test = "value")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs index 60ba6315558d0..bdcc202443bac 100644 --- a/tests/ui/check-cfg/invalid-arguments.rs +++ b/tests/ui/check-cfg/invalid-arguments.rs @@ -1,36 +1,36 @@ // Check that invalid --check-cfg are rejected // -// check-fail -// revisions: anything_else -// revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values -// revisions: multiple_values_any not_empty_any not_empty_values_any -// revisions: values_any_missing_values values_any_before_ident ident_in_values_1 -// revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3 -// revisions: mixed_values_any mixed_any any_values giberich unterminated -// revisions: none_not_empty cfg_none +//@ check-fail +//@ revisions: anything_else +//@ revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values +//@ revisions: multiple_values_any not_empty_any not_empty_values_any +//@ revisions: values_any_missing_values values_any_before_ident ident_in_values_1 +//@ revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3 +//@ revisions: mixed_values_any mixed_any any_values giberich unterminated +//@ revisions: none_not_empty cfg_none // -// compile-flags: -Z unstable-options -// [anything_else]compile-flags: --check-cfg=anything_else(...) -// [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT") -// [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar) -// [multiple_any]compile-flags: --check-cfg=cfg(any(),any()) -// [multiple_values]compile-flags: --check-cfg=cfg(foo,values(),values()) -// [multiple_values_any]compile-flags: --check-cfg=cfg(foo,values(any(),any())) -// [not_empty_any]compile-flags: --check-cfg=cfg(any(foo)) -// [not_empty_values_any]compile-flags: --check-cfg=cfg(foo,values(any(bar))) -// [values_any_missing_values]compile-flags: --check-cfg=cfg(foo,any()) -// [values_any_before_ident]compile-flags: --check-cfg=cfg(values(any()),foo) -// [ident_in_values_1]compile-flags: --check-cfg=cfg(foo,values(bar)) -// [ident_in_values_2]compile-flags: --check-cfg=cfg(foo,values("bar",bar,"bar")) -// [unknown_meta_item_1]compile-flags: --check-cfg=abc() -// [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test()) -// [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test())) -// [none_not_empty]compile-flags: --check-cfg=cfg(foo,values(none("test"))) -// [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any())) -// [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any())) -// [any_values]compile-flags: --check-cfg=cfg(any(),values()) -// [cfg_none]compile-flags: --check-cfg=cfg(none()) -// [giberich]compile-flags: --check-cfg=cfg(...) -// [unterminated]compile-flags: --check-cfg=cfg( +//@ compile-flags: -Z unstable-options +//@ [anything_else]compile-flags: --check-cfg=anything_else(...) +//@ [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT") +//@ [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar) +//@ [multiple_any]compile-flags: --check-cfg=cfg(any(),any()) +//@ [multiple_values]compile-flags: --check-cfg=cfg(foo,values(),values()) +//@ [multiple_values_any]compile-flags: --check-cfg=cfg(foo,values(any(),any())) +//@ [not_empty_any]compile-flags: --check-cfg=cfg(any(foo)) +//@ [not_empty_values_any]compile-flags: --check-cfg=cfg(foo,values(any(bar))) +//@ [values_any_missing_values]compile-flags: --check-cfg=cfg(foo,any()) +//@ [values_any_before_ident]compile-flags: --check-cfg=cfg(values(any()),foo) +//@ [ident_in_values_1]compile-flags: --check-cfg=cfg(foo,values(bar)) +//@ [ident_in_values_2]compile-flags: --check-cfg=cfg(foo,values("bar",bar,"bar")) +//@ [unknown_meta_item_1]compile-flags: --check-cfg=abc() +//@ [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test()) +//@ [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test())) +//@ [none_not_empty]compile-flags: --check-cfg=cfg(foo,values(none("test"))) +//@ [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any())) +//@ [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any())) +//@ [any_values]compile-flags: --check-cfg=cfg(any(),values()) +//@ [cfg_none]compile-flags: --check-cfg=cfg(none()) +//@ [giberich]compile-flags: --check-cfg=cfg(...) +//@ [unterminated]compile-flags: --check-cfg=cfg( fn main() {} diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs index a6c3efee61167..ba30bc1e69b50 100644 --- a/tests/ui/check-cfg/mix.rs +++ b/tests/ui/check-cfg/mix.rs @@ -2,9 +2,9 @@ // and that no implicit cfgs is added from --cfg while also testing that // we correctly lint on the `cfg!` macro and `cfg_attr` attribute. // -// check-pass -// compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options -// compile-flags: --check-cfg=cfg(feature,values("foo")) +//@ check-pass +//@ compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options +//@ compile-flags: --check-cfg=cfg(feature,values("foo")) #[cfg(windows)] fn do_windows_stuff() {} diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs index 4f8481315df6b..a80f9ec97764a 100644 --- a/tests/ui/check-cfg/no-expected-values.rs +++ b/tests/ui/check-cfg/no-expected-values.rs @@ -1,12 +1,12 @@ // Check that we detect unexpected value when none are allowed // -// check-pass -// revisions: simple mixed empty -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(values,simple,mixed,empty) -// [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) -// [mixed]compile-flags: --check-cfg=cfg(test,feature) -// [empty]compile-flags: --check-cfg=cfg(test,feature,values(none())) +//@ check-pass +//@ revisions: simple mixed empty +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(values,simple,mixed,empty) +//@ [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) +//@ [mixed]compile-flags: --check-cfg=cfg(test,feature) +//@ [empty]compile-flags: --check-cfg=cfg(test,feature,values(none())) #[cfg(feature = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/order-independant.rs b/tests/ui/check-cfg/order-independant.rs index 86e3cfa1d9bfd..9ac96d0b15bfd 100644 --- a/tests/ui/check-cfg/order-independant.rs +++ b/tests/ui/check-cfg/order-independant.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass // -// revisions: values_before values_after -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(values_before,values_after) +//@ revisions: values_before values_after +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(values_before,values_after) // -// [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a) -// [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b")) +//@ [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a) +//@ [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b")) #[cfg(a)] fn my_cfg() {} diff --git a/tests/ui/check-cfg/stmt-no-ice.rs b/tests/ui/check-cfg/stmt-no-ice.rs index 383e830a1b225..8a447ade068db 100644 --- a/tests/ui/check-cfg/stmt-no-ice.rs +++ b/tests/ui/check-cfg/stmt-no-ice.rs @@ -1,7 +1,7 @@ // This test checks that there is no ICE with this code // -// check-pass -// compile-flags:--check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags:--check-cfg=cfg() -Z unstable-options fn main() { #[cfg(crossbeam_loom)] diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs index 9fc0e28a8fec0..5ea9f560ee42c 100644 --- a/tests/ui/check-cfg/unexpected-cfg-name.rs +++ b/tests/ui/check-cfg/unexpected-cfg-name.rs @@ -1,7 +1,7 @@ // Check warning for unexpected configuration name // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(widnows)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/unexpected-cfg-value.rs b/tests/ui/check-cfg/unexpected-cfg-value.rs index 54dce0f0de407..a4a10e503be55 100644 --- a/tests/ui/check-cfg/unexpected-cfg-value.rs +++ b/tests/ui/check-cfg/unexpected-cfg-value.rs @@ -1,8 +1,8 @@ // Check for unexpected configuration value in the code. // -// check-pass -// compile-flags: --cfg=feature="rand" -Z unstable-options -// compile-flags: --check-cfg=cfg(feature,values("serde","full")) +//@ check-pass +//@ compile-flags: --cfg=feature="rand" -Z unstable-options +//@ compile-flags: --check-cfg=cfg(feature,values("serde","full")) #[cfg(feature = "sedre")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/unknown-values.rs b/tests/ui/check-cfg/unknown-values.rs index c082a2f25ace2..61ea82871b23e 100644 --- a/tests/ui/check-cfg/unknown-values.rs +++ b/tests/ui/check-cfg/unknown-values.rs @@ -1,12 +1,12 @@ // Check that no warning is emitted for unknown cfg value // -// check-pass -// revisions: simple mixed with_values -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(simple,mixed,with_values) -// [simple]compile-flags: --check-cfg=cfg(foo,values(any())) -// [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any())) -// [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa")) +//@ check-pass +//@ revisions: simple mixed with_values +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(simple,mixed,with_values) +//@ [simple]compile-flags: --check-cfg=cfg(foo,values(any())) +//@ [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any())) +//@ [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa")) #[cfg(foo = "value")] pub fn f() {} diff --git a/tests/ui/check-cfg/values-none.rs b/tests/ui/check-cfg/values-none.rs index 957ed43a2e236..6a68020e41826 100644 --- a/tests/ui/check-cfg/values-none.rs +++ b/tests/ui/check-cfg/values-none.rs @@ -1,12 +1,12 @@ -// check-pass +//@ check-pass // -// revisions: explicit implicit -// compile-flags: -Zunstable-options -// [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) -// [implicit]compile-flags: --check-cfg=cfg(foo) -// [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) -// [concat_1]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values("too")) -// [concat_2]compile-flags: --check-cfg=cfg(foo,values("too")) --check-cfg=cfg(foo) +//@ revisions: explicit implicit +//@ compile-flags: -Zunstable-options +//@ [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) +//@ [implicit]compile-flags: --check-cfg=cfg(foo) +//@ [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) +//@ [concat_1]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values("too")) +//@ [concat_2]compile-flags: --check-cfg=cfg(foo,values("too")) --check-cfg=cfg(foo) #[cfg(foo = "too")] //[explicit]~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs index 47ac79e0dbffd..afe6e0aaffd3b 100644 --- a/tests/ui/check-cfg/values-target-json.rs +++ b/tests/ui/check-cfg/values-target-json.rs @@ -1,8 +1,8 @@ // This test checks that we don't lint values defined by a custom target (target json) // -// check-pass -// needs-llvm-components: x86 -// compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options +//@ check-pass +//@ needs-llvm-components: x86 +//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/check-cfg/well-known-names.rs b/tests/ui/check-cfg/well-known-names.rs index 32c14703d25b5..a0feee4225a3f 100644 --- a/tests/ui/check-cfg/well-known-names.rs +++ b/tests/ui/check-cfg/well-known-names.rs @@ -1,7 +1,7 @@ // This test checks that we lint on non well known names and that we don't lint on well known names // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(target_oz = "linux")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/well-known-values.rs b/tests/ui/check-cfg/well-known-values.rs index 34af54ccf4ae2..0c55e35a993fb 100644 --- a/tests/ui/check-cfg/well-known-values.rs +++ b/tests/ui/check-cfg/well-known-values.rs @@ -4,8 +4,8 @@ // This test also serve as an "anti-regression" for the well known // values since the suggestion shows them. // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_overflow_checks)] #![feature(cfg_relocation_model)] diff --git a/tests/ui/check-static-recursion-foreign.rs b/tests/ui/check-static-recursion-foreign.rs index 3072deb6c5a3d..418c149dcc428 100644 --- a/tests/ui/check-static-recursion-foreign.rs +++ b/tests/ui/check-static-recursion-foreign.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Static recursion check shouldn't fail when given a foreign item (#18279) -// aux-build:check_static_recursion_foreign_helper.rs -// ignore-wasm32-bare no libc to test ffi with +//@ aux-build:check_static_recursion_foreign_helper.rs +//@ ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] diff --git a/tests/ui/cleanup-rvalue-for-scope.rs b/tests/ui/cleanup-rvalue-for-scope.rs index 38a41f3b8d739..8f5ee8723fd66 100644 --- a/tests/ui/cleanup-rvalue-for-scope.rs +++ b/tests/ui/cleanup-rvalue-for-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/cleanup-rvalue-scopes.rs b/tests/ui/cleanup-rvalue-scopes.rs index 56340e515b973..09ceda065b9d3 100644 --- a/tests/ui/cleanup-rvalue-scopes.rs +++ b/tests/ui/cleanup-rvalue-scopes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(non_snake_case)] #![allow(unused_variables)] diff --git a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs index 6cd3781b76055..80c5a8fe0995f 100644 --- a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs +++ b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_must_use)] #![allow(dead_code)] @@ -20,7 +20,7 @@ // It's unclear how likely such a bug is to recur, but it seems like a // scenario worth testing. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/cleanup-shortcircuit.rs b/tests/ui/cleanup-shortcircuit.rs index fe867ce1fbd57..312491fee241e 100644 --- a/tests/ui/cleanup-shortcircuit.rs +++ b/tests/ui/cleanup-shortcircuit.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that cleanups for the RHS of shortcircuiting operators work. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deref_nullptr)] diff --git a/tests/ui/close-over-big-then-small-data.rs b/tests/ui/close-over-big-then-small-data.rs index 429b21e8b8b99..d3cb1db8886b4 100644 --- a/tests/ui/close-over-big-then-small-data.rs +++ b/tests/ui/close-over-big-then-small-data.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // If we use GEPi rather than GEP_tup_like when diff --git a/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs b/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs index 5f02e642defca..f0e20d67fa6c9 100644 --- a/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs +++ b/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] diff --git a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs index 0ee738c2c2f39..799dc8bf08999 100644 --- a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs +++ b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs index 15711da4b0fbb..e9109ddff1a74 100644 --- a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs +++ b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/tests/ui/closure-expected-type/issue-24421.rs b/tests/ui/closure-expected-type/issue-24421.rs index 2e104b599bd75..13fcf77dae670 100644 --- a/tests/ui/closure-expected-type/issue-24421.rs +++ b/tests/ui/closure-expected-type/issue-24421.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn test(f: F) {} diff --git a/tests/ui/closures/2229_closure_analysis/array_subslice.rs b/tests/ui/closures/2229_closure_analysis/array_subslice.rs index 5f244ea89365d..90efaea967a3c 100644 --- a/tests/ui/closures/2229_closure_analysis/array_subslice.rs +++ b/tests/ui/closures/2229_closure_analysis/array_subslice.rs @@ -1,5 +1,5 @@ // regression test for #109298 -// edition: 2021 +//@ edition: 2021 pub fn subslice_array(x: [u8; 3]) { let f = || { diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs index 191cb4c7236e0..c194cea2e374a 100644 --- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs +++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] // Ensure that capture analysis results in arrays being completely captured. diff --git a/tests/ui/closures/2229_closure_analysis/bad-pattern.rs b/tests/ui/closures/2229_closure_analysis/bad-pattern.rs index a7bf9b67d453e..ca3540ad20d80 100644 --- a/tests/ui/closures/2229_closure_analysis/bad-pattern.rs +++ b/tests/ui/closures/2229_closure_analysis/bad-pattern.rs @@ -1,5 +1,5 @@ // regression test for #108683 -// edition:2021 +//@ edition:2021 enum Refutable { A, diff --git a/tests/ui/closures/2229_closure_analysis/by_value.rs b/tests/ui/closures/2229_closure_analysis/by_value.rs index d3bde3cea6396..3fa28a1c6e923 100644 --- a/tests/ui/closures/2229_closure_analysis/by_value.rs +++ b/tests/ui/closures/2229_closure_analysis/by_value.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we handle derferences properly when only some of the captures are being moved with // `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs index 1a800b6b7f288..fa1ddeb0176a8 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs index 9b1825e904284..eb342b303f900 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs index e9923a81bf634..e1476e415d952 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs index 8c1963455a507..6d53a0ac63422 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs index 2bf127ed5e833..68703333fa874 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs index bf36de634a9b5..0c006ffdd728d 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs b/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs index bbe3aa31a98df..6e3da1236db6f 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #[derive(Debug, PartialEq, Eq)] pub enum Color { diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.rs b/tests/ui/closures/2229_closure_analysis/capture-enums.rs index 47926e27f0c33..6f973739e6675 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enums.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-enums.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs index 18697a79cffb2..5143836ad6b90 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs index 2f899f8c60aa5..0cb0aeb824eda 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs index a0b949e1351b5..3106c478d00c0 100644 --- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs index f97e60daf43a8..3abc81e191ebf 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that arrays are completely captured by closures by relying on the borrow check diagnostics diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs index 3664d76c2038f..aae56e72b0504 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs index ae416bab65ea5..f3ef014b67b82 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs index 00f50c33e1ccd..d10baf59b07ec 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs index 16f7df1b36347..c7a37a8184854 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs index 5ff7b1242db70..8db7742174c5a 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs index a110fa4e2cb3e..746e4cb17094a 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test borrow checker when we precise capture when using boxes diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs index 77effcb006588..77e3ffdc47dea 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that if we deref an immutable borrow to access a Place, // then we can't mutate the final place. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs index 25ee9a1490e0c..27a64232629f7 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Ensure that diagnostics for mutability error (because the root variable // isn't mutable) work with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs index f3be542e40d7a..2a1713ab8df72 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that array access is not stored as part of closure kind origin diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs index aa85b55b15cc7..196ef395c403e 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs index bedb103cc4c7b..7791c8f07848c 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 enum SingleVariant { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs index 3277a83c4e147..8d55260c7c459 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs index dc3a57ae793e7..4fa6766431aa3 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs index fa1328013db45..a69f23939f948 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct S(String, String); diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs index 3399bc0018e54..c550af21f0753 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// check-pass +//@ check-pass #![allow(unreachable_code)] #![warn(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs index 465c9476ba65b..bcd4d1090a411 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// check-pass +//@ check-pass #![warn(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs index fa73ff23f9cd3..1c25449822a26 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that when a borrow checker diagnostics are emitted, it's as precise // as the capture by the closure. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs index 3d5a31e8b8e49..5827eab84cd01 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we can't mutate a place if we need to deref an imm-borrow // to reach it. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs index c7ee90ea73fd6..fe5106c57af68 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Given how the closure desugaring is implemented (at least at the time of writing this test), // we don't need to truncate the captured path to a reference into a packed-struct if the field diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs index ed2d9a3de00f8..881810e9671a7 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that borrow checker error is accurate and that min capture pass of the // closure analysis is working as expected. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs index 695337ea82cf9..647005bc1c970 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we point to the correct location that results a union being captured. // Union is special because it can't be disjointly captured. diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs index 26990b4305f85..059c248a3e807 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs index bfa3ebcd6d286..11ef92367ca2c 100644 --- a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs +++ b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/issue-87378.rs index f0707b51bbb66..0a771466e1e75 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87378.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-87378.rs @@ -1,6 +1,6 @@ #![feature(rustc_attrs)] -// edition:2021 +//@ edition:2021 // Test that any precise capture on a union is truncated because it's unsafe to do so. diff --git a/tests/ui/closures/2229_closure_analysis/issue-87987.rs b/tests/ui/closures/2229_closure_analysis/issue-87987.rs index d26343c33cfbe..f79a8f1b57100 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87987.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-87987.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 struct Props { field_1: u32, //~ WARNING: fields `field_1` and `field_2` are never read diff --git a/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs b/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs index 0cfb1a55bf27f..27c1eac88e573 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![feature(if_let_guard)] #[allow(unused_must_use)] #[allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/issue-88476.rs index 58d86283f908b..7f833839d5668 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88476.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-88476.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-89606.rs b/tests/ui/closures/2229_closure_analysis/issue-89606.rs index 1bb6aa40f06fa..8c88a4b82261f 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-89606.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-89606.rs @@ -1,9 +1,9 @@ // Regression test for #89606. Used to ICE. // -// check-pass -// revisions: twenty_eighteen twenty_twentyone -// [twenty_eighteen]compile-flags: --edition 2018 -// [twenty_twentyone]compile-flags: --edition 2021 +//@ check-pass +//@ revisions: twenty_eighteen twenty_twentyone +//@ [twenty_eighteen]compile-flags: --edition 2018 +//@ [twenty_twentyone]compile-flags: --edition 2021 struct S<'a>(Option<&'a mut i32>); diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.fixed b/tests/ui/closures/2229_closure_analysis/issue-90465.fixed index 4e0b18e72338a..3bbac007b4f84 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-90465.fixed +++ b/tests/ui/closures/2229_closure_analysis/issue-90465.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.rs b/tests/ui/closures/2229_closure_analysis/issue-90465.rs index 466e6dbabc502..cb11832d06c80 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-90465.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-90465.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs b/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs index a3b17755faccc..9c5f5992adb03 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs @@ -1,5 +1,5 @@ // ICEs if checking if there is a significant destructor causes a query cycle -// check-pass +//@ check-pass #![warn(rust_2021_incompatible_closure_captures)] pub struct Foo(Bar); diff --git a/tests/ui/closures/2229_closure_analysis/issue_88118.rs b/tests/ui/closures/2229_closure_analysis/issue_88118.rs index bfb487649a3ce..0042d51039c70 100644 --- a/tests/ui/closures/2229_closure_analysis/issue_88118.rs +++ b/tests/ui/closures/2229_closure_analysis/issue_88118.rs @@ -1,6 +1,6 @@ // Regression test for #88118. Used to ICE. -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass fn foo(handler: impl FnOnce() -> MsU + Clone + 'static) { Box::new(move |value| { diff --git a/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs b/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs index 17e38c033b168..e19838995eecc 100644 --- a/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs +++ b/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs @@ -1,7 +1,7 @@ // Check the if let guards don't force capture by value -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs b/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs index fa331707be465..a629a91bb9062 100644 --- a/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs +++ b/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs @@ -1,8 +1,8 @@ // Check the if let guards don't force capture by value -// revisions: e2018 e2021 -// check-pass -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ revisions: e2018 e2021 +//@ check-pass +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs index 815fc0a719cfd..3b41665cb4a0b 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 enum Variant { A, diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs index 74506979a28c5..e023fc363ddc8 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 pub fn foo() { let ref_x_ck = 123; diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs index 27e7fabf11ab6..da57f3ff9d109 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 const LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: i32 = 0x01; const LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: i32 = 0x02; diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs b/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs index 0a6d71c68ae84..e3c1aed24cbb3 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Copy, Clone, PartialEq, Eq)] pub struct Opcode(pub u8); diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs index 106485e04eea6..840eda0513f89 100644 --- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs +++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 const PATTERN_REF: &str = "Hello World"; const NUMBER: i32 = 30; diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs index ae724f9c3cc6f..a3b19708899a0 100644 --- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs +++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 enum SingleVariant { A diff --git a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs index 972c24c23b019..3225558271812 100644 --- a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs +++ b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// aux-build:match_non_exhaustive_lib.rs +//@ aux-build:match_non_exhaustive_lib.rs /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs index 69cf920de9478..377b1ab10c4b2 100644 --- a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs +++ b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(never_type)] diff --git a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs index c3898afa967f8..8dd20fc2a7445 100644 --- a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs +++ b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed index e8ca5ccdc54bf..c1d88cbdf8374 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs index fb464b7f1e1c8..6b452fcdaf111 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed index 9a6db588c8bf5..e9e16ce951b24 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] #[derive(Debug)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs index 08cc24b4b3fe8..0cb5351f595e0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] #[derive(Debug)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed index 2652bf5988e65..a70926678e384 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs index 2652bf5988e65..a70926678e384 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed index d985e3bb9ec74..2784a60364437 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs index f95d34eeb299a..e5de7ba3c6233 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs index 3f184a67fbac9..8b71e5ed1b2a2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(rust_2021_incompatible_closure_captures)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs index 98f8d5d473380..3e72eec4ea8c6 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(rust_2021_incompatible_closure_captures)] #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs index fce9cac627b5e..1bae9f487a177 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs index ed8cb042b3ea6..64fd2f01a5d6f 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs @@ -1,5 +1,5 @@ // Test that rustc doesn't ICE as in #90024. -// check-pass +//@ check-pass // edition=2018 #![warn(rust_2021_incompatible_closure_captures)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed b/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed index 31fe494dc795a..8946642892ff1 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // See https://github.com/rust-lang/rust/issues/87955 diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.rs b/tests/ui/closures/2229_closure_analysis/migrations/macro.rs index 0f0c497492290..f50b985298d7a 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/macro.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // See https://github.com/rust-lang/rust/issues/87955 diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed index ce8b607259576..b87c398da396d 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs index 2237bebd788e7..5e763b0239ae0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed index ff2244a8e31b9..3ff73bf4681c0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// needs-unwind +//@ run-rustfix +//@ needs-unwind #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs index 52e96d013a265..21f1a9515a6a0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs @@ -1,5 +1,5 @@ -// run-rustfix -// needs-unwind +//@ run-rustfix +//@ needs-unwind #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed index 7c4e5c0f9a5bb..8bbd7fab569c8 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs index f979db11b7e22..62fe1581bac04 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs index 8b75e226ab59b..35ed8158bc2e2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Set of test cases that don't need migrations diff --git a/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs b/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs index 16e3cca7b7714..5f9e7d295bae1 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that the old name for `rust_2021_incompatible_closure_captures` is still // accepted by the compiler diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed index 7892a72c76523..5743f9984be24 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs index f5e99002bd08a..2ddd2535c7270 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs index 587d71c40fc69..f46ec4b927aca 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(rust_2021_incompatible_closure_captures)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed index 672aa4be686ae..8aa07cd5442a2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs index 9c751064688c4..b53461d14df31 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs b/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs index 39cf82053f7df..8d7224a60c00a 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs @@ -1,4 +1,4 @@ -//run-pass +//@run-pass #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused_must_use)] diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.rs b/tests/ui/closures/2229_closure_analysis/move_closure.rs index 31e04fa6d5c5e..3b7f036dfe7ec 100644 --- a/tests/ui/closures/2229_closure_analysis/move_closure.rs +++ b/tests/ui/closures/2229_closure_analysis/move_closure.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that move closures drop derefs with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs index 8a6ecfbb9be88..2d7c26074cb16 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs index fff80f9c855fa..bcf0ed35137c6 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/nested-closure.rs index a7e3ef3b39c98..c481b3d853beb 100644 --- a/tests/ui/closures/2229_closure_analysis/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/nested-closure.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs index a7686f3b08f01..8df0eeb0eb4c1 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs index 5496d0e5fc7e3..71b5a48367bf1 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs index b8e2d6651a7fd..2d3db4fde722c 100644 --- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs +++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs index 26c227a1edd38..c30eaf8fb1b43 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Tests that in cases where we individually capture all the fields of a type, // we still drop them in the order they would have been dropped in the 2018 edition. diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs index 1cae776dd68bc..4fc2e6c903a93 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs @@ -1,8 +1,8 @@ -// run-pass -// check-run-results -// revisions: twenty_eighteen twenty_twentyone -// [twenty_eighteen]compile-flags: --edition 2018 -// [twenty_twentyone]compile-flags: --edition 2021 +//@ run-pass +//@ check-run-results +//@ revisions: twenty_eighteen twenty_twentyone +//@ [twenty_eighteen]compile-flags: --edition 2018 +//@ [twenty_twentyone]compile-flags: --edition 2021 #[derive(Debug)] struct Dropable(&'static str); diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/repr_packed.rs index 3ed8587783e4d..0dde2b12b8796 100644 --- a/tests/ui/closures/2229_closure_analysis/repr_packed.rs +++ b/tests/ui/closures/2229_closure_analysis/repr_packed.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs index 73aca288faa88..be8822121a5cc 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test precise capture when using boxes diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs index f8752fe1cec04..b0763fd1033c9 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that ByValue captures compile successfully especially when the captures are // dereferenced within the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs index 3cb1eb32952d8..981fa2d124078 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can immutably borrow field of an instance of a structure from within a closure, // while having a mutable borrow to another field of the same instance outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs index 0f79b7ae7b8c6..56c97d5d8e976 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can mutate an element of a tuple from within a closure // while immutably borrowing another element of the same tuple outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs index 81f0328b9ba5f..1204ea2865755 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can immutably borrow an element of a tuple from within a closure, // while having a mutable borrow to another element of the same tuple outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs index cea02fbe15d34..787cba4b056a7 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass fn test1() { let foo : [Vec; 3] = ["String".into(), "String".into(), "String".into()]; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs index 5c278bff90bb0..4fd70c0bb7ebd 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![warn(unused)] fn main() { diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs index dacc2c616b8b6..6d6779ca6bd20 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![warn(unused)] struct Point { 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 6d4cf6fa553b7..671a4dbb0c77a 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 +//@ edition:2021 +//@ run-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/drop_then_use_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs index b5e97ec1c1b8d..1d7dcf2e3c5a6 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(rustc_attrs)] #![allow(dropping_references)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs index 20bbe1d89e45d..8874fc57eee70 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that edition 2021 enables disjoint capture by default. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs index e19f5ff1bae4d..f0973e435f07f 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test disjoint capture within an impl block diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs index 1286613cb13ba..c32846796f8dc 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that functional record update/struct update syntax works inside // a closure when the feature `capture_disjoint_fields` is enabled. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs index c64475fda43de..60190736963f0 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass union Union { value: u64, 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 25fbb6cb90696..1fa272117e9b8 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 +//@ edition:2021 +//@ run-pass fn solve(validate: F) -> Option diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs index 99962053077a9..ded9b2355e49b 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass use std::collections::HashMap; use std::future::Future; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs index f44c2af803bcb..0abb6db4694fe 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::rc::Rc; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs index a386e9f40ccaf..7a4d7d9a81ec4 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![warn(unused)] #![feature(rustc_attrs)] #![feature(btree_extract_if)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs index f76965bdd3fcc..625a6f9592ab6 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that move closures compile properly with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs index 624e0ff22568d..683ca886021a4 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that closures can capture paths that are more precise than just one level // from the root variable. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs index bd8addd37812a..947de10ee4a50 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs index 8fc0efb60b755..ac406837f908d 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs index bc2386e5d23d8..9b3f6d046b4c0 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs @@ -1,8 +1,8 @@ // Test precise capture of a multi-variant enum (when remaining variants are // visibly uninhabited). -// revisions: min_exhaustive_patterns exhaustive_patterns -// edition:2021 -// run-pass +//@ revisions: min_exhaustive_patterns exhaustive_patterns +//@ edition:2021 +//@ run-pass #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete 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 9f0c4d96aa5d9..3106908c621db 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 +//@ edition:2021 +//@ run-pass // Test that we can mutate a place through a mut-borrow // that is captured by the closure diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs index a85335438a9fb..4897598fc539a 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can mutate a place through a mut-borrow // that is captured by the closure diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs index a80b40bb46957..d0370d71610ca 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test whether if we can do precise capture when using nested clsoure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs index ed222b3148f41..df42b80cfa474 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![warn(unused)] #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs index f3f44433ccf3d..758e5f9d98f60 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #[derive(Copy, Clone)] enum PointType { diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs index 3f7ddf93f0697..2af9b8d7088ca 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can use raw ptrs when using `capture_disjoint_fields`. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs index 0206927cc59e9..659ee34c6ea58 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![feature(rustc_attrs)] fn main() { diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs index 03b70383e5411..4b749a705771f 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs index f21ef43fb7ccb..193ed98daa9d2 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // regression test for #112056 diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs index dd9d986c2089b..03a208b8c2659 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // regression test for #112056 diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs index 1f87c9b99925d..33d43c5f526b5 100644 --- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs +++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we restrict precision of a capture when we access a raw ptr, // i.e. the capture doesn't deref the raw ptr. diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs index 12695929fced6..9adf20c21d574 100644 --- a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/binder/async-closure-with-binder.rs b/tests/ui/closures/binder/async-closure-with-binder.rs index 69d30f369e97d..24f4e8e4175a6 100644 --- a/tests/ui/closures/binder/async-closure-with-binder.rs +++ b/tests/ui/closures/binder/async-closure-with-binder.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(closure_lifetime_binder)] #![feature(async_closure)] diff --git a/tests/ui/closures/binder/bounds-on-closure-type-binders.rs b/tests/ui/closures/binder/bounds-on-closure-type-binders.rs index 099047251ca56..cf53241407feb 100644 --- a/tests/ui/closures/binder/bounds-on-closure-type-binders.rs +++ b/tests/ui/closures/binder/bounds-on-closure-type-binders.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![allow(incomplete_features)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/closures/binder/late-bound-in-body.rs b/tests/ui/closures/binder/late-bound-in-body.rs index bb5c7552fdaa8..335fd75d99b78 100644 --- a/tests/ui/closures/binder/late-bound-in-body.rs +++ b/tests/ui/closures/binder/late-bound-in-body.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/binder/nested-closures-regions.rs b/tests/ui/closures/binder/nested-closures-regions.rs index 6bfc6c80b7882..f1febee43bbe6 100644 --- a/tests/ui/closures/binder/nested-closures-regions.rs +++ b/tests/ui/closures/binder/nested-closures-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/binder/nested-closures.rs b/tests/ui/closures/binder/nested-closures.rs index b3c36e7eebb7a..072d615cfa9b2 100644 --- a/tests/ui/closures/binder/nested-closures.rs +++ b/tests/ui/closures/binder/nested-closures.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/capture-unsized-by-move.rs b/tests/ui/closures/capture-unsized-by-move.rs index 1148e34ac675d..72f6a5501e83c 100644 --- a/tests/ui/closures/capture-unsized-by-move.rs +++ b/tests/ui/closures/capture-unsized-by-move.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![feature(unsized_fn_params)] diff --git a/tests/ui/closures/capture-unsized-by-ref.rs b/tests/ui/closures/capture-unsized-by-ref.rs index c9e4a5903d932..d24649858db07 100644 --- a/tests/ui/closures/capture-unsized-by-ref.rs +++ b/tests/ui/closures/capture-unsized-by-ref.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![feature(unsized_fn_params)] diff --git a/tests/ui/closures/closure-immutable-outer-variable.fixed b/tests/ui/closures/closure-immutable-outer-variable.fixed index 1b0feede34ecf..ec43471fe05fb 100644 --- a/tests/ui/closures/closure-immutable-outer-variable.fixed +++ b/tests/ui/closures/closure-immutable-outer-variable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Point at the captured immutable outer variable diff --git a/tests/ui/closures/closure-immutable-outer-variable.rs b/tests/ui/closures/closure-immutable-outer-variable.rs index 50ec1c6148a04..6f1fc4c210d91 100644 --- a/tests/ui/closures/closure-immutable-outer-variable.rs +++ b/tests/ui/closures/closure-immutable-outer-variable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Point at the captured immutable outer variable diff --git a/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs b/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs index ce461810ec990..75197bfc67f48 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure non-capturing Closure passes CoerceMany. fn foo(x: usize) -> usize { 0 diff --git a/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs b/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs index 3c5fe8a550276..a5fe83a22dcbf 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure non-capturing Closure passing CoerceMany work correctly. fn foo(_: usize) -> usize { 0 diff --git a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs index a6d6125a1b9f9..3cf3793a8c933 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure we get correct unsafe function after coercion unsafe fn add(a: i32, b: i32) -> i32 { a + b diff --git a/tests/ui/closures/closure_promotion.rs b/tests/ui/closures/closure_promotion.rs index 47a8fc0902d3e..c790e423a806b 100644 --- a/tests/ui/closures/closure_promotion.rs +++ b/tests/ui/closures/closure_promotion.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let x: &'static _ = &|| { let z = 3; z }; diff --git a/tests/ui/closures/deeply-nested_closures.rs b/tests/ui/closures/deeply-nested_closures.rs index a02684ee1de1e..5407702f7c51b 100644 --- a/tests/ui/closures/deeply-nested_closures.rs +++ b/tests/ui/closures/deeply-nested_closures.rs @@ -1,6 +1,6 @@ // Check that this can be compiled in a reasonable time. -// build-pass +//@ build-pass fn main() { // 96 nested closures diff --git a/tests/ui/closures/diverging-closure.rs b/tests/ui/closures/diverging-closure.rs index 1213a883ef0a3..dda829d8af42e 100644 --- a/tests/ui/closures/diverging-closure.rs +++ b/tests/ui/closures/diverging-closure.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:oops -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oops +//@ ignore-emscripten no processes fn main() { let func = || -> ! { diff --git a/tests/ui/closures/infer-signature-from-impl.rs b/tests/ui/closures/infer-signature-from-impl.rs index 8b18e4ef9e743..910e004ba3178 100644 --- a/tests/ui/closures/infer-signature-from-impl.rs +++ b/tests/ui/closures/infer-signature-from-impl.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] known-bug: trait-system-refactor-initiative#71 -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: trait-system-refactor-initiative#71 +//@[current] check-pass trait Foo {} fn needs_foo(_: T) diff --git a/tests/ui/closures/issue-101696.rs b/tests/ui/closures/issue-101696.rs index 0a358bd164387..5be7f184a7a6f 100644 --- a/tests/ui/closures/issue-101696.rs +++ b/tests/ui/closures/issue-101696.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/closures/issue-102089-multiple-opaque-cast.rs b/tests/ui/closures/issue-102089-multiple-opaque-cast.rs index 043bf06a1f521..1378556d4534f 100644 --- a/tests/ui/closures/issue-102089-multiple-opaque-cast.rs +++ b/tests/ui/closures/issue-102089-multiple-opaque-cast.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass pub struct Example<'a, T> { a: T, diff --git a/tests/ui/closures/issue-10682.rs b/tests/ui/closures/issue-10682.rs index 72e4559d31a79..25636b9063b98 100644 --- a/tests/ui/closures/issue-10682.rs +++ b/tests/ui/closures/issue-10682.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Regression test for issue #10682 // Nested `proc` usage can't use outer owned data -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn work(_: Box) {} fn foo(_: F) {} diff --git a/tests/ui/closures/issue-23012-supertrait-signature-inference.rs b/tests/ui/closures/issue-23012-supertrait-signature-inference.rs index 5899b703e7c13..732f687309ce4 100644 --- a/tests/ui/closures/issue-23012-supertrait-signature-inference.rs +++ b/tests/ui/closures/issue-23012-supertrait-signature-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that we can infer a closure signature even if the `FnOnce` bound is // a supertrait of the obligations we have currently registered for the Ty var. diff --git a/tests/ui/closures/issue-41366.rs b/tests/ui/closures/issue-41366.rs index acc1c6ae1225d..e2141c0dc1365 100644 --- a/tests/ui/closures/issue-41366.rs +++ b/tests/ui/closures/issue-41366.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T<'x> { type V; diff --git a/tests/ui/closures/issue-42463.rs b/tests/ui/closures/issue-42463.rs index 51d6ea3f7a8bb..d09a744bd7e3e 100644 --- a/tests/ui/closures/issue-42463.rs +++ b/tests/ui/closures/issue-42463.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Deref, DerefMut}; struct CheckedDeref { diff --git a/tests/ui/closures/issue-46742.rs b/tests/ui/closures/issue-46742.rs index cd8dc486906bb..72e429f7ec7dd 100644 --- a/tests/ui/closures/issue-46742.rs +++ b/tests/ui/closures/issue-46742.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _: i32 = (match "" { "+" => ::std::ops::Add::add, diff --git a/tests/ui/closures/issue-48109.rs b/tests/ui/closures/issue-48109.rs index ce1f2a0364764..c1557dab47ae3 100644 --- a/tests/ui/closures/issue-48109.rs +++ b/tests/ui/closures/issue-48109.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn useful(i: usize) -> usize { i } diff --git a/tests/ui/closures/issue-68025.rs b/tests/ui/closures/issue-68025.rs index 261bfd60aaea9..912fe5ecc5f49 100644 --- a/tests/ui/closures/issue-68025.rs +++ b/tests/ui/closures/issue-68025.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: G, _: Box) where diff --git a/tests/ui/closures/issue-72408-nested-closures-exponential.rs b/tests/ui/closures/issue-72408-nested-closures-exponential.rs index d064ebceffd5c..682508f928082 100644 --- a/tests/ui/closures/issue-72408-nested-closures-exponential.rs +++ b/tests/ui/closures/issue-72408-nested-closures-exponential.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-compare-mode-next-solver (hangs) +//@ build-pass +//@ ignore-compare-mode-next-solver (hangs) // Closures include captured types twice in a type tree. // diff --git a/tests/ui/closures/issue-868.rs b/tests/ui/closures/issue-868.rs index df03b191a99e9..170597b4bd5ed 100644 --- a/tests/ui/closures/issue-868.rs +++ b/tests/ui/closures/issue-868.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(unit_bindings)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(g: F) -> T where F: FnOnce() -> T { g() } diff --git a/tests/ui/closures/issue-87461.rs b/tests/ui/closures/issue-87461.rs index 0151080eeb44a..cc5b10c544d03 100644 --- a/tests/ui/closures/issue-87461.rs +++ b/tests/ui/closures/issue-87461.rs @@ -1,6 +1,6 @@ // Regression test for #87461. -// edition:2021 +//@ edition:2021 async fn func() -> Result { let _ = async { diff --git a/tests/ui/closures/issue-87814-1.rs b/tests/ui/closures/issue-87814-1.rs index 5cf01ddf5d71b..4506a8effaff8 100644 --- a/tests/ui/closures/issue-87814-1.rs +++ b/tests/ui/closures/issue-87814-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut schema_all = vec![]; (0..42).for_each(|_x| match Err(()) as Result<(), _> { diff --git a/tests/ui/closures/issue-87814-2.rs b/tests/ui/closures/issue-87814-2.rs index efe77f90f0658..8035adbeb03aa 100644 --- a/tests/ui/closures/issue-87814-2.rs +++ b/tests/ui/closures/issue-87814-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut schema_all: (Vec, Vec) = (vec![], vec![]); diff --git a/tests/ui/closures/issue-97607.rs b/tests/ui/closures/issue-97607.rs index 74c910ad0bba6..6dccf8113d694 100644 --- a/tests/ui/closures/issue-97607.rs +++ b/tests/ui/closures/issue-97607.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[allow(unused)] fn test(f: F) -> Box U + 'static> diff --git a/tests/ui/closures/local-type-mix.rs b/tests/ui/closures/local-type-mix.rs index 006e6f490f06b..823ceb211a362 100644 --- a/tests/ui/closures/local-type-mix.rs +++ b/tests/ui/closures/local-type-mix.rs @@ -1,5 +1,5 @@ // Check that using the parameter name in its type does not ICE. -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/closures/old-closure-arg-call-as.rs b/tests/ui/closures/old-closure-arg-call-as.rs index 87cf3a487bf43..23def1c990e12 100644 --- a/tests/ui/closures/old-closure-arg-call-as.rs +++ b/tests/ui/closures/old-closure-arg-call-as.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] diff --git a/tests/ui/closures/old-closure-arg.rs b/tests/ui/closures/old-closure-arg.rs index bd1385e5c3347..6d68d95f891e4 100644 --- a/tests/ui/closures/old-closure-arg.rs +++ b/tests/ui/closures/old-closure-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check usage and precedence of block arguments in expressions: pub fn main() { let v = vec![-1.0f64, 0.0, 1.0, 2.0, 3.0]; diff --git a/tests/ui/closures/old-closure-explicit-types.rs b/tests/ui/closures/old-closure-explicit-types.rs index 860fcc8df2101..0c3a88bf87121 100644 --- a/tests/ui/closures/old-closure-explicit-types.rs +++ b/tests/ui/closures/old-closure-explicit-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { fn as_buf(s: String, f: F) -> T where F: FnOnce(String) -> T { f(s) } diff --git a/tests/ui/closures/old-closure-expr-precedence.rs b/tests/ui/closures/old-closure-expr-precedence.rs index 13b2fe9c3d1a9..e0d3633e5c3c7 100644 --- a/tests/ui/closures/old-closure-expr-precedence.rs +++ b/tests/ui/closures/old-closure-expr-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_parens)] diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.fixed b/tests/ui/closures/old-closure-expression-remove-semicolon.fixed index 8aa9e952b9901..3b1032c03a736 100644 --- a/tests/ui/closures/old-closure-expression-remove-semicolon.fixed +++ b/tests/ui/closures/old-closure-expression-remove-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32 { 0 diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.rs b/tests/ui/closures/old-closure-expression-remove-semicolon.rs index 912c7a3314ac9..edff1823d09fe 100644 --- a/tests/ui/closures/old-closure-expression-remove-semicolon.rs +++ b/tests/ui/closures/old-closure-expression-remove-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32 { 0 diff --git a/tests/ui/closures/old-closure-fn-coerce.rs b/tests/ui/closures/old-closure-fn-coerce.rs index d993ad9945974..42b4f65223459 100644 --- a/tests/ui/closures/old-closure-fn-coerce.rs +++ b/tests/ui/closures/old-closure-fn-coerce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn force(f: F) -> isize where F: FnOnce() -> isize { return f(); } diff --git a/tests/ui/closures/old-closure-iter-1.rs b/tests/ui/closures/old-closure-iter-1.rs index caf0266cff155..34d49d0e0fecc 100644 --- a/tests/ui/closures/old-closure-iter-1.rs +++ b/tests/ui/closures/old-closure-iter-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn iter_vec(v: Vec , mut f: F) where F: FnMut(&T) { for x in &v { f(x); } } diff --git a/tests/ui/closures/old-closure-iter-2.rs b/tests/ui/closures/old-closure-iter-2.rs index e90c1ee815aae..cd38892a47048 100644 --- a/tests/ui/closures/old-closure-iter-2.rs +++ b/tests/ui/closures/old-closure-iter-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn iter_vec(v: Vec, mut f: F) where F: FnMut(&T) { for x in &v { f(x); } } diff --git a/tests/ui/closures/once-move-out-on-heap.rs b/tests/ui/closures/once-move-out-on-heap.rs index 4e2e400cec023..37e5359aec9c5 100644 --- a/tests/ui/closures/once-move-out-on-heap.rs +++ b/tests/ui/closures/once-move-out-on-heap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing guarantees provided by once functions. diff --git a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs index b6c7659bc724c..c74a7128fbfb9 100644 --- a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals +//@ compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals mod mod1 { pub fn f(t: T) diff --git a/tests/ui/closures/print/closure-print-generic-verbose-1.rs b/tests/ui/closures/print/closure-print-generic-verbose-1.rs index 6c631fabaa25d..e24fc6707098d 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-1.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals fn to_fn_once(f: F) -> F { f } diff --git a/tests/ui/closures/print/closure-print-generic-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-verbose-2.rs index dcf7fb2865ccc..9b95e2604c15c 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals mod mod1 { pub fn f(t: T) diff --git a/tests/ui/closures/print/closure-print-verbose.rs b/tests/ui/closures/print/closure-print-verbose.rs index 76fe5471a601e..83613639ceddd 100644 --- a/tests/ui/closures/print/closure-print-verbose.rs +++ b/tests/ui/closures/print/closure-print-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as closure-coerce-fn-1.rs diff --git a/tests/ui/closures/self-supertrait-bounds.rs b/tests/ui/closures/self-supertrait-bounds.rs index f4f1cea6b8176..965e183ea1659 100644 --- a/tests/ui/closures/self-supertrait-bounds.rs +++ b/tests/ui/closures/self-supertrait-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Makes sure that we only consider `Self` supertrait predicates while // elaborating during closure signature deduction. diff --git a/tests/ui/closures/semistatement-in-lambda.rs b/tests/ui/closures/semistatement-in-lambda.rs index ebd55e0ba02f1..cfefa51b93ea7 100644 --- a/tests/ui/closures/semistatement-in-lambda.rs +++ b/tests/ui/closures/semistatement-in-lambda.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] diff --git a/tests/ui/closures/static-closures-with-nonstatic-return.rs b/tests/ui/closures/static-closures-with-nonstatic-return.rs index b5f0684bae92b..13dbc3f67f47f 100644 --- a/tests/ui/closures/static-closures-with-nonstatic-return.rs +++ b/tests/ui/closures/static-closures-with-nonstatic-return.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84366 +//@ check-pass +//@ known-bug: #84366 // Should fail. Associated types of 'static types should be `'static`, but // argument-free closures can be `'static` and return non-`'static` types. diff --git a/tests/ui/closures/supertrait-hint-cycle-2.rs b/tests/ui/closures/supertrait-hint-cycle-2.rs index fda81b18d1e94..5bf850e3ef309 100644 --- a/tests/ui/closures/supertrait-hint-cycle-2.rs +++ b/tests/ui/closures/supertrait-hint-cycle-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { type Input; diff --git a/tests/ui/closures/supertrait-hint-cycle-3.rs b/tests/ui/closures/supertrait-hint-cycle-3.rs index 8149474df196e..4003f679fa2f1 100644 --- a/tests/ui/closures/supertrait-hint-cycle-3.rs +++ b/tests/ui/closures/supertrait-hint-cycle-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { diff --git a/tests/ui/closures/supertrait-hint-cycle.rs b/tests/ui/closures/supertrait-hint-cycle.rs index dbb06b2ef7a7a..52c24a414aca6 100644 --- a/tests/ui/closures/supertrait-hint-cycle.rs +++ b/tests/ui/closures/supertrait-hint-cycle.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(type_alias_impl_trait)] #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/supertrait-hint-references-assoc-ty.rs b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs index 270bf14c35eca..fa74ffc5bec51 100644 --- a/tests/ui/closures/supertrait-hint-references-assoc-ty.rs +++ b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Fn0: Fn(i32) -> Self::Out { type Out; diff --git a/tests/ui/closures/thir-unsafeck-issue-85871.rs b/tests/ui/closures/thir-unsafeck-issue-85871.rs index a4a487c4dc2e8..270a004f042df 100644 --- a/tests/ui/closures/thir-unsafeck-issue-85871.rs +++ b/tests/ui/closures/thir-unsafeck-issue-85871.rs @@ -1,6 +1,6 @@ // Tests that no ICE occurs when a closure appears inside a node // that does not have a body when compiling with -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs index bbc039bdf5c7b..364d0858afb96 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-pass +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs index b8112b20a54c6..c225a26c065d6 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-fail +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs index f32b3709002e6..3265cf4146dc7 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs index 6f8bb24aa69e8..b47471c6ad7c7 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs index 5591a8a5864b5..e197f94096d1d 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-pass +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs index 39b41dac41f77..e2da3ebb6ae16 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-fail +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs index 3783e2794021f..87eccb4fc6e3e 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs @@ -1,4 +1,4 @@ -// ignore-thumbv8m.main-none-eabi +//@ ignore-thumbv8m.main-none-eabi #![feature(cmse_nonsecure_entry)] #[no_mangle] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs index 72c14cd7a6919..db4f90e9923cc 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang = "sized"] diff --git a/tests/ui/codegen/const-bool-bitcast.rs b/tests/ui/codegen/const-bool-bitcast.rs index 24ae76b902991..58db7859438c7 100644 --- a/tests/ui/codegen/const-bool-bitcast.rs +++ b/tests/ui/codegen/const-bool-bitcast.rs @@ -1,6 +1,6 @@ // This is a regression test for https://github.com/rust-lang/rust/issues/118047 -// build-pass -// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp +//@ build-pass +//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp #![crate_type = "lib"] diff --git a/tests/ui/codegen/freeze-on-polymorphic-projection.rs b/tests/ui/codegen/freeze-on-polymorphic-projection.rs index edc79f8fd94bd..f382a3780fcf7 100644 --- a/tests/ui/codegen/freeze-on-polymorphic-projection.rs +++ b/tests/ui/codegen/freeze-on-polymorphic-projection.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=1 --crate-type=lib +//@ build-pass +//@ compile-flags: -Copt-level=1 --crate-type=lib #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/codegen/init-large-type.rs b/tests/ui/codegen/init-large-type.rs index ce905572f2a8c..34b40693ab12c 100644 --- a/tests/ui/codegen/init-large-type.rs +++ b/tests/ui/codegen/init-large-type.rs @@ -1,13 +1,13 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass #![allow(unused_must_use)] // Makes sure that zero-initializing large types is reasonably fast, // Doing it incorrectly causes massive slowdown in LLVM during // optimisation. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support #![feature(intrinsics)] diff --git a/tests/ui/codegen/issue-101585-128bit-repeat.rs b/tests/ui/codegen/issue-101585-128bit-repeat.rs index c6a686597e9c8..18c02a33438b5 100644 --- a/tests/ui/codegen/issue-101585-128bit-repeat.rs +++ b/tests/ui/codegen/issue-101585-128bit-repeat.rs @@ -1,5 +1,5 @@ // Regression test for issue 101585. -// run-pass +//@ run-pass fn main() { fn min_array_ok() -> [i128; 1] { diff --git a/tests/ui/codegen/issue-16602-1.rs b/tests/ui/codegen/issue-16602-1.rs index dd64ee75b3463..248050adb32e3 100644 --- a/tests/ui/codegen/issue-16602-1.rs +++ b/tests/ui/codegen/issue-16602-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut t = [1; 2]; t = [t[1] * 2, t[0] * 2]; diff --git a/tests/ui/codegen/issue-16602-2.rs b/tests/ui/codegen/issue-16602-2.rs index 6364630ffa94d..333ea289b4ae5 100644 --- a/tests/ui/codegen/issue-16602-2.rs +++ b/tests/ui/codegen/issue-16602-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { pub x: u32, pub y: u32, diff --git a/tests/ui/codegen/issue-16602-3.rs b/tests/ui/codegen/issue-16602-3.rs index 2307cfb81c7dd..51fc4a370e2db 100644 --- a/tests/ui/codegen/issue-16602-3.rs +++ b/tests/ui/codegen/issue-16602-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_assignments)] #[derive(Debug)] diff --git a/tests/ui/codegen/issue-28950.rs b/tests/ui/codegen/issue-28950.rs index 8b55f42f3f41b..8e55172af6d73 100644 --- a/tests/ui/codegen/issue-28950.rs +++ b/tests/ui/codegen/issue-28950.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads -// compile-flags: -O +//@ run-pass +//@ ignore-emscripten no threads +//@ compile-flags: -O // Tests that the `vec!` macro does not overflow the stack when it is // given data larger than the stack. diff --git a/tests/ui/codegen/issue-55976.rs b/tests/ui/codegen/issue-55976.rs index fee54fc6206db..e28d5ab114c7e 100644 --- a/tests/ui/codegen/issue-55976.rs +++ b/tests/ui/codegen/issue-55976.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ^-- The above is needed as this issue is related to LLVM/codegen. fn main() { diff --git a/tests/ui/codegen/issue-63787.rs b/tests/ui/codegen/issue-63787.rs index cba079b231522..b8de6d3c5c895 100644 --- a/tests/ui/codegen/issue-63787.rs +++ b/tests/ui/codegen/issue-63787.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Make sure that `Ref` and `RefMut` do not make false promises about aliasing, // because once they drop, their reference/pointer can alias other writes. diff --git a/tests/ui/codegen/issue-64401.rs b/tests/ui/codegen/issue-64401.rs index 53f85c63b5336..02e5b8ac2ba90 100644 --- a/tests/ui/codegen/issue-64401.rs +++ b/tests/ui/codegen/issue-64401.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // The ICE didn't happen with `cargo check` but `cargo build`. use std::marker::PhantomData; diff --git a/tests/ui/codegen/issue-79865-llvm-miscompile.rs b/tests/ui/codegen/issue-79865-llvm-miscompile.rs index 6f994a5cb741b..fbd9f0dd4fb8d 100644 --- a/tests/ui/codegen/issue-79865-llvm-miscompile.rs +++ b/tests/ui/codegen/issue-79865-llvm-miscompile.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86_64 -// compile-flags: -C opt-level=3 +//@ run-pass +//@ only-x86_64 +//@ compile-flags: -C opt-level=3 // Regression test for issue #79865. // The assertion will fail when compiled with Rust 1.56..=1.59 diff --git a/tests/ui/codegen/issue-82833-slice-miscompile.rs b/tests/ui/codegen/issue-82833-slice-miscompile.rs index 8cf6a3137e2d6..7723679dab19e 100644 --- a/tests/ui/codegen/issue-82833-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82833-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-82859-slice-miscompile.rs b/tests/ui/codegen/issue-82859-slice-miscompile.rs index b64eb49907139..542eea0169b55 100644 --- a/tests/ui/codegen/issue-82859-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82859-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs index 38dfca347c8cd..03ba826b1863c 100644 --- a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs +++ b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=0 +//@ build-pass +//@ compile-flags: -Copt-level=0 // Regression test for #88043: LLVM crash when the RemoveZsts mir-opt pass is enabled. // We should not see the error: diff --git a/tests/ui/codegen/issue-97708.rs b/tests/ui/codegen/issue-97708.rs index 8cb28e9f1f661..bc44e579030c8 100644 --- a/tests/ui/codegen/issue-97708.rs +++ b/tests/ui/codegen/issue-97708.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build:issue-97708-aux.rs +//@ build-pass +//@ aux-build:issue-97708-aux.rs extern crate issue_97708_aux; use issue_97708_aux::TaskStub; diff --git a/tests/ui/codegen/issue-99551.rs b/tests/ui/codegen/issue-99551.rs index b223aff4e9492..9bacbaa6edc72 100644 --- a/tests/ui/codegen/issue-99551.rs +++ b/tests/ui/codegen/issue-99551.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(trait_upcasting)] pub trait A {} diff --git a/tests/ui/codegen/llvm-pr32379.rs b/tests/ui/codegen/llvm-pr32379.rs index 8a1f03241b110..304a84255e24d 100644 --- a/tests/ui/codegen/llvm-pr32379.rs +++ b/tests/ui/codegen/llvm-pr32379.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:llvm_pr32379.rs +//@ run-pass +//@ aux-build:llvm_pr32379.rs // LLVM PR #32379 (https://bugs.llvm.org/show_bug.cgi?id=32379), which // applies to upstream LLVM 3.9.1, is known to cause rustc itself to be diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs index 047ec155fdca6..7d63895c65bac 100644 --- a/tests/ui/codegen/mismatched-data-layouts.rs +++ b/tests/ui/codegen/mismatched-data-layouts.rs @@ -1,11 +1,11 @@ // This test checks that data layout mismatches emit an error. // -// build-fail -// needs-llvm-components: x86 -// compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options -// error-pattern: differs from LLVM target's -// normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" -// normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" +//@ build-fail +//@ needs-llvm-components: x86 +//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options +//@ error-pattern: differs from LLVM target's +//@ normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" +//@ normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/codegen/mono-impossible-2.rs b/tests/ui/codegen/mono-impossible-2.rs index 21eb2c9b2f2da..d00bc1ddd5f14 100644 --- a/tests/ui/codegen/mono-impossible-2.rs +++ b/tests/ui/codegen/mono-impossible-2.rs @@ -1,5 +1,5 @@ -//compile-flags: --crate-type=lib -Clink-dead-code=on -// build-pass +//@compile-flags: --crate-type=lib -Clink-dead-code=on +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/mono-impossible.rs b/tests/ui/codegen/mono-impossible.rs index 1ea32ed2c4fac..6e3c14bc7ad0f 100644 --- a/tests/ui/codegen/mono-impossible.rs +++ b/tests/ui/codegen/mono-impossible.rs @@ -1,5 +1,5 @@ -// compile-flags: -Clink-dead-code=on --crate-type=lib -// build-pass +//@ compile-flags: -Clink-dead-code=on --crate-type=lib +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/overflow-during-mono.rs b/tests/ui/codegen/overflow-during-mono.rs index e45db18e4074f..919f1a8120e0b 100644 --- a/tests/ui/codegen/overflow-during-mono.rs +++ b/tests/ui/codegen/overflow-during-mono.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR overflow evaluating the requirement #![recursion_limit = "32"] diff --git a/tests/ui/codegen/subtyping-enforces-type-equality.rs b/tests/ui/codegen/subtyping-enforces-type-equality.rs index a5ffcb3f85496..7d5228f517060 100644 --- a/tests/ui/codegen/subtyping-enforces-type-equality.rs +++ b/tests/ui/codegen/subtyping-enforces-type-equality.rs @@ -1,6 +1,6 @@ -// ignore-pass -// build-pass -// edition:2021 +//@ ignore-pass +//@ build-pass +//@ edition:2021 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/codegen/subtyping-impacts-selection-1.rs b/tests/ui/codegen/subtyping-impacts-selection-1.rs index 09e06f6d6843b..abce5f3783c7f 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-1.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-1.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 #![allow(coherence_leak_check)] diff --git a/tests/ui/codegen/subtyping-impacts-selection-2.rs b/tests/ui/codegen/subtyping-impacts-selection-2.rs index 921136775b7fd..8f87727d7f79d 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-2.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-2.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 1dff3ee6011bf..85a940f9f74a0 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -1,4 +1,4 @@ -// needs-llvm-components: webassembly -// min-llvm-version: 17 -// compile-flags: --print=target-cpus --target=wasm32-unknown-unknown -// check-pass +//@ needs-llvm-components: webassembly +//@ min-llvm-version: 17 +//@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown +//@ check-pass diff --git a/tests/ui/codemap_tests/two_files_data.rs b/tests/ui/codemap_tests/two_files_data.rs index 6abeac0dd2e7e..a4e4cf7e896ed 100644 --- a/tests/ui/codemap_tests/two_files_data.rs +++ b/tests/ui/codemap_tests/two_files_data.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) trait Foo { } diff --git a/tests/ui/codemap_tests/unicode.expanded.stdout b/tests/ui/codemap_tests/unicode.expanded.stdout index d14bb42b2fdb2..eb53d12e94f3c 100644 --- a/tests/ui/codemap_tests/unicode.expanded.stdout +++ b/tests/ui/codemap_tests/unicode.expanded.stdout @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// revisions: normal expanded -//[expanded] check-pass -//[expanded]compile-flags: -Zunpretty=expanded +//@ revisions: normal expanded +//@[expanded] check-pass +//@[expanded]compile-flags: -Zunpretty=expanded extern "路濫狼á́́" fn foo() {} diff --git a/tests/ui/codemap_tests/unicode.rs b/tests/ui/codemap_tests/unicode.rs index 4df9a5270c317..73023e3c669d3 100644 --- a/tests/ui/codemap_tests/unicode.rs +++ b/tests/ui/codemap_tests/unicode.rs @@ -1,6 +1,6 @@ -// revisions: normal expanded -//[expanded] check-pass -//[expanded]compile-flags: -Zunpretty=expanded +//@ revisions: normal expanded +//@[expanded] check-pass +//@[expanded]compile-flags: -Zunpretty=expanded extern "路濫狼á́́" fn foo() {} //[normal]~ ERROR invalid ABI diff --git a/tests/ui/codemap_tests/unicode_3.rs b/tests/ui/codemap_tests/unicode_3.rs index 34582de45cb9c..500c806e91d76 100644 --- a/tests/ui/codemap_tests/unicode_3.rs +++ b/tests/ui/codemap_tests/unicode_3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } //~ WARNING while_true diff --git a/tests/ui/coercion/coerce-block-tail-26978.rs b/tests/ui/coercion/coerce-block-tail-26978.rs index 01c8ab5a839fa..96e0cefb95576 100644 --- a/tests/ui/coercion/coerce-block-tail-26978.rs +++ b/tests/ui/coercion/coerce-block-tail-26978.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn f(_: &i32) {} fn main() { diff --git a/tests/ui/coercion/coerce-block-tail-57749.rs b/tests/ui/coercion/coerce-block-tail-57749.rs index 79b5b33233b31..144e12eed8e02 100644 --- a/tests/ui/coercion/coerce-block-tail-57749.rs +++ b/tests/ui/coercion/coerce-block-tail-57749.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::ops::Deref; fn main() { diff --git a/tests/ui/coercion/coerce-block-tail-83783.fixed b/tests/ui/coercion/coerce-block-tail-83783.fixed index 0df0a64ac965b..2f0d1d218f31a 100644 --- a/tests/ui/coercion/coerce-block-tail-83783.fixed +++ b/tests/ui/coercion/coerce-block-tail-83783.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 fn _consume_reference(_: &T) {} async fn _foo() { diff --git a/tests/ui/coercion/coerce-block-tail-83783.rs b/tests/ui/coercion/coerce-block-tail-83783.rs index ee6036b4d673b..ba124ce21dbf5 100644 --- a/tests/ui/coercion/coerce-block-tail-83783.rs +++ b/tests/ui/coercion/coerce-block-tail-83783.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 fn _consume_reference(_: &T) {} async fn _foo() { diff --git a/tests/ui/coercion/coerce-block-tail-83850.rs b/tests/ui/coercion/coerce-block-tail-83850.rs index 77fdf99983332..2d2d440c4e837 100644 --- a/tests/ui/coercion/coerce-block-tail-83850.rs +++ b/tests/ui/coercion/coerce-block-tail-83850.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn f(_: &[i32]) {} fn main() { diff --git a/tests/ui/coercion/coerce-block-tail.rs b/tests/ui/coercion/coerce-block-tail.rs index dcbcd3762862f..c0766df0541b1 100644 --- a/tests/ui/coercion/coerce-block-tail.rs +++ b/tests/ui/coercion/coerce-block-tail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { let _: &str = & { String::from("hahah")}; let _: &i32 = & { Box::new(1i32) }; diff --git a/tests/ui/coercion/coerce-expect-unsized.rs b/tests/ui/coercion/coerce-expect-unsized.rs index eeb8fe82346c2..ebf723be724db 100644 --- a/tests/ui/coercion/coerce-expect-unsized.rs +++ b/tests/ui/coercion/coerce-expect-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] use std::cell::RefCell; diff --git a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs index 95d3935caa9ef..b317841ab6e71 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs @@ -1,7 +1,7 @@ -// revisions: nofallback fallback -// only-windows - the number of `Error` impls is platform-dependent -//[fallback] check-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@ only-windows - the number of `Error` impls is platform-dependent +//@[fallback] check-pass +//@[nofallback] check-fail #![feature(never_type)] #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/coercion/coerce-issue-49593-box-never.rs b/tests/ui/coercion/coerce-issue-49593-box-never.rs index 16efb65acb2b6..19a2c036fbcb3 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never.rs @@ -1,7 +1,7 @@ -// revisions: nofallback fallback -// ignore-windows - the number of `Error` impls is platform-dependent -//[fallback] check-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@ ignore-windows - the number of `Error` impls is platform-dependent +//@[fallback] check-pass +//@[nofallback] check-fail #![feature(never_type)] #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/coercion/coerce-overloaded-autoderef.rs b/tests/ui/coercion/coerce-overloaded-autoderef.rs index d5484607c8b52..0605f20e9a328 100644 --- a/tests/ui/coercion/coerce-overloaded-autoderef.rs +++ b/tests/ui/coercion/coerce-overloaded-autoderef.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs index f033e1b5d2b01..139c1d18d2b18 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn negate(x: &isize) -> isize { -*x diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs index 64a365229cbb7..a4a197b8cd7cc 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs index c2aaae1c73ec8..d8edd8648c485 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn sum(x: &[isize]) -> isize { let mut sum = 0; diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs index 9a5652acf8787..3d82692f0b389 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(v: &mut [usize]) -> Vec { diff --git a/tests/ui/coercion/coerce-reborrow-multi-arg.rs b/tests/ui/coercion/coerce-reborrow-multi-arg.rs index 93cd0bb3e27f6..77e1e91bb5fca 100644 --- a/tests/ui/coercion/coerce-reborrow-multi-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-multi-arg.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn test(_a: T, _b: T) {} fn main() { diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs index 76cd6793b3c23..7a08e9fdbe5aa 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 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 e6e7c3a51aa09..fc41beb45ccdc 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs index 2635754f14dac..0ff73068e59d2 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn reverse(v: &mut [usize]) { diff --git a/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs b/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs index c03336ea37af8..5b6223ca8c867 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(v: &mut [usize]) { diff --git a/tests/ui/coercion/coerce-unify-return.rs b/tests/ui/coercion/coerce-unify-return.rs index 95a7ee8fe0f2b..def42d9dc148c 100644 --- a/tests/ui/coercion/coerce-unify-return.rs +++ b/tests/ui/coercion/coerce-unify-return.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that coercions unify the expected return type of a polymorphic // function call, instead of leaving the type variables as they were. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; impl Foo { diff --git a/tests/ui/coercion/coerce-unify.rs b/tests/ui/coercion/coerce-unify.rs index f1818f9bb5a6d..ae4088535aa78 100644 --- a/tests/ui/coercion/coerce-unify.rs +++ b/tests/ui/coercion/coerce-unify.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 45b53300c5b4b..5ef9a10889217 100644 --- a/tests/ui/coercion/coerce-unsize-subtype.rs +++ b/tests/ui/coercion/coerce-unsize-subtype.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/coercion/coercion-missing-tail-expected-type.fixed b/tests/ui/coercion/coercion-missing-tail-expected-type.fixed index 713e04774a0e7..62fff1344f230 100644 --- a/tests/ui/coercion/coercion-missing-tail-expected-type.fixed +++ b/tests/ui/coercion/coercion-missing-tail-expected-type.fixed @@ -1,5 +1,5 @@ // #41425 -- error message "mismatched types" has wrong types -// run-rustfix +//@ run-rustfix fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types x + 1 diff --git a/tests/ui/coercion/coercion-missing-tail-expected-type.rs b/tests/ui/coercion/coercion-missing-tail-expected-type.rs index e14d79d8acae6..894728c8109ea 100644 --- a/tests/ui/coercion/coercion-missing-tail-expected-type.rs +++ b/tests/ui/coercion/coercion-missing-tail-expected-type.rs @@ -1,5 +1,5 @@ // #41425 -- error message "mismatched types" has wrong types -// run-rustfix +//@ run-rustfix fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types x + 1; diff --git a/tests/ui/coercion/issue-101066.rs b/tests/ui/coercion/issue-101066.rs index b658ed1e9ab79..43ba541465988 100644 --- a/tests/ui/coercion/issue-101066.rs +++ b/tests/ui/coercion/issue-101066.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::convert::TryFrom; diff --git a/tests/ui/coercion/issue-14589.rs b/tests/ui/coercion/issue-14589.rs index 6f95b30be06ae..b25ba3758e1f2 100644 --- a/tests/ui/coercion/issue-14589.rs +++ b/tests/ui/coercion/issue-14589.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // All 3 expressions should work in that the argument gets // coerced to a trait object -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { send::>(Box::new(Output(0))); diff --git a/tests/ui/coercion/issue-26905-rpass.rs b/tests/ui/coercion/issue-26905-rpass.rs index 2d5827f476b9e..6ff3cbdaf99bf 100644 --- a/tests/ui/coercion/issue-26905-rpass.rs +++ b/tests/ui/coercion/issue-26905-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsize, coerce_unsized)] // Verfies that PhantomData is ignored for DST coercions diff --git a/tests/ui/coercion/issue-36007.rs b/tests/ui/coercion/issue-36007.rs index 78812df870d02..010ce108e4a44 100644 --- a/tests/ui/coercion/issue-36007.rs +++ b/tests/ui/coercion/issue-36007.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coerce_unsized, unsize)] use std::marker::Unsize; diff --git a/tests/ui/coercion/issue-37655.rs b/tests/ui/coercion/issue-37655.rs index 416854d66f38b..f282b77314429 100644 --- a/tests/ui/coercion/issue-37655.rs +++ b/tests/ui/coercion/issue-37655.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #37655. The problem was a false edge created by // coercion that wound up requiring that `'a` (in `split()`) outlive // `'b`, which shouldn't be necessary. diff --git a/tests/ui/coercion/issue-3794.rs b/tests/ui/coercion/issue-3794.rs index b1f028fbccb9d..f076035c3d5aa 100644 --- a/tests/ui/coercion/issue-3794.rs +++ b/tests/ui/coercion/issue-3794.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait T { diff --git a/tests/ui/coercion/issue-39823.rs b/tests/ui/coercion/issue-39823.rs index 148cf527e7cb7..68554781761f5 100644 --- a/tests/ui/coercion/issue-39823.rs +++ b/tests/ui/coercion/issue-39823.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-39823.rs +//@ run-pass +//@ aux-build:issue-39823.rs extern crate issue_39823; use issue_39823::{RemoteC, RemoteG}; diff --git a/tests/ui/coercion/issue-88097.rs b/tests/ui/coercion/issue-88097.rs index e543e1bae9239..f636323d62367 100644 --- a/tests/ui/coercion/issue-88097.rs +++ b/tests/ui/coercion/issue-88097.rs @@ -2,7 +2,7 @@ // a function pointer, which caused an unnecessary error. Check that this // behavior has been fixed. -// check-pass +//@ check-pass fn peculiar() -> impl Fn(u8) -> u8 { return |x| x + 1 diff --git a/tests/ui/coercion/unsafe-coercion.rs b/tests/ui/coercion/unsafe-coercion.rs index 2478deeab0d4f..ca47dba9b383e 100644 --- a/tests/ui/coercion/unsafe-coercion.rs +++ b/tests/ui/coercion/unsafe-coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that safe fns are not a subtype of unsafe fns. diff --git a/tests/ui/coherence/coherence-all-remote.rs b/tests/ui/coherence/coherence-all-remote.rs index 5c3bfee822f1c..5c75dd1d2cd69 100644 --- a/tests/ui/coherence/coherence-all-remote.rs +++ b/tests/ui/coherence/coherence-all-remote.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-int.rs b/tests/ui/coherence/coherence-bigint-int.rs index 02945e9dade3a..0a9ddf5e2d156 100644 --- a/tests/ui/coherence/coherence-bigint-int.rs +++ b/tests/ui/coherence/coherence-bigint-int.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:coherence_lib.rs +//@ run-pass +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-param.rs b/tests/ui/coherence/coherence-bigint-param.rs index c6543aaf67d53..57e9f95dcaf38 100644 --- a/tests/ui/coherence/coherence-bigint-param.rs +++ b/tests/ui/coherence/coherence-bigint-param.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-vecint.rs b/tests/ui/coherence/coherence-bigint-vecint.rs index a5dba90be5c59..6822c6c44b78f 100644 --- a/tests/ui/coherence/coherence-bigint-vecint.rs +++ b/tests/ui/coherence/coherence-bigint-vecint.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:coherence_lib.rs +//@ run-pass +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs index bccbac2ff1606..d3253baa96da7 100644 --- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs +++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs extern crate go_trait; diff --git a/tests/ui/coherence/coherence-blanket.rs b/tests/ui/coherence/coherence-blanket.rs index 55fa89d75070a..db10b8e654f5b 100644 --- a/tests/ui/coherence/coherence-blanket.rs +++ b/tests/ui/coherence/coherence-blanket.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-covered-type-parameter.rs b/tests/ui/coherence/coherence-covered-type-parameter.rs index bb95c59d183f9..b6332a0442483 100644 --- a/tests/ui/coherence/coherence-covered-type-parameter.rs +++ b/tests/ui/coherence/coherence-covered-type-parameter.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-cow.rs b/tests/ui/coherence/coherence-cow.rs index 86a8d0963b84b..af94964762a95 100644 --- a/tests/ui/coherence/coherence-cow.rs +++ b/tests/ui/coherence/coherence-cow.rs @@ -1,8 +1,8 @@ -// revisions: re_a re_b re_c +//@ revisions: re_a re_b re_c #![cfg_attr(any(), re_a, re_b, re_c)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs // Test that the `Pair` type reports an error if it contains type // parameters, even when they are covered by local types. This test diff --git a/tests/ui/coherence/coherence-cross-crate-conflict.rs b/tests/ui/coherence/coherence-cross-crate-conflict.rs index 588630957c94a..bdb76375e012a 100644 --- a/tests/ui/coherence/coherence-cross-crate-conflict.rs +++ b/tests/ui/coherence/coherence-cross-crate-conflict.rs @@ -1,7 +1,7 @@ // The error here is strictly due to orphan rules; the impl here // generalizes the one upstream -// aux-build:trait_impl_conflict.rs +//@ aux-build:trait_impl_conflict.rs extern crate trait_impl_conflict; use trait_impl_conflict::Foo; diff --git a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs index 063826f1d5418..7e53695f987e2 100644 --- a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs +++ b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 113415 // Makes sure that coherence doesn't call any of the `predicate_may_hold`-esque fns, diff --git a/tests/ui/coherence/coherence-fundamental-trait-objects.rs b/tests/ui/coherence/coherence-fundamental-trait-objects.rs index dd127bf7f4bff..82afb1b5e84b4 100644 --- a/tests/ui/coherence/coherence-fundamental-trait-objects.rs +++ b/tests/ui/coherence/coherence-fundamental-trait-objects.rs @@ -2,7 +2,7 @@ // treated as #[fundamental] types - the 2 meanings of #[fundamental] // are distinct. -// aux-build:coherence_fundamental_trait_lib.rs +//@ aux-build:coherence_fundamental_trait_lib.rs extern crate coherence_fundamental_trait_lib; diff --git a/tests/ui/coherence/coherence-impl-in-fn.rs b/tests/ui/coherence/coherence-impl-in-fn.rs index b97197317488c..c391e87bf8d17 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 +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs index 43a0a5c427774..a406e4408a439 100644 --- a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs +++ b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-iterator-vec.rs b/tests/ui/coherence/coherence-iterator-vec.rs index 386fe40ac3ca8..2955348493175 100644 --- a/tests/ui/coherence/coherence-iterator-vec.rs +++ b/tests/ui/coherence/coherence-iterator-vec.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-lone-type-parameter.rs b/tests/ui/coherence/coherence-lone-type-parameter.rs index 5368fef76d0b4..71d62cf39ef3d 100644 --- a/tests/ui/coherence/coherence-lone-type-parameter.rs +++ b/tests/ui/coherence/coherence-lone-type-parameter.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-multidispatch-tuple.rs b/tests/ui/coherence/coherence-multidispatch-tuple.rs index b04b2a296b5b4..ac7b2578d774b 100644 --- a/tests/ui/coherence/coherence-multidispatch-tuple.rs +++ b/tests/ui/coherence/coherence-multidispatch-tuple.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fmt::Debug; use std::default::Default; diff --git a/tests/ui/coherence/coherence-negative-impls-copy.rs b/tests/ui/coherence/coherence-negative-impls-copy.rs index 7b29aade41335..377d750f8baa4 100644 --- a/tests/ui/coherence/coherence-negative-impls-copy.rs +++ b/tests/ui/coherence/coherence-negative-impls-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for issue #101836 #![feature(negative_impls, extern_types)] diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs index d5306d59ed5f3..d69872ba8cffa 100644 --- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs +++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(negative_impls)] diff --git a/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs b/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs index 39ccaa6ac3542..a54a8e1dc65fe 100644 --- a/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs +++ b/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-negative-inherent.rs b/tests/ui/coherence/coherence-negative-inherent.rs index a9e1acc8044a5..7fbad5931a8af 100644 --- a/tests/ui/coherence/coherence-negative-inherent.rs +++ b/tests/ui/coherence/coherence-negative-inherent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs index 531977d6dac24..ae1000c6a47c2 100644 --- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs +++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs @@ -1,6 +1,6 @@ -// revisions: stock with_negative_coherence +//@ revisions: stock with_negative_coherence -//[with_negative_coherence] known-bug: unknown +//@[with_negative_coherence] known-bug: unknown // Ideally this would work, but we don't use `&'a T` to imply that `T: 'a` // which is required for `&'a T: !MyPredicate` to hold. This is similar to the // test `negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr` diff --git a/tests/ui/coherence/coherence-orphan.rs b/tests/ui/coherence/coherence-orphan.rs index 985cfe8716130..c06705133c801 100644 --- a/tests/ui/coherence/coherence-orphan.rs +++ b/tests/ui/coherence/coherence-orphan.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_orphan_lib.rs +//@ aux-build:coherence_orphan_lib.rs #![feature(negative_impls)] extern crate coherence_orphan_lib as lib; diff --git a/tests/ui/coherence/coherence-overlap-double-negative.rs b/tests/ui/coherence/coherence-overlap-double-negative.rs index 1ea0ddc7430e1..917760b0174a8 100644 --- a/tests/ui/coherence/coherence-overlap-double-negative.rs +++ b/tests/ui/coherence/coherence-overlap-double-negative.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs index 94a7ecbe11f15..3e90b7c7fdd32 100644 --- a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. diff --git a/tests/ui/coherence/coherence-overlap-downstream.rs b/tests/ui/coherence/coherence-overlap-downstream.rs index 171b2a32fc53c..8b99296d12a4f 100644 --- a/tests/ui/coherence/coherence-overlap-downstream.rs +++ b/tests/ui/coherence/coherence-overlap-downstream.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs index 6f5cc98049174..53b0a40fa6611 100644 --- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `Box: !Sugar` to be ambiguous, even // though we see no impl of `Sugar` for `Box`. Therefore, an overlap diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.rs b/tests/ui/coherence/coherence-overlap-issue-23516.rs index 4daaed4366f81..620e00cd0572b 100644 --- a/tests/ui/coherence/coherence-overlap-issue-23516.rs +++ b/tests/ui/coherence/coherence-overlap-issue-23516.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `Box: !Sugar` to be ambiguous, even // though we see no impl of `Sugar` for `Box`. Therefore, an overlap diff --git a/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs b/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs index 48dffc921a31b..4fe23fff12ae9 100644 --- a/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs +++ b/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-negate-strict.rs b/tests/ui/coherence/coherence-overlap-negate-strict.rs index 1021d87ca1b0b..2244c820d0363 100644 --- a/tests/ui/coherence/coherence-overlap-negate-strict.rs +++ b/tests/ui/coherence/coherence-overlap-negate-strict.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs b/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs index a0dd881d1aaad..a0ddbc36cbbb9 100644 --- a/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs +++ b/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/coherence-overlap-negative-impls.rs b/tests/ui/coherence/coherence-overlap-negative-impls.rs index cd1df53a52889..9a85d8c5a63b7 100644 --- a/tests/ui/coherence/coherence-overlap-negative-impls.rs +++ b/tests/ui/coherence/coherence-overlap-negative-impls.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #74629 +//@ check-pass +//@ known-bug: #74629 // Should fail. The `0` and `1` impls overlap, violating coherence. Eg, with // `T = Test, F = ()`, all bounds are true, making both impls applicable. diff --git a/tests/ui/coherence/coherence-overlap-negative-trait.rs b/tests/ui/coherence/coherence-overlap-negative-trait.rs index 8059d23ffd215..f026cf75d0b26 100644 --- a/tests/ui/coherence/coherence-overlap-negative-trait.rs +++ b/tests/ui/coherence/coherence-overlap-negative-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:error_lib.rs +//@ check-pass +//@ aux-build:error_lib.rs // // Check that if we promise to not impl what would overlap it doesn't actually overlap diff --git a/tests/ui/coherence/coherence-overlap-negative-trait2.rs b/tests/ui/coherence/coherence-overlap-negative-trait2.rs index cc8c463b8223e..6b3a6fbd0450a 100644 --- a/tests/ui/coherence/coherence-overlap-negative-trait2.rs +++ b/tests/ui/coherence/coherence-overlap-negative-trait2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:option_future.rs +//@ check-pass +//@ aux-build:option_future.rs // // Check that if we promise to not impl what would overlap it doesn't actually overlap diff --git a/tests/ui/coherence/coherence-overlap-super-negative.rs b/tests/ui/coherence/coherence-overlap-super-negative.rs index d296a094a3704..cca3d0ab36fba 100644 --- a/tests/ui/coherence/coherence-overlap-super-negative.rs +++ b/tests/ui/coherence/coherence-overlap-super-negative.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-upstream-inherent.rs b/tests/ui/coherence/coherence-overlap-upstream-inherent.rs index 082d753debbe1..56cb8b0299ff0 100644 --- a/tests/ui/coherence/coherence-overlap-upstream-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-upstream-inherent.rs @@ -1,7 +1,7 @@ // Tests that we consider `i16: Remote` to be ambiguous, even // though the upstream crate doesn't implement it for now. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib; diff --git a/tests/ui/coherence/coherence-overlap-upstream.rs b/tests/ui/coherence/coherence-overlap-upstream.rs index 8f1e6558b15eb..901d14465e2e1 100644 --- a/tests/ui/coherence/coherence-overlap-upstream.rs +++ b/tests/ui/coherence/coherence-overlap-upstream.rs @@ -1,7 +1,7 @@ // Tests that we consider `i16: Remote` to be ambiguous, even // though the upstream crate doesn't implement it for now. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib; diff --git a/tests/ui/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs index 32f01f4180103..1c9758790d948 100644 --- a/tests/ui/coherence/coherence-overlap-with-regions.rs +++ b/tests/ui/coherence/coherence-overlap-with-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlapping-pairs.rs b/tests/ui/coherence/coherence-overlapping-pairs.rs index d5d18217bd6a5..aa43cc10a3cff 100644 --- a/tests/ui/coherence/coherence-overlapping-pairs.rs +++ b/tests/ui/coherence/coherence-overlapping-pairs.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs b/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs index 15868ca868610..80a62946f5e87 100644 --- a/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs +++ b/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs @@ -1,7 +1,7 @@ // Test that the same coverage rules apply even if the local type appears in the // list of type parameters, not the self type. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered.rs b/tests/ui/coherence/coherence-pair-covered-uncovered.rs index da970572fdee2..3e5fceacabf6e 100644 --- a/tests/ui/coherence/coherence-pair-covered-uncovered.rs +++ b/tests/ui/coherence/coherence-pair-covered-uncovered.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::{Remote, Pair}; diff --git a/tests/ui/coherence/coherence-projection-ok-orphan.rs b/tests/ui/coherence/coherence-projection-ok-orphan.rs index 42b4b1912e225..b8dbe2db5a6ca 100644 --- a/tests/ui/coherence/coherence-projection-ok-orphan.rs +++ b/tests/ui/coherence/coherence-projection-ok-orphan.rs @@ -1,7 +1,7 @@ // Here we do not get a coherence conflict because `Baz: Iterator` // does not hold and (due to the orphan rules), we can rely on that. -// check-pass +//@ check-pass pub trait Foo

{} diff --git a/tests/ui/coherence/coherence-projection-ok.rs b/tests/ui/coherence/coherence-projection-ok.rs index 44fc02a5c20e7..c5c145be7e549 100644 --- a/tests/ui/coherence/coherence-projection-ok.rs +++ b/tests/ui/coherence/coherence-projection-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo

{} diff --git a/tests/ui/coherence/coherence-rfc447-constrained.rs b/tests/ui/coherence/coherence-rfc447-constrained.rs index 9d1d86883259f..6d03801ab9ab4 100644 --- a/tests/ui/coherence/coherence-rfc447-constrained.rs +++ b/tests/ui/coherence/coherence-rfc447-constrained.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that trait matching can handle impls whose types are only // constrained by a projection. diff --git a/tests/ui/coherence/coherence-subtyping.rs b/tests/ui/coherence/coherence-subtyping.rs index b3ed728a81c06..da0cc2d026548 100644 --- a/tests/ui/coherence/coherence-subtyping.rs +++ b/tests/ui/coherence/coherence-subtyping.rs @@ -4,7 +4,7 @@ // Note: This scenario is currently accepted, but as part of the // universe transition (#56105) may eventually become an error. -// check-pass +//@ check-pass trait TheTrait { fn foo(&self) {} diff --git a/tests/ui/coherence/coherence-vec-local-2.rs b/tests/ui/coherence/coherence-vec-local-2.rs index 47df06bac6c14..d5b9588d67443 100644 --- a/tests/ui/coherence/coherence-vec-local-2.rs +++ b/tests/ui/coherence/coherence-vec-local-2.rs @@ -1,7 +1,7 @@ // Test that a local, generic type appearing within a // *non-fundamental* remote type like `Vec` is not considered local. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-vec-local.rs b/tests/ui/coherence/coherence-vec-local.rs index 130cc39d0af81..2abab3312fd93 100644 --- a/tests/ui/coherence/coherence-vec-local.rs +++ b/tests/ui/coherence/coherence-vec-local.rs @@ -1,7 +1,7 @@ // Test that a local type (with no type parameters) appearing within a // *non-fundamental* remote type like `Vec` is not considered local. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-where-clause.rs b/tests/ui/coherence/coherence-where-clause.rs index cd9a423f4ecaf..84b35d20b7424 100644 --- a/tests/ui/coherence/coherence-where-clause.rs +++ b/tests/ui/coherence/coherence-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; trait MyTrait { diff --git a/tests/ui/coherence/coherence-with-coroutine.rs b/tests/ui/coherence/coherence-with-coroutine.rs index 21857d7fe66ee..1ba9834467265 100644 --- a/tests/ui/coherence/coherence-with-coroutine.rs +++ b/tests/ui/coherence/coherence-with-coroutine.rs @@ -3,8 +3,8 @@ #![cfg_attr(specialized, feature(specialization))] #![allow(incomplete_features)] -// revisions: stock specialized -// [specialized]check-pass +//@ revisions: stock specialized +//@ [specialized]check-pass type OpaqueCoroutine = impl Sized; fn defining_use() -> OpaqueCoroutine { diff --git a/tests/ui/coherence/coherence_copy_like.rs b/tests/ui/coherence/coherence_copy_like.rs index 92af341ccb529..f10111835bedd 100644 --- a/tests/ui/coherence/coherence_copy_like.rs +++ b/tests/ui/coherence/coherence_copy_like.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index edee6cd7b6cf6..593661c8d7661 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:coherence_copy_like_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) // skip-codgen #![allow(dead_code)] diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs index 599c804d213db..29575d4192e87 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs index 7d851b5288457..2f45ed4320081 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_struct.rs b/tests/ui/coherence/coherence_copy_like_err_struct.rs index fe39370c9017e..a58c980224027 100644 --- a/tests/ui/coherence/coherence_copy_like_err_struct.rs +++ b/tests/ui/coherence/coherence_copy_like_err_struct.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. diff --git a/tests/ui/coherence/coherence_copy_like_err_tuple.rs b/tests/ui/coherence/coherence_copy_like_err_tuple.rs index f63e205c9f82b..7985781dbf75b 100644 --- a/tests/ui/coherence/coherence_copy_like_err_tuple.rs +++ b/tests/ui/coherence/coherence_copy_like_err_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_inherent_cc.rs b/tests/ui/coherence/coherence_inherent_cc.rs index 759ada248f47c..662f186340bdb 100644 --- a/tests/ui/coherence/coherence_inherent_cc.rs +++ b/tests/ui/coherence/coherence_inherent_cc.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_inherent_cc_lib.rs +//@ aux-build:coherence_inherent_cc_lib.rs // Tests that methods that implement a trait cannot be invoked // unless the trait is imported. diff --git a/tests/ui/coherence/coherence_local.rs b/tests/ui/coherence/coherence_local.rs index ea724ada7025b..38bbd3dd3ca65 100644 --- a/tests/ui/coherence/coherence_local.rs +++ b/tests/ui/coherence/coherence_local.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_err_struct.rs b/tests/ui/coherence/coherence_local_err_struct.rs index a24038eb28075..d8b2096724e3c 100644 --- a/tests/ui/coherence/coherence_local_err_struct.rs +++ b/tests/ui/coherence/coherence_local_err_struct.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_err_tuple.rs b/tests/ui/coherence/coherence_local_err_tuple.rs index f4033862a3eb9..978099ea689dc 100644 --- a/tests/ui/coherence/coherence_local_err_tuple.rs +++ b/tests/ui/coherence/coherence_local_err_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_ref.rs b/tests/ui/coherence/coherence_local_ref.rs index 2e28839c8a416..88ed6ac77d2f3 100644 --- a/tests/ui/coherence/coherence_local_ref.rs +++ b/tests/ui/coherence/coherence_local_ref.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/const-generics-orphan-check-ok.rs b/tests/ui/coherence/const-generics-orphan-check-ok.rs index 217e8aed234b1..14087f5c3c7f7 100644 --- a/tests/ui/coherence/const-generics-orphan-check-ok.rs +++ b/tests/ui/coherence/const-generics-orphan-check-ok.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:trait-with-const-param.rs +//@ check-pass +//@ aux-build:trait-with-const-param.rs extern crate trait_with_const_param; use trait_with_const_param::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign.rs b/tests/ui/coherence/impl-foreign-for-foreign.rs index 4c0d46045e959..7f8cb9fcb0eb6 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs b/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs index e79f66c0e1320..166fe343d52ad 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign[local].rs b/tests/ui/coherence/impl-foreign-for-foreign[local].rs index 0b1413edf3789..0a586ba695c85 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign[local].rs +++ b/tests/ui/coherence/impl-foreign-for-foreign[local].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs b/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs index 10bdf2db8bbff..983ae336a0b78 100644 --- a/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-fundamental[local].rs b/tests/ui/coherence/impl-foreign-for-fundamental[local].rs index c3fc0e6b8a7c5..faad0700e566a 100644 --- a/tests/ui/coherence/impl-foreign-for-fundamental[local].rs +++ b/tests/ui/coherence/impl-foreign-for-fundamental[local].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-local.rs b/tests/ui/coherence/impl-foreign-for-local.rs index 04405bc46fbcc..d12929244e964 100644 --- a/tests/ui/coherence/impl-foreign-for-local.rs +++ b/tests/ui/coherence/impl-foreign-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs index bc1e18b657f31..0f66314e884dd 100644 --- a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs +++ b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs @@ -1,8 +1,8 @@ #![feature(fundamental)] -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs index 1e11789ef398d..a3286777c4ee2 100644 --- a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs @@ -1,8 +1,8 @@ #![feature(fundamental)] -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs index 99a399ddc632d..db09a6434d229 100644 --- a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-local.rs b/tests/ui/coherence/impl-foreign[foreign]-for-local.rs index bc6595bb34082..3f671a4944e4c 100644 --- a/tests/ui/coherence/impl-foreign[foreign]-for-local.rs +++ b/tests/ui/coherence/impl-foreign[foreign]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs index 0476cdaffe77e..379beca50aed3 100644 --- a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs index 7b83b048548eb..95e3a0a9b8394 100644 --- a/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs index 5282de4b2710c..8703cc6a81975 100644 --- a/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs index 6f5605a21938e..d9616b9adda79 100644 --- a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs index 99f3ce4476043..f1b9a08b44a7b 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs index 81044cd0529af..9d4440ba4866a 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs index 680ba9f2226f7..533f0892b98fe 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs index fc7649085c368..02731052a6a96 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs index 703f25dd60a62..7c94fd80af2f2 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs index ec21fdd4e04bc..d368b870f25a1 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs index 5bdab87bf4e00..d998731687c4f 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs index c9e3594cd342f..fdda2e0133d0b 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs index 62e69357e3a2d..4dd1ee381d557 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs index 1fec19bbab918..d9b03971b1ca8 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs index c8ed28be6f0cc..de9af310556aa 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs index f9b88c6459bdd..497bfe9a84ae4 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs index 7709bd9c89b6f..4dd810cdcfc5b 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs index 9c14eea1be22b..9c2b20527d7d7 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs index eed3a4b5c235b..85322ecac4c1e 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs index 63c342b76f186..466e2f1665ec0 100644 --- a/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs index 9bb37c2baab8a..c23a2d87a695c 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs index 79b5aa3fc6202..e9426e5127a04 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs index bc59721c08872..2976df3d41e66 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs index bcd6b269a382a..9c3e82ad762f0 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs b/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs index bb46498f90eba..201a46a166a87 100644 --- a/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs +++ b/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #57893 +//@ check-pass +//@ known-bug: #57893 // Should fail. Because we see an impl that uses a certain associated type, we // type-check assuming that impl is used. However, this conflicts with the diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs index 0f785b4e5f6d0..3dead2f0d19ce 100644 --- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs +++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver struct S; diff --git a/tests/ui/coherence/issue-99663-2.rs b/tests/ui/coherence/issue-99663-2.rs index 10a0a568849bf..675e9fdfdba7a 100644 --- a/tests/ui/coherence/issue-99663-2.rs +++ b/tests/ui/coherence/issue-99663-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/coherence/issue-99663.rs b/tests/ui/coherence/issue-99663.rs index a2d4d398ce1d5..00d15977d8f09 100644 --- a/tests/ui/coherence/issue-99663.rs +++ b/tests/ui/coherence/issue-99663.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/coherence/negative-coherence-considering-regions.rs b/tests/ui/coherence/negative-coherence-considering-regions.rs index a43ad19eca7c0..79d5ef5ca3c44 100644 --- a/tests/ui/coherence/negative-coherence-considering-regions.rs +++ b/tests/ui/coherence/negative-coherence-considering-regions.rs @@ -1,5 +1,5 @@ -// revisions: any_lt static_lt -//[static_lt] check-pass +//@ revisions: any_lt static_lt +//@[static_lt] check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs index 26d9d84d8f0c9..7967002e02102 100644 --- a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs +++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs @@ -1,5 +1,5 @@ -// revisions: explicit implicit -//[implicit] check-pass +//@ revisions: explicit implicit +//@[implicit] check-pass #![forbid(coherence_leak_check)] #![feature(negative_impls, with_negative_coherence)] diff --git a/tests/ui/coherence/normalize-for-errors.rs b/tests/ui/coherence/normalize-for-errors.rs index 30723518bce9e..4d98ea609e9eb 100644 --- a/tests/ui/coherence/normalize-for-errors.rs +++ b/tests/ui/coherence/normalize-for-errors.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct MyType; trait MyTrait {} diff --git a/tests/ui/coherence/occurs-check/associated-type.rs b/tests/ui/coherence/occurs-check/associated-type.rs index 3df8fe10a8368..ac1236c554af2 100644 --- a/tests/ui/coherence/occurs-check/associated-type.rs +++ b/tests/ui/coherence/occurs-check/associated-type.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // A regression test for #105787 diff --git a/tests/ui/coherence/occurs-check/opaques.rs b/tests/ui/coherence/occurs-check/opaques.rs index 73cd42bf3f25d..241a247c84130 100644 --- a/tests/ui/coherence/occurs-check/opaques.rs +++ b/tests/ui/coherence/occurs-check/opaques.rs @@ -1,10 +1,10 @@ -//revisions: old next -//[next] compile-flags: -Znext-solver +//@revisions: old next +//@[next] compile-flags: -Znext-solver // A regression test for #105787 -//[old] known-bug: #105787 -//[old] check-pass +//@[old] known-bug: #105787 +//@[old] check-pass #![feature(type_alias_impl_trait)] mod defining_scope { use super::*; diff --git a/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs b/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs index d18e3f453c914..e33cd480ff91f 100644 --- a/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs +++ b/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:re_rebalance_coherence_lib-rpass.rs +//@ run-pass +//@ aux-build:re_rebalance_coherence_lib-rpass.rs #![allow(dead_code)] // check that a generic type with a default value from an associated type can be used without diff --git a/tests/ui/coherence/re-rebalance-coherence.rs b/tests/ui/coherence/re-rebalance-coherence.rs index 38d096b08e148..9c176d5b1b12b 100644 --- a/tests/ui/coherence/re-rebalance-coherence.rs +++ b/tests/ui/coherence/re-rebalance-coherence.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:re_rebalance_coherence_lib.rs +//@ run-pass +//@ aux-build:re_rebalance_coherence_lib.rs extern crate re_rebalance_coherence_lib as lib; use lib::*; diff --git a/tests/ui/coinduction/canonicalization-rerun.rs b/tests/ui/coinduction/canonicalization-rerun.rs index bbd8d802630ac..06085ebfe0ba5 100644 --- a/tests/ui/coinduction/canonicalization-rerun.rs +++ b/tests/ui/coinduction/canonicalization-rerun.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // If we use canonical goals during trait solving we have to reevaluate // the root goal of a cycle until we hit a fixpoint. diff --git a/tests/ui/command-line-diagnostics.rs b/tests/ui/command-line-diagnostics.rs index 248fb83a3abc7..8a6cf5b8e32b0 100644 --- a/tests/ui/command-line-diagnostics.rs +++ b/tests/ui/command-line-diagnostics.rs @@ -1,5 +1,5 @@ // This test checks the output format without the intermediate json representation -// compile-flags: --error-format=human +//@ compile-flags: --error-format=human pub fn main() { let x = 42; diff --git a/tests/ui/command/command-argv0.rs b/tests/ui/command/command-argv0.rs index b782a4fd3d1db..53649e35a89ca 100644 --- a/tests/ui/command/command-argv0.rs +++ b/tests/ui/command/command-argv0.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::os::unix::process::CommandExt; use std::process::Command; diff --git a/tests/ui/command/command-current-dir.rs b/tests/ui/command/command-current-dir.rs index 5d06fcdebc6b1..7186a165a96f8 100644 --- a/tests/ui/command/command-current-dir.rs +++ b/tests/ui/command/command-current-dir.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Needs directory creation privilege +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Needs directory creation privilege use std::env; use std::fs; diff --git a/tests/ui/command/command-exec.rs b/tests/ui/command/command-exec.rs index edc33446d79b6..3cc5d0bbd3e8d 100644 --- a/tests/ui/command/command-exec.rs +++ b/tests/ui/command/command-exec.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no execvp syscall provided +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no execvp syscall provided #![feature(process_exec)] diff --git a/tests/ui/command/command-pre-exec.rs b/tests/ui/command/command-pre-exec.rs index e8a909eecc14a..2f3483fad086f 100644 --- a/tests/ui/command/command-pre-exec.rs +++ b/tests/ui/command/command-pre-exec.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no execvp syscall +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no execvp syscall #![feature(process_exec, rustc_private)] extern crate libc; diff --git a/tests/ui/command/command-setgroups.rs b/tests/ui/command/command-setgroups.rs index 7e321f2f0cd60..f5dbf43feb566 100644 --- a/tests/ui/command/command-setgroups.rs +++ b/tests/ui/command/command-setgroups.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows - this is a unix-specific test -// ignore-emscripten -// ignore-sgx -// ignore-musl - returns dummy result for _SC_NGROUPS_MAX -// ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32) +//@ run-pass +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten +//@ ignore-sgx +//@ ignore-musl - returns dummy result for _SC_NGROUPS_MAX +//@ ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32) #![feature(rustc_private)] #![feature(setgroups)] diff --git a/tests/ui/command/command-uid-gid.rs b/tests/ui/command/command-uid-gid.rs index aa4e2f5b89364..7a70a0fbd7612 100644 --- a/tests/ui/command/command-uid-gid.rs +++ b/tests/ui/command/command-uid-gid.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-android -// ignore-emscripten -// ignore-sgx -// ignore-fuchsia no '/bin/sh', '/bin/ls' +//@ run-pass +//@ ignore-android +//@ ignore-emscripten +//@ ignore-sgx +//@ ignore-fuchsia no '/bin/sh', '/bin/ls' #![feature(rustc_private)] diff --git a/tests/ui/command/issue-10626.rs b/tests/ui/command/issue-10626.rs index 696a2dd165765..c63edb83700ad 100644 --- a/tests/ui/command/issue-10626.rs +++ b/tests/ui/command/issue-10626.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/tests/ui/commandline-argfile-badutf8.rs b/tests/ui/commandline-argfile-badutf8.rs index e2984e3ca97ac..b3a19fa62741d 100644 --- a/tests/ui/commandline-argfile-badutf8.rs +++ b/tests/ui/commandline-argfile-badutf8.rs @@ -1,6 +1,6 @@ // Check to see if we can get parameters from an @argsfile file // -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/ui/commandline-argfile-missing.rs b/tests/ui/commandline-argfile-missing.rs index 5a6465bd06469..bb9644d66ce10 100644 --- a/tests/ui/commandline-argfile-missing.rs +++ b/tests/ui/commandline-argfile-missing.rs @@ -1,8 +1,8 @@ // Check to see if we can get parameters from an @argsfile file // -// normalize-stderr-test: "os error \d+" -> "os error $$ERR" -// normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/ui/commandline-argfile.rs b/tests/ui/commandline-argfile.rs index fc1ba0c8d677d..8577312a3c406 100644 --- a/tests/ui/commandline-argfile.rs +++ b/tests/ui/commandline-argfile.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args +//@ build-pass +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/ui/compiletest-self-test/compile-flags-last.rs b/tests/ui/compiletest-self-test/compile-flags-last.rs index 232df10f1a844..b78a64394b87c 100644 --- a/tests/ui/compiletest-self-test/compile-flags-last.rs +++ b/tests/ui/compiletest-self-test/compile-flags-last.rs @@ -3,5 +3,5 @@ // providing it. If the compile-flags are not last, the test will fail as rustc will interpret the // next flag as the argument of this flag. // -// compile-flags: --cap-lints -// error-pattern: Argument to option 'cap-lints' missing +//@ compile-flags: --cap-lints +//@ error-pattern: Argument to option 'cap-lints' missing diff --git a/tests/ui/compiletest-self-test/ui-testing-optout.rs b/tests/ui/compiletest-self-test/ui-testing-optout.rs index 88e811583161c..62920a86c3b3e 100644 --- a/tests/ui/compiletest-self-test/ui-testing-optout.rs +++ b/tests/ui/compiletest-self-test/ui-testing-optout.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no // Line number < 10 type A = B; //~ ERROR diff --git a/tests/ui/complex.rs b/tests/ui/complex.rs index 9b11ca67e477d..d1da9d189ca12 100644 --- a/tests/ui/complex.rs +++ b/tests/ui/complex.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unconditional_recursion)] #![allow(non_camel_case_types)] diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs index 0898ca9cda4df..cd181f4a49f67 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a(b=c) -// error-pattern: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") +//@ compile-flags: --error-format=human --cfg a(b=c) +//@ error-pattern: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs index 70e4256006677..a0c16bd1f80a1 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a{b} -// error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a{b} +//@ error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs index 96ac7828c5c3b..c086b8d8c3f42 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs @@ -1,3 +1,3 @@ -// compile-flags: --cfg a::b -// error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier) +//@ compile-flags: --cfg a::b +//@ error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs index 2adc27eb932eb..30402d51852fc 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a(b) -// error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a(b) +//@ error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs index a939f45103889..6f0bf8cf5fee9 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs @@ -1,3 +1,3 @@ -// compile-flags: --cfg a=10 -// error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string) +//@ compile-flags: --cfg a=10 +//@ error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs index be3ded7dd8b4a..e0ce66eab8773 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a{ -// error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a{ +//@ error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs index 149142f63ae14..b4344f1bca5c2 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs @@ -1,5 +1,5 @@ // Regression test for issue #89358. -// compile-flags: --cfg a" -// error-pattern: unterminated double quote string -// error-pattern: this error occurred on the command line +//@ compile-flags: --cfg a" +//@ error-pattern: unterminated double quote string +//@ error-pattern: this error occurred on the command line diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs index 4a2f16f113330..33f8da25830ed 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg ) -// error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg ) +//@ error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs index a61989a3e9fe1..8ab3b101da799 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs @@ -1,4 +1,4 @@ // Test for missing quotes around value, issue #66450. -// compile-flags: --error-format=human --cfg key=value -// error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") +//@ compile-flags: --error-format=human --cfg key=value +//@ error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs index 898c5bac85077..ae0afc7dfa77e 100644 --- a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs @@ -1,6 +1,6 @@ // -// error-pattern: `main` function not found -// compile-flags: --cfg foo +//@ error-pattern: `main` function not found +//@ compile-flags: --cfg foo // main is conditionally compiled, but the conditional compilation // is conditional too! diff --git a/tests/ui/conditional-compilation/cfg-attr-crate-2.rs b/tests/ui/conditional-compilation/cfg-attr-crate-2.rs index 7dbeba53afcfe..710dbd8e81841 100644 --- a/tests/ui/conditional-compilation/cfg-attr-crate-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-crate-2.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_core)] //~ ERROR the `#[no_core]` attribute is an experimental feature diff --git a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs index 2600ec7c444a0..72b0db5da841b 100644 --- a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs +++ b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs @@ -1,6 +1,6 @@ // Check that `#[cfg_attr($PREDICATE,)]` triggers the `unused_attribute` lint. -// compile-flags: --cfg TRUE +//@ compile-flags: --cfg TRUE #![deny(unused)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-false.rs b/tests/ui/conditional-compilation/cfg-attr-multi-false.rs index 0c7e7cad0359f..cfb430ec5b23a 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-false.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-false.rs @@ -1,7 +1,7 @@ // Test that cfg_attr doesn't emit any attributes when the // configuration variable is false. This mirrors `cfg-attr-multi-true.rs` -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs index 42ffb71e3d7b9..de2c7557a6db7 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_core, no_std)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs index 29690e2848f2d..e222b79c9d877 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_std, no_core)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-true.rs b/tests/ui/conditional-compilation/cfg-attr-multi-true.rs index 876d8b079a16c..424760c2e663b 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-true.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-true.rs @@ -2,7 +2,7 @@ // This is done by emitting two attributes that cause new warnings, and then // triggering those warnings. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/tests/ui/conditional-compilation/cfg-empty-codemap.rs b/tests/ui/conditional-compilation/cfg-empty-codemap.rs index c7aded7338a20..d8fc027775950 100644 --- a/tests/ui/conditional-compilation/cfg-empty-codemap.rs +++ b/tests/ui/conditional-compilation/cfg-empty-codemap.rs @@ -1,8 +1,8 @@ // Tests that empty source_maps don't ICE (#23301) -// compile-flags: --error-format=human --cfg "" +//@ compile-flags: --error-format=human --cfg "" -// error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) +//@ error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) pub fn main() { } diff --git a/tests/ui/conditional-compilation/cfg-generic-params.rs b/tests/ui/conditional-compilation/cfg-generic-params.rs index 53aa3556362f9..76ba7f9b86eaf 100644 --- a/tests/ui/conditional-compilation/cfg-generic-params.rs +++ b/tests/ui/conditional-compilation/cfg-generic-params.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg yes +//@ compile-flags:--cfg yes fn f_lt<#[cfg(yes)] 'a: 'a, #[cfg(no)] T>() {} fn f_ty<#[cfg(no)] 'a: 'a, #[cfg(yes)] T>() {} diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.rs b/tests/ui/conditional-compilation/cfg-in-crate-1.rs index 8561cd8301309..59be27a065eba 100644 --- a/tests/ui/conditional-compilation/cfg-in-crate-1.rs +++ b/tests/ui/conditional-compilation/cfg-in-crate-1.rs @@ -1,3 +1,3 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found #![cfg(bar)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-bugs.rs b/tests/ui/conditional-compilation/cfg_accessible-bugs.rs index ae18bc55c4f2d..3bf04a7eb9b3a 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-bugs.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-bugs.rs @@ -1,6 +1,6 @@ // This test is a collection of test that should pass. // -// check-fail +//@ check-fail #![feature(cfg_accessible)] #![feature(trait_alias)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs b/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs index 99a7949db173c..e357d3c6cb56f 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs @@ -1,6 +1,6 @@ -// revisions: edition2015 edition2021 -// [edition2015]compile-flags: --edition=2015 -// [edition2021]compile-flags: --edition=2021 +//@ revisions: edition2015 edition2021 +//@ [edition2015]compile-flags: --edition=2015 +//@ [edition2021]compile-flags: --edition=2021 #![feature(extern_types)] #![feature(cfg_accessible)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-private.rs b/tests/ui/conditional-compilation/cfg_accessible-private.rs index 5b095675c7986..5cc6175d1bb7f 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-private.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-private.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(cfg_accessible)] diff --git a/tests/ui/conditional-compilation/cfg_attr_path.rs b/tests/ui/conditional-compilation/cfg_attr_path.rs index efb718b786fa6..00e07761977a8 100644 --- a/tests/ui/conditional-compilation/cfg_attr_path.rs +++ b/tests/ui/conditional-compilation/cfg_attr_path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_attributes)] // c.f #35584 diff --git a/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs b/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs index af5a6462e8a75..12911c7b7c81f 100644 --- a/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs +++ b/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod module_with_cfg; diff --git a/tests/ui/conditional-compilation/issue-34028.rs b/tests/ui/conditional-compilation/issue-34028.rs index d761c0c823bcd..3ee43cb4b322d 100644 --- a/tests/ui/conditional-compilation/issue-34028.rs +++ b/tests/ui/conditional-compilation/issue-34028.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { () => { #[cfg(any())] fn f() {} } diff --git a/tests/ui/conditional-compilation/module_with_cfg.rs b/tests/ui/conditional-compilation/module_with_cfg.rs index 55c8381cffeb1..778379fa6ea7a 100644 --- a/tests/ui/conditional-compilation/module_with_cfg.rs +++ b/tests/ui/conditional-compilation/module_with_cfg.rs @@ -1,3 +1,3 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![cfg_attr(all(), cfg(FALSE))] diff --git a/tests/ui/conditional-compilation/test-cfg.rs b/tests/ui/conditional-compilation/test-cfg.rs index 8750bae002873..7c6c692072de4 100644 --- a/tests/ui/conditional-compilation/test-cfg.rs +++ b/tests/ui/conditional-compilation/test-cfg.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo #[cfg(all(foo, bar))] // foo AND bar fn foo() {} diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs index 100ab332a40d8..bce24059de8e0 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/apit-with-const-param.rs b/tests/ui/const-generics/apit-with-const-param.rs index 2a04dc313e9b2..30c27f3db51ca 100644 --- a/tests/ui/const-generics/apit-with-const-param.rs +++ b/tests/ui/const-generics/apit-with-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/const-generics/arg-in-pat-1.rs b/tests/ui/const-generics/arg-in-pat-1.rs index 82555084e418f..bb11a02de2587 100644 --- a/tests/ui/const-generics/arg-in-pat-1.rs +++ b/tests/ui/const-generics/arg-in-pat-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum ConstGenericEnum { Foo([i32; N]), Bar, diff --git a/tests/ui/const-generics/arg-in-pat-2.rs b/tests/ui/const-generics/arg-in-pat-2.rs index dc9e722eda84c..f40437c9e78f2 100644 --- a/tests/ui/const-generics/arg-in-pat-2.rs +++ b/tests/ui/const-generics/arg-in-pat-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Generic { Variant, } diff --git a/tests/ui/const-generics/arg-in-pat-3.rs b/tests/ui/const-generics/arg-in-pat-3.rs index 24626a3b68ae5..28bac3c016839 100644 --- a/tests/ui/const-generics/arg-in-pat-3.rs +++ b/tests/ui/const-generics/arg-in-pat-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; fn bindingp() { diff --git a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs index b4a083636b64f..dc28b86ecee2c 100644 --- a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_vec_partial_eq_array() -> impl PartialEq<[B; 32]> where diff --git a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs index 35df3278a6e31..3c1fd09dc0f2c 100644 --- a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_vec_partial_eq_array() -> impl PartialEq<[B; 33]> where diff --git a/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs b/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs index 294b405e0edfc..ac64ff5d14ca6 100644 --- a/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::{convert::TryFrom, rc::Rc, sync::Arc}; diff --git a/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs b/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs index 9998bb84ca0c0..fa907e3cae770 100644 --- a/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_as_ref() -> impl AsRef<[u8]> { [0; 32] diff --git a/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs b/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs index c609a7c6f9239..768eb6308ce50 100644 --- a/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_as_ref() -> impl AsRef<[u8]> { [0; 33] diff --git a/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs b/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs index 457e5ae60494a..b9e1af3690b8f 100644 --- a/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trusted_len)] diff --git a/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs b/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs index 4f343f3f97ea4..17b2a709f853c 100644 --- a/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trusted_len)] diff --git a/tests/ui/const-generics/array-wrapper-struct-ctor.rs b/tests/ui/const-generics/array-wrapper-struct-ctor.rs index a712f691dbe22..b94773562e814 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 +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/associated-type-bound.rs b/tests/ui/const-generics/associated-type-bound.rs index 0a57352c10da1..7ab9e8c346578 100644 --- a/tests/ui/const-generics/associated-type-bound.rs +++ b/tests/ui/const-generics/associated-type-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar {} trait Foo { diff --git a/tests/ui/const-generics/auxiliary/crayte.rs b/tests/ui/const-generics/auxiliary/crayte.rs index 19a8bb0f4eb21..d0d44f6f96a5f 100644 --- a/tests/ui/const-generics/auxiliary/crayte.rs +++ b/tests/ui/const-generics/auxiliary/crayte.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub trait Foo {} struct Local; diff --git a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs index df1c99e8671e8..2e070329a4936 100644 --- a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs +++ b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { const ASSOC_CONST: usize = 0; diff --git a/tests/ui/const-generics/backcompat/unevaluated-consts.rs b/tests/ui/const-generics/backcompat/unevaluated-consts.rs index 3f90d22ae2d22..ec9f35e051306 100644 --- a/tests/ui/const-generics/backcompat/unevaluated-consts.rs +++ b/tests/ui/const-generics/backcompat/unevaluated-consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // If we allow the parent generics here without using lazy normalization // this results in a cycle error. diff --git a/tests/ui/const-generics/bad-subst-const-kind.rs b/tests/ui/const-generics/bad-subst-const-kind.rs index 376b18c15b8ae..ca5522a2ddf38 100644 --- a/tests/ui/const-generics/bad-subst-const-kind.rs +++ b/tests/ui/const-generics/bad-subst-const-kind.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental #![crate_type = "lib"] trait Q { diff --git a/tests/ui/const-generics/broken-mir-1.rs b/tests/ui/const-generics/broken-mir-1.rs index 6b6140e3a730c..67b18994785f9 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 +//@ run-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 9d62281178c48..46a714f1883bf 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 +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/cannot-infer-type-for-const-param.rs b/tests/ui/const-generics/cannot-infer-type-for-const-param.rs index a6e767489b79e..11ee6af241392 100644 --- a/tests/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/tests/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test confirms that the types can be inferred correctly for this example with const // generics. Previously this would ICE, and more recently error. diff --git a/tests/ui/const-generics/coerce_unsized_array.rs b/tests/ui/const-generics/coerce_unsized_array.rs index ffd5eb9d462ed..baecead30a160 100644 --- a/tests/ui/const-generics/coerce_unsized_array.rs +++ b/tests/ui/const-generics/coerce_unsized_array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(v: &[u8; N]) -> &[u8] { v } diff --git a/tests/ui/const-generics/concrete-const-as-fn-arg.rs b/tests/ui/const-generics/concrete-const-as-fn-arg.rs index 372f0433e9511..5495f663e7f55 100644 --- a/tests/ui/const-generics/concrete-const-as-fn-arg.rs +++ b/tests/ui/const-generics/concrete-const-as-fn-arg.rs @@ -1,5 +1,5 @@ // Test that a concrete const type i.e. A<2>, can be used as an argument type in a function -// run-pass +//@ run-pass struct A; // ok diff --git a/tests/ui/const-generics/concrete-const-impl-method.rs b/tests/ui/const-generics/concrete-const-impl-method.rs index 53c9c0ead0f93..baed03d1af46d 100644 --- a/tests/ui/const-generics/concrete-const-impl-method.rs +++ b/tests/ui/const-generics/concrete-const-impl-method.rs @@ -1,6 +1,6 @@ // Test that a method/associated non-method within an impl block of a concrete const type i.e. A<2>, // is callable. -// run-pass +//@ run-pass pub struct A; diff --git a/tests/ui/const-generics/condition-in-trait-const-arg.rs b/tests/ui/const-generics/condition-in-trait-const-arg.rs index 74a663a53ec6b..d67b756895412 100644 --- a/tests/ui/const-generics/condition-in-trait-const-arg.rs +++ b/tests/ui/const-generics/condition-in-trait-const-arg.rs @@ -1,6 +1,6 @@ // Checks that `impl Trait<{anon_const}> for Type` evaluates successfully. -// check-pass -// revisions: full min +//@ check-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-arg-in-const-arg.rs b/tests/ui/const-generics/const-arg-in-const-arg.rs index c1a4c3dc34854..6d30943ab7e52 100644 --- a/tests/ui/const-generics/const-arg-in-const-arg.rs +++ b/tests/ui/const-generics/const-arg-in-const-arg.rs @@ -1,4 +1,4 @@ -// revisions: min +//@ revisions: min // we use a single revision because this should have a `full` revision // but right now that ICEs and I(@BoxyUwU) could not get stderr normalization to work diff --git a/tests/ui/const-generics/const-arg-in-fn.rs b/tests/ui/const-generics/const-arg-in-fn.rs index 9b225b18d7303..8b4ee2a00a5e6 100644 --- a/tests/ui/const-generics/const-arg-in-fn.rs +++ b/tests/ui/const-generics/const-arg-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn const_u32_identity() -> u32 { X } diff --git a/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs b/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs index d863d097d5caf..f8af5110d2732 100644 --- a/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs +++ b/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs @@ -1,4 +1,4 @@ -// aux-build:const_generic_lib.rs +//@ aux-build:const_generic_lib.rs extern crate const_generic_lib; diff --git a/tests/ui/const-generics/const-argument-cross-crate.rs b/tests/ui/const-generics/const-argument-cross-crate.rs index ff9cebdf7ec9b..a850bde4fa1ca 100644 --- a/tests/ui/const-generics/const-argument-cross-crate.rs +++ b/tests/ui/const-generics/const-argument-cross-crate.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: full min -// aux-build:const_generic_lib.rs +//@ run-pass +//@ revisions: full min +//@ aux-build:const_generic_lib.rs extern crate const_generic_lib; diff --git a/tests/ui/const-generics/const-argument-if-length.rs b/tests/ui/const-generics/const-argument-if-length.rs index c5ff86fbfb7f0..11f0661302252 100644 --- a/tests/ui/const-generics/const-argument-if-length.rs +++ b/tests/ui/const-generics/const-argument-if-length.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.rs b/tests/ui/const-generics/const-argument-non-static-lifetime.rs index df2f3b7918cf9..6267462c518b0 100644 --- a/tests/ui/const-generics/const-argument-non-static-lifetime.rs +++ b/tests/ui/const-generics/const-argument-non-static-lifetime.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min // regression test for #78180 diff --git a/tests/ui/const-generics/const-fn-with-const-param.rs b/tests/ui/const-generics/const-fn-with-const-param.rs index 161bfaab48ade..86a56c1e9e769 100644 --- a/tests/ui/const-generics/const-fn-with-const-param.rs +++ b/tests/ui/const-generics/const-fn-with-const-param.rs @@ -1,5 +1,5 @@ // Checks that `const fn` with const params can be used. -// run-pass +//@ run-pass const fn const_u32_identity() -> u32 { X diff --git a/tests/ui/const-generics/const-generic-type_name.rs b/tests/ui/const-generics/const-generic-type_name.rs index bb16be9c58c3f..ff13034f6e593 100644 --- a/tests/ui/const-generics/const-generic-type_name.rs +++ b/tests/ui/const-generics/const-generic-type_name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct S; diff --git a/tests/ui/const-generics/const-param-after-const-literal-arg.rs b/tests/ui/const-generics/const-param-after-const-literal-arg.rs index d8a0e076e0a46..9caeb4856951d 100644 --- a/tests/ui/const-generics/const-param-after-const-literal-arg.rs +++ b/tests/ui/const-generics/const-param-after-const-literal-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; diff --git a/tests/ui/const-generics/const-param-elided-lifetime.rs b/tests/ui/const-generics/const-param-elided-lifetime.rs index 45611d6bf5f3d..ef1eecb59be9d 100644 --- a/tests/ui/const-generics/const-param-elided-lifetime.rs +++ b/tests/ui/const-generics/const-param-elided-lifetime.rs @@ -2,7 +2,7 @@ // behaviour of trait bounds where `fn foo>() {}` is illegal. Though we could change // elided lifetimes within the type of a const generic parameters to be 'static, like elided // lifetimes within const/static items. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-param-in-async.rs b/tests/ui/const-generics/const-param-in-async.rs index f823431e69b9e..a6d4b2605cdc0 100644 --- a/tests/ui/const-generics/const-param-in-async.rs +++ b/tests/ui/const-generics/const-param-in-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass async fn foo(arg: [u8; N]) -> usize { arg.len() } diff --git a/tests/ui/const-generics/const-param-type-depends-on-const-param.rs b/tests/ui/const-generics/const-param-type-depends-on-const-param.rs index 64b2acb036292..ee0e1326baa87 100644 --- a/tests/ui/const-generics/const-param-type-depends-on-const-param.rs +++ b/tests/ui/const-generics/const-param-type-depends-on-const-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.rs b/tests/ui/const-generics/const-param-type-depends-on-type-param.rs index fc3aa9cbc27c9..1583fc4ee6c8c 100644 --- a/tests/ui/const-generics/const-param-type-depends-on-type-param.rs +++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const_trait_fn-issue-88433.rs b/tests/ui/const-generics/const_trait_fn-issue-88433.rs index 88dff91920674..89bcd54c46186 100644 --- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs +++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/const-generics/core-types.rs b/tests/ui/const-generics/core-types.rs index 91410c4afdf75..03b3bc172b039 100644 --- a/tests/ui/const-generics/core-types.rs +++ b/tests/ui/const-generics/core-types.rs @@ -1,6 +1,6 @@ // Check that all types allowed with `min_const_generics` work. -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/cross_crate_complex.rs b/tests/ui/const-generics/cross_crate_complex.rs index ebde155f77656..d13b69aa0cfb4 100644 --- a/tests/ui/const-generics/cross_crate_complex.rs +++ b/tests/ui/const-generics/cross_crate_complex.rs @@ -1,6 +1,6 @@ -// aux-build:crayte.rs -// edition:2018 -// run-pass +//@ aux-build:crayte.rs +//@ edition:2018 +//@ run-pass extern crate crayte; use crayte::*; diff --git a/tests/ui/const-generics/defaults/complex-generic-default-expr.rs b/tests/ui/const-generics/defaults/complex-generic-default-expr.rs index 7f50d4c9f299b..50fb4eb6e6c93 100644 --- a/tests/ui/const-generics/defaults/complex-generic-default-expr.rs +++ b/tests/ui/const-generics/defaults/complex-generic-default-expr.rs @@ -1,5 +1,5 @@ -// revisions: full min -//[full] check-pass +//@ revisions: full min +//@[full] check-pass #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/defaults/complex-unord-param.rs b/tests/ui/const-generics/defaults/complex-unord-param.rs index aebc5975a5a5d..5783fc415571a 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 +//@ run-pass // Checks a complicated usage of unordered params #![allow(dead_code)] diff --git a/tests/ui/const-generics/defaults/const-default.rs b/tests/ui/const-generics/defaults/const-default.rs index 65cb0eb14a37d..01054fb755eb9 100644 --- a/tests/ui/const-generics/defaults/const-default.rs +++ b/tests/ui/const-generics/defaults/const-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct ConstDefault; impl ConstDefault { diff --git a/tests/ui/const-generics/defaults/const-param-as-default-value.rs b/tests/ui/const-generics/defaults/const-param-as-default-value.rs index c1c955d8758ad..b1f6707892ce7 100644 --- a/tests/ui/const-generics/defaults/const-param-as-default-value.rs +++ b/tests/ui/const-generics/defaults/const-param-as-default-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo([u8; N], [u8; M]); fn foo() -> Foo { diff --git a/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs b/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs index 5f0cafe2ef179..1720109c6f48f 100644 --- a/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs +++ b/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(T); impl Foo { diff --git a/tests/ui/const-generics/defaults/default-annotation.rs b/tests/ui/const-generics/defaults/default-annotation.rs index 587ad78e29811..fbb30d43a67fd 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 +//@ run-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/default-param-wf-concrete.rs b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs index aa3307b92e43c..f181f58233263 100644 --- a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs +++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver struct Foo; //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/const-generics/defaults/external.rs b/tests/ui/const-generics/defaults/external.rs index 25ec523cb5489..241b5205f1064 100644 --- a/tests/ui/const-generics/defaults/external.rs +++ b/tests/ui/const-generics/defaults/external.rs @@ -1,5 +1,5 @@ -// aux-build:const_defaulty.rs -// check-pass +//@ aux-build:const_defaulty.rs +//@ check-pass extern crate const_defaulty; use const_defaulty::Defaulted; diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.rs b/tests/ui/const-generics/defaults/pretty-printing-ast.rs index e202d4e86a285..20bf900d9f3e4 100644 --- a/tests/ui/const-generics/defaults/pretty-printing-ast.rs +++ b/tests/ui/const-generics/defaults/pretty-printing-ast.rs @@ -1,6 +1,6 @@ // Test the AST pretty printer correctly handles default values for const generics -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![crate_type = "lib"] diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout index 121138605f1a2..f1cd1451700fa 100644 --- a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout +++ b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout @@ -1,8 +1,8 @@ #![feature(prelude_import)] #![no_std] // Test the AST pretty printer correctly handles default values for const generics -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![crate_type = "lib"] #[prelude_import] 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 118da2723acfb..c23187598bceb 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 +//@ run-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 dde8eea45257f..406efbd0f8819 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 +//@ run-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 6a782d2238c7c..ecc8cad2684cd 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 +//@ run-pass // Checks that type param defaults are allowed after const params. #![allow(dead_code)] diff --git a/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs b/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs index a1828727ecdbe..39dd6cb031f79 100644 --- a/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs +++ b/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs @@ -1,5 +1,5 @@ -// aux-build:trait_object_lt_defaults_lib.rs -// run-pass +//@ aux-build:trait_object_lt_defaults_lib.rs +//@ run-pass #![allow(dead_code)] extern crate trait_object_lt_defaults_lib; diff --git a/tests/ui/const-generics/defaults/trait_objects.rs b/tests/ui/const-generics/defaults/trait_objects.rs index 750e40313fb5a..d22eb34b7a20d 100644 --- a/tests/ui/const-generics/defaults/trait_objects.rs +++ b/tests/ui/const-generics/defaults/trait_objects.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { fn uwu(&self) -> u8 { N diff --git a/tests/ui/const-generics/defaults/type-default-const-param-name.rs b/tests/ui/const-generics/defaults/type-default-const-param-name.rs index 405664dedc701..191b752066adf 100644 --- a/tests/ui/const-generics/defaults/type-default-const-param-name.rs +++ b/tests/ui/const-generics/defaults/type-default-const-param-name.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct N; struct Foo(T); diff --git a/tests/ui/const-generics/deref-into-array-generic.rs b/tests/ui/const-generics/deref-into-array-generic.rs index 7d75af12bdfb5..590f9d17e3420 100644 --- a/tests/ui/const-generics/deref-into-array-generic.rs +++ b/tests/ui/const-generics/deref-into-array-generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Test([T; N]); diff --git a/tests/ui/const-generics/different_generic_args.rs b/tests/ui/const-generics/different_generic_args.rs index 9ee0e0747c4c2..045f0eaf663be 100644 --- a/tests/ui/const-generics/different_generic_args.rs +++ b/tests/ui/const-generics/different_generic_args.rs @@ -1,5 +1,5 @@ // Check that types with different const arguments are different. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/dyn-supertraits.rs b/tests/ui/const-generics/dyn-supertraits.rs index bb4924529824b..9f1705cfa9b7c 100644 --- a/tests/ui/const-generics/dyn-supertraits.rs +++ b/tests/ui/const-generics/dyn-supertraits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn myfun(&self) -> usize; diff --git a/tests/ui/const-generics/early/const-param-hygiene.rs b/tests/ui/const-generics/early/const-param-hygiene.rs index fd4e5b409eefc..76a4b8372c1ca 100644 --- a/tests/ui/const-generics/early/const-param-hygiene.rs +++ b/tests/ui/const-generics/early/const-param-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! bar { ($($t:tt)*) => { impl $($t)* }; diff --git a/tests/ui/const-generics/enum-variants.rs b/tests/ui/const-generics/enum-variants.rs index 5c6c4a8efac15..648c7dcbdced0 100644 --- a/tests/ui/const-generics/enum-variants.rs +++ b/tests/ui/const-generics/enum-variants.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Variant, Variant2(), diff --git a/tests/ui/const-generics/expose-default-substs-param-env.rs b/tests/ui/const-generics/expose-default-substs-param-env.rs index e40c93116af4b..4a92de2573dd5 100644 --- a/tests/ui/const-generics/expose-default-substs-param-env.rs +++ b/tests/ui/const-generics/expose-default-substs-param-env.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(unused_braces, incomplete_features)] diff --git a/tests/ui/const-generics/float-generic.rs b/tests/ui/const-generics/float-generic.rs index b72059b5b1c6a..aaf63a93d708e 100644 --- a/tests/ui/const-generics/float-generic.rs +++ b/tests/ui/const-generics/float-generic.rs @@ -1,4 +1,4 @@ -// revisions: simple adt_const_params +//@ revisions: simple adt_const_params #![cfg_attr(adt_const_params, feature(adt_const_params))] #![cfg_attr(adt_const_params, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn-const-param-call.rs b/tests/ui/const-generics/fn-const-param-call.rs index dc516fb71c4b4..ce780143178a3 100644 --- a/tests/ui/const-generics/fn-const-param-call.rs +++ b/tests/ui/const-generics/fn-const-param-call.rs @@ -1,5 +1,5 @@ // Check that functions cannot be used as const parameters. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn-const-param-infer.rs b/tests/ui/const-generics/fn-const-param-infer.rs index d80e18067e239..ed0bb9f721701 100644 --- a/tests/ui/const-generics/fn-const-param-infer.rs +++ b/tests/ui/const-generics/fn-const-param-infer.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn_with_two_same_const_inputs.rs b/tests/ui/const-generics/fn_with_two_same_const_inputs.rs index f0ce093e07a4f..d8d97cd098b7b 100644 --- a/tests/ui/const-generics/fn_with_two_same_const_inputs.rs +++ b/tests/ui/const-generics/fn_with_two_same_const_inputs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs b/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs index d3e53d7a89267..34091badfa7f1 100644 --- a/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs +++ b/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // To avoid having to `or` gate `_` as an expr. #![feature(generic_arg_infer)] 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 251160a0f5f29..613ea9da99da3 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 +//@ run-pass #![feature(generic_arg_infer)] // test that we dont use defaults to aide in type inference diff --git a/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs b/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs index 23c8d75375218..35b3fe4f4359b 100644 --- a/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs +++ b/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_arg_infer)] struct Foo; diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs index 06f00de13a30c..ff578242800f2 100644 --- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs index 184263f899ab2..8df5da4834647 100644 --- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs +++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs index 33ca6dcb3049c..fc56742dab687 100644 --- a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs +++ b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs @@ -1,5 +1,5 @@ // Tests that array sizes that depend on const-params are checked using `ConstEvaluatable`. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs, adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs index e8f89cb1aa2ca..108a630ec70cb 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs index 274caa1e99312..84a1a61619278 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs index 6597b9f2b3fe3..c4d96a362113b 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/associated-const.rs b/tests/ui/const-generics/generic_const_exprs/associated-const.rs index a6777632254b7..747e4eb917f8f 100644 --- a/tests/ui/const-generics/generic_const_exprs/associated-const.rs +++ b/tests/ui/const-generics/generic_const_exprs/associated-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo(T); impl Foo { const VALUE: usize = std::mem::size_of::(); 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 3bc72fe7faa1a..5d2198f50ad92 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs b/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs index 5874625adff61..bfe31b66e5b25 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs index 1e248411830cd..0d3158c242a63 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs index 91a8a7c4a0121..4333ec9f5522d 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const, generic_const_exprs)] #![allow(incomplete_features)] use std::marker::PhantomData; diff --git a/tests/ui/const-generics/generic_const_exprs/cross_crate.rs b/tests/ui/const-generics/generic_const_exprs/cross_crate.rs index dfc69e0b0689d..18058b8b83d67 100644 --- a/tests/ui/const-generics/generic_const_exprs/cross_crate.rs +++ b/tests/ui/const-generics/generic_const_exprs/cross_crate.rs @@ -1,5 +1,5 @@ -// aux-build:const_evaluatable_lib.rs -// run-pass +//@ aux-build:const_evaluatable_lib.rs +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_evaluatable_lib; diff --git a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs index b08fffd6922b6..304c176e85ae9 100644 --- a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs +++ b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs @@ -1,4 +1,4 @@ -// aux-build:const_evaluatable_lib.rs +//@ aux-build:const_evaluatable_lib.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_evaluatable_lib; diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs index b715e07f8fa00..107466cd1d9ca 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs @@ -1,5 +1,5 @@ -// revisions: full gce -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ revisions: full gce +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![cfg_attr(gce, 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 098fa9e0447a4..b6b5750a48f46 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 +//@ run-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 3543960c3ebdf..5290d24fc2d8e 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/drop_impl.rs b/tests/ui/const-generics/generic_const_exprs/drop_impl.rs index 077f77aa0f404..6ff158797adc6 100644 --- a/tests/ui/const-generics/generic_const_exprs/drop_impl.rs +++ b/tests/ui/const-generics/generic_const_exprs/drop_impl.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs b/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs index e4111157ecdbd..4fe7f05953276 100644 --- a/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs +++ b/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we use the elaborated predicates from traits // to satisfy const evaluatable predicates. #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs index c59d62e576d9b..b61d2dc1945a7 100644 --- a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs +++ b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] //~^ WARNING the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs b/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs index 340e35e1c65de..c4523e8a794fa 100644 --- a/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs +++ b/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // We previously always returned ambiguity when equating generic consts, even if they // only contain generic parameters. This is incorrect as trying to unify `N > 1` with `M > 1` diff --git a/tests/ui/const-generics/generic_const_exprs/fn_call.rs b/tests/ui/const-generics/generic_const_exprs/fn_call.rs index cbe4277df5683..1a753f1566bdd 100644 --- a/tests/ui/const-generics/generic_const_exprs/fn_call.rs +++ b/tests/ui/const-generics/generic_const_exprs/fn_call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 28de4f864671d..74942041f680a 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/function-call.rs b/tests/ui/const-generics/generic_const_exprs/function-call.rs index 3c866333d6096..d754fcdaddc2a 100644 --- a/tests/ui/const-generics/generic_const_exprs/function-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/function-call.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ check-pass +//@ compile-flags: -Zdeduplicate-diagnostics=yes const fn foo() -> usize { // We might instead branch on `std::mem::size_of::<*mut T>() < 8` here, diff --git a/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs b/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs index 7120d6ee25183..d0c24579c3ada 100644 --- a/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs +++ b/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs b/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs index b8058c252e77f..4ebb07e32f11d 100644 --- a/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs +++ b/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs b/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs index d81cba6275405..3bc02f4c6bbfb 100644 --- a/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs +++ b/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![feature(inline_const)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-100217.rs b/tests/ui/const-generics/generic_const_exprs/issue-100217.rs index acdc348a385a3..82a79b8d930b9 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-100217.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-100217.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-100360.rs b/tests/ui/const-generics/generic_const_exprs/issue-100360.rs index 5572f1f88df4c..b7e677a4a1e55 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-100360.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-100360.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // (this requires debug assertions) #![feature(adt_const_params)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102074.rs b/tests/ui/const-generics/generic_const_exprs/issue-102074.rs index 66d15cf1215da..a8d2b7d6e49b7 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102074.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-102074.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that the NoopMethodCall lint doesn't call Instance::resolve on unresolved consts #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-62504.rs b/tests/ui/const-generics/generic_const_exprs/issue-62504.rs index 6f40a9abfa796..b6a6a277843af 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-62504.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-62504.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![allow(incomplete_features)] #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72787.rs b/tests/ui/const-generics/generic_const_exprs/issue-72787.rs index 657fec2e9cb70..c3208786708b5 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72787.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-72787.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs index 7a5aa9e47d49c..c3c598ce778cd 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs @@ -1,6 +1,6 @@ // Regression test for #72819: ICE due to failure in resolving the const generic in `Arr`'s type // bounds. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-73298.rs b/tests/ui/const-generics/generic_const_exprs/issue-73298.rs index 3c59e1b790a12..3e4dd2fd2798c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-73298.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-73298.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] 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 d1ab1be04733f..61550c03ec6ad 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74634.rs b/tests/ui/const-generics/generic_const_exprs/issue-74634.rs index cd1f7a9da687d..859b4c8b1af81 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-74634.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-74634.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs b/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs index 77d3c98dab922..fba82c03f11aa 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs index 5f612780f39d9..ddb7b5f852e45 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs @@ -1,10 +1,10 @@ -// check-fail -// known-bug: #97477 -// failure-status: 101 -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -// rustc-env:RUST_BACKTRACE=0 +//@ check-fail +//@ known-bug: #97477 +//@ failure-status: 101 +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@ rustc-env:RUST_BACKTRACE=0 // This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place diff --git a/tests/ui/const-generics/generic_const_exprs/issue-82268.rs b/tests/ui/const-generics/generic_const_exprs/issue-82268.rs index d08fc5beb75f6..8bd7790da2f6a 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-82268.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-82268.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-83972.rs b/tests/ui/const-generics/generic_const_exprs/issue-83972.rs index 0063719b8528c..cc1e35cbd186e 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-83972.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-83972.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-84408.rs b/tests/ui/const-generics/generic_const_exprs/issue-84408.rs index fb2e5590d2163..0b2a3a5b4ef2c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-84408.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-84408.rs @@ -1,5 +1,5 @@ // Regression test for #84408. -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-84669.rs b/tests/ui/const-generics/generic_const_exprs/issue-84669.rs index 3933ff20a49c5..4c56db72898ed 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-84669.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-84669.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-86710.rs b/tests/ui/const-generics/generic_const_exprs/issue-86710.rs index 281b12458e3d9..9e6c3a4a40c96 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-86710.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-86710.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-89851.rs b/tests/ui/const-generics/generic_const_exprs/issue-89851.rs index cde849d901788..78189c5225cd9 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-89851.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-89851.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // (this requires debug assertions) #![feature(adt_const_params)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-90847.rs b/tests/ui/const-generics/generic_const_exprs/issue-90847.rs index ebc6fe1412320..a5d7acb2c8f97 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-90847.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-90847.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-94287.rs b/tests/ui/const-generics/generic_const_exprs/issue-94287.rs index 643126a4640a8..4b2fa1dac9bd2 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-94287.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-94287.rs @@ -1,5 +1,5 @@ -// aux-build:issue-94287-aux.rs -// build-fail +//@ aux-build:issue-94287-aux.rs +//@ build-fail extern crate issue_94287_aux; diff --git a/tests/ui/const-generics/generic_const_exprs/issue-94293.rs b/tests/ui/const-generics/generic_const_exprs/issue-94293.rs index 713c5d89a9300..cf986f1d09d06 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-94293.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-94293.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-96699.rs b/tests/ui/const-generics/generic_const_exprs/issue-96699.rs index 83f329d2a2dff..6afc2b7fb0358 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-96699.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-96699.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code, incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs index 67e30232e2fbb..5a6565fe2f1e0 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, generic_const_exprs)] //~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs index 00568a0894465..1338f40208c57 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, generic_const_exprs)] //~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [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 f797beda8e6c5..a6b5eb15d6c1b 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 +//@ edition:2018 +//@ run-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-99705.rs b/tests/ui/const-generics/generic_const_exprs/issue-99705.rs index 75b57b621bb57..82f7cc1045c04 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-99705.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-99705.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(generic_const_exprs)] #![allow(incomplete_features)] 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 2e9af1bf4f0bd..07dfe7d9687dc 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs index 7e5022817e414..18a06179dde16 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs index 769e3ae6895f2..d2269bf39fe9a 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs index 316887e5e7fa5..52d1f27459cc0 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs index 18a99398622ca..65a634980c065 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_parens, unused_braces)] diff --git a/tests/ui/const-generics/generic_const_exprs/no_dependence.rs b/tests/ui/const-generics/generic_const_exprs/no_dependence.rs index db8dc6ed4434e..ea27e5ef3a811 100644 --- a/tests/ui/const-generics/generic_const_exprs/no_dependence.rs +++ b/tests/ui/const-generics/generic_const_exprs/no_dependence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs index 1254b4435f738..12c1df0e337d9 100644 --- a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs +++ b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs @@ -1,4 +1,4 @@ -// aux-build:anon_const_non_local.rs +//@ aux-build:anon_const_non_local.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs index b37b354ae2146..e7791ebae86e7 100644 --- a/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_braces)] diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs b/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs index f4c89f6235a0c..6220d681fe154 100644 --- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs +++ b/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs b/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs index 0ba0c5a72efbd..4485ea14712aa 100644 --- a/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs +++ b/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs b/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs index d6574a3aa2f8b..dc883eb2c9b65 100644 --- a/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs +++ b/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs b/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs index d058b36385091..dff489d466dc9 100644 --- a/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs +++ b/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we correctly substitute generic arguments for type aliases. #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs index b22cab7c7ffad..81be8d5c7d767 100644 --- a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs +++ b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// known-bug: #97156 +//@ known-bug: #110395 +//@ known-bug: #97156 #![feature(const_type_id, const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs index ae9207cf8555b..2f903ea419efa 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(generic_const_exprs, adt_const_params, const_trait_impl)] #![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 c12fef083cc73..c8eb3deba6075 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs b/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs index 9580f8a7fbc55..aff9826079db8 100644 --- a/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs +++ b/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Foo; diff --git a/tests/ui/const-generics/ice-68875.rs b/tests/ui/const-generics/ice-68875.rs index 2ef7cfdbe2735..cc9546be2c921 100644 --- a/tests/ui/const-generics/ice-68875.rs +++ b/tests/ui/const-generics/ice-68875.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct DataWrapper<'a> { data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants diff --git a/tests/ui/const-generics/impl-const-generic-struct.rs b/tests/ui/const-generics/impl-const-generic-struct.rs index 7eb2c6a51fcfb..4f82cc758d9f8 100644 --- a/tests/ui/const-generics/impl-const-generic-struct.rs +++ b/tests/ui/const-generics/impl-const-generic-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; impl S { diff --git a/tests/ui/const-generics/infer_arg_from_pat.rs b/tests/ui/const-generics/infer_arg_from_pat.rs index 10317a1b98fcc..1740bcca4ce32 100644 --- a/tests/ui/const-generics/infer_arg_from_pat.rs +++ b/tests/ui/const-generics/infer_arg_from_pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // see issue #70529 diff --git a/tests/ui/const-generics/infer_arr_len_from_pat.rs b/tests/ui/const-generics/infer_arr_len_from_pat.rs index 40f6f5b8d55ce..0ad01d6144d57 100644 --- a/tests/ui/const-generics/infer_arr_len_from_pat.rs +++ b/tests/ui/const-generics/infer_arr_len_from_pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // see issue #70529 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 b4f44dac62d37..a5f515f5ea228 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 +//@ run-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 d6d0a80ab11c1..3613deb9cd736 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs b/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs index 2b8731ba7096c..0bcffcafb4fd6 100644 --- a/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs +++ b/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn takes_closure_of_array_3(f: F) where F: Fn([i32; 3]) { f([1, 2, 3]); diff --git a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs index 147a00cb26bfc..02e6d27a27e6c 100644 --- a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs +++ b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(adt_const_params, generic_const_exprs))] diff --git a/tests/ui/const-generics/issue-102124.rs b/tests/ui/const-generics/issue-102124.rs index a28f198e9e099..7e59141eae37e 100644 --- a/tests/ui/const-generics/issue-102124.rs +++ b/tests/ui/const-generics/issue-102124.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=3 // regression test for #102124 diff --git a/tests/ui/const-generics/issue-105689.rs b/tests/ui/const-generics/issue-105689.rs index 4237b3cad8e7f..6c9215d78e72e 100644 --- a/tests/ui/const-generics/issue-105689.rs +++ b/tests/ui/const-generics/issue-105689.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs b/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs index 8363e5af4b61c..cb0cca544a49e 100644 --- a/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs +++ b/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-46511.rs b/tests/ui/const-generics/issue-46511.rs index 78baba818ad76..a015b7a965e22 100644 --- a/tests/ui/const-generics/issue-46511.rs +++ b/tests/ui/const-generics/issue-46511.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct Foo<'a> //~ ERROR parameter `'a` is never used [E0392] { diff --git a/tests/ui/const-generics/issue-70408.rs b/tests/ui/const-generics/issue-70408.rs index f7557cb492c06..e74bcf945a54f 100644 --- a/tests/ui/const-generics/issue-70408.rs +++ b/tests/ui/const-generics/issue-70408.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-97007.rs b/tests/ui/const-generics/issue-97007.rs index 7036834c4b119..a099c423e6ddf 100644 --- a/tests/ui/const-generics/issue-97007.rs +++ b/tests/ui/const-generics/issue-97007.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, 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 f7d2394994396..65c8cfe8103d0 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 +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/issues/issue-105821.rs b/tests/ui/const-generics/issues/issue-105821.rs index 6cfabb65efb25..a0a98103b2cd2 100644 --- a/tests/ui/const-generics/issues/issue-105821.rs +++ b/tests/ui/const-generics/issues/issue-105821.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params, generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-56445-1.rs b/tests/ui/const-generics/issues/issue-56445-1.rs index d862bf24aef7b..35126b3f55ad6 100644 --- a/tests/ui/const-generics/issues/issue-56445-1.rs +++ b/tests/ui/const-generics/issues/issue-56445-1.rs @@ -1,5 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] #![crate_type = "lib"] diff --git a/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs b/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs index 0066490dfa37a..8b3c8eea61645 100644 --- a/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs +++ b/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Generic; diff --git a/tests/ui/const-generics/issues/issue-61336-1.rs b/tests/ui/const-generics/issues/issue-61336-1.rs index beb37e63b5e5d..24acd6a8d72bc 100644 --- a/tests/ui/const-generics/issues/issue-61336-1.rs +++ b/tests/ui/const-generics/issues/issue-61336-1.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn f(x: T) -> [T; N] { [x; N] } diff --git a/tests/ui/const-generics/issues/issue-61422.rs b/tests/ui/const-generics/issues/issue-61422.rs index 0b9cf40d85554..88fd8b9405c27 100644 --- a/tests/ui/const-generics/issues/issue-61422.rs +++ b/tests/ui/const-generics/issues/issue-61422.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::mem; // Neither of the uninits below are currently accepted as not UB, however, diff --git a/tests/ui/const-generics/issues/issue-61432.rs b/tests/ui/const-generics/issues/issue-61432.rs index 6192af82afb28..329bf24922e6b 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 +//@ run-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 fa76aeae901d1..778e4a31d15f6 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 +//@ run-pass pub trait BitLen: Sized { const BIT_LEN: usize; } diff --git a/tests/ui/const-generics/issues/issue-62878.rs b/tests/ui/const-generics/issues/issue-62878.rs index d226551ef8a97..0b5269df85ee1 100644 --- a/tests/ui/const-generics/issues/issue-62878.rs +++ b/tests/ui/const-generics/issues/issue-62878.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params, generic_arg_infer))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs index 8bc35ab3d3795..c5b83e9d5298d 100644 --- a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs +++ b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-64519.rs b/tests/ui/const-generics/issues/issue-64519.rs index 969289b26e80d..1b41a8204af57 100644 --- a/tests/ui/const-generics/issues/issue-64519.rs +++ b/tests/ui/const-generics/issues/issue-64519.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { state: Option<[u8; D]>, } diff --git a/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs b/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs index 091419f0c52ec..113bf94b5cb09 100644 --- a/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs +++ b/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-66906.rs b/tests/ui/const-generics/issues/issue-66906.rs index a0b3f91220710..8836da84a3839 100644 --- a/tests/ui/const-generics/issues/issue-66906.rs +++ b/tests/ui/const-generics/issues/issue-66906.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Tuple; diff --git a/tests/ui/const-generics/issues/issue-67185-1.rs b/tests/ui/const-generics/issues/issue-67185-1.rs index 69425b25eaee4..12127330cac16 100644 --- a/tests/ui/const-generics/issues/issue-67185-1.rs +++ b/tests/ui/const-generics/issues/issue-67185-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Baz { type Quaks; diff --git a/tests/ui/const-generics/issues/issue-67375.rs b/tests/ui/const-generics/issues/issue-67375.rs index 8b4b276bae0ba..5c6377bf94b44 100644 --- a/tests/ui/const-generics/issues/issue-67375.rs +++ b/tests/ui/const-generics/issues/issue-67375.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67739.rs b/tests/ui/const-generics/issues/issue-67739.rs index de0eb7f509ae5..08bf4461d668e 100644 --- a/tests/ui/const-generics/issues/issue-67739.rs +++ b/tests/ui/const-generics/issues/issue-67739.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-67945-1.rs b/tests/ui/const-generics/issues/issue-67945-1.rs index 99f88bc8e1055..35ee36359b67c 100644 --- a/tests/ui/const-generics/issues/issue-67945-1.rs +++ b/tests/ui/const-generics/issues/issue-67945-1.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67945-2.rs b/tests/ui/const-generics/issues/issue-67945-2.rs index cbb4e14eccf72..ce48b3f86a65b 100644 --- a/tests/ui/const-generics/issues/issue-67945-2.rs +++ b/tests/ui/const-generics/issues/issue-67945-2.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67945-3.rs b/tests/ui/const-generics/issues/issue-67945-3.rs index fd8a393effe72..d0a3a26dced9d 100644 --- a/tests/ui/const-generics/issues/issue-67945-3.rs +++ b/tests/ui/const-generics/issues/issue-67945-3.rs @@ -2,7 +2,7 @@ // https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285 // Make sure we don't emit an E0277 error. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-67945-4.rs b/tests/ui/const-generics/issues/issue-67945-4.rs index 9a27bf09f8814..da9de87d05393 100644 --- a/tests/ui/const-generics/issues/issue-67945-4.rs +++ b/tests/ui/const-generics/issues/issue-67945-4.rs @@ -1,7 +1,7 @@ // Regression test for // https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285 -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs b/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs index ad5710baae2bf..0c5e72bb87897 100644 --- a/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs +++ b/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs @@ -1,5 +1,5 @@ -// aux-build:impl-const.rs -// run-pass +//@ aux-build:impl-const.rs +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-68366.rs b/tests/ui/const-generics/issues/issue-68366.rs index 4c2741ab43371..d3e57a021a682 100644 --- a/tests/ui/const-generics/issues/issue-68366.rs +++ b/tests/ui/const-generics/issues/issue-68366.rs @@ -2,7 +2,7 @@ // The note should relate to the fact that it cannot be shown forall N that it maps 1-1 to a new // type. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68596.rs b/tests/ui/const-generics/issues/issue-68596.rs index c3c9141e424d4..9e450adf5ee54 100644 --- a/tests/ui/const-generics/issues/issue-68596.rs +++ b/tests/ui/const-generics/issues/issue-68596.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct S(u8); impl S { diff --git a/tests/ui/const-generics/issues/issue-68615-adt.rs b/tests/ui/const-generics/issues/issue-68615-adt.rs index 3ef1ad45edfd4..4252bd153251b 100644 --- a/tests/ui/const-generics/issues/issue-68615-adt.rs +++ b/tests/ui/const-generics/issues/issue-68615-adt.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68615-array.rs b/tests/ui/const-generics/issues/issue-68615-array.rs index 93477be41b590..b2f946288e8ca 100644 --- a/tests/ui/const-generics/issues/issue-68615-array.rs +++ b/tests/ui/const-generics/issues/issue-68615-array.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] 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 21d6270b1fafa..bd8f1fcddb82e 100644 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.rs +++ b/tests/ui/const-generics/issues/issue-69654-run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Bar {} //~ WARN trait `Bar` is never used impl Bar for [u8; 7] {} diff --git a/tests/ui/const-generics/issues/issue-70125-1.rs b/tests/ui/const-generics/issues/issue-70125-1.rs index 0027cd46a519f..d15ca957cdcdd 100644 --- a/tests/ui/const-generics/issues/issue-70125-1.rs +++ b/tests/ui/const-generics/issues/issue-70125-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const L: usize = 4; diff --git a/tests/ui/const-generics/issues/issue-70125-2.rs b/tests/ui/const-generics/issues/issue-70125-2.rs index cfd5e784ec404..ec53c538ea23d 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 +//@ run-pass fn main() { <()>::foo(); } diff --git a/tests/ui/const-generics/issues/issue-70167.rs b/tests/ui/const-generics/issues/issue-70167.rs index 3961941f81fa9..4037bd67a282b 100644 --- a/tests/ui/const-generics/issues/issue-70167.rs +++ b/tests/ui/const-generics/issues/issue-70167.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait: From<>::Item> { type Item; } diff --git a/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs b/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs index 2ec37cc3a1be5..dd5e94df665e5 100644 --- a/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs +++ b/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub fn works() { let array/*: [_; _]*/ = default_array(); diff --git a/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs b/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs index 95e548428747f..f69eee643580e 100644 --- a/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs +++ b/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn works() { let array/*: [u8; _]*/ = default_byte_array(); diff --git a/tests/ui/const-generics/issues/issue-70225.rs b/tests/ui/const-generics/issues/issue-70225.rs index d458d7b2e8713..dd00ac11870d1 100644 --- a/tests/ui/const-generics/issues/issue-70225.rs +++ b/tests/ui/const-generics/issues/issue-70225.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] // We previously incorrectly linted `L` as unused here. diff --git a/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs b/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs index f02ab355f9bb6..6f557ca9deb7a 100644 --- a/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs +++ b/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T { fn f(); diff --git a/tests/ui/const-generics/issues/issue-71169.rs b/tests/ui/const-generics/issues/issue-71169.rs index e4ec6b0737613..fdac0974d3476 100644 --- a/tests/ui/const-generics/issues/issue-71169.rs +++ b/tests/ui/const-generics/issues/issue-71169.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71381.rs b/tests/ui/const-generics/issues/issue-71381.rs index 75ad4545371a7..7f2e14944e296 100644 --- a/tests/ui/const-generics/issues/issue-71381.rs +++ b/tests/ui/const-generics/issues/issue-71381.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71382.rs b/tests/ui/const-generics/issues/issue-71382.rs index 4392d72e5668e..8878a4434c46f 100644 --- a/tests/ui/const-generics/issues/issue-71382.rs +++ b/tests/ui/const-generics/issues/issue-71382.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71547.rs b/tests/ui/const-generics/issues/issue-71547.rs index 60776a1a985cf..a2cea433a44de 100644 --- a/tests/ui/const-generics/issues/issue-71547.rs +++ b/tests/ui/const-generics/issues/issue-71547.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-71611.rs b/tests/ui/const-generics/issues/issue-71611.rs index 9293009248218..0e0c08146b2ed 100644 --- a/tests/ui/const-generics/issues/issue-71611.rs +++ b/tests/ui/const-generics/issues/issue-71611.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71986.rs b/tests/ui/const-generics/issues/issue-71986.rs index 6f0a98ead8870..c97b3c59e0e8e 100644 --- a/tests/ui/const-generics/issues/issue-71986.rs +++ b/tests/ui/const-generics/issues/issue-71986.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo {} pub fn bar>() {} diff --git a/tests/ui/const-generics/issues/issue-72352.rs b/tests/ui/const-generics/issues/issue-72352.rs index 0cab6e8ebfa8d..841ae8670042a 100644 --- a/tests/ui/const-generics/issues/issue-72352.rs +++ b/tests/ui/const-generics/issues/issue-72352.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-73120.rs b/tests/ui/const-generics/issues/issue-73120.rs index 050dc9bde64b0..b980a34b6f48a 100644 --- a/tests/ui/const-generics/issues/issue-73120.rs +++ b/tests/ui/const-generics/issues/issue-73120.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:const_generic_issues_lib.rs +//@ check-pass +//@ aux-build:const_generic_issues_lib.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_generic_issues_lib as lib2; diff --git a/tests/ui/const-generics/issues/issue-73491.rs b/tests/ui/const-generics/issues/issue-73491.rs index 482dbb04daae9..ad0eb7e8243e5 100644 --- a/tests/ui/const-generics/issues/issue-73491.rs +++ b/tests/ui/const-generics/issues/issue-73491.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs index f0d604835cbb6..701b3423f3190 100644 --- a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs +++ b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs @@ -1,7 +1,7 @@ // Regression test for #73727 -// revisions: full min -//[full]check-pass +//@ revisions: full min +//@[full]check-pass #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74101.rs b/tests/ui/const-generics/issues/issue-74101.rs index 4c9b2d3c634da..5c50951d73344 100644 --- a/tests/ui/const-generics/issues/issue-74101.rs +++ b/tests/ui/const-generics/issues/issue-74101.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74255.rs b/tests/ui/const-generics/issues/issue-74255.rs index 60b2fd37c44f6..202fa405eab92 100644 --- a/tests/ui/const-generics/issues/issue-74255.rs +++ b/tests/ui/const-generics/issues/issue-74255.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74906.rs b/tests/ui/const-generics/issues/issue-74906.rs index cc1f2853fb2af..0a37cebc02304 100644 --- a/tests/ui/const-generics/issues/issue-74906.rs +++ b/tests/ui/const-generics/issues/issue-74906.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass const SIZE: usize = 16; diff --git a/tests/ui/const-generics/issues/issue-74950.rs b/tests/ui/const-generics/issues/issue-74950.rs index f1f9bd16ebe1d..f79676ccee8ed 100644 --- a/tests/ui/const-generics/issues/issue-74950.rs +++ b/tests/ui/const-generics/issues/issue-74950.rs @@ -1,5 +1,5 @@ -// [full] build-pass -// revisions: full min +//@ [full] build-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-75047.rs b/tests/ui/const-generics/issues/issue-75047.rs index 7b6fb92bca96e..549be1031833a 100644 --- a/tests/ui/const-generics/issues/issue-75047.rs +++ b/tests/ui/const-generics/issues/issue-75047.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-75299.rs b/tests/ui/const-generics/issues/issue-75299.rs index 83ef09af88e3b..2c48dc7120772 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 +//@ compile-flags: -Zmir-opt-level=4 +//@ run-pass fn main() { fn foo() -> [u8; N] { [0; N] diff --git a/tests/ui/const-generics/issues/issue-83288.rs b/tests/ui/const-generics/issues/issue-83288.rs index a24596d242e0d..4260170d1ac3f 100644 --- a/tests/ui/const-generics/issues/issue-83288.rs +++ b/tests/ui/const-generics/issues/issue-83288.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-85031-2.rs b/tests/ui/const-generics/issues/issue-85031-2.rs index 50dd66da6dbb4..bd96690f995cd 100644 --- a/tests/ui/const-generics/issues/issue-85031-2.rs +++ b/tests/ui/const-generics/issues/issue-85031-2.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: unknown +//@ check-pass +//@ known-bug: unknown // This should not compile, as the compiler should not know // `A - 0` is satisfied `?x - 0` if `?x` is inferred to `A`. diff --git a/tests/ui/const-generics/issues/issue-86033.rs b/tests/ui/const-generics/issues/issue-86033.rs index cf08f722fbb80..a27e8d77b64b2 100644 --- a/tests/ui/const-generics/issues/issue-86033.rs +++ b/tests/ui/const-generics/issues/issue-86033.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-86535-2.rs b/tests/ui/const-generics/issues/issue-86535-2.rs index 0b535fd66498d..1ba3b6d5347c0 100644 --- a/tests/ui/const-generics/issues/issue-86535-2.rs +++ b/tests/ui/const-generics/issues/issue-86535-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-86535.rs b/tests/ui/const-generics/issues/issue-86535.rs index 5289c4e99dd6f..dd6bc88ad198f 100644 --- a/tests/ui/const-generics/issues/issue-86535.rs +++ b/tests/ui/const-generics/issues/issue-86535.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params, generic_const_exprs)] #![allow(incomplete_features, unused_variables)] diff --git a/tests/ui/const-generics/issues/issue-87076.rs b/tests/ui/const-generics/issues/issue-87076.rs index a32c1f965f8b5..632320fb3c5a0 100644 --- a/tests/ui/const-generics/issues/issue-87076.rs +++ b/tests/ui/const-generics/issues/issue-87076.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-87470.rs b/tests/ui/const-generics/issues/issue-87470.rs index d60181a418a15..ab2e0039e7080 100644 --- a/tests/ui/const-generics/issues/issue-87470.rs +++ b/tests/ui/const-generics/issues/issue-87470.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-87964.rs b/tests/ui/const-generics/issues/issue-87964.rs index 116686abb9e3d..fbaf2bcfa7a8b 100644 --- a/tests/ui/const-generics/issues/issue-87964.rs +++ b/tests/ui/const-generics/issues/issue-87964.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-88119.rs b/tests/ui/const-generics/issues/issue-88119.rs index 647b0eea86daf..bcbb26f0d8e68 100644 --- a/tests/ui/const-generics/issues/issue-88119.rs +++ b/tests/ui/const-generics/issues/issue-88119.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(const_trait_impl, generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-88468.rs b/tests/ui/const-generics/issues/issue-88468.rs index 914047236ab5d..3c84d3d5cc260 100644 --- a/tests/ui/const-generics/issues/issue-88468.rs +++ b/tests/ui/const-generics/issues/issue-88468.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-89146.rs b/tests/ui/const-generics/issues/issue-89146.rs index e3540f46f1e81..5c65d7af6f74a 100644 --- a/tests/ui/const-generics/issues/issue-89146.rs +++ b/tests/ui/const-generics/issues/issue-89146.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-89304.rs b/tests/ui/const-generics/issues/issue-89304.rs index d544d637cc490..d5cbfc9300b1c 100644 --- a/tests/ui/const-generics/issues/issue-89304.rs +++ b/tests/ui/const-generics/issues/issue-89304.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-89320.rs b/tests/ui/const-generics/issues/issue-89320.rs index afa5c8fab74e8..36482737704e6 100644 --- a/tests/ui/const-generics/issues/issue-89320.rs +++ b/tests/ui/const-generics/issues/issue-89320.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-89334.rs b/tests/ui/const-generics/issues/issue-89334.rs index b15b7428cdd0c..9c2426c8936c1 100644 --- a/tests/ui/const-generics/issues/issue-89334.rs +++ b/tests/ui/const-generics/issues/issue-89334.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(unused_braces, incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-92186.rs b/tests/ui/const-generics/issues/issue-92186.rs index 9ced4667d249a..73c50b6e41c5d 100644 --- a/tests/ui/const-generics/issues/issue-92186.rs +++ b/tests/ui/const-generics/issues/issue-92186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-96654.rs b/tests/ui/const-generics/issues/issue-96654.rs index 8cf786dbe40bf..fbbb68a763971 100644 --- a/tests/ui/const-generics/issues/issue-96654.rs +++ b/tests/ui/const-generics/issues/issue-96654.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A {} diff --git a/tests/ui/const-generics/issues/issue-97634.rs b/tests/ui/const-generics/issues/issue-97634.rs index 422e8de685645..2bd213fc53253 100644 --- a/tests/ui/const-generics/issues/issue-97634.rs +++ b/tests/ui/const-generics/issues/issue-97634.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub enum Register { Field0 = 40, diff --git a/tests/ui/const-generics/late-bound-vars/in_closure.rs b/tests/ui/const-generics/late-bound-vars/in_closure.rs index 443c755c601cd..88537f29dfdf1 100644 --- a/tests/ui/const-generics/late-bound-vars/in_closure.rs +++ b/tests/ui/const-generics/late-bound-vars/in_closure.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs index b81aa50d9a908..a5d7042dbf165 100644 --- a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs +++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs index 89f01748fc90a..629e5d45428e3 100644 --- a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs +++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/simple.rs b/tests/ui/const-generics/late-bound-vars/simple.rs index a562bd8cb41ce..73c01ce677715 100644 --- a/tests/ui/const-generics/late-bound-vars/simple.rs +++ b/tests/ui/const-generics/late-bound-vars/simple.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // If we want this to compile, then we'd need to do something like RPITs do, // where nested associated constants have early-bound versions of their captured diff --git a/tests/ui/const-generics/legacy-const-generics-bad.rs b/tests/ui/const-generics/legacy-const-generics-bad.rs index 538eee337cc6d..3521c39fca93c 100644 --- a/tests/ui/const-generics/legacy-const-generics-bad.rs +++ b/tests/ui/const-generics/legacy-const-generics-bad.rs @@ -1,4 +1,4 @@ -// aux-build:legacy-const-generics.rs +//@ aux-build:legacy-const-generics.rs extern crate legacy_const_generics; diff --git a/tests/ui/const-generics/legacy-const-generics.rs b/tests/ui/const-generics/legacy-const-generics.rs index 9abc72d98e6ce..9411be0e620fd 100644 --- a/tests/ui/const-generics/legacy-const-generics.rs +++ b/tests/ui/const-generics/legacy-const-generics.rs @@ -1,5 +1,5 @@ -// aux-build:legacy-const-generics.rs -// run-pass +//@ aux-build:legacy-const-generics.rs +//@ run-pass #![feature(rustc_attrs)] diff --git a/tests/ui/const-generics/min_const_generics/assoc_const.rs b/tests/ui/const-generics/min_const_generics/assoc_const.rs index 27e971b5b6f9b..ce373a74cf3c7 100644 --- a/tests/ui/const-generics/min_const_generics/assoc_const.rs +++ b/tests/ui/const-generics/min_const_generics/assoc_const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; impl Foo { diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.rs b/tests/ui/const-generics/min_const_generics/complex-expression.rs index 8e667aebaadc2..ef2cbfa73adae 100644 --- a/tests/ui/const-generics/min_const_generics/complex-expression.rs +++ b/tests/ui/const-generics/min_const_generics/complex-expression.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::mem::size_of; fn test() {} diff --git a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs index e9d868093e769..a3235e3878ae2 100644 --- a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs +++ b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ check-pass +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(dead_code)] fn foo() { diff --git a/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs b/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs index 0c10af6c43f56..aac90e44208a6 100644 --- a/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs +++ b/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn identity() -> u32 { T } diff --git a/tests/ui/const-generics/min_const_generics/default_trait_param.rs b/tests/ui/const-generics/min_const_generics/default_trait_param.rs index 9cd5e3279ffa0..dd642f9b3a088 100644 --- a/tests/ui/const-generics/min_const_generics/default_trait_param.rs +++ b/tests/ui/const-generics/min_const_generics/default_trait_param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} fn main() {} 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 57d6941587a43..0256ef732a346 100644 --- a/tests/ui/const-generics/min_const_generics/inferred_const.rs +++ b/tests/ui/const-generics/min_const_generics/inferred_const.rs @@ -1,5 +1,5 @@ #![feature(generic_arg_infer)] -// run-pass +//@ run-pass fn foo(_data: [u32; N]) -> [u32; K] { [0; K] diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs index 13b2cca2f241e..a9d2a8a5dd7a4 100644 --- a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs +++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth use std::mem::transmute; fn get_flag() -> Option { diff --git a/tests/ui/const-generics/min_const_generics/macro.rs b/tests/ui/const-generics/min_const_generics/macro.rs index 9b63f76987a05..b7e8083a86199 100644 --- a/tests/ui/const-generics/min_const_generics/macro.rs +++ b/tests/ui/const-generics/min_const_generics/macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Example; macro_rules! external_macro { 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 fa119c59f613e..9f8f63eb905d5 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 +//@ run-pass #![allow(dead_code)] struct Both { diff --git a/tests/ui/const-generics/nested-type.rs b/tests/ui/const-generics/nested-type.rs index ff95018065a84..a9d106237b399 100644 --- a/tests/ui/const-generics/nested-type.rs +++ b/tests/ui/const-generics/nested-type.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/occurs-check/bind-param.rs b/tests/ui/const-generics/occurs-check/bind-param.rs index ee4244051a1ed..56ddccf219c72 100644 --- a/tests/ui/const-generics/occurs-check/bind-param.rs +++ b/tests/ui/const-generics/occurs-check/bind-param.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs index e6f8e4ad3b3a2..1c1ed41051da2 100644 --- a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs +++ b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] //~ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/const-generics/overlapping_impls.rs b/tests/ui/const-generics/overlapping_impls.rs index 2ce6c4a823c37..3f0bd7bf3b2a1 100644 --- a/tests/ui/const-generics/overlapping_impls.rs +++ b/tests/ui/const-generics/overlapping_impls.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs index b24a7afabd90f..2794ff3eaa9cb 100644 --- a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs +++ b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/parent_generics_of_encoding.rs b/tests/ui/const-generics/parent_generics_of_encoding.rs index b87e3960fc92c..1f9c8c5bc75a1 100644 --- a/tests/ui/const-generics/parent_generics_of_encoding.rs +++ b/tests/ui/const-generics/parent_generics_of_encoding.rs @@ -1,5 +1,5 @@ -// aux-build:generics_of_parent.rs -// check-pass +//@ aux-build:generics_of_parent.rs +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs index 7a78e0f109ca7..3922aa7aa4a1f 100644 --- a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs +++ b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs @@ -1,4 +1,4 @@ -// aux-build:generics_of_parent_impl_trait.rs +//@ aux-build:generics_of_parent_impl_trait.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/promotion.rs b/tests/ui/const-generics/promotion.rs index ce9a1a0feb420..7229c2570a750 100644 --- a/tests/ui/const-generics/promotion.rs +++ b/tests/ui/const-generics/promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // tests that promoting expressions containing const parameters is allowed. fn promotion_test() -> &'static usize { &(3 + N) diff --git a/tests/ui/const-generics/raw-ptr-const-param-deref.rs b/tests/ui/const-generics/raw-ptr-const-param-deref.rs index 65595f07dab3c..b7fcbb3447a6a 100644 --- a/tests/ui/const-generics/raw-ptr-const-param-deref.rs +++ b/tests/ui/const-generics/raw-ptr-const-param-deref.rs @@ -1,5 +1,5 @@ // Checks that pointers must not be used as the type of const params. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/raw-ptr-const-param.rs b/tests/ui/const-generics/raw-ptr-const-param.rs index 9cc46c769e7c1..19d18a2f9d2cc 100644 --- a/tests/ui/const-generics/raw-ptr-const-param.rs +++ b/tests/ui/const-generics/raw-ptr-const-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/slice-const-param-mismatch.rs b/tests/ui/const-generics/slice-const-param-mismatch.rs index 24c05d7bea5e1..733eeb69fa997 100644 --- a/tests/ui/const-generics/slice-const-param-mismatch.rs +++ b/tests/ui/const-generics/slice-const-param-mismatch.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/slice-const-param.rs b/tests/ui/const-generics/slice-const-param.rs index 90c573ab36584..c6c0047c929b4 100644 --- a/tests/ui/const-generics/slice-const-param.rs +++ b/tests/ui/const-generics/slice-const-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/std/const-generics-range.rs b/tests/ui/const-generics/std/const-generics-range.rs index bda59f3ec4590..f959f1e2949a8 100644 --- a/tests/ui/const-generics/std/const-generics-range.rs +++ b/tests/ui/const-generics/std/const-generics-range.rs @@ -1,6 +1,6 @@ -// [full] known-bug: unknown +//@ [full] known-bug: unknown -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/trait-const-args.rs b/tests/ui/const-generics/trait-const-args.rs index 2cdef3fb452c8..d5ce6be3553a2 100644 --- a/tests/ui/const-generics/trait-const-args.rs +++ b/tests/ui/const-generics/trait-const-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Const; trait Foo {} diff --git a/tests/ui/const-generics/transmute-const-param-static-reference.rs b/tests/ui/const-generics/transmute-const-param-static-reference.rs index 6b443c8bd907a..49541233ed1ff 100644 --- a/tests/ui/const-generics/transmute-const-param-static-reference.rs +++ b/tests/ui/const-generics/transmute-const-param-static-reference.rs @@ -1,5 +1,5 @@ -// revisions: full min -//[full] check-pass +//@ revisions: full min +//@[full] check-pass #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/transmute.rs b/tests/ui/const-generics/transmute.rs index 30560a95b5e16..245fcf5670e25 100644 --- a/tests/ui/const-generics/transmute.rs +++ b/tests/ui/const-generics/transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![feature(transmute_generic_consts)] #![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 926e807feb0b4..419d605d0c875 100644 --- a/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs +++ b/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs index 2ae0ae70dd977..2cd6fb53c4a02 100644 --- a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs +++ b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/two_matching_preds.rs b/tests/ui/const-generics/two_matching_preds.rs index de608f73e2c0c..e69ca47385e03 100644 --- a/tests/ui/const-generics/two_matching_preds.rs +++ b/tests/ui/const-generics/two_matching_preds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/type-after-const-ok.rs b/tests/ui/const-generics/type-after-const-ok.rs index f37b0b10233ba..0a336e9a14a51 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 +//@ run-pass // Verifies that having generic parameters after constants is permitted #[allow(dead_code)] struct A(T); diff --git a/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs b/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs index e844148346fb4..74ac812f14e55 100644 --- a/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs +++ b/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/type-dependent/issue-61936.rs b/tests/ui/const-generics/type-dependent/issue-61936.rs index 7216b25f0df81..24fc4d4a62daf 100644 --- a/tests/ui/const-generics/type-dependent/issue-61936.rs +++ b/tests/ui/const-generics/type-dependent/issue-61936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait SliceExt { fn array_windows_example<'a, const N: usize>(&'a self) -> ArrayWindowsExample<'a, T, N>; diff --git a/tests/ui/const-generics/type-dependent/issue-63695.rs b/tests/ui/const-generics/type-dependent/issue-63695.rs index 08b6d4bf554ad..0b872dc44d99d 100644 --- a/tests/ui/const-generics/type-dependent/issue-63695.rs +++ b/tests/ui/const-generics/type-dependent/issue-63695.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait T { fn test(&self) -> i32 { A } diff --git a/tests/ui/const-generics/type-dependent/issue-67144-1.rs b/tests/ui/const-generics/type-dependent/issue-67144-1.rs index 27dd51de24171..ceefe9b87f633 100644 --- a/tests/ui/const-generics/type-dependent/issue-67144-1.rs +++ b/tests/ui/const-generics/type-dependent/issue-67144-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct X; impl X { diff --git a/tests/ui/const-generics/type-dependent/issue-67144-2.rs b/tests/ui/const-generics/type-dependent/issue-67144-2.rs index b26f551eb8678..88cba64356e5a 100644 --- a/tests/ui/const-generics/type-dependent/issue-67144-2.rs +++ b/tests/ui/const-generics/type-dependent/issue-67144-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; struct X; diff --git a/tests/ui/const-generics/type-dependent/issue-69816.rs b/tests/ui/const-generics/type-dependent/issue-69816.rs index cbb6b398e015b..a05faf2a82132 100644 --- a/tests/ui/const-generics/type-dependent/issue-69816.rs +++ b/tests/ui/const-generics/type-dependent/issue-69816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait IterExt: Sized + Iterator { fn default_for_size(self) -> [Self::Item; N] where diff --git a/tests/ui/const-generics/type-dependent/issue-70217.rs b/tests/ui/const-generics/type-dependent/issue-70217.rs index 933ca0276098f..3e27dc66a93d2 100644 --- a/tests/ui/const-generics/type-dependent/issue-70217.rs +++ b/tests/ui/const-generics/type-dependent/issue-70217.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Struct; diff --git a/tests/ui/const-generics/type-dependent/issue-70507.rs b/tests/ui/const-generics/type-dependent/issue-70507.rs index c72d9fbec2d8a..56b9079ce3ef9 100644 --- a/tests/ui/const-generics/type-dependent/issue-70507.rs +++ b/tests/ui/const-generics/type-dependent/issue-70507.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ConstChunksExactTrait { fn const_chunks_exact(&self) -> ConstChunksExact<'_, T, {N}>; diff --git a/tests/ui/const-generics/type-dependent/issue-70586.rs b/tests/ui/const-generics/type-dependent/issue-70586.rs index 346ac4b72cc74..fe1471b13752e 100644 --- a/tests/ui/const-generics/type-dependent/issue-70586.rs +++ b/tests/ui/const-generics/type-dependent/issue-70586.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; // This namespace is necessary for the ICE to trigger diff --git a/tests/ui/const-generics/type-dependent/issue-71348.rs b/tests/ui/const-generics/type-dependent/issue-71348.rs index 2ef2f066a6f6d..f349a88d124f4 100644 --- a/tests/ui/const-generics/type-dependent/issue-71348.rs +++ b/tests/ui/const-generics/type-dependent/issue-71348.rs @@ -1,5 +1,5 @@ -// [full] run-pass -// revisions: full min +//@ [full] run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/type-dependent/issue-71805.rs b/tests/ui/const-generics/type-dependent/issue-71805.rs index 060b899648e65..27c101df107c8 100644 --- a/tests/ui/const-generics/type-dependent/issue-71805.rs +++ b/tests/ui/const-generics/type-dependent/issue-71805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::MaybeUninit; trait CollectSlice<'a>: Iterator { diff --git a/tests/ui/const-generics/type-dependent/issue-73730.rs b/tests/ui/const-generics/type-dependent/issue-73730.rs index 5e1b8c6353723..abba8a3261385 100644 --- a/tests/ui/const-generics/type-dependent/issue-73730.rs +++ b/tests/ui/const-generics/type-dependent/issue-73730.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a, A>: Iterator { fn bar(&mut self) -> *const [A; N]; } diff --git a/tests/ui/const-generics/type-dependent/non-local.rs b/tests/ui/const-generics/type-dependent/non-local.rs index b755de30b9ce9..67e1015fc8bfb 100644 --- a/tests/ui/const-generics/type-dependent/non-local.rs +++ b/tests/ui/const-generics/type-dependent/non-local.rs @@ -1,5 +1,5 @@ -// aux-build:type_dependent_lib.rs -// run-pass +//@ aux-build:type_dependent_lib.rs +//@ run-pass extern crate type_dependent_lib; use type_dependent_lib::*; diff --git a/tests/ui/const-generics/type-dependent/qpath.rs b/tests/ui/const-generics/type-dependent/qpath.rs index 2d678d0acd3f7..88925115fe0f3 100644 --- a/tests/ui/const-generics/type-dependent/qpath.rs +++ b/tests/ui/const-generics/type-dependent/qpath.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; impl A { fn foo() -> usize { N + 1 } diff --git a/tests/ui/const-generics/type-dependent/simple.rs b/tests/ui/const-generics/type-dependent/simple.rs index 1b13133b5b970..c083b9288b3ac 100644 --- a/tests/ui/const-generics/type-dependent/simple.rs +++ b/tests/ui/const-generics/type-dependent/simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct R; impl R { diff --git a/tests/ui/const-generics/type-dependent/type-mismatch.rs b/tests/ui/const-generics/type-dependent/type-mismatch.rs index 3335ab870f49f..6ed5fdca30ae3 100644 --- a/tests/ui/const-generics/type-dependent/type-mismatch.rs +++ b/tests/ui/const-generics/type-dependent/type-mismatch.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min struct R; impl R { diff --git a/tests/ui/const-generics/type_of_anon_const.rs b/tests/ui/const-generics/type_of_anon_const.rs index fb0d688a8abf5..e9765d7569756 100644 --- a/tests/ui/const-generics/type_of_anon_const.rs +++ b/tests/ui/const-generics/type_of_anon_const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait T { fn l() -> usize; fn r() -> bool; diff --git a/tests/ui/const-generics/types-mismatch-const-args.rs b/tests/ui/const-generics/types-mismatch-const-args.rs index 43ef28b268f56..d07accde8fcfe 100644 --- a/tests/ui/const-generics/types-mismatch-const-args.rs +++ b/tests/ui/const-generics/types-mismatch-const-args.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs b/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs index c7270e835c5a8..d5ce146394bbe 100644 --- a/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs +++ b/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs b/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs index 191caa78f9e37..f3a8c1b942e41 100644 --- a/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs +++ b/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/const-generics/unused-const-param.rs b/tests/ui/const-generics/unused-const-param.rs index c7f74cfac7d64..41f7cec63c157 100644 --- a/tests/ui/const-generics/unused-const-param.rs +++ b/tests/ui/const-generics/unused-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; // ok diff --git a/tests/ui/const-generics/unused_braces.fixed b/tests/ui/const-generics/unused_braces.fixed index 4c1926387b926..45e70ade3241e 100644 --- a/tests/ui/const-generics/unused_braces.fixed +++ b/tests/ui/const-generics/unused_braces.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] macro_rules! make_1 { diff --git a/tests/ui/const-generics/unused_braces.full.fixed b/tests/ui/const-generics/unused_braces.full.fixed index 46d57e0dcfca8..902549b31425c 100644 --- a/tests/ui/const-generics/unused_braces.full.fixed +++ b/tests/ui/const-generics/unused_braces.full.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// revisions: full min +//@ check-pass +//@ run-rustfix +//@ revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/unused_braces.min.fixed b/tests/ui/const-generics/unused_braces.min.fixed index 46d57e0dcfca8..902549b31425c 100644 --- a/tests/ui/const-generics/unused_braces.min.fixed +++ b/tests/ui/const-generics/unused_braces.min.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// revisions: full min +//@ check-pass +//@ run-rustfix +//@ revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/unused_braces.rs b/tests/ui/const-generics/unused_braces.rs index e9f15b4018079..da1a4da038898 100644 --- a/tests/ui/const-generics/unused_braces.rs +++ b/tests/ui/const-generics/unused_braces.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] macro_rules! make_1 { diff --git a/tests/ui/const-generics/variant-discrimiant-no-generics.rs b/tests/ui/const-generics/variant-discrimiant-no-generics.rs index e286aa9a6139f..1228b917bb41b 100644 --- a/tests/ui/const-generics/variant-discrimiant-no-generics.rs +++ b/tests/ui/const-generics/variant-discrimiant-no-generics.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/where-clauses.rs b/tests/ui/const-generics/where-clauses.rs index aa3ca1cf6de73..4a76f6e8ac7eb 100644 --- a/tests/ui/const-generics/where-clauses.rs +++ b/tests/ui/const-generics/where-clauses.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar { fn bar() {} } trait Foo: Bar {} diff --git a/tests/ui/const-ptr/allowed_slices.rs b/tests/ui/const-ptr/allowed_slices.rs index 3561338a758c6..e5b9966c60930 100644 --- a/tests/ui/const-ptr/allowed_slices.rs +++ b/tests/ui/const-ptr/allowed_slices.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature( slice_from_ptr_range, const_slice_from_ptr_range, diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs index deab67f725a30..85baeedf2215f 100644 --- a/tests/ui/const-ptr/forbidden_slices.rs +++ b/tests/ui/const-ptr/forbidden_slices.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature( slice_from_ptr_range, diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs index a371aa93c5ee2..312b53432b477 100644 --- a/tests/ui/const-ptr/out_of_bounds_read.rs +++ b/tests/ui/const-ptr/out_of_bounds_read.rs @@ -1,4 +1,4 @@ -// error-pattern: evaluation of constant value failed +//@ error-pattern: evaluation of constant value failed fn main() { use std::ptr; diff --git a/tests/ui/const_prop/apfloat-f64-roundtrip.rs b/tests/ui/const_prop/apfloat-f64-roundtrip.rs index 5f3ec931c82c6..4ad1680d29289 100644 --- a/tests/ui/const_prop/apfloat-f64-roundtrip.rs +++ b/tests/ui/const_prop/apfloat-f64-roundtrip.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes +//@ run-pass +//@ compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes // Regression test for a broken MIR optimization (issue #113407). pub fn main() { diff --git a/tests/ui/const_prop/apfloat-remainder-regression.rs b/tests/ui/const_prop/apfloat-remainder-regression.rs index 08932c333fd85..f56003bbb9998 100644 --- a/tests/ui/const_prop/apfloat-remainder-regression.rs +++ b/tests/ui/const_prop/apfloat-remainder-regression.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes +//@ run-pass +//@ compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes // Regression test for a broken MIR optimization (issue #102403). pub fn f() -> f64 { diff --git a/tests/ui/const_prop/const-prop-ice.rs b/tests/ui/const_prop/const-prop-ice.rs index 5bffe0206294d..44c8af9ce8a2b 100644 --- a/tests/ui/const_prop/const-prop-ice.rs +++ b/tests/ui/const_prop/const-prop-ice.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { [0; 3][3u64 as usize]; //~ ERROR this operation will panic at runtime diff --git a/tests/ui/const_prop/const-prop-ice2.rs b/tests/ui/const_prop/const-prop-ice2.rs index d533e394c06fb..1f28cb3106e18 100644 --- a/tests/ui/const_prop/const-prop-ice2.rs +++ b/tests/ui/const_prop/const-prop-ice2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { enum Enum { One=1 } diff --git a/tests/ui/const_prop/const-prop-ice3.rs b/tests/ui/const_prop/const-prop-ice3.rs index 8ab011661e3c5..34b662922ae6e 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) +//@ run-pass (ensure that const-prop is run) struct A(T); diff --git a/tests/ui/const_prop/const-prop-overflowing-casts.rs b/tests/ui/const_prop/const-prop-overflowing-casts.rs index 8cc5b98250b5a..33189038a2cf5 100644 --- a/tests/ui/const_prop/const-prop-overflowing-casts.rs +++ b/tests/ui/const_prop/const-prop-overflowing-casts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Bar = -42, diff --git a/tests/ui/const_prop/dont-propagate-generic-instance-2.rs b/tests/ui/const_prop/dont-propagate-generic-instance-2.rs index e5525af23f0e6..768c9b3171a82 100644 --- a/tests/ui/const_prop/dont-propagate-generic-instance-2.rs +++ b/tests/ui/const_prop/dont-propagate-generic-instance-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/const_prop/dont-propagate-generic-instance.rs b/tests/ui/const_prop/dont-propagate-generic-instance.rs index 5994961b887b1..97f894dd9d752 100644 --- a/tests/ui/const_prop/dont-propagate-generic-instance.rs +++ b/tests/ui/const_prop/dont-propagate-generic-instance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Makes sure we don't propagate generic instances of `Self: ?Sized` blanket impls. // This is relevant when we have an overlapping impl and builtin dyn instance. diff --git a/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs b/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs index 2afbf3432fb45..b81f5177e1c78 100644 --- a/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs +++ b/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // need to emit MIR, because const prop (which emits `unconditional_panic`) only runs if // the `optimized_mir` query is run, which it isn't in check-only mode. -// compile-flags: --crate-type lib --emit=mir,link +//@ compile-flags: --crate-type lib --emit=mir,link #![warn(unconditional_panic)] diff --git a/tests/ui/const_prop/ice-issue-111353.rs b/tests/ui/const_prop/ice-issue-111353.rs index 99d1b792fea9a..2eba1a5e94e9e 100644 --- a/tests/ui/const_prop/ice-issue-111353.rs +++ b/tests/ui/const_prop/ice-issue-111353.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![feature(unsized_fn_params)] diff --git a/tests/ui/const_prop/ice-issue-96944.rs b/tests/ui/const_prop/ice-issue-96944.rs index 74baffddd8b4d..c6c453e938a71 100644 --- a/tests/ui/const_prop/ice-issue-96944.rs +++ b/tests/ui/const_prop/ice-issue-96944.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![allow(arithmetic_overflow)] diff --git a/tests/ui/const_prop/inline_spans.rs b/tests/ui/const_prop/inline_spans.rs index 504f27811564b..0126f194f6974 100644 --- a/tests/ui/const_prop/inline_spans.rs +++ b/tests/ui/const_prop/inline_spans.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 // Overflow can't be detected by const prop // could only be detected after optimizations diff --git a/tests/ui/const_prop/inline_spans_lint_attribute.rs b/tests/ui/const_prop/inline_spans_lint_attribute.rs index 1db53d77193f2..b6c28922b2278 100644 --- a/tests/ui/const_prop/inline_spans_lint_attribute.rs +++ b/tests/ui/const_prop/inline_spans_lint_attribute.rs @@ -1,6 +1,6 @@ // Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway. -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 #![deny(warnings)] diff --git a/tests/ui/const_prop/issue-102553.rs b/tests/ui/const_prop/issue-102553.rs index 523a9d7ac7204..2b04619e23b51 100644 --- a/tests/ui/const_prop/issue-102553.rs +++ b/tests/ui/const_prop/issue-102553.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass pub trait Widget { fn boxed<'w>(self) -> Box + 'w> diff --git a/tests/ui/const_prop/issue-86351.rs b/tests/ui/const_prop/issue-86351.rs index b5f1e7f7449a2..2c9ad0c925f97 100644 --- a/tests/ui/const_prop/issue-86351.rs +++ b/tests/ui/const_prop/issue-86351.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Zmir-opt-level=2 -// build-pass +//@ compile-flags: --crate-type=lib -Zmir-opt-level=2 +//@ build-pass // ^-- Must be build-pass, because check-pass will not run const prop. pub trait TestTrait { diff --git a/tests/ui/const_prop/overwrite_with_const_with_params.rs b/tests/ui/const_prop/overwrite_with_const_with_params.rs index 6f533919a474e..9c963c5322be1 100644 --- a/tests/ui/const_prop/overwrite_with_const_with_params.rs +++ b/tests/ui/const_prop/overwrite_with_const_with_params.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass // Regression test for https://github.com/rust-lang/rust/issues/118328 diff --git a/tests/ui/const_prop/unreachable-bounds.rs b/tests/ui/const_prop/unreachable-bounds.rs index 8cf98e154eaa0..8ed5da6822088 100644 --- a/tests/ui/const_prop/unreachable-bounds.rs +++ b/tests/ui/const_prop/unreachable-bounds.rs @@ -1,5 +1,5 @@ // Use `build-pass` to ensure const-prop lint runs. -// build-pass +//@ build-pass fn main() { [()][if false { 1 } else { return }] diff --git a/tests/ui/const_prop/unreachable-overflow.rs b/tests/ui/const_prop/unreachable-overflow.rs index 2875135424d20..25cc3db77fd47 100644 --- a/tests/ui/const_prop/unreachable-overflow.rs +++ b/tests/ui/const_prop/unreachable-overflow.rs @@ -1,5 +1,5 @@ // Use `build-pass` to ensure const-prop lint runs. -// build-pass +//@ build-pass fn main() { let x = 2u32; diff --git a/tests/ui/const_prop/unsized-local-ice.rs b/tests/ui/const_prop/unsized-local-ice.rs index c725b3238ea64..14d6eee9a2a85 100644 --- a/tests/ui/const_prop/unsized-local-ice.rs +++ b/tests/ui/const_prop/unsized-local-ice.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass //! Regression test for . #![feature(unsized_fn_params)] diff --git a/tests/ui/consts/array-literal-index-oob.rs b/tests/ui/consts/array-literal-index-oob.rs index 67b49b1ba2be2..ca56206fbdf61 100644 --- a/tests/ui/consts/array-literal-index-oob.rs +++ b/tests/ui/consts/array-literal-index-oob.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) #![warn(unconditional_panic)] diff --git a/tests/ui/consts/array-to-slice-cast.rs b/tests/ui/consts/array-to-slice-cast.rs index 796f9d1b71f76..633a356aa9e94 100644 --- a/tests/ui/consts/array-to-slice-cast.rs +++ b/tests/ui/consts/array-to-slice-cast.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/consts/assoc-const.rs b/tests/ui/consts/assoc-const.rs index 021bcb401022a..166a3da1518e5 100644 --- a/tests/ui/consts/assoc-const.rs +++ b/tests/ui/consts/assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] trait Nat { diff --git a/tests/ui/consts/assoc_const_generic_impl.rs b/tests/ui/consts/assoc_const_generic_impl.rs index ba358628d15dc..5820a724d073c 100644 --- a/tests/ui/consts/assoc_const_generic_impl.rs +++ b/tests/ui/consts/assoc_const_generic_impl.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait ZeroSized: Sized { const I_AM_ZERO_SIZED: (); diff --git a/tests/ui/consts/associated_const_generic.rs b/tests/ui/consts/associated_const_generic.rs index dee376cc17b40..c385493a65d85 100644 --- a/tests/ui/consts/associated_const_generic.rs +++ b/tests/ui/consts/associated_const_generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait TraitA { const VALUE: usize; diff --git a/tests/ui/consts/async-block.rs b/tests/ui/consts/async-block.rs index 78ec8aea7248c..40be4d195d4b4 100644 --- a/tests/ui/consts/async-block.rs +++ b/tests/ui/consts/async-block.rs @@ -1,7 +1,7 @@ // gate-test-const_async_blocks -// edition:2018 -// revisions: with_feature without_feature +//@ edition:2018 +//@ revisions: with_feature without_feature #![feature(rustc_attrs)] #![cfg_attr(with_feature, feature(const_async_blocks))] diff --git a/tests/ui/consts/bswap-const.rs b/tests/ui/consts/bswap-const.rs index 3145c21acc988..87b34fb88a5bd 100644 --- a/tests/ui/consts/bswap-const.rs +++ b/tests/ui/consts/bswap-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/consts/cast-discriminant-zst-enum.rs b/tests/ui/consts/cast-discriminant-zst-enum.rs index 2767f178fb664..c75db459c72ca 100644 --- a/tests/ui/consts/cast-discriminant-zst-enum.rs +++ b/tests/ui/consts/cast-discriminant-zst-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32. use std::hint::black_box; diff --git a/tests/ui/consts/chained-constants-stackoverflow.rs b/tests/ui/consts/chained-constants-stackoverflow.rs index a171567c5d2fa..0f0ce40a1edcc 100644 --- a/tests/ui/consts/chained-constants-stackoverflow.rs +++ b/tests/ui/consts/chained-constants-stackoverflow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/34997 diff --git a/tests/ui/consts/check_const-feature-gated.rs b/tests/ui/consts/check_const-feature-gated.rs index f4faab1abc287..ef6c50ff50763 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 +//@ run-pass const ARR: [usize; 1] = [2]; diff --git a/tests/ui/consts/closure-in-foreign-crate.rs b/tests/ui/consts/closure-in-foreign-crate.rs index fc8f480e706bc..701cf0910450d 100644 --- a/tests/ui/consts/closure-in-foreign-crate.rs +++ b/tests/ui/consts/closure-in-foreign-crate.rs @@ -1,5 +1,5 @@ -// aux-build:closure-in-foreign-crate.rs -// build-pass +//@ aux-build:closure-in-foreign-crate.rs +//@ build-pass extern crate closure_in_foreign_crate; diff --git a/tests/ui/consts/closure-structural-match-issue-90013.rs b/tests/ui/consts/closure-structural-match-issue-90013.rs index 1952ddb941e51..7a5d9b69ee4a0 100644 --- a/tests/ui/consts/closure-structural-match-issue-90013.rs +++ b/tests/ui/consts/closure-structural-match-issue-90013.rs @@ -1,5 +1,5 @@ // Regression test for issue 90013. -// check-pass +//@ check-pass #![feature(inline_const)] fn main() { diff --git a/tests/ui/consts/const-address-of.rs b/tests/ui/consts/const-address-of.rs index ba162f2a2badf..4eb3c3840ba48 100644 --- a/tests/ui/consts/const-address-of.rs +++ b/tests/ui/consts/const-address-of.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-adt-align-mismatch.rs b/tests/ui/consts/const-adt-align-mismatch.rs index 89b3a9b744bc0..8faddbff30da8 100644 --- a/tests/ui/consts/const-adt-align-mismatch.rs +++ b/tests/ui/consts/const-adt-align-mismatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/consts/const-autoderef.rs b/tests/ui/consts/const-autoderef.rs index 1c836318d3289..36cbdfd4cc7cc 100644 --- a/tests/ui/consts/const-autoderef.rs +++ b/tests/ui/consts/const-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const A: [u8; 1] = ['h' as u8]; const B: u8 = (&A)[0]; diff --git a/tests/ui/consts/const-big-enum.rs b/tests/ui/consts/const-big-enum.rs index 2f21e8a6dddf8..88d2f6172a25f 100644 --- a/tests/ui/consts/const-big-enum.rs +++ b/tests/ui/consts/const-big-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { Bar(u32), diff --git a/tests/ui/consts/const-binops.rs b/tests/ui/consts/const-binops.rs index d038dfeb419ca..546cc313327fe 100644 --- a/tests/ui/consts/const-binops.rs +++ b/tests/ui/consts/const-binops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ diff --git a/tests/ui/consts/const-bitshift-rhs-inference.rs b/tests/ui/consts/const-bitshift-rhs-inference.rs index cf21c296cf361..23437a997e606 100644 --- a/tests/ui/consts/const-bitshift-rhs-inference.rs +++ b/tests/ui/consts/const-bitshift-rhs-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const RHS: u8 = 8; const IRHS: i8 = 8; const RHS16: u16 = 8; diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs index 123e5cb1b3e65..b0d5e19ad5541 100644 --- a/tests/ui/consts/const-block-const-bound.rs +++ b/tests/ui/consts/const-block-const-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![allow(unused)] #![feature(const_trait_impl, inline_const, negative_impls)] diff --git a/tests/ui/consts/const-block-cross-crate-fn.rs b/tests/ui/consts/const-block-cross-crate-fn.rs index 0ac3830d230cd..6094c1700fce5 100644 --- a/tests/ui/consts/const-block-cross-crate-fn.rs +++ b/tests/ui/consts/const-block-cross-crate-fn.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const_block.rs +//@ run-pass +//@ aux-build:cci_const_block.rs extern crate cci_const_block; diff --git a/tests/ui/consts/const-block-item-macro-codegen.rs b/tests/ui/consts/const-block-item-macro-codegen.rs index 7ad883686aebd..ccafbcd541eaa 100644 --- a/tests/ui/consts/const-block-item-macro-codegen.rs +++ b/tests/ui/consts/const-block-item-macro-codegen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // General test that function items in static blocks // can be generated with a macro. diff --git a/tests/ui/consts/const-block-item.rs b/tests/ui/consts/const-block-item.rs index a04f4db263bb2..e6d6b90290dde 100644 --- a/tests/ui/consts/const-block-item.rs +++ b/tests/ui/consts/const-block-item.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] mod foo { 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 c513946d18917..ba77e721c7f77 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 +//@ run-pass #![allow(dead_code, unused)] type Array = [u32; { let x = 2; 5 }]; diff --git a/tests/ui/consts/const-block-non-item-statement-rpass.rs b/tests/ui/consts/const-block-non-item-statement-rpass.rs index 3e52eb50e7566..a4576bd1b170a 100644 --- a/tests/ui/consts/const-block-non-item-statement-rpass.rs +++ b/tests/ui/consts/const-block-non-item-statement-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused)] #[repr(u8)] diff --git a/tests/ui/consts/const-block-non-item-statement.rs b/tests/ui/consts/const-block-non-item-statement.rs index 07970b457a303..4cb55e3bde6c5 100644 --- a/tests/ui/consts/const-block-non-item-statement.rs +++ b/tests/ui/consts/const-block-non-item-statement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Bar = { let x = 1; 3 } diff --git a/tests/ui/consts/const-block.rs b/tests/ui/consts/const-block.rs index 40c7a7a1da978..326c86f5542cc 100644 --- a/tests/ui/consts/const-block.rs +++ b/tests/ui/consts/const-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] #![allow(unused_unsafe)] diff --git a/tests/ui/consts/const-blocks/const-repeat.rs b/tests/ui/consts/const-blocks/const-repeat.rs index 65d02317d34c5..89dfbc3cbad29 100644 --- a/tests/ui/consts/const-blocks/const-repeat.rs +++ b/tests/ui/consts/const-blocks/const-repeat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Repeating a *constant* of non-Copy type (not just a constant expression) is already stable. diff --git a/tests/ui/consts/const-blocks/fn-call-in-const.rs b/tests/ui/consts/const-blocks/fn-call-in-const.rs index 20496f62712c2..9bf267b7de9aa 100644 --- a/tests/ui/consts/const-blocks/fn-call-in-const.rs +++ b/tests/ui/consts/const-blocks/fn-call-in-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] #![allow(unused)] diff --git a/tests/ui/consts/const-blocks/migrate-pass.rs b/tests/ui/consts/const-blocks/migrate-pass.rs index fd66f5aa64f32..308834bd646e2 100644 --- a/tests/ui/consts/const-blocks/migrate-pass.rs +++ b/tests/ui/consts/const-blocks/migrate-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] // Some type that is not copyable. diff --git a/tests/ui/consts/const-blocks/nll-pass.rs b/tests/ui/consts/const-blocks/nll-pass.rs index fd66f5aa64f32..308834bd646e2 100644 --- a/tests/ui/consts/const-blocks/nll-pass.rs +++ b/tests/ui/consts/const-blocks/nll-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] // Some type that is not copyable. diff --git a/tests/ui/consts/const-blocks/run-pass.rs b/tests/ui/consts/const-blocks/run-pass.rs index e11f69babf798..e5c6bba40cb37 100644 --- a/tests/ui/consts/const-blocks/run-pass.rs +++ b/tests/ui/consts/const-blocks/run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] struct Bar; diff --git a/tests/ui/consts/const-bound.rs b/tests/ui/consts/const-bound.rs index 735056a0ab0b1..682a2dcbbc63e 100644 --- a/tests/ui/consts/const-bound.rs +++ b/tests/ui/consts/const-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure const bounds work on things, and test that a few types // are const. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: T) -> T { x } diff --git a/tests/ui/consts/const-byte-str-cast.rs b/tests/ui/consts/const-byte-str-cast.rs index 65d626c297f05..c739e01a37a69 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 +//@ run-pass #[deny(warnings)] pub fn main() { diff --git a/tests/ui/consts/const-cast-ptr-int.rs b/tests/ui/consts/const-cast-ptr-int.rs index 987d9616e9152..68efc0c644c16 100644 --- a/tests/ui/consts/const-cast-ptr-int.rs +++ b/tests/ui/consts/const-cast-ptr-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] use std::ptr; diff --git a/tests/ui/consts/const-cast.rs b/tests/ui/consts/const-cast.rs index abeb24121eb16..9a4cce97e3ee8 100644 --- a/tests/ui/consts/const-cast.rs +++ b/tests/ui/consts/const-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct TestStruct { diff --git a/tests/ui/consts/const-compare-bytes-ub.rs b/tests/ui/consts/const-compare-bytes-ub.rs index 2b4062fd22bf3..b357bab96a4df 100644 --- a/tests/ui/consts/const-compare-bytes-ub.rs +++ b/tests/ui/consts/const-compare-bytes-ub.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(core_intrinsics)] #![feature(const_intrinsic_compare_bytes)] diff --git a/tests/ui/consts/const-compare-bytes.rs b/tests/ui/consts/const-compare-bytes.rs index 74e29f8138669..8596a2d9df910 100644 --- a/tests/ui/consts/const-compare-bytes.rs +++ b/tests/ui/consts/const-compare-bytes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_intrinsic_compare_bytes)] diff --git a/tests/ui/consts/const-const.rs b/tests/ui/consts/const-const.rs index 85e4a72e86d65..bad2752a3afbd 100644 --- a/tests/ui/consts/const-const.rs +++ b/tests/ui/consts/const-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] const a: isize = 1; diff --git a/tests/ui/consts/const-contents.rs b/tests/ui/consts/const-contents.rs index 7ba3d43565041..d486325796fa3 100644 --- a/tests/ui/consts/const-contents.rs +++ b/tests/ui/consts/const-contents.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #570 #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-deref.rs b/tests/ui/consts/const-deref.rs index 6060d8e510e84..21a5eb3b64dc0 100644 --- a/tests/ui/consts/const-deref.rs +++ b/tests/ui/consts/const-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const C: &'static isize = &1000; static D: isize = *C; diff --git a/tests/ui/consts/const-endianess.rs b/tests/ui/consts/const-endianess.rs index 936f31954d3dd..cfb9994843b84 100644 --- a/tests/ui/consts/const-endianess.rs +++ b/tests/ui/consts/const-endianess.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] extern crate test; diff --git a/tests/ui/consts/const-enum-byref-self.rs b/tests/ui/consts/const-enum-byref-self.rs index b7e14bfb76585..435d714ad8343 100644 --- a/tests/ui/consts/const-enum-byref-self.rs +++ b/tests/ui/consts/const-enum-byref-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V, VV(isize) } diff --git a/tests/ui/consts/const-enum-byref.rs b/tests/ui/consts/const-enum-byref.rs index badf529465432..0284bb9d9eaa0 100644 --- a/tests/ui/consts/const-enum-byref.rs +++ b/tests/ui/consts/const-enum-byref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V, VV(isize) } diff --git a/tests/ui/consts/const-enum-cast.rs b/tests/ui/consts/const-enum-cast.rs index 3996849514412..adcfa7f0fe0e0 100644 --- a/tests/ui/consts/const-enum-cast.rs +++ b/tests/ui/consts/const-enum-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] enum A { A1, A2 } diff --git a/tests/ui/consts/const-enum-ptr.rs b/tests/ui/consts/const-enum-ptr.rs index 84f4eb8406dc6..1e12c69428ebe 100644 --- a/tests/ui/consts/const-enum-ptr.rs +++ b/tests/ui/consts/const-enum-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V1(isize) } diff --git a/tests/ui/consts/const-enum-struct.rs b/tests/ui/consts/const-enum-struct.rs index ee88c936188be..60836a2b99869 100644 --- a/tests/ui/consts/const-enum-struct.rs +++ b/tests/ui/consts/const-enum-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-struct2.rs b/tests/ui/consts/const-enum-struct2.rs index 6dfe63d5d0017..4512c93dca669 100644 --- a/tests/ui/consts/const-enum-struct2.rs +++ b/tests/ui/consts/const-enum-struct2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-structlike.rs b/tests/ui/consts/const-enum-structlike.rs index 0ea79aebce61f..165dae6f5ff60 100644 --- a/tests/ui/consts/const-enum-structlike.rs +++ b/tests/ui/consts/const-enum-structlike.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/consts/const-enum-tuple.rs b/tests/ui/consts/const-enum-tuple.rs index e0363166b02a3..fe6b54aa79351 100644 --- a/tests/ui/consts/const-enum-tuple.rs +++ b/tests/ui/consts/const-enum-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-tuple2.rs b/tests/ui/consts/const-enum-tuple2.rs index ef378b5995dd1..713209943d3ed 100644 --- a/tests/ui/consts/const-enum-tuple2.rs +++ b/tests/ui/consts/const-enum-tuple2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-tuplestruct.rs b/tests/ui/consts/const-enum-tuplestruct.rs index f93945c6a6839..f2363bf03cdcb 100644 --- a/tests/ui/consts/const-enum-tuplestruct.rs +++ b/tests/ui/consts/const-enum-tuplestruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-tuplestruct2.rs b/tests/ui/consts/const-enum-tuplestruct2.rs index b8aa9a3152fe0..dc44532369524 100644 --- a/tests/ui/consts/const-enum-tuplestruct2.rs +++ b/tests/ui/consts/const-enum-tuplestruct2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-vec-index.rs b/tests/ui/consts/const-enum-vec-index.rs index 3f155340ab592..313d35ff6e090 100644 --- a/tests/ui/consts/const-enum-vec-index.rs +++ b/tests/ui/consts/const-enum-vec-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] enum E { V1(isize), V0 } diff --git a/tests/ui/consts/const-enum-vec-ptr.rs b/tests/ui/consts/const-enum-vec-ptr.rs index 43ffe6570dc86..3ae58dfa7b7c1 100644 --- a/tests/ui/consts/const-enum-vec-ptr.rs +++ b/tests/ui/consts/const-enum-vec-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum E { V1(isize), V0 } static C: &'static [E] = &[E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/tests/ui/consts/const-enum-vector.rs b/tests/ui/consts/const-enum-vector.rs index ee3739f9723ce..23658fa2155f4 100644 --- a/tests/ui/consts/const-enum-vector.rs +++ b/tests/ui/consts/const-enum-vector.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum E { V1(isize), V0 } static C: [E; 3] = [E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/tests/ui/consts/const-err-late.rs b/tests/ui/consts/const-err-late.rs index d2476e4934656..6dff2c101a089 100644 --- a/tests/ui/consts/const-err-late.rs +++ b/tests/ui/consts/const-err-late.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C overflow-checks=on +//@ build-fail +//@ compile-flags: -C overflow-checks=on #![allow(arithmetic_overflow, unconditional_panic)] diff --git a/tests/ui/consts/const-err-rpass.rs b/tests/ui/consts/const-err-rpass.rs index e7fa10a2a11a3..b526ef76eee41 100644 --- a/tests/ui/consts/const-err-rpass.rs +++ b/tests/ui/consts/const-err-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check for const_err regressions diff --git a/tests/ui/consts/const-err2.rs b/tests/ui/consts/const-err2.rs index db49ec25aaaeb..67c85d35401d5 100644 --- a/tests/ui/consts/const-err2.rs +++ b/tests/ui/consts/const-err2.rs @@ -2,12 +2,12 @@ // optimized compilation and unoptimized compilation and thus would // lead to different lints being emitted -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-fail +//@ build-fail #![feature(rustc_attrs)] diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.rs b/tests/ui/consts/const-eval/const-eval-query-stack.rs index 4eaff49478330..53589bfd2ab2b 100644 --- a/tests/ui/consts/const-eval/const-eval-query-stack.rs +++ b/tests/ui/consts/const-eval/const-eval-query-stack.rs @@ -1,16 +1,16 @@ -// compile-flags: -Ztreat-err-as-bug=1 -// failure-status: 101 -// rustc-env:RUST_BACKTRACE=1 -// normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> "" -// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> "" -// normalize-stderr-test "note: compiler flags.*\n\n" -> "" -// normalize-stderr-test "note: rustc.*running on.*\n\n" -> "" -// normalize-stderr-test "thread.*panicked.*:\n.*\n" -> "" -// normalize-stderr-test "stack backtrace:\n" -> "" -// normalize-stderr-test "\s\d{1,}: .*\n" -> "" -// normalize-stderr-test "\s at .*\n" -> "" -// normalize-stderr-test ".*note: Some details.*\n" -> "" -// normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> "" +//@ compile-flags: -Ztreat-err-as-bug=1 +//@ failure-status: 101 +//@ rustc-env:RUST_BACKTRACE=1 +//@ normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> "" +//@ normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> "" +//@ normalize-stderr-test "note: compiler flags.*\n\n" -> "" +//@ normalize-stderr-test "note: rustc.*running on.*\n\n" -> "" +//@ normalize-stderr-test "thread.*panicked.*:\n.*\n" -> "" +//@ normalize-stderr-test "stack backtrace:\n" -> "" +//@ normalize-stderr-test "\s\d{1,}: .*\n" -> "" +//@ normalize-stderr-test "\s at .*\n" -> "" +//@ normalize-stderr-test ".*note: Some details.*\n" -> "" +//@ normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> "" #![allow(unconditional_panic)] const X: i32 = 1 / 0; //~ERROR constant diff --git a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs index 45eed9d842a9b..d6b6d42780743 100644 --- a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs +++ b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// stderr-per-bitwidth +//@ only-x86_64 +//@ stderr-per-bitwidth #[repr(C)] union Nonsense { diff --git a/tests/ui/consts/const-eval/const_fn_ptr.rs b/tests/ui/consts/const-eval/const_fn_ptr.rs index b3c677c69849d..f8a2658f31e65 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you fn double(x: usize) -> usize { x * 2 } const fn double_const(x: usize) -> usize { x * 2 } 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 1896eba82f2fa..a0f804722dbb3 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr_fail.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr_fail.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![allow(unused)] fn double(x: usize) -> usize { x * 2 } diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs index b873940c4b3b4..87f8b52a650b5 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you fn double(x: usize) -> usize { x * 2 diff --git a/tests/ui/consts/const-eval/const_fn_target_feature.rs b/tests/ui/consts/const-eval/const_fn_target_feature.rs index 5d02ce3f21b88..b56b68a579583 100644 --- a/tests/ui/consts/const-eval/const_fn_target_feature.rs +++ b/tests/ui/consts/const-eval/const_fn_target_feature.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags:-C target-feature=+ssse3 +//@ only-x86_64 +//@ compile-flags:-C target-feature=+ssse3 #![crate_type = "lib"] diff --git a/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs b/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs index c1460fdd9eca0..deed09e4b2af7 100644 --- a/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs +++ b/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags:-C target-feature=-simd128 -// build-pass +//@ only-wasm32 +//@ compile-flags:-C target-feature=-simd128 +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/consts/const-eval/const_panic_2021.rs b/tests/ui/consts/const-eval/const_panic_2021.rs index 4702aa2f5f01c..31a80e71b7cb5 100644 --- a/tests/ui/consts/const-eval/const_panic_2021.rs +++ b/tests/ui/consts/const-eval/const_panic_2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![crate_type = "lib"] const MSG: &str = "hello"; diff --git a/tests/ui/consts/const-eval/const_panic_stability.rs b/tests/ui/consts/const-eval/const_panic_stability.rs index 1aee6f27e2752..c49f6dc6fd6d9 100644 --- a/tests/ui/consts/const-eval/const_panic_stability.rs +++ b/tests/ui/consts/const-eval/const_panic_stability.rs @@ -1,7 +1,7 @@ -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 -//[e2018] check-pass +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 +//@[e2018] check-pass #![crate_type = "lib"] #![stable(feature = "foo", since = "1.0.0")] #![feature(staged_api)] diff --git a/tests/ui/consts/const-eval/const_prop_errors.rs b/tests/ui/consts/const-eval/const_prop_errors.rs index f9a36d37943f3..4580944e1bc57 100644 --- a/tests/ui/consts/const-eval/const_prop_errors.rs +++ b/tests/ui/consts/const-eval/const_prop_errors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { fn foo(self) -> u32; diff --git a/tests/ui/consts/const-eval/const_signed_pat.rs b/tests/ui/consts/const-eval/const_signed_pat.rs index c61239bb677e8..822cec2eaa7c5 100644 --- a/tests/ui/consts/const-eval/const_signed_pat.rs +++ b/tests/ui/consts/const-eval/const_signed_pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { const MIN: i8 = -5; diff --git a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs index ea35f46807abb..24b9b3123e12e 100644 --- a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs +++ b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs @@ -1,4 +1,4 @@ -// aux-build:stability.rs +//@ aux-build:stability.rs extern crate stability; diff --git a/tests/ui/consts/const-eval/double_check.rs b/tests/ui/consts/const-eval/double_check.rs index 56ca0aa1f1587..12738e59d7f42 100644 --- a/tests/ui/consts/const-eval/double_check.rs +++ b/tests/ui/consts/const-eval/double_check.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { A = 5, diff --git a/tests/ui/consts/const-eval/double_check2.rs b/tests/ui/consts/const-eval/double_check2.rs index 81f5dde450b47..228efec2879a9 100644 --- a/tests/ui/consts/const-eval/double_check2.rs +++ b/tests/ui/consts/const-eval/double_check2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test exhibits undefined behavior, but it is very expensive and complex to check for such // UB in constants. diff --git a/tests/ui/consts/const-eval/duration_conversion.rs b/tests/ui/consts/const-eval/duration_conversion.rs index 87b12937dd4f2..874200326e801 100644 --- a/tests/ui/consts/const-eval/duration_conversion.rs +++ b/tests/ui/consts/const-eval/duration_conversion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::time::Duration; diff --git a/tests/ui/consts/const-eval/enum_discr.rs b/tests/ui/consts/const-eval/enum_discr.rs index e09258f11206e..d3401b36a8d0f 100644 --- a/tests/ui/consts/const-eval/enum_discr.rs +++ b/tests/ui/consts/const-eval/enum_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { X = 42, diff --git a/tests/ui/consts/const-eval/extern_fat_pointer.rs b/tests/ui/consts/const-eval/extern_fat_pointer.rs index d91d07827dc05..d03415aa2695e 100644 --- a/tests/ui/consts/const-eval/extern_fat_pointer.rs +++ b/tests/ui/consts/const-eval/extern_fat_pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(extern_types)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs index 6bc5faac532cc..0c292ec5af72e 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs index 92193bb33e299..1ba20f908eaf7 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs index b53c9ac7a2c77..ed483bccc1fac 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth // compile-test #![feature(core_intrinsics)] #![feature(const_heap)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs index 407e69d41a0fa..6c4fca3562607 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(inline_const)] diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs index aac90cd54cc41..345fc096ca15a 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs index 84fb4d2ea870f..146a87862e8c7 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(inline_const)] diff --git a/tests/ui/consts/const-eval/ice-generic-assoc-const.rs b/tests/ui/consts/const-eval/ice-generic-assoc-const.rs index e514682af9c20..d758435bb203e 100644 --- a/tests/ui/consts/const-eval/ice-generic-assoc-const.rs +++ b/tests/ui/consts/const-eval/ice-generic-assoc-const.rs @@ -1,4 +1,4 @@ -// build-pass (tests post-monomorphisation failure) +//@ build-pass (tests post-monomorphisation failure) #![crate_type = "lib"] pub trait Nullable { diff --git a/tests/ui/consts/const-eval/ice-packed.rs b/tests/ui/consts/const-eval/ice-packed.rs index 4758a5a9d561c..96be67bd7ca5d 100644 --- a/tests/ui/consts/const-eval/ice-packed.rs +++ b/tests/ui/consts/const-eval/ice-packed.rs @@ -1,7 +1,7 @@ // Regression test for #50356: Compiler panic when using repr(packed) // associated constant in a match arm -// check-pass +//@ check-pass #[derive(Copy, Clone, PartialEq, Eq)] #[repr(packed)] pub struct Num(u64); diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs index bc2ea3f18faf2..25ffc9cbdba4b 100644 --- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs +++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Regression test for #66975 #![warn(unconditional_panic)] diff --git a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs index 608e6e112a10b..112c7415076f3 100644 --- a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs +++ b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { let array = [std::env::args().len()]; diff --git a/tests/ui/consts/const-eval/infinite_loop.rs b/tests/ui/consts/const-eval/infinite_loop.rs index 9bdb9929becd3..44456f1ce47d9 100644 --- a/tests/ui/consts/const-eval/infinite_loop.rs +++ b/tests/ui/consts/const-eval/infinite_loop.rs @@ -2,7 +2,7 @@ //! 1. we error if a const evaluation hits the deny-by-default lint limit //! 2. we do not ICE on invalid follow-up code -// compile-flags: -Z tiny-const-eval-limit +//@ compile-flags: -Z tiny-const-eval-limit fn main() { // Tests the Collatz conjecture with an incorrect base case (0 instead of 1). diff --git a/tests/ui/consts/const-eval/issue-100878.rs b/tests/ui/consts/const-eval/issue-100878.rs index bd56f854c8b17..5a0bc5fc28d0c 100644 --- a/tests/ui/consts/const-eval/issue-100878.rs +++ b/tests/ui/consts/const-eval/issue-100878.rs @@ -1,6 +1,6 @@ // This checks that the const-eval ICE in issue #100878 does not recur. // -// build-pass +//@ build-pass #[allow(arithmetic_overflow)] pub fn bitshift_data(data: [u8; 1]) -> u8 { diff --git a/tests/ui/consts/const-eval/issue-114994-fail.rs b/tests/ui/consts/const-eval/issue-114994-fail.rs index 7235046409191..1b9abec3571ea 100644 --- a/tests/ui/consts/const-eval/issue-114994-fail.rs +++ b/tests/ui/consts/const-eval/issue-114994-fail.rs @@ -1,7 +1,7 @@ // This checks that function pointer signatures that are referenced mutably // but contain a &mut T parameter still fail in a constant context: see issue #114994. // -// check-fail +//@ check-fail const fn use_mut_const_fn(_f: &mut fn(&mut String)) { //~ ERROR mutable references are not allowed in constant functions () diff --git a/tests/ui/consts/const-eval/issue-114994.rs b/tests/ui/consts/const-eval/issue-114994.rs index a4cb2e61e5f6f..5d99f265e62be 100644 --- a/tests/ui/consts/const-eval/issue-114994.rs +++ b/tests/ui/consts/const-eval/issue-114994.rs @@ -1,7 +1,7 @@ // This checks that function pointer signatures containing &mut T types // work in a constant context: see issue #114994. // -// check-pass +//@ check-pass const fn use_const_fn(_f: fn(&mut String)) { () diff --git a/tests/ui/consts/const-eval/issue-44578.rs b/tests/ui/consts/const-eval/issue-44578.rs index e4dcc62302caa..945bf93f8faad 100644 --- a/tests/ui/consts/const-eval/issue-44578.rs +++ b/tests/ui/consts/const-eval/issue-44578.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Foo { const AMT: usize; diff --git a/tests/ui/consts/const-eval/issue-47971.rs b/tests/ui/consts/const-eval/issue-47971.rs index b98e76031d4f3..74eac963408ca 100644 --- a/tests/ui/consts/const-eval/issue-47971.rs +++ b/tests/ui/consts/const-eval/issue-47971.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(pub &'static u32, pub u32); diff --git a/tests/ui/consts/const-eval/issue-50706.rs b/tests/ui/consts/const-eval/issue-50706.rs index a13c27f2e7802..a0eccb5d000bf 100644 --- a/tests/ui/consts/const-eval/issue-50706.rs +++ b/tests/ui/consts/const-eval/issue-50706.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Stats; diff --git a/tests/ui/consts/const-eval/issue-50814-2.rs b/tests/ui/consts/const-eval/issue-50814-2.rs index 2eab93beb2016..c2e2de67a6517 100644 --- a/tests/ui/consts/const-eval/issue-50814-2.rs +++ b/tests/ui/consts/const-eval/issue-50814-2.rs @@ -1,6 +1,6 @@ -// build-fail -// revisions: normal mir-opt -// [mir-opt]compile-flags: -Zmir-opt-level=4 +//@ build-fail +//@ revisions: normal mir-opt +//@ [mir-opt]compile-flags: -Zmir-opt-level=4 trait C { const BOO: usize; diff --git a/tests/ui/consts/const-eval/issue-50814.rs b/tests/ui/consts/const-eval/issue-50814.rs index 374ed1d93df94..ca26f51f111d3 100644 --- a/tests/ui/consts/const-eval/issue-50814.rs +++ b/tests/ui/consts/const-eval/issue-50814.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Unsigned { const MAX: u8; diff --git a/tests/ui/consts/const-eval/issue-51300.rs b/tests/ui/consts/const-eval/issue-51300.rs index 8e68e8c911785..5e6ce350e60be 100644 --- a/tests/ui/consts/const-eval/issue-51300.rs +++ b/tests/ui/consts/const-eval/issue-51300.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/51300 #[derive(PartialEq, Eq, Clone, Copy)] diff --git a/tests/ui/consts/const-eval/issue-53157.rs b/tests/ui/consts/const-eval/issue-53157.rs index 850338625bc01..b65cb604a0481 100644 --- a/tests/ui/consts/const-eval/issue-53157.rs +++ b/tests/ui/consts/const-eval/issue-53157.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { () => {{ diff --git a/tests/ui/consts/const-eval/issue-53401.rs b/tests/ui/consts/const-eval/issue-53401.rs index 31c946c3cb761..8d3c15ea002b4 100644 --- a/tests/ui/consts/const-eval/issue-53401.rs +++ b/tests/ui/consts/const-eval/issue-53401.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub const STATIC_TRAIT: &dyn Test = &(); diff --git a/tests/ui/consts/const-eval/issue-55541.rs b/tests/ui/consts/const-eval/issue-55541.rs index fa5a493abde21..21bc89c2dda22 100644 --- a/tests/ui/consts/const-eval/issue-55541.rs +++ b/tests/ui/consts/const-eval/issue-55541.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we can handle newtypes wrapping extern types diff --git a/tests/ui/consts/const-eval/issue-64908.rs b/tests/ui/consts/const-eval/issue-64908.rs index d2e095072844f..5d5fdab790e92 100644 --- a/tests/ui/consts/const-eval/issue-64908.rs +++ b/tests/ui/consts/const-eval/issue-64908.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic // promoted MIR. diff --git a/tests/ui/consts/const-eval/issue-64970.rs b/tests/ui/consts/const-eval/issue-64970.rs index ba530438f9a1d..c7be311ce6bd7 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 +//@ run-pass fn main() { foo(10); diff --git a/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs b/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs index abd1d32abe289..8d96d247c199a 100644 --- a/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs +++ b/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn nested(x: (for<'a> fn(&'a ()), String)) -> (fn(&'static ()), String) { x diff --git a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs index 7e235c4911c31..885869bdab328 100644 --- a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs +++ b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Foo {} diff --git a/tests/ui/consts/const-eval/issue-85155.rs b/tests/ui/consts/const-eval/issue-85155.rs index c3216d53d0554..95253a0b288fa 100644 --- a/tests/ui/consts/const-eval/issue-85155.rs +++ b/tests/ui/consts/const-eval/issue-85155.rs @@ -8,8 +8,8 @@ // Therefore, its setup is reproduced with an aux crate, which will similarly trigger a PME // depending on the const argument value, like the `stdarch` intrinsics would. // -// aux-build: post_monomorphization_error.rs -// build-fail: this is a post-monomorphization error, it passes check runs and requires building +//@ aux-build: post_monomorphization_error.rs +//@ build-fail: this is a post-monomorphization error, it passes check runs and requires building // to actually fail. extern crate post_monomorphization_error; diff --git a/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs b/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs index 910ca3c4bcbb6..6dae6ff1b3d1d 100644 --- a/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs +++ b/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // if `X` were used instead of `x`, `X - 10` would result in a lint. // This file should never produce a lint, no matter how the const diff --git a/tests/ui/consts/const-eval/nonnull_as_ref.rs b/tests/ui/consts/const-eval/nonnull_as_ref.rs index eb4683e2c3088..003b28febff05 100644 --- a/tests/ui/consts/const-eval/nonnull_as_ref.rs +++ b/tests/ui/consts/const-eval/nonnull_as_ref.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr::NonNull; diff --git a/tests/ui/consts/const-eval/nrvo.rs b/tests/ui/consts/const-eval/nrvo.rs index 22da96a3fc1ea..02288d8d60ce5 100644 --- a/tests/ui/consts/const-eval/nrvo.rs +++ b/tests/ui/consts/const-eval/nrvo.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When the NRVO is applied, the return place (`_0`) gets treated like a normal local. For example, // its address may be taken and it may be written to indirectly. Ensure that the const-eval diff --git a/tests/ui/consts/const-eval/panic-assoc-never-type.rs b/tests/ui/consts/const-eval/panic-assoc-never-type.rs index 88ce5b0d895f3..bdaa51494b981 100644 --- a/tests/ui/consts/const-eval/panic-assoc-never-type.rs +++ b/tests/ui/consts/const-eval/panic-assoc-never-type.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Regression test for #66975 #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/promote-static.rs b/tests/ui/consts/const-eval/promote-static.rs index d3c663c53e905..53b5ab294d7f3 100644 --- a/tests/ui/consts/const-eval/promote-static.rs +++ b/tests/ui/consts/const-eval/promote-static.rs @@ -1,6 +1,6 @@ // regression test for #67609. -// check-pass +//@ check-pass static NONE: Option = None; diff --git a/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs b/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs index edda10e6e82e9..666bec83f6287 100644 --- a/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs +++ b/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn main() { let y: &'static mut [u8; 0] = &mut []; diff --git a/tests/ui/consts/const-eval/promoted_errors.rs b/tests/ui/consts/const-eval/promoted_errors.rs index 5e67dc6f6c32e..e806d4a32468d 100644 --- a/tests/ui/consts/const-eval/promoted_errors.rs +++ b/tests/ui/consts/const-eval/promoted_errors.rs @@ -1,10 +1,10 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) //! This test ensures that when we promote code that fails to evaluate, the build still succeeds. diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs index ae65a5cb8dfc0..96903b322e45b 100644 --- a/tests/ui/consts/const-eval/raw-bytes.rs +++ b/tests/ui/consts/const-eval/raw-bytes.rs @@ -1,7 +1,7 @@ -// stderr-per-bitwidth -// ignore-endian-big +//@ stderr-per-bitwidth +//@ ignore-endian-big // ignore-tidy-linelength -// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼" -> "╾ALLOC_ID$1╼" +//@ normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼" -> "╾ALLOC_ID$1╼" #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] #![allow(invalid_value)] diff --git a/tests/ui/consts/const-eval/ref_to_int_match.rs b/tests/ui/consts/const-eval/ref_to_int_match.rs index a2dabde25bc8d..c627ad97bb05b 100644 --- a/tests/ui/consts/const-eval/ref_to_int_match.rs +++ b/tests/ui/consts/const-eval/ref_to_int_match.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth fn main() { let n: Int = 40; diff --git a/tests/ui/consts/const-eval/simd/insert_extract.rs b/tests/ui/consts/const-eval/simd/insert_extract.rs index 3472c05d12fa8..c0113904edf0c 100644 --- a/tests/ui/consts/const-eval/simd/insert_extract.rs +++ b/tests/ui/consts/const-eval/simd/insert_extract.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd)] #![feature(platform_intrinsics)] #![feature(staged_api)] diff --git a/tests/ui/consts/const-eval/simple_with_undef.rs b/tests/ui/consts/const-eval/simple_with_undef.rs index 1a416dd460d68..990db4b29d7b7 100644 --- a/tests/ui/consts/const-eval/simple_with_undef.rs +++ b/tests/ui/consts/const-eval/simple_with_undef.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const PARSE_BOOL: Option<&'static str> = None; static FOO: (Option<&str>, u32) = (PARSE_BOOL, 42); diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs index a30518170ad42..1e91f2c86fdba 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit const fn foo() {} diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs index f7cd04568be3c..602ca87d4cf40 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit const fn labelled_loop(n: u32) -> u32 { let mut i = 0; diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs index 56a39fc45b0ae..6570357063bbd 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit #[rustfmt::skip] const fn recurse(n: u32) -> u32 { diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs index 214f33dfb36c5..42b93383c2b52 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs @@ -1,9 +1,9 @@ -// check-pass -// revisions: warn allow +//@ check-pass +//@ revisions: warn allow #![cfg_attr(warn, warn(long_running_const_eval))] #![cfg_attr(allow, allow(long_running_const_eval))] -// compile-flags: -Z tiny-const-eval-limit +//@ compile-flags: -Z tiny-const-eval-limit const fn simple_loop(n: u32) -> u32 { let mut index = 0; while index < n { diff --git a/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs b/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs index 0b0f361809f20..d87cf6b18d7be 100644 --- a/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs +++ b/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Exercising an edge case which was found during Stage 2 compilation. // Compilation would fail for this code when running the `CtfeLimit` diff --git a/tests/ui/consts/const-eval/strlen.rs b/tests/ui/consts/const-eval/strlen.rs index 7b14a52354348..4ceb3b82ab36c 100644 --- a/tests/ui/consts/const-eval/strlen.rs +++ b/tests/ui/consts/const-eval/strlen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const S: &str = "foo"; pub const B: &[u8] = S.as_bytes(); diff --git a/tests/ui/consts/const-eval/transmute-const.rs b/tests/ui/consts/const-eval/transmute-const.rs index d9d0a3aea07be..bf25b52ed66f6 100644 --- a/tests/ui/consts/const-eval/transmute-const.rs +++ b/tests/ui/consts/const-eval/transmute-const.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth use std::mem; static FOO: bool = unsafe { mem::transmute(3u8) }; diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs index c11ace612f13e..71d450c014fc1 100644 --- a/tests/ui/consts/const-eval/ub-enum.rs +++ b/tests/ui/consts/const-eval/ub-enum.rs @@ -1,7 +1,7 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" -// normalize-stderr-test "0x0+" -> "0x0" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "0x0+" -> "0x0" #![feature(never_type)] #![allow(invalid_value)] diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs index 7d1927253f22c..11c3b2fe5603d 100644 --- a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs +++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs @@ -10,7 +10,7 @@ // ICEs as tracked by #86193. So we also use the transparent wrapper to verify proper validation // errors are emitted instead of ICEs. -// stderr-per-bitwidth +//@ stderr-per-bitwidth trait Trait {} diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs index fe4ec4d23d053..229ce9a7df382 100644 --- a/tests/ui/consts/const-eval/ub-nonnull.rs +++ b/tests/ui/consts/const-eval/ub-nonnull.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(rustc_attrs, ptr_metadata)] #![allow(invalid_value)] // make sure we cannot allow away the errors tested here diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index 9e49e3de8bc37..78dcd1c1f42e6 100644 --- a/tests/ui/consts/const-eval/ub-ref-ptr.rs +++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(invalid_value)] use std::mem; diff --git a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs index ebc5543b380a5..3800abddd4240 100644 --- a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs +++ b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_slice_index)] diff --git a/tests/ui/consts/const-eval/ub-uninhabit.rs b/tests/ui/consts/const-eval/ub-uninhabit.rs index 0eb9ab415d793..cd29c22262b67 100644 --- a/tests/ui/consts/const-eval/ub-uninhabit.rs +++ b/tests/ui/consts/const-eval/ub-uninhabit.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(core_intrinsics)] #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/ub-upvars.rs b/tests/ui/consts/const-eval/ub-upvars.rs index ceac5987031a4..817511180bea4 100644 --- a/tests/ui/consts/const-eval/ub-upvars.rs +++ b/tests/ui/consts/const-eval/ub-upvars.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth #![allow(invalid_value)] // make sure we cannot allow away the errors tested here use std::mem; diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs index 3c1baab3e48f6..4c90d1c98403a 100644 --- a/tests/ui/consts/const-eval/ub-wide-ptr.rs +++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs @@ -4,10 +4,10 @@ use std::mem; // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" -// normalize-stderr-test "offset \d+" -> "offset N" -// normalize-stderr-test "size \d+" -> "size N" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "offset \d+" -> "offset N" +//@ normalize-stderr-test "size \d+" -> "size N" /// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error diff --git a/tests/ui/consts/const-eval/union-ice.rs b/tests/ui/consts/const-eval/union-ice.rs index dd970a355626c..1db9470912d33 100644 --- a/tests/ui/consts/const-eval/union-ice.rs +++ b/tests/ui/consts/const-eval/union-ice.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 type Field1 = i32; type Field3 = i64; diff --git a/tests/ui/consts/const-eval/union-ub.rs b/tests/ui/consts/const-eval/union-ub.rs index 043870c9c25dc..5eb4ad4b47f2c 100644 --- a/tests/ui/consts/const-eval/union-ub.rs +++ b/tests/ui/consts/const-eval/union-ub.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth #[repr(C)] union DummyUnion { diff --git a/tests/ui/consts/const-eval/unused-broken-const-late.rs b/tests/ui/consts/const-eval/unused-broken-const-late.rs index a6528ec5fd6a3..c4916061f9e5a 100644 --- a/tests/ui/consts/const-eval/unused-broken-const-late.rs +++ b/tests/ui/consts/const-eval/unused-broken-const-late.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -O +//@ build-fail +//@ compile-flags: -O //! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090) diff --git a/tests/ui/consts/const-eval/unused-broken-const.rs b/tests/ui/consts/const-eval/unused-broken-const.rs index 0d2776bc2e3a6..f7e229aa9807b 100644 --- a/tests/ui/consts/const-eval/unused-broken-const.rs +++ b/tests/ui/consts/const-eval/unused-broken-const.rs @@ -1,6 +1,6 @@ // make sure that an *unused* broken const triggers an error even in a check build -// compile-flags: --emit=dep-info,metadata +//@ compile-flags: --emit=dep-info,metadata const FOO: i32 = [][0]; //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/consts/const-eval/valid-const.rs b/tests/ui/consts/const-eval/valid-const.rs index 5f47d1c4f5c31..1c8c048ae28cb 100644 --- a/tests/ui/consts/const-eval/valid-const.rs +++ b/tests/ui/consts/const-eval/valid-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Some constants that *are* valid diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr deleted file mode 100644 index b423edbdcec8d..0000000000000 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr +++ /dev/null @@ -1,52 +0,0 @@ -warning: the type `!` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | - = note: the `!` type has no valid value - = note: `#[warn(invalid_value)]` on by default - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!` - | -note: inside `foo` - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `FOO` - --> $DIR/validate_uninhabited_zsts.rs:19:33 - | -LL | const FOO: [empty::Empty; 3] = [foo(); 3]; - | ^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void` - -warning: the type `empty::Empty` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | -note: in this struct field - --> $DIR/validate_uninhabited_zsts.rs:16:22 - | -LL | pub struct Empty(Void); - | ^^^^ -note: enums with no inhabited variants have no valid value - --> $DIR/validate_uninhabited_zsts.rs:13:5 - | -LL | enum Void {} - | ^^^^^^^^^ - -error: aborting due to 2 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs index b6783175dd379..5fc0674c576c2 100644 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs +++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs @@ -1,5 +1,3 @@ -// stderr-per-bitwidth - const fn foo() -> ! { unsafe { std::mem::transmute(()) } //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr similarity index 81% rename from tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr rename to tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr index b423edbdcec8d..4c50ab5319ef9 100644 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr +++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr @@ -1,5 +1,5 @@ warning: the type `!` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:4:14 + --> $DIR/validate_uninhabited_zsts.rs:2:14 | LL | unsafe { std::mem::transmute(()) } | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed @@ -8,41 +8,41 @@ LL | unsafe { std::mem::transmute(()) } = note: `#[warn(invalid_value)]` on by default error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:4:14 + --> $DIR/validate_uninhabited_zsts.rs:2:14 | LL | unsafe { std::mem::transmute(()) } | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!` | note: inside `foo` - --> $DIR/validate_uninhabited_zsts.rs:4:14 + --> $DIR/validate_uninhabited_zsts.rs:2:14 | LL | unsafe { std::mem::transmute(()) } | ^^^^^^^^^^^^^^^^^^^^^^^ note: inside `FOO` - --> $DIR/validate_uninhabited_zsts.rs:19:33 + --> $DIR/validate_uninhabited_zsts.rs:17:33 | LL | const FOO: [empty::Empty; 3] = [foo(); 3]; | ^^^^^ error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:21:42 + --> $DIR/validate_uninhabited_zsts.rs:19:42 | LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void` warning: the type `empty::Empty` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:21:42 + --> $DIR/validate_uninhabited_zsts.rs:19:42 | LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | note: in this struct field - --> $DIR/validate_uninhabited_zsts.rs:16:22 + --> $DIR/validate_uninhabited_zsts.rs:14:22 | LL | pub struct Empty(Void); | ^^^^ note: enums with no inhabited variants have no valid value - --> $DIR/validate_uninhabited_zsts.rs:13:5 + --> $DIR/validate_uninhabited_zsts.rs:11:5 | LL | enum Void {} | ^^^^^^^^^ diff --git a/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs b/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs index cccb7879fc0fb..5628ae1be36a9 100644 --- a/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs +++ b/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/consts/const-eval/zst_operand_eval.rs b/tests/ui/consts/const-eval/zst_operand_eval.rs index 5f7ddf7f758e0..e2892722e8910 100644 --- a/tests/ui/consts/const-eval/zst_operand_eval.rs +++ b/tests/ui/consts/const-eval/zst_operand_eval.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass static ASSERT: () = [()][!(std::mem::size_of::() == 4) as usize]; diff --git a/tests/ui/consts/const-expr-addr-operator.rs b/tests/ui/consts/const-expr-addr-operator.rs index 37bf24c2fbed1..f5f459bbd3e99 100644 --- a/tests/ui/consts/const-expr-addr-operator.rs +++ b/tests/ui/consts/const-expr-addr-operator.rs @@ -1,5 +1,5 @@ // Encountered while testing #44614. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) pub fn main() { // Constant of generic type (int) diff --git a/tests/ui/consts/const-expr-in-fixed-length-vec.rs b/tests/ui/consts/const-expr-in-fixed-length-vec.rs index a9960b4552b6e..60b4895f5f97b 100644 --- a/tests/ui/consts/const-expr-in-fixed-length-vec.rs +++ b/tests/ui/consts/const-expr-in-fixed-length-vec.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that constant expressions can be used for declaring the // type of a fixed length vector. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { diff --git a/tests/ui/consts/const-expr-in-vec-repeat.rs b/tests/ui/consts/const-expr-in-vec-repeat.rs index 4eaef25059b0b..5345a1c4c42ee 100644 --- a/tests/ui/consts/const-expr-in-vec-repeat.rs +++ b/tests/ui/consts/const-expr-in-vec-repeat.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Check that constant expressions can be used in vec repeat syntax. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn.rs b/tests/ui/consts/const-extern-fn/const-extern-fn.rs index 2ce2eafd54507..57f5da8d0afc7 100644 --- a/tests/ui/consts/const-extern-fn/const-extern-fn.rs +++ b/tests/ui/consts/const-extern-fn/const-extern-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_extern_fn)] const extern "C" fn foo1(val: u8) -> u8 { diff --git a/tests/ui/consts/const-extern-function.rs b/tests/ui/consts/const-extern-function.rs index 01f487a7d7558..acc438189cb86 100644 --- a/tests/ui/consts/const-extern-function.rs +++ b/tests/ui/consts/const-extern-function.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] extern "C" fn foopy() {} diff --git a/tests/ui/consts/const-external-macro-const-err.rs b/tests/ui/consts/const-external-macro-const-err.rs index 5bd84330bb79f..3cb83823f1ae6 100644 --- a/tests/ui/consts/const-external-macro-const-err.rs +++ b/tests/ui/consts/const-external-macro-const-err.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:external_macro.rs +//@ edition:2018 +//@ aux-build:external_macro.rs // Ensure that CONST_ERR lint errors // are not silenced in external macros. diff --git a/tests/ui/consts/const-fields-and-indexing.rs b/tests/ui/consts/const-fields-and-indexing.rs index bb13bebf4e2bc..5dd168c565c5f 100644 --- a/tests/ui/consts/const-fields-and-indexing.rs +++ b/tests/ui/consts/const-fields-and-indexing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-float-bits-conv.rs b/tests/ui/consts/const-float-bits-conv.rs index fd5e42ef17077..ba8db4c23dc9b 100644 --- a/tests/ui/consts/const-float-bits-conv.rs +++ b/tests/ui/consts/const-float-bits-conv.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=0 +//@ run-pass #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-float-bits-reject-conv.rs b/tests/ui/consts/const-float-bits-reject-conv.rs index c77e99abbf6d3..febb272869a37 100644 --- a/tests/ui/consts/const-float-bits-reject-conv.rs +++ b/tests/ui/consts/const-float-bits-reject-conv.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// error-pattern: cannot use f32::to_bits on a NaN +//@ compile-flags: -Zmir-opt-level=0 +//@ error-pattern: cannot use f32::to_bits on a NaN #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-float-classify.rs b/tests/ui/consts/const-float-classify.rs index e8bd095ed25f7..44772fb731369 100644 --- a/tests/ui/consts/const-float-classify.rs +++ b/tests/ui/consts/const-float-classify.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=0 +//@ run-pass #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-fn-const-eval.rs b/tests/ui/consts/const-fn-const-eval.rs index d4da990812e35..25abca0fb43d2 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 +//@ run-pass #![allow(dead_code)] const fn add(x: usize, y: usize) -> usize { diff --git a/tests/ui/consts/const-fn-destructuring-arg.rs b/tests/ui/consts/const-fn-destructuring-arg.rs index ea5c9ddc7ced3..c775155a96e6c 100644 --- a/tests/ui/consts/const-fn-destructuring-arg.rs +++ b/tests/ui/consts/const-fn-destructuring-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn i((a, b): (u32, u32)) -> u32 { a + b diff --git a/tests/ui/consts/const-fn-method.rs b/tests/ui/consts/const-fn-method.rs index 002646db92a4f..689b8576e4b78 100644 --- a/tests/ui/consts/const-fn-method.rs +++ b/tests/ui/consts/const-fn-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { value: u32 } diff --git a/tests/ui/consts/const-fn-nested.rs b/tests/ui/consts/const-fn-nested.rs index ef5598bf9e776..d0edb51cb6aca 100644 --- a/tests/ui/consts/const-fn-nested.rs +++ b/tests/ui/consts/const-fn-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a call whose argument is the result of another call. const fn sub(x: u32, y: u32) -> u32 { diff --git a/tests/ui/consts/const-fn-stability-calls-3.rs b/tests/ui/consts/const-fn-stability-calls-3.rs index b831dee580c1a..7a9576f1f9d03 100644 --- a/tests/ui/consts/const-fn-stability-calls-3.rs +++ b/tests/ui/consts/const-fn-stability-calls-3.rs @@ -1,7 +1,7 @@ // Test use of const fn from another crate without a feature gate. -// check-pass -// aux-build:const_fn_lib.rs +//@ check-pass +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const-fn-stability-calls.rs b/tests/ui/consts/const-fn-stability-calls.rs index 13867904895a6..b307c788a4c56 100644 --- a/tests/ui/consts/const-fn-stability-calls.rs +++ b/tests/ui/consts/const-fn-stability-calls.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test use of const fn from another crate without a feature gate. -// aux-build:const_fn_lib.rs +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const-fn-type-name-any.rs b/tests/ui/consts/const-fn-type-name-any.rs index 448c4fc044638..309fb79f06088 100644 --- a/tests/ui/consts/const-fn-type-name-any.rs +++ b/tests/ui/consts/const-fn-type-name-any.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_type_name)] #![allow(dead_code)] diff --git a/tests/ui/consts/const-fn-type-name.rs b/tests/ui/consts/const-fn-type-name.rs index fd4f60cb8899d..5403c26b979ab 100644 --- a/tests/ui/consts/const-fn-type-name.rs +++ b/tests/ui/consts/const-fn-type-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_type_name)] diff --git a/tests/ui/consts/const-fn-val.rs b/tests/ui/consts/const-fn-val.rs index e5bf4757e3a7a..9c0771bdd0c8e 100644 --- a/tests/ui/consts/const-fn-val.rs +++ b/tests/ui/consts/const-fn-val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/consts/const-fn-zst-args.rs b/tests/ui/consts/const-fn-zst-args.rs index 82c27b37573ad..27ee42460d2e5 100644 --- a/tests/ui/consts/const-fn-zst-args.rs +++ b/tests/ui/consts/const-fn-zst-args.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Check that the evaluation of const-functions with // zero-sized types as arguments compiles successfully diff --git a/tests/ui/consts/const-fn.rs b/tests/ui/consts/const-fn.rs index 59680e6e4a8e3..aa9c478ea6330 100644 --- a/tests/ui/consts/const-fn.rs +++ b/tests/ui/consts/const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // A very basic test of const fn functionality. diff --git a/tests/ui/consts/const-index-feature-gate.rs b/tests/ui/consts/const-index-feature-gate.rs index 3537a1790cc6d..d13a0b00d8079 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 +//@ run-pass #![allow(dead_code)] const ARR: [usize; 1] = [2]; const ARR2: [i32; ARR[0]] = [5, 6]; diff --git a/tests/ui/consts/const-int-arithmetic-overflow.rs b/tests/ui/consts/const-int-arithmetic-overflow.rs index 6446e94513cd7..17fe6513eee2a 100644 --- a/tests/ui/consts/const-int-arithmetic-overflow.rs +++ b/tests/ui/consts/const-int-arithmetic-overflow.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Make sure arithmetic unary/binary ops actually return the right result, even when overflowing. // We have to put them in `const fn` and turn on optimizations to avoid overflow checks. diff --git a/tests/ui/consts/const-int-arithmetic.rs b/tests/ui/consts/const-int-arithmetic.rs index b9096648f9235..1c73a76284a14 100644 --- a/tests/ui/consts/const-int-arithmetic.rs +++ b/tests/ui/consts/const-int-arithmetic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! suite { ($( diff --git a/tests/ui/consts/const-int-conversion-rpass.rs b/tests/ui/consts/const-int-conversion-rpass.rs index 4aaeeaa38853d..b1cd9f194907d 100644 --- a/tests/ui/consts/const-int-conversion-rpass.rs +++ b/tests/ui/consts/const-int-conversion-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const REVERSE: u32 = 0x12345678_u32.reverse_bits(); const FROM_BE_BYTES: i32 = i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]); diff --git a/tests/ui/consts/const-int-overflowing-rpass.rs b/tests/ui/consts/const-int-overflowing-rpass.rs index 75e77fdf1be17..1eaeffc4a3be7 100644 --- a/tests/ui/consts/const-int-overflowing-rpass.rs +++ b/tests/ui/consts/const-int-overflowing-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ADD_A: (u32, bool) = 5u32.overflowing_add(2); const ADD_B: (u32, bool) = u32::MAX.overflowing_add(1); diff --git a/tests/ui/consts/const-int-pow-rpass.rs b/tests/ui/consts/const-int-pow-rpass.rs index 30bcb78bcf270..df97f326f8900 100644 --- a/tests/ui/consts/const-int-pow-rpass.rs +++ b/tests/ui/consts/const-int-pow-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(wrapping_next_power_of_two)] diff --git a/tests/ui/consts/const-int-rotate-rpass.rs b/tests/ui/consts/const-int-rotate-rpass.rs index 14f34f76cea53..c149794a2bddd 100644 --- a/tests/ui/consts/const-int-rotate-rpass.rs +++ b/tests/ui/consts/const-int-rotate-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const LEFT: u32 = 0x10000b3u32.rotate_left(8); const RIGHT: u32 = 0xb301u32.rotate_right(8); diff --git a/tests/ui/consts/const-int-saturating-arith.rs b/tests/ui/consts/const-int-saturating-arith.rs index 7edbdd4cec5a5..3e0f0e76e4253 100644 --- a/tests/ui/consts/const-int-saturating-arith.rs +++ b/tests/ui/consts/const-int-saturating-arith.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const INT_U32_NO: u32 = (42 as u32).saturating_add(2); const INT_U32: u32 = u32::MAX.saturating_add(1); diff --git a/tests/ui/consts/const-int-sign-rpass.rs b/tests/ui/consts/const-int-sign-rpass.rs index 63c191d422716..04664e5739305 100644 --- a/tests/ui/consts/const-int-sign-rpass.rs +++ b/tests/ui/consts/const-int-sign-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const NEGATIVE_A: bool = (-10i32).is_negative(); const NEGATIVE_B: bool = 10i32.is_negative(); diff --git a/tests/ui/consts/const-int-wrapping-rpass.rs b/tests/ui/consts/const-int-wrapping-rpass.rs index 225d1e9393db4..f982e417e5fbf 100644 --- a/tests/ui/consts/const-int-wrapping-rpass.rs +++ b/tests/ui/consts/const-int-wrapping-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ADD_A: u32 = 200u32.wrapping_add(55); const ADD_B: u32 = 200u32.wrapping_add(u32::MAX); diff --git a/tests/ui/consts/const-labeled-break.rs b/tests/ui/consts/const-labeled-break.rs index 6864f7247ad5f..16444dfefe2b0 100644 --- a/tests/ui/consts/const-labeled-break.rs +++ b/tests/ui/consts/const-labeled-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Using labeled break in a while loop has caused an illegal instruction being // generated, and an ICE later. diff --git a/tests/ui/consts/const-len-underflow-separate-spans.rs b/tests/ui/consts/const-len-underflow-separate-spans.rs index bd37be2157617..42314eed7aad6 100644 --- a/tests/ui/consts/const-len-underflow-separate-spans.rs +++ b/tests/ui/consts/const-len-underflow-separate-spans.rs @@ -2,8 +2,8 @@ // spot (where the underflow occurred), while also providing the // overall context for what caused the evaluation. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver const ONE: usize = 1; const TWO: usize = 2; diff --git a/tests/ui/consts/const-match-check.rs b/tests/ui/consts/const-match-check.rs index 60f60fa40e349..f544b5fa99e4f 100644 --- a/tests/ui/consts/const-match-check.rs +++ b/tests/ui/consts/const-match-check.rs @@ -1,4 +1,4 @@ -// revisions: matchck eval1 eval2 +//@ revisions: matchck eval1 eval2 #[cfg(matchck)] const X: i32 = { let 0 = 0; 0 }; diff --git a/tests/ui/consts/const-match-pattern-arm.rs b/tests/ui/consts/const-match-pattern-arm.rs index 90680c0194c55..27af3cf09156b 100644 --- a/tests/ui/consts/const-match-pattern-arm.rs +++ b/tests/ui/consts/const-match-pattern-arm.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: bool = match Some(true) { Some(value) => true, diff --git a/tests/ui/consts/const-meth-pattern.rs b/tests/ui/consts/const-meth-pattern.rs index 1544d760a1339..72de172222fee 100644 --- a/tests/ui/consts/const-meth-pattern.rs +++ b/tests/ui/consts/const-meth-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; diff --git a/tests/ui/consts/const-mut-refs/const_mut_address_of.rs b/tests/ui/consts/const-mut-refs/const_mut_address_of.rs index 03b2f9e3c74e5..66a4ec50c11de 100644 --- a/tests/ui/consts/const-mut-refs/const_mut_address_of.rs +++ b/tests/ui/consts/const-mut-refs/const_mut_address_of.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_mut_refs)] #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-mut-refs/const_mut_refs.rs b/tests/ui/consts/const-mut-refs/const_mut_refs.rs index 544458dfcd8bb..e4a2b78f11521 100644 --- a/tests/ui/consts/const-mut-refs/const_mut_refs.rs +++ b/tests/ui/consts/const-mut-refs/const_mut_refs.rs @@ -1,6 +1,8 @@ -// check-pass +//@ check-pass #![feature(const_mut_refs)] +use std::sync::Mutex; + struct Foo { x: usize } @@ -28,6 +30,10 @@ const fn bazz(foo: &mut Foo) -> usize { foo.x } +// Empty slices get promoted so this passes the static checks. +// Make sure it also passes the dynamic checks. +static MUTABLE_REFERENCE_HOLDER: Mutex<&mut [u8]> = Mutex::new(&mut []); + fn main() { let _: [(); foo().bar()] = [(); 1]; let _: [(); baz(&mut foo())] = [(); 2]; diff --git a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr deleted file mode 100644 index dc04d85770e7b..0000000000000 --- a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0764]: mutable references are not allowed in the final value of constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - -error[E0658]: mutation through a reference is not allowed in constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - | - = note: see issue #57349 for more information - = help: add `#![feature(const_mut_refs)]` 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[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0596, E0658, E0764. -For more information about an error, try `rustc --explain E0596`. diff --git a/tests/ui/consts/const-mut-refs/issue-76510.rs b/tests/ui/consts/const-mut-refs/issue-76510.rs index 143d2fb6b9a3a..b6a73abb09cae 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.rs +++ b/tests/ui/consts/const-mut-refs/issue-76510.rs @@ -1,5 +1,3 @@ -// stderr-per-bitwidth - use std::mem::{transmute, ManuallyDrop}; const S: &'static mut str = &mut " hello "; diff --git a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.stderr similarity index 91% rename from tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr rename to tests/ui/consts/const-mut-refs/issue-76510.stderr index dc04d85770e7b..8a1b19baff7c6 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr +++ b/tests/ui/consts/const-mut-refs/issue-76510.stderr @@ -1,11 +1,11 @@ error[E0764]: mutable references are not allowed in the final value of constants - --> $DIR/issue-76510.rs:5:29 + --> $DIR/issue-76510.rs:3:29 | LL | const S: &'static mut str = &mut " hello "; | ^^^^^^^^^^^^^^ error[E0658]: mutation through a reference is not allowed in constants - --> $DIR/issue-76510.rs:5:29 + --> $DIR/issue-76510.rs:3:29 | LL | const S: &'static mut str = &mut " hello "; | ^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | const S: &'static mut str = &mut " hello "; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-76510.rs:5:29 + --> $DIR/issue-76510.rs:3:29 | LL | const S: &'static mut str = &mut " hello "; | ^^^^^^^^^^^^^^ cannot borrow as mutable diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr deleted file mode 100644 index 87420a0375147..0000000000000 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:15:1 - | -LL | const A: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - 2a 00 00 00 │ *... - } - -error: encountered dangling pointer in final value of constant - --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 - | -LL | const B: Option<&mut i32> = helper2(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr deleted file mode 100644 index fc68207512c09..0000000000000 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:15:1 - | -LL | const A: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - 2a 00 00 00 00 00 00 00 │ *....... - } - -error: encountered dangling pointer in final value of constant - --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 - | -LL | const B: Option<&mut i32> = helper2(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 455b557b97c4e..bd4a9863c74ba 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -1,24 +1,48 @@ -// stderr-per-bitwidth -#![feature(const_mut_refs)] +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> " HEX_DUMP" +//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +#![feature(const_mut_refs, const_refs_to_static)] #![feature(raw_ref_op)] +use std::sync::Mutex; + // This file checks that our dynamic checks catch things that the static checks miss. // We do not have static checks for these, because we do not look into function bodies. // We treat all functions as not returning a mutable reference, because there is no way to // do that without causing the borrow checker to complain (see the B4/helper test in // mut_ref_in_final.rs). +static mut BUFFER: i32 = 42; + const fn helper() -> Option<&'static mut i32> { unsafe { + Some(&mut *std::ptr::addr_of_mut!(BUFFER)) +} } +const MUT: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value +//~^ encountered mutable reference +static MUT_STATIC: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value +//~^ encountered mutable reference + +const fn helper_int2ptr() -> Option<&'static mut i32> { unsafe { // Undefined behaviour (integer as pointer), who doesn't love tests like this. Some(&mut *(42 as *mut i32)) } } -const A: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value -//~^ encountered mutable reference in a `const` +const INT2PTR: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value +//~^ encountered a dangling reference +static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value +//~^ encountered a dangling reference -const fn helper2() -> Option<&'static mut i32> { unsafe { +const fn helper_dangling() -> Option<&'static mut i32> { unsafe { // Undefined behaviour (dangling pointer), who doesn't love tests like this. Some(&mut *(&mut 42 as *mut i32)) } } -const B: Option<&mut i32> = helper2(); //~ ERROR encountered dangling pointer in final value of constant +const DANGLING: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer +static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer + +// Variant of the real-world case in . +// Maybe we should allow this in the future (then the rest should move to `const_mut_refs.rs`), +// but for now we reject it. +static mut MUT_ARRAY: &mut [u8] = &mut [42]; +static MUTEX: Mutex<&mut [u8]> = Mutex::new(unsafe { &mut *MUT_ARRAY }); //~ ERROR it is undefined behavior to use this value +//~^ encountered mutable reference fn main() {} diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr new file mode 100644 index 0000000000000..a99d158493207 --- /dev/null +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr @@ -0,0 +1,70 @@ +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:20:1 + | +LL | const MUT: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 + | +LL | static MUT_STATIC: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:29:1 + | +LL | const INT2PTR: Option<&mut i32> = helper_int2ptr(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:31:1 + | +LL | static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: encountered dangling pointer in final value of constant + --> $DIR/mut_ref_in_final_dynamic_check.rs:38:1 + | +LL | const DANGLING: Option<&mut i32> = helper_dangling(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: encountered dangling pointer in final value of static + --> $DIR/mut_ref_in_final_dynamic_check.rs:39:1 + | +LL | static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:45:1 + | +LL | static MUTEX: Mutex<&mut [u8]> = Mutex::new(unsafe { &mut *MUT_ARRAY }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .data.value: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-needs_drop.rs b/tests/ui/consts/const-needs_drop.rs index bf622e3893984..a5300fc2ce3df 100644 --- a/tests/ui/consts/const-needs_drop.rs +++ b/tests/ui/consts/const-needs_drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/consts/const-negation.rs b/tests/ui/consts/const-negation.rs index 18bcdfb0130a9..ef9b21cc553e4 100644 --- a/tests/ui/consts/const-negation.rs +++ b/tests/ui/consts/const-negation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] fn main() { diff --git a/tests/ui/consts/const-negative.rs b/tests/ui/consts/const-negative.rs index 1cb56093628af..96a271add1e89 100644 --- a/tests/ui/consts/const-negative.rs +++ b/tests/ui/consts/const-negative.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #358 #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-nullary-enum.rs b/tests/ui/consts/const-nullary-enum.rs index b6574dce6ca0f..f43e889e601a7 100644 --- a/tests/ui/consts/const-nullary-enum.rs +++ b/tests/ui/consts/const-nullary-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/consts/const-nullary-univariant-enum.rs b/tests/ui/consts/const-nullary-univariant-enum.rs index 51349ad319564..64385479cbf57 100644 --- a/tests/ui/consts/const-nullary-univariant-enum.rs +++ b/tests/ui/consts/const-nullary-univariant-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] enum Foo { diff --git a/tests/ui/consts/const-pattern-not-const-evaluable.rs b/tests/ui/consts/const-pattern-not-const-evaluable.rs index dae5343fe3011..3cc0542e5001f 100644 --- a/tests/ui/consts/const-pattern-not-const-evaluable.rs +++ b/tests/ui/consts/const-pattern-not-const-evaluable.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq, Eq)] enum Cake { diff --git a/tests/ui/consts/const-pattern-variant.rs b/tests/ui/consts/const-pattern-variant.rs index 80f749ed72dec..17f7b70dd5992 100644 --- a/tests/ui/consts/const-pattern-variant.rs +++ b/tests/ui/consts/const-pattern-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #[derive(PartialEq, Eq)] diff --git a/tests/ui/consts/const-ptr-nonnull-rpass.rs b/tests/ui/consts/const-ptr-nonnull-rpass.rs index 67d52ad08246a..48ad72df63091 100644 --- a/tests/ui/consts/const-ptr-nonnull-rpass.rs +++ b/tests/ui/consts/const-ptr-nonnull-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_internals, test)] diff --git a/tests/ui/consts/const-ptr-unique-rpass.rs b/tests/ui/consts/const-ptr-unique-rpass.rs index fc13bb98bd2c9..db319b6ab9229 100644 --- a/tests/ui/consts/const-ptr-unique-rpass.rs +++ b/tests/ui/consts/const-ptr-unique-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_internals, test)] diff --git a/tests/ui/consts/const-rec-and-tup.rs b/tests/ui/consts/const-rec-and-tup.rs index 0bddaf75de8b8..03cc444a86b36 100644 --- a/tests/ui/consts/const-rec-and-tup.rs +++ b/tests/ui/consts/const-rec-and-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/consts/const-region-ptrs-noncopy.rs b/tests/ui/consts/const-region-ptrs-noncopy.rs index 10b9ce896a65e..84695eb5fa670 100644 --- a/tests/ui/consts/const-region-ptrs-noncopy.rs +++ b/tests/ui/consts/const-region-ptrs-noncopy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-region-ptrs.rs b/tests/ui/consts/const-region-ptrs.rs index 9b94a2b1121bd..0fd8f4292d9d3 100644 --- a/tests/ui/consts/const-region-ptrs.rs +++ b/tests/ui/consts/const-region-ptrs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct Pair<'a> { a: isize, b: &'a isize } diff --git a/tests/ui/consts/const-repeated-values.rs b/tests/ui/consts/const-repeated-values.rs index 27efb5ba2a2d6..9ee73bce56d0b 100644 --- a/tests/ui/consts/const-repeated-values.rs +++ b/tests/ui/consts/const-repeated-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: isize = 42; enum Bar { diff --git a/tests/ui/consts/const-size_of-align_of.rs b/tests/ui/consts/const-size_of-align_of.rs index 0c63dc84a3706..37f5464462273 100644 --- a/tests/ui/consts/const-size_of-align_of.rs +++ b/tests/ui/consts/const-size_of-align_of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/consts/const-size_of-cycle.rs b/tests/ui/consts/const-size_of-cycle.rs index 1f56c8bd8e658..cfb2294c44599 100644 --- a/tests/ui/consts/const-size_of-cycle.rs +++ b/tests/ui/consts/const-size_of-cycle.rs @@ -1,4 +1,4 @@ -// error-pattern: cycle detected +//@ error-pattern: cycle detected struct Foo { bytes: [u8; std::mem::size_of::()] diff --git a/tests/ui/consts/const-size_of_val-align_of_val.rs b/tests/ui/consts/const-size_of_val-align_of_val.rs index cd67817676123..ee9dfca0170bb 100644 --- a/tests/ui/consts/const-size_of_val-align_of_val.rs +++ b/tests/ui/consts/const-size_of_val-align_of_val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_size_of_val, const_align_of_val)] #![feature(const_size_of_val_raw, const_align_of_val_raw, layout_for_ptr)] diff --git a/tests/ui/consts/const-struct-offsets.rs b/tests/ui/consts/const-struct-offsets.rs index 26a008320797e..ee97fe3cab941 100644 --- a/tests/ui/consts/const-struct-offsets.rs +++ b/tests/ui/consts/const-struct-offsets.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] enum Foo { diff --git a/tests/ui/consts/const-struct.rs b/tests/ui/consts/const-struct.rs index db397a891d681..d11f4ea77c474 100644 --- a/tests/ui/consts/const-struct.rs +++ b/tests/ui/consts/const-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-trait-to-trait.rs b/tests/ui/consts/const-trait-to-trait.rs index 12a2999d79d47..382c7613c9eaf 100644 --- a/tests/ui/consts/const-trait-to-trait.rs +++ b/tests/ui/consts/const-trait-to-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Issue #24644 - block causes a &Trait -> &Trait coercion: diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs index 6b7ba8f1e32b4..f2d3db9be9c5b 100644 --- a/tests/ui/consts/const-try.rs +++ b/tests/ui/consts/const-try.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // Demonstrates what's needed to make use of `?` in const contexts. diff --git a/tests/ui/consts/const-tuple-struct.rs b/tests/ui/consts/const-tuple-struct.rs index 0144afaaceb34..1670faa70e8a7 100644 --- a/tests/ui/consts/const-tuple-struct.rs +++ b/tests/ui/consts/const-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Bar(isize, isize); diff --git a/tests/ui/consts/const-typeid-of-rpass.rs b/tests/ui/consts/const-typeid-of-rpass.rs index 89d57ae4f98e6..15ffdd1e83a2a 100644 --- a/tests/ui/consts/const-typeid-of-rpass.rs +++ b/tests/ui/consts/const-typeid-of-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_type_id)] #![feature(core_intrinsics)] diff --git a/tests/ui/consts/const-unit-struct.rs b/tests/ui/consts/const-unit-struct.rs index 1c9e0e8d3c989..096cd1e83847a 100644 --- a/tests/ui/consts/const-unit-struct.rs +++ b/tests/ui/consts/const-unit-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/consts/const-unsafe-fn.rs b/tests/ui/consts/const-unsafe-fn.rs index 72ce73f745f4e..8735f79dda87c 100644 --- a/tests/ui/consts/const-unsafe-fn.rs +++ b/tests/ui/consts/const-unsafe-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A quick test of 'unsafe const fn' functionality diff --git a/tests/ui/consts/const-unwrap.rs b/tests/ui/consts/const-unwrap.rs index 729ae535ceff6..bc79c7db2fc80 100644 --- a/tests/ui/consts/const-unwrap.rs +++ b/tests/ui/consts/const-unwrap.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(const_option)] diff --git a/tests/ui/consts/const-validation-fail-55455.rs b/tests/ui/consts/const-validation-fail-55455.rs index 583074888c9b6..c2f41c1850ad3 100644 --- a/tests/ui/consts/const-validation-fail-55455.rs +++ b/tests/ui/consts/const-validation-fail-55455.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct This(T); diff --git a/tests/ui/consts/const-variant-count.rs b/tests/ui/consts/const-variant-count.rs index 50eaeeb468500..c554c3b0ff418 100644 --- a/tests/ui/consts/const-variant-count.rs +++ b/tests/ui/consts/const-variant-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, enum_intrinsics_non_enums)] #![feature(variant_count)] #![feature(never_type)] diff --git a/tests/ui/consts/const-vec-of-fns.rs b/tests/ui/consts/const-vec-of-fns.rs index 6d90b066b74d7..a14cb06db6153 100644 --- a/tests/ui/consts/const-vec-of-fns.rs +++ b/tests/ui/consts/const-vec-of-fns.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] /*! diff --git a/tests/ui/consts/const-vec-syntax.rs b/tests/ui/consts/const-vec-syntax.rs index 61246e44eba8d..5537a8cec9006 100644 --- a/tests/ui/consts/const-vec-syntax.rs +++ b/tests/ui/consts/const-vec-syntax.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: &[isize]) {} diff --git a/tests/ui/consts/const-vecs-and-slices.rs b/tests/ui/consts/const-vecs-and-slices.rs index 1cdc33b7a34eb..4ddc5e8a8d85b 100644 --- a/tests/ui/consts/const-vecs-and-slices.rs +++ b/tests/ui/consts/const-vecs-and-slices.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static x : [isize; 4] = [1,2,3,4]; diff --git a/tests/ui/consts/const.rs b/tests/ui/consts/const.rs index 71fbadfa828b6..1f1c6e30b4a08 100644 --- a/tests/ui/consts/const.rs +++ b/tests/ui/consts/const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static i: isize = 10; diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index cda811144c76d..f27271423232c 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_type_id)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/consts/const_constructor/const-construct-call.rs b/tests/ui/consts/const_constructor/const-construct-call.rs index cb735d7b305dc..b875b03f00a9d 100644 --- a/tests/ui/consts/const_constructor/const-construct-call.rs +++ b/tests/ui/consts/const_constructor/const-construct-call.rs @@ -1,6 +1,6 @@ // Test that constructors are considered to be const fns -// run-pass +//@ run-pass // Ctor(..) is transformed to Ctor { 0: ... } in THIR lowering, so directly // calling constructors doesn't require them to be const. diff --git a/tests/ui/consts/const_constructor/const_constructor_qpath.rs b/tests/ui/consts/const_constructor/const_constructor_qpath.rs index 7c55f470fdf97..a0bf5e4eae8a6 100644 --- a/tests/ui/consts/const_constructor/const_constructor_qpath.rs +++ b/tests/ui/consts/const_constructor/const_constructor_qpath.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ConstDefault { const DEFAULT: Self; diff --git a/tests/ui/consts/const_discriminant.rs b/tests/ui/consts/const_discriminant.rs index 80deb0f784d26..49d7af1b460b5 100644 --- a/tests/ui/consts/const_discriminant.rs +++ b/tests/ui/consts/const_discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::{discriminant, Discriminant}; diff --git a/tests/ui/consts/const_fn_floating_point_arithmetic.rs b/tests/ui/consts/const_fn_floating_point_arithmetic.rs index 5e32482b21a52..b0d0bc6b9f4a9 100644 --- a/tests/ui/consts/const_fn_floating_point_arithmetic.rs +++ b/tests/ui/consts/const_fn_floating_point_arithmetic.rs @@ -1,6 +1,6 @@ // gate-test-const_fn_floating_point_arithmetic -// revisions: stock gated +//@ revisions: stock gated #![feature(rustc_attrs)] #![cfg_attr(gated, feature(const_fn_floating_point_arithmetic))] diff --git a/tests/ui/consts/const_fn_return_nested_fn_ptr.rs b/tests/ui/consts/const_fn_return_nested_fn_ptr.rs index d22c789609f4d..8f705f32ac1d8 100644 --- a/tests/ui/consts/const_fn_return_nested_fn_ptr.rs +++ b/tests/ui/consts/const_fn_return_nested_fn_ptr.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:const_fn_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const_fn_unsize.rs b/tests/ui/consts/const_fn_unsize.rs index 01da57320c280..f96a6088fd312 100644 --- a/tests/ui/consts/const_fn_unsize.rs +++ b/tests/ui/consts/const_fn_unsize.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(slice_ptr_len)] use std::ptr::NonNull; diff --git a/tests/ui/consts/const_forget.rs b/tests/ui/consts/const_forget.rs index f06149f2cb994..6fc7126af1b8a 100644 --- a/tests/ui/consts/const_forget.rs +++ b/tests/ui/consts/const_forget.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(forgetting_copy_types)] diff --git a/tests/ui/consts/const_in_pattern/accept_structural.rs b/tests/ui/consts/const_in_pattern/accept_structural.rs index 69b4e75c62236..09142c5615747 100644 --- a/tests/ui/consts/const_in_pattern/accept_structural.rs +++ b/tests/ui/consts/const_in_pattern/accept_structural.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs index 69f5e66f5af70..d8df2847c440a 100644 --- a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs +++ b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs @@ -1,4 +1,4 @@ -// aux-build:consts.rs +//@ aux-build:consts.rs #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/cross-crate-pass.rs b/tests/ui/consts/const_in_pattern/cross-crate-pass.rs index 1d8ecf8ae6640..c18a30b3495b4 100644 --- a/tests/ui/consts/const_in_pattern/cross-crate-pass.rs +++ b/tests/ui/consts/const_in_pattern/cross-crate-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:consts.rs +//@ run-pass +//@ aux-build:consts.rs #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs b/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs index ac89b7925ffec..605f4e760cd27 100644 --- a/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs +++ b/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/issue-44333.rs b/tests/ui/consts/const_in_pattern/issue-44333.rs index aaf1edb6fe6e4..9adf02cbfcef2 100644 --- a/tests/ui/consts/const_in_pattern/issue-44333.rs +++ b/tests/ui/consts/const_in_pattern/issue-44333.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/issue-53708.rs b/tests/ui/consts/const_in_pattern/issue-53708.rs index 355ba63790f3b..a21afbe7c0d11 100644 --- a/tests/ui/consts/const_in_pattern/issue-53708.rs +++ b/tests/ui/consts/const_in_pattern/issue-53708.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/53708 #[derive(PartialEq, Eq)] struct S; diff --git a/tests/ui/consts/const_in_pattern/issue-62614.rs b/tests/ui/consts/const_in_pattern/issue-62614.rs index 4ea9a283618ea..92f76322fde13 100644 --- a/tests/ui/consts/const_in_pattern/issue-62614.rs +++ b/tests/ui/consts/const_in_pattern/issue-62614.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Sum(u32, u32); diff --git a/tests/ui/consts/const_in_pattern/issue-65466.rs b/tests/ui/consts/const_in_pattern/issue-65466.rs index d45c32e170a6a..048fca762d5a1 100644 --- a/tests/ui/consts/const_in_pattern/issue-65466.rs +++ b/tests/ui/consts/const_in_pattern/issue-65466.rs @@ -1,6 +1,6 @@ #![deny(indirect_structural_match)] -// check-pass +//@ check-pass #[derive(PartialEq, Eq)] enum O { diff --git a/tests/ui/consts/const_in_pattern/issue-73431.rs b/tests/ui/consts/const_in_pattern/issue-73431.rs index 835f502b40730..4e492fc8ea511 100644 --- a/tests/ui/consts/const_in_pattern/issue-73431.rs +++ b/tests/ui/consts/const_in_pattern/issue-73431.rs @@ -1,5 +1,5 @@ -// run-pass -// unset-rustc-env:RUSTC_LOG_COLOR +//@ run-pass +//@ unset-rustc-env:RUSTC_LOG_COLOR // Regression test for https://github.com/rust-lang/rust/issues/73431. diff --git a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs index 515c79d9457b0..ae2d532be7b18 100644 --- a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs +++ b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); #[derive(PartialEq)] diff --git a/tests/ui/consts/const_in_pattern/reject_non_structural.rs b/tests/ui/consts/const_in_pattern/reject_non_structural.rs index 71d4138104db1..a9b0aa5507e3b 100644 --- a/tests/ui/consts/const_in_pattern/reject_non_structural.rs +++ b/tests/ui/consts/const_in_pattern/reject_non_structural.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes // This test of structural match checking enumerates the different kinds of // const definitions, collecting cases where the const pattern is rejected. diff --git a/tests/ui/consts/const_let_assign.rs b/tests/ui/consts/const_let_assign.rs index b83acfb73cfc1..73580c419c072 100644 --- a/tests/ui/consts/const_let_assign.rs +++ b/tests/ui/consts/const_let_assign.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(i32); diff --git a/tests/ui/consts/const_let_assign2.rs b/tests/ui/consts/const_let_assign2.rs index 1c7afe0e3d6cb..f239507d24546 100644 --- a/tests/ui/consts/const_let_assign2.rs +++ b/tests/ui/consts/const_let_assign2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct AA { pub data: [u8; 10], diff --git a/tests/ui/consts/const_let_eq.rs b/tests/ui/consts/const_let_eq.rs index 818819f9ff67a..cf2a38bf21363 100644 --- a/tests/ui/consts/const_let_eq.rs +++ b/tests/ui/consts/const_let_eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(T); struct Bar { x: T } diff --git a/tests/ui/consts/const_let_eq_float.rs b/tests/ui/consts/const_let_eq_float.rs index e15f4b804f716..30d839cdc2a8c 100644 --- a/tests/ui/consts/const_let_eq_float.rs +++ b/tests/ui/consts/const_let_eq_float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_fn_floating_point_arithmetic)] diff --git a/tests/ui/consts/const_let_irrefutable.rs b/tests/ui/consts/const_let_irrefutable.rs index e889abf4abe4a..afd67be78057c 100644 --- a/tests/ui/consts/const_let_irrefutable.rs +++ b/tests/ui/consts/const_let_irrefutable.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/tests/ui/consts/const_let_promote.rs b/tests/ui/consts/const_let_promote.rs index f4661e9e425ba..e04cbfc8171a7 100644 --- a/tests/ui/consts/const_let_promote.rs +++ b/tests/ui/consts/const_let_promote.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/const_prop_slice_pat_ice.rs b/tests/ui/consts/const_prop_slice_pat_ice.rs index 60b06a497d6de..edb0c50901481 100644 --- a/tests/ui/consts/const_prop_slice_pat_ice.rs +++ b/tests/ui/consts/const_prop_slice_pat_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match &[0, 1] as &[i32] { diff --git a/tests/ui/consts/const_refs_to_static.rs b/tests/ui/consts/const_refs_to_static.rs index f5e5ef5f699e2..1baa8535b2c0a 100644 --- a/tests/ui/consts/const_refs_to_static.rs +++ b/tests/ui/consts/const_refs_to_static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_refs_to_static)] static S: i32 = 0; diff --git a/tests/ui/consts/const_refs_to_static_fail.rs b/tests/ui/consts/const_refs_to_static_fail.rs index d5bcccf82d597..e001c4d6395bf 100644 --- a/tests/ui/consts/const_refs_to_static_fail.rs +++ b/tests/ui/consts/const_refs_to_static_fail.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(const_refs_to_static, const_mut_refs, sync_unsafe_cell)] use std::cell::SyncUnsafeCell; diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.rs b/tests/ui/consts/const_refs_to_static_fail_invalid.rs index 665b876c43e2c..363a6da0901c0 100644 --- a/tests/ui/consts/const_refs_to_static_fail_invalid.rs +++ b/tests/ui/consts/const_refs_to_static_fail_invalid.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(const_refs_to_static)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/const_short_circuit.rs b/tests/ui/consts/const_short_circuit.rs index 6403fbb17dd58..717889774910a 100644 --- a/tests/ui/consts/const_short_circuit.rs +++ b/tests/ui/consts/const_short_circuit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: bool = false && false; const _: bool = true && false; diff --git a/tests/ui/consts/const_unsafe_unreachable.rs b/tests/ui/consts/const_unsafe_unreachable.rs index 1c3baec5d8638..2f52b48746f23 100644 --- a/tests/ui/consts/const_unsafe_unreachable.rs +++ b/tests/ui/consts/const_unsafe_unreachable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const unsafe fn foo(x: bool) -> bool { match x { diff --git a/tests/ui/consts/const_unsafe_unreachable_ub.rs b/tests/ui/consts/const_unsafe_unreachable_ub.rs index b418fea617cea..705e208b56d79 100644 --- a/tests/ui/consts/const_unsafe_unreachable_ub.rs +++ b/tests/ui/consts/const_unsafe_unreachable_ub.rs @@ -1,4 +1,4 @@ -// error-pattern: evaluation of constant value failed +//@ error-pattern: evaluation of constant value failed const unsafe fn foo(x: bool) -> bool { match x { diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs index fcf01d5bc71a3..29c967f38a7d9 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.rs +++ b/tests/ui/consts/constifconst-call-in-const-position.rs @@ -1,4 +1,4 @@ -// known-bug: #102498 +//@ known-bug: #102498 #![feature(const_trait_impl, generic_const_exprs)] diff --git a/tests/ui/consts/consts-in-patterns.rs b/tests/ui/consts/consts-in-patterns.rs index 0295204c879ca..31b2f1b215101 100644 --- a/tests/ui/consts/consts-in-patterns.rs +++ b/tests/ui/consts/consts-in-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: isize = 10; const BAR: isize = 3; diff --git a/tests/ui/consts/control-flow/basics.rs b/tests/ui/consts/control-flow/basics.rs index 02e5501f10cfe..c4e32e246f0d1 100644 --- a/tests/ui/consts/control-flow/basics.rs +++ b/tests/ui/consts/control-flow/basics.rs @@ -1,6 +1,6 @@ // Test basic functionality of control flow in a const context. -// run-pass +//@ run-pass const X: u32 = 4; const Y: u32 = 5; diff --git a/tests/ui/consts/control-flow/drop-fail.rs b/tests/ui/consts/control-flow/drop-fail.rs index 41341f3121e2b..25afe5d08d970 100644 --- a/tests/ui/consts/control-flow/drop-fail.rs +++ b/tests/ui/consts/control-flow/drop-fail.rs @@ -1,4 +1,4 @@ -// revisions: stock precise +//@ revisions: stock precise #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/consts/control-flow/drop-pass.rs b/tests/ui/consts/control-flow/drop-pass.rs index 2a6d12768c333..69ecb1176d4cc 100644 --- a/tests/ui/consts/control-flow/drop-pass.rs +++ b/tests/ui/consts/control-flow/drop-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: stock precise +//@ run-pass +//@ revisions: stock precise #![allow(unused)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/consts/control-flow/drop-precise.rs b/tests/ui/consts/control-flow/drop-precise.rs index 4ecc5ef78dd5c..9f42d3351875b 100644 --- a/tests/ui/consts/control-flow/drop-precise.rs +++ b/tests/ui/consts/control-flow/drop-precise.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // gate-test-const_precise_live_drops #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs b/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs index 4320133dfdbcc..fbe16f72f4343 100644 --- a/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs +++ b/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs @@ -1,6 +1,6 @@ // Test for -// check-pass +//@ check-pass enum E { A, diff --git a/tests/ui/consts/control-flow/feature-gate-const-if-match.rs b/tests/ui/consts/control-flow/feature-gate-const-if-match.rs index cb66bc75309b6..ccf77b411d575 100644 --- a/tests/ui/consts/control-flow/feature-gate-const-if-match.rs +++ b/tests/ui/consts/control-flow/feature-gate-const-if-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: i32 = if true { 5 } else { 6 }; diff --git a/tests/ui/consts/control-flow/short-circuit-let.rs b/tests/ui/consts/control-flow/short-circuit-let.rs index 8a58d06ac87bd..2d1a487ee09d3 100644 --- a/tests/ui/consts/control-flow/short-circuit-let.rs +++ b/tests/ui/consts/control-flow/short-circuit-let.rs @@ -1,6 +1,6 @@ // `&&` and `||` were previously forbidden in constants alongside let bindings. -// run-pass +//@ run-pass const X: i32 = { let mut x = 0; diff --git a/tests/ui/consts/control-flow/short-circuit.rs b/tests/ui/consts/control-flow/short-circuit.rs index 6abe107855f80..4437106edf3f8 100644 --- a/tests/ui/consts/control-flow/short-circuit.rs +++ b/tests/ui/consts/control-flow/short-circuit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that both `&&` and `||` actually short-circuit. // Formerly, both sides were evaluated unconditionally diff --git a/tests/ui/consts/control-flow/single_variant_match_ice.rs b/tests/ui/consts/control-flow/single_variant_match_ice.rs index b59be00ffb788..aa0cdc01837e8 100644 --- a/tests/ui/consts/control-flow/single_variant_match_ice.rs +++ b/tests/ui/consts/control-flow/single_variant_match_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Prob, diff --git a/tests/ui/consts/cycle-static-promoted.rs b/tests/ui/consts/cycle-static-promoted.rs index 5838dc58a3a15..d648d04861189 100644 --- a/tests/ui/consts/cycle-static-promoted.rs +++ b/tests/ui/consts/cycle-static-promoted.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Value { values: &'static [&'static Value], diff --git a/tests/ui/consts/deref_in_pattern.rs b/tests/ui/consts/deref_in_pattern.rs index cc47b5b49c0b3..eb49a3dc78fd1 100644 --- a/tests/ui/consts/deref_in_pattern.rs +++ b/tests/ui/consts/deref_in_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/25574 diff --git a/tests/ui/consts/drop-maybe_uninit.rs b/tests/ui/consts/drop-maybe_uninit.rs index 2fdeae5f1853a..91c1c8a9260a6 100644 --- a/tests/ui/consts/drop-maybe_uninit.rs +++ b/tests/ui/consts/drop-maybe_uninit.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub const fn f(_: [std::mem::MaybeUninit; N]) {} diff --git a/tests/ui/consts/drop_none.rs b/tests/ui/consts/drop_none.rs index 9d98d3be87464..7991f119857e0 100644 --- a/tests/ui/consts/drop_none.rs +++ b/tests/ui/consts/drop_none.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A; impl Drop for A { diff --git a/tests/ui/consts/drop_zst.rs b/tests/ui/consts/drop_zst.rs index f7c70d3978b7f..40c66043f9fda 100644 --- a/tests/ui/consts/drop_zst.rs +++ b/tests/ui/consts/drop_zst.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs index 39f918379d145..d2b157e03e7cb 100644 --- a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs +++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs @@ -1,6 +1,6 @@ -// revisions: no_flag with_flag -// [no_flag] check-pass -// [with_flag] compile-flags: -Zextra-const-ub-checks +//@ revisions: no_flag with_flag +//@ [no_flag] check-pass +//@ [with_flag] compile-flags: -Zextra-const-ub-checks #![feature(never_type)] use std::mem::transmute; diff --git a/tests/ui/consts/extra-const-ub/issue-100771.rs b/tests/ui/consts/extra-const-ub/issue-100771.rs index a3296032841fd..1ae6f25f7b10a 100644 --- a/tests/ui/consts/extra-const-ub/issue-100771.rs +++ b/tests/ui/consts/extra-const-ub/issue-100771.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zextra-const-ub-checks +//@ check-pass +//@ compile-flags: -Zextra-const-ub-checks #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/extra-const-ub/issue-101034.rs b/tests/ui/consts/extra-const-ub/issue-101034.rs index e0de705c48846..cb0a0fb0d5b51 100644 --- a/tests/ui/consts/extra-const-ub/issue-101034.rs +++ b/tests/ui/consts/extra-const-ub/issue-101034.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zextra-const-ub-checks +//@ check-pass +//@ compile-flags: -Zextra-const-ub-checks #[repr(packed)] pub struct Foo { diff --git a/tests/ui/consts/fn_trait_refs.rs b/tests/ui/consts/fn_trait_refs.rs index be11ac7264a1a..e9444e5c09481 100644 --- a/tests/ui/consts/fn_trait_refs.rs +++ b/tests/ui/consts/fn_trait_refs.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_fn_trait_ref_impls)] #![feature(fn_traits)] diff --git a/tests/ui/consts/huge-values.rs b/tests/ui/consts/huge-values.rs index 70a5b10e9be99..e88683ca1dcbd 100644 --- a/tests/ui/consts/huge-values.rs +++ b/tests/ui/consts/huge-values.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-32bit +//@ build-pass +//@ ignore-32bit // This test is a canary test that will essentially not compile in a reasonable time frame // (so it'll take hours) if any of the optimizations regress. With the optimizations, these compile diff --git a/tests/ui/consts/ice-48279.rs b/tests/ui/consts/ice-48279.rs index d1d90df240ca5..5316974b80ad3 100644 --- a/tests/ui/consts/ice-48279.rs +++ b/tests/ui/consts/ice-48279.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] diff --git a/tests/ui/consts/ice-zst-static-access.rs b/tests/ui/consts/ice-zst-static-access.rs index b68e442a57c71..2a4343e3eba8a 100644 --- a/tests/ui/consts/ice-zst-static-access.rs +++ b/tests/ui/consts/ice-zst-static-access.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is a regression test for ICEs from // https://github.com/rust-lang/rust/issues/71612 diff --git a/tests/ui/consts/inline_asm.rs b/tests/ui/consts/inline_asm.rs index 4cd7e2717fe45..20ea6a8e99426 100644 --- a/tests/ui/consts/inline_asm.rs +++ b/tests/ui/consts/inline_asm.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/consts/int_ptr_for_zst_slices.rs b/tests/ui/consts/int_ptr_for_zst_slices.rs index 34e5bb322befc..c6330f4739ea9 100644 --- a/tests/ui/consts/int_ptr_for_zst_slices.rs +++ b/tests/ui/consts/int_ptr_for_zst_slices.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: &str = unsafe { &*(1_usize as *const [u8; 0] as *const [u8] as *const str) }; diff --git a/tests/ui/consts/interior-mut-const-via-union.rs b/tests/ui/consts/interior-mut-const-via-union.rs index 4f67ec979029e..20485b90bf7aa 100644 --- a/tests/ui/consts/interior-mut-const-via-union.rs +++ b/tests/ui/consts/interior-mut-const-via-union.rs @@ -1,8 +1,8 @@ // Check that constants with interior mutability inside unions are rejected // during validation. // -// build-fail -// stderr-per-bitwidth +//@ build-fail +//@ stderr-per-bitwidth #![feature(const_mut_refs)] use std::cell::Cell; diff --git a/tests/ui/consts/invalid_promotion.rs b/tests/ui/consts/invalid_promotion.rs index a31eaf40e0ede..1a92ddf382d25 100644 --- a/tests/ui/consts/invalid_promotion.rs +++ b/tests/ui/consts/invalid_promotion.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // note this was only reproducible with lib crates -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib pub struct Hz; diff --git a/tests/ui/consts/is_val_statically_known.rs b/tests/ui/consts/is_val_statically_known.rs index b0565842eb4e2..a9059817bcc50 100644 --- a/tests/ui/consts/is_val_statically_known.rs +++ b/tests/ui/consts/is_val_statically_known.rs @@ -1,11 +1,10 @@ -// run-pass +//@ run-pass -#![feature(core_intrinsics)] -#![feature(is_val_statically_known)] +#![feature(core_intrinsics, is_val_statically_known)] use std::intrinsics::is_val_statically_known; -const CONST_TEST: bool = unsafe { is_val_statically_known(0) }; +const CONST_TEST: bool = is_val_statically_known(0); fn main() { if CONST_TEST { diff --git a/tests/ui/consts/issue-104155.rs b/tests/ui/consts/issue-104155.rs index 7b375dc056675..ed3cd9c4bdfe3 100644 --- a/tests/ui/consts/issue-104155.rs +++ b/tests/ui/consts/issue-104155.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(forgetting_copy_types)] diff --git a/tests/ui/consts/issue-104396.rs b/tests/ui/consts/issue-104396.rs index 315b0cf0fd6bf..f44abc359d670 100644 --- a/tests/ui/consts/issue-104396.rs +++ b/tests/ui/consts/issue-104396.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=3 -// check-pass +//@ compile-flags: -Zmir-opt-level=3 +//@ check-pass #![feature(generic_const_exprs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs b/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs index 1615399be32aa..7941947f25df1 100644 --- a/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs +++ b/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This does not reflect a stable guarantee (we guarantee very little for equality of pointers // around `const`), but it would be good to understand what is happening if these assertions ever diff --git a/tests/ui/consts/issue-13837.rs b/tests/ui/consts/issue-13837.rs index 645b1c0eb8741..305512cc41ccf 100644 --- a/tests/ui/consts/issue-13837.rs +++ b/tests/ui/consts/issue-13837.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct TestStruct { x: *const [isize; 2] diff --git a/tests/ui/consts/issue-13902.rs b/tests/ui/consts/issue-13902.rs index 1afde0ebe859d..b14f36dd218d8 100644 --- a/tests/ui/consts/issue-13902.rs +++ b/tests/ui/consts/issue-13902.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/consts/issue-17074.rs b/tests/ui/consts/issue-17074.rs index 0ed81132ec6dc..bd62602b6efe3 100644 --- a/tests/ui/consts/issue-17074.rs +++ b/tests/ui/consts/issue-17074.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] static X2: u64 = !0 as u16 as u64; diff --git a/tests/ui/consts/issue-17718-borrow-interior.rs b/tests/ui/consts/issue-17718-borrow-interior.rs index 5861f2186899b..9edff0c4147bf 100644 --- a/tests/ui/consts/issue-17718-borrow-interior.rs +++ b/tests/ui/consts/issue-17718-borrow-interior.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { a: usize } diff --git a/tests/ui/consts/issue-17718.rs b/tests/ui/consts/issue-17718.rs index c6341d80844b3..b6c676886c10d 100644 --- a/tests/ui/consts/issue-17718.rs +++ b/tests/ui/consts/issue-17718.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-17718-aux.rs +//@ aux-build:issue-17718-aux.rs extern crate issue_17718_aux as other; diff --git a/tests/ui/consts/issue-17756.rs b/tests/ui/consts/issue-17756.rs index 1835b177ff369..8a419e8046da5 100644 --- a/tests/ui/consts/issue-17756.rs +++ b/tests/ui/consts/issue-17756.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-19244.rs b/tests/ui/consts/issue-19244.rs index 44d9748fd2afb..02a109cc65cf9 100644 --- a/tests/ui/consts/issue-19244.rs +++ b/tests/ui/consts/issue-19244.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct MyStruct { field: usize } struct Nested { nested: MyStruct } diff --git a/tests/ui/consts/issue-21562.rs b/tests/ui/consts/issue-21562.rs index a47d739c6be94..87d97e436c562 100644 --- a/tests/ui/consts/issue-21562.rs +++ b/tests/ui/consts/issue-21562.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-21721.rs b/tests/ui/consts/issue-21721.rs index 4c1411e1ecff0..1300c4a78840c 100644 --- a/tests/ui/consts/issue-21721.rs +++ b/tests/ui/consts/issue-21721.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { static NONE: Option<((), &'static u8)> = None; diff --git a/tests/ui/consts/issue-23833.rs b/tests/ui/consts/issue-23833.rs index d4128fa54e3da..1d595f5e9ac41 100644 --- a/tests/ui/consts/issue-23833.rs +++ b/tests/ui/consts/issue-23833.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use std::fmt; diff --git a/tests/ui/consts/issue-23968-const-not-overflow.rs b/tests/ui/consts/issue-23968-const-not-overflow.rs index b95930212358b..88aff296051a7 100644 --- a/tests/ui/consts/issue-23968-const-not-overflow.rs +++ b/tests/ui/consts/issue-23968-const-not-overflow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const U8_MAX_HALF: u8 = !0u8 / 2; const U16_MAX_HALF: u16 = !0u16 / 2; const U32_MAX_HALF: u32 = !0u32 / 2; diff --git a/tests/ui/consts/issue-27890.rs b/tests/ui/consts/issue-27890.rs index 9f85473380f82..143cb58e49ec1 100644 --- a/tests/ui/consts/issue-27890.rs +++ b/tests/ui/consts/issue-27890.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static PLUS_ONE: &'static (dyn Fn(i32) -> i32 + Sync) = (&|x: i32| { x + 1 }) as &'static (dyn Fn(i32) -> i32 + Sync); diff --git a/tests/ui/consts/issue-28822.rs b/tests/ui/consts/issue-28822.rs index 10e5d1dd0ac15..07c30bcf98df6 100644 --- a/tests/ui/consts/issue-28822.rs +++ b/tests/ui/consts/issue-28822.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] fn main() {} diff --git a/tests/ui/consts/issue-29798.rs b/tests/ui/consts/issue-29798.rs index 5eff5d1915bad..bdabbad6491f6 100644 --- a/tests/ui/consts/issue-29798.rs +++ b/tests/ui/consts/issue-29798.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 5 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ ignore-emscripten no processes const fn test(x: usize) -> i32 { [42;5][x] diff --git a/tests/ui/consts/issue-29914-2.rs b/tests/ui/consts/issue-29914-2.rs index 626de269d95c7..36a82f5b95012 100644 --- a/tests/ui/consts/issue-29914-2.rs +++ b/tests/ui/consts/issue-29914-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ARR: [usize; 5] = [5, 4, 3, 2, 1]; fn main() { diff --git a/tests/ui/consts/issue-29914-3.rs b/tests/ui/consts/issue-29914-3.rs index 1c6c64eb3168e..575cd30e229d9 100644 --- a/tests/ui/consts/issue-29914-3.rs +++ b/tests/ui/consts/issue-29914-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ARR: [usize; 5] = [5, 4, 3, 2, 1]; const BLA: usize = ARR[ARR[3]]; diff --git a/tests/ui/consts/issue-29914.rs b/tests/ui/consts/issue-29914.rs index 6da63664dfa00..7897733c72389 100644 --- a/tests/ui/consts/issue-29914.rs +++ b/tests/ui/consts/issue-29914.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(const_indexing)] diff --git a/tests/ui/consts/issue-29927-1.rs b/tests/ui/consts/issue-29927-1.rs index a236e49137554..544737765bb7c 100644 --- a/tests/ui/consts/issue-29927-1.rs +++ b/tests/ui/consts/issue-29927-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 3385e4e6e941f..bda5138fcd280 100644 --- a/tests/ui/consts/issue-29927.rs +++ b/tests/ui/consts/issue-29927.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct A { field: usize, diff --git a/tests/ui/consts/issue-33537.rs b/tests/ui/consts/issue-33537.rs index 3539aa64776ab..71e3418f5558a 100644 --- a/tests/ui/consts/issue-33537.rs +++ b/tests/ui/consts/issue-33537.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn foo() -> *const i8 { b"foo" as *const _ as *const i8 diff --git a/tests/ui/consts/issue-33903.rs b/tests/ui/consts/issue-33903.rs index 613aa121a47bf..0355f4e7046e0 100644 --- a/tests/ui/consts/issue-33903.rs +++ b/tests/ui/consts/issue-33903.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Issue 33903: // Built-in indexing should be used even when the index is not diff --git a/tests/ui/consts/issue-3521.fixed b/tests/ui/consts/issue-3521.fixed index f76106dfff187..e091328d7d763 100644 --- a/tests/ui/consts/issue-3521.fixed +++ b/tests/ui/consts/issue-3521.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(non_upper_case_globals)] const foo: isize = 100; diff --git a/tests/ui/consts/issue-3521.rs b/tests/ui/consts/issue-3521.rs index c425a22df9173..b31c6354ba437 100644 --- a/tests/ui/consts/issue-3521.rs +++ b/tests/ui/consts/issue-3521.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(non_upper_case_globals)] let foo: isize = 100; diff --git a/tests/ui/consts/issue-37222.rs b/tests/ui/consts/issue-37222.rs index 8ea5f6b7a278a..a279e786bd7ef 100644 --- a/tests/ui/consts/issue-37222.rs +++ b/tests/ui/consts/issue-37222.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug, PartialEq)] enum Bar { diff --git a/tests/ui/consts/issue-37550-1.rs b/tests/ui/consts/issue-37550-1.rs index 4d00ac7fd0d59..ddd247cbe25b9 100644 --- a/tests/ui/consts/issue-37550-1.rs +++ b/tests/ui/consts/issue-37550-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn x() { let t = true; diff --git a/tests/ui/consts/issue-37550.rs b/tests/ui/consts/issue-37550.rs index 724eb28291ebc..332e5db7a0f2e 100644 --- a/tests/ui/consts/issue-37550.rs +++ b/tests/ui/consts/issue-37550.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/consts/issue-37991.rs b/tests/ui/consts/issue-37991.rs index a6ac4d5ca2e64..1b8cb5210cd53 100644 --- a/tests/ui/consts/issue-37991.rs +++ b/tests/ui/consts/issue-37991.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn foo() -> i64 { 3 diff --git a/tests/ui/consts/issue-39161-bogus-error.rs b/tests/ui/consts/issue-39161-bogus-error.rs index a954385da41a4..2259872caa6e0 100644 --- a/tests/ui/consts/issue-39161-bogus-error.rs +++ b/tests/ui/consts/issue-39161-bogus-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct X { pub a: i32, diff --git a/tests/ui/consts/issue-44255.rs b/tests/ui/consts/issue-44255.rs index 2245032043257..9b1e0ffa7cb6d 100644 --- a/tests/ui/consts/issue-44255.rs +++ b/tests/ui/consts/issue-44255.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; diff --git a/tests/ui/consts/issue-46553.rs b/tests/ui/consts/issue-46553.rs index abeaf10f2b524..668f752dacb3c 100644 --- a/tests/ui/consts/issue-46553.rs +++ b/tests/ui/consts/issue-46553.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Data { function: fn() -> T, diff --git a/tests/ui/consts/issue-47789.rs b/tests/ui/consts/issue-47789.rs index 32dd909b2e94a..a6acfbb8ee6e1 100644 --- a/tests/ui/consts/issue-47789.rs +++ b/tests/ui/consts/issue-47789.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] static mut x: &'static u32 = &0; diff --git a/tests/ui/consts/issue-54348.rs b/tests/ui/consts/issue-54348.rs index 5c38d7c42f6b2..9710d6de838d4 100644 --- a/tests/ui/consts/issue-54348.rs +++ b/tests/ui/consts/issue-54348.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { [1][0u64 as usize]; diff --git a/tests/ui/consts/issue-54387.rs b/tests/ui/consts/issue-54387.rs index 60e3a02f4ce6c..371d89ad32b90 100644 --- a/tests/ui/consts/issue-54387.rs +++ b/tests/ui/consts/issue-54387.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct GstRc { _obj: *const (), diff --git a/tests/ui/consts/issue-54582.rs b/tests/ui/consts/issue-54582.rs index 8c50cac67f8fc..90866ab4ce23e 100644 --- a/tests/ui/consts/issue-54582.rs +++ b/tests/ui/consts/issue-54582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Stage: Sync {} diff --git a/tests/ui/consts/issue-58435-ice-with-assoc-const.rs b/tests/ui/consts/issue-58435-ice-with-assoc-const.rs index fac727d2d7dc9..6b4722d349e3b 100644 --- a/tests/ui/consts/issue-58435-ice-with-assoc-const.rs +++ b/tests/ui/consts/issue-58435-ice-with-assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The const-evaluator was at one point ICE'ing while trying to // evaluate the body of `fn id` during the `s.id()` call in main. diff --git a/tests/ui/consts/issue-62045.rs b/tests/ui/consts/issue-62045.rs index 5abed374a6d61..5dac2a18b7bbd 100644 --- a/tests/ui/consts/issue-62045.rs +++ b/tests/ui/consts/issue-62045.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { assert_eq!(&mut [0; 1][..], &mut []); diff --git a/tests/ui/consts/issue-63226.rs b/tests/ui/consts/issue-63226.rs index deec44990086f..f8ceab339255a 100644 --- a/tests/ui/consts/issue-63226.rs +++ b/tests/ui/consts/issue-63226.rs @@ -1,7 +1,7 @@ -// aux-build:issue-63226.rs -// compile-flags:--extern issue_63226 -// edition:2018 -// build-pass +//@ aux-build:issue-63226.rs +//@ compile-flags:--extern issue_63226 +//@ edition:2018 +//@ build-pass // A regression test for issue #63226. // Checks if `const fn` is marked as reachable. diff --git a/tests/ui/consts/issue-63952.rs b/tests/ui/consts/issue-63952.rs index 5c83e6f45c9ba..aee06f8eb0428 100644 --- a/tests/ui/consts/issue-63952.rs +++ b/tests/ui/consts/issue-63952.rs @@ -1,5 +1,5 @@ // Regression test for #63952, shouldn't hang. -// stderr-per-bitwidth +//@ stderr-per-bitwidth #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/consts/issue-64059.rs b/tests/ui/consts/issue-64059.rs index 02c8b7250324d..8bb2d0fe05a2c 100644 --- a/tests/ui/consts/issue-64059.rs +++ b/tests/ui/consts/issue-64059.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// run-pass +//@ run-pass fn main() { let _ = -(-0.0); diff --git a/tests/ui/consts/issue-64506.rs b/tests/ui/consts/issue-64506.rs index 9275a8a072dde..096d29cbe499c 100644 --- a/tests/ui/consts/issue-64506.rs +++ b/tests/ui/consts/issue-64506.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[derive(Copy, Clone)] pub struct ChildStdin { diff --git a/tests/ui/consts/issue-65348.rs b/tests/ui/consts/issue-65348.rs index 01bf2a3fa4287..1443fcbe1c1ce 100644 --- a/tests/ui/consts/issue-65348.rs +++ b/tests/ui/consts/issue-65348.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Generic(T); diff --git a/tests/ui/consts/issue-66342.rs b/tests/ui/consts/issue-66342.rs index 417f69041658d..0a87f789e4886 100644 --- a/tests/ui/consts/issue-66342.rs +++ b/tests/ui/consts/issue-66342.rs @@ -1,5 +1,5 @@ -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 // Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. diff --git a/tests/ui/consts/issue-66345.rs b/tests/ui/consts/issue-66345.rs index 4971d96476f43..a69ce7f191ad6 100644 --- a/tests/ui/consts/issue-66345.rs +++ b/tests/ui/consts/issue-66345.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=4 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=4 // Checks that the compiler does not ICE when passing references to field of by-value struct // with -Z mir-opt-level=4 diff --git a/tests/ui/consts/issue-66397.rs b/tests/ui/consts/issue-66397.rs index 1b4aff43b5bf1..f6c8854dc788c 100644 --- a/tests/ui/consts/issue-66397.rs +++ b/tests/ui/consts/issue-66397.rs @@ -1,5 +1,5 @@ -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 // Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. diff --git a/tests/ui/consts/issue-66787.rs b/tests/ui/consts/issue-66787.rs index 612b795eb5cd0..142c5f65a4e36 100644 --- a/tests/ui/consts/issue-66787.rs +++ b/tests/ui/consts/issue-66787.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type lib +//@ build-pass +//@ compile-flags: --crate-type lib // Regression test for ICE which occurred when const propagating an enum with three variants // one of which is uninhabited. diff --git a/tests/ui/consts/issue-67529.rs b/tests/ui/consts/issue-67529.rs index dd24c2d27e27a..39fca4112017a 100644 --- a/tests/ui/consts/issue-67529.rs +++ b/tests/ui/consts/issue-67529.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass struct Baz { a: T diff --git a/tests/ui/consts/issue-67640.rs b/tests/ui/consts/issue-67640.rs index 4c71a2e022446..e5b0a56393536 100644 --- a/tests/ui/consts/issue-67640.rs +++ b/tests/ui/consts/issue-67640.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=4 -// run-pass +//@ compile-flags: -Z mir-opt-level=4 +//@ run-pass struct X { x: isize diff --git a/tests/ui/consts/issue-67641.rs b/tests/ui/consts/issue-67641.rs index e5a74f15654c4..4a211bb29212b 100644 --- a/tests/ui/consts/issue-67641.rs +++ b/tests/ui/consts/issue-67641.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/issue-67696-const-prop-ice.rs b/tests/ui/consts/issue-67696-const-prop-ice.rs index 858035190ca21..09e5ba74c338a 100644 --- a/tests/ui/consts/issue-67696-const-prop-ice.rs +++ b/tests/ui/consts/issue-67696-const-prop-ice.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link -Zmir-opt-level=4 +//@ check-pass +//@ compile-flags: --emit=mir,link -Zmir-opt-level=4 // Checks that we don't ICE due to attempting to run const prop // on a function with unsatisifable 'where' clauses diff --git a/tests/ui/consts/issue-67862.rs b/tests/ui/consts/issue-67862.rs index b9e96a87f1472..cac617fbd5475 100644 --- a/tests/ui/consts/issue-67862.rs +++ b/tests/ui/consts/issue-67862.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass fn e220() -> (i64, i64) { #[inline(never)] diff --git a/tests/ui/consts/issue-68264-overflow.rs b/tests/ui/consts/issue-68264-overflow.rs index 8f21e0648d4c7..6a1d57ea67fed 100644 --- a/tests/ui/consts/issue-68264-overflow.rs +++ b/tests/ui/consts/issue-68264-overflow.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for issue #68264 // Checks that we don't encounter overflow // when running const-prop on functions with diff --git a/tests/ui/consts/issue-68684.rs b/tests/ui/consts/issue-68684.rs index c98f199b60e49..d2ba405d669f9 100644 --- a/tests/ui/consts/issue-68684.rs +++ b/tests/ui/consts/issue-68684.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum _Enum { A(), diff --git a/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs b/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs index 5b7c7be42cf06..e29e1e2b19cf4 100644 --- a/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs +++ b/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // // (this is deliberately *not* check-pass; I have confirmed that the bug in // question does not replicate when one uses `cargo check` alone.) diff --git a/tests/ui/consts/issue-69312.rs b/tests/ui/consts/issue-69312.rs index 413c67520798f..1c0dc1f87ea1d 100644 --- a/tests/ui/consts/issue-69312.rs +++ b/tests/ui/consts/issue-69312.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Verify that the compiler doesn't ICE during const prop while evaluating the index operation. diff --git a/tests/ui/consts/issue-69488.rs b/tests/ui/consts/issue-69488.rs index 46546eada7aac..35071999111f5 100644 --- a/tests/ui/consts/issue-69488.rs +++ b/tests/ui/consts/issue-69488.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_ptr_write)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/issue-69532.rs b/tests/ui/consts/issue-69532.rs index 0a89178129976..285cfe7213bae 100644 --- a/tests/ui/consts/issue-69532.rs +++ b/tests/ui/consts/issue-69532.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn make_nans() -> (f64, f64, f32, f32) { let nan1: f64 = unsafe { std::mem::transmute(0x7FF0_0001_0000_0001u64) }; diff --git a/tests/ui/consts/issue-6991.rs b/tests/ui/consts/issue-6991.rs index f00cd9aeffd7c..3e4a8b09f8957 100644 --- a/tests/ui/consts/issue-6991.rs +++ b/tests/ui/consts/issue-6991.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] 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 f82ec005a01e1..97462a705d5d9 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 +//@ run-pass const HASH_LEN: usize = 20; struct Hash(#[allow(dead_code)] [u8; HASH_LEN]); diff --git a/tests/ui/consts/issue-73976-monomorphic.rs b/tests/ui/consts/issue-73976-monomorphic.rs index a3b9510036d0f..561c197605117 100644 --- a/tests/ui/consts/issue-73976-monomorphic.rs +++ b/tests/ui/consts/issue-73976-monomorphic.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // // This test is complement to the test in issue-73976-polymorphic.rs. // In that test we ensure that polymorphic use of type_id and type_name in patterns diff --git a/tests/ui/consts/issue-77062-large-zst-array.rs b/tests/ui/consts/issue-77062-large-zst-array.rs index 0566b802e75b6..ef5178fba9515 100644 --- a/tests/ui/consts/issue-77062-large-zst-array.rs +++ b/tests/ui/consts/issue-77062-large-zst-array.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let _ = &[(); usize::MAX]; diff --git a/tests/ui/consts/issue-79137-monomorphic.rs b/tests/ui/consts/issue-79137-monomorphic.rs index 58e0c387ffb9c..d98982b4af630 100644 --- a/tests/ui/consts/issue-79137-monomorphic.rs +++ b/tests/ui/consts/issue-79137-monomorphic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Verify that variant count intrinsic can still evaluate for types like `Option`. diff --git a/tests/ui/consts/issue-79152-const-array-index.rs b/tests/ui/consts/issue-79152-const-array-index.rs index 95518e1bbdbd9..f5471fb748218 100644 --- a/tests/ui/consts/issue-79152-const-array-index.rs +++ b/tests/ui/consts/issue-79152-const-array-index.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #79152 // // Tests that we can index an array in a const function diff --git a/tests/ui/consts/issue-79690.rs b/tests/ui/consts/issue-79690.rs index 56747bf5a1107..3da4cb73f1196 100644 --- a/tests/ui/consts/issue-79690.rs +++ b/tests/ui/consts/issue-79690.rs @@ -1,6 +1,6 @@ -// ignore-32bit +//@ ignore-32bit // This test gives a different error on 32-bit architectures. -// stderr-per-bitwidth +//@ stderr-per-bitwidth union Transmute { t: T, diff --git a/tests/ui/consts/issue-88071.rs b/tests/ui/consts/issue-88071.rs index f58cdb5945e53..327daad9b323a 100644 --- a/tests/ui/consts/issue-88071.rs +++ b/tests/ui/consts/issue-88071.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // regression test for #88071 diff --git a/tests/ui/consts/issue-88649.rs b/tests/ui/consts/issue-88649.rs index 43e562b5a7da4..739b97ff708b5 100644 --- a/tests/ui/consts/issue-88649.rs +++ b/tests/ui/consts/issue-88649.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] enum Foo { diff --git a/tests/ui/consts/issue-89088.rs b/tests/ui/consts/issue-89088.rs index 40cc665fb612b..d0782963dfc87 100644 --- a/tests/ui/consts/issue-89088.rs +++ b/tests/ui/consts/issue-89088.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #89088. -// check-pass +//@ check-pass #![allow(indirect_structural_match)] use std::borrow::Cow; diff --git a/tests/ui/consts/issue-90762.rs b/tests/ui/consts/issue-90762.rs index 78d387386f895..db40e50d4995f 100644 --- a/tests/ui/consts/issue-90762.rs +++ b/tests/ui/consts/issue-90762.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] use std::sync::atomic::{AtomicBool, Ordering, AtomicUsize}; diff --git a/tests/ui/consts/issue-90870.fixed b/tests/ui/consts/issue-90870.fixed index df44689efed77..c125501f61c5f 100644 --- a/tests/ui/consts/issue-90870.fixed +++ b/tests/ui/consts/issue-90870.fixed @@ -1,6 +1,6 @@ // Regression test for issue #90870. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/consts/issue-90870.rs b/tests/ui/consts/issue-90870.rs index 676ac73c64d93..94254fb27f927 100644 --- a/tests/ui/consts/issue-90870.rs +++ b/tests/ui/consts/issue-90870.rs @@ -1,6 +1,6 @@ // Regression test for issue #90870. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/consts/issue-91560.fixed b/tests/ui/consts/issue-91560.fixed index 41b9d95734a8d..b975e6ee958d5 100644 --- a/tests/ui/consts/issue-91560.fixed +++ b/tests/ui/consts/issue-91560.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91560. -// run-rustfix +//@ run-rustfix #![allow(unused,non_upper_case_globals)] diff --git a/tests/ui/consts/issue-91560.rs b/tests/ui/consts/issue-91560.rs index 04592feb50541..5e7e1cbe1e5ac 100644 --- a/tests/ui/consts/issue-91560.rs +++ b/tests/ui/consts/issue-91560.rs @@ -1,6 +1,6 @@ // Regression test for issue #91560. -// run-rustfix +//@ run-rustfix #![allow(unused,non_upper_case_globals)] diff --git a/tests/ui/consts/issue-94371.rs b/tests/ui/consts/issue-94371.rs index de9ff730b66f3..3484437e57173 100644 --- a/tests/ui/consts/issue-94371.rs +++ b/tests/ui/consts/issue-94371.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_swap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/issue-94675.rs b/tests/ui/consts/issue-94675.rs index 2358175fe9282..00f5c3251e0a9 100644 --- a/tests/ui/consts/issue-94675.rs +++ b/tests/ui/consts/issue-94675.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(const_trait_impl, const_mut_refs)] diff --git a/tests/ui/consts/issue-96169.rs b/tests/ui/consts/issue-96169.rs index 14c0a1399a00e..24131f7f6ac36 100644 --- a/tests/ui/consts/issue-96169.rs +++ b/tests/ui/consts/issue-96169.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zmir-opt-level=4 --emit=mir +//@ check-pass +//@ compile-flags: -Zmir-opt-level=4 --emit=mir #![allow(unused)] fn a() -> usize { 0 } diff --git a/tests/ui/consts/issue-broken-mir.rs b/tests/ui/consts/issue-broken-mir.rs index 36f0ff92104e1..25219f4c33529 100644 --- a/tests/ui/consts/issue-broken-mir.rs +++ b/tests/ui/consts/issue-broken-mir.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/27918 diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs index 3798332dfd788..a66cb6b66651f 100644 --- a/tests/ui/consts/issue-miri-1910.rs +++ b/tests/ui/consts/issue-miri-1910.rs @@ -1,5 +1,5 @@ -// error-pattern unable to turn pointer into raw bytes -// normalize-stderr-test: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" +//@ error-pattern unable to turn pointer into raw bytes +//@ normalize-stderr-test: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" const C: () = unsafe { let foo = Some(&42 as *const i32); diff --git a/tests/ui/consts/large_const_alloc.rs b/tests/ui/consts/large_const_alloc.rs index 298ed38d180e6..61a22216ae526 100644 --- a/tests/ui/consts/large_const_alloc.rs +++ b/tests/ui/consts/large_const_alloc.rs @@ -1,4 +1,4 @@ -// only-64bit +//@ only-64bit // on 32bit and 16bit platforms it is plausible that the maximum allocation size will succeed const FOO: () = { diff --git a/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs b/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs index 7da6b7ca285c1..e0d1d515deb02 100644 --- a/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs +++ b/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(never_type)] #[derive(Copy, Clone)] pub enum E { A(!), } diff --git a/tests/ui/consts/locals-in-const-fn.rs b/tests/ui/consts/locals-in-const-fn.rs index 95d50171a847b..98f230320f62c 100644 --- a/tests/ui/consts/locals-in-const-fn.rs +++ b/tests/ui/consts/locals-in-const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/48821 diff --git a/tests/ui/consts/match-const-fn-structs.rs b/tests/ui/consts/match-const-fn-structs.rs index 5a68048c47725..49bb15977b857 100644 --- a/tests/ui/consts/match-const-fn-structs.rs +++ b/tests/ui/consts/match-const-fn-structs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // https://github.com/rust-lang/rust/issues/46114 diff --git a/tests/ui/consts/min_const_fn/address_of_const.rs b/tests/ui/consts/min_const_fn/address_of_const.rs index 3db19e9cde8f0..4280d0745c1ab 100644 --- a/tests/ui/consts/min_const_fn/address_of_const.rs +++ b/tests/ui/consts/min_const_fn/address_of_const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] 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 2dbc424d3ba2d..a97eeadd92f4e 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 +//@ run-pass #![feature(rustc_allow_const_fn_unstable)] #![feature(rustc_attrs, staged_api)] diff --git a/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs b/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs index d221157556085..8928ad44a70cd 100644 --- a/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs +++ b/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr; diff --git a/tests/ui/consts/min_const_fn/cast_fn.rs b/tests/ui/consts/min_const_fn/cast_fn.rs index 85802a51490f2..8c0a109781f6f 100644 --- a/tests/ui/consts/min_const_fn/cast_fn.rs +++ b/tests/ui/consts/min_const_fn/cast_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs b/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs index 36c8880093ec3..8335375dcfc9b 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct HasDyn { field: &'static dyn std::fmt::Debug, diff --git a/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs b/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs index cb8f74186bd74..14a995aca31bc 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) use std::cell::UnsafeCell; use std::sync::atomic::AtomicU32; diff --git a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs index 02c7970deca64..06e7d6f5d70f3 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const unsafe fn ret_i32_no_unsafe() -> i32 { 42 } const unsafe fn ret_null_ptr_no_unsafe() -> *const T { std::ptr::null() } diff --git a/tests/ui/consts/miri_unleashed/abi-mismatch.rs b/tests/ui/consts/miri_unleashed/abi-mismatch.rs index 205f7183b75e9..57680479a1796 100644 --- a/tests/ui/consts/miri_unleashed/abi-mismatch.rs +++ b/tests/ui/consts/miri_unleashed/abi-mismatch.rs @@ -1,5 +1,5 @@ // Checks that we report ABI mismatches for "const extern fn" -// compile-flags: -Z unleash-the-miri-inside-of-you +//@ compile-flags: -Z unleash-the-miri-inside-of-you #![feature(const_extern_fn)] diff --git a/tests/ui/consts/miri_unleashed/assoc_const.rs b/tests/ui/consts/miri_unleashed/assoc_const.rs index 7bb0c1b772ad1..db37197f19026 100644 --- a/tests/ui/consts/miri_unleashed/assoc_const.rs +++ b/tests/ui/consts/miri_unleashed/assoc_const.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ build-fail +//@ compile-flags: -Zunleash-the-miri-inside-of-you // a test demonstrating why we do need to run static const qualification on associated constants // instead of just checking the final constant diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.rs b/tests/ui/consts/miri_unleashed/assoc_const_2.rs index aad5b34606ee3..5490c0963915b 100644 --- a/tests/ui/consts/miri_unleashed/assoc_const_2.rs +++ b/tests/ui/consts/miri_unleashed/assoc_const_2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // a test demonstrating that const qualification cannot prevent monomorphization time errors diff --git a/tests/ui/consts/miri_unleashed/box.rs b/tests/ui/consts/miri_unleashed/box.rs index 39cddda2b8040..89df4526b0770 100644 --- a/tests/ui/consts/miri_unleashed/box.rs +++ b/tests/ui/consts/miri_unleashed/box.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you use std::mem::ManuallyDrop; diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr deleted file mode 100644 index 989d3c75cd684..0000000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr +++ /dev/null @@ -1,65 +0,0 @@ -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:14:14 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ constant accesses mutable global memory - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static.rs:21:1 - | -LL | const REF_INTERIOR_MUT: &usize = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^ -help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:14:17 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:24:18 - | -LL | unsafe { &*(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:29:25 - | -LL | const REF_IMMUT: &u8 = &MY_STATIC; - | ^^^^^^^^^ - -error: aborting due to 4 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs index f8d956b3dd86e..31f89030bb345 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs @@ -1,5 +1,6 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr similarity index 78% rename from tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr rename to tests/ui/consts/miri_unleashed/const_refers_to_static.stderr index 9e76b87385844..df910546d11ad 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr @@ -1,61 +1,61 @@ error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:9:5 + --> $DIR/const_refers_to_static.rs:10:5 | LL | FOO.fetch_add(1, Ordering::Relaxed) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:14:14 + --> $DIR/const_refers_to_static.rs:15:14 | LL | unsafe { *(&FOO as *const _ as *const usize) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:18:32 + --> $DIR/const_refers_to_static.rs:19:32 | LL | const READ_MUT: u32 = unsafe { MUTABLE }; | ^^^^^^^ constant accesses mutable global memory error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static.rs:21:1 + --> $DIR/const_refers_to_static.rs:22:1 | LL | const REF_INTERIOR_MUT: &usize = { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP } warning: skipping const checks | help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:9:5 + --> $DIR/const_refers_to_static.rs:10:5 | LL | FOO.fetch_add(1, Ordering::Relaxed) | ^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static.rs:9:5 + --> $DIR/const_refers_to_static.rs:10:5 | LL | FOO.fetch_add(1, Ordering::Relaxed) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:14:17 + --> $DIR/const_refers_to_static.rs:15:17 | LL | unsafe { *(&FOO as *const _ as *const usize) } | ^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:18:32 + --> $DIR/const_refers_to_static.rs:19:32 | LL | const READ_MUT: u32 = unsafe { MUTABLE }; | ^^^^^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:24:18 + --> $DIR/const_refers_to_static.rs:25:18 | LL | unsafe { &*(&FOO as *const _ as *const usize) } | ^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:29:25 + --> $DIR/const_refers_to_static.rs:30:25 | LL | const REF_IMMUT: &u8 = &MY_STATIC; | ^^^^^^^^^ diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr deleted file mode 100644 index 200faf3558762..0000000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr +++ /dev/null @@ -1,89 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:11:1 - | -LL | const SLICE_MUT: &[u8; 1] = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:39:9 - | -LL | SLICE_MUT => true, - | ^^^^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:16:1 - | -LL | const U8_MUT: &u8 = { - | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:47:9 - | -LL | U8_MUT => true, - | ^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:22:1 - | -LL | const U8_MUT2: &u8 = { - | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:57:9 - | -LL | U8_MUT2 => true, - | ^^^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:64:9 - | -LL | U8_MUT3 => true, - | ^^^^^^^ - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:13:15 - | -LL | unsafe { &static_cross_crate::ZERO } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:18:15 - | -LL | unsafe { &static_cross_crate::ZERO[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:24:17 - | -LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 8 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs index bcd29f8b03441..6ec44aab2c1b5 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs @@ -1,6 +1,7 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// aux-build:static_cross_crate.rs -// stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ aux-build:static_cross_crate.rs +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(exclusive_range_pattern, half_open_range_patterns_in_slices)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr similarity index 70% rename from tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr rename to tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr index db7e8b6847a73..7b22fa4399fcd 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr @@ -1,62 +1,62 @@ error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:11:1 + --> $DIR/const_refers_to_static_cross_crate.rs:12:1 | LL | const SLICE_MUT: &[u8; 1] = { | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP } error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:39:9 + --> $DIR/const_refers_to_static_cross_crate.rs:40:9 | LL | SLICE_MUT => true, | ^^^^^^^^^ error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:16:1 + --> $DIR/const_refers_to_static_cross_crate.rs:17:1 | LL | const U8_MUT: &u8 = { | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP } error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:47:9 + --> $DIR/const_refers_to_static_cross_crate.rs:48:9 | LL | U8_MUT => true, | ^^^^^^ error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:22:1 + --> $DIR/const_refers_to_static_cross_crate.rs:23:1 | LL | const U8_MUT2: &u8 = { | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP } error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:57:9 + --> $DIR/const_refers_to_static_cross_crate.rs:58:9 | LL | U8_MUT2 => true, | ^^^^^^^ error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 + --> $DIR/const_refers_to_static_cross_crate.rs:29:15 | LL | match static_cross_crate::OPT_ZERO { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:64:9 + --> $DIR/const_refers_to_static_cross_crate.rs:65:9 | LL | U8_MUT3 => true, | ^^^^^^^ @@ -64,22 +64,22 @@ LL | U8_MUT3 => true, warning: skipping const checks | help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:13:15 + --> $DIR/const_refers_to_static_cross_crate.rs:14:15 | LL | unsafe { &static_cross_crate::ZERO } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:18:15 + --> $DIR/const_refers_to_static_cross_crate.rs:19:15 | LL | unsafe { &static_cross_crate::ZERO[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:24:17 + --> $DIR/const_refers_to_static_cross_crate.rs:25:17 | LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 + --> $DIR/const_refers_to_static_cross_crate.rs:29:15 | LL | match static_cross_crate::OPT_ZERO { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/consts/miri_unleashed/drop.rs b/tests/ui/consts/miri_unleashed/drop.rs index 3942e7ef73433..45ade4906b82f 100644 --- a/tests/ui/consts/miri_unleashed/drop.rs +++ b/tests/ui/consts/miri_unleashed/drop.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// error-pattern: calling non-const function ` as Drop>::drop` +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ error-pattern: calling non-const function ` as Drop>::drop` use std::mem::ManuallyDrop; diff --git a/tests/ui/consts/miri_unleashed/extern-static.rs b/tests/ui/consts/miri_unleashed/extern-static.rs index 81176b3d4e997..1a523cc8e3128 100644 --- a/tests/ui/consts/miri_unleashed/extern-static.rs +++ b/tests/ui/consts/miri_unleashed/extern-static.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(thread_local)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/miri_unleashed/inline_asm.rs b/tests/ui/consts/miri_unleashed/inline_asm.rs index 6fd52ceb24ca6..8627a6bf8870a 100644 --- a/tests/ui/consts/miri_unleashed/inline_asm.rs +++ b/tests/ui/consts/miri_unleashed/inline_asm.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// only-x86_64 +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/consts/miri_unleashed/mutable_references.rs b/tests/ui/consts/miri_unleashed/mutable_references.rs index 4e996464705f8..a361c504b5e2d 100644 --- a/tests/ui/consts/miri_unleashed/mutable_references.rs +++ b/tests/ui/consts/miri_unleashed/mutable_references.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you use std::cell::UnsafeCell; diff --git a/tests/ui/consts/miri_unleashed/mutable_references_err.rs b/tests/ui/consts/miri_unleashed/mutable_references_err.rs index 43b65f459a1eb..2075adad6f706 100644 --- a/tests/ui/consts/miri_unleashed/mutable_references_err.rs +++ b/tests/ui/consts/miri_unleashed/mutable_references_err.rs @@ -1,5 +1,5 @@ -// stderr-per-bitwidth -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![allow(invalid_reference_casting, static_mut_ref)] use std::sync::atomic::*; diff --git a/tests/ui/consts/miri_unleashed/mutating_global.rs b/tests/ui/consts/miri_unleashed/mutating_global.rs index 231f4af0a2045..777813603742e 100644 --- a/tests/ui/consts/miri_unleashed/mutating_global.rs +++ b/tests/ui/consts/miri_unleashed/mutating_global.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // Make sure we cannot mutate globals. diff --git a/tests/ui/consts/miri_unleashed/non_const_fn.rs b/tests/ui/consts/miri_unleashed/non_const_fn.rs index 44ab60dcabca6..d3ffb61af1185 100644 --- a/tests/ui/consts/miri_unleashed/non_const_fn.rs +++ b/tests/ui/consts/miri_unleashed/non_const_fn.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // A test demonstrating that we prevent calling non-const fn during CTFE. diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.rs b/tests/ui/consts/miri_unleashed/ptr_arith.rs index e59c67252693f..6dd8ab11e7cff 100644 --- a/tests/ui/consts/miri_unleashed/ptr_arith.rs +++ b/tests/ui/consts/miri_unleashed/ptr_arith.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // During CTFE, we prevent pointer-to-int casts. // Pointer comparisons are prevented in the trait system. diff --git a/tests/ui/consts/miri_unleashed/slice_eq.rs b/tests/ui/consts/miri_unleashed/slice_eq.rs index 83e10bf1213ea..7f07823bdc640 100644 --- a/tests/ui/consts/miri_unleashed/slice_eq.rs +++ b/tests/ui/consts/miri_unleashed/slice_eq.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass #![feature(const_raw_ptr_comparison)] diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs index a4033eb56834e..4219f6fa683b6 100644 --- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs +++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs @@ -1,5 +1,5 @@ -// stderr-per-bitwidth -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(const_refs_to_cell, const_mut_refs)] // All "inner" allocations that come with a `static` are interned immutably. This means it is // crucial that we do not accept any form of (interior) mutability there. diff --git a/tests/ui/consts/miri_unleashed/tls.rs b/tests/ui/consts/miri_unleashed/tls.rs index 7319a5135d3a1..b0c6c088361ce 100644 --- a/tests/ui/consts/miri_unleashed/tls.rs +++ b/tests/ui/consts/miri_unleashed/tls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(thread_local)] use std::thread; diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs index 1ac3777f5feb9..d45deee18fa80 100644 --- a/tests/ui/consts/missing_span_in_backtrace.rs +++ b/tests/ui/consts/missing_span_in_backtrace.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no #![feature(const_swap)] diff --git a/tests/ui/consts/mozjs-error.rs b/tests/ui/consts/mozjs-error.rs index 7edcadbf2cbf8..4f07cf3e35c54 100644 --- a/tests/ui/consts/mozjs-error.rs +++ b/tests/ui/consts/mozjs-error.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/non-scalar-cast.rs b/tests/ui/consts/non-scalar-cast.rs index 671366c90ec8e..fa0f63d8aca84 100644 --- a/tests/ui/consts/non-scalar-cast.rs +++ b/tests/ui/consts/non-scalar-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/37448 diff --git a/tests/ui/consts/non-sync-references-in-const.rs b/tests/ui/consts/non-sync-references-in-const.rs index 0f668b8d46903..3a8738501ec3d 100644 --- a/tests/ui/consts/non-sync-references-in-const.rs +++ b/tests/ui/consts/non-sync-references-in-const.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #49206 +//@ check-pass +//@ known-bug: #49206 // Should fail. Compiles and prints 2 identical addresses, which shows 2 threads // with the same `'static` reference to non-`Sync` struct. The problem is that diff --git a/tests/ui/consts/offset.rs b/tests/ui/consts/offset.rs index b2c663fe617a4..2b1db34928590 100644 --- a/tests/ui/consts/offset.rs +++ b/tests/ui/consts/offset.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr; #[repr(C)] diff --git a/tests/ui/consts/offset_from.rs b/tests/ui/consts/offset_from.rs index 465147041d966..7737b5ab0b8a6 100644 --- a/tests/ui/consts/offset_from.rs +++ b/tests/ui/consts/offset_from.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_ptr_sub_ptr)] #![feature(ptr_sub_ptr)] diff --git a/tests/ui/consts/offset_ub.rs b/tests/ui/consts/offset_ub.rs index db28a6c6a2b4b..920ecb687cf5c 100644 --- a/tests/ui/consts/offset_ub.rs +++ b/tests/ui/consts/offset_ub.rs @@ -1,7 +1,7 @@ use std::ptr; -// normalize-stderr-test "0x7f+" -> "0x7f..f" +//@ normalize-stderr-test "0x7f+" -> "0x7f..f" pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~NOTE diff --git a/tests/ui/consts/packed_pattern.rs b/tests/ui/consts/packed_pattern.rs index 370fec6fbd4be..11feca59bb531 100644 --- a/tests/ui/consts/packed_pattern.rs +++ b/tests/ui/consts/packed_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/packed_pattern2.rs b/tests/ui/consts/packed_pattern2.rs index ef68d9e513aae..09f47a0c4396f 100644 --- a/tests/ui/consts/packed_pattern2.rs +++ b/tests/ui/consts/packed_pattern2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/precise-drop-with-coverage.rs b/tests/ui/consts/precise-drop-with-coverage.rs index 275cb38693f0e..01618dbb779e4 100644 --- a/tests/ui/consts/precise-drop-with-coverage.rs +++ b/tests/ui/consts/precise-drop-with-coverage.rs @@ -1,8 +1,8 @@ // Checks that code coverage doesn't interfere with const_precise_live_drops. // Regression test for issue #93848. // -// check-pass -// compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime +//@ check-pass +//@ compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/precise-drop-with-promoted.rs b/tests/ui/consts/precise-drop-with-promoted.rs index 7cbe3c4e41562..633df2b206791 100644 --- a/tests/ui/consts/precise-drop-with-promoted.rs +++ b/tests/ui/consts/precise-drop-with-promoted.rs @@ -1,6 +1,6 @@ // Regression test for issue #89938. -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/promote_borrowed_field.rs b/tests/ui/consts/promote_borrowed_field.rs index c4841b46f60d9..1d3b4857b4c76 100644 --- a/tests/ui/consts/promote_borrowed_field.rs +++ b/tests/ui/consts/promote_borrowed_field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // From https://github.com/rust-lang/rust/issues/65727 diff --git a/tests/ui/consts/promote_evaluation_unused_result.rs b/tests/ui/consts/promote_evaluation_unused_result.rs index 4eda785bb8989..947965ad50c8b 100644 --- a/tests/ui/consts/promote_evaluation_unused_result.rs +++ b/tests/ui/consts/promote_evaluation_unused_result.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/tests/ui/consts/promote_fn_calls.rs b/tests/ui/consts/promote_fn_calls.rs index 8995aaacd8549..52a421ead7024 100644 --- a/tests/ui/consts/promote_fn_calls.rs +++ b/tests/ui/consts/promote_fn_calls.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:promotable_const_fn_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:promotable_const_fn_lib.rs extern crate promotable_const_fn_lib; diff --git a/tests/ui/consts/promote_fn_calls_std.rs b/tests/ui/consts/promote_fn_calls_std.rs index 557f6a434f4cd..ec8e9143af1dc 100644 --- a/tests/ui/consts/promote_fn_calls_std.rs +++ b/tests/ui/consts/promote_fn_calls_std.rs @@ -1,5 +1,5 @@ #![allow(deprecated, deprecated_in_future)] // can be removed if different fns are chosen -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let x: &'static u8 = &u8::max_value(); diff --git a/tests/ui/consts/promoted-storage.rs b/tests/ui/consts/promoted-storage.rs index 52ef685e8f4f8..6f2cd6cc3d634 100644 --- a/tests/ui/consts/promoted-storage.rs +++ b/tests/ui/consts/promoted-storage.rs @@ -1,5 +1,5 @@ // Check that storage statements reset local qualification. -// check-pass +//@ check-pass use std::cell::Cell; const C: Option> = { diff --git a/tests/ui/consts/promoted-validation-55454.rs b/tests/ui/consts/promoted-validation-55454.rs index 23cae4fb57d57..67bbf3fce6163 100644 --- a/tests/ui/consts/promoted-validation-55454.rs +++ b/tests/ui/consts/promoted-validation-55454.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq)] struct This(T); diff --git a/tests/ui/consts/promoted_const_call.rs b/tests/ui/consts/promoted_const_call.rs index d6e48266fd30d..deaa053c4156b 100644 --- a/tests/ui/consts/promoted_const_call.rs +++ b/tests/ui/consts/promoted_const_call.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(const_mut_refs)] #![feature(const_trait_impl)] diff --git a/tests/ui/consts/promoted_const_call4.rs b/tests/ui/consts/promoted_const_call4.rs index bb97957179f00..7a65ad86a9adb 100644 --- a/tests/ui/consts/promoted_const_call4.rs +++ b/tests/ui/consts/promoted_const_call4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::*; diff --git a/tests/ui/consts/promoted_regression.rs b/tests/ui/consts/promoted_regression.rs index d57036ae58f35..26ce7321eb6a8 100644 --- a/tests/ui/consts/promoted_regression.rs +++ b/tests/ui/consts/promoted_regression.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let _ = &[("", ""); 3]; diff --git a/tests/ui/consts/promotion-mutable-ref.rs b/tests/ui/consts/promotion-mutable-ref.rs index d103c5a9d236a..0bca8a8dca42f 100644 --- a/tests/ui/consts/promotion-mutable-ref.rs +++ b/tests/ui/consts/promotion-mutable-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] static mut TEST: i32 = { diff --git a/tests/ui/consts/promotion.rs b/tests/ui/consts/promotion.rs index e379e3aea13d4..783ca47d2c62e 100644 --- a/tests/ui/consts/promotion.rs +++ b/tests/ui/consts/promotion.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass +//@ build-pass const fn assert_static(_: &'static T) {} diff --git a/tests/ui/consts/ptr_comparisons.rs b/tests/ui/consts/ptr_comparisons.rs index a5b6cd9d2d4c1..e142ab3a754a4 100644 --- a/tests/ui/consts/ptr_comparisons.rs +++ b/tests/ui/consts/ptr_comparisons.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature( core_intrinsics, diff --git a/tests/ui/consts/ptr_is_null.rs b/tests/ui/consts/ptr_is_null.rs index 43b9767db1645..bbf1380231295 100644 --- a/tests/ui/consts/ptr_is_null.rs +++ b/tests/ui/consts/ptr_is_null.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(const_ptr_is_null)] #![allow(useless_ptr_null_checks)] diff --git a/tests/ui/consts/qualif-indirect-mutation-fail.rs b/tests/ui/consts/qualif-indirect-mutation-fail.rs index a6d2934044ac7..420e32128a4b9 100644 --- a/tests/ui/consts/qualif-indirect-mutation-fail.rs +++ b/tests/ui/consts/qualif-indirect-mutation-fail.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![feature(const_mut_refs)] #![feature(const_precise_live_drops)] #![feature(const_swap)] diff --git a/tests/ui/consts/qualif-indirect-mutation-pass.rs b/tests/ui/consts/qualif-indirect-mutation-pass.rs index 06af6a03b8f60..9d5f0d4306d72 100644 --- a/tests/ui/consts/qualif-indirect-mutation-pass.rs +++ b/tests/ui/consts/qualif-indirect-mutation-pass.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(const_mut_refs)] #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/raw-ptr-const.rs b/tests/ui/consts/raw-ptr-const.rs index 24a77db9ffc5d..2946c9b4a8e9c 100644 --- a/tests/ui/consts/raw-ptr-const.rs +++ b/tests/ui/consts/raw-ptr-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is a regression test for a `span_delayed_bug` during interning when a constant // evaluates to a (non-dangling) raw pointer. diff --git a/tests/ui/consts/raw_pointer_promoted.rs b/tests/ui/consts/raw_pointer_promoted.rs index 4c62ad444a512..9bffd79709f9c 100644 --- a/tests/ui/consts/raw_pointer_promoted.rs +++ b/tests/ui/consts/raw_pointer_promoted.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub const FOO: &'static *const i32 = &(&0 as _); diff --git a/tests/ui/consts/recursive-zst-static.rs b/tests/ui/consts/recursive-zst-static.rs index 9311490020d2d..53d32254a6843 100644 --- a/tests/ui/consts/recursive-zst-static.rs +++ b/tests/ui/consts/recursive-zst-static.rs @@ -1,5 +1,5 @@ -// revisions: default unleash -//[unleash]compile-flags: -Zunleash-the-miri-inside-of-you +//@ revisions: default unleash +//@[unleash]compile-flags: -Zunleash-the-miri-inside-of-you // This test ensures that we do not allow ZST statics to initialize themselves without ever // actually creating a value of that type. This is important, as the ZST may have private fields diff --git a/tests/ui/consts/references.rs b/tests/ui/consts/references.rs index d0af47a8ea85e..469e4f385ba73 100644 --- a/tests/ui/consts/references.rs +++ b/tests/ui/consts/references.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: &[u8] = b"foo"; const BAR: &[u8] = &[1, 2, 3]; diff --git a/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs b/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs index 6ce9da4366800..446fdc7551483 100644 --- a/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs +++ b/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/consts/repeat_match.rs b/tests/ui/consts/repeat_match.rs index 20983184a473a..e297ce01a8826 100644 --- a/tests/ui/consts/repeat_match.rs +++ b/tests/ui/consts/repeat_match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/45044 diff --git a/tests/ui/consts/return-in-const-fn.rs b/tests/ui/consts/return-in-const-fn.rs index 077a33c081ba8..16e6ca7df8ae6 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 +//@ run-pass // https://github.com/rust-lang/rust/issues/43754 diff --git a/tests/ui/consts/rustc-impl-const-stability.rs b/tests/ui/consts/rustc-impl-const-stability.rs index 2b67c2f2cffe7..98c5c89713804 100644 --- a/tests/ui/consts/rustc-impl-const-stability.rs +++ b/tests/ui/consts/rustc-impl-const-stability.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![crate_type = "lib"] #![feature(staged_api)] diff --git a/tests/ui/consts/rvalue-static-promotion.rs b/tests/ui/consts/rvalue-static-promotion.rs index f42e8b7059312..e9fd30aa1ed39 100644 --- a/tests/ui/consts/rvalue-static-promotion.rs +++ b/tests/ui/consts/rvalue-static-promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/self_normalization.rs b/tests/ui/consts/self_normalization.rs index b2a34f5877b19..245f22a495547 100644 --- a/tests/ui/consts/self_normalization.rs +++ b/tests/ui/consts/self_normalization.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn testfn(_arr: &mut [(); 0]) {} diff --git a/tests/ui/consts/self_normalization2.rs b/tests/ui/consts/self_normalization2.rs index 4fca38cba30bf..a457c45f85735 100644 --- a/tests/ui/consts/self_normalization2.rs +++ b/tests/ui/consts/self_normalization2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Gen { fn gen(x: Self) -> T; diff --git a/tests/ui/consts/signed_enum_discr.rs b/tests/ui/consts/signed_enum_discr.rs index 2e4395ccf2277..420322486c652 100644 --- a/tests/ui/consts/signed_enum_discr.rs +++ b/tests/ui/consts/signed_enum_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/49181 diff --git a/tests/ui/consts/static-cycle-error.rs b/tests/ui/consts/static-cycle-error.rs index 9ce050aae2181..b23872ed509f5 100644 --- a/tests/ui/consts/static-cycle-error.rs +++ b/tests/ui/consts/static-cycle-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { foo: Option<&'static Foo> diff --git a/tests/ui/consts/static-mut-refs.rs b/tests/ui/consts/static-mut-refs.rs index ff865da5aa861..d4ebfbbf17a86 100644 --- a/tests/ui/consts/static-mut-refs.rs +++ b/tests/ui/consts/static-mut-refs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Checks that mutable static items can have mutable slices and other references diff --git a/tests/ui/consts/static-promoted-to-mutable-static.rs b/tests/ui/consts/static-promoted-to-mutable-static.rs index d49ba478dbc82..1cf72781e4582 100644 --- a/tests/ui/consts/static-promoted-to-mutable-static.rs +++ b/tests/ui/consts/static-promoted-to-mutable-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types, non_upper_case_globals, static_mut_ref)] pub struct wl_interface { diff --git a/tests/ui/consts/static-raw-pointer-interning.rs b/tests/ui/consts/static-raw-pointer-interning.rs index cab60c91e165c..0e915760675b5 100644 --- a/tests/ui/consts/static-raw-pointer-interning.rs +++ b/tests/ui/consts/static-raw-pointer-interning.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: Foo = Foo { field: &42 as *const i32, diff --git a/tests/ui/consts/static-raw-pointer-interning2.rs b/tests/ui/consts/static-raw-pointer-interning2.rs index 2b915fd7cb329..b279bb2261a8e 100644 --- a/tests/ui/consts/static-raw-pointer-interning2.rs +++ b/tests/ui/consts/static-raw-pointer-interning2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut FOO: Foo = Foo { field: &mut [42] as *mut [i32] as *mut i32, diff --git a/tests/ui/consts/static_mut_containing_mut_ref.rs b/tests/ui/consts/static_mut_containing_mut_ref.rs index 495804649b14b..710328d6aa798 100644 --- a/tests/ui/consts/static_mut_containing_mut_ref.rs +++ b/tests/ui/consts/static_mut_containing_mut_ref.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(static_mut_ref)] static mut STDERR_BUFFER_SPACE: [u8; 42] = [0u8; 42]; diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.rs b/tests/ui/consts/static_mut_containing_mut_ref2.rs index e60a17922fd0c..b5110623606b9 100644 --- a/tests/ui/consts/static_mut_containing_mut_ref2.rs +++ b/tests/ui/consts/static_mut_containing_mut_ref2.rs @@ -1,4 +1,4 @@ -// revisions: stock mut_refs +//@ revisions: stock mut_refs #![allow(static_mut_ref)] #![cfg_attr(mut_refs, feature(const_mut_refs))] diff --git a/tests/ui/consts/std/iter.rs b/tests/ui/consts/std/iter.rs index e9af781eb2b8d..cf121df0f6c52 100644 --- a/tests/ui/consts/std/iter.rs +++ b/tests/ui/consts/std/iter.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const I: std::iter::Empty = std::iter::empty(); diff --git a/tests/ui/consts/std/slice.rs b/tests/ui/consts/std/slice.rs index f19defc64dd71..bdf1aac5df588 100644 --- a/tests/ui/consts/std/slice.rs +++ b/tests/ui/consts/std/slice.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Wrap(T); unsafe impl Send for Wrap {} diff --git a/tests/ui/consts/timeout.rs b/tests/ui/consts/timeout.rs index c9094999ee276..c4fb8bab66360 100644 --- a/tests/ui/consts/timeout.rs +++ b/tests/ui/consts/timeout.rs @@ -2,8 +2,8 @@ //! the const eval timeout lint and then subsequently //! ICE. -// compile-flags: --crate-type=lib -Ztiny-const-eval-limit -// error-pattern: constant evaluation is taking a long time +//@ compile-flags: --crate-type=lib -Ztiny-const-eval-limit +//@ error-pattern: constant evaluation is taking a long time static ROOK_ATTACKS_TABLE: () = { 0_u64.count_ones(); diff --git a/tests/ui/consts/trait_specialization.rs b/tests/ui/consts/trait_specialization.rs index c581ef6b0f7bb..f195e067b55ef 100644 --- a/tests/ui/consts/trait_specialization.rs +++ b/tests/ui/consts/trait_specialization.rs @@ -1,6 +1,6 @@ -// ignore-wasm32-bare which doesn't support `std::process:exit()` -// compile-flags: -Zmir-opt-level=3 -// run-pass +//@ ignore-wasm32-bare which doesn't support `std::process:exit()` +//@ compile-flags: -Zmir-opt-level=3 +//@ run-pass // Tests that specialization does not cause optimizations running on polymorphic MIR to resolve // to a `default` implementation. diff --git a/tests/ui/consts/transmute-const.rs b/tests/ui/consts/transmute-const.rs index 5044d99ec5183..f03bdca29cb3b 100644 --- a/tests/ui/consts/transmute-const.rs +++ b/tests/ui/consts/transmute-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs index 936931acbe2c8..2ddce483564f7 100644 --- a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs +++ b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs @@ -1,7 +1,7 @@ -// normalize-stderr-64bit "64 bits" -> "word size" -// normalize-stderr-32bit "32 bits" -> "word size" -// normalize-stderr-64bit "128 bits" -> "2 * word size" -// normalize-stderr-32bit "64 bits" -> "2 * word size" +//@ normalize-stderr-64bit "64 bits" -> "word size" +//@ normalize-stderr-32bit "32 bits" -> "word size" +//@ normalize-stderr-64bit "128 bits" -> "2 * word size" +//@ normalize-stderr-32bit "64 bits" -> "2 * word size" fn main() { match &b""[..] { diff --git a/tests/ui/consts/try-operator.rs b/tests/ui/consts/try-operator.rs index ed69f492fb969..352dbeefa8a60 100644 --- a/tests/ui/consts/try-operator.rs +++ b/tests/ui/consts/try-operator.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(try_trait_v2)] #![feature(const_trait_impl)] diff --git a/tests/ui/consts/tuple-struct-constructors.rs b/tests/ui/consts/tuple-struct-constructors.rs index 1655f0eb85038..8472a09844bb9 100644 --- a/tests/ui/consts/tuple-struct-constructors.rs +++ b/tests/ui/consts/tuple-struct-constructors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/41898 diff --git a/tests/ui/consts/underscore_const_names.rs b/tests/ui/consts/underscore_const_names.rs index e2ae5a9d53aac..2c996d25e5cc4 100644 --- a/tests/ui/consts/underscore_const_names.rs +++ b/tests/ui/consts/underscore_const_names.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unused)] diff --git a/tests/ui/consts/uninhabited-const-issue-61744.rs b/tests/ui/consts/uninhabited-const-issue-61744.rs index ca6449cce30d5..6168268bfedc7 100644 --- a/tests/ui/consts/uninhabited-const-issue-61744.rs +++ b/tests/ui/consts/uninhabited-const-issue-61744.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail pub const unsafe fn fake_type() -> T { hint_unreachable() //~ ERROR evaluation of `::CONSTANT` failed diff --git a/tests/ui/consts/union_constant.rs b/tests/ui/consts/union_constant.rs index 508ff7e0ae8e6..f6ef235dcddfc 100644 --- a/tests/ui/consts/union_constant.rs +++ b/tests/ui/consts/union_constant.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) union Uninit { _never_use: *const u8, diff --git a/tests/ui/consts/unnormalized-param-env.rs b/tests/ui/consts/unnormalized-param-env.rs index a7bbe4db99290..440d92d09f327 100644 --- a/tests/ui/consts/unnormalized-param-env.rs +++ b/tests/ui/consts/unnormalized-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait CSpace { type Traj; diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.rs b/tests/ui/consts/unstable-const-fn-in-libcore.rs index b62a74039f6dd..baeece40a52bb 100644 --- a/tests/ui/consts/unstable-const-fn-in-libcore.rs +++ b/tests/ui/consts/unstable-const-fn-in-libcore.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass // This is a non-regression test for const-qualification of unstable items in libcore // as explained in issue #67053. diff --git a/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs b/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs index 619084eaa517a..fb7cd905375aa 100644 --- a/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs +++ b/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![stable(feature = "core", since = "1.6.0")] #![feature(staged_api)] diff --git a/tests/ui/consts/unwind-abort.rs b/tests/ui/consts/unwind-abort.rs index 6c94fc7b98b75..35db9152bd551 100644 --- a/tests/ui/consts/unwind-abort.rs +++ b/tests/ui/consts/unwind-abort.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_unwind, const_extern_fn)] diff --git a/tests/ui/consts/validate_never_arrays.rs b/tests/ui/consts/validate_never_arrays.rs index 71c1340e5f819..aa5dbdf823357 100644 --- a/tests/ui/consts/validate_never_arrays.rs +++ b/tests/ui/consts/validate_never_arrays.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(never_type)] const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior diff --git a/tests/ui/consts/write_to_mut_ref_dest.rs b/tests/ui/consts/write_to_mut_ref_dest.rs index 484ec4244355e..42ac228403841 100644 --- a/tests/ui/consts/write_to_mut_ref_dest.rs +++ b/tests/ui/consts/write_to_mut_ref_dest.rs @@ -1,5 +1,5 @@ -// revisions: stock mut_refs -//[mut_refs] check-pass +//@ revisions: stock mut_refs +//@[mut_refs] check-pass #![cfg_attr(mut_refs, feature(const_mut_refs))] diff --git a/tests/ui/consts/zst_no_llvm_alloc.rs b/tests/ui/consts/zst_no_llvm_alloc.rs index 2a41f708c2b87..1622a199a7a40 100644 --- a/tests/ui/consts/zst_no_llvm_alloc.rs +++ b/tests/ui/consts/zst_no_llvm_alloc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(align(4))] struct Foo; diff --git a/tests/ui/coroutine/addassign-yield.rs b/tests/ui/coroutine/addassign-yield.rs index 919a559f85b98..8718e73512f71 100644 --- a/tests/ui/coroutine/addassign-yield.rs +++ b/tests/ui/coroutine/addassign-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for broken MIR error (#61442) // Due to the two possible evaluation orders for // a '+=' expression (depending on whether or not the 'AddAssign' trait diff --git a/tests/ui/coroutine/async-coroutine-issue-67158.rs b/tests/ui/coroutine/async-coroutine-issue-67158.rs index 420454656d457..14905e6b8bf72 100644 --- a/tests/ui/coroutine/async-coroutine-issue-67158.rs +++ b/tests/ui/coroutine/async-coroutine-issue-67158.rs @@ -1,5 +1,5 @@ #![feature(coroutines)] -// edition:2018 +//@ edition:2018 // Regression test for #67158. fn main() { async { yield print!(":C") }; //~ ERROR `async` coroutines are not yet supported diff --git a/tests/ui/coroutine/async-gen-deduce-yield.rs b/tests/ui/coroutine/async-gen-deduce-yield.rs index 9ccc8ee41f667..aee920e977379 100644 --- a/tests/ui/coroutine/async-gen-deduce-yield.rs +++ b/tests/ui/coroutine/async-gen-deduce-yield.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(async_iterator, gen_blocks)] diff --git a/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs index 80c0b69a6f7ed..62b9bafcd60aa 100644 --- a/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs +++ b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(async_iterator, gen_blocks, noop_waker)] diff --git a/tests/ui/coroutine/async_gen_fn.rs b/tests/ui/coroutine/async_gen_fn.rs index 20564106f992a..9e96ecf3ea69f 100644 --- a/tests/ui/coroutine/async_gen_fn.rs +++ b/tests/ui/coroutine/async_gen_fn.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options async gen fn foo() {} //[none]~^ ERROR: `async fn` is not permitted in Rust 2015 diff --git a/tests/ui/coroutine/async_gen_fn_iter.rs b/tests/ui/coroutine/async_gen_fn_iter.rs index 604156b4d373f..c4a7629f3148f 100644 --- a/tests/ui/coroutine/async_gen_fn_iter.rs +++ b/tests/ui/coroutine/async_gen_fn_iter.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ run-pass #![feature(gen_blocks, async_iterator)] #![feature(noop_waker)] diff --git a/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs index dc0521853409e..8af6973134a67 100644 --- a/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs +++ b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit metadata +//@ compile-flags: --emit metadata #![feature(coroutines, coroutine_trait)] use std::marker::Unpin; diff --git a/tests/ui/coroutine/auxiliary/unwind-aux.rs b/tests/ui/coroutine/auxiliary/unwind-aux.rs index 215d676911633..ff1e8ed32cd49 100644 --- a/tests/ui/coroutine/auxiliary/unwind-aux.rs +++ b/tests/ui/coroutine/auxiliary/unwind-aux.rs @@ -1,6 +1,6 @@ -// compile-flags: -Cpanic=unwind --crate-type=lib -// no-prefer-dynamic -// edition:2021 +//@ compile-flags: -Cpanic=unwind --crate-type=lib +//@ no-prefer-dynamic +//@ edition:2021 #![feature(coroutines)] pub fn run(a: T) { diff --git a/tests/ui/coroutine/borrow-in-tail-expr.rs b/tests/ui/coroutine/borrow-in-tail-expr.rs index c1497ad29118c..2f0aa62019e83 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 +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs index e8e82f1994dea..d7ba1143b5c22 100644 --- a/tests/ui/coroutine/clone-impl-async.rs +++ b/tests/ui/coroutine/clone-impl-async.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-coroutine_clone // Verifies that feature(coroutine_clone) doesn't allow async blocks to be cloned/copied. diff --git a/tests/ui/coroutine/clone-rpit.rs b/tests/ui/coroutine/clone-rpit.rs index 22a553c83d636..445d155afa902 100644 --- a/tests/ui/coroutine/clone-rpit.rs +++ b/tests/ui/coroutine/clone-rpit.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[current] check-pass -//[next] known-bug: trait-system-refactor-initiative#82 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[current] check-pass +//@[next] known-bug: trait-system-refactor-initiative#82 #![feature(coroutines, coroutine_trait, coroutine_clone)] diff --git a/tests/ui/coroutine/conditional-drop.rs b/tests/ui/coroutine/conditional-drop.rs index 634095c7accbc..65d3a9e701ee4 100644 --- a/tests/ui/coroutine/conditional-drop.rs +++ b/tests/ui/coroutine/conditional-drop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/control-flow.rs b/tests/ui/coroutine/control-flow.rs index 0cb37524a6c7e..9070ba17856c9 100644 --- a/tests/ui/coroutine/control-flow.rs +++ b/tests/ui/coroutine/control-flow.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/coroutine-resume-after-panic.rs b/tests/ui/coroutine/coroutine-resume-after-panic.rs index 5915f5ad9a968..8445bf7e6352c 100644 --- a/tests/ui/coroutine/coroutine-resume-after-panic.rs +++ b/tests/ui/coroutine/coroutine-resume-after-panic.rs @@ -1,7 +1,7 @@ -// run-fail -// needs-unwind -// error-pattern:coroutine resumed after panicking -// ignore-emscripten no processes +//@ run-fail +//@ needs-unwind +//@ error-pattern:coroutine resumed after panicking +//@ ignore-emscripten no processes // Test that we get the correct message for resuming a panicked coroutine. diff --git a/tests/ui/coroutine/derived-drop-parent-expr.rs b/tests/ui/coroutine/derived-drop-parent-expr.rs index 59a3e847838f0..f70a732c90f08 100644 --- a/tests/ui/coroutine/derived-drop-parent-expr.rs +++ b/tests/ui/coroutine/derived-drop-parent-expr.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass //! Like drop-tracking-parent-expression, but also tests that this doesn't ICE when building MIR #![feature(coroutines)] diff --git a/tests/ui/coroutine/discriminant.rs b/tests/ui/coroutine/discriminant.rs index 0cdeb6dd6787b..a44d8f74746b6 100644 --- a/tests/ui/coroutine/discriminant.rs +++ b/tests/ui/coroutine/discriminant.rs @@ -1,7 +1,7 @@ //! Tests that coroutine discriminant sizes and ranges are chosen optimally and that they are //! reflected in the output of `mem::discriminant`. -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait, core_intrinsics, discriminant_kind)] diff --git a/tests/ui/coroutine/drop-and-replace.rs b/tests/ui/coroutine/drop-and-replace.rs index 38b757fac29a8..6e30d76512b72 100644 --- a/tests/ui/coroutine/drop-and-replace.rs +++ b/tests/ui/coroutine/drop-and-replace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for incorrect DropAndReplace behavior introduced in #60840 // and fixed in #61373. When combined with the optimization implemented in // #60187, this produced incorrect code for coroutines when a saved local was diff --git a/tests/ui/coroutine/drop-control-flow.rs b/tests/ui/coroutine/drop-control-flow.rs index 55d08b8d5b528..f4e8eed4f8dce 100644 --- a/tests/ui/coroutine/drop-control-flow.rs +++ b/tests/ui/coroutine/drop-control-flow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // A test to ensure coroutines capture values that were conditionally dropped, // and also that values that are dropped along all paths to a yield do not get diff --git a/tests/ui/coroutine/drop-env.rs b/tests/ui/coroutine/drop-env.rs index 404c043431daa..b189ab8149956 100644 --- a/tests/ui/coroutine/drop-env.rs +++ b/tests/ui/coroutine/drop-env.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] #![allow(dropping_copy_types)] diff --git a/tests/ui/coroutine/drop-track-addassign-yield.rs b/tests/ui/coroutine/drop-track-addassign-yield.rs index 6c5897458ecc4..b1a4bd79f31c1 100644 --- a/tests/ui/coroutine/drop-track-addassign-yield.rs +++ b/tests/ui/coroutine/drop-track-addassign-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Based on addassign-yield.rs, but with drop tracking enabled. Originally we did not implement // the fake_read callback on ExprUseVisitor which caused this case to break. diff --git a/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs index 622765d82aa5b..0f94016f11b82 100644 --- a/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs +++ b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(coroutines)] diff --git a/tests/ui/coroutine/gen_block.rs b/tests/ui/coroutine/gen_block.rs index 852c7c455a69f..f6a775aa66199 100644 --- a/tests/ui/coroutine/gen_block.rs +++ b/tests/ui/coroutine/gen_block.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options #![cfg_attr(e2024, feature(gen_blocks))] fn main() { diff --git a/tests/ui/coroutine/gen_block_is_coro.rs b/tests/ui/coroutine/gen_block_is_coro.rs index c66ccefba85e6..970646ac47008 100644 --- a/tests/ui/coroutine/gen_block_is_coro.rs +++ b/tests/ui/coroutine/gen_block_is_coro.rs @@ -1,4 +1,4 @@ -//compile-flags: --edition 2024 -Zunstable-options +//@compile-flags: --edition 2024 -Zunstable-options #![feature(coroutines, coroutine_trait, gen_blocks)] use std::ops::Coroutine; diff --git a/tests/ui/coroutine/gen_block_is_iter.rs b/tests/ui/coroutine/gen_block_is_iter.rs index d43eef4a18d7d..396d773713250 100644 --- a/tests/ui/coroutine/gen_block_is_iter.rs +++ b/tests/ui/coroutine/gen_block_is_iter.rs @@ -1,7 +1,7 @@ -// revisions: next old -//compile-flags: --edition 2024 -Zunstable-options -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: next old +//@compile-flags: --edition 2024 -Zunstable-options +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(gen_blocks)] fn foo() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_is_no_future.rs b/tests/ui/coroutine/gen_block_is_no_future.rs index 9476651973873..a5bb85337192a 100644 --- a/tests/ui/coroutine/gen_block_is_no_future.rs +++ b/tests/ui/coroutine/gen_block_is_no_future.rs @@ -1,4 +1,4 @@ -//compile-flags: --edition 2024 -Zunstable-options +//@compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] fn foo() -> impl std::future::Future { //~ ERROR is not a future diff --git a/tests/ui/coroutine/gen_block_iterate.rs b/tests/ui/coroutine/gen_block_iterate.rs index 8e72b00d99d5d..a9cb5ef3e2c8f 100644 --- a/tests/ui/coroutine/gen_block_iterate.rs +++ b/tests/ui/coroutine/gen_block_iterate.rs @@ -1,7 +1,7 @@ -// revisions: next old -//compile-flags: --edition 2024 -Zunstable-options -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: next old +//@compile-flags: --edition 2024 -Zunstable-options +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(gen_blocks)] fn foo() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_move.fixed b/tests/ui/coroutine/gen_block_move.fixed index 5c6c8062322da..0327ca75f9e40 100644 --- a/tests/ui/coroutine/gen_block_move.fixed +++ b/tests/ui/coroutine/gen_block_move.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// run-rustfix +//@ compile-flags: --edition 2024 -Zunstable-options +//@ run-rustfix #![feature(gen_blocks)] fn moved() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_move.rs b/tests/ui/coroutine/gen_block_move.rs index abbf8132476c4..53d0149872a23 100644 --- a/tests/ui/coroutine/gen_block_move.rs +++ b/tests/ui/coroutine/gen_block_move.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// run-rustfix +//@ compile-flags: --edition 2024 -Zunstable-options +//@ run-rustfix #![feature(gen_blocks)] fn moved() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs index 2da0eb512cc0b..ada56a5bd6f71 100644 --- a/tests/ui/coroutine/gen_block_panic.rs +++ b/tests/ui/coroutine/gen_block_panic.rs @@ -1,6 +1,6 @@ -//compile-flags: --edition 2024 -Zunstable-options -// run-pass -// needs-unwind +//@compile-flags: --edition 2024 -Zunstable-options +//@ run-pass +//@ needs-unwind #![feature(gen_blocks)] fn main() { diff --git a/tests/ui/coroutine/gen_fn.rs b/tests/ui/coroutine/gen_fn.rs index e06629c5dfe54..3228650f41524 100644 --- a/tests/ui/coroutine/gen_fn.rs +++ b/tests/ui/coroutine/gen_fn.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options gen fn foo() {} //[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found `gen` diff --git a/tests/ui/coroutine/gen_fn_iter.rs b/tests/ui/coroutine/gen_fn_iter.rs index da01bc96ef453..ae09d678fe324 100644 --- a/tests/ui/coroutine/gen_fn_iter.rs +++ b/tests/ui/coroutine/gen_fn_iter.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ run-pass #![feature(gen_blocks)] // make sure that a ridiculously simple gen fn works as an iterator. diff --git a/tests/ui/coroutine/gen_fn_lifetime_capture.rs b/tests/ui/coroutine/gen_fn_lifetime_capture.rs index b6a4d71e6cce1..517096d092eee 100644 --- a/tests/ui/coroutine/gen_fn_lifetime_capture.rs +++ b/tests/ui/coroutine/gen_fn_lifetime_capture.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass #![feature(gen_blocks)] // make sure gen fn captures lifetimes in its signature diff --git a/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs index ad39b71b0eb02..3d372ac9110c9 100644 --- a/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs +++ b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(coroutines)] fn main() { diff --git a/tests/ui/coroutine/issue-44197.rs b/tests/ui/coroutine/issue-44197.rs index c0326bdae4e30..e18bcc2c996f2 100644 --- a/tests/ui/coroutine/issue-44197.rs +++ b/tests/ui/coroutine/issue-44197.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-52304.rs b/tests/ui/coroutine/issue-52304.rs index fed3a5f19b3ac..01ed181ab1dcb 100644 --- a/tests/ui/coroutine/issue-52304.rs +++ b/tests/ui/coroutine/issue-52304.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-52398.rs b/tests/ui/coroutine/issue-52398.rs index 8d651d0e2ce77..826ce6b9d9b3f 100644 --- a/tests/ui/coroutine/issue-52398.rs +++ b/tests/ui/coroutine/issue-52398.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-53548-1.rs b/tests/ui/coroutine/issue-53548-1.rs index 4be8e95f3e744..21b71e228a9a7 100644 --- a/tests/ui/coroutine/issue-53548-1.rs +++ b/tests/ui/coroutine/issue-53548-1.rs @@ -2,7 +2,7 @@ // but which encountered the same ICE/error. See `issue-53548.rs` // for details. // -// check-pass +//@ check-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/coroutine/issue-53548.rs b/tests/ui/coroutine/issue-53548.rs index bb267f74ae287..6d55994137ff9 100644 --- a/tests/ui/coroutine/issue-53548.rs +++ b/tests/ui/coroutine/issue-53548.rs @@ -15,7 +15,7 @@ // also analogous to what we would do for higher-ranked regions // appearing within the trait in other positions). // -// check-pass +//@ check-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-57017.rs b/tests/ui/coroutine/issue-57017.rs index 4f63abbdb1072..b83d916932abd 100644 --- a/tests/ui/coroutine/issue-57017.rs +++ b/tests/ui/coroutine/issue-57017.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines, negative_impls)] #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/coroutine/issue-57084.rs b/tests/ui/coroutine/issue-57084.rs index e0aeae6673503..51b0c8e1de96c 100644 --- a/tests/ui/coroutine/issue-57084.rs +++ b/tests/ui/coroutine/issue-57084.rs @@ -1,7 +1,7 @@ // This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly). // "cannot relate bound region: ReBound(DebruijnIndex(1), BrAnon(1)) <= '?1" -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![feature(coroutines,coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/ui/coroutine/issue-57478.rs b/tests/ui/coroutine/issue-57478.rs index 716e4c67b8727..5e479aaa9c1b3 100644 --- a/tests/ui/coroutine/issue-57478.rs +++ b/tests/ui/coroutine/issue-57478.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls, coroutines)] diff --git a/tests/ui/coroutine/issue-58888.rs b/tests/ui/coroutine/issue-58888.rs index 9c699c7bb8292..ce45f22dd6ef3 100644 --- a/tests/ui/coroutine/issue-58888.rs +++ b/tests/ui/coroutine/issue-58888.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g +//@ run-pass +//@ compile-flags: -g #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs index cff6c24a83fbd..6280b777201fb 100644 --- a/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs +++ b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs @@ -1,8 +1,8 @@ // Test that we don't consider temporaries for statement expressions as live // across yields -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-62506-two_awaits.rs b/tests/ui/coroutine/issue-62506-two_awaits.rs index b50e2a45c588f..62feb1bf5550d 100644 --- a/tests/ui/coroutine/issue-62506-two_awaits.rs +++ b/tests/ui/coroutine/issue-62506-two_awaits.rs @@ -1,8 +1,8 @@ // Output = String caused an ICE whereas Output = &'static str compiled successfully. // Broken MIR: coroutine contains type std::string::String in MIR, // but typeck only knows about {::Future, ()} -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/coroutine/issue-69017.rs b/tests/ui/coroutine/issue-69017.rs index 7aaa1ee03c4bc..09bbf63a986e5 100644 --- a/tests/ui/coroutine/issue-69017.rs +++ b/tests/ui/coroutine/issue-69017.rs @@ -2,7 +2,7 @@ // Fails on 2020-02-08 nightly // regressed commit: https://github.com/rust-lang/rust/commit/f8fd4624474a68bd26694eff3536b9f3a127b2d3 // -// check-pass +//@ check-pass #![feature(coroutine_trait)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-69039.rs b/tests/ui/coroutine/issue-69039.rs index 041985e15a332..fd12414c3d851 100644 --- a/tests/ui/coroutine/issue-69039.rs +++ b/tests/ui/coroutine/issue-69039.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-87142.rs b/tests/ui/coroutine/issue-87142.rs index b5708c4b385d0..f5c3805842c51 100644 --- a/tests/ui/coroutine/issue-87142.rs +++ b/tests/ui/coroutine/issue-87142.rs @@ -1,5 +1,5 @@ -// compile-flags: -Cdebuginfo=2 -// build-pass +//@ compile-flags: -Cdebuginfo=2 +//@ build-pass // Regression test for #87142 // This test needs the above flags and the "lib" crate type. diff --git a/tests/ui/coroutine/issue-93161.rs b/tests/ui/coroutine/issue-93161.rs index ae8603b7c09fa..0c7be8407d0b9 100644 --- a/tests/ui/coroutine/issue-93161.rs +++ b/tests/ui/coroutine/issue-93161.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![feature(never_type)] diff --git a/tests/ui/coroutine/iterator-count.rs b/tests/ui/coroutine/iterator-count.rs index b7628c44ddcf8..bb202ab2d33ed 100644 --- a/tests/ui/coroutine/iterator-count.rs +++ b/tests/ui/coroutine/iterator-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/layout-error.rs b/tests/ui/coroutine/layout-error.rs index 87da60700a4be..70a0248eabcc2 100644 --- a/tests/ui/coroutine/layout-error.rs +++ b/tests/ui/coroutine/layout-error.rs @@ -1,7 +1,7 @@ // Verifies that computing a layout of a coroutine tainted by type errors // doesn't ICE. Regression test for #80998. // -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/tests/ui/coroutine/live-upvar-across-yield.rs b/tests/ui/coroutine/live-upvar-across-yield.rs index 740a446e737ef..86c4716c9516d 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 +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/match-bindings.rs b/tests/ui/coroutine/match-bindings.rs index 1a5b3cdb0268e..9ea1deaab3623 100644 --- a/tests/ui/coroutine/match-bindings.rs +++ b/tests/ui/coroutine/match-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/metadata-sufficient-for-layout.rs index 434a2801597af..23937e12c5218 100644 --- a/tests/ui/coroutine/metadata-sufficient-for-layout.rs +++ b/tests/ui/coroutine/metadata-sufficient-for-layout.rs @@ -3,7 +3,7 @@ // // Regression test for #80998. // -// aux-build:metadata-sufficient-for-layout.rs +//@ aux-build:metadata-sufficient-for-layout.rs #![feature(type_alias_impl_trait, rustc_attrs)] #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/nested_coroutine.rs b/tests/ui/coroutine/nested_coroutine.rs index 04f4aa7715356..7ff97abf4bb1f 100644 --- a/tests/ui/coroutine/nested_coroutine.rs +++ b/tests/ui/coroutine/nested_coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/niche-in-coroutine.rs b/tests/ui/coroutine/niche-in-coroutine.rs index 7ad4c6bc98aca..45b920ab9273e 100644 --- a/tests/ui/coroutine/niche-in-coroutine.rs +++ b/tests/ui/coroutine/niche-in-coroutine.rs @@ -1,6 +1,6 @@ // Test that niche finding works with captured coroutine upvars. -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/non-static-is-unpin.rs b/tests/ui/coroutine/non-static-is-unpin.rs index 238e49bbfdf23..0a108d52897b9 100644 --- a/tests/ui/coroutine/non-static-is-unpin.rs +++ b/tests/ui/coroutine/non-static-is-unpin.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(coroutines, coroutine_trait)] #![allow(dropping_copy_types)] diff --git a/tests/ui/coroutine/overlap-locals.rs b/tests/ui/coroutine/overlap-locals.rs index 7c151270bb55d..eea8595ed06fc 100644 --- a/tests/ui/coroutine/overlap-locals.rs +++ b/tests/ui/coroutine/overlap-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/panic-drops-resume.rs b/tests/ui/coroutine/panic-drops-resume.rs index e866f216a247f..6d026e6edc8ac 100644 --- a/tests/ui/coroutine/panic-drops-resume.rs +++ b/tests/ui/coroutine/panic-drops-resume.rs @@ -1,7 +1,7 @@ //! Tests that panics inside a coroutine will correctly drop the initial resume argument. -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/panic-drops.rs b/tests/ui/coroutine/panic-drops.rs index 7e37279b9eb8d..c99abdc72461c 100644 --- a/tests/ui/coroutine/panic-drops.rs +++ b/tests/ui/coroutine/panic-drops.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/panic-safe.rs b/tests/ui/coroutine/panic-safe.rs index 9aa427565449f..89dd09bf5203b 100644 --- a/tests/ui/coroutine/panic-safe.rs +++ b/tests/ui/coroutine/panic-safe.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/partial-drop.rs b/tests/ui/coroutine/partial-drop.rs index a4347f52a707d..ba13544712f13 100644 --- a/tests/ui/coroutine/partial-drop.rs +++ b/tests/ui/coroutine/partial-drop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls, coroutines)] struct Foo; diff --git a/tests/ui/coroutine/pin-box-coroutine.rs b/tests/ui/coroutine/pin-box-coroutine.rs index e348551a642fe..1ee6393d1d83a 100644 --- a/tests/ui/coroutine/pin-box-coroutine.rs +++ b/tests/ui/coroutine/pin-box-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/polymorphize-args.rs b/tests/ui/coroutine/polymorphize-args.rs index de44d667656c4..21aa3c7aafd8c 100644 --- a/tests/ui/coroutine/polymorphize-args.rs +++ b/tests/ui/coroutine/polymorphize-args.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zpolymorphize=on -// build-pass +//@ compile-flags: -Zpolymorphize=on +//@ build-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs index f0094aa694bb5..73106328618ea 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as: tests/ui/coroutine/issue-68112.stderr diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs index 390bfc542b7ec..f9ea68a8cd942 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as test/ui/coroutine/not-send-sync.rs #![feature(coroutines)] diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs index 49b54a4cd5b06..be6dbad9e1c2b 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/reborrow-mut-upvar.rs b/tests/ui/coroutine/reborrow-mut-upvar.rs index e4f717be8b5cc..e1f6211baebda 100644 --- a/tests/ui/coroutine/reborrow-mut-upvar.rs +++ b/tests/ui/coroutine/reborrow-mut-upvar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/reinit-in-match-guard.rs b/tests/ui/coroutine/reinit-in-match-guard.rs index 1895de1f12b3c..4a58420477314 100644 --- a/tests/ui/coroutine/reinit-in-match-guard.rs +++ b/tests/ui/coroutine/reinit-in-match-guard.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/resume-after-return.rs b/tests/ui/coroutine/resume-after-return.rs index acbd8740a359e..81f86de641f25 100644 --- a/tests/ui/coroutine/resume-after-return.rs +++ b/tests/ui/coroutine/resume-after-return.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/resume-arg-size.rs b/tests/ui/coroutine/resume-arg-size.rs index 22bb469f9411d..81e96975c98f6 100644 --- a/tests/ui/coroutine/resume-arg-size.rs +++ b/tests/ui/coroutine/resume-arg-size.rs @@ -1,7 +1,7 @@ #![feature(coroutines)] #![allow(dropping_copy_types)] -// run-pass +//@ run-pass use std::mem::size_of_val; diff --git a/tests/ui/coroutine/resume-live-across-yield.rs b/tests/ui/coroutine/resume-live-across-yield.rs index 935e7d326be43..45851411daaac 100644 --- a/tests/ui/coroutine/resume-live-across-yield.rs +++ b/tests/ui/coroutine/resume-live-across-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/return-types-diverge.rs b/tests/ui/coroutine/return-types-diverge.rs index 5f21c8cbf346f..5b639eea09aa2 100644 --- a/tests/ui/coroutine/return-types-diverge.rs +++ b/tests/ui/coroutine/return-types-diverge.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(gen_blocks)] diff --git a/tests/ui/coroutine/return-types.rs b/tests/ui/coroutine/return-types.rs index 3543d6293f774..ad2080fd88b97 100644 --- a/tests/ui/coroutine/return-types.rs +++ b/tests/ui/coroutine/return-types.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Zunstable-options +//@ compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] diff --git a/tests/ui/coroutine/self_referential_gen_block.rs b/tests/ui/coroutine/self_referential_gen_block.rs index 14daa2e9c3570..dccd83768c431 100644 --- a/tests/ui/coroutine/self_referential_gen_block.rs +++ b/tests/ui/coroutine/self_referential_gen_block.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Zunstable-options +//@ compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] //! This test checks that we don't allow self-referential generators diff --git a/tests/ui/coroutine/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs index fa657e3b275eb..84cc4319070dd 100644 --- a/tests/ui/coroutine/size-moved-locals.rs +++ b/tests/ui/coroutine/size-moved-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we don't duplicate storage for a variable that is moved to another // binding. This used to happen in the presence of unwind and drop edges (see // `complex` below.) @@ -9,9 +9,9 @@ // // See issue #59123 for a full explanation. -// edition:2018 -// ignore-wasm32 issue #62807 -// needs-unwind Size of Closures change on panic=abort +//@ edition:2018 +//@ ignore-wasm32 issue #62807 +//@ needs-unwind Size of Closures change on panic=abort #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/smoke-resume-args.rs b/tests/ui/coroutine/smoke-resume-args.rs index 752b21ba087af..7d20cd2293d6b 100644 --- a/tests/ui/coroutine/smoke-resume-args.rs +++ b/tests/ui/coroutine/smoke-resume-args.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/smoke.rs b/tests/ui/coroutine/smoke.rs index b74ed26865ff7..0ed56982c9b74 100644 --- a/tests/ui/coroutine/smoke.rs +++ b/tests/ui/coroutine/smoke.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 -// ignore-emscripten no threads support -// compile-flags: --test +//@ ignore-emscripten no threads support +//@ compile-flags: --test #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/static-coroutine.rs b/tests/ui/coroutine/static-coroutine.rs index f9fd65b9793d6..9beaef3e4de31 100644 --- a/tests/ui/coroutine/static-coroutine.rs +++ b/tests/ui/coroutine/static-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/static-mut-reference-across-yield.rs b/tests/ui/coroutine/static-mut-reference-across-yield.rs index 0ed849e0e7d10..0d8042ed8526b 100644 --- a/tests/ui/coroutine/static-mut-reference-across-yield.rs +++ b/tests/ui/coroutine/static-mut-reference-across-yield.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/static-not-unpin.rs b/tests/ui/coroutine/static-not-unpin.rs index f27183d11db49..63a2b35ef7a95 100644 --- a/tests/ui/coroutine/static-not-unpin.rs +++ b/tests/ui/coroutine/static-not-unpin.rs @@ -1,9 +1,9 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(coroutines)] -// normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin" +//@ normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin" use std::marker::Unpin; diff --git a/tests/ui/coroutine/static-reference-across-yield.rs b/tests/ui/coroutine/static-reference-across-yield.rs index 6496d8b86cc53..cf19ccb54d535 100644 --- a/tests/ui/coroutine/static-reference-across-yield.rs +++ b/tests/ui/coroutine/static-reference-across-yield.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] static A: [i32; 5] = [1, 2, 3, 4, 5]; diff --git a/tests/ui/coroutine/too-live-local-in-immovable-gen.rs b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs index 7eaa155222729..382e7ff38143d 100644 --- a/tests/ui/coroutine/too-live-local-in-immovable-gen.rs +++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_unsafe)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/uninhabited-field.rs b/tests/ui/coroutine/uninhabited-field.rs index d9570c2fed8d4..79776d653b1f7 100644 --- a/tests/ui/coroutine/uninhabited-field.rs +++ b/tests/ui/coroutine/uninhabited-field.rs @@ -1,5 +1,5 @@ // Test that uninhabited saved local doesn't make the entire variant uninhabited. -// run-pass +//@ run-pass #![allow(unused)] #![feature(assert_matches)] #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/unresolved-ct-var.rs b/tests/ui/coroutine/unresolved-ct-var.rs index 0316385fba93a..d7e3c2d373241 100644 --- a/tests/ui/coroutine/unresolved-ct-var.rs +++ b/tests/ui/coroutine/unresolved-ct-var.rs @@ -1,5 +1,5 @@ -// incremental -// edition:2021 +//@ incremental +//@ edition:2021 fn main() { let _ = async { diff --git a/tests/ui/coroutine/unwind-abort-mix.rs b/tests/ui/coroutine/unwind-abort-mix.rs index 869b3e4f43347..517c6613e3d8b 100644 --- a/tests/ui/coroutine/unwind-abort-mix.rs +++ b/tests/ui/coroutine/unwind-abort-mix.rs @@ -1,11 +1,11 @@ // Ensure that coroutine drop glue is valid when mixing different panic // strategies. Regression test for #116953. // -// no-prefer-dynamic -// build-pass -// aux-build:unwind-aux.rs -// compile-flags: -Cpanic=abort -// needs-unwind +//@ no-prefer-dynamic +//@ build-pass +//@ aux-build:unwind-aux.rs +//@ compile-flags: -Cpanic=abort +//@ needs-unwind extern crate unwind_aux; pub fn main() { diff --git a/tests/ui/coroutine/witness-ignore-fake-reads.rs b/tests/ui/coroutine/witness-ignore-fake-reads.rs index ccf9ce8b49e18..9764b00422d60 100644 --- a/tests/ui/coroutine/witness-ignore-fake-reads.rs +++ b/tests/ui/coroutine/witness-ignore-fake-reads.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test for #117059 struct SendNotSync(*const ()); diff --git a/tests/ui/coroutine/xcrate-reachable.rs b/tests/ui/coroutine/xcrate-reachable.rs index c6328448868cb..2e7de649c7216 100644 --- a/tests/ui/coroutine/xcrate-reachable.rs +++ b/tests/ui/coroutine/xcrate-reachable.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate-reachable.rs +//@ aux-build:xcrate-reachable.rs #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/xcrate.rs b/tests/ui/coroutine/xcrate.rs index 4572d1cfd5477..406152a0bf10c 100644 --- a/tests/ui/coroutine/xcrate.rs +++ b/tests/ui/coroutine/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/yield-in-args-rev.rs b/tests/ui/coroutine/yield-in-args-rev.rs index b22c32ccd92db..b074e2bc93987 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 +//@ run-pass #![allow(dead_code)] // Test that a borrow that occurs after a yield in the same diff --git a/tests/ui/coroutine/yield-in-initializer.rs b/tests/ui/coroutine/yield-in-initializer.rs index 5a7b3a4feafbe..19218926b8a0d 100644 --- a/tests/ui/coroutine/yield-in-initializer.rs +++ b/tests/ui/coroutine/yield-in-initializer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/yield-subtype.rs b/tests/ui/coroutine/yield-subtype.rs index 3595d449823e3..271f8362f17ed 100644 --- a/tests/ui/coroutine/yield-subtype.rs +++ b/tests/ui/coroutine/yield-subtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(dead_code)] diff --git a/tests/ui/coroutine/yielding-in-match-guards.rs b/tests/ui/coroutine/yielding-in-match-guards.rs index a9575a9e77e24..6f074188728ef 100644 --- a/tests/ui/coroutine/yielding-in-match-guards.rs +++ b/tests/ui/coroutine/yielding-in-match-guards.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // This test is derived from // https://github.com/rust-lang/rust/issues/72651#issuecomment-668720468 diff --git a/tests/ui/crate-leading-sep.rs b/tests/ui/crate-leading-sep.rs index fce97d9ba2370..fbc940aed260f 100644 --- a/tests/ui/crate-leading-sep.rs +++ b/tests/ui/crate-leading-sep.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dropping_copy_types)] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs index bd9c8483ec29e..6649ffd7a2d6e 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-1 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-1 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs index bd0f08f45b633..63327c7766836 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-2 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-2 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs index 1226c2fbb461e..59ed1836990a7 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-3 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-3 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs index e9459ed0719fd..cd4fcc4084a7c 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-1 --emit=metadata +//@ compile-flags:-C extra-filename=-1 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs index c4541682723b8..b63879c063ae2 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-2 --emit=metadata +//@ compile-flags:-C extra-filename=-2 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs index b356db4b6fc31..e43cb293a2cb4 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-3 --emit=metadata +//@ compile-flags:-C extra-filename=-3 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/proc-macro.rs b/tests/ui/crate-loading/auxiliary/proc-macro.rs index 52631de575761..ad227c069d20b 100644 --- a/tests/ui/crate-loading/auxiliary/proc-macro.rs +++ b/tests/ui/crate-loading/auxiliary/proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_name = "reproduction"] #![crate_type = "proc-macro"] diff --git a/tests/ui/crate-loading/crateresolve1.rs b/tests/ui/crate-loading/crateresolve1.rs index 61a1ee263eded..2fccb744e82cf 100644 --- a/tests/ui/crate-loading/crateresolve1.rs +++ b/tests/ui/crate-loading/crateresolve1.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated at `tests/ui/error-codes/E0464.rs`. diff --git a/tests/ui/crate-loading/crateresolve2.rs b/tests/ui/crate-loading/crateresolve2.rs index 0774c0dfd329d..159ce04c3c4ad 100644 --- a/tests/ui/crate-loading/crateresolve2.rs +++ b/tests/ui/crate-loading/crateresolve2.rs @@ -1,11 +1,11 @@ -// check-fail +//@ check-fail -// aux-build:crateresolve2-1.rs -// aux-build:crateresolve2-2.rs -// aux-build:crateresolve2-3.rs +//@ aux-build:crateresolve2-1.rs +//@ aux-build:crateresolve2-2.rs +//@ aux-build:crateresolve2-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" extern crate crateresolve2; //~^ ERROR multiple candidates for `rmeta` dependency `crateresolve2` found diff --git a/tests/ui/crate-loading/cross-compiled-proc-macro.rs b/tests/ui/crate-loading/cross-compiled-proc-macro.rs index c1f4331438e57..51431c058655f 100644 --- a/tests/ui/crate-loading/cross-compiled-proc-macro.rs +++ b/tests/ui/crate-loading/cross-compiled-proc-macro.rs @@ -1,7 +1,7 @@ -// edition:2018 -// compile-flags:--extern reproduction -// aux-build:proc-macro.rs -// check-pass +//@ edition:2018 +//@ compile-flags:--extern reproduction +//@ aux-build:proc-macro.rs +//@ check-pass reproduction::mac!(); diff --git a/tests/ui/crate-loading/invalid-rlib.rs b/tests/ui/crate-loading/invalid-rlib.rs index 0997bee19bb6e..0b401add8e494 100644 --- a/tests/ui/crate-loading/invalid-rlib.rs +++ b/tests/ui/crate-loading/invalid-rlib.rs @@ -1,8 +1,8 @@ -// compile-flags: --crate-type lib --extern foo={{src-base}}/crate-loading/auxiliary/libfoo.rlib -// normalize-stderr-test: "failed to mmap file '.*auxiliary/libfoo.rlib':.*" -> "failed to mmap file 'auxiliary/libfoo.rlib'" +//@ compile-flags: --crate-type lib --extern foo={{src-base}}/crate-loading/auxiliary/libfoo.rlib +//@ normalize-stderr-test: "failed to mmap file '.*auxiliary/libfoo.rlib':.*" -> "failed to mmap file 'auxiliary/libfoo.rlib'" // don't emit warn logging, it's basically the same as the errors and it's annoying to normalize -// rustc-env:RUSTC_LOG=error -// edition:2018 +//@ rustc-env:RUSTC_LOG=error +//@ edition:2018 #![no_std] use ::foo; //~ ERROR invalid metadata files for crate `foo` //~| NOTE failed to mmap file diff --git a/tests/ui/crate-loading/missing-std.rs b/tests/ui/crate-loading/missing-std.rs index 400d9f6e0ba12..ca9501cda3a91 100644 --- a/tests/ui/crate-loading/missing-std.rs +++ b/tests/ui/crate-loading/missing-std.rs @@ -1,6 +1,6 @@ -// compile-flags: --target x86_64-unknown-uefi -// needs-llvm-components: x86 -// rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: --target x86_64-unknown-uefi +//@ needs-llvm-components: x86 +//@ rustc-env:CARGO=/usr/bin/cargo #![feature(no_core)] #![no_core] extern crate core; diff --git a/tests/ui/crate-method-reexport-grrrrrrr.rs b/tests/ui/crate-method-reexport-grrrrrrr.rs index 55e05cfb203b9..870c6851a6616 100644 --- a/tests/ui/crate-method-reexport-grrrrrrr.rs +++ b/tests/ui/crate-method-reexport-grrrrrrr.rs @@ -1,11 +1,11 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 // This is a regression test that the metadata for the // name_pool::methods impl in the other crate is reachable from this // crate. -// aux-build:crate-method-reexport-grrrrrrr2.rs +//@ aux-build:crate-method-reexport-grrrrrrr2.rs extern crate crate_method_reexport_grrrrrrr2; diff --git a/tests/ui/crate-name-attr-used.rs b/tests/ui/crate-name-attr-used.rs index ad53a53143ee6..8e958aa0eaa31 100644 --- a/tests/ui/crate-name-attr-used.rs +++ b/tests/ui/crate-name-attr-used.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags:--crate-name crate_name_attr_used -F unused-attributes +//@ run-pass +//@ compile-flags:--crate-name crate_name_attr_used -F unused-attributes -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![crate_name = "crate_name_attr_used"] diff --git a/tests/ui/crate-name-mismatch.rs b/tests/ui/crate-name-mismatch.rs index 23ad39a6f92d5..7651e0f97ebe3 100644 --- a/tests/ui/crate-name-mismatch.rs +++ b/tests/ui/crate-name-mismatch.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-name foo +//@ compile-flags: --crate-name foo #![crate_name = "bar"] //~^ ERROR: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar` diff --git a/tests/ui/cross-crate/cci_borrow.rs b/tests/ui/cross-crate/cci_borrow.rs index fee6b5d03a9e5..e132be318f432 100644 --- a/tests/ui/cross-crate/cci_borrow.rs +++ b/tests/ui/cross-crate/cci_borrow.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_borrow_lib.rs +//@ run-pass +//@ aux-build:cci_borrow_lib.rs extern crate cci_borrow_lib; use cci_borrow_lib::foo; diff --git a/tests/ui/cross-crate/cci_capture_clause.rs b/tests/ui/cross-crate/cci_capture_clause.rs index ea699b5f5ac4e..99736ad185de4 100644 --- a/tests/ui/cross-crate/cci_capture_clause.rs +++ b/tests/ui/cross-crate/cci_capture_clause.rs @@ -1,11 +1,11 @@ -// run-pass -// aux-build:cci_capture_clause.rs +//@ run-pass +//@ aux-build:cci_capture_clause.rs // This test makes sure we can do cross-crate inlining on functions // that use capture clauses. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support extern crate cci_capture_clause; diff --git a/tests/ui/cross-crate/cci_impl_exe.rs b/tests/ui/cross-crate/cci_impl_exe.rs index b11fb23ebc8af..46433222f6fc0 100644 --- a/tests/ui/cross-crate/cci_impl_exe.rs +++ b/tests/ui/cross-crate/cci_impl_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_impl_lib.rs +//@ run-pass +//@ aux-build:cci_impl_lib.rs extern crate cci_impl_lib; use cci_impl_lib::uint_helpers; diff --git a/tests/ui/cross-crate/cci_iter_exe.rs b/tests/ui/cross-crate/cci_iter_exe.rs index 8b58d90fe4e2c..3ec0120a0c65f 100644 --- a/tests/ui/cross-crate/cci_iter_exe.rs +++ b/tests/ui/cross-crate/cci_iter_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_iter_lib.rs +//@ run-pass +//@ aux-build:cci_iter_lib.rs extern crate cci_iter_lib; diff --git a/tests/ui/cross-crate/cci_nested_exe.rs b/tests/ui/cross-crate/cci_nested_exe.rs index 1c001a2a37201..6e224e05dc3e6 100644 --- a/tests/ui/cross-crate/cci_nested_exe.rs +++ b/tests/ui/cross-crate/cci_nested_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_nested_lib.rs +//@ run-pass +//@ aux-build:cci_nested_lib.rs extern crate cci_nested_lib; diff --git a/tests/ui/cross-crate/cci_no_inline_exe.rs b/tests/ui/cross-crate/cci_no_inline_exe.rs index ffc701678d3b6..c23546ffe849c 100644 --- a/tests/ui/cross-crate/cci_no_inline_exe.rs +++ b/tests/ui/cross-crate/cci_no_inline_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_no_inline_lib.rs +//@ run-pass +//@ aux-build:cci_no_inline_lib.rs extern crate cci_no_inline_lib; use cci_no_inline_lib::iter; diff --git a/tests/ui/cross-crate/const-cross-crate-const.rs b/tests/ui/cross-crate/const-cross-crate-const.rs index 92020417ff5ac..ac36969083ee7 100644 --- a/tests/ui/cross-crate/const-cross-crate-const.rs +++ b/tests/ui/cross-crate/const-cross-crate-const.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs #![allow(non_upper_case_globals)] extern crate cci_const; diff --git a/tests/ui/cross-crate/const-cross-crate-extern.rs b/tests/ui/cross-crate/const-cross-crate-extern.rs index 3c61afd5becd4..8d48a6a520606 100644 --- a/tests/ui/cross-crate/const-cross-crate-extern.rs +++ b/tests/ui/cross-crate/const-cross-crate-extern.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs #![allow(non_upper_case_globals)] extern crate cci_const; diff --git a/tests/ui/cross-crate/cross-crate-const-pat.rs b/tests/ui/cross-crate/cross-crate-const-pat.rs index e8fa8485ab2fb..4ff55adb8042c 100644 --- a/tests/ui/cross-crate/cross-crate-const-pat.rs +++ b/tests/ui/cross-crate/cross-crate-const-pat.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate cci_const; diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs index 82bb95f1ef2b3..219957db30a34 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs @@ -1,6 +1,6 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] pub trait Object { fn method(&self) { } } diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs index 21c0274b991fc..62b47f9c6d232 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 -C prefer-dynamic +//@ compile-flags: -C debuginfo=2 -C prefer-dynamic #![crate_type="dylib"] diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs index 611238f56173a..a829668ef6aa1 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -C debuginfo=2 +//@ no-prefer-dynamic +//@ compile-flags: -C debuginfo=2 #![crate_type="rlib"] extern crate b_reexport_obj; diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs b/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs index 8d73f9b666f1e..cbc7c26a7efd4 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 -C prefer-dynamic +//@ compile-flags: -C debuginfo=2 -C prefer-dynamic #![crate_type="rlib"] diff --git a/tests/ui/cross-crate/issue-64872/issue-64872.rs b/tests/ui/cross-crate/issue-64872/issue-64872.rs index 20fe2053cc7c3..e510475378987 100644 --- a/tests/ui/cross-crate/issue-64872/issue-64872.rs +++ b/tests/ui/cross-crate/issue-64872/issue-64872.rs @@ -1,14 +1,14 @@ -// run-pass +//@ run-pass // note that these aux-build directives must be in this order: the // later crates depend on the earlier ones. (The particular bug that // is being exercised here used to exhibit itself during the build of // `chain_of_rlibs_and_dylibs.dylib`) -// aux-build:a_def_obj.rs -// aux-build:b_reexport_obj.rs -// aux-build:c_another_vtable_for_obj.rs -// aux-build:d_chain_of_rlibs_and_dylibs.rs +//@ aux-build:a_def_obj.rs +//@ aux-build:b_reexport_obj.rs +//@ aux-build:c_another_vtable_for_obj.rs +//@ aux-build:d_chain_of_rlibs_and_dylibs.rs extern crate d_chain_of_rlibs_and_dylibs; diff --git a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs index 3881e3352202f..640a1789cbe85 100644 --- a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs +++ b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:moves_based_on_type_lib.rs +//@ run-pass +//@ aux-build:moves_based_on_type_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate moves_based_on_type_lib; use moves_based_on_type_lib::f; diff --git a/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs b/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs index 8c70a1ce477cc..6092ff8a40d81 100644 --- a/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs +++ b/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:reexported_static_methods.rs +//@ run-pass +//@ aux-build:reexported_static_methods.rs extern crate reexported_static_methods; diff --git a/tests/ui/cross-crate/static-array-across-crate.rs b/tests/ui/cross-crate/static-array-across-crate.rs index 0b84e0e6a3f58..fecdf41c29826 100644 --- a/tests/ui/cross-crate/static-array-across-crate.rs +++ b/tests/ui/cross-crate/static-array-across-crate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:pub_static_array.rs +//@ aux-build:pub_static_array.rs extern crate pub_static_array as array; diff --git a/tests/ui/cross-crate/static-init.rs b/tests/ui/cross-crate/static-init.rs index 0b50c41fc5ed0..090ad5f810e16 100644 --- a/tests/ui/cross-crate/static-init.rs +++ b/tests/ui/cross-crate/static-init.rs @@ -1,6 +1,6 @@ // Regression test for #84455 and #115052. -// run-pass -// aux-build:static_init_aux.rs +//@ run-pass +//@ aux-build:static_init_aux.rs extern crate static_init_aux as aux; static V: &u32 = aux::V; diff --git a/tests/ui/cross-crate/xcrate-address-insignificant.rs b/tests/ui/cross-crate/xcrate-address-insignificant.rs index 33c70650603e0..891fe14d9a041 100644 --- a/tests/ui/cross-crate/xcrate-address-insignificant.rs +++ b/tests/ui/cross-crate/xcrate-address-insignificant.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_address_insignificant.rs +//@ run-pass +//@ aux-build:xcrate_address_insignificant.rs extern crate xcrate_address_insignificant as foo; diff --git a/tests/ui/cross-crate/xcrate-associated-type-defaults.rs b/tests/ui/cross-crate/xcrate-associated-type-defaults.rs index 0f3e077d1de34..04eb90afae986 100644 --- a/tests/ui/cross-crate/xcrate-associated-type-defaults.rs +++ b/tests/ui/cross-crate/xcrate-associated-type-defaults.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_associated_type_defaults.rs +//@ run-pass +//@ aux-build:xcrate_associated_type_defaults.rs extern crate xcrate_associated_type_defaults; use xcrate_associated_type_defaults::Foo; diff --git a/tests/ui/cross-crate/xcrate-static-addresses.rs b/tests/ui/cross-crate/xcrate-static-addresses.rs index 3c33976568e94..66ac467e9acd9 100644 --- a/tests/ui/cross-crate/xcrate-static-addresses.rs +++ b/tests/ui/cross-crate/xcrate-static-addresses.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:xcrate_static_addresses.rs +//@ run-pass +//@ aux-build:xcrate_static_addresses.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate xcrate_static_addresses; diff --git a/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs b/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs index 1fd7eb878d98a..28955e62d9584 100644 --- a/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs +++ b/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:xcrate-trait-lifetime-param.rs +//@ aux-build:xcrate-trait-lifetime-param.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate xcrate_trait_lifetime_param as other; diff --git a/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs b/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs index 4593fec5196ac..dbfcdf8197ad9 100644 --- a/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs +++ b/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_generic_fn_nested_return.rs +//@ run-pass +//@ aux-build:xcrate_generic_fn_nested_return.rs extern crate xcrate_generic_fn_nested_return as test; diff --git a/tests/ui/cross/cross-crate-macro-backtrace/main.rs b/tests/ui/cross/cross-crate-macro-backtrace/main.rs index f7d4330ab19a1..7ef9bdfb16437 100644 --- a/tests/ui/cross/cross-crate-macro-backtrace/main.rs +++ b/tests/ui/cross/cross-crate-macro-backtrace/main.rs @@ -1,4 +1,4 @@ -// aux-build:extern_macro_crate.rs +//@ aux-build:extern_macro_crate.rs #[macro_use(myprintln, myprint)] extern crate extern_macro_crate; diff --git a/tests/ui/cross/cross-file-errors/underscore.rs b/tests/ui/cross/cross-file-errors/underscore.rs index 4dd91c13ea9c5..9d075735393d0 100644 --- a/tests/ui/cross/cross-file-errors/underscore.rs +++ b/tests/ui/cross/cross-file-errors/underscore.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![crate_type = "lib"] macro_rules! underscore { diff --git a/tests/ui/custom-test-frameworks-simple.rs b/tests/ui/custom-test-frameworks-simple.rs index aee0040ef4de4..3fb7de6b26bdc 100644 --- a/tests/ui/custom-test-frameworks-simple.rs +++ b/tests/ui/custom-test-frameworks-simple.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-pass +//@ compile-flags: --test +//@ run-pass #![feature(custom_test_frameworks)] #![test_runner(crate::foo_runner)] diff --git a/tests/ui/custom_test_frameworks/dynamic.rs b/tests/ui/custom_test_frameworks/dynamic.rs index 6766ec542b1b9..7cbc9fd5c8dd1 100644 --- a/tests/ui/custom_test_frameworks/dynamic.rs +++ b/tests/ui/custom_test_frameworks/dynamic.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:dynamic_runner.rs -// compile-flags:--test +//@ run-pass +//@ aux-build:dynamic_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(dynamic_runner::runner)] diff --git a/tests/ui/custom_test_frameworks/full.rs b/tests/ui/custom_test_frameworks/full.rs index 8c81882685782..289767b1f698a 100644 --- a/tests/ui/custom_test_frameworks/full.rs +++ b/tests/ui/custom_test_frameworks/full.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:example_runner.rs -// compile-flags:--test +//@ run-pass +//@ aux-build:example_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(example_runner::runner)] diff --git a/tests/ui/custom_test_frameworks/mismatch.rs b/tests/ui/custom_test_frameworks/mismatch.rs index ac850552b5bd4..c4773c13264e8 100644 --- a/tests/ui/custom_test_frameworks/mismatch.rs +++ b/tests/ui/custom_test_frameworks/mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:example_runner.rs -// compile-flags:--test +//@ aux-build:example_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(example_runner::runner)] diff --git a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs index 761539227a79c..ac857ff34a4d7 100644 --- a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs +++ b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 // fixes issue #94725 #![feature(allocator_api)] diff --git a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs index ff764015dc76f..8611796501643 100644 --- a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs +++ b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs @@ -1,7 +1,7 @@ -// build-pass -// only-linux +//@ build-pass +//@ only-linux // -// compile-flags: -g --emit=llvm-ir -Csplit-debuginfo=unpacked +//@ compile-flags: -g --emit=llvm-ir -Csplit-debuginfo=unpacked // // Make sure that we don't explode with an error if we don't actually end up emitting any `dwo`s, // as would be the case if we don't actually codegen anything. diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs index 78bda28485dce..6d70764b9f761 100644 --- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs +++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs @@ -1,11 +1,11 @@ // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that // causes a layout error. See https://github.com/rust-lang/rust/issues/94961. -// compile-flags:-C debuginfo=2 -// build-fail -// error-pattern: too big for the current architecture -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ compile-flags:-C debuginfo=2 +//@ build-fail +//@ error-pattern: too big for the current architecture +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" #![crate_type = "rlib"] diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs index fdc088dc0f9a5..a84dec10abd17 100644 --- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs +++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs @@ -3,11 +3,11 @@ // This version of the test already ICE'd before the commit that introduce the ICE described in // https://github.com/rust-lang/rust/issues/94961. -// compile-flags:-C debuginfo=2 -// build-fail -// error-pattern: too big for the current architecture -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ compile-flags:-C debuginfo=2 +//@ build-fail +//@ error-pattern: too big for the current architecture +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" #![crate_type = "rlib"] diff --git a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs index b3f22ecf5115e..e082a172e3517 100644 --- a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs +++ b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 // fixes issue #94149 #![allow(dead_code)] diff --git a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs index 6c6eb5d4e86b7..7b850f32b4b6b 100644 --- a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs +++ b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3 fn main() { TranslatorI.visit_pre(); diff --git a/tests/ui/debuginfo/late-bound-projection.rs b/tests/ui/debuginfo/late-bound-projection.rs index 6018078459cc2..988ea9f086e2c 100644 --- a/tests/ui/debuginfo/late-bound-projection.rs +++ b/tests/ui/debuginfo/late-bound-projection.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 --crate-type=rlib +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 --crate-type=rlib // Fixes issue #94998 pub trait Trait {} diff --git a/tests/ui/debuginfo/sroa-fragment-debuginfo.rs b/tests/ui/debuginfo/sroa-fragment-debuginfo.rs index fc3bbb88efe83..909fa4fefbd2f 100644 --- a/tests/ui/debuginfo/sroa-fragment-debuginfo.rs +++ b/tests/ui/debuginfo/sroa-fragment-debuginfo.rs @@ -1,8 +1,8 @@ // Verify that we do not trigger an LLVM assertion by creating zero-sized DWARF fragments. // -// build-pass -// compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates -// compile-flags: -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates +//@ compile-flags: -Cno-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/ui/deduplicate-diagnostics.rs b/tests/ui/deduplicate-diagnostics.rs index 7d1c4f5f83823..54bd5dd5098c1 100644 --- a/tests/ui/deduplicate-diagnostics.rs +++ b/tests/ui/deduplicate-diagnostics.rs @@ -1,5 +1,5 @@ -// revisions: duplicate deduplicate -//[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes +//@ revisions: duplicate deduplicate +//@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes #[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` in this scope //[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope diff --git a/tests/ui/deep.rs b/tests/ui/deep.rs index 2bb109c0e3f0f..5a631d068b1ae 100644 --- a/tests/ui/deep.rs +++ b/tests/ui/deep.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten apparently blows the stack +//@ run-pass +//@ ignore-emscripten apparently blows the stack fn f(x: isize) -> isize { if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; } diff --git a/tests/ui/default-method-parsing.rs b/tests/ui/default-method-parsing.rs index 5001d58f0a48e..2580a04221fb0 100644 --- a/tests/ui/default-method-parsing.rs +++ b/tests/ui/default-method-parsing.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn m(&self, _:isize) { } diff --git a/tests/ui/default-method-simple.rs b/tests/ui/default-method-simple.rs index 6f7ae6a3e0b5e..e5fbedfaece1e 100644 --- a/tests/ui/default-method-simple.rs +++ b/tests/ui/default-method-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/defaults-well-formedness.rs b/tests/ui/defaults-well-formedness.rs index 3275890616b75..e5e48edad88f4 100644 --- a/tests/ui/defaults-well-formedness.rs +++ b/tests/ui/defaults-well-formedness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/definition-reachable/field-method.rs b/tests/ui/definition-reachable/field-method.rs index 60e895a2f9a07..d15b982a621e6 100644 --- a/tests/ui/definition-reachable/field-method.rs +++ b/tests/ui/definition-reachable/field-method.rs @@ -1,8 +1,8 @@ // Check that functions accessible through a field visible to a macro are // considered reachable -// aux-build:nested-fn-macro.rs -// run-pass +//@ aux-build:nested-fn-macro.rs +//@ run-pass extern crate nested_fn_macro; diff --git a/tests/ui/definition-reachable/nested-fn.rs b/tests/ui/definition-reachable/nested-fn.rs index b665b049f32f9..94f3520ed7356 100644 --- a/tests/ui/definition-reachable/nested-fn.rs +++ b/tests/ui/definition-reachable/nested-fn.rs @@ -1,8 +1,8 @@ // Check that functions visible to macros through paths with >2 segments are // considered reachable -// aux-build:field-method-macro.rs -// run-pass +//@ aux-build:field-method-macro.rs +//@ run-pass extern crate field_method_macro; diff --git a/tests/ui/definition-reachable/private-non-types.rs b/tests/ui/definition-reachable/private-non-types.rs index a601dabcb0b3f..287952bf1fcc7 100644 --- a/tests/ui/definition-reachable/private-non-types.rs +++ b/tests/ui/definition-reachable/private-non-types.rs @@ -1,7 +1,7 @@ // Check that we don't require stability annotations for private modules, // imports and fields that are accessible to opaque macros. -// check-pass +//@ check-pass #![feature(decl_macro, staged_api)] #![stable(feature = "test", since = "1.0.0")] diff --git a/tests/ui/definition-reachable/private-types.rs b/tests/ui/definition-reachable/private-types.rs index 02c1224f4e142..a0b6c888505a0 100644 --- a/tests/ui/definition-reachable/private-types.rs +++ b/tests/ui/definition-reachable/private-types.rs @@ -1,6 +1,6 @@ // Check that type privacy is taken into account when considering reachability -// check-pass +//@ check-pass #![feature(decl_macro, staged_api)] #![stable(feature = "test", since = "1.0.0")] diff --git a/tests/ui/definition-reachable/private-use.rs b/tests/ui/definition-reachable/private-use.rs index 02cff0475e586..97517fcb9e27c 100644 --- a/tests/ui/definition-reachable/private-use.rs +++ b/tests/ui/definition-reachable/private-use.rs @@ -1,7 +1,7 @@ // Check that private use statements can be used by -// run-pass -// aux-build:private-use-macro.rs +//@ run-pass +//@ aux-build:private-use-macro.rs extern crate private_use_macro; diff --git a/tests/ui/delegation/explicit-paths-in-traits-pass.rs b/tests/ui/delegation/explicit-paths-in-traits-pass.rs index 5c41c2ff49c8d..4abcc18b9b2cf 100644 --- a/tests/ui/delegation/explicit-paths-in-traits-pass.rs +++ b/tests/ui/delegation/explicit-paths-in-traits-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/explicit-paths-pass.rs b/tests/ui/delegation/explicit-paths-pass.rs index 331e06d9a8879..140605a2bc5bf 100644 --- a/tests/ui/delegation/explicit-paths-pass.rs +++ b/tests/ui/delegation/explicit-paths-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/explicit-paths-signature-pass.rs b/tests/ui/delegation/explicit-paths-signature-pass.rs index 826107130eb0e..b53e577992466 100644 --- a/tests/ui/delegation/explicit-paths-signature-pass.rs +++ b/tests/ui/delegation/explicit-paths-signature-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/parse.rs b/tests/ui/delegation/parse.rs index 791cc1630ff7d..5e8026c553212 100644 --- a/tests/ui/delegation/parse.rs +++ b/tests/ui/delegation/parse.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![feature(fn_delegation)] diff --git a/tests/ui/delegation/target-expr-pass.rs b/tests/ui/delegation/target-expr-pass.rs index 4ccb81c292aa5..1f2edf0dc13fc 100644 --- a/tests/ui/delegation/target-expr-pass.rs +++ b/tests/ui/delegation/target-expr-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs index 978c1994800c9..9525ff2e5ef9e 100644 --- a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs +++ b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs @@ -1,8 +1,8 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-caller-callee.rs b/tests/ui/dep-graph/dep-graph-caller-callee.rs index 4a3a8bb6bf939..e56cd5202e521 100644 --- a/tests/ui/dep-graph/dep-graph-caller-callee.rs +++ b/tests/ui/dep-graph/dep-graph-caller-callee.rs @@ -1,8 +1,8 @@ // Test that immediate callers have to change when callee changes, but // not callers' callers. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-dump.rs b/tests/ui/dep-graph/dep-graph-dump.rs index cbc4def0e03aa..7aede27d125c4 100644 --- a/tests/ui/dep-graph/dep-graph-dump.rs +++ b/tests/ui/dep-graph/dep-graph-dump.rs @@ -1,6 +1,6 @@ // Test dump-dep-graph requires query-dep-graph enabled -// incremental -// compile-flags: -Z dump-dep-graph +//@ incremental +//@ compile-flags: -Z dump-dep-graph fn main() {} diff --git a/tests/ui/dep-graph/dep-graph-struct-signature.rs b/tests/ui/dep-graph/dep-graph-struct-signature.rs index fcf9f6387102f..5303c6d2e53bd 100644 --- a/tests/ui/dep-graph/dep-graph-struct-signature.rs +++ b/tests/ui/dep-graph/dep-graph-struct-signature.rs @@ -1,8 +1,8 @@ // Test cases where a changing struct appears in the signature of fns // and methods. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs index 5da8df5706464..b3e8e9a512ef0 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs @@ -1,8 +1,8 @@ // Test that adding an impl to a trait `Foo` DOES affect functions // that only use `Bar` if they have methods in common. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs index 0331e75b2fe8d..7c612158bf09d 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs @@ -1,8 +1,8 @@ // Test that adding an impl to a trait `Foo` does not affect functions // that only use `Bar`, so long as they do not have methods in common. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl.rs b/tests/ui/dep-graph/dep-graph-trait-impl.rs index 19002965b9372..38cc88e567d8a 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl.rs @@ -1,8 +1,8 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-type-alias.rs b/tests/ui/dep-graph/dep-graph-type-alias.rs index 0e1b3db192518..30cef4b27ef06 100644 --- a/tests/ui/dep-graph/dep-graph-type-alias.rs +++ b/tests/ui/dep-graph/dep-graph-type-alias.rs @@ -1,7 +1,7 @@ // Test that changing what a `type` points to does not go unnoticed. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-variance-alias.rs b/tests/ui/dep-graph/dep-graph-variance-alias.rs index 008434696d63d..8a67fe6d7271d 100644 --- a/tests/ui/dep-graph/dep-graph-variance-alias.rs +++ b/tests/ui/dep-graph/dep-graph-variance-alias.rs @@ -1,8 +1,8 @@ // Test that changing what a `type` points to does not go unnoticed // by the variance analysis. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/deployment-target/invalid-target.rs b/tests/ui/deployment-target/invalid-target.rs index 336624320a32c..52f09ea73d739 100644 --- a/tests/ui/deployment-target/invalid-target.rs +++ b/tests/ui/deployment-target/invalid-target.rs @@ -1,4 +1,4 @@ -// compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target -// needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target +//@ needs-llvm-components: x86 fn main() {} diff --git a/tests/ui/deployment-target/macos-target.rs b/tests/ui/deployment-target/macos-target.rs index 701ccf4799a44..be2c32e28141b 100644 --- a/tests/ui/deployment-target/macos-target.rs +++ b/tests/ui/deployment-target/macos-target.rs @@ -1,7 +1,7 @@ -// only-macos -// compile-flags: --print deployment-target -// normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." -// normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" -// check-pass +//@ only-macos +//@ compile-flags: --print deployment-target +//@ normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." +//@ normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" +//@ check-pass fn main() {} diff --git a/tests/ui/deprecation-in-force-unstable.rs b/tests/ui/deprecation-in-force-unstable.rs index 4df9b802d45a9..6aaf29b069a65 100644 --- a/tests/ui/deprecation-in-force-unstable.rs +++ b/tests/ui/deprecation-in-force-unstable.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zforce-unstable-if-unmarked +//@ run-pass +//@ compile-flags:-Zforce-unstable-if-unmarked #[deprecated] // should work even with -Zforce-unstable-if-unmarked fn main() { } diff --git a/tests/ui/deprecation/atomic_initializers.fixed b/tests/ui/deprecation/atomic_initializers.fixed index 4fb0aeeb573e0..8738f744e11d8 100644 --- a/tests/ui/deprecation/atomic_initializers.fixed +++ b/tests/ui/deprecation/atomic_initializers.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/tests/ui/deprecation/atomic_initializers.rs b/tests/ui/deprecation/atomic_initializers.rs index 1dcfd36d7d575..c984fa2e8d8f9 100644 --- a/tests/ui/deprecation/atomic_initializers.rs +++ b/tests/ui/deprecation/atomic_initializers.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/tests/ui/deprecation/deprecated-macro_escape-inner.rs b/tests/ui/deprecation/deprecated-macro_escape-inner.rs index e2957c422f6d5..a5e81d305eddb 100644 --- a/tests/ui/deprecation/deprecated-macro_escape-inner.rs +++ b/tests/ui/deprecation/deprecated-macro_escape-inner.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { #![macro_escape] //~ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]` diff --git a/tests/ui/deprecation/deprecated-macro_escape.rs b/tests/ui/deprecation/deprecated-macro_escape.rs index 4a89b40625e68..4dc19fa6b2875 100644 --- a/tests/ui/deprecation/deprecated-macro_escape.rs +++ b/tests/ui/deprecation/deprecated-macro_escape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[macro_escape] //~ WARNING `#[macro_escape]` is a deprecated synonym for `#[macro_use]` mod foo {} diff --git a/tests/ui/deprecation/deprecation-in-future.rs b/tests/ui/deprecation/deprecation-in-future.rs index fb2a9a401ed22..23c7c3373b37c 100644 --- a/tests/ui/deprecation/deprecation-in-future.rs +++ b/tests/ui/deprecation/deprecation-in-future.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(deprecated_in_future)] diff --git a/tests/ui/deprecation/deprecation-lint-2.rs b/tests/ui/deprecation/deprecation-lint-2.rs index 16ed6d4ecd6eb..553b1afe45caa 100644 --- a/tests/ui/deprecation/deprecation-lint-2.rs +++ b/tests/ui/deprecation/deprecation-lint-2.rs @@ -1,5 +1,5 @@ -// aux-build:deprecation-lint.rs -// error-pattern: use of deprecated function +//@ aux-build:deprecation-lint.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] diff --git a/tests/ui/deprecation/deprecation-lint-3.rs b/tests/ui/deprecation/deprecation-lint-3.rs index e6e1587daeb46..f01fc9244570a 100644 --- a/tests/ui/deprecation/deprecation-lint-3.rs +++ b/tests/ui/deprecation/deprecation-lint-3.rs @@ -1,5 +1,5 @@ -// aux-build:deprecation-lint.rs -// error-pattern: use of deprecated function +//@ aux-build:deprecation-lint.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/deprecation/deprecation-lint.rs b/tests/ui/deprecation/deprecation-lint.rs index 83056feaf2749..dc11a4d56a2d6 100644 --- a/tests/ui/deprecation/deprecation-lint.rs +++ b/tests/ui/deprecation/deprecation-lint.rs @@ -1,4 +1,4 @@ -// aux-build:deprecation-lint.rs +//@ aux-build:deprecation-lint.rs #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/deprecation/derive_on_deprecated.rs b/tests/ui/deprecation/derive_on_deprecated.rs index ac771ac81d118..b3d784aec37b3 100644 --- a/tests/ui/deprecation/derive_on_deprecated.rs +++ b/tests/ui/deprecation/derive_on_deprecated.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(deprecated)] diff --git a/tests/ui/deprecation/derive_on_deprecated_forbidden.rs b/tests/ui/deprecation/derive_on_deprecated_forbidden.rs index 3fd4346646756..c240a6938fc55 100644 --- a/tests/ui/deprecation/derive_on_deprecated_forbidden.rs +++ b/tests/ui/deprecation/derive_on_deprecated_forbidden.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![forbid(deprecated)] diff --git a/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs b/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs index a2d0023e3f479..453494cf18bca 100644 --- a/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs +++ b/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![no_implicit_prelude] diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed index 659b546552229..a419a7f5e826a 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(deprecated)] diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs index cfc6c4450b4ab..690554ffe1993 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(deprecated)] diff --git a/tests/ui/deprecation/suggestion.fixed b/tests/ui/deprecation/suggestion.fixed index d9fa2b56eeef7..3bb1d039d11bb 100644 --- a/tests/ui/deprecation/suggestion.fixed +++ b/tests/ui/deprecation/suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(staged_api)] #![feature(deprecated_suggestion)] diff --git a/tests/ui/deprecation/suggestion.rs b/tests/ui/deprecation/suggestion.rs index 9dc2eaf255507..a9de9ddfbe98d 100644 --- a/tests/ui/deprecation/suggestion.rs +++ b/tests/ui/deprecation/suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(staged_api)] #![feature(deprecated_suggestion)] diff --git a/tests/ui/deprecation/try-macro-suggestion.rs b/tests/ui/deprecation/try-macro-suggestion.rs index 635ceac0b199e..1e477ab9c88f9 100644 --- a/tests/ui/deprecation/try-macro-suggestion.rs +++ b/tests/ui/deprecation/try-macro-suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 fn foo() -> Result<(), ()> { Ok(try!()); //~ ERROR use of deprecated `try` macro Ok(try!(Ok(()))) //~ ERROR use of deprecated `try` macro diff --git a/tests/ui/deref-patterns/basic.rs b/tests/ui/deref-patterns/basic.rs index 249716040a177..d76fb697f4062 100644 --- a/tests/ui/deref-patterns/basic.rs +++ b/tests/ui/deref-patterns/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(string_deref_patterns)] fn main() { diff --git a/tests/ui/deref-patterns/default-infer.rs b/tests/ui/deref-patterns/default-infer.rs index 050b847305b16..4f926175bd335 100644 --- a/tests/ui/deref-patterns/default-infer.rs +++ b/tests/ui/deref-patterns/default-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(string_deref_patterns)] fn main() { diff --git a/tests/ui/deref-patterns/refs.rs b/tests/ui/deref-patterns/refs.rs index 97e260d2752bb..c93e579bfd804 100644 --- a/tests/ui/deref-patterns/refs.rs +++ b/tests/ui/deref-patterns/refs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(string_deref_patterns)] fn foo(s: &String) -> i32 { diff --git a/tests/ui/deref-rc.rs b/tests/ui/deref-rc.rs index 9b4c63b192565..92fdd90035924 100644 --- a/tests/ui/deref-rc.rs +++ b/tests/ui/deref-rc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/deref.rs b/tests/ui/deref.rs index 0d4e08ad95476..b491c517d94fa 100644 --- a/tests/ui/deref.rs +++ b/tests/ui/deref.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x: Box = Box::new(10); diff --git a/tests/ui/derive-uninhabited-enum-38885.rs b/tests/ui/derive-uninhabited-enum-38885.rs index c11df0300250f..2259a542706e1 100644 --- a/tests/ui/derive-uninhabited-enum-38885.rs +++ b/tests/ui/derive-uninhabited-enum-38885.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Wunused +//@ check-pass +//@ compile-flags: -Wunused // ensure there are no special warnings about uninhabited types // when deriving Debug on an empty enum diff --git a/tests/ui/derives/auxiliary/derive-marker-tricky.rs b/tests/ui/derives/auxiliary/derive-marker-tricky.rs index 70345351bd09d..0f1c30811a2d6 100644 --- a/tests/ui/derives/auxiliary/derive-marker-tricky.rs +++ b/tests/ui/derives/auxiliary/derive-marker-tricky.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/derives/derive-Debug-use-ufcs-struct.rs b/tests/ui/derives/derive-Debug-use-ufcs-struct.rs index cb9dda8415927..376d230b27555 100644 --- a/tests/ui/derives/derive-Debug-use-ufcs-struct.rs +++ b/tests/ui/derives/derive-Debug-use-ufcs-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #[derive(Debug)] diff --git a/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs b/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs index 5f786769fe73b..4061c02fcd7fa 100644 --- a/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs +++ b/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #[derive(Debug)] diff --git a/tests/ui/derives/derive-hygiene.rs b/tests/ui/derives/derive-hygiene.rs index 4fa83c490383c..0b6ab8b666b31 100644 --- a/tests/ui/derives/derive-hygiene.rs +++ b/tests/ui/derives/derive-hygiene.rs @@ -1,7 +1,7 @@ // Make sure that built-in derives don't rely on the user not declaring certain // names to work properly. -// check-pass +//@ check-pass #![allow(nonstandard_style)] #![feature(decl_macro)] diff --git a/tests/ui/derives/derive-macro-const-default.rs b/tests/ui/derives/derive-macro-const-default.rs index ce80271d274b0..5bba29d113396 100644 --- a/tests/ui/derives/derive-macro-const-default.rs +++ b/tests/ui/derives/derive-macro-const-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, PartialEq, Debug)] struct Example([T; N]); diff --git a/tests/ui/derives/derive-marker-tricky.rs b/tests/ui/derives/derive-marker-tricky.rs index 730ea4714c789..ad03b6c2cd276 100644 --- a/tests/ui/derives/derive-marker-tricky.rs +++ b/tests/ui/derives/derive-marker-tricky.rs @@ -1,8 +1,8 @@ // Test that `#[rustc_copy_clone_marker]` is not injected when a user-defined derive shadows // a built-in derive in non-trivial scope (e.g. in a nested module). -// check-pass -// aux-build:derive-marker-tricky.rs +//@ check-pass +//@ aux-build:derive-marker-tricky.rs extern crate derive_marker_tricky; diff --git a/tests/ui/derives/derive-multiple-with-packed.rs b/tests/ui/derives/derive-multiple-with-packed.rs index e762ee357caab..4db11d472f8c5 100644 --- a/tests/ui/derives/derive-multiple-with-packed.rs +++ b/tests/ui/derives/derive-multiple-with-packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Copy)] #[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]` diff --git a/tests/ui/derives/derive-partial-ord.rs b/tests/ui/derives/derive-partial-ord.rs index 9078a7ffa4fd7..ae338a4c95b01 100644 --- a/tests/ui/derives/derive-partial-ord.rs +++ b/tests/ui/derives/derive-partial-ord.rs @@ -1,7 +1,7 @@ // Checks that in a derived implementation of PartialOrd the lt, le, ge, gt methods are consistent // with partial_cmp. Also verifies that implementation is consistent with that for tuples. // -// run-pass +//@ run-pass #[derive(PartialEq, PartialOrd)] struct P(f64, f64); diff --git a/tests/ui/derives/derive-renamed.rs b/tests/ui/derives/derive-renamed.rs index d310e5806c560..d0297054cb2f4 100644 --- a/tests/ui/derives/derive-renamed.rs +++ b/tests/ui/derives/derive-renamed.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use derive as my_derive; diff --git a/tests/ui/derives/deriving-meta-empty-trait-list.rs b/tests/ui/derives/deriving-meta-empty-trait-list.rs index 0306ce717d049..37265c8d1a89e 100644 --- a/tests/ui/derives/deriving-meta-empty-trait-list.rs +++ b/tests/ui/derives/deriving-meta-empty-trait-list.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused)] diff --git a/tests/ui/deriving/auxiliary/derive-no-std.rs b/tests/ui/deriving/auxiliary/derive-no-std.rs index 3893dc1be079c..17c2715376590 100644 --- a/tests/ui/deriving/auxiliary/derive-no-std.rs +++ b/tests/ui/deriving/auxiliary/derive-no-std.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/deriving/derive-no-std.rs b/tests/ui/deriving/derive-no-std.rs index 74c73b99cb923..3683ec7ca7c05 100644 --- a/tests/ui/deriving/derive-no-std.rs +++ b/tests/ui/deriving/derive-no-std.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:derive-no-std.rs +//@ run-pass +//@ aux-build:derive-no-std.rs extern crate derive_no_std; use derive_no_std::*; diff --git a/tests/ui/deriving/derive-partialord-correctness.rs b/tests/ui/deriving/derive-partialord-correctness.rs index 36763eda169a9..7ccfa3d17bfab 100644 --- a/tests/ui/deriving/derive-partialord-correctness.rs +++ b/tests/ui/deriving/derive-partialord-correctness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Original issue: #49650 #[derive(PartialOrd, PartialEq)] diff --git a/tests/ui/deriving/deriving-all-codegen.rs b/tests/ui/deriving/deriving-all-codegen.rs index 51f9708d3cd62..498930fc0c664 100644 --- a/tests/ui/deriving/deriving-all-codegen.rs +++ b/tests/ui/deriving/deriving-all-codegen.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Zunpretty=expanded -// edition:2021 +//@ check-pass +//@ compile-flags: -Zunpretty=expanded +//@ edition:2021 // // This test checks the code generated for all[*] the builtin derivable traits // on a variety of structs and enums. It protects against accidental changes to diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout index 9c6f4d3094b55..a027452797554 100644 --- a/tests/ui/deriving/deriving-all-codegen.stdout +++ b/tests/ui/deriving/deriving-all-codegen.stdout @@ -1,7 +1,7 @@ #![feature(prelude_import)] -// check-pass -// compile-flags: -Zunpretty=expanded -// edition:2021 +//@ check-pass +//@ compile-flags: -Zunpretty=expanded +//@ edition:2021 // // This test checks the code generated for all[*] the builtin derivable traits // on a variety of structs and enums. It protects against accidental changes to diff --git a/tests/ui/deriving/deriving-associated-types.rs b/tests/ui/deriving/deriving-associated-types.rs index 4b1cbe80c506d..22dcd8d7cc035 100644 --- a/tests/ui/deriving/deriving-associated-types.rs +++ b/tests/ui/deriving/deriving-associated-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait DeclaredTrait { type Type; } diff --git a/tests/ui/deriving/deriving-bounds.rs b/tests/ui/deriving/deriving-bounds.rs index f3e7cf99437d5..45fc14420f177 100644 --- a/tests/ui/deriving/deriving-bounds.rs +++ b/tests/ui/deriving/deriving-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Copy, Clone)] struct Test; diff --git a/tests/ui/deriving/deriving-clone-array.rs b/tests/ui/deriving/deriving-clone-array.rs index 4569749df42fa..1ee599c8a7608 100644 --- a/tests/ui/deriving/deriving-clone-array.rs +++ b/tests/ui/deriving/deriving-clone-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // test for issue #30244 diff --git a/tests/ui/deriving/deriving-clone-enum.rs b/tests/ui/deriving/deriving-clone-enum.rs index 09e7497407254..59301c1d094bd 100644 --- a/tests/ui/deriving/deriving-clone-enum.rs +++ b/tests/ui/deriving/deriving-clone-enum.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum E { diff --git a/tests/ui/deriving/deriving-clone-generic-enum.rs b/tests/ui/deriving/deriving-clone-generic-enum.rs index a344d7fc43a2e..7f0dd872ffdf8 100644 --- a/tests/ui/deriving/deriving-clone-generic-enum.rs +++ b/tests/ui/deriving/deriving-clone-generic-enum.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum E { diff --git a/tests/ui/deriving/deriving-clone-generic-struct.rs b/tests/ui/deriving/deriving-clone-generic-struct.rs index 4374d1594e465..cbdfa8a7c9a5f 100644 --- a/tests/ui/deriving/deriving-clone-generic-struct.rs +++ b/tests/ui/deriving/deriving-clone-generic-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs index 331d72982169d..f0bbce707f304 100644 --- a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs +++ b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[derive(Clone)] #[allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-struct.rs b/tests/ui/deriving/deriving-clone-struct.rs index b93cbe5f8b6fd..b357aa82a2ac8 100644 --- a/tests/ui/deriving/deriving-clone-struct.rs +++ b/tests/ui/deriving/deriving-clone-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-tuple-struct.rs b/tests/ui/deriving/deriving-clone-tuple-struct.rs index 7ad3f03471324..727860465fc47 100644 --- a/tests/ui/deriving/deriving-clone-tuple-struct.rs +++ b/tests/ui/deriving/deriving-clone-tuple-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-cmp-generic-enum.rs b/tests/ui/deriving/deriving-cmp-generic-enum.rs index 88da4bd066ca9..415d9a033eb9f 100644 --- a/tests/ui/deriving/deriving-cmp-generic-enum.rs +++ b/tests/ui/deriving/deriving-cmp-generic-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] enum E { E0, diff --git a/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs b/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs index eeaf2ff7efac9..2098065966088 100644 --- a/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs +++ b/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] enum ES { ES1 { x: T }, diff --git a/tests/ui/deriving/deriving-cmp-generic-struct.rs b/tests/ui/deriving/deriving-cmp-generic-struct.rs index 538caf439c766..0f68dd48c6366 100644 --- a/tests/ui/deriving/deriving-cmp-generic-struct.rs +++ b/tests/ui/deriving/deriving-cmp-generic-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] struct S { x: T, diff --git a/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs b/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs index 79f58d4565cac..30dfe5d17ae44 100644 --- a/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs +++ b/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] struct TS(T,T); diff --git a/tests/ui/deriving/deriving-cmp-shortcircuit.rs b/tests/ui/deriving/deriving-cmp-shortcircuit.rs index 140373e9526a8..5ee5fe6cb280c 100644 --- a/tests/ui/deriving/deriving-cmp-shortcircuit.rs +++ b/tests/ui/deriving/deriving-cmp-shortcircuit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that the derived impls for the comparison traits shortcircuit // where possible, by having a type that panics when compared as the // second element, so this passes iff the instances shortcircuit. diff --git a/tests/ui/deriving/deriving-copyclone.rs b/tests/ui/deriving/deriving-copyclone.rs index 099feceae81e8..4a00ae81df483 100644 --- a/tests/ui/deriving/deriving-copyclone.rs +++ b/tests/ui/deriving/deriving-copyclone.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Test that #[derive(Copy, Clone)] produces a shallow copy //! even when a member violates RFC 1521 diff --git a/tests/ui/deriving/deriving-default-box.rs b/tests/ui/deriving/deriving-default-box.rs index b71e114961388..7dffc3e95ccb8 100644 --- a/tests/ui/deriving/deriving-default-box.rs +++ b/tests/ui/deriving/deriving-default-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::default::Default; #[derive(Default)] diff --git a/tests/ui/deriving/deriving-default-enum.rs b/tests/ui/deriving/deriving-default-enum.rs index 1c7a501edc705..96eba258c97e8 100644 --- a/tests/ui/deriving/deriving-default-enum.rs +++ b/tests/ui/deriving/deriving-default-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // nb: does not impl Default #[derive(Debug, PartialEq)] diff --git a/tests/ui/deriving/deriving-enum-single-variant.rs b/tests/ui/deriving/deriving-enum-single-variant.rs index 1c5979c074758..dfdfef01298bb 100644 --- a/tests/ui/deriving/deriving-enum-single-variant.rs +++ b/tests/ui/deriving/deriving-enum-single-variant.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] pub type task_id = isize; diff --git a/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs b/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs index 5b4b09836230c..9a1b338ccf13d 100644 --- a/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs +++ b/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, PartialOrd, Eq, Ord, Debug)] struct Foo(Box<[u8]>); diff --git a/tests/ui/deriving/deriving-hash.rs b/tests/ui/deriving/deriving-hash.rs index 16738ec4ae4ec..738047da52696 100644 --- a/tests/ui/deriving/deriving-hash.rs +++ b/tests/ui/deriving/deriving-hash.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(deprecated)] diff --git a/tests/ui/deriving/deriving-in-fn.rs b/tests/ui/deriving/deriving-in-fn.rs index 07f91d0597356..72da2148350fd 100644 --- a/tests/ui/deriving/deriving-in-fn.rs +++ b/tests/ui/deriving/deriving-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-in-macro.rs b/tests/ui/deriving/deriving-in-macro.rs index 46e8e37838dbd..e86b40d30dcf0 100644 --- a/tests/ui/deriving/deriving-in-macro.rs +++ b/tests/ui/deriving/deriving-in-macro.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] macro_rules! define_vec { diff --git a/tests/ui/deriving/deriving-meta-multiple.rs b/tests/ui/deriving/deriving-meta-multiple.rs index ad255be8dab23..07dabd9e9c36b 100644 --- a/tests/ui/deriving/deriving-meta-multiple.rs +++ b/tests/ui/deriving/deriving-meta-multiple.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deprecated)] use std::hash::{Hash, SipHasher}; diff --git a/tests/ui/deriving/deriving-meta.rs b/tests/ui/deriving/deriving-meta.rs index f2ff4f535576f..34d31d9ef9ee6 100644 --- a/tests/ui/deriving/deriving-meta.rs +++ b/tests/ui/deriving/deriving-meta.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deprecated)] use std::hash::{Hash, SipHasher}; diff --git a/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs b/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs index e01b5a26fc706..0b4894e4439eb 100644 --- a/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs +++ b/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cmp::Ordering::{Less,Equal,Greater}; #[derive(PartialEq, Eq, PartialOrd, Ord)] diff --git a/tests/ui/deriving/deriving-show-2.rs b/tests/ui/deriving/deriving-show-2.rs index 13d124ed4c3cf..e033431428121 100644 --- a/tests/ui/deriving/deriving-show-2.rs +++ b/tests/ui/deriving/deriving-show-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::fmt; diff --git a/tests/ui/deriving/deriving-show.rs b/tests/ui/deriving/deriving-show.rs index eb3a8948fc80d..e4e377dd90d13 100644 --- a/tests/ui/deriving/deriving-show.rs +++ b/tests/ui/deriving/deriving-show.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] struct Unit; diff --git a/tests/ui/deriving/deriving-via-extension-c-enum.rs b/tests/ui/deriving/deriving-via-extension-c-enum.rs index 7fa1a69d7e0a0..8d15257116f10 100644 --- a/tests/ui/deriving/deriving-via-extension-c-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-c-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-enum.rs b/tests/ui/deriving/deriving-via-extension-enum.rs index 6b58fd966220a..f844c8243d431 100644 --- a/tests/ui/deriving/deriving-via-extension-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-hash-enum.rs b/tests/ui/deriving/deriving-via-extension-hash-enum.rs index 2d1ca05f4fcb6..acd34f7818717 100644 --- a/tests/ui/deriving/deriving-via-extension-hash-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-hash-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Hash)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-hash-struct.rs b/tests/ui/deriving/deriving-via-extension-hash-struct.rs index c4037dc2714db..ad2a84b6bf920 100644 --- a/tests/ui/deriving/deriving-via-extension-hash-struct.rs +++ b/tests/ui/deriving/deriving-via-extension-hash-struct.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Hash)] struct Foo { diff --git a/tests/ui/deriving/deriving-via-extension-struct-empty.rs b/tests/ui/deriving/deriving-via-extension-struct-empty.rs index 9fb250e847093..43a60013e79e4 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-empty.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-empty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo; diff --git a/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs index b6e6f136c757b..fe382c4e4b907 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum S { diff --git a/tests/ui/deriving/deriving-via-extension-struct-tuple.rs b/tests/ui/deriving/deriving-via-extension-struct-tuple.rs index e84906c96bb86..3192b85a37be2 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-tuple.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo(isize, isize, String); diff --git a/tests/ui/deriving/deriving-via-extension-struct.rs b/tests/ui/deriving/deriving-via-extension-struct.rs index f4d8b16a02f2c..4a5c3453876a3 100644 --- a/tests/ui/deriving/deriving-via-extension-struct.rs +++ b/tests/ui/deriving/deriving-via-extension-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo { x: isize, diff --git a/tests/ui/deriving/deriving-via-extension-type-params.rs b/tests/ui/deriving/deriving-via-extension-type-params.rs index a5dec8ee1ab13..79ac0c316754e 100644 --- a/tests/ui/deriving/deriving-via-extension-type-params.rs +++ b/tests/ui/deriving/deriving-via-extension-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Hash, Debug)] struct Foo { x: isize, diff --git a/tests/ui/deriving/deriving-with-helper.rs b/tests/ui/deriving/deriving-with-helper.rs index 1c30b0b6fba75..c71d553c8927b 100644 --- a/tests/ui/deriving/deriving-with-helper.rs +++ b/tests/ui/deriving/deriving-with-helper.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(decl_macro)] #![feature(lang_items)] diff --git a/tests/ui/deriving/deriving-with-repr-packed.rs b/tests/ui/deriving/deriving-with-repr-packed.rs index 8ce444be13f99..85eae60b2f4ec 100644 --- a/tests/ui/deriving/deriving-with-repr-packed.rs +++ b/tests/ui/deriving/deriving-with-repr-packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that derive on a packed struct does not call field // methods with a misaligned field. diff --git a/tests/ui/deriving/issue-103157.rs b/tests/ui/deriving/issue-103157.rs index 52b4c7898d87b..ca06989787813 100644 --- a/tests/ui/deriving/issue-103157.rs +++ b/tests/ui/deriving/issue-103157.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[derive(PartialEq, Eq)] pub enum Value { diff --git a/tests/ui/deriving/issue-15689-1.rs b/tests/ui/deriving/issue-15689-1.rs index d143926b2819e..c81c3359dfced 100644 --- a/tests/ui/deriving/issue-15689-1.rs +++ b/tests/ui/deriving/issue-15689-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] enum Test<'a> { diff --git a/tests/ui/deriving/issue-15689-2.rs b/tests/ui/deriving/issue-15689-2.rs index 83dcb1406f89f..790c72f6d4d04 100644 --- a/tests/ui/deriving/issue-15689-2.rs +++ b/tests/ui/deriving/issue-15689-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum Test<'a> { diff --git a/tests/ui/deriving/issue-19358.rs b/tests/ui/deriving/issue-19358.rs index 3970a4155e95c..daa1a94574948 100644 --- a/tests/ui/deriving/issue-19358.rs +++ b/tests/ui/deriving/issue-19358.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/deriving/issue-3935.rs b/tests/ui/deriving/issue-3935.rs index e98d68e0eb203..64cb6597b1075 100644 --- a/tests/ui/deriving/issue-3935.rs +++ b/tests/ui/deriving/issue-3935.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq)] struct Bike { diff --git a/tests/ui/deriving/issue-58319.rs b/tests/ui/deriving/issue-58319.rs index 754f5032d1621..0e847a5b54d4e 100644 --- a/tests/ui/deriving/issue-58319.rs +++ b/tests/ui/deriving/issue-58319.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() {} #[derive(Clone)] pub struct Little; diff --git a/tests/ui/deriving/issue-6341.rs b/tests/ui/deriving/issue-6341.rs index 1be1394dfae98..5c2d0abfa8c44 100644 --- a/tests/ui/deriving/issue-6341.rs +++ b/tests/ui/deriving/issue-6341.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #[derive(PartialEq)] struct A { x: usize } diff --git a/tests/ui/deriving/issue-89188-gat-hrtb.rs b/tests/ui/deriving/issue-89188-gat-hrtb.rs index e8118f0c6e40e..a7b43159f16fd 100644 --- a/tests/ui/deriving/issue-89188-gat-hrtb.rs +++ b/tests/ui/deriving/issue-89188-gat-hrtb.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait CallWithShim: Sized { type Shim<'s> diff --git a/tests/ui/deriving/multiple-defaults.rs b/tests/ui/deriving/multiple-defaults.rs index 2024a55200bd8..598d0dc0f1654 100644 --- a/tests/ui/deriving/multiple-defaults.rs +++ b/tests/ui/deriving/multiple-defaults.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // When we get multiple `#[default]` variants, we emit several tool-only suggestions // to remove all except one of the `#[default]`s. diff --git a/tests/ui/dest-prop/skeptic-miscompile.rs b/tests/ui/dest-prop/skeptic-miscompile.rs index 4bb61dbc7f400..a7d6d2628b919 100644 --- a/tests/ui/dest-prop/skeptic-miscompile.rs +++ b/tests/ui/dest-prop/skeptic-miscompile.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// compile-flags: -Zmir-opt-level=3 +//@ compile-flags: -Zmir-opt-level=3 trait IterExt: Iterator { fn fold_ex(mut self, init: B, mut f: F) -> B diff --git a/tests/ui/destructuring-assignment/drop-order.rs b/tests/ui/destructuring-assignment/drop-order.rs index 79671054ca76c..ff1263562274d 100644 --- a/tests/ui/destructuring-assignment/drop-order.rs +++ b/tests/ui/destructuring-assignment/drop-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Test that let bindings and destructuring assignments have consistent drop orders diff --git a/tests/ui/destructuring-assignment/nested_destructure.rs b/tests/ui/destructuring-assignment/nested_destructure.rs index 94b3a5ff9a7ed..b35f1ad2f1b8a 100644 --- a/tests/ui/destructuring-assignment/nested_destructure.rs +++ b/tests/ui/destructuring-assignment/nested_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Struct { a: S, diff --git a/tests/ui/destructuring-assignment/slice_destructure.rs b/tests/ui/destructuring-assignment/slice_destructure.rs index 762c4b5e8ea4a..5af187867968d 100644 --- a/tests/ui/destructuring-assignment/slice_destructure.rs +++ b/tests/ui/destructuring-assignment/slice_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let (mut a, mut b); diff --git a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs index f82e029983b75..43a1173963d75 100644 --- a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs +++ b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S; diff --git a/tests/ui/destructuring-assignment/struct_destructure.rs b/tests/ui/destructuring-assignment/struct_destructure.rs index 8cceaadd7b929..e021beb6db738 100644 --- a/tests/ui/destructuring-assignment/struct_destructure.rs +++ b/tests/ui/destructuring-assignment/struct_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Struct { a: S, diff --git a/tests/ui/destructuring-assignment/tuple_destructure.rs b/tests/ui/destructuring-assignment/tuple_destructure.rs index 2a8584029d0e2..9c7ca106d131b 100644 --- a/tests/ui/destructuring-assignment/tuple_destructure.rs +++ b/tests/ui/destructuring-assignment/tuple_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let (mut a, mut b); diff --git a/tests/ui/destructuring-assignment/tuple_struct_destructure.rs b/tests/ui/destructuring-assignment/tuple_struct_destructure.rs index 07b5f7a314e30..431519c4a9d1b 100644 --- a/tests/ui/destructuring-assignment/tuple_struct_destructure.rs +++ b/tests/ui/destructuring-assignment/tuple_struct_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct TupleStruct(S, T); diff --git a/tests/ui/destructuring-assignment/warn-unused-duplication.rs b/tests/ui/destructuring-assignment/warn-unused-duplication.rs index 390f44b8aa514..49444a8b49f6e 100644 --- a/tests/ui/destructuring-assignment/warn-unused-duplication.rs +++ b/tests/ui/destructuring-assignment/warn-unused-duplication.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(unused_assignments)] diff --git a/tests/ui/diagnostic-flags/colored-session-opt-error.rs b/tests/ui/diagnostic-flags/colored-session-opt-error.rs index b9f47285c1454..c8568eff325af 100644 --- a/tests/ui/diagnostic-flags/colored-session-opt-error.rs +++ b/tests/ui/diagnostic-flags/colored-session-opt-error.rs @@ -1,4 +1,4 @@ -// check-pass -// ignore-windows -// compile-flags: -Cremark=foo --error-format=human --color always +//@ check-pass +//@ ignore-windows +//@ compile-flags: -Cremark=foo --error-format=human --color always fn main() {} diff --git a/tests/ui/diagnostic-flags/terminal_urls.rs b/tests/ui/diagnostic-flags/terminal_urls.rs index 1f04e2aade17f..3c74e992395c1 100644 --- a/tests/ui/diagnostic-flags/terminal_urls.rs +++ b/tests/ui/diagnostic-flags/terminal_urls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zterminal-urls=yes +//@ compile-flags: -Zterminal-urls=yes fn main() { let () = 4; //~ ERROR } diff --git a/tests/ui/diagnostic-width/E0271.rs b/tests/ui/diagnostic-width/E0271.rs index 7e6b714085583..d8cb24898ac30 100644 --- a/tests/ui/diagnostic-width/E0271.rs +++ b/tests/ui/diagnostic-width/E0271.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=40 -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ compile-flags: --diagnostic-width=40 +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Future { type Error; } diff --git a/tests/ui/diagnostic-width/flag-human.rs b/tests/ui/diagnostic-width/flag-human.rs index 289bfbabd949b..a46122ed78350 100644 --- a/tests/ui/diagnostic-width/flag-human.rs +++ b/tests/ui/diagnostic-width/flag-human.rs @@ -1,4 +1,4 @@ -// compile-flags: --diagnostic-width=20 +//@ compile-flags: --diagnostic-width=20 // This test checks that `-Z output-width` effects the human error output by restricting it to an // arbitrarily low value so that the effect is visible. diff --git a/tests/ui/diagnostic-width/flag-json.rs b/tests/ui/diagnostic-width/flag-json.rs index 820f1a049e1f7..00778872727b5 100644 --- a/tests/ui/diagnostic-width/flag-json.rs +++ b/tests/ui/diagnostic-width/flag-json.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=20 --error-format=json -// error-pattern:expected `()`, found integer +//@ compile-flags: --diagnostic-width=20 --error-format=json +//@ error-pattern:expected `()`, found integer // This test checks that `-Z output-width` effects the JSON error output by restricting it to an // arbitrarily low value so that the effect is visible. diff --git a/tests/ui/diagnostic-width/flag-json.stderr b/tests/ui/diagnostic-width/flag-json.stderr index 0a4b54ebc8565..6a54f86dcee5e 100644 --- a/tests/ui/diagnostic-width/flag-json.stderr +++ b/tests/ui/diagnostic-width/flag-json.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":289,"byte_end":291,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":284,"byte_end":286,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":291,"byte_end":293,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":286,"byte_end":288,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types --> $DIR/flag-json.rs:8:17 | LL | ..._: () = 42; diff --git a/tests/ui/diagnostic-width/long-E0308.rs b/tests/ui/diagnostic-width/long-E0308.rs index 0ae5e19ab2afd..150164ba21b4d 100644 --- a/tests/ui/diagnostic-width/long-E0308.rs +++ b/tests/ui/diagnostic-width/long-E0308.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" mod a { // Force the "short path for unique types" machinery to trip up diff --git a/tests/ui/diagnostic-width/tab-column-numbers.rs b/tests/ui/diagnostic-width/tab-column-numbers.rs index 2abb0bcde95e3..f75fec1a700f2 100644 --- a/tests/ui/diagnostic-width/tab-column-numbers.rs +++ b/tests/ui/diagnostic-width/tab-column-numbers.rs @@ -1,5 +1,5 @@ // Test for #109537: ensure that column numbers are correctly generated when using hard tabs. -// aux-build:tab_column_numbers.rs +//@ aux-build:tab_column_numbers.rs // ignore-tidy-tab diff --git a/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs b/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs index 759c32c845339..4edae48923a24 100644 --- a/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs +++ b/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs b/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs index 08b4d68779c16..9f952bf6c86f4 100644 --- a/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs +++ b/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod diagnostic {} diff --git a/tests/ui/diagnostic_namespace/existing_proc_macros.rs b/tests/ui/diagnostic_namespace/existing_proc_macros.rs index d6d1fb014962d..2bc58aea8fc2c 100644 --- a/tests/ui/diagnostic_namespace/existing_proc_macros.rs +++ b/tests/ui/diagnostic_namespace/existing_proc_macros.rs @@ -1,6 +1,6 @@ #![feature(diagnostic_namespace)] -// check-pass -// aux-build:proc-macro-helper.rs +//@ check-pass +//@ aux-build:proc-macro-helper.rs extern crate proc_macro_helper; diff --git a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs index 677bd5a7343f2..95465701bf858 100644 --- a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs +++ b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs @@ -1,5 +1,5 @@ #![feature(diagnostic_namespace)] -// check-pass +//@ check-pass #[diagnostic::non_existing_attribute] //~^WARN unknown diagnostic attribute pub trait Bar { diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs index b39375a09f369..7eaff73dca187 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs @@ -1,4 +1,4 @@ -// aux-build:other.rs +//@ aux-build:other.rs extern crate other; diff --git a/tests/ui/did_you_mean/collect-without-into-iter-call.rs b/tests/ui/did_you_mean/collect-without-into-iter-call.rs new file mode 100644 index 0000000000000..ee4d75615bd01 --- /dev/null +++ b/tests/ui/did_you_mean/collect-without-into-iter-call.rs @@ -0,0 +1,19 @@ +// Tests that the compiler suggests an `into_iter` call when an `Iterator` method +// is called on something that implements `IntoIterator` + +fn main() { + let items = items(); + let other_items = items.map(|i| i + 1); + //~^ ERROR no method named `map` found for opaque type `impl IntoIterator` in the current scope + let vec: Vec = items.collect(); + //~^ ERROR no method named `collect` found for opaque type `impl IntoIterator` in the current scope +} + +fn items() -> impl IntoIterator { + vec![1, 2, 3] +} + +fn process(items: impl IntoIterator) -> Vec { + items.collect() + //~^ ERROR no method named `collect` found for type parameter `impl IntoIterator` in the current scope +} diff --git a/tests/ui/did_you_mean/collect-without-into-iter-call.stderr b/tests/ui/did_you_mean/collect-without-into-iter-call.stderr new file mode 100644 index 0000000000000..797bd1e9e6f1b --- /dev/null +++ b/tests/ui/did_you_mean/collect-without-into-iter-call.stderr @@ -0,0 +1,36 @@ +error[E0599]: no method named `map` found for opaque type `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:6:29 + | +LL | let other_items = items.map(|i| i + 1); + | ^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | let other_items = items.into_iter().map(|i| i + 1); + | ++++++++++++ + +error[E0599]: no method named `collect` found for opaque type `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:8:31 + | +LL | let vec: Vec = items.collect(); + | ^^^^^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | let vec: Vec = items.into_iter().collect(); + | ++++++++++++ + +error[E0599]: no method named `collect` found for type parameter `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:17:11 + | +LL | items.collect() + | ^^^^^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | items.into_iter().collect() + | ++++++++++++ + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs index ffc37b260a6bc..bd484c633c20e 100644 --- a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs +++ b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs @@ -1,7 +1,7 @@ // Regression test for issue #93210. -// aux-crate:doc_hidden_fields=doc-hidden-fields.rs -// edition: 2021 +//@ aux-crate:doc_hidden_fields=doc-hidden-fields.rs +//@ edition: 2021 #[derive(Default)] pub struct A { diff --git a/tests/ui/did_you_mean/issue-105225.fixed b/tests/ui/did_you_mean/issue-105225.fixed index f756be615a1bb..54bd254c8e40b 100644 --- a/tests/ui/did_you_mean/issue-105225.fixed +++ b/tests/ui/did_you_mean/issue-105225.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "x"; diff --git a/tests/ui/did_you_mean/issue-105225.rs b/tests/ui/did_you_mean/issue-105225.rs index 91cdf0eb28f6f..c0a04b456ac3c 100644 --- a/tests/ui/did_you_mean/issue-105225.rs +++ b/tests/ui/did_you_mean/issue-105225.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "x"; diff --git a/tests/ui/did_you_mean/issue-31424.rs b/tests/ui/did_you_mean/issue-31424.rs index 95ccf2a4c8993..2821d5b9d8b31 100644 --- a/tests/ui/did_you_mean/issue-31424.rs +++ b/tests/ui/did_you_mean/issue-31424.rs @@ -1,4 +1,4 @@ -// forbid-output: &mut mut self +//@ forbid-output: &mut mut self struct Struct; diff --git a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed index e566ed488c957..12d1ffb5fc9a8 100644 --- a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed +++ b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = !1; //~ ERROR cannot be used as a unary operator diff --git a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs index 1708a80505dbd..6db0f2a42ac01 100644 --- a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs +++ b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = ~1; //~ ERROR cannot be used as a unary operator diff --git a/tests/ui/did_you_mean/issue-54109-without-witness.fixed b/tests/ui/did_you_mean/issue-54109-without-witness.fixed index 5079a37f4da7f..2427ccaa6f08e 100644 --- a/tests/ui/did_you_mean/issue-54109-without-witness.fixed +++ b/tests/ui/did_you_mean/issue-54109-without-witness.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test is to check if suggestions can be applied automatically. diff --git a/tests/ui/did_you_mean/issue-54109-without-witness.rs b/tests/ui/did_you_mean/issue-54109-without-witness.rs index 00660a938d5d6..3f1607de053bf 100644 --- a/tests/ui/did_you_mean/issue-54109-without-witness.rs +++ b/tests/ui/did_you_mean/issue-54109-without-witness.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test is to check if suggestions can be applied automatically. diff --git a/tests/ui/did_you_mean/recursion_limit_deref.rs b/tests/ui/did_you_mean/recursion_limit_deref.rs index 41bbca661ddf6..af4c4ddda69ac 100644 --- a/tests/ui/did_you_mean/recursion_limit_deref.rs +++ b/tests/ui/did_you_mean/recursion_limit_deref.rs @@ -1,7 +1,7 @@ // Test that the recursion limit can be changed and that the compiler // suggests a fix. In this case, we have a long chain of Deref impls // which will cause an overflow during the autoderef loop. -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(dead_code)] #![recursion_limit="10"] diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed index eebe8d6e3f33a..db18cf2ad9662 100644 --- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed +++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] trait Foo: Sized { diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs index aa7510821af94..1217a96112dcc 100644 --- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs +++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] trait Foo: Sized { diff --git a/tests/ui/did_you_mean/use_instead_of_import.fixed b/tests/ui/did_you_mean/use_instead_of_import.fixed index a8aae76f4fcb3..c55377c593c34 100644 --- a/tests/ui/did_you_mean/use_instead_of_import.fixed +++ b/tests/ui/did_you_mean/use_instead_of_import.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::{ //~^ ERROR expected item, found `import` diff --git a/tests/ui/did_you_mean/use_instead_of_import.rs b/tests/ui/did_you_mean/use_instead_of_import.rs index 2db7c24075219..baf8783b2719d 100644 --- a/tests/ui/did_you_mean/use_instead_of_import.rs +++ b/tests/ui/did_you_mean/use_instead_of_import.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix import std::{ //~^ ERROR expected item, found `import` diff --git a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs index 01c087dbc9e77..1d832a36ef500 100644 --- a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs +++ b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs @@ -1 +1 @@ -// ignore-test not a test, auxiliary +//@ ignore-test not a test, auxiliary diff --git a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs index 2ec1c8bcc9ce2..08349ba6747d4 100644 --- a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs +++ b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs @@ -1,3 +1,3 @@ -// ignore-test not a test, auxiliary +//@ ignore-test not a test, auxiliary mod_decl!(bar); diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs index eb5e8e3e1ab71..6d6884fef0400 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs @@ -1,4 +1,4 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test macro_rules! m { () => { mod mod_file_not_owning_aux2; } diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs index 920938c4ad42a..76f1c1a727632 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs @@ -1 +1 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs index 6e4a392895655..96a5780d971f5 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs @@ -1,3 +1,3 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test mod mod_file_not_owning_aux2; diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed index ae0a84eea4d9a..4c7182b2c13c7 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs index c8db786106813..148b4eaab20ac 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed index c8a451efeb28e..895e81c106e94 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs index 815567ffec358..1d83a3ed7ffaf 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/diverging-fallback-method-chain.rs b/tests/ui/diverging-fallback-method-chain.rs index ba9f05c64e442..aa8eba1191b94 100644 --- a/tests/ui/diverging-fallback-method-chain.rs +++ b/tests/ui/diverging-fallback-method-chain.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test a regression found when building compiler. The `produce()` diff --git a/tests/ui/diverging-fallback-option.rs b/tests/ui/diverging-fallback-option.rs index 46bdfc96dbe22..aa793ebd01780 100644 --- a/tests/ui/diverging-fallback-option.rs +++ b/tests/ui/diverging-fallback-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/double-ref.rs b/tests/ui/double-ref.rs index e68b86833764f..62591deb8689f 100644 --- a/tests/ui/double-ref.rs +++ b/tests/ui/double-ref.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn check_expr() { let _: & usize = &1; diff --git a/tests/ui/drop-bounds/drop-bounds-impl-drop.rs b/tests/ui/drop-bounds/drop-bounds-impl-drop.rs index 15aebdf1bc93c..9b94e04b118c5 100644 --- a/tests/ui/drop-bounds/drop-bounds-impl-drop.rs +++ b/tests/ui/drop-bounds/drop-bounds-impl-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(drop_bounds)] // As a special exemption, `impl Drop` in the return position raises no error. // This allows a convenient way to return an unnamed drop guard. diff --git a/tests/ui/drop/drop-if-let-binding.rs b/tests/ui/drop/drop-if-let-binding.rs index 9c1ac4e0c7ffb..9c702b6846b7e 100644 --- a/tests/ui/drop/drop-if-let-binding.rs +++ b/tests/ui/drop/drop-if-let-binding.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass // regression test for issue #88307 -// compile-flags: -C opt-level=s +//@ compile-flags: -C opt-level=s fn main() { if let Some(_val) = Option::::None {} diff --git a/tests/ui/drop/drop-on-empty-block-exit.rs b/tests/ui/drop/drop-on-empty-block-exit.rs index ef3a90a53a6a0..63bc403a72145 100644 --- a/tests/ui/drop/drop-on-empty-block-exit.rs +++ b/tests/ui/drop/drop-on-empty-block-exit.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] enum t { foo(Box), } diff --git a/tests/ui/drop/drop-on-ret.rs b/tests/ui/drop/drop-on-ret.rs index 290e274f30541..f8ce899adf088 100644 --- a/tests/ui/drop/drop-on-ret.rs +++ b/tests/ui/drop/drop-on-ret.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() -> isize { if true { diff --git a/tests/ui/drop/drop-struct-as-object.rs b/tests/ui/drop/drop-struct-as-object.rs index 1aa6877704253..07c8950f1b2ba 100644 --- a/tests/ui/drop/drop-struct-as-object.rs +++ b/tests/ui/drop/drop-struct-as-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs index d2b77650a9d5c..91b5bcdf7301d 100644 --- a/tests/ui/drop/drop-trait-enum.rs +++ b/tests/ui/drop/drop-trait-enum.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unused_variables)] -// ignore-emscripten no threads support -// needs-unwind +//@ ignore-emscripten no threads support +//@ needs-unwind use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/drop/drop-trait-generic.rs b/tests/ui/drop/drop-trait-generic.rs index cdefb680c7552..20876469e2fdd 100644 --- a/tests/ui/drop/drop-trait-generic.rs +++ b/tests/ui/drop/drop-trait-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { x: T diff --git a/tests/ui/drop/drop-trait.rs b/tests/ui/drop/drop-trait.rs index d93f77180911c..b160d17cdcb19 100644 --- a/tests/ui/drop/drop-trait.rs +++ b/tests/ui/drop/drop-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo { x: isize diff --git a/tests/ui/drop/drop-uninhabited-enum.rs b/tests/ui/drop/drop-uninhabited-enum.rs index b3566f68533bd..f018ffa097747 100644 --- a/tests/ui/drop/drop-uninhabited-enum.rs +++ b/tests/ui/drop/drop-uninhabited-enum.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { } diff --git a/tests/ui/drop/drop-with-type-ascription-1.rs b/tests/ui/drop/drop-with-type-ascription-1.rs index e5a1a48df5616..fbf9eecbb1308 100644 --- a/tests/ui/drop/drop-with-type-ascription-1.rs +++ b/tests/ui/drop/drop-with-type-ascription-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let foo = "hello".to_string(); diff --git a/tests/ui/drop/drop-with-type-ascription-2.rs b/tests/ui/drop/drop-with-type-ascription-2.rs index fb70ad48e88f3..68109fac31b1f 100644 --- a/tests/ui/drop/drop-with-type-ascription-2.rs +++ b/tests/ui/drop/drop-with-type-ascription-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let args = vec!["foobie", "asdf::asdf"]; diff --git a/tests/ui/drop/drop_elaboration_with_errors.rs b/tests/ui/drop/drop_elaboration_with_errors.rs index 77862762e8724..35d05e6cf64a3 100644 --- a/tests/ui/drop/drop_elaboration_with_errors.rs +++ b/tests/ui/drop/drop_elaboration_with_errors.rs @@ -1,6 +1,6 @@ // can't use build-fail, because this also fails check-fail, but // the ICE from #120787 only reproduces on build-fail. -// compile-flags: --emit=mir +//@ compile-flags: --emit=mir #![feature(type_alias_impl_trait)] diff --git a/tests/ui/drop/drop_order.rs b/tests/ui/drop/drop_order.rs index 5ce1fd54a9e62..54e9e491f7873 100644 --- a/tests/ui/drop/drop_order.rs +++ b/tests/ui/drop/drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z validate-mir +//@ run-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] use std::cell::RefCell; diff --git a/tests/ui/drop/dropck-eyepatch-extern-crate.rs b/tests/ui/drop/dropck-eyepatch-extern-crate.rs index fecfd5edffb82..86d8a7e83561a 100644 --- a/tests/ui/drop/dropck-eyepatch-extern-crate.rs +++ b/tests/ui/drop/dropck-eyepatch-extern-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:dropck_eyepatch_extern_crate.rs +//@ run-pass +//@ aux-build:dropck_eyepatch_extern_crate.rs extern crate dropck_eyepatch_extern_crate as other; diff --git a/tests/ui/drop/dropck-eyepatch-manuallydrop.rs b/tests/ui/drop/dropck-eyepatch-manuallydrop.rs index ff100cd941fd6..9d763d155b8cf 100644 --- a/tests/ui/drop/dropck-eyepatch-manuallydrop.rs +++ b/tests/ui/drop/dropck-eyepatch-manuallydrop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! This test checks that dropck knows that ManuallyDrop does not drop its field. #![feature(dropck_eyepatch)] diff --git a/tests/ui/drop/dropck-eyepatch-reorder.rs b/tests/ui/drop/dropck-eyepatch-reorder.rs index 4a56c45aa92b4..6b394414baec0 100644 --- a/tests/ui/drop/dropck-eyepatch-reorder.rs +++ b/tests/ui/drop/dropck-eyepatch-reorder.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dropck_eyepatch)] // The point of this test is to test uses of `#[may_dangle]` attribute diff --git a/tests/ui/drop/dropck-eyepatch.rs b/tests/ui/drop/dropck-eyepatch.rs index ff5a52b906bfa..2f27b72da5a65 100644 --- a/tests/ui/drop/dropck-eyepatch.rs +++ b/tests/ui/drop/dropck-eyepatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dropck_eyepatch)] // The point of this test is to illustrate that the `#[may_dangle]` diff --git a/tests/ui/drop/dropck_legal_cycles.rs b/tests/ui/drop/dropck_legal_cycles.rs index 6a0fe7784fbcc..8acf98a03b51d 100644 --- a/tests/ui/drop/dropck_legal_cycles.rs +++ b/tests/ui/drop/dropck_legal_cycles.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test exercises cases where cyclic structure is legal, // including when the cycles go through data-structures such // as `Vec` or `TypedArena`. diff --git a/tests/ui/drop/dynamic-drop-async.rs b/tests/ui/drop/dynamic-drop-async.rs index 8f1cc6691cd8d..e7a32d3c24e92 100644 --- a/tests/ui/drop/dynamic-drop-async.rs +++ b/tests/ui/drop/dynamic-drop-async.rs @@ -3,9 +3,9 @@ // * The future is dropped at one of its suspend points. // * Dropping one of the values panics while dropping the future. -// run-pass -// needs-unwind -// edition:2018 +//@ run-pass +//@ needs-unwind +//@ edition:2018 #![allow(unused)] diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs index 4745cceb51642..f848a1a340b29 100644 --- a/tests/ui/drop/dynamic-drop.rs +++ b/tests/ui/drop/dynamic-drop.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] #![feature(if_let_guard)] diff --git a/tests/ui/drop/issue-100276.rs b/tests/ui/drop/issue-100276.rs index 6401a8d148100..b44710e7c3f21 100644 --- a/tests/ui/drop/issue-100276.rs +++ b/tests/ui/drop/issue-100276.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] fn let_chains(entry: std::io::Result) { diff --git a/tests/ui/drop/issue-10028.rs b/tests/ui/drop/issue-10028.rs index 1692470e8d1a8..4191425452249 100644 --- a/tests/ui/drop/issue-10028.rs +++ b/tests/ui/drop/issue-10028.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-10028.rs +//@ aux-build:issue-10028.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_10028 as issue10028; diff --git a/tests/ui/drop/issue-103107.rs b/tests/ui/drop/issue-103107.rs index 5f447595662ed..01ae998d09061 100644 --- a/tests/ui/drop/issue-103107.rs +++ b/tests/ui/drop/issue-103107.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir struct Foo<'a>(&'a mut u32); diff --git a/tests/ui/drop/issue-110682.rs b/tests/ui/drop/issue-110682.rs index 35f9c7e8d9be6..454615a5a0169 100644 --- a/tests/ui/drop/issue-110682.rs +++ b/tests/ui/drop/issue-110682.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 use std::fmt::Debug; use std::mem::ManuallyDrop; diff --git a/tests/ui/drop/issue-17718-const-destructors.rs b/tests/ui/drop/issue-17718-const-destructors.rs index c9a729c7b2071..f32b129e3592a 100644 --- a/tests/ui/drop/issue-17718-const-destructors.rs +++ b/tests/ui/drop/issue-17718-const-destructors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct A; impl Drop for A { diff --git a/tests/ui/drop/issue-21486.rs b/tests/ui/drop/issue-21486.rs index 46d6ccd56bdc2..101cbbf38e351 100644 --- a/tests/ui/drop/issue-21486.rs +++ b/tests/ui/drop/issue-21486.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // Issue #21486: Make sure that all structures are dropped, even when // created via FRU and control-flow breaks in the middle of diff --git a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs index 52603744c45fc..f283b33f64589 100644 --- a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs +++ b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // This test is ensuring that parameters are indeed dropped after diff --git a/tests/ui/drop/issue-2734.rs b/tests/ui/drop/issue-2734.rs index df4f394dc373f..028f86ebb3a90 100644 --- a/tests/ui/drop/issue-2734.rs +++ b/tests/ui/drop/issue-2734.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait hax { fn dummy(&self) { } diff --git a/tests/ui/drop/issue-2735-2.rs b/tests/ui/drop/issue-2735-2.rs index 70ebce9d35a79..7a6ed6ea2f8da 100644 --- a/tests/ui/drop/issue-2735-2.rs +++ b/tests/ui/drop/issue-2735-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/issue-2735-3.rs b/tests/ui/drop/issue-2735-3.rs index 2330153783572..3bb4536537cb9 100644 --- a/tests/ui/drop/issue-2735-3.rs +++ b/tests/ui/drop/issue-2735-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/issue-2735.rs b/tests/ui/drop/issue-2735.rs index 20d3949a9f998..8fa3ac45d08f8 100644 --- a/tests/ui/drop/issue-2735.rs +++ b/tests/ui/drop/issue-2735.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait hax { fn dummy(&self) { } diff --git a/tests/ui/drop/issue-30018-nopanic.rs b/tests/ui/drop/issue-30018-nopanic.rs index 291bab2736d33..9cf346b818842 100644 --- a/tests/ui/drop/issue-30018-nopanic.rs +++ b/tests/ui/drop/issue-30018-nopanic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // More thorough regression test for Issues #30018 and #30822. This // attempts to explore different ways that array element construction diff --git a/tests/ui/drop/issue-35546.rs b/tests/ui/drop/issue-35546.rs index 004679a6240b1..20b2eb3b8218a 100644 --- a/tests/ui/drop/issue-35546.rs +++ b/tests/ui/drop/issue-35546.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // Regression test for #35546. Check that we are able to codegen // this. Before we had problems because of the drop glue signature diff --git a/tests/ui/drop/issue-48962.rs b/tests/ui/drop/issue-48962.rs index 80d815379bec2..428a6ca6cd21b 100644 --- a/tests/ui/drop/issue-48962.rs +++ b/tests/ui/drop/issue-48962.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Test that we are able to reinitialize box with moved referent static mut ORDER: [usize; 3] = [0, 0, 0]; diff --git a/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs b/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs index 4e67b35949e28..bfa169fd87d27 100644 --- a/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs +++ b/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; diff --git a/tests/ui/drop/issue-90752.rs b/tests/ui/drop/issue-90752.rs index 4395e45e7733a..64495da7b9fe7 100644 --- a/tests/ui/drop/issue-90752.rs +++ b/tests/ui/drop/issue-90752.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; diff --git a/tests/ui/drop/issue-979.rs b/tests/ui/drop/issue-979.rs index 57a99b325ad8e..8d98ac4df2336 100644 --- a/tests/ui/drop/issue-979.rs +++ b/tests/ui/drop/issue-979.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/no-drop-flag-size.rs b/tests/ui/drop/no-drop-flag-size.rs index 103e70ef6ee10..d0e3346fd7752 100644 --- a/tests/ui/drop/no-drop-flag-size.rs +++ b/tests/ui/drop/no-drop-flag-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::size_of; diff --git a/tests/ui/drop/nondrop-cycle.rs b/tests/ui/drop/nondrop-cycle.rs index 29070f917e432..9b32d1319c914 100644 --- a/tests/ui/drop/nondrop-cycle.rs +++ b/tests/ui/drop/nondrop-cycle.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::cell::Cell; diff --git a/tests/ui/drop/recursion-check-on-erroneous-impl.rs b/tests/ui/drop/recursion-check-on-erroneous-impl.rs index 733c8b0b08590..83dd18a406aac 100644 --- a/tests/ui/drop/recursion-check-on-erroneous-impl.rs +++ b/tests/ui/drop/recursion-check-on-erroneous-impl.rs @@ -1,6 +1,6 @@ // can't use build-fail, because this also fails check-fail, but // the ICE from #120787 only reproduces on build-fail. -// compile-flags: --emit=mir +//@ compile-flags: --emit=mir struct PrintOnDrop<'a>(&'a str); diff --git a/tests/ui/drop/repeat-drop.rs b/tests/ui/drop/repeat-drop.rs index 0afb4bb11bc89..b83bee8c1bf82 100644 --- a/tests/ui/drop/repeat-drop.rs +++ b/tests/ui/drop/repeat-drop.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs index 66f267aa7c7d8..23169aaf65bdc 100644 --- a/tests/ui/drop/terminate-in-initializer.rs +++ b/tests/ui/drop/terminate-in-initializer.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Issue #787 // Don't try to clean up uninitialized locals diff --git a/tests/ui/drop/use_inline_dtor.rs b/tests/ui/drop/use_inline_dtor.rs index ac916de464691..03f476cff2a1b 100644 --- a/tests/ui/drop/use_inline_dtor.rs +++ b/tests/ui/drop/use_inline_dtor.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:inline_dtor.rs +//@ run-pass +//@ aux-build:inline_dtor.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate inline_dtor; diff --git a/tests/ui/dropck/cleanup-arm-conditional.rs b/tests/ui/dropck/cleanup-arm-conditional.rs index 38c717089c46b..94b380801892b 100644 --- a/tests/ui/dropck/cleanup-arm-conditional.rs +++ b/tests/ui/dropck/cleanup-arm-conditional.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_imports)] // Test that cleanup scope for temporaries created in a match // arm is confined to the match arm itself. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(os)] diff --git a/tests/ui/dropck/coroutine-liveness-1.rs b/tests/ui/dropck/coroutine-liveness-1.rs index aea4d15ad90e2..aa9f68a1b49f4 100644 --- a/tests/ui/dropck/coroutine-liveness-1.rs +++ b/tests/ui/dropck/coroutine-liveness-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test for #116242. use std::future; diff --git a/tests/ui/dropck/coroutine-liveness-2.rs b/tests/ui/dropck/coroutine-liveness-2.rs index 416a073c6b90a..3ef1400a41e6a 100644 --- a/tests/ui/dropck/coroutine-liveness-2.rs +++ b/tests/ui/dropck/coroutine-liveness-2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test found while working on #117134. use std::future; diff --git a/tests/ui/dropck/dropck-eyepatch-extern-crate.rs b/tests/ui/dropck/dropck-eyepatch-extern-crate.rs index b8f30355413e5..d99134ba7e493 100644 --- a/tests/ui/dropck/dropck-eyepatch-extern-crate.rs +++ b/tests/ui/dropck/dropck-eyepatch-extern-crate.rs @@ -1,4 +1,4 @@ -// aux-build:dropck_eyepatch_extern_crate.rs +//@ aux-build:dropck_eyepatch_extern_crate.rs // The point of this test is to illustrate that the `#[may_dangle]` // attribute specifically allows, in the context of a type diff --git a/tests/ui/dropck/dropck_fn_type.rs b/tests/ui/dropck/dropck_fn_type.rs index 2934217df346e..0695fc8012ff4 100644 --- a/tests/ui/dropck/dropck_fn_type.rs +++ b/tests/ui/dropck/dropck_fn_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 98e8e88a25995..6f14aa82373be 100644 --- a/tests/ui/dropck/dropck_traits.rs +++ b/tests/ui/dropck/dropck_traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Regression test for #34426, regarding HRTB in drop impls // All of this Drop impls should compile. diff --git a/tests/ui/dropck/explicit-drop-bounds.rs b/tests/ui/dropck/explicit-drop-bounds.rs index ab6f33c09994e..6ddac4d314f41 100644 --- a/tests/ui/dropck/explicit-drop-bounds.rs +++ b/tests/ui/dropck/explicit-drop-bounds.rs @@ -1,6 +1,6 @@ -// revisions: good1 good2 bad1 bad2 -//[good1] check-pass -//[good2] check-pass +//@ revisions: good1 good2 bad1 bad2 +//@[good1] check-pass +//@[good2] check-pass use std::ops::Drop; diff --git a/tests/ui/dropck/explicit-implied-outlives.rs b/tests/ui/dropck/explicit-implied-outlives.rs index fa446591f3dc4..aca8283068d59 100644 --- a/tests/ui/dropck/explicit-implied-outlives.rs +++ b/tests/ui/dropck/explicit-implied-outlives.rs @@ -1,6 +1,6 @@ -// revisions: good1 good2 bad1 bad2 -//[good1] check-pass -//[good2] check-pass +//@ revisions: good1 good2 bad1 bad2 +//@[good1] check-pass +//@[good2] check-pass use std::ops::Drop; diff --git a/tests/ui/dropck/issue-24805-dropck-itemless.rs b/tests/ui/dropck/issue-24805-dropck-itemless.rs index 4d71389351bfa..8519bcc996131 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 +//@ run-pass // Check that item-less traits do not cause dropck to inject extra // region constraints. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs b/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs index 43c0bfb26cd81..2d2e36d2bc314 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a lifetime param // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs index d2b620f6940bb..06aefe73d0f62 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a type param in negative position // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs b/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs index 61d11cf38347e..4e5a0e49a8c5d 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a trait bound // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-29844.rs b/tests/ui/dropck/issue-29844.rs index e08942da5e47e..2538fbe257aac 100644 --- a/tests/ui/dropck/issue-29844.rs +++ b/tests/ui/dropck/issue-29844.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; pub struct DescriptorSet<'a> { diff --git a/tests/ui/dropck/issue-34053.rs b/tests/ui/dropck/issue-34053.rs index fa23ae8f95bee..5a26fe75eb89e 100644 --- a/tests/ui/dropck/issue-34053.rs +++ b/tests/ui/dropck/issue-34053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::{AtomicUsize, Ordering}; static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); diff --git a/tests/ui/dropck/issue-54943-1.rs b/tests/ui/dropck/issue-54943-1.rs index ec682d96081e3..e2aae20db90ae 100644 --- a/tests/ui/dropck/issue-54943-1.rs +++ b/tests/ui/dropck/issue-54943-1.rs @@ -1,7 +1,7 @@ // This test is a minimal version of an ICE in the dropck-eyepatch tests // found in the fix for #54943. -// check-pass +//@ check-pass fn foo(_t: T) { } diff --git a/tests/ui/dropck/issue-54943-2.rs b/tests/ui/dropck/issue-54943-2.rs index d400ae58db4a1..bf15b2a71e47f 100644 --- a/tests/ui/dropck/issue-54943-2.rs +++ b/tests/ui/dropck/issue-54943-2.rs @@ -2,7 +2,7 @@ // found in the fix for #54943. In particular, this test is in unreachable // code as the initial fix for this ICE only worked if the code was reachable. -// check-pass +//@ check-pass fn foo(_t: T) { } diff --git a/tests/ui/dropck/transitive-outlives-2.rs b/tests/ui/dropck/transitive-outlives-2.rs index 87154e25d4091..2a21eb66a9493 100644 --- a/tests/ui/dropck/transitive-outlives-2.rs +++ b/tests/ui/dropck/transitive-outlives-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; use std::ops::Drop; diff --git a/tests/ui/dropck/transitive-outlives.rs b/tests/ui/dropck/transitive-outlives.rs index d071664abdeb6..e96ac6faae478 100644 --- a/tests/ui/dropck/transitive-outlives.rs +++ b/tests/ui/dropck/transitive-outlives.rs @@ -1,5 +1,5 @@ -// revisions: good bad -//[good] check-pass +//@ revisions: good bad +//@[good] check-pass use std::marker::PhantomData; use std::ops::Drop; diff --git a/tests/ui/dropck/trivial-impl-bounds.rs b/tests/ui/dropck/trivial-impl-bounds.rs index a8f5d2c354bc9..97770d22f7952 100644 --- a/tests/ui/dropck/trivial-impl-bounds.rs +++ b/tests/ui/dropck/trivial-impl-bounds.rs @@ -1,5 +1,5 @@ -// revisions: good1 good2 good3 -// check-pass +//@ revisions: good1 good2 good3 +//@ check-pass use std::ops::Drop; diff --git a/tests/ui/dupe-first-attr.rs b/tests/ui/dupe-first-attr.rs index d950743b41c0d..ec9e354e73df3 100644 --- a/tests/ui/dupe-first-attr.rs +++ b/tests/ui/dupe-first-attr.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Regression test for a problem with the first mod attribute // being applied to every mod -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg(target_os = "linux")] mod hello {} diff --git a/tests/ui/duplicate/dupe-symbols-1.rs b/tests/ui/duplicate/dupe-symbols-1.rs index 28e329b56caf7..f49bf44a06126 100644 --- a/tests/ui/duplicate/dupe-symbols-1.rs +++ b/tests/ui/duplicate/dupe-symbols-1.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-2.rs b/tests/ui/duplicate/dupe-symbols-2.rs index e303a790bafca..343c7131d1fb1 100644 --- a/tests/ui/duplicate/dupe-symbols-2.rs +++ b/tests/ui/duplicate/dupe-symbols-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-3.rs b/tests/ui/duplicate/dupe-symbols-3.rs index 1af2fe98e50e1..365ec182f53a3 100644 --- a/tests/ui/duplicate/dupe-symbols-3.rs +++ b/tests/ui/duplicate/dupe-symbols-3.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-4.rs b/tests/ui/duplicate/dupe-symbols-4.rs index de6610c3e7902..a9b7d689ad425 100644 --- a/tests/ui/duplicate/dupe-symbols-4.rs +++ b/tests/ui/duplicate/dupe-symbols-4.rs @@ -1,7 +1,7 @@ -// build-fail +//@ build-fail // -// error-pattern: symbol `fail` is already defined +//@ error-pattern: symbol `fail` is already defined #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-5.rs b/tests/ui/duplicate/dupe-symbols-5.rs index ea801cef64f15..2ed803c1ddadb 100644 --- a/tests/ui/duplicate/dupe-symbols-5.rs +++ b/tests/ui/duplicate/dupe-symbols-5.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-6.rs b/tests/ui/duplicate/dupe-symbols-6.rs index 018f4bb7f07bf..9841be7365a30 100644 --- a/tests/ui/duplicate/dupe-symbols-6.rs +++ b/tests/ui/duplicate/dupe-symbols-6.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-7.rs b/tests/ui/duplicate/dupe-symbols-7.rs index 4983874729c40..2c75a5ffe6d7c 100644 --- a/tests/ui/duplicate/dupe-symbols-7.rs +++ b/tests/ui/duplicate/dupe-symbols-7.rs @@ -1,7 +1,7 @@ -// build-fail +//@ build-fail // -// error-pattern: entry symbol `main` declared multiple times +//@ error-pattern: entry symbol `main` declared multiple times #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-8.rs b/tests/ui/duplicate/dupe-symbols-8.rs index ce7fa24a9fe6b..fc0b103777766 100644 --- a/tests/ui/duplicate/dupe-symbols-8.rs +++ b/tests/ui/duplicate/dupe-symbols-8.rs @@ -1,5 +1,5 @@ -// build-fail -// error-pattern: entry symbol `main` declared multiple times +//@ build-fail +//@ error-pattern: entry symbol `main` declared multiple times // // See #67946. diff --git a/tests/ui/duplicate_entry_error.rs b/tests/ui/duplicate_entry_error.rs index 776ecedea7e7e..7ebbab4709557 100644 --- a/tests/ui/duplicate_entry_error.rs +++ b/tests/ui/duplicate_entry_error.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" +//@ normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" // note-pattern: first defined in crate `std`. // Test for issue #31788 and E0152 diff --git a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed index c815080fc4ab6..7af94a64d3957 100644 --- a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed +++ b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed @@ -4,8 +4,8 @@ // this file via `rustfix`, we want the rustfix output to be // compilable; so the macros here carefully use `dyn` "correctly." // -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs index 6cdc707149425..bfaf351191b15 100644 --- a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs +++ b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs @@ -4,8 +4,8 @@ // this file via `rustfix`, we want the rustfix output to be // compilable; so the macros here carefully use `dyn` "correctly." // -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs b/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs index bda2ed17ecfab..36af053f2ff92 100644 --- a/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs +++ b/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs @@ -5,8 +5,8 @@ // identifier under a macro, including under the declarative `macro` // forms from macros 1.2 and macros 2.0. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![feature(decl_macro)] #![allow(non_camel_case_types)] diff --git a/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs b/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs index 472f6b5c8e514..7c2b93961085a 100644 --- a/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs +++ b/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs @@ -4,8 +4,8 @@ // We currently do not attempt to detect or fix uses of `dyn` as an // identifier under a macro. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs b/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs index d6a33c08d199f..5142e02d7f63a 100644 --- a/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs +++ b/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs @@ -1,8 +1,8 @@ // Under the 2015 edition without the keyword_idents lint, `dyn` is // entirely acceptable as an identifier. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![allow(non_camel_case_types)] diff --git a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs index 23ca36b71e00f..65b56b327565a 100644 --- a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs +++ b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[deny(bare_trait_objects)] fn function(x: &SomeTrait, y: Box) { diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs index bc1bed8a9a4c6..f98bf4ef5d177 100644 --- a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs +++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn function(x: &SomeTrait, y: Box) { //~^ ERROR trait objects must include the `dyn` keyword diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.fixed b/tests/ui/dyn-keyword/dyn-angle-brackets.fixed index 00069a3e7adb1..bc59c2ed75e1d 100644 --- a/tests/ui/dyn-keyword/dyn-angle-brackets.fixed +++ b/tests/ui/dyn-keyword/dyn-angle-brackets.fixed @@ -1,6 +1,6 @@ // See https://github.com/rust-lang/rust/issues/88508 -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![deny(bare_trait_objects)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.rs b/tests/ui/dyn-keyword/dyn-angle-brackets.rs index ee5fee4cfb8b4..7dda7167721a9 100644 --- a/tests/ui/dyn-keyword/dyn-angle-brackets.rs +++ b/tests/ui/dyn-keyword/dyn-angle-brackets.rs @@ -1,6 +1,6 @@ // See https://github.com/rust-lang/rust/issues/88508 -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![deny(bare_trait_objects)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs b/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs index 59e7f9a6083ce..b7cb7ce2fe722 100644 --- a/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs +++ b/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 // // rust-lang/rust#56327: Some occurrences of `dyn` within a macro are // not instances of identifiers, and thus should *not* be caught by the diff --git a/tests/ui/dyn-star/align.rs b/tests/ui/dyn-star/align.rs index 79cbaba0c78a1..f9ef7063231c9 100644 --- a/tests/ui/dyn-star/align.rs +++ b/tests/ui/dyn-star/align.rs @@ -1,4 +1,4 @@ -// revisions: normal over_aligned +//@ revisions: normal over_aligned #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/box.rs b/tests/ui/dyn-star/box.rs index 8b2f46bd1b244..a7e8e81b6544f 100644 --- a/tests/ui/dyn-star/box.rs +++ b/tests/ui/dyn-star/box.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: current next -//[current] compile-flags: -C opt-level=0 -//[next] compile-flags: -Znext-solver -C opt-level=0 +//@ run-pass +//@ revisions: current next +//@[current] compile-flags: -C opt-level=0 +//@[next] compile-flags: -Znext-solver -C opt-level=0 #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs index dffe6ae8a363c..ad3391a7ad70f 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs index 5c0a3d256f607..ceedbafd86b06 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/const-and-static.rs b/tests/ui/dyn-star/const-and-static.rs index 551b072abfab8..cbb64261a66c7 100644 --- a/tests/ui/dyn-star/const-and-static.rs +++ b/tests/ui/dyn-star/const-and-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete diff --git a/tests/ui/dyn-star/const.rs b/tests/ui/dyn-star/const.rs index 67e3ab7ab35f1..036d678dc022d 100644 --- a/tests/ui/dyn-star/const.rs +++ b/tests/ui/dyn-star/const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(unused, incomplete_features)] diff --git a/tests/ui/dyn-star/dispatch-on-pin-mut.rs b/tests/ui/dyn-star/dispatch-on-pin-mut.rs index 151aa9092fbe1..e17aef4763424 100644 --- a/tests/ui/dyn-star/dispatch-on-pin-mut.rs +++ b/tests/ui/dyn-star/dispatch-on-pin-mut.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// check-run-results +//@ run-pass +//@ edition:2021 +//@ check-run-results #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs b/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs index c12b16f16055d..abc66df8b3635 100644 --- a/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs +++ b/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/drop.rs b/tests/ui/dyn-star/drop.rs index 1acfe2f2d1c34..ca86f1b5b01f0 100644 --- a/tests/ui/dyn-star/drop.rs +++ b/tests/ui/dyn-star/drop.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/dyn-async-trait.rs b/tests/ui/dyn-star/dyn-async-trait.rs index 9b27133b4936d..a673b26991085 100644 --- a/tests/ui/dyn-star/dyn-async-trait.rs +++ b/tests/ui/dyn-star/dyn-async-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // This test case is meant to demonstrate how close we can get to async // functions in dyn traits with the current level of dyn* support. diff --git a/tests/ui/dyn-star/dyn-star-to-dyn.rs b/tests/ui/dyn-star/dyn-star-to-dyn.rs index 1d974b7ecb211..99f673df868c4 100644 --- a/tests/ui/dyn-star/dyn-star-to-dyn.rs +++ b/tests/ui/dyn-star/dyn-star-to-dyn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/issue-102430.rs b/tests/ui/dyn-star/issue-102430.rs index 244ecda6626ae..4e48d5e2f5df0 100644 --- a/tests/ui/dyn-star/issue-102430.rs +++ b/tests/ui/dyn-star/issue-102430.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/make-dyn-star.rs b/tests/ui/dyn-star/make-dyn-star.rs index e5255a64ba119..24004335f0607 100644 --- a/tests/ui/dyn-star/make-dyn-star.rs +++ b/tests/ui/dyn-star/make-dyn-star.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/method.rs b/tests/ui/dyn-star/method.rs index 5a77640f0d932..0d0855eec7fbd 100644 --- a/tests/ui/dyn-star/method.rs +++ b/tests/ui/dyn-star/method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/no-explicit-dyn-star.rs b/tests/ui/dyn-star/no-explicit-dyn-star.rs index 4f726b7c6a69f..0847597450e5c 100644 --- a/tests/ui/dyn-star/no-explicit-dyn-star.rs +++ b/tests/ui/dyn-star/no-explicit-dyn-star.rs @@ -1,4 +1,4 @@ -// aux-build:dyn-star-foreign.rs +//@ aux-build:dyn-star-foreign.rs extern crate dyn_star_foreign; diff --git a/tests/ui/dyn-star/no-implicit-dyn-star.rs b/tests/ui/dyn-star/no-implicit-dyn-star.rs index d9470e2841770..7af3f9a734bce 100644 --- a/tests/ui/dyn-star/no-implicit-dyn-star.rs +++ b/tests/ui/dyn-star/no-implicit-dyn-star.rs @@ -1,4 +1,4 @@ -// aux-build:dyn-star-foreign.rs +//@ aux-build:dyn-star-foreign.rs extern crate dyn_star_foreign; diff --git a/tests/ui/dyn-star/param-env-region-infer.rs b/tests/ui/dyn-star/param-env-region-infer.rs index 1e33177776570..c53861065c7da 100644 --- a/tests/ui/dyn-star/param-env-region-infer.rs +++ b/tests/ui/dyn-star/param-env-region-infer.rs @@ -1,5 +1,5 @@ -// revisions: current -// incremental +//@ revisions: current +//@ incremental // FIXME(-Znext-solver): THis currently results in unstable query results: // `normalizes-to(opaque, opaque)` changes from `Maybe(Ambiguous)` to `Maybe(Overflow)` diff --git a/tests/ui/dyn-star/return.rs b/tests/ui/dyn-star/return.rs index fa3d8d7d5064c..47d95d1d643e7 100644 --- a/tests/ui/dyn-star/return.rs +++ b/tests/ui/dyn-star/return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/syntax.rs b/tests/ui/dyn-star/syntax.rs index 618c72562b2a7..d4983404de2b3 100644 --- a/tests/ui/dyn-star/syntax.rs +++ b/tests/ui/dyn-star/syntax.rs @@ -1,6 +1,6 @@ // Make sure we can parse the `dyn* Trait` syntax // -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/upcast.rs b/tests/ui/dyn-star/upcast.rs index c667ac143a395..e8e89fc5101b1 100644 --- a/tests/ui/dyn-star/upcast.rs +++ b/tests/ui/dyn-star/upcast.rs @@ -1,4 +1,4 @@ -// known-bug: #104800 +//@ known-bug: #104800 #![feature(dyn_star, trait_upcasting)] diff --git a/tests/ui/dynamically-sized-types/dst-coerce-custom.rs b/tests/ui/dynamically-sized-types/dst-coerce-custom.rs index 24d83eb5343ec..fdc94d4bb8674 100644 --- a/tests/ui/dynamically-sized-types/dst-coerce-custom.rs +++ b/tests/ui/dynamically-sized-types/dst-coerce-custom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a very simple custom DST coercion. #![feature(unsize, coerce_unsized)] diff --git a/tests/ui/dynamically-sized-types/dst-coerce-rc.rs b/tests/ui/dynamically-sized-types/dst-coerce-rc.rs index 683fa6850fd81..5ec7853a8e822 100644 --- a/tests/ui/dynamically-sized-types/dst-coerce-rc.rs +++ b/tests/ui/dynamically-sized-types/dst-coerce-rc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] // Test a very simple custom DST coercion. diff --git a/tests/ui/dynamically-sized-types/dst-coercions.rs b/tests/ui/dynamically-sized-types/dst-coercions.rs index 1efdf1de0e61c..6b3c85cf83b06 100644 --- a/tests/ui/dynamically-sized-types/dst-coercions.rs +++ b/tests/ui/dynamically-sized-types/dst-coercions.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test coercions involving DST and/or raw pointers -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S; trait T { fn dummy(&self) { } } //~ WARN method `dummy` is never used diff --git a/tests/ui/dynamically-sized-types/dst-deref-mut.rs b/tests/ui/dynamically-sized-types/dst-deref-mut.rs index 1d62f42bd4ac4..c2160dbd356e8 100644 --- a/tests/ui/dynamically-sized-types/dst-deref-mut.rs +++ b/tests/ui/dynamically-sized-types/dst-deref-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a custom deref with a fat pointer return type does not ICE diff --git a/tests/ui/dynamically-sized-types/dst-deref.rs b/tests/ui/dynamically-sized-types/dst-deref.rs index 0a350bac14a90..0208ce4430eb0 100644 --- a/tests/ui/dynamically-sized-types/dst-deref.rs +++ b/tests/ui/dynamically-sized-types/dst-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a custom deref with a fat pointer return type does not ICE diff --git a/tests/ui/dynamically-sized-types/dst-field-align.rs b/tests/ui/dynamically-sized-types/dst-field-align.rs index 6c338e99912ec..09c818da63ff1 100644 --- a/tests/ui/dynamically-sized-types/dst-field-align.rs +++ b/tests/ui/dynamically-sized-types/dst-field-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo { a: u16, diff --git a/tests/ui/dynamically-sized-types/dst-index.rs b/tests/ui/dynamically-sized-types/dst-index.rs index 8aa65bbfdc9e7..2d209ae090d9c 100644 --- a/tests/ui/dynamically-sized-types/dst-index.rs +++ b/tests/ui/dynamically-sized-types/dst-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that overloaded index expressions with DST result types // work and don't ICE. diff --git a/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs b/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs index 0a6c49111febe..5e352e930d82a 100644 --- a/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs +++ b/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] struct Test(T); diff --git a/tests/ui/dynamically-sized-types/dst-raw.rs b/tests/ui/dynamically-sized-types/dst-raw.rs index 0893b02e74e82..c32ee67dab9fb 100644 --- a/tests/ui/dynamically-sized-types/dst-raw.rs +++ b/tests/ui/dynamically-sized-types/dst-raw.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test DST raw pointers diff --git a/tests/ui/dynamically-sized-types/dst-struct-sole.rs b/tests/ui/dynamically-sized-types/dst-struct-sole.rs index 6ca07fcf8da32..84af98ac8eef9 100644 --- a/tests/ui/dynamically-sized-types/dst-struct-sole.rs +++ b/tests/ui/dynamically-sized-types/dst-struct-sole.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // As dst-struct.rs, but the unsized field is the only field in the struct. diff --git a/tests/ui/dynamically-sized-types/dst-struct.rs b/tests/ui/dynamically-sized-types/dst-struct.rs index 5da9381f83783..a1670223bcda6 100644 --- a/tests/ui/dynamically-sized-types/dst-struct.rs +++ b/tests/ui/dynamically-sized-types/dst-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Fat { f1: isize, diff --git a/tests/ui/dynamically-sized-types/dst-trait-tuple.rs b/tests/ui/dynamically-sized-types/dst-trait-tuple.rs index c1e45215ad8c4..6ab8829859bf0 100644 --- a/tests/ui/dynamically-sized-types/dst-trait-tuple.rs +++ b/tests/ui/dynamically-sized-types/dst-trait-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![allow(unused_features)] diff --git a/tests/ui/dynamically-sized-types/dst-trait.rs b/tests/ui/dynamically-sized-types/dst-trait.rs index 7ac6f03925bb1..0b6bb7507e9ff 100644 --- a/tests/ui/dynamically-sized-types/dst-trait.rs +++ b/tests/ui/dynamically-sized-types/dst-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Fat { f1: isize, diff --git a/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs b/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs index 26b923f431f98..ad48d88e48078 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple-sole.rs b/tests/ui/dynamically-sized-types/dst-tuple-sole.rs index 606689da0c261..dc3363b9bde38 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-sole.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-sole.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(type_alias_bounds)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs b/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs index b0cefe77039d6..b4ee0fb4070d7 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple.rs b/tests/ui/dynamically-sized-types/dst-tuple.rs index 604ac51129010..52fc69f7809fd 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/early-ret-binop-add.rs b/tests/ui/early-ret-binop-add.rs index 2b5df52a51c36..5daf79c214c50 100644 --- a/tests/ui/early-ret-binop-add.rs +++ b/tests/ui/early-ret-binop-add.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::Add; diff --git a/tests/ui/editions/auxiliary/edition-imports-2015.rs b/tests/ui/editions/auxiliary/edition-imports-2015.rs index c72331ca2e119..f6fa1b2ff7631 100644 --- a/tests/ui/editions/auxiliary/edition-imports-2015.rs +++ b/tests/ui/editions/auxiliary/edition-imports-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! gen_imports { () => { diff --git a/tests/ui/editions/auxiliary/edition-imports-2018.rs b/tests/ui/editions/auxiliary/edition-imports-2018.rs index b08dc499a0ddd..f53a5d72f58f8 100644 --- a/tests/ui/editions/auxiliary/edition-imports-2018.rs +++ b/tests/ui/editions/auxiliary/edition-imports-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! gen_imports { () => { diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs index a4a2b156e1397..913cac39d5e59 100644 --- a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs +++ b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![allow(keyword_idents)] diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs index 02db38103d2a5..6f2f44797384f 100644 --- a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs +++ b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(keyword_idents)] diff --git a/tests/ui/editions/dyn-trait-sugg-2021.rs b/tests/ui/editions/dyn-trait-sugg-2021.rs index de0444b63e267..d702bfb2f88db 100644 --- a/tests/ui/editions/dyn-trait-sugg-2021.rs +++ b/tests/ui/editions/dyn-trait-sugg-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo {} diff --git a/tests/ui/editions/edition-extern-crate-allowed.rs b/tests/ui/editions/edition-extern-crate-allowed.rs index 8d142cea5de00..5e07417e5aa1b 100644 --- a/tests/ui/editions/edition-extern-crate-allowed.rs +++ b/tests/ui/editions/edition-extern-crate-allowed.rs @@ -1,6 +1,6 @@ -// aux-build:edition-extern-crate-allowed.rs -// edition:2015 -// check-pass +//@ aux-build:edition-extern-crate-allowed.rs +//@ edition:2015 +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/editions/edition-imports-2015.rs b/tests/ui/editions/edition-imports-2015.rs index 5ba45b19dded0..5faa78465bc37 100644 --- a/tests/ui/editions/edition-imports-2015.rs +++ b/tests/ui/editions/edition-imports-2015.rs @@ -1,7 +1,7 @@ -// edition:2015 -// compile-flags:--extern absolute -// aux-build:edition-imports-2018.rs -// aux-build:absolute.rs +//@ edition:2015 +//@ compile-flags:--extern absolute +//@ aux-build:edition-imports-2018.rs +//@ aux-build:absolute.rs #[macro_use] extern crate edition_imports_2018; diff --git a/tests/ui/editions/edition-imports-2018.rs b/tests/ui/editions/edition-imports-2018.rs index dcdbf0d050be1..ad462a0cf82e7 100644 --- a/tests/ui/editions/edition-imports-2018.rs +++ b/tests/ui/editions/edition-imports-2018.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs b/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs index 3fffb30c612d0..8b1ee8df1db86 100644 --- a/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs +++ b/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags:--extern edition_imports_2015 -// aux-build:edition-imports-2015.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags:--extern edition_imports_2015 +//@ aux-build:edition-imports-2015.rs mod edition_imports_2015 { pub struct Path; diff --git a/tests/ui/editions/edition-imports-virtual-2015-gated.rs b/tests/ui/editions/edition-imports-virtual-2015-gated.rs index 634d3e9a443fa..d52aeac132207 100644 --- a/tests/ui/editions/edition-imports-virtual-2015-gated.rs +++ b/tests/ui/editions/edition-imports-virtual-2015-gated.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2015-expansion.rs b/tests/ui/editions/edition-keywords-2015-2015-expansion.rs index b2695bea5c39d..a72863e1936f7 100644 --- a/tests/ui/editions/edition-keywords-2015-2015-expansion.rs +++ b/tests/ui/editions/edition-keywords-2015-2015-expansion.rs @@ -1,6 +1,6 @@ -// edition:2015 -// aux-build:edition-kw-macro-2015.rs -// check-pass +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs +//@ check-pass #![allow(keyword_idents)] diff --git a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs index 3574bc8151553..07104bdf217d0 100644 --- a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs +++ b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2015.rs b/tests/ui/editions/edition-keywords-2015-2015.rs index 77a2cb2e6dead..083767e2f0247 100644 --- a/tests/ui/editions/edition-keywords-2015-2015.rs +++ b/tests/ui/editions/edition-keywords-2015-2015.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] #![allow(unused_variables)] -// edition:2015 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2018-expansion.rs b/tests/ui/editions/edition-keywords-2015-2018-expansion.rs index 9f34a3887b7f1..1478cfdcef8ae 100644 --- a/tests/ui/editions/edition-keywords-2015-2018-expansion.rs +++ b/tests/ui/editions/edition-keywords-2015-2018-expansion.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs index 49f8562a6b19d..3c294f95cd265 100644 --- a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs +++ b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2015-2018.rs b/tests/ui/editions/edition-keywords-2015-2018.rs index a431a06bd1040..26452b53d4b89 100644 --- a/tests/ui/editions/edition-keywords-2015-2018.rs +++ b/tests/ui/editions/edition-keywords-2015-2018.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] #![allow(unused_variables)] -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2018-2015-expansion.rs b/tests/ui/editions/edition-keywords-2018-2015-expansion.rs index 707d8e95c1414..9b423003f69be 100644 --- a/tests/ui/editions/edition-keywords-2018-2015-expansion.rs +++ b/tests/ui/editions/edition-keywords-2018-2015-expansion.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-kw-macro-2015.rs -// check-pass +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs +//@ check-pass #![allow(keyword_idents)] diff --git a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs index 8472430361fbc..5918454327409 100644 --- a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs +++ b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs #![feature(async_closure)] diff --git a/tests/ui/editions/edition-keywords-2018-2015.rs b/tests/ui/editions/edition-keywords-2018-2015.rs index 4a02f86717218..4bcb501075e34 100644 --- a/tests/ui/editions/edition-keywords-2018-2015.rs +++ b/tests/ui/editions/edition-keywords-2018-2015.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// edition:2018 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2018-2018-expansion.rs b/tests/ui/editions/edition-keywords-2018-2018-expansion.rs index a8e69fed6959e..169a0885889b3 100644 --- a/tests/ui/editions/edition-keywords-2018-2018-expansion.rs +++ b/tests/ui/editions/edition-keywords-2018-2018-expansion.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs index c0d8927d05978..e3eed775a5fe2 100644 --- a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs +++ b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #![feature(async_closure)] diff --git a/tests/ui/editions/edition-keywords-2018-2018.rs b/tests/ui/editions/edition-keywords-2018-2018.rs index e72943261375b..237203d23b52c 100644 --- a/tests/ui/editions/edition-keywords-2018-2018.rs +++ b/tests/ui/editions/edition-keywords-2018-2018.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-raw-pointer-method-2015.rs b/tests/ui/editions/edition-raw-pointer-method-2015.rs index fcfe493c1a228..b85e70465aba6 100644 --- a/tests/ui/editions/edition-raw-pointer-method-2015.rs +++ b/tests/ui/editions/edition-raw-pointer-method-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 // tests that editions work with the tyvar warning-turned-error diff --git a/tests/ui/editions/edition-raw-pointer-method-2018.rs b/tests/ui/editions/edition-raw-pointer-method-2018.rs index 0bae65a9ae53d..b346953e187ee 100644 --- a/tests/ui/editions/edition-raw-pointer-method-2018.rs +++ b/tests/ui/editions/edition-raw-pointer-method-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // tests that editions work with the tyvar warning-turned-error diff --git a/tests/ui/elided-test.rs b/tests/ui/elided-test.rs index b3f4446f189da..025b75c1b5c87 100644 --- a/tests/ui/elided-test.rs +++ b/tests/ui/elided-test.rs @@ -1,4 +1,4 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found // Since we're not compiling a test runner this function should be elided // and the build will fail because main doesn't exist diff --git a/tests/ui/else-if.rs b/tests/ui/else-if.rs index 77d8d1abfaf3d..2161b28c58c93 100644 --- a/tests/ui/else-if.rs +++ b/tests/ui/else-if.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { if 1 == 2 { diff --git a/tests/ui/empty-allocation-non-null.rs b/tests/ui/empty-allocation-non-null.rs index 925bddd5edd9c..45035a42a5f85 100644 --- a/tests/ui/empty-allocation-non-null.rs +++ b/tests/ui/empty-allocation-non-null.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(Some(Box::new(())).is_some()); diff --git a/tests/ui/empty-allocation-rvalue-non-null.rs b/tests/ui/empty-allocation-rvalue-non-null.rs index ad0f22031067e..25c36679033b9 100644 --- a/tests/ui/empty-allocation-rvalue-non-null.rs +++ b/tests/ui/empty-allocation-rvalue-non-null.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: () = *Box::new(()); diff --git a/tests/ui/empty-type-parameter-list.rs b/tests/ui/empty-type-parameter-list.rs index 23d09fbf281d0..e8d6b2a99640c 100644 --- a/tests/ui/empty-type-parameter-list.rs +++ b/tests/ui/empty-type-parameter-list.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that empty type parameter list (<>) is synonymous with // no type parameters at all diff --git a/tests/ui/empty/empty-macro-use.rs b/tests/ui/empty/empty-macro-use.rs index 846004e661ddf..8f5ea7df3bd19 100644 --- a/tests/ui/empty/empty-macro-use.rs +++ b/tests/ui/empty/empty-macro-use.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use()] extern crate two_macros; diff --git a/tests/ui/empty/empty-struct-braces-expr.rs b/tests/ui/empty/empty-struct-braces-expr.rs index 2aab3e7772cc0..c10f76b92196b 100644 --- a/tests/ui/empty/empty-struct-braces-expr.rs +++ b/tests/ui/empty/empty-struct-braces-expr.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as constant or constructor function -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-1.rs b/tests/ui/empty/empty-struct-braces-pat-1.rs index 9bed93f9c1536..44fc00e02276b 100644 --- a/tests/ui/empty/empty-struct-braces-pat-1.rs +++ b/tests/ui/empty/empty-struct-braces-pat-1.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as constant pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-2.rs b/tests/ui/empty/empty-struct-braces-pat-2.rs index cfe4641f35604..df5a231e26860 100644 --- a/tests/ui/empty/empty-struct-braces-pat-2.rs +++ b/tests/ui/empty/empty-struct-braces-pat-2.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-3.rs b/tests/ui/empty/empty-struct-braces-pat-3.rs index 54d547eefcc95..3f58cc6d78ff6 100644 --- a/tests/ui/empty/empty-struct-braces-pat-3.rs +++ b/tests/ui/empty/empty-struct-braces-pat-3.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-tuple-pat.rs b/tests/ui/empty/empty-struct-tuple-pat.rs index 47da8a306a4b2..56095908fd536 100644 --- a/tests/ui/empty/empty-struct-tuple-pat.rs +++ b/tests/ui/empty/empty-struct-tuple-pat.rs @@ -1,6 +1,6 @@ // Can't use unit struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-unit-expr.rs b/tests/ui/empty/empty-struct-unit-expr.rs index 8f3688a2a0764..c71ea3bdce72c 100644 --- a/tests/ui/empty/empty-struct-unit-expr.rs +++ b/tests/ui/empty/empty-struct-unit-expr.rs @@ -1,6 +1,6 @@ // Can't use unit struct as constructor function -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-unit-pat.rs b/tests/ui/empty/empty-struct-unit-pat.rs index 44a1e9e3d93bc..901cf90a90af0 100644 --- a/tests/ui/empty/empty-struct-unit-pat.rs +++ b/tests/ui/empty/empty-struct-unit-pat.rs @@ -1,6 +1,6 @@ // Can't use unit struct as tuple struct pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/issue-37026.rs b/tests/ui/empty/issue-37026.rs index fd678a717d049..2b9dfdcb0f178 100644 --- a/tests/ui/empty/issue-37026.rs +++ b/tests/ui/empty/issue-37026.rs @@ -1,4 +1,4 @@ -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; diff --git a/tests/ui/empty/no-link.rs b/tests/ui/empty/no-link.rs index c80e61b451116..9f78714b7694a 100644 --- a/tests/ui/empty/no-link.rs +++ b/tests/ui/empty/no-link.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:empty-struct.rs +//@ check-pass +//@ aux-build:empty-struct.rs #[no_link] extern crate empty_struct; diff --git a/tests/ui/empty_global_asm.rs b/tests/ui/empty_global_asm.rs index af13762d11857..2517796ad107c 100644 --- a/tests/ui/empty_global_asm.rs +++ b/tests/ui/empty_global_asm.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// run-pass +//@ needs-asm-support +//@ run-pass use std::arch::global_asm; diff --git a/tests/ui/entry-point/imported_main_from_extern_crate.rs b/tests/ui/entry-point/imported_main_from_extern_crate.rs index 4fddfc44ac60a..abcf2cbc05bfb 100644 --- a/tests/ui/entry-point/imported_main_from_extern_crate.rs +++ b/tests/ui/entry-point/imported_main_from_extern_crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:main_functions.rs +//@ run-pass +//@ aux-build:main_functions.rs #![feature(imported_main)] diff --git a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs index 0a115dd3b0810..82d81a93d9d9a 100644 --- a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs +++ b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs @@ -1,4 +1,4 @@ -// aux-build:bad_main_functions.rs +//@ aux-build:bad_main_functions.rs #![feature(imported_main)] diff --git a/tests/ui/entry-point/imported_main_from_inner_mod.rs b/tests/ui/entry-point/imported_main_from_inner_mod.rs index 45750072a7f68..7212dd6182c5b 100644 --- a/tests/ui/entry-point/imported_main_from_inner_mod.rs +++ b/tests/ui/entry-point/imported_main_from_inner_mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(imported_main)] pub mod foo { diff --git a/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs b/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs index 4762fbb7c59ce..d0505aed86509 100644 --- a/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs +++ b/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] #[rustc_main] diff --git a/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs b/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs index 6a566ab3a3d88..392cc6acdcbf4 100644 --- a/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs +++ b/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::discriminant_value; diff --git a/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs b/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs index 83e74a6e685a7..effb66d1f53cd 100644 --- a/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs +++ b/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] extern crate test; diff --git a/tests/ui/enum-discriminant/discr-foreign.rs b/tests/ui/enum-discriminant/discr-foreign.rs index e7123b3445230..778d92fec2a85 100644 --- a/tests/ui/enum-discriminant/discr-foreign.rs +++ b/tests/ui/enum-discriminant/discr-foreign.rs @@ -1,5 +1,5 @@ -// aux-build:discr-foreign-dep.rs -// build-pass +//@ aux-build:discr-foreign-dep.rs +//@ build-pass extern crate discr_foreign_dep; diff --git a/tests/ui/enum-discriminant/discriminant_size.rs b/tests/ui/enum-discriminant/discriminant_size.rs index b939a70dfc568..a3ec1b28e5c76 100644 --- a/tests/ui/enum-discriminant/discriminant_size.rs +++ b/tests/ui/enum-discriminant/discriminant_size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics, repr128)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs index 1f6bb0cdc3a6f..d481ebafeceea 100644 --- a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs +++ b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(enum_intrinsics_non_enums)] diff --git a/tests/ui/enum-discriminant/discriminant_value.rs b/tests/ui/enum-discriminant/discriminant_value.rs index 2864cd40da0d5..0d6b9166c26a3 100644 --- a/tests/ui/enum-discriminant/discriminant_value.rs +++ b/tests/ui/enum-discriminant/discriminant_value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(core, core_intrinsics)] diff --git a/tests/ui/enum-discriminant/get_discr.rs b/tests/ui/enum-discriminant/get_discr.rs index 71eea4e0f78af..d7d11274de40f 100644 --- a/tests/ui/enum-discriminant/get_discr.rs +++ b/tests/ui/enum-discriminant/get_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Now that there are several variations on the code generated in // `codegen_get_discr`, let's make sure the various cases yield the correct diff --git a/tests/ui/enum-discriminant/issue-104519.rs b/tests/ui/enum-discriminant/issue-104519.rs index 507c0988fcc10..531eb680a4fa6 100644 --- a/tests/ui/enum-discriminant/issue-104519.rs +++ b/tests/ui/enum-discriminant/issue-104519.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum OpenResult { diff --git a/tests/ui/enum-discriminant/issue-41394-rpass.rs b/tests/ui/enum-discriminant/issue-41394-rpass.rs index 37c6525234d3f..79dca59cd74a6 100644 --- a/tests/ui/enum-discriminant/issue-41394-rpass.rs +++ b/tests/ui/enum-discriminant/issue-41394-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-41394.rs +//@ run-pass +//@ aux-build:issue-41394.rs extern crate issue_41394 as lib; diff --git a/tests/ui/enum-discriminant/issue-43398.rs b/tests/ui/enum-discriminant/issue-43398.rs index 581db033f9257..574a4b3ad5a09 100644 --- a/tests/ui/enum-discriminant/issue-43398.rs +++ b/tests/ui/enum-discriminant/issue-43398.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(repr128)] diff --git a/tests/ui/enum-discriminant/issue-46519.rs b/tests/ui/enum-discriminant/issue-46519.rs index 0567923b7fc69..e5f0138c95cee 100644 --- a/tests/ui/enum-discriminant/issue-46519.rs +++ b/tests/ui/enum-discriminant/issue-46519.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags:--test -O +//@ run-pass +//@ compile-flags:--test -O -// needs-unwind +//@ needs-unwind #[test] #[should_panic(expected = "creating inhabited type")] diff --git a/tests/ui/enum-discriminant/issue-50689.rs b/tests/ui/enum-discriminant/issue-50689.rs index b49f2950020a2..e92d726be45f7 100644 --- a/tests/ui/enum-discriminant/issue-50689.rs +++ b/tests/ui/enum-discriminant/issue-50689.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] enum Foo { Bar = (|x: i32| { }, 42).1, diff --git a/tests/ui/enum-discriminant/issue-51582.rs b/tests/ui/enum-discriminant/issue-51582.rs index 40a70c623a741..bad165bf39062 100644 --- a/tests/ui/enum-discriminant/issue-51582.rs +++ b/tests/ui/enum-discriminant/issue-51582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #[repr(i8)] diff --git a/tests/ui/enum-discriminant/issue-61696.rs b/tests/ui/enum-discriminant/issue-61696.rs index 8a633a916c838..d200b4410ff9d 100644 --- a/tests/ui/enum-discriminant/issue-61696.rs +++ b/tests/ui/enum-discriminant/issue-61696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub enum Infallible {} diff --git a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs index 3adac7b72621c..e98532c120793 100644 --- a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs +++ b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr128)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum-discriminant/issue-90038.rs b/tests/ui/enum-discriminant/issue-90038.rs index 5e98eccd9b55c..f75f1456fbb9e 100644 --- a/tests/ui/enum-discriminant/issue-90038.rs +++ b/tests/ui/enum-discriminant/issue-90038.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(u32)] pub enum Foo { diff --git a/tests/ui/enum-discriminant/niche-prefer-zero.rs b/tests/ui/enum-discriminant/niche-prefer-zero.rs index f20607a890382..b1e2b1948f71f 100644 --- a/tests/ui/enum-discriminant/niche-prefer-zero.rs +++ b/tests/ui/enum-discriminant/niche-prefer-zero.rs @@ -1,6 +1,6 @@ // Check that niche selection prefers zero. // See https://github.com/rust-lang/rust/pull/87794 -// run-pass +//@ run-pass #[repr(u8)] pub enum Size { One = 1, diff --git a/tests/ui/enum-discriminant/niche.rs b/tests/ui/enum-discriminant/niche.rs index 8d30610504f7d..15d227fd826ee 100644 --- a/tests/ui/enum-discriminant/niche.rs +++ b/tests/ui/enum-discriminant/niche.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Make sure that we read and write enum discriminants correctly for corner cases caused //! by layout optimizations. diff --git a/tests/ui/enum-discriminant/repr128.rs b/tests/ui/enum-discriminant/repr128.rs index 00021a07b3719..075ff7a767613 100644 --- a/tests/ui/enum-discriminant/repr128.rs +++ b/tests/ui/enum-discriminant/repr128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr128, core_intrinsics, discriminant_kind)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum/enum-size-variance.rs b/tests/ui/enum/enum-size-variance.rs index 082bd0dcfb22c..28b7fa9f7469f 100644 --- a/tests/ui/enum/enum-size-variance.rs +++ b/tests/ui/enum/enum-size-variance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(variant_size_differences)] #![allow(dead_code)] diff --git a/tests/ui/enum/issue-1821.rs b/tests/ui/enum/issue-1821.rs index 76ee9c3edb0c2..76d60962c38be 100644 --- a/tests/ui/enum/issue-1821.rs +++ b/tests/ui/enum/issue-1821.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // Issue #1821 - Don't recurse trying to typecheck this -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum t { foo(Vec) diff --git a/tests/ui/enum/issue-42747.rs b/tests/ui/enum/issue-42747.rs index fec6587821069..976a7f0a68cdf 100644 --- a/tests/ui/enum/issue-42747.rs +++ b/tests/ui/enum/issue-42747.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! fooN { ($cur:ident $prev:ty) => { #[allow(dead_code)] diff --git a/tests/ui/enum/union-in-enum.rs b/tests/ui/enum/union-in-enum.rs index 048913e25cd96..90feadf0a8884 100644 --- a/tests/ui/enum/union-in-enum.rs +++ b/tests/ui/enum/union-in-enum.rs @@ -5,7 +5,7 @@ #![allow(warnings)] -// check-pass +//@ check-pass enum A { union } enum B { union {} } diff --git a/tests/ui/env-args-reverse-iterator.rs b/tests/ui/env-args-reverse-iterator.rs index 7f06718c038b5..4971d2b30e77f 100644 --- a/tests/ui/env-args-reverse-iterator.rs +++ b/tests/ui/env-args-reverse-iterator.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env::args; use std::process::Command; diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs index 46e20d8c61f52..ac6da1fefae5b 100644 --- a/tests/ui/env-funky-keys.rs +++ b/tests/ui/env-funky-keys.rs @@ -1,13 +1,13 @@ -// run-pass +//@ run-pass // Ignore this test on Android, because it segfaults there. -// ignore-android -// ignore-windows -// ignore-emscripten no execve -// ignore-sgx no execve -// ignore-vxworks no execve -// ignore-fuchsia no 'execve' -// no-prefer-dynamic +//@ ignore-android +//@ ignore-windows +//@ ignore-emscripten no execve +//@ ignore-sgx no execve +//@ ignore-vxworks no execve +//@ ignore-fuchsia no 'execve' +//@ no-prefer-dynamic #![feature(rustc_private)] diff --git a/tests/ui/env-null-vars.rs b/tests/ui/env-null-vars.rs index 10582a8a51461..55fe8ac25ca02 100644 --- a/tests/ui/env-null-vars.rs +++ b/tests/ui/env-null-vars.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-windows -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-windows +//@ ignore-wasm32-bare no libc to test ffi with // issue-53200 diff --git a/tests/ui/env-vars.rs b/tests/ui/env-vars.rs index f5035bb2c6985..5ca1b80f235d1 100644 --- a/tests/ui/env-vars.rs +++ b/tests/ui/env-vars.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no env vars +//@ run-pass +//@ ignore-wasm32-bare no env vars use std::env::*; diff --git a/tests/ui/error-codes/E0010-teach.rs b/tests/ui/error-codes/E0010-teach.rs index 798fcda2a1013..146e68df14a87 100644 --- a/tests/ui/error-codes/E0010-teach.rs +++ b/tests/ui/error-codes/E0010-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach #![allow(warnings)] diff --git a/tests/ui/error-codes/E0026-teach.rs b/tests/ui/error-codes/E0026-teach.rs index 7c51004ffe46e..9a6ba2605a78e 100644 --- a/tests/ui/error-codes/E0026-teach.rs +++ b/tests/ui/error-codes/E0026-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach struct Thing { x: u32, diff --git a/tests/ui/error-codes/E0029-teach.rs b/tests/ui/error-codes/E0029-teach.rs index 3ff8cb348e76a..d70ba7a99c5eb 100644 --- a/tests/ui/error-codes/E0029-teach.rs +++ b/tests/ui/error-codes/E0029-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach fn main() { let s = "hoho"; diff --git a/tests/ui/error-codes/E0030-teach.rs b/tests/ui/error-codes/E0030-teach.rs index 388064fb0fae5..e1f887139e3d4 100644 --- a/tests/ui/error-codes/E0030-teach.rs +++ b/tests/ui/error-codes/E0030-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach fn main() { match 5u32 { diff --git a/tests/ui/error-codes/E0033-teach.rs b/tests/ui/error-codes/E0033-teach.rs index 289561bad8a09..0a7188881f60f 100644 --- a/tests/ui/error-codes/E0033-teach.rs +++ b/tests/ui/error-codes/E0033-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach trait SomeTrait { fn foo(&self); } diff --git a/tests/ui/error-codes/E0040.fixed b/tests/ui/error-codes/E0040.fixed index 139dc8f94964f..22943599804cf 100644 --- a/tests/ui/error-codes/E0040.fixed +++ b/tests/ui/error-codes/E0040.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: i32, } diff --git a/tests/ui/error-codes/E0040.rs b/tests/ui/error-codes/E0040.rs index 9ffc42d0c7804..ac2ca3770f0fd 100644 --- a/tests/ui/error-codes/E0040.rs +++ b/tests/ui/error-codes/E0040.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: i32, } diff --git a/tests/ui/error-codes/E0152.rs b/tests/ui/error-codes/E0152.rs index ee8e5e6dffee3..d56d4e710a405 100644 --- a/tests/ui/error-codes/E0152.rs +++ b/tests/ui/error-codes/E0152.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*liballoc-.*.rlib" -> "loaded from SYSROOT/liballoc-*.rlib" +//@ normalize-stderr-test "loaded from .*liballoc-.*.rlib" -> "loaded from SYSROOT/liballoc-*.rlib" #![feature(lang_items)] #[lang = "owned_box"] diff --git a/tests/ui/error-codes/E0161.rs b/tests/ui/error-codes/E0161.rs index c906e3c352d97..3a9b93d24303f 100644 --- a/tests/ui/error-codes/E0161.rs +++ b/tests/ui/error-codes/E0161.rs @@ -1,9 +1,9 @@ // Check that E0161 is a hard error in all possible configurations that might // affect it. -// revisions: base ul -//[base] check-fail -//[ul] check-pass +//@ revisions: base ul +//@[base] check-fail +//@[ul] check-pass #![allow(incomplete_features)] #![cfg_attr(ul, feature(unsized_locals))] diff --git a/tests/ui/error-codes/E0275.rs b/tests/ui/error-codes/E0275.rs index 95d7f85f10546..889d9d8be9039 100644 --- a/tests/ui/error-codes/E0275.rs +++ b/tests/ui/error-codes/E0275.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Foo {} struct Bar(T); diff --git a/tests/ui/error-codes/E0311.fixed b/tests/ui/error-codes/E0311.fixed index 09ceecd0666cd..fd828f39a97a9 100644 --- a/tests/ui/error-codes/E0311.fixed +++ b/tests/ui/error-codes/E0311.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/error-codes/E0311.rs b/tests/ui/error-codes/E0311.rs index 99e454f4d75c2..8d3ad0dd5e51b 100644 --- a/tests/ui/error-codes/E0311.rs +++ b/tests/ui/error-codes/E0311.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/error-codes/E0435.fixed b/tests/ui/error-codes/E0435.fixed index fdf896d2dbbbd..7420629343322 100644 --- a/tests/ui/error-codes/E0435.fixed +++ b/tests/ui/error-codes/E0435.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main () { #[allow(non_upper_case_globals)] const foo: usize = 42; diff --git a/tests/ui/error-codes/E0435.rs b/tests/ui/error-codes/E0435.rs index d9354efb8fdc4..f370b2d7cc2c6 100644 --- a/tests/ui/error-codes/E0435.rs +++ b/tests/ui/error-codes/E0435.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main () { #[allow(non_upper_case_globals)] let foo: usize = 42; diff --git a/tests/ui/error-codes/E0462.rs b/tests/ui/error-codes/E0462.rs index f839ee783b53e..2dd3b16394d55 100644 --- a/tests/ui/error-codes/E0462.rs +++ b/tests/ui/error-codes/E0462.rs @@ -1,8 +1,8 @@ -// aux-build:found-staticlib.rs +//@ aux-build:found-staticlib.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?found_staticlib\.[a-z]+" -> "libfound_staticlib.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?found_staticlib\.[a-z]+" -> "libfound_staticlib.somelib" extern crate found_staticlib; //~ ERROR E0462 diff --git a/tests/ui/error-codes/E0464.rs b/tests/ui/error-codes/E0464.rs index 47717fbd508a8..4ecf21996ccf7 100644 --- a/tests/ui/error-codes/E0464.rs +++ b/tests/ui/error-codes/E0464.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated from `tests/ui/crate-loading/crateresolve1.rs`. diff --git a/tests/ui/error-codes/E0476.rs b/tests/ui/error-codes/E0476.rs index d87916198c564..03656d28b2b99 100644 --- a/tests/ui/error-codes/E0476.rs +++ b/tests/ui/error-codes/E0476.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver=coherence +//@ revisions: old next +//@[next] compile-flags: -Znext-solver=coherence #![feature(coerce_unsized)] #![feature(unsize)] diff --git a/tests/ui/error-codes/E0511.rs b/tests/ui/error-codes/E0511.rs index a52f81a6c5df4..8c79bcf5a6720 100644 --- a/tests/ui/error-codes/E0511.rs +++ b/tests/ui/error-codes/E0511.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(platform_intrinsics)] diff --git a/tests/ui/error-codes/E0519.rs b/tests/ui/error-codes/E0519.rs index 269ffd6320d9e..5d38b0459e41a 100644 --- a/tests/ui/error-codes/E0519.rs +++ b/tests/ui/error-codes/E0519.rs @@ -1,5 +1,5 @@ // no need to create a new aux file, we can use an existing. -// aux-build: crateresolve1-1.rs +//@ aux-build: crateresolve1-1.rs // set same metadata as `crateresolve1` #![crate_name = "crateresolve1"] diff --git a/tests/ui/error-codes/E0523.rs b/tests/ui/error-codes/E0523.rs index 47717fbd508a8..4ecf21996ccf7 100644 --- a/tests/ui/error-codes/E0523.rs +++ b/tests/ui/error-codes/E0523.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated from `tests/ui/crate-loading/crateresolve1.rs`. diff --git a/tests/ui/error-codes/E0602.rs b/tests/ui/error-codes/E0602.rs index 77d28838a10c2..1849fd2d895cf 100644 --- a/tests/ui/error-codes/E0602.rs +++ b/tests/ui/error-codes/E0602.rs @@ -1,8 +1,8 @@ -// compile-flags:-D bogus -// check-pass +//@ compile-flags:-D bogus +//@ check-pass -// error-pattern:E0602 -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:`#[warn(unknown_lints)]` on by default +//@ error-pattern:E0602 +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:`#[warn(unknown_lints)]` on by default fn main() {} diff --git a/tests/ui/error-codes/E0642.fixed b/tests/ui/error-codes/E0642.fixed index fc6255e027443..1b7e0684254a3 100644 --- a/tests/ui/error-codes/E0642.fixed +++ b/tests/ui/error-codes/E0642.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for rustfix diff --git a/tests/ui/error-codes/E0642.rs b/tests/ui/error-codes/E0642.rs index 5f85f3935e1a0..ceac23574083c 100644 --- a/tests/ui/error-codes/E0642.rs +++ b/tests/ui/error-codes/E0642.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for rustfix diff --git a/tests/ui/error-codes/E0789.rs b/tests/ui/error-codes/E0789.rs index c0cbbcc9d2dc2..3acc983edc4ec 100644 --- a/tests/ui/error-codes/E0789.rs +++ b/tests/ui/error-codes/E0789.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![feature(rustc_attrs)] #![feature(staged_api)] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-1.rs b/tests/ui/error-codes/auxiliary/crateresolve1-1.rs index bd9c8483ec29e..6649ffd7a2d6e 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-1.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-1.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-1 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-1 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-2.rs b/tests/ui/error-codes/auxiliary/crateresolve1-2.rs index bd0f08f45b633..63327c7766836 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-2.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-2 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-2 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-3.rs b/tests/ui/error-codes/auxiliary/crateresolve1-3.rs index 1226c2fbb461e..59ed1836990a7 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-3.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-3.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-3 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-3 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/found-staticlib.rs b/tests/ui/error-codes/auxiliary/found-staticlib.rs index 04e2c59789d0c..05a3d011b67f0 100644 --- a/tests/ui/error-codes/auxiliary/found-staticlib.rs +++ b/tests/ui/error-codes/auxiliary/found-staticlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "staticlib"] pub fn foo() {} diff --git a/tests/ui/error-codes/e0119/complex-impl.rs b/tests/ui/error-codes/e0119/complex-impl.rs index 9149e4ce58e76..8e46044d0ae5e 100644 --- a/tests/ui/error-codes/e0119/complex-impl.rs +++ b/tests/ui/error-codes/e0119/complex-impl.rs @@ -1,4 +1,4 @@ -// aux-build:complex_impl_support.rs +//@ aux-build:complex_impl_support.rs extern crate complex_impl_support; diff --git a/tests/ui/error-codes/e0119/issue-23563.rs b/tests/ui/error-codes/e0119/issue-23563.rs index f578560c552a8..7fbc7a5ad5996 100644 --- a/tests/ui/error-codes/e0119/issue-23563.rs +++ b/tests/ui/error-codes/e0119/issue-23563.rs @@ -1,4 +1,4 @@ -// aux-build:issue-23563-a.rs +//@ aux-build:issue-23563-a.rs // Ref: https://github.com/rust-lang/rust/issues/23563#issuecomment-260751672 diff --git a/tests/ui/error-emitter/highlighting.rs b/tests/ui/error-emitter/highlighting.rs index fd61b2b05ff96..34da2fe6b8135 100644 --- a/tests/ui/error-emitter/highlighting.rs +++ b/tests/ui/error-emitter/highlighting.rs @@ -1,12 +1,12 @@ // Make sure "highlighted" code is colored purple -// compile-flags: --error-format=human --color=always -// error-pattern:for<'a>  -// edition:2018 +//@ compile-flags: --error-format=human --color=always +//@ error-pattern:for<'a>  +//@ edition:2018 -// revisions: windows not-windows -// [windows]only-windows -// [not-windows]ignore-windows +//@ revisions: windows not-windows +//@ [windows]only-windows +//@ [not-windows]ignore-windows use core::pin::Pin; use core::future::Future; diff --git a/tests/ui/error-emitter/multiline-multipart-suggestion.rs b/tests/ui/error-emitter/multiline-multipart-suggestion.rs index a06399c345805..fac8f34f59f16 100644 --- a/tests/ui/error-emitter/multiline-multipart-suggestion.rs +++ b/tests/ui/error-emitter/multiline-multipart-suggestion.rs @@ -1,9 +1,9 @@ -// compile-flags: --error-format=human --color=always -// error-pattern: missing lifetime specifier +//@ compile-flags: --error-format=human --color=always +//@ error-pattern: missing lifetime specifier -// revisions: windows not-windows -// [windows]only-windows -// [not-windows]ignore-windows +//@ revisions: windows not-windows +//@ [windows]only-windows +//@ [not-windows]ignore-windows fn short(foo_bar: &Vec<&i32>) -> &i32 { &12 diff --git a/tests/ui/errors/auxiliary/remapped_dep.rs b/tests/ui/errors/auxiliary/remapped_dep.rs index f9bb7bf89870a..36d4699a30600 100644 --- a/tests/ui/errors/auxiliary/remapped_dep.rs +++ b/tests/ui/errors/auxiliary/remapped_dep.rs @@ -1,4 +1,4 @@ -// compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux +//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. pub struct SomeStruct {} // This line should be show as part of the error. diff --git a/tests/ui/errors/issue-104621-extern-bad-file.rs b/tests/ui/errors/issue-104621-extern-bad-file.rs index 3f13d60523203..f675a4a3a4fec 100644 --- a/tests/ui/errors/issue-104621-extern-bad-file.rs +++ b/tests/ui/errors/issue-104621-extern-bad-file.rs @@ -1,5 +1,5 @@ -// compile-flags: --extern foo={{src-base}}/errors/issue-104621-extern-bad-file.rs -// only-linux +//@ compile-flags: --extern foo={{src-base}}/errors/issue-104621-extern-bad-file.rs +//@ only-linux extern crate foo; //~^ ERROR extern location for foo is of an unknown type diff --git a/tests/ui/errors/issue-104621-extern-not-file.rs b/tests/ui/errors/issue-104621-extern-not-file.rs index 899e45a306b05..50806df15f7ad 100644 --- a/tests/ui/errors/issue-104621-extern-not-file.rs +++ b/tests/ui/errors/issue-104621-extern-not-file.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern foo=. +//@ compile-flags: --extern foo=. extern crate foo; //~ ERROR extern location for foo is not a file: . fn main() {} diff --git a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs index a1c7af128d2ee..dff3d02248b11 100644 --- a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs +++ b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait X { fn test(x: u32, ( diff --git a/tests/ui/errors/remap-path-prefix-macro.rs b/tests/ui/errors/remap-path-prefix-macro.rs index 0ba706b0a8f3e..665156027c995 100644 --- a/tests/ui/errors/remap-path-prefix-macro.rs +++ b/tests/ui/errors/remap-path-prefix-macro.rs @@ -1,10 +1,10 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results -// revisions: normal with-macro-scope without-macro-scope -// compile-flags: --remap-path-prefix={{src-base}}=remapped -// [with-macro-scope]compile-flags: -Zremap-path-scope=macro,diagnostics -// [without-macro-scope]compile-flags: -Zremap-path-scope=diagnostics +//@ revisions: normal with-macro-scope without-macro-scope +//@ compile-flags: --remap-path-prefix={{src-base}}=remapped +//@ [with-macro-scope]compile-flags: -Zremap-path-scope=macro,diagnostics +//@ [without-macro-scope]compile-flags: -Zremap-path-scope=diagnostics // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. fn main() { diff --git a/tests/ui/errors/remap-path-prefix-reverse.rs b/tests/ui/errors/remap-path-prefix-reverse.rs index 71c80063c320f..7743e38f50f08 100644 --- a/tests/ui/errors/remap-path-prefix-reverse.rs +++ b/tests/ui/errors/remap-path-prefix-reverse.rs @@ -1,12 +1,12 @@ -// aux-build:remapped_dep.rs -// compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux +//@ aux-build:remapped_dep.rs +//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux -// revisions: local-self remapped-self +//@ revisions: local-self remapped-self // [local-self] no-remap-src-base: The hack should work regardless of remapping. -// [remapped-self] remap-src-base +//@ [remapped-self] remap-src-base // Verify that the expected source code is shown. -// error-pattern: pub struct SomeStruct {} // This line should be show +//@ error-pattern: pub struct SomeStruct {} // This line should be show extern crate remapped_dep; diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs index e3338c10fd7e6..6283a8737ff2a 100644 --- a/tests/ui/errors/remap-path-prefix.rs +++ b/tests/ui/errors/remap-path-prefix.rs @@ -1,15 +1,15 @@ -// revisions: normal with-diagnostic-scope without-diagnostic-scope -// compile-flags: --remap-path-prefix={{src-base}}=remapped -// [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics -// [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object +//@ revisions: normal with-diagnostic-scope without-diagnostic-scope +//@ compile-flags: --remap-path-prefix={{src-base}}=remapped +//@ [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics +//@ [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. // The remapped paths are not normalized by compiletest. -// normalize-stderr-test: "\\(errors)" -> "/$1" +//@ normalize-stderr-test: "\\(errors)" -> "/$1" // The remapped paths aren't recognized by compiletest, so we // cannot use line-specific patterns. -// error-pattern: E0425 +//@ error-pattern: E0425 fn main() { // We cannot actually put an ERROR marker here because diff --git a/tests/ui/exec-env.rs b/tests/ui/exec-env.rs index d7f15bcae7d2c..08c5aa864676c 100644 --- a/tests/ui/exec-env.rs +++ b/tests/ui/exec-env.rs @@ -1,7 +1,7 @@ -// run-pass -// exec-env:TEST_EXEC_ENV=22 -// ignore-emscripten FIXME: issue #31622 -// ignore-sgx unsupported +//@ run-pass +//@ exec-env:TEST_EXEC_ENV=22 +//@ ignore-emscripten FIXME: issue #31622 +//@ ignore-sgx unsupported use std::env; diff --git a/tests/ui/explain.rs b/tests/ui/explain.rs index 5364d92e0c46b..1206c4f95ebdf 100644 --- a/tests/ui/explain.rs +++ b/tests/ui/explain.rs @@ -1,2 +1,2 @@ -// compile-flags: --explain E0591 -// check-pass +//@ compile-flags: --explain E0591 +//@ check-pass diff --git a/tests/ui/explicit-i-suffix.rs b/tests/ui/explicit-i-suffix.rs index 40c7e47510485..29c7391521e2f 100644 --- a/tests/ui/explicit-i-suffix.rs +++ b/tests/ui/explicit-i-suffix.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: isize = 8; diff --git a/tests/ui/explicit-tail-calls/become-outside.rs b/tests/ui/explicit-tail-calls/become-outside.rs index 51b4389c88fcd..9c90d929111e1 100644 --- a/tests/ui/explicit-tail-calls/become-outside.rs +++ b/tests/ui/explicit-tail-calls/become-outside.rs @@ -1,4 +1,4 @@ -// revisions: constant array +//@ revisions: constant array #![allow(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/return-lifetime-sub.rs b/tests/ui/explicit-tail-calls/return-lifetime-sub.rs index 8a3f43d4b92b5..1243fba9b5883 100644 --- a/tests/ui/explicit-tail-calls/return-lifetime-sub.rs +++ b/tests/ui/explicit-tail-calls/return-lifetime-sub.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit/explicit-call-to-dtor.fixed b/tests/ui/explicit/explicit-call-to-dtor.fixed index 91a4ca608da4e..4c4142c79811d 100644 --- a/tests/ui/explicit/explicit-call-to-dtor.fixed +++ b/tests/ui/explicit/explicit-call-to-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: isize } diff --git a/tests/ui/explicit/explicit-call-to-dtor.rs b/tests/ui/explicit/explicit-call-to-dtor.rs index 0656871eb1b34..262dde54c7f6a 100644 --- a/tests/ui/explicit/explicit-call-to-dtor.rs +++ b/tests/ui/explicit/explicit-call-to-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: isize } diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed index 3c71587c8e399..57cb858aa0895 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(dropping_references)] diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs index 075d4cbe02b31..bb29e49524205 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(dropping_references)] diff --git a/tests/ui/explore-issue-38412.rs b/tests/ui/explore-issue-38412.rs index 46d952df77195..836cb98b5b345 100644 --- a/tests/ui/explore-issue-38412.rs +++ b/tests/ui/explore-issue-38412.rs @@ -1,4 +1,4 @@ -// aux-build:pub-and-stability.rs +//@ aux-build:pub-and-stability.rs // A big point of this test is that we *declare* `unstable_declared`, // but do *not* declare `unstable_undeclared`. This way we can check diff --git a/tests/ui/expr-block-fn.rs b/tests/ui/expr-block-fn.rs index 1cac2cac0ac5d..1d3689eb4f3d4 100644 --- a/tests/ui/expr-block-fn.rs +++ b/tests/ui/expr-block-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_fn() { fn ten() -> isize { return 10; } diff --git a/tests/ui/expr-block-generic.rs b/tests/ui/expr-block-generic.rs index 29c7c42219c73..b36bda917d61b 100644 --- a/tests/ui/expr-block-generic.rs +++ b/tests/ui/expr-block-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { diff --git a/tests/ui/expr-block.rs b/tests/ui/expr-block.rs index ff87595c934e9..bf626c9ead372 100644 --- a/tests/ui/expr-block.rs +++ b/tests/ui/expr-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] diff --git a/tests/ui/expr-copy.rs b/tests/ui/expr-copy.rs index 1c6ae03810f08..cfe47ff6d939c 100644 --- a/tests/ui/expr-copy.rs +++ b/tests/ui/expr-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(arg: &mut A) { arg.a = 100; diff --git a/tests/ui/expr-if-generic.rs b/tests/ui/expr-if-generic.rs index 32ed6d9bee0cf..ed99ee63a5149 100644 --- a/tests/ui/expr-if-generic.rs +++ b/tests/ui/expr-if-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: T, not_expected: T, eq: F) where T: Clone, diff --git a/tests/ui/expr-if-panic-all.rs b/tests/ui/expr-if-panic-all.rs index f915a7d9da068..2ba2a36d165b5 100644 --- a/tests/ui/expr-if-panic-all.rs +++ b/tests/ui/expr-if-panic-all.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When all branches of an if expression result in panic, the entire if // expression results in panic. diff --git a/tests/ui/expr-scope.rs b/tests/ui/expr-scope.rs index 9976b6814c00d..57321ce2aa015 100644 --- a/tests/ui/expr-scope.rs +++ b/tests/ui/expr-scope.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for issue #762 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn f() { } pub fn main() { return ::f(); } diff --git a/tests/ui/expr/compound-assignment/eval-order.rs b/tests/ui/expr/compound-assignment/eval-order.rs index 658adae193e14..c7940a06a8994 100644 --- a/tests/ui/expr/compound-assignment/eval-order.rs +++ b/tests/ui/expr/compound-assignment/eval-order.rs @@ -1,6 +1,6 @@ // Test evaluation order of operands of the compound assignment operators -// run-pass +//@ run-pass use std::ops::AddAssign; diff --git a/tests/ui/expr/if-bot.rs b/tests/ui/expr/if-bot.rs index 0f09db530d45e..82c27d57aa868 100644 --- a/tests/ui/expr/if-bot.rs +++ b/tests/ui/expr/if-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: isize = if false { panic!() } else { 5 }; diff --git a/tests/ui/expr/if/attrs/builtin-if-attr.rs b/tests/ui/expr/if/attrs/builtin-if-attr.rs index 7e290661501c9..3c6606acdca78 100644 --- a/tests/ui/expr/if/attrs/builtin-if-attr.rs +++ b/tests/ui/expr/if/attrs/builtin-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { #[allow(unused_variables)] diff --git a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs index 1f77a1bb3427d..72d83215adead 100644 --- a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs +++ b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn simple_attr() { diff --git a/tests/ui/expr/if/attrs/gate-whole-expr.rs b/tests/ui/expr/if/attrs/gate-whole-expr.rs index 63772d54b531d..bab01592c247b 100644 --- a/tests/ui/expr/if/attrs/gate-whole-expr.rs +++ b/tests/ui/expr/if/attrs/gate-whole-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = 1; diff --git a/tests/ui/expr/if/attrs/let-chains-attr.rs b/tests/ui/expr/if/attrs/let-chains-attr.rs index 2cd8731141af7..b3dbd53e5798c 100644 --- a/tests/ui/expr/if/attrs/let-chains-attr.rs +++ b/tests/ui/expr/if/attrs/let-chains-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/expr/if/expr-if-panic-fn.rs b/tests/ui/expr/if/expr-if-panic-fn.rs index 36e49785a49d0..4f3d7fd48e36e 100644 --- a/tests/ui/expr/if/expr-if-panic-fn.rs +++ b/tests/ui/expr/if/expr-if-panic-fn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/expr/if/expr-if-panic-pass.rs b/tests/ui/expr/if/expr-if-panic-pass.rs index 6069cd835e14c..faf3cf1255076 100644 --- a/tests/ui/expr/if/expr-if-panic-pass.rs +++ b/tests/ui/expr/if/expr-if-panic-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_if_panic() { let x = if false { panic!() } else { 10 }; diff --git a/tests/ui/expr/if/expr-if-panic.rs b/tests/ui/expr/if/expr-if-panic.rs index 520ee0870ee15..0b43d1d6b0069 100644 --- a/tests/ui/expr/if/expr-if-panic.rs +++ b/tests/ui/expr/if/expr-if-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let _x = if false { diff --git a/tests/ui/expr/if/expr-if.rs b/tests/ui/expr/if/expr-if.rs index 2b8474ff4539f..ae869c4b77a38 100644 --- a/tests/ui/expr/if/expr-if.rs +++ b/tests/ui/expr/if/expr-if.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for if as expressions fn test_if() { let rs: bool = if true { true } else { false }; assert!((rs)); } diff --git a/tests/ui/expr/if/if-check-panic.rs b/tests/ui/expr/if/if-check-panic.rs index 037cd427ccf36..4b400deaca46f 100644 --- a/tests/ui/expr/if/if-check-panic.rs +++ b/tests/ui/expr/if/if-check-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:Number is odd -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:Number is odd +//@ ignore-emscripten no processes fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-check.rs b/tests/ui/expr/if/if-check.rs index 6593225e7dd95..f3fb3a59ff030 100644 --- a/tests/ui/expr/if/if-check.rs +++ b/tests/ui/expr/if/if-check.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-cond-bot.rs b/tests/ui/expr/if/if-cond-bot.rs index bcd114678528c..ddb5559ffca7c 100644 --- a/tests/ui/expr/if/if-cond-bot.rs +++ b/tests/ui/expr/if/if-cond-bot.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/expr/if/if-let.rs b/tests/ui/expr/if/if-let.rs index 7fdd2be955b98..a21445f188a4a 100644 --- a/tests/ui/expr/if/if-let.rs +++ b/tests/ui/expr/if/if-let.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn macros() { macro_rules! foo { diff --git a/tests/ui/expr/if/if-loop.rs b/tests/ui/expr/if/if-loop.rs index 06d0bdf456cdb..f4121c92d1758 100644 --- a/tests/ui/expr/if/if-loop.rs +++ b/tests/ui/expr/if/if-loop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to ICE because the "if" being unreachable was not handled correctly fn err() { diff --git a/tests/ui/expr/if/if-ret.rs b/tests/ui/expr/if/if-ret.rs index 896072ce728eb..3aad21d34a2ff 100644 --- a/tests/ui/expr/if/if-ret.rs +++ b/tests/ui/expr/if/if-ret.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo() { if (return) { } } //~ WARNING unreachable block in `if` diff --git a/tests/ui/expr/if/if-typeck.rs b/tests/ui/expr/if/if-typeck.rs index d8c262bd6b370..ba828f11e79ba 100644 --- a/tests/ui/expr/if/if-typeck.rs +++ b/tests/ui/expr/if/if-typeck.rs @@ -1,4 +1,4 @@ -// error-pattern:mismatched types +//@ error-pattern:mismatched types // issue #513 fn f() { } diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed index b81515cda9ac8..47217e05f9df3 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs index e47ad562fb033..0069e834741a0 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed index a7a9db7d9775e..fcc55f28f012a 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs index b5690b2eca7c2..97639d01f7462 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed index 8014dc87c0809..9d85f95ff24bc 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs index 9e4aca888ad72..728ea868441e7 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map({|x| let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/ext-expand-inner-exprs.rs b/tests/ui/ext-expand-inner-exprs.rs index 5bbdf5ec95608..94610d0a328f0 100644 --- a/tests/ui/ext-expand-inner-exprs.rs +++ b/tests/ui/ext-expand-inner-exprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO : &'static str = concat!(concat!("hel", "lo"), "world"); diff --git a/tests/ui/ext-nonexistent.rs b/tests/ui/ext-nonexistent.rs index e65b165430262..a66407953a990 100644 --- a/tests/ui/ext-nonexistent.rs +++ b/tests/ui/ext-nonexistent.rs @@ -1,2 +1,2 @@ -// error-pattern:cannot find macro +//@ error-pattern:cannot find macro fn main() { iamnotanextensionthatexists!(""); } diff --git a/tests/ui/extenv/extenv-env-overload.rs b/tests/ui/extenv/extenv-env-overload.rs index 8b3b565fe83f0..b3497ffbc882f 100644 --- a/tests/ui/extenv/extenv-env-overload.rs +++ b/tests/ui/extenv/extenv-env-overload.rs @@ -1,6 +1,6 @@ -// run-pass -// rustc-env:MY_VAR=tadam -// compile-flags: --env-set MY_VAR=123abc -Zunstable-options +//@ run-pass +//@ rustc-env:MY_VAR=tadam +//@ compile-flags: --env-set MY_VAR=123abc -Zunstable-options // This test ensures that variables provided with `--env` take precedence over // variables from environment. diff --git a/tests/ui/extenv/extenv-env.rs b/tests/ui/extenv/extenv-env.rs index 051ea214c1bd0..18226256b6487 100644 --- a/tests/ui/extenv/extenv-env.rs +++ b/tests/ui/extenv/extenv-env.rs @@ -1,5 +1,5 @@ -// compile-flags: --env-set FOO=123abc -Zunstable-options -// run-pass +//@ compile-flags: --env-set FOO=123abc -Zunstable-options +//@ run-pass fn main() { assert_eq!(env!("FOO"), "123abc"); } diff --git a/tests/ui/extenv/extenv-not-env.rs b/tests/ui/extenv/extenv-not-env.rs index b0355e073e40e..e903eab4e96b5 100644 --- a/tests/ui/extenv/extenv-not-env.rs +++ b/tests/ui/extenv/extenv-not-env.rs @@ -1,5 +1,5 @@ -// run-pass -// rustc-env:MY_ENV=/ +//@ run-pass +//@ rustc-env:MY_ENV=/ // Ensures that variables not defined through `--env-set` are still available. fn main() { diff --git a/tests/ui/extenv/issue-110547.rs b/tests/ui/extenv/issue-110547.rs index a6fb96ac06649..2acfb2e671eb3 100644 --- a/tests/ui/extenv/issue-110547.rs +++ b/tests/ui/extenv/issue-110547.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions fn main() { env!{"\t"}; //~ ERROR not defined at compile time diff --git a/tests/ui/extern-flag/empty-extern-arg.rs b/tests/ui/extern-flag/empty-extern-arg.rs index 2f4ae7d8e70fa..dea68b5b1ad40 100644 --- a/tests/ui/extern-flag/empty-extern-arg.rs +++ b/tests/ui/extern-flag/empty-extern-arg.rs @@ -1,6 +1,6 @@ -// compile-flags: --extern std= -// error-pattern: extern location for std does not exist -// needs-unwind since it affects the error output -// ignore-emscripten missing eh_catch_typeinfo lang item +//@ compile-flags: --extern std= +//@ error-pattern: extern location for std does not exist +//@ needs-unwind since it affects the error output +//@ ignore-emscripten missing eh_catch_typeinfo lang item fn main() {} diff --git a/tests/ui/extern-flag/force-extern.rs b/tests/ui/extern-flag/force-extern.rs index f56b5378223f2..f30bd3b517f06 100644 --- a/tests/ui/extern-flag/force-extern.rs +++ b/tests/ui/extern-flag/force-extern.rs @@ -1,8 +1,8 @@ -// check-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-crate:force:panic_handler=panic_handler.rs -// compile-flags: -Zunstable-options --crate-type dylib -// edition:2018 +//@ check-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:force:panic_handler=panic_handler.rs +//@ compile-flags: -Zunstable-options --crate-type dylib +//@ edition:2018 #![no_std] diff --git a/tests/ui/extern-flag/invalid-crate-name-dashed.rs b/tests/ui/extern-flag/invalid-crate-name-dashed.rs index 7f351e48b6fa1..b846214175e1c 100644 --- a/tests/ui/extern-flag/invalid-crate-name-dashed.rs +++ b/tests/ui/extern-flag/invalid-crate-name-dashed.rs @@ -1,6 +1,6 @@ -// compile-flags: --extern=my-awesome-library=libawesome.rlib -// error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier -// error-pattern: consider replacing the dashes with underscores: `my_awesome_library` +//@ compile-flags: --extern=my-awesome-library=libawesome.rlib +//@ error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier +//@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library` // In a sense, this is a regression test for issue #113035. We no longer suggest // `pub use my-awesome-library::*;` (sic!) as we outright ban this crate name. diff --git a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs index ec4a85820d122..5231503820fac 100644 --- a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs +++ b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern čɍαţē=libnon_ascii.rlib -// error-pattern: crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier +//@ compile-flags: --extern čɍαţē=libnon_ascii.rlib +//@ error-pattern: crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier fn main() {} diff --git a/tests/ui/extern-flag/invalid-crate-name.rs b/tests/ui/extern-flag/invalid-crate-name.rs index a26b5dd4635ff..c7b5b637217a2 100644 --- a/tests/ui/extern-flag/invalid-crate-name.rs +++ b/tests/ui/extern-flag/invalid-crate-name.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern=?#1%$ -// error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier +//@ compile-flags: --extern=?#1%$ +//@ error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier fn main() {} diff --git a/tests/ui/extern-flag/multiple-opts.rs b/tests/ui/extern-flag/multiple-opts.rs index 3dc2f1d73f8e4..091064a070c37 100644 --- a/tests/ui/extern-flag/multiple-opts.rs +++ b/tests/ui/extern-flag/multiple-opts.rs @@ -1,6 +1,6 @@ -// aux-crate:priv,noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ aux-crate:priv,noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 // Test for multiple options to --extern. Can't test for errors from both // options at the same time, so this only checks that noprelude is honored. diff --git a/tests/ui/extern-flag/no-force-extern.rs b/tests/ui/extern-flag/no-force-extern.rs index ce9cbfe1cd27a..11d2f91c7bbf9 100644 --- a/tests/ui/extern-flag/no-force-extern.rs +++ b/tests/ui/extern-flag/no-force-extern.rs @@ -1,9 +1,9 @@ -// aux-crate:panic_handler=panic_handler.rs -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:panic_handler=panic_handler.rs +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) // compile_flags: -Zunstable-options --crate-type dylib -// error-pattern: `#[panic_handler]` function required, but not found -// dont-check-compiler-stderr -// edition: 2018 +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ dont-check-compiler-stderr +//@ edition: 2018 #![no_std] diff --git a/tests/ui/extern-flag/no-nounused.rs b/tests/ui/extern-flag/no-nounused.rs index 5ec75595243a8..bed8006542ca3 100644 --- a/tests/ui/extern-flag/no-nounused.rs +++ b/tests/ui/extern-flag/no-nounused.rs @@ -1,6 +1,6 @@ -// aux-crate:somedep=somedep.rs -// compile-flags: -Zunstable-options -Dunused-crate-dependencies -// edition:2018 +//@ aux-crate:somedep=somedep.rs +//@ compile-flags: -Zunstable-options -Dunused-crate-dependencies +//@ edition:2018 fn main() { //~ ERROR external crate `somedep` unused in `no_nounused` } diff --git a/tests/ui/extern-flag/noprelude-and-prelude.rs b/tests/ui/extern-flag/noprelude-and-prelude.rs index e6a150b9e8b9e..e4aff216c6b97 100644 --- a/tests/ui/extern-flag/noprelude-and-prelude.rs +++ b/tests/ui/extern-flag/noprelude-and-prelude.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options --extern somedep -// edition:2018 +//@ check-pass +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options --extern somedep +//@ edition:2018 // Having a flag with `noprelude` and one without, will add to the prelude. diff --git a/tests/ui/extern-flag/noprelude-resolves.rs b/tests/ui/extern-flag/noprelude-resolves.rs index f69f552b69d8a..cc8041b185282 100644 --- a/tests/ui/extern-flag/noprelude-resolves.rs +++ b/tests/ui/extern-flag/noprelude-resolves.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ check-pass +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 // `extern crate` can be used to add to prelude. extern crate somedep; diff --git a/tests/ui/extern-flag/noprelude.rs b/tests/ui/extern-flag/noprelude.rs index cdbf34091007e..4af617a1d628b 100644 --- a/tests/ui/extern-flag/noprelude.rs +++ b/tests/ui/extern-flag/noprelude.rs @@ -1,6 +1,6 @@ -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 fn main() { somedep::somefun(); //~ ERROR failed to resolve diff --git a/tests/ui/extern-flag/nounused.rs b/tests/ui/extern-flag/nounused.rs index 2513986bbec75..98f602ab4046e 100644 --- a/tests/ui/extern-flag/nounused.rs +++ b/tests/ui/extern-flag/nounused.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:nounused:somedep=somedep.rs -// compile-flags: -Zunstable-options -Dunused-crate-dependencies -// edition:2018 +//@ check-pass +//@ aux-crate:nounused:somedep=somedep.rs +//@ compile-flags: -Zunstable-options -Dunused-crate-dependencies +//@ edition:2018 fn main() { } diff --git a/tests/ui/extern-flag/public-and-private.rs b/tests/ui/extern-flag/public-and-private.rs index a3a81cbf37223..d0de55d9cf505 100644 --- a/tests/ui/extern-flag/public-and-private.rs +++ b/tests/ui/extern-flag/public-and-private.rs @@ -1,6 +1,6 @@ -// aux-crate:priv:somedep=somedep.rs -// compile-flags: -Zunstable-options --extern somedep -// edition:2018 +//@ aux-crate:priv:somedep=somedep.rs +//@ compile-flags: -Zunstable-options --extern somedep +//@ edition:2018 #![deny(exported_private_dependencies)] diff --git a/tests/ui/extern-flag/redundant-force-extern.rs b/tests/ui/extern-flag/redundant-force-extern.rs index a4091616dd569..44466977c9e79 100644 --- a/tests/ui/extern-flag/redundant-force-extern.rs +++ b/tests/ui/extern-flag/redundant-force-extern.rs @@ -1,8 +1,8 @@ -// check-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-crate:force:panic_handler=panic_handler.rs -// compile-flags: -Zunstable-options --crate-type dylib -// edition:2018 +//@ check-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:force:panic_handler=panic_handler.rs +//@ compile-flags: -Zunstable-options --crate-type dylib +//@ edition:2018 #![no_std] diff --git a/tests/ui/extern/auxiliary/issue-80074-macro-2.rs b/tests/ui/extern/auxiliary/issue-80074-macro-2.rs index bc87a2b543478..a1c26d90de31b 100644 --- a/tests/ui/extern/auxiliary/issue-80074-macro-2.rs +++ b/tests/ui/extern/auxiliary/issue-80074-macro-2.rs @@ -1,3 +1,3 @@ -// edition:2018 +//@ edition:2018 macro_rules! m { () => {}; } diff --git a/tests/ui/extern/auxiliary/issue-80074-macro.rs b/tests/ui/extern/auxiliary/issue-80074-macro.rs index 3e912d977159a..8d8705582ed7b 100644 --- a/tests/ui/extern/auxiliary/issue-80074-macro.rs +++ b/tests/ui/extern/auxiliary/issue-80074-macro.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 macro_rules! foo_ { () => {}; } use foo_ as foo; diff --git a/tests/ui/extern/extern-1.rs b/tests/ui/extern/extern-1.rs index 66e560501720c..c0f770ab9f2f3 100644 --- a/tests/ui/extern/extern-1.rs +++ b/tests/ui/extern/extern-1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "C" fn f() { } diff --git a/tests/ui/extern/extern-calling-convention-test.rs b/tests/ui/extern/extern-calling-convention-test.rs index 7231a7cde85e0..7c533df1986ed 100644 --- a/tests/ui/extern/extern-calling-convention-test.rs +++ b/tests/ui/extern/extern-calling-convention-test.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:extern_calling_convention.rs +//@ run-pass +//@ aux-build:extern_calling_convention.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate extern_calling_convention; diff --git a/tests/ui/extern/extern-compare-with-return-type.rs b/tests/ui/extern/extern-compare-with-return-type.rs index 42693d3a061c8..316e8b2fc7360 100644 --- a/tests/ui/extern/extern-compare-with-return-type.rs +++ b/tests/ui/extern/extern-compare-with-return-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can compare various kinds of extern fn signatures. #![allow(non_camel_case_types)] diff --git a/tests/ui/extern/extern-const.fixed b/tests/ui/extern/extern-const.fixed index 248efc93d008a..b338a56dd7858 100644 --- a/tests/ui/extern/extern-const.fixed +++ b/tests/ui/extern/extern-const.fixed @@ -4,9 +4,9 @@ // #54388: an unused reference to an undefined static may or may not // compile. To sidestep this by using one that *is* defined. -// run-rustfix -// ignore-wasm32-bare no external library to link to. -// compile-flags: -g +//@ run-rustfix +//@ ignore-wasm32-bare no external library to link to. +//@ compile-flags: -g #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/extern/extern-const.rs b/tests/ui/extern/extern-const.rs index d3b3bef6dae6f..1c552950afbec 100644 --- a/tests/ui/extern/extern-const.rs +++ b/tests/ui/extern/extern-const.rs @@ -4,9 +4,9 @@ // #54388: an unused reference to an undefined static may or may not // compile. To sidestep this by using one that *is* defined. -// run-rustfix -// ignore-wasm32-bare no external library to link to. -// compile-flags: -g +//@ run-rustfix +//@ ignore-wasm32-bare no external library to link to. +//@ compile-flags: -g #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/extern/extern-crate-rename.rs b/tests/ui/extern/extern-crate-rename.rs index fc8afc3e13461..9eeea6dc57115 100644 --- a/tests/ui/extern/extern-crate-rename.rs +++ b/tests/ui/extern/extern-crate-rename.rs @@ -1,5 +1,5 @@ -// aux-build:m1.rs -// aux-build:m2.rs +//@ aux-build:m1.rs +//@ aux-build:m2.rs extern crate m1; diff --git a/tests/ui/extern/extern-foreign-crate.rs b/tests/ui/extern/extern-foreign-crate.rs index 7f774c44277f3..939090ab5fc82 100644 --- a/tests/ui/extern/extern-foreign-crate.rs +++ b/tests/ui/extern/extern-foreign-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 extern crate std as mystd; diff --git a/tests/ui/extern/extern-methods.rs b/tests/ui/extern/extern-methods.rs index 22792c11366ba..1e6f6cdad7b7b 100644 --- a/tests/ui/extern/extern-methods.rs +++ b/tests/ui/extern/extern-methods.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86 +//@ run-pass +//@ only-x86 trait A { extern "fastcall" fn test1(i: i32); diff --git a/tests/ui/extern/extern-mod-abi.rs b/tests/ui/extern/extern-mod-abi.rs index c543394cca05f..8700a379d2911 100644 --- a/tests/ui/extern/extern-mod-abi.rs +++ b/tests/ui/extern/extern-mod-abi.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "C" { fn pow(x: f64, y: f64) -> f64; diff --git a/tests/ui/extern/extern-mod-ordering-exe.rs b/tests/ui/extern/extern-mod-ordering-exe.rs index d7cc4dffb440a..c735f6bae7a50 100644 --- a/tests/ui/extern/extern-mod-ordering-exe.rs +++ b/tests/ui/extern/extern-mod-ordering-exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:extern_mod_ordering_lib.rs +//@ run-pass +//@ aux-build:extern_mod_ordering_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate extern_mod_ordering_lib; diff --git a/tests/ui/extern/extern-no-mangle.rs b/tests/ui/extern/extern-no-mangle.rs index ab7c9824af039..dba9689a07555 100644 --- a/tests/ui/extern/extern-no-mangle.rs +++ b/tests/ui/extern/extern-no-mangle.rs @@ -5,7 +5,7 @@ // The previous warning only talks about a "function or static" but foreign fns/statics // are also not allowed to have #[no_mangle] -// build-pass +//@ build-pass extern "C" { #[no_mangle] diff --git a/tests/ui/extern/extern-prelude-core.rs b/tests/ui/extern/extern-prelude-core.rs index 56206425f84c2..ced1e5c391535 100644 --- a/tests/ui/extern/extern-prelude-core.rs +++ b/tests/ui/extern/extern-prelude-core.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/extern/extern-prelude-no-speculative.rs b/tests/ui/extern/extern-prelude-no-speculative.rs index 3ba124159e000..949f4c8f2bf29 100644 --- a/tests/ui/extern/extern-prelude-no-speculative.rs +++ b/tests/ui/extern/extern-prelude-no-speculative.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere +//@ compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere mod m { pub struct LooksLikeExternCrate; diff --git a/tests/ui/extern/extern-prelude-std.rs b/tests/ui/extern/extern-prelude-std.rs index b5627fad960b2..5ded76cea7cc1 100644 --- a/tests/ui/extern/extern-prelude-std.rs +++ b/tests/ui/extern/extern-prelude-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub fn test() { diff --git a/tests/ui/extern/extern-pub.rs b/tests/ui/extern/extern-pub.rs index 0b95045a03eb7..80f1e295d4d40 100644 --- a/tests/ui/extern/extern-pub.rs +++ b/tests/ui/extern/extern-pub.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 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 7cea8be59215f..bacdc7aeecb4c 100644 --- a/tests/ui/extern/extern-rust.rs +++ b/tests/ui/extern/extern-rust.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[repr(C)] pub struct Foo(u32); diff --git a/tests/ui/extern/extern-take-value.rs b/tests/ui/extern/extern-take-value.rs index c09a774361f33..56ed3328614ce 100644 --- a/tests/ui/extern/extern-take-value.rs +++ b/tests/ui/extern/extern-take-value.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:extern-take-value.rs +//@ run-pass +//@ aux-build:extern-take-value.rs extern crate extern_take_value; diff --git a/tests/ui/extern/extern-thiscall.rs b/tests/ui/extern/extern-thiscall.rs index c491c156af597..3fa796bdbe858 100644 --- a/tests/ui/extern/extern-thiscall.rs +++ b/tests/ui/extern/extern-thiscall.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86 +//@ run-pass +//@ only-x86 trait A { extern "thiscall" fn test1(i: i32); diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs index bfbc1e9bffacf..e9c4bb7b23046 100644 --- a/tests/ui/extern/extern-types-field-offset.rs +++ b/tests/ui/extern/extern-types-field-offset.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" #![feature(extern_types)] extern "C" { diff --git a/tests/ui/extern/extern-types-inherent-impl.rs b/tests/ui/extern/extern-types-inherent-impl.rs index 3f09ac7b8c388..a746c74f11024 100644 --- a/tests/ui/extern/extern-types-inherent-impl.rs +++ b/tests/ui/extern/extern-types-inherent-impl.rs @@ -1,7 +1,7 @@ // Test that inherent impls can be defined for extern types. -// check-pass -// aux-build:extern-types-inherent-impl.rs +//@ check-pass +//@ aux-build:extern-types-inherent-impl.rs #![feature(extern_types)] diff --git a/tests/ui/extern/extern-types-manual-sync-send.rs b/tests/ui/extern/extern-types-manual-sync-send.rs index 87eb3f6224004..2df0cd4c923c1 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 +//@ run-pass // Test that unsafe impl for Sync/Send can be provided for extern types. #![feature(extern_types)] diff --git a/tests/ui/extern/extern-types-pointer-cast.rs b/tests/ui/extern/extern-types-pointer-cast.rs index de6955bfaaa13..78dbee77b9c4b 100644 --- a/tests/ui/extern/extern-types-pointer-cast.rs +++ b/tests/ui/extern/extern-types-pointer-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that pointers to extern types can be cast from/to usize, // despite being !Sized. diff --git a/tests/ui/extern/extern-types-size_of_val.rs b/tests/ui/extern/extern-types-size_of_val.rs index 4c4de873b7f0f..cc4d34e59fa91 100644 --- a/tests/ui/extern/extern-types-size_of_val.rs +++ b/tests/ui/extern/extern-types-size_of_val.rs @@ -1,8 +1,8 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// revisions: size align +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ revisions: size align #![feature(extern_types)] use std::mem::{align_of_val, size_of_val}; diff --git a/tests/ui/extern/extern-types-thin-pointer.rs b/tests/ui/extern/extern-types-thin-pointer.rs index b85fc4886abe0..8e5911228b2e4 100644 --- a/tests/ui/extern/extern-types-thin-pointer.rs +++ b/tests/ui/extern/extern-types-thin-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that pointers and references to extern types are thin, ie they have the same size and // alignment as a pointer to (). diff --git a/tests/ui/extern/extern-types-trait-impl.rs b/tests/ui/extern/extern-types-trait-impl.rs index 656101ed535b3..44300b1051412 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 +//@ run-pass #![allow(dead_code)] // Test that traits can be implemented for extern types. #![feature(extern_types)] diff --git a/tests/ui/extern/extern-vectorcall.rs b/tests/ui/extern/extern-vectorcall.rs index a283573c9fbd1..c0d872bc14beb 100644 --- a/tests/ui/extern/extern-vectorcall.rs +++ b/tests/ui/extern/extern-vectorcall.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: x64 x32 -// [x64]only-x86_64 -// [x32]only-x86 +//@ run-pass +//@ revisions: x64 x32 +//@ [x64]only-x86_64 +//@ [x32]only-x86 #![feature(abi_vectorcall)] diff --git a/tests/ui/extern/extern_fat_drop.rs b/tests/ui/extern/extern_fat_drop.rs index 1cd12c2cab339..9691f562d8992 100644 --- a/tests/ui/extern/extern_fat_drop.rs +++ b/tests/ui/extern/extern_fat_drop.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fat_drop.rs +//@ run-pass +//@ aux-build:fat_drop.rs extern crate fat_drop; diff --git a/tests/ui/extern/issue-10025.rs b/tests/ui/extern/issue-10025.rs index 4439b4685251f..0bdcf7c5c5875 100644 --- a/tests/ui/extern/issue-10025.rs +++ b/tests/ui/extern/issue-10025.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] unsafe extern fn foo() {} diff --git a/tests/ui/extern/issue-10763.rs b/tests/ui/extern/issue-10763.rs index 627a8c2384ca9..2381f22f162f2 100644 --- a/tests/ui/extern/issue-10763.rs +++ b/tests/ui/extern/issue-10763.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "Rust" fn foo() {} diff --git a/tests/ui/extern/issue-10764-rpass.rs b/tests/ui/extern/issue-10764-rpass.rs index 42ed1ae93b551..4de387e3d661d 100644 --- a/tests/ui/extern/issue-10764-rpass.rs +++ b/tests/ui/extern/issue-10764-rpass.rs @@ -1,4 +1,4 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 extern "Rust" fn main() {} diff --git a/tests/ui/extern/issue-1251.rs b/tests/ui/extern/issue-1251.rs index c2c047c79615e..bf701a41f9417 100644 --- a/tests/ui/extern/issue-1251.rs +++ b/tests/ui/extern/issue-1251.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(unused_attributes)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] mod rustrt { diff --git a/tests/ui/extern/issue-13655.rs b/tests/ui/extern/issue-13655.rs index a47b5183f2ba6..824a68d59d326 100644 --- a/tests/ui/extern/issue-13655.rs +++ b/tests/ui/extern/issue-13655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, unboxed_closures)] struct Foo(T); diff --git a/tests/ui/extern/issue-18576.rs b/tests/ui/extern/issue-18576.rs index 389cf108b05ee..0a98e85e4844f 100644 --- a/tests/ui/extern/issue-18576.rs +++ b/tests/ui/extern/issue-18576.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:stop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:stop +//@ ignore-emscripten no processes // #18576 // Make sure that calling an extern function pointer in an unreachable diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs index 24fc512dfbf0d..e9471d207da48 100644 --- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs +++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // rust-lang/rust#64655: with panic=unwind, a panic from a subroutine // should still run destructors as it unwinds the stack. However, @@ -13,14 +13,14 @@ // test. // LTO settings cannot be combined with -C prefer-dynamic -// no-prefer-dynamic +//@ no-prefer-dynamic // The revisions just enumerate lto settings (the opt-level appeared irrelevant in practice) -// revisions: no thin fat -//[no]compile-flags: -C lto=no -//[thin]compile-flags: -C lto=thin -//[fat]compile-flags: -C lto=fat +//@ revisions: no thin fat +//@[no]compile-flags: -C lto=no +//@[thin]compile-flags: -C lto=thin +//@[fat]compile-flags: -C lto=fat #![feature(panic_internals)] diff --git a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs index 3b263e58cbe84..9486b5f1178c4 100644 --- a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs +++ b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // rust-lang/rust#64655: with panic=unwind, a panic from a subroutine // should still run destructors as it unwinds the stack. However, @@ -28,26 +28,26 @@ // the underlying bug.) // LTO settings cannot be combined with -C prefer-dynamic -// no-prefer-dynamic +//@ no-prefer-dynamic // The revisions combine each lto setting with each optimization // setting; pnkfelix observed three differing behaviors at opt-levels // 0/1/2+3 for this test, so it seems prudent to be thorough. -// revisions: no0 no1 no2 no3 thin0 thin1 thin2 thin3 fat0 fat1 fat2 fat3 - -//[no0]compile-flags: -C opt-level=0 -C lto=no -//[no1]compile-flags: -C opt-level=1 -C lto=no -//[no2]compile-flags: -C opt-level=2 -C lto=no -//[no3]compile-flags: -C opt-level=3 -C lto=no -//[thin0]compile-flags: -C opt-level=0 -C lto=thin -//[thin1]compile-flags: -C opt-level=1 -C lto=thin -//[thin2]compile-flags: -C opt-level=2 -C lto=thin -//[thin3]compile-flags: -C opt-level=3 -C lto=thin -//[fat0]compile-flags: -C opt-level=0 -C lto=fat -//[fat1]compile-flags: -C opt-level=1 -C lto=fat -//[fat2]compile-flags: -C opt-level=2 -C lto=fat -//[fat3]compile-flags: -C opt-level=3 -C lto=fat +//@ revisions: no0 no1 no2 no3 thin0 thin1 thin2 thin3 fat0 fat1 fat2 fat3 + +//@[no0]compile-flags: -C opt-level=0 -C lto=no +//@[no1]compile-flags: -C opt-level=1 -C lto=no +//@[no2]compile-flags: -C opt-level=2 -C lto=no +//@[no3]compile-flags: -C opt-level=3 -C lto=no +//@[thin0]compile-flags: -C opt-level=0 -C lto=thin +//@[thin1]compile-flags: -C opt-level=1 -C lto=thin +//@[thin2]compile-flags: -C opt-level=2 -C lto=thin +//@[thin3]compile-flags: -C opt-level=3 -C lto=thin +//@[fat0]compile-flags: -C opt-level=0 -C lto=fat +//@[fat1]compile-flags: -C opt-level=1 -C lto=fat +//@[fat2]compile-flags: -C opt-level=2 -C lto=fat +//@[fat3]compile-flags: -C opt-level=3 -C lto=fat fn main() { use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/extern/issue-80074.rs b/tests/ui/extern/issue-80074.rs index 6e4f176de8201..ba7b55a450f51 100644 --- a/tests/ui/extern/issue-80074.rs +++ b/tests/ui/extern/issue-80074.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-crate:issue_80074=issue-80074-macro.rs -// aux-crate:issue_80074_2=issue-80074-macro-2.rs +//@ edition:2018 +//@ aux-crate:issue_80074=issue-80074-macro.rs +//@ aux-crate:issue_80074_2=issue-80074-macro-2.rs #[macro_use] extern crate issue_80074; diff --git a/tests/ui/extern/issue-95829.rs b/tests/ui/extern/issue-95829.rs index 3379148ae7bb0..ad4e04f7c3a9a 100644 --- a/tests/ui/extern/issue-95829.rs +++ b/tests/ui/extern/issue-95829.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 extern { async fn L() { //~ ERROR: incorrect function inside `extern` block diff --git a/tests/ui/extern/no-mangle-associated-fn.rs b/tests/ui/extern/no-mangle-associated-fn.rs index 56afd8b90926e..b02435509cc07 100644 --- a/tests/ui/extern/no-mangle-associated-fn.rs +++ b/tests/ui/extern/no-mangle-associated-fn.rs @@ -1,5 +1,5 @@ -// aux-build: no-mangle-associated-fn.rs -// run-pass +//@ aux-build: no-mangle-associated-fn.rs +//@ run-pass extern crate no_mangle_associated_fn; diff --git a/tests/ui/extoption_env-not-defined.rs b/tests/ui/extoption_env-not-defined.rs index 4014902ffed59..90a01a8031398 100644 --- a/tests/ui/extoption_env-not-defined.rs +++ b/tests/ui/extoption_env-not-defined.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(option_env!("__HOPEFULLY_DOESNT_EXIST__").is_none()); diff --git a/tests/ui/fact.rs b/tests/ui/fact.rs index c6c2f57e75c55..e94c12da01341 100644 --- a/tests/ui/fact.rs +++ b/tests/ui/fact.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: isize) -> isize { // println!("in f:"); diff --git a/tests/ui/feature-gates/allow-features-empty.rs b/tests/ui/feature-gates/allow-features-empty.rs index 88a6093492715..65f9be74c6c3b 100644 --- a/tests/ui/feature-gates/allow-features-empty.rs +++ b/tests/ui/feature-gates/allow-features-empty.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z allow_features= +//@ compile-flags: -Z allow_features= // Note: This test uses rustc internal flags because they will never stabilize. #![feature(lang_items)] //~ ERROR diff --git a/tests/ui/feature-gates/allow-features.rs b/tests/ui/feature-gates/allow-features.rs index 2ce4701a81803..b23759da810ac 100644 --- a/tests/ui/feature-gates/allow-features.rs +++ b/tests/ui/feature-gates/allow-features.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z allow_features=lang_items +//@ compile-flags: -Z allow_features=lang_items // Note: This test uses rustc internal flags because they will never stabilize. #![feature(lang_items)] diff --git a/tests/ui/feature-gates/bench.rs b/tests/ui/feature-gates/bench.rs index 8de390becbe7d..2ce1d50fbb0ba 100644 --- a/tests/ui/feature-gates/bench.rs +++ b/tests/ui/feature-gates/bench.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[bench] //~ ERROR use of unstable library feature 'test' //~| WARN this was previously accepted diff --git a/tests/ui/feature-gates/env-flag.rs b/tests/ui/feature-gates/env-flag.rs index 598773cf3e4cc..0abc93994065a 100644 --- a/tests/ui/feature-gates/env-flag.rs +++ b/tests/ui/feature-gates/env-flag.rs @@ -1,3 +1,3 @@ -// compile-flags: --env-set A=B +//@ compile-flags: --env-set A=B fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs index 05461297afd02..f37c5335deb04 100644 --- a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: avr -// compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ needs-llvm-components: avr +//@ compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs index 8b7d8066aa674..b0fb4c414d40f 100644 --- a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: msp430 -// compile-flags: --target=msp430-none-elf --crate-type=rlib +//@ needs-llvm-components: msp430 +//@ compile-flags: --target=msp430-none-elf --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs index 7755a46da3b51..29820f8877d33 100644 --- a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: riscv -// compile-flags: --target=riscv32imc-unknown-none-elf --crate-type=rlib +//@ needs-llvm-components: riscv +//@ compile-flags: --target=riscv32imc-unknown-none-elf --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang = "sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs index 7c3e4d10d9903..812ca12c7c37d 100644 --- a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi.rs b/tests/ui/feature-gates/feature-gate-abi.rs index 712655f9775d6..02568b4778b9c 100644 --- a/tests/ui/feature-gates/feature-gate-abi.rs +++ b/tests/ui/feature-gates/feature-gate-abi.rs @@ -1,6 +1,6 @@ // gate-test-intrinsics // gate-test-platform_intrinsics -// compile-flags: --crate-type=rlib +//@ compile-flags: --crate-type=rlib #![feature(no_core, lang_items)] #![no_core] @@ -14,8 +14,10 @@ trait Tuple { } // Functions extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change //~^ ERROR intrinsic must be in + //~| ERROR unrecognized intrinsic function: `f1` extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental //~^ ERROR intrinsic must be in + //~| ERROR unrecognized intrinsic function: `f2` extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change // Methods in trait definition diff --git a/tests/ui/feature-gates/feature-gate-abi.stderr b/tests/ui/feature-gates/feature-gate-abi.stderr index d031c2adf50cc..aa60434d9fe6c 100644 --- a/tests/ui/feature-gates/feature-gate-abi.stderr +++ b/tests/ui/feature-gates/feature-gate-abi.stderr @@ -8,7 +8,7 @@ LL | extern "rust-intrinsic" fn f1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:17:8 + --> $DIR/feature-gate-abi.rs:18:8 | LL | extern "platform-intrinsic" fn f2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | extern "platform-intrinsic" fn f2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:19:8 + --> $DIR/feature-gate-abi.rs:21:8 | LL | extern "rust-call" fn f4(_: ()) {} | ^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | extern "rust-call" fn f4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:23:12 + --> $DIR/feature-gate-abi.rs:25:12 | LL | extern "rust-intrinsic" fn m1(); | ^^^^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | extern "rust-intrinsic" fn m1(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:25:12 + --> $DIR/feature-gate-abi.rs:27:12 | LL | extern "platform-intrinsic" fn m2(); | ^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | extern "platform-intrinsic" fn m2(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:27:12 + --> $DIR/feature-gate-abi.rs:29:12 | LL | extern "rust-call" fn m4(_: ()); | ^^^^^^^^^^^ @@ -57,7 +57,7 @@ LL | extern "rust-call" fn m4(_: ()); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:29:12 + --> $DIR/feature-gate-abi.rs:31:12 | LL | extern "rust-call" fn dm4(_: ()) {} | ^^^^^^^^^^^ @@ -67,7 +67,7 @@ LL | extern "rust-call" fn dm4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:36:12 + --> $DIR/feature-gate-abi.rs:38:12 | LL | extern "rust-intrinsic" fn m1() {} | ^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ LL | extern "rust-intrinsic" fn m1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:38:12 + --> $DIR/feature-gate-abi.rs:40:12 | LL | extern "platform-intrinsic" fn m2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -86,7 +86,7 @@ LL | extern "platform-intrinsic" fn m2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:40:12 + --> $DIR/feature-gate-abi.rs:42:12 | LL | extern "rust-call" fn m4(_: ()) {} | ^^^^^^^^^^^ @@ -96,7 +96,7 @@ LL | extern "rust-call" fn m4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:45:12 + --> $DIR/feature-gate-abi.rs:47:12 | LL | extern "rust-intrinsic" fn im1() {} | ^^^^^^^^^^^^^^^^ @@ -105,7 +105,7 @@ LL | extern "rust-intrinsic" fn im1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:47:12 + --> $DIR/feature-gate-abi.rs:49:12 | LL | extern "platform-intrinsic" fn im2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ LL | extern "platform-intrinsic" fn im2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:49:12 + --> $DIR/feature-gate-abi.rs:51:12 | LL | extern "rust-call" fn im4(_: ()) {} | ^^^^^^^^^^^ @@ -125,7 +125,7 @@ LL | extern "rust-call" fn im4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:53:18 + --> $DIR/feature-gate-abi.rs:55:18 | LL | type A1 = extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | type A1 = extern "rust-intrinsic" fn(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:54:18 + --> $DIR/feature-gate-abi.rs:56:18 | LL | type A2 = extern "platform-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^ @@ -144,7 +144,7 @@ LL | type A2 = extern "platform-intrinsic" fn(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:55:18 + --> $DIR/feature-gate-abi.rs:57:18 | LL | type A4 = extern "rust-call" fn(_: ()); | ^^^^^^^^^^^ @@ -154,7 +154,7 @@ LL | type A4 = extern "rust-call" fn(_: ()); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:58:8 + --> $DIR/feature-gate-abi.rs:60:8 | LL | extern "rust-intrinsic" {} | ^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ LL | extern "rust-intrinsic" {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:59:8 + --> $DIR/feature-gate-abi.rs:61:8 | LL | extern "platform-intrinsic" {} | ^^^^^^^^^^^^^^^^^^^^ @@ -173,7 +173,7 @@ LL | extern "platform-intrinsic" {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:60:8 + --> $DIR/feature-gate-abi.rs:62:8 | LL | extern "rust-call" {} | ^^^^^^^^^^^ @@ -182,14 +182,26 @@ LL | extern "rust-call" {} = help: add `#![feature(unboxed_closures)]` 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[E0093]: unrecognized intrinsic function: `f1` + --> $DIR/feature-gate-abi.rs:15:28 + | +LL | extern "rust-intrinsic" fn f1() {} + | ^^ unrecognized intrinsic + +error[E0093]: unrecognized intrinsic function: `f2` + --> $DIR/feature-gate-abi.rs:18:32 + | +LL | extern "platform-intrinsic" fn f2() {} + | ^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:23:32 + --> $DIR/feature-gate-abi.rs:25:32 | LL | extern "rust-intrinsic" fn m1(); | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:25:36 + --> $DIR/feature-gate-abi.rs:27:36 | LL | extern "platform-intrinsic" fn m2(); | ^^ @@ -201,35 +213,36 @@ LL | extern "rust-intrinsic" fn f1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:17:37 + --> $DIR/feature-gate-abi.rs:18:37 | LL | extern "platform-intrinsic" fn f2() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:36:37 + --> $DIR/feature-gate-abi.rs:38:37 | LL | extern "rust-intrinsic" fn m1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:38:41 + --> $DIR/feature-gate-abi.rs:40:41 | LL | extern "platform-intrinsic" fn m2() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:45:38 + --> $DIR/feature-gate-abi.rs:47:38 | LL | extern "rust-intrinsic" fn im1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:47:42 + --> $DIR/feature-gate-abi.rs:49:42 | LL | extern "platform-intrinsic" fn im2() {} | ^^ -error: aborting due to 27 previous errors +error: aborting due to 29 previous errors -For more information about this error, try `rustc --explain E0658`. +Some errors have detailed explanations: E0093, E0658. +For more information about an error, try `rustc --explain E0093`. diff --git a/tests/ui/feature-gates/feature-gate-abi_ptx.rs b/tests/ui/feature-gates/feature-gate-abi_ptx.rs index e3405641ecd82..83f48430281a3 100644 --- a/tests/ui/feature-gates/feature-gate-abi_ptx.rs +++ b/tests/ui/feature-gates/feature-gate-abi_ptx.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: nvptx -// compile-flags: --target=nvptx64-nvidia-cuda --crate-type=rlib +//@ needs-llvm-components: nvptx +//@ compile-flags: --target=nvptx64-nvidia-cuda --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs index 78d189d20b64d..2d099e24db8ff 100644 --- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs +++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/feature-gates/feature-gate-asm_const.rs b/tests/ui/feature-gates/feature-gate-asm_const.rs index 936918a3cfc86..42d5ba69222d0 100644 --- a/tests/ui/feature-gates/feature-gate-asm_const.rs +++ b/tests/ui/feature-gates/feature-gate-asm_const.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs index 53e2a4d132c8b..a52fbbe4075ec 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs @@ -1,5 +1,5 @@ -// compile-flags: --target mips-unknown-linux-gnu -// needs-llvm-components: mips +//@ compile-flags: --target mips-unknown-linux-gnu +//@ needs-llvm-components: mips #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/ui/feature-gates/feature-gate-asm_unwind.rs b/tests/ui/feature-gates/feature-gate-asm_unwind.rs index df161b6008112..78c1e6c9447c2 100644 --- a/tests/ui/feature-gates/feature-gate-asm_unwind.rs +++ b/tests/ui/feature-gates/feature-gate-asm_unwind.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs index 801956c33395d..3ab5a500dfdbb 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs +++ b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs @@ -1,5 +1,5 @@ -// ignore-windows -// aux-build:cfg-target-thread-local.rs +//@ ignore-windows +//@ aux-build:cfg-target-thread-local.rs #![feature(thread_local)] diff --git a/tests/ui/feature-gates/feature-gate-check-cfg.rs b/tests/ui/feature-gates/feature-gate-check-cfg.rs index 953b8e3ffcebc..1e0106aa7485b 100644 --- a/tests/ui/feature-gates/feature-gate-check-cfg.rs +++ b/tests/ui/feature-gates/feature-gate-check-cfg.rs @@ -1,3 +1,3 @@ -// compile-flags: --check-cfg "cfg()" +//@ compile-flags: --check-cfg "cfg()" fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs index 58a9c84be5acf..93bf83ecf53c8 100644 --- a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs +++ b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(stmt_expr_attributes)] #![feature(coroutines)] diff --git a/tests/ui/feature-gates/feature-gate-const-indexing.rs b/tests/ui/feature-gates/feature-gate-const-indexing.rs index 2b1067b34891c..cbdd0ba9c1d0c 100644 --- a/tests/ui/feature-gates/feature-gate-const-indexing.rs +++ b/tests/ui/feature-gates/feature-gate-const-indexing.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47]; diff --git a/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs b/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs index 63159ed05532f..bd908676c8bf8 100644 --- a/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs +++ b/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_refs_to_cell)] diff --git a/tests/ui/feature-gates/feature-gate-coroutines.rs b/tests/ui/feature-gates/feature-gate-coroutines.rs index 53b58d486a804..b3df2351b680b 100644 --- a/tests/ui/feature-gates/feature-gate-coroutines.rs +++ b/tests/ui/feature-gates/feature-gate-coroutines.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options fn main() { yield true; //~ ERROR yield syntax is experimental diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.rs b/tests/ui/feature-gates/feature-gate-gen_blocks.rs index ff9a0b139c057..d9bfeac36ed0f 100644 --- a/tests/ui/feature-gates/feature-gate-gen_blocks.rs +++ b/tests/ui/feature-gates/feature-gate-gen_blocks.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options fn test_gen() { gen {}; diff --git a/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs b/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs index be66560fd921c..0473253004a45 100644 --- a/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs +++ b/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs @@ -1,5 +1,5 @@ -// [feature] run-pass -// revisions: normal feature +//@ [feature] run-pass +//@ revisions: normal feature #![cfg_attr(feature, feature(generic_arg_infer))] diff --git a/tests/ui/feature-gates/feature-gate-intrinsics.rs b/tests/ui/feature-gates/feature-gate-intrinsics.rs index e0dc3cc579d79..725d968d24c30 100644 --- a/tests/ui/feature-gates/feature-gate-intrinsics.rs +++ b/tests/ui/feature-gates/feature-gate-intrinsics.rs @@ -4,5 +4,6 @@ extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to change //~^ ERROR intrinsic must be in +//~| ERROR unrecognized intrinsic function: `baz` fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-intrinsics.stderr b/tests/ui/feature-gates/feature-gate-intrinsics.stderr index ebd0f41715ea6..78c21843adb08 100644 --- a/tests/ui/feature-gates/feature-gate-intrinsics.stderr +++ b/tests/ui/feature-gates/feature-gate-intrinsics.stderr @@ -22,13 +22,19 @@ error[E0093]: unrecognized intrinsic function: `bar` LL | fn bar(); | ^^^^^^^^^ unrecognized intrinsic +error[E0093]: unrecognized intrinsic function: `baz` + --> $DIR/feature-gate-intrinsics.rs:5:28 + | +LL | extern "rust-intrinsic" fn baz() {} + | ^^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block --> $DIR/feature-gate-intrinsics.rs:5:34 | LL | extern "rust-intrinsic" fn baz() {} | ^^ -error: aborting due to 4 previous errors +error: aborting due to 5 previous errors Some errors have detailed explanations: E0093, E0658. For more information about an error, try `rustc --explain E0093`. diff --git a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs index 4e296b96ca9c4..064a781f6c84d 100644 --- a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs +++ b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(multiple_supertrait_upcastable)] //~^ WARNING unknown lint: `multiple_supertrait_upcastable` diff --git a/tests/ui/feature-gates/feature-gate-naked_functions.rs b/tests/ui/feature-gates/feature-gate-naked_functions.rs index dc561234809af..36980fd74c264 100644 --- a/tests/ui/feature-gates/feature-gate-naked_functions.rs +++ b/tests/ui/feature-gates/feature-gate-naked_functions.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs index 1db3c2ccdde75..3a50518576d00 100644 --- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs +++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![deny(non_exhaustive_omitted_patterns)] //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns` diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs index 0648ce0ee20e8..03071c351a44d 100644 --- a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs +++ b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs @@ -1,4 +1,4 @@ -// force-host +//@ force-host #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs b/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs index 5554c81392553..1750fe952f560 100644 --- a/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs +++ b/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// force-host +//@ edition: 2021 +//@ force-host #![crate_type = "proc-macro"] extern crate proc_macro; 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 b8fb4b8dc19da..959c9e6c20d8d 100644 --- a/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs +++ b/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs @@ -4,8 +4,8 @@ // 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 -// aux-build:pub_dep.rs +//@ run-pass +//@ aux-build:pub_dep.rs // Without ![feature(public_private_dependencies)], // this should do nothing/ diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.rs b/tests/ui/feature-gates/feature-gate-return_type_notation.rs index 60ac9f8d4f1a5..7ae6cd0234be3 100644 --- a/tests/ui/feature-gates/feature-gate-return_type_notation.rs +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.rs @@ -1,7 +1,7 @@ -// edition: 2021 -// revisions: cfg no +//@ edition: 2021 +//@ revisions: cfg no -// [no] check-pass +//@ [no] check-pass // Since we're not adding new syntax, `cfg`'d out RTN must pass. diff --git a/tests/ui/feature-gates/feature-gate-simd.rs b/tests/ui/feature-gates/feature-gate-simd.rs index d01d33de28988..de5f645e6fd0b 100644 --- a/tests/ui/feature-gates/feature-gate-simd.rs +++ b/tests/ui/feature-gates/feature-gate-simd.rs @@ -1,4 +1,4 @@ -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[repr(simd)] //~ ERROR SIMD types are experimental struct RGBA { diff --git a/tests/ui/feature-gates/feature-gate-strict_provenance.rs b/tests/ui/feature-gates/feature-gate-strict_provenance.rs index 24b8369b3d8f4..738c8daa1687f 100644 --- a/tests/ui/feature-gates/feature-gate-strict_provenance.rs +++ b/tests/ui/feature-gates/feature-gate-strict_provenance.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(fuzzy_provenance_casts)] //~^ WARNING unknown lint: `fuzzy_provenance_casts` diff --git a/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs b/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs index 3882ba9a2271c..8bae9ff32b4c3 100644 --- a/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs +++ b/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // `test_unstable_lint` is for testing and should never be stabilized. #![allow(test_unstable_lint)] 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 8f68d5d6dd2d6..32445c101d79b 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 +//@ run-pass #![allow(unused)] #![deny(trivial_bounds)] // Ignored without the trivial_bounds feature flag. diff --git a/tests/ui/feature-gates/feature-gate-try_blocks.rs b/tests/ui/feature-gates/feature-gate-try_blocks.rs index 06cadd82c0731..f565dd014de8e 100644 --- a/tests/ui/feature-gates/feature-gate-try_blocks.rs +++ b/tests/ui/feature-gates/feature-gate-try_blocks.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 pub fn main() { let try_result: Option<_> = try { //~ ERROR `try` expression is experimental diff --git a/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs b/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs index 3f49020bbea38..6d17f5e837d94 100644 --- a/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs +++ b/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs b/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs index 80e51b265db5a..c537fc419f68d 100644 --- a/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs +++ b/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unnameable_types)] //~ WARN unknown lint fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs index 594a2672d435d..deb5a2f691b8e 100644 --- a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs +++ b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![forbid(internal_features, unsafe_code)] #![feature(unsafe_pin_internals)] //~^ ERROR the feature `unsafe_pin_internals` is internal to the compiler or standard library diff --git a/tests/ui/feature-gates/feature-gate-vectorcall.rs b/tests/ui/feature-gates/feature-gate-vectorcall.rs index 706780dfd6c5b..73a11a842f377 100644 --- a/tests/ui/feature-gates/feature-gate-vectorcall.rs +++ b/tests/ui/feature-gates/feature-gate-vectorcall.rs @@ -1,6 +1,6 @@ // gate-test-abi_vectorcall -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-wasm_abi.rs b/tests/ui/feature-gates/feature-gate-wasm_abi.rs index 222c88daf9484..da1d9300a2bde 100644 --- a/tests/ui/feature-gates/feature-gate-wasm_abi.rs +++ b/tests/ui/feature-gates/feature-gate-wasm_abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: webassembly -// compile-flags: --target=wasm32-unknown-unknown --crate-type=rlib +//@ needs-llvm-components: webassembly +//@ compile-flags: --target=wasm32-unknown-unknown --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs index a33bd34508c5f..6fe51330118d4 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs +++ b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2021 +//@ compile-flags: --edition 2021 pub fn demo() -> Option { #[cfg(nope)] diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr.rs b/tests/ui/feature-gates/feature-gate-yeet_expr.rs index 978a84cf6e5f0..12cc17e1cc89a 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr.rs +++ b/tests/ui/feature-gates/feature-gate-yeet_expr.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 pub fn demo() -> Option { do yeet //~ ERROR `do yeet` expression is experimental diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs index 1fa315f3d2159..141927b4de8cc 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs @@ -34,7 +34,7 @@ // inputs are handled by each, and (2.) to ease searching for related // occurrences in the source text. -// check-pass +//@ check-pass #![feature(test)] #![warn(unused_attributes, unknown_lints)] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs b/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs index 5e1d08dd919d0..61cb162e03015 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs @@ -5,7 +5,7 @@ // // (For non-crate-level cases, see issue-43106-gating-of-builtin-attrs.rs) -// check-pass +//@ check-pass #![deprecated] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs index de00bc4cbac07..f976e468b0277 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs @@ -3,7 +3,7 @@ // `#![macro_escape]` is incompatible with crate-level `#![macro_use]` // already present in issue-43106-gating-of-builtin-attrs. -// check-pass +//@ check-pass #![macro_escape] //~^ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]` diff --git a/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs b/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs index 49f1cba7151ef..2aa2ed34020cf 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs +++ b/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // This file is used to test the behavior of the early-pass syntax warnings. // If macro syntax is stabilized, replace with a different unstable syntax. diff --git a/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs b/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs index ca4ad2320f657..056c8fb04f45d 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs +++ b/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This file is used to test the behavior of the early-pass syntax warnings. // If macro syntax is stabilized, replace with a different unstable syntax. diff --git a/tests/ui/feature-gates/test-listing-format-json.rs b/tests/ui/feature-gates/test-listing-format-json.rs index 2dd0e10b5216f..628374c1f5b9e 100644 --- a/tests/ui/feature-gates/test-listing-format-json.rs +++ b/tests/ui/feature-gates/test-listing-format-json.rs @@ -1,10 +1,10 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -Zunstable-options -// run-fail -// check-run-results -// ignore-nightly -// unset-exec-env:RUSTC_BOOTSTRAP +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json -Zunstable-options +//@ run-fail +//@ check-run-results +//@ ignore-nightly +//@ unset-exec-env:RUSTC_BOOTSTRAP #![cfg(test)] #[test] diff --git a/tests/ui/filter-block-view-items.rs b/tests/ui/filter-block-view-items.rs index e63aa91577bc9..edb9ce3800677 100644 --- a/tests/ui/filter-block-view-items.rs +++ b/tests/ui/filter-block-view-items.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { // Make sure that this view item is filtered out because otherwise it would diff --git a/tests/ui/fmt/auxiliary/format-string-proc-macro.rs b/tests/ui/fmt/auxiliary/format-string-proc-macro.rs index 0c39ade721fac..5c00c9c0800c1 100644 --- a/tests/ui/fmt/auxiliary/format-string-proc-macro.rs +++ b/tests/ui/fmt/auxiliary/format-string-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs b/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs index bf5c0dcb54d39..5afd21a17e554 100644 --- a/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs +++ b/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs index f67edf5e16721..24531e4ece457 100644 --- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs +++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-issue-106408.rs b/tests/ui/fmt/format-args-capture-issue-106408.rs index 0fd195416ee5b..7c29e37441cba 100644 --- a/tests/ui/fmt/format-args-capture-issue-106408.rs +++ b/tests/ui/fmt/format-args-capture-issue-106408.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:format-string-proc-macro.rs +//@ check-pass +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs b/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs index 7553fcc4e01cb..53910afe28b79 100644 --- a/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs +++ b/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! format_mbe { ($tt:tt) => { diff --git a/tests/ui/fmt/format-args-capture-macro-hygiene.rs b/tests/ui/fmt/format-args-capture-macro-hygiene.rs index b04f80ba4061b..2ef81f2cd42f0 100644 --- a/tests/ui/fmt/format-args-capture-macro-hygiene.rs +++ b/tests/ui/fmt/format-args-capture-macro-hygiene.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture.rs b/tests/ui/fmt/format-args-capture.rs index 560352b5cb958..8562ae305f826 100644 --- a/tests/ui/fmt/format-args-capture.rs +++ b/tests/ui/fmt/format-args-capture.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { named_argument_takes_precedence_to_captured(); diff --git a/tests/ui/fmt/format-expanded-string.rs b/tests/ui/fmt/format-expanded-string.rs index 4c716f08c718f..d9b96bdece382 100644 --- a/tests/ui/fmt/format-expanded-string.rs +++ b/tests/ui/fmt/format-expanded-string.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-with-yield-point.rs b/tests/ui/fmt/format-with-yield-point.rs index e484074cc9a55..4622daa5b4a47 100644 --- a/tests/ui/fmt/format-with-yield-point.rs +++ b/tests/ui/fmt/format-with-yield-point.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 macro_rules! m { () => { diff --git a/tests/ui/fmt/indoc-issue-106408.rs b/tests/ui/fmt/indoc-issue-106408.rs index e4e3093b59009..36e5c23a3945f 100644 --- a/tests/ui/fmt/indoc-issue-106408.rs +++ b/tests/ui/fmt/indoc-issue-106408.rs @@ -1,5 +1,5 @@ -// aux-build:format-string-proc-macro.rs -// check-pass +//@ aux-build:format-string-proc-macro.rs +//@ check-pass extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/issue-23781.rs b/tests/ui/fmt/issue-23781.rs index 220ebdb187202..49a0f0ffedc7d 100644 --- a/tests/ui/fmt/issue-23781.rs +++ b/tests/ui/fmt/issue-23781.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; struct Foo; diff --git a/tests/ui/fmt/respanned-literal-issue-106191.rs b/tests/ui/fmt/respanned-literal-issue-106191.rs index 44642a10fc076..b0c0855a87093 100644 --- a/tests/ui/fmt/respanned-literal-issue-106191.rs +++ b/tests/ui/fmt/respanned-literal-issue-106191.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/struct-field-as-captured-argument.fixed b/tests/ui/fmt/struct-field-as-captured-argument.fixed index f7244f6744f3a..e13af744ec869 100644 --- a/tests/ui/fmt/struct-field-as-captured-argument.fixed +++ b/tests/ui/fmt/struct-field-as-captured-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/fmt/struct-field-as-captured-argument.rs b/tests/ui/fmt/struct-field-as-captured-argument.rs index ab5f2552bd323..6a875a85848f5 100644 --- a/tests/ui/fmt/struct-field-as-captured-argument.rs +++ b/tests/ui/fmt/struct-field-as-captured-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/fn/dyn-fn-alignment.rs b/tests/ui/fn/dyn-fn-alignment.rs index cedfd1cf2dcc9..136b8e6f2da96 100644 --- a/tests/ui/fn/dyn-fn-alignment.rs +++ b/tests/ui/fn/dyn-fn-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(align(256))] diff --git a/tests/ui/fn/expr-fn-panic.rs b/tests/ui/fn/expr-fn-panic.rs index 123b57f97a4ec..23946b7533d66 100644 --- a/tests/ui/fn/expr-fn-panic.rs +++ b/tests/ui/fn/expr-fn-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/fn/expr-fn.rs b/tests/ui/fn/expr-fn.rs index 253cbfd5d38fa..9f87583da4033 100644 --- a/tests/ui/fn/expr-fn.rs +++ b/tests/ui/fn/expr-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_int() { diff --git a/tests/ui/fn/fn-bad-block-type.rs b/tests/ui/fn/fn-bad-block-type.rs index 01dcff05881b3..c7ad462f14319 100644 --- a/tests/ui/fn/fn-bad-block-type.rs +++ b/tests/ui/fn/fn-bad-block-type.rs @@ -1,4 +1,4 @@ -// error-pattern:mismatched types +//@ error-pattern:mismatched types fn f() -> isize { true } diff --git a/tests/ui/fn/fn-item-lifetime-bounds.rs b/tests/ui/fn/fn-item-lifetime-bounds.rs index 68a1d0ce9b0b2..b80b7eade23d1 100644 --- a/tests/ui/fn/fn-item-lifetime-bounds.rs +++ b/tests/ui/fn/fn-item-lifetime-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84533 +//@ check-pass +//@ known-bug: #84533 // Should fail. Lifetimes are checked correctly when `foo` is called, but NOT // when only the lifetime parameters are instantiated. diff --git a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs index eec7da044c0d5..ba6646070aa31 100644 --- a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs +++ b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MyCmp { fn cmp(&self) {} } diff --git a/tests/ui/fn/fn-ptr-trait.rs b/tests/ui/fn/fn-ptr-trait.rs index 45918ae5b6104..3edde574c2660 100644 --- a/tests/ui/fn/fn-ptr-trait.rs +++ b/tests/ui/fn/fn-ptr-trait.rs @@ -1,5 +1,5 @@ #![feature(fn_ptr_trait)] -// check-pass +//@ check-pass use std::marker::FnPtr; diff --git a/tests/ui/fn/fn-recover-return-sign.fixed b/tests/ui/fn/fn-recover-return-sign.fixed index 076be6a35a4b7..20dca91fdf418 100644 --- a/tests/ui/fn/fn-recover-return-sign.fixed +++ b/tests/ui/fn/fn-recover-return-sign.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn a() -> usize { 0 } //~^ ERROR return types are denoted using `->` diff --git a/tests/ui/fn/fn-recover-return-sign.rs b/tests/ui/fn/fn-recover-return-sign.rs index 0656023c0f898..43f1712039ff4 100644 --- a/tests/ui/fn/fn-recover-return-sign.rs +++ b/tests/ui/fn/fn-recover-return-sign.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn a() => usize { 0 } //~^ ERROR return types are denoted using `->` diff --git a/tests/ui/fn/fun-call-variants.rs b/tests/ui/fn/fun-call-variants.rs index 5b83e2620d844..68e66314ef151 100644 --- a/tests/ui/fn/fun-call-variants.rs +++ b/tests/ui/fn/fun-call-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn ho(f: F) -> isize where F: FnOnce(isize) -> isize { let n: isize = f(3); return n; } diff --git a/tests/ui/fn/implied-bounds-impl-header-projections.rs b/tests/ui/fn/implied-bounds-impl-header-projections.rs index 28cec8050327f..42f37e553dfab 100644 --- a/tests/ui/fn/implied-bounds-impl-header-projections.rs +++ b/tests/ui/fn/implied-bounds-impl-header-projections.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #100051 +//@ check-pass +//@ known-bug: #100051 // Should fail. Implied bounds from projections in impl headers can create // improper lifetimes. Variant of issue #98543 which was fixed by #99217. diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs index 5d924555625cd..e26df7d89ce45 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Type; diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs index 888f74cf6b337..9b4a1e64d0025 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type.rs index d58d25036c5bb..96e18a88f4d4c 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // See issue #91068. We check that the unnormalized associated types in // function signatures are implied diff --git a/tests/ui/fn/issue-3904.rs b/tests/ui/fn/issue-3904.rs index 7beb91a28d270..ea71f971199d5 100644 --- a/tests/ui/fn/issue-3904.rs +++ b/tests/ui/fn/issue-3904.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn example_err(prog: &str, arg: &str) { println!("{}: {}", prog, arg) } diff --git a/tests/ui/fn/keyword-order.rs b/tests/ui/fn/keyword-order.rs index 8a21db6733352..fe7e3811ca835 100644 --- a/tests/ui/fn/keyword-order.rs +++ b/tests/ui/fn/keyword-order.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 default pub const async unsafe extern fn err() {} //~ ERROR `default` is not followed by an item //~^ ERROR expected item, found keyword `pub` diff --git a/tests/ui/fn/nested-function-names-issue-8587.rs b/tests/ui/fn/nested-function-names-issue-8587.rs index 8fafd41d9bc69..a1ef0ed2c18db 100644 --- a/tests/ui/fn/nested-function-names-issue-8587.rs +++ b/tests/ui/fn/nested-function-names-issue-8587.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure nested functions are separate, even if they have // equal name. // diff --git a/tests/ui/fn/signature-error-reporting-under-verbose.rs b/tests/ui/fn/signature-error-reporting-under-verbose.rs index d28c8530d58ad..4a72da7897896 100644 --- a/tests/ui/fn/signature-error-reporting-under-verbose.rs +++ b/tests/ui/fn/signature-error-reporting-under-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals fn foo(_: i32, _: i32) {} diff --git a/tests/ui/fn/suggest-return-future.rs b/tests/ui/fn/suggest-return-future.rs index 750740d942610..b86b2b1c7daff 100644 --- a/tests/ui/fn/suggest-return-future.rs +++ b/tests/ui/fn/suggest-return-future.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn a() -> i32 { 0 diff --git a/tests/ui/for-loop-while/auto-loop.rs b/tests/ui/for-loop-while/auto-loop.rs index f02ac43c7344e..5903986d62d7a 100644 --- a/tests/ui/for-loop-while/auto-loop.rs +++ b/tests/ui/for-loop-while/auto-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut sum = 0; diff --git a/tests/ui/for-loop-while/break-value.rs b/tests/ui/for-loop-while/break-value.rs index 9fc49fa8181b1..1289231fc30ff 100644 --- a/tests/ui/for-loop-while/break-value.rs +++ b/tests/ui/for-loop-while/break-value.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn int_id(x: isize) -> isize { return x; } diff --git a/tests/ui/for-loop-while/break.rs b/tests/ui/for-loop-while/break.rs index 427b1b7a0634f..77774792262cd 100644 --- a/tests/ui/for-loop-while/break.rs +++ b/tests/ui/for-loop-while/break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i = 0; diff --git a/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs b/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs index afc77355ab00a..fef9f24d462d8 100644 --- a/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs +++ b/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test verifies that temporaries created for `while`'s and `if` // conditions are dropped after the condition is evaluated. diff --git a/tests/ui/for-loop-while/for-destruct.rs b/tests/ui/for-loop-while/for-destruct.rs index 7ca8d4ded25b7..e0b082ad04848 100644 --- a/tests/ui/for-loop-while/for-destruct.rs +++ b/tests/ui/for-loop-while/for-destruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Pair { x: isize, y: isize } diff --git a/tests/ui/for-loop-while/for-loop-goofiness.rs b/tests/ui/for-loop-while/for-loop-goofiness.rs index 872ab168bb26d..4be82f32e8ada 100644 --- a/tests/ui/for-loop-while/for-loop-goofiness.rs +++ b/tests/ui/for-loop-while/for-loop-goofiness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum BogusOption { diff --git a/tests/ui/for-loop-while/for-loop-has-unit-body.rs b/tests/ui/for-loop-while/for-loop-has-unit-body.rs index eba385461b951..8a8b609b0755b 100644 --- a/tests/ui/for-loop-while/for-loop-has-unit-body.rs +++ b/tests/ui/for-loop-while/for-loop-has-unit-body.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // Check that the tail statement in the body unifies with something for _ in 0..3 { diff --git a/tests/ui/for-loop-while/for-loop-into-iterator.rs b/tests/ui/for-loop-while/for-loop-into-iterator.rs index 199d4ddb2993a..d04e80683a63c 100644 --- a/tests/ui/for-loop-while/for-loop-into-iterator.rs +++ b/tests/ui/for-loop-while/for-loop-into-iterator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that for loops can do what RFC #235 claims diff --git a/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs b/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs index 6a38764a1317e..fee28354b13b2 100644 --- a/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs +++ b/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test when destructors run in a for loop. The intention is // that the value for each iteration is dropped *after* the loop // body has executed. This is true even when the value is assigned diff --git a/tests/ui/for-loop-while/for-loop-macro.rs b/tests/ui/for-loop-while/for-loop-macro.rs index 5abccd2a1412f..9205ab4afd0de 100644 --- a/tests/ui/for-loop-while/for-loop-macro.rs +++ b/tests/ui/for-loop-while/for-loop-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! var { ( $name:ident ) => ( $name ); } diff --git a/tests/ui/for-loop-while/for-loop-mut-ref-element.rs b/tests/ui/for-loop-while/for-loop-mut-ref-element.rs index a3d82ace9e25e..ba240f6576244 100644 --- a/tests/ui/for-loop-while/for-loop-mut-ref-element.rs +++ b/tests/ui/for-loop-while/for-loop-mut-ref-element.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that for loops can bind elements as mutable references fn main() { diff --git a/tests/ui/for-loop-while/for-loop-no-std.rs b/tests/ui/for-loop-while/for-loop-no-std.rs index 65a33c5f16f1d..4511146dc75f4 100644 --- a/tests/ui/for-loop-while/for-loop-no-std.rs +++ b/tests/ui/for-loop-while/for-loop-no-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/for-loop-while/for-loop-panic.rs b/tests/ui/for-loop-while/for-loop-panic.rs index ac607d6d73150..6c707b0629724 100644 --- a/tests/ui/for-loop-while/for-loop-panic.rs +++ b/tests/ui/for-loop-while/for-loop-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: Vec = Vec::new(); for _ in &x { panic!("moop"); } } diff --git a/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs b/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs index a1e9b1ed87d0d..74ef2090b1f95 100644 --- a/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs +++ b/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the type of `sum` falls back to `i32` here, // and that the for loop desugaring doesn't interfere with // that. diff --git a/tests/ui/for-loop-while/foreach-external-iterators-break.rs b/tests/ui/for-loop-while/foreach-external-iterators-break.rs index 7de6a4f8acb17..ddeb610d7e417 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-break.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs b/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs index 5d690807e0505..5afdc257901a6 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs b/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs index 9f2ca05cdb61c..32f0666926e80 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-loop.rs b/tests/ui/for-loop-while/foreach-external-iterators-loop.rs index 78af195bc209a..da7e995ca9c55 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-loop.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-nested.rs b/tests/ui/for-loop-while/foreach-external-iterators-nested.rs index 8a95f160a1ace..e4fc815cc8338 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-nested.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators.rs b/tests/ui/for-loop-while/foreach-external-iterators.rs index 24ecfe9b60d56..8a53b4eeae349 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-nested.rs b/tests/ui/for-loop-while/foreach-nested.rs index bb6edbc0797b3..65172cd9d44a3 100644 --- a/tests/ui/for-loop-while/foreach-nested.rs +++ b/tests/ui/for-loop-while/foreach-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn two(mut it: F) where F: FnMut(isize) { it(0); it(1); } diff --git a/tests/ui/for-loop-while/foreach-put-structured.rs b/tests/ui/for-loop-while/foreach-put-structured.rs index 3a47fcf341573..fe485f55dd80e 100644 --- a/tests/ui/for-loop-while/foreach-put-structured.rs +++ b/tests/ui/for-loop-while/foreach-put-structured.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairs(mut it: F) where F: FnMut((isize, isize)) { diff --git a/tests/ui/for-loop-while/foreach-simple-outer-slot.rs b/tests/ui/for-loop-while/foreach-simple-outer-slot.rs index a8d42a789ba77..9d4b6dc9eaa04 100644 --- a/tests/ui/for-loop-while/foreach-simple-outer-slot.rs +++ b/tests/ui/for-loop-while/foreach-simple-outer-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/for-loop-while/issue-1257.rs b/tests/ui/for-loop-while/issue-1257.rs index de5a6d3592586..cdd4c806358dc 100644 --- a/tests/ui/for-loop-while/issue-1257.rs +++ b/tests/ui/for-loop-while/issue-1257.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main () { let mut line = "".to_string(); diff --git a/tests/ui/for-loop-while/issue-2216.rs b/tests/ui/for-loop-while/issue-2216.rs index ad54107423d6c..f516523199c93 100644 --- a/tests/ui/for-loop-while/issue-2216.rs +++ b/tests/ui/for-loop-while/issue-2216.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] pub fn main() { let mut x = 0; diff --git a/tests/ui/for-loop-while/issue-51345.rs b/tests/ui/for-loop-while/issue-51345.rs index 15571e8bf5b28..ec8f29b736496 100644 --- a/tests/ui/for-loop-while/issue-51345.rs +++ b/tests/ui/for-loop-while/issue-51345.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] fn main() { diff --git a/tests/ui/for-loop-while/issue-69841.rs b/tests/ui/for-loop-while/issue-69841.rs index 942b99b742bc6..16132ce7c28da 100644 --- a/tests/ui/for-loop-while/issue-69841.rs +++ b/tests/ui/for-loop-while/issue-69841.rs @@ -1,7 +1,7 @@ // This is a regression test for issue rust-lang/rust#69841, which exposed an // LLVM bug which needed a fix to be backported. -// run-pass +//@ run-pass fn main() { let buffer = [49u8, 10]; diff --git a/tests/ui/for-loop-while/label_break_value.rs b/tests/ui/for-loop-while/label_break_value.rs index 10992c50597b6..92242c50f45a6 100644 --- a/tests/ui/for-loop-while/label_break_value.rs +++ b/tests/ui/for-loop-while/label_break_value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/for-loop-while/labeled-break.rs b/tests/ui/for-loop-while/labeled-break.rs index 4dacc57574f17..0dfbdc02f5b5b 100644 --- a/tests/ui/for-loop-while/labeled-break.rs +++ b/tests/ui/for-loop-while/labeled-break.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { 'foo: loop { diff --git a/tests/ui/for-loop-while/linear-for-loop.rs b/tests/ui/for-loop-while/linear-for-loop.rs index 3c573db1d7766..4699e11608ac6 100644 --- a/tests/ui/for-loop-while/linear-for-loop.rs +++ b/tests/ui/for-loop-while/linear-for-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = vec![1, 2, 3]; let mut y = 0; diff --git a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs index 11b6971656f08..be6dc33c8bea7 100644 --- a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs +++ b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/liveness-loop-break.rs b/tests/ui/for-loop-while/liveness-loop-break.rs index 60a63bccb1068..57eb13f256b91 100644 --- a/tests/ui/for-loop-while/liveness-loop-break.rs +++ b/tests/ui/for-loop-while/liveness-loop-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test() { let v; loop { diff --git a/tests/ui/for-loop-while/liveness-move-in-loop.rs b/tests/ui/for-loop-while/liveness-move-in-loop.rs index ce73d6335cb21..0ae92a78a04dd 100644 --- a/tests/ui/for-loop-while/liveness-move-in-loop.rs +++ b/tests/ui/for-loop-while/liveness-move-in-loop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn take(x: isize) -> isize {x} diff --git a/tests/ui/for-loop-while/long-while.rs b/tests/ui/for-loop-while/long-while.rs index 529cca7b73167..6db06baa8738b 100644 --- a/tests/ui/for-loop-while/long-while.rs +++ b/tests/ui/for-loop-while/long-while.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/loop-break-cont-1.rs b/tests/ui/for-loop-while/loop-break-cont-1.rs index f207746f08522..236248790d51a 100644 --- a/tests/ui/for-loop-while/loop-break-cont-1.rs +++ b/tests/ui/for-loop-while/loop-break-cont-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let _i = 0_usize; diff --git a/tests/ui/for-loop-while/loop-break-cont.rs b/tests/ui/for-loop-while/loop-break-cont.rs index 92d5a32c62b83..04b083ec162c8 100644 --- a/tests/ui/for-loop-while/loop-break-cont.rs +++ b/tests/ui/for-loop-while/loop-break-cont.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i = 0_usize; loop { diff --git a/tests/ui/for-loop-while/loop-break-value.rs b/tests/ui/for-loop-while/loop-break-value.rs index 65207fb7fb54e..f46524b6d2781 100644 --- a/tests/ui/for-loop-while/loop-break-value.rs +++ b/tests/ui/for-loop-while/loop-break-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![feature(never_type)] diff --git a/tests/ui/for-loop-while/loop-diverges.rs b/tests/ui/for-loop-while/loop-diverges.rs index f657bf9e0b3bc..fdf46387795ff 100644 --- a/tests/ui/for-loop-while/loop-diverges.rs +++ b/tests/ui/for-loop-while/loop-diverges.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* Make sure a loop{} can be the tailexpr in the body of a diverging function */ diff --git a/tests/ui/for-loop-while/loop-label-shadowing.rs b/tests/ui/for-loop-while/loop-label-shadowing.rs index 9bedde67b7888..e3dfbe65d8cf0 100644 --- a/tests/ui/for-loop-while/loop-label-shadowing.rs +++ b/tests/ui/for-loop-while/loop-label-shadowing.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #12512. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut foo = Vec::new(); diff --git a/tests/ui/for-loop-while/loop-labeled-break-value.rs b/tests/ui/for-loop-while/loop-labeled-break-value.rs index cc8f826983b6a..0ab07ffd7e22a 100644 --- a/tests/ui/for-loop-while/loop-labeled-break-value.rs +++ b/tests/ui/for-loop-while/loop-labeled-break-value.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { 'outer: loop { diff --git a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs index 1b5db20129d8b..531c3dc377d75 100644 --- a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs +++ b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct S; // Ensure S is moved, not copied, on assignment. diff --git a/tests/ui/for-loop-while/loop-scope.rs b/tests/ui/for-loop-while/loop-scope.rs index 73324a3e1bdc7..a913b2554d23f 100644 --- a/tests/ui/for-loop-while/loop-scope.rs +++ b/tests/ui/for-loop-while/loop-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = vec![10, 20, 30]; diff --git a/tests/ui/for-loop-while/while-cont.rs b/tests/ui/for-loop-while/while-cont.rs index a864e8ef70a1c..1640b7e1803bd 100644 --- a/tests/ui/for-loop-while/while-cont.rs +++ b/tests/ui/for-loop-while/while-cont.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #825: Should recheck the loop condition after continuing pub fn main() { let mut i = 1; diff --git a/tests/ui/for-loop-while/while-flow-graph.rs b/tests/ui/for-loop-while/while-flow-graph.rs index 1748964a7b2a0..9148b42a6061a 100644 --- a/tests/ui/for-loop-while/while-flow-graph.rs +++ b/tests/ui/for-loop-while/while-flow-graph.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: isize = 10; while x == 10 && x == 11 { let _y = 0xf00_usize; } } diff --git a/tests/ui/for-loop-while/while-label.rs b/tests/ui/for-loop-while/while-label.rs index 5abc41daf94b8..b0a1eea1b17d3 100644 --- a/tests/ui/for-loop-while/while-label.rs +++ b/tests/ui/for-loop-while/while-label.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] diff --git a/tests/ui/for-loop-while/while-let-2.rs b/tests/ui/for-loop-while/while-let-2.rs index b9a49b47c8ff5..23abad5d2da8d 100644 --- a/tests/ui/for-loop-while/while-let-2.rs +++ b/tests/ui/for-loop-while/while-let-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(dead_code)] fn macros() { diff --git a/tests/ui/for-loop-while/while-let.rs b/tests/ui/for-loop-while/while-let.rs index b9d70ff0b9dc8..d3a36be374379 100644 --- a/tests/ui/for-loop-while/while-let.rs +++ b/tests/ui/for-loop-while/while-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::BinaryHeap; diff --git a/tests/ui/for-loop-while/while-loop-constraints-2.rs b/tests/ui/for-loop-while/while-loop-constraints-2.rs index 3c5cdf06cd85c..654f6769902bd 100644 --- a/tests/ui/for-loop-while/while-loop-constraints-2.rs +++ b/tests/ui/for-loop-while/while-loop-constraints-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/while-prelude-drop.rs b/tests/ui/for-loop-while/while-prelude-drop.rs index 947a70e1dd20f..1fca90f019321 100644 --- a/tests/ui/for-loop-while/while-prelude-drop.rs +++ b/tests/ui/for-loop-while/while-prelude-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #[derive(PartialEq)] enum t { a, b(String), } diff --git a/tests/ui/for-loop-while/while-with-break.rs b/tests/ui/for-loop-while/while-with-break.rs index a9d52dda544e9..56f3bb6829848 100644 --- a/tests/ui/for-loop-while/while-with-break.rs +++ b/tests/ui/for-loop-while/while-with-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: isize = 90; diff --git a/tests/ui/for-loop-while/while.rs b/tests/ui/for-loop-while/while.rs index 90f718a34839a..e0fb73196305a 100644 --- a/tests/ui/for-loop-while/while.rs +++ b/tests/ui/for-loop-while/while.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs index 8ae9494faf8b0..77d7039fa15ec 100644 --- a/tests/ui/for/issue-20605.rs +++ b/tests/ui/for/issue-20605.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn changer<'a>(mut things: Box>) { for item in *things { *item = 0 } diff --git a/tests/ui/foreign/foreign-fn-linkname.rs b/tests/ui/foreign/foreign-fn-linkname.rs index d1d6e703e3dd4..42876937a839f 100644 --- a/tests/ui/foreign/foreign-fn-linkname.rs +++ b/tests/ui/foreign/foreign-fn-linkname.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-sgx no libc // Ensure no false positive on "unused extern crate" lint #![deny(unused_extern_crates)] diff --git a/tests/ui/foreign/foreign-int-types.rs b/tests/ui/foreign/foreign-int-types.rs index 2d01d32042563..d20a4c96ea0e2 100644 --- a/tests/ui/foreign/foreign-int-types.rs +++ b/tests/ui/foreign/foreign-int-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(improper_ctypes)] #![allow(dead_code)] diff --git a/tests/ui/foreign/foreign-mod-src/inner.rs b/tests/ui/foreign/foreign-mod-src/inner.rs index cf484878b0719..591fb7bfaf5f4 100644 --- a/tests/ui/foreign/foreign-mod-src/inner.rs +++ b/tests/ui/foreign/foreign-mod-src/inner.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/foreign/foreign-mod-unused-const.rs b/tests/ui/foreign/foreign-mod-unused-const.rs index 7d79c30f46906..2cc0a4f601838 100644 --- a/tests/ui/foreign/foreign-mod-unused-const.rs +++ b/tests/ui/foreign/foreign-mod-unused-const.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { extern "C" { diff --git a/tests/ui/foreign/foreign-pub-super.rs b/tests/ui/foreign/foreign-pub-super.rs index 19f9e4e339e75..62a11d74fe8b2 100644 --- a/tests/ui/foreign/foreign-pub-super.rs +++ b/tests/ui/foreign/foreign-pub-super.rs @@ -1,5 +1,5 @@ // Test for #79487 -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/foreign/foreign-src/foreign.rs b/tests/ui/foreign/foreign-src/foreign.rs index 47016ad6ce72b..92a127e8cccfa 100644 --- a/tests/ui/foreign/foreign-src/foreign.rs +++ b/tests/ui/foreign/foreign-src/foreign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/foreign/foreign-truncated-arguments.rs b/tests/ui/foreign/foreign-truncated-arguments.rs index c61c2b587b652..52906223b055a 100644 --- a/tests/ui/foreign/foreign-truncated-arguments.rs +++ b/tests/ui/foreign/foreign-truncated-arguments.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for https://github.com/rust-lang/rust/issues/33868 #[repr(C)] diff --git a/tests/ui/foreign/foreign2.rs b/tests/ui/foreign/foreign2.rs index df431f2999c8e..9379a0b4bd6f5 100644 --- a/tests/ui/foreign/foreign2.rs +++ b/tests/ui/foreign/foreign2.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs index a84065e021868..7f1625c9265ae 100644 --- a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs +++ b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs @@ -1,7 +1,7 @@ // Previously this ICE'd because `fn g()` would be lowered, but the block associated with `fn f()` // wasn't. -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib extern "C" { fn f() { diff --git a/tests/ui/foreign/issue-99276-same-type-lifetimes.rs b/tests/ui/foreign/issue-99276-same-type-lifetimes.rs index fce603c801f24..c76d082ee9fe4 100644 --- a/tests/ui/foreign/issue-99276-same-type-lifetimes.rs +++ b/tests/ui/foreign/issue-99276-same-type-lifetimes.rs @@ -1,5 +1,5 @@ // Check that we do not ICE when structurally comparing types with lifetimes present. -// check-pass +//@ check-pass pub struct Record<'a> { pub args: &'a [(usize, &'a str)], diff --git a/tests/ui/foreign/nil-decl-in-foreign.rs b/tests/ui/foreign/nil-decl-in-foreign.rs index f3be948781be3..355278d99da5d 100644 --- a/tests/ui/foreign/nil-decl-in-foreign.rs +++ b/tests/ui/foreign/nil-decl-in-foreign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] #![allow(dead_code)] // Issue #901 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod libc { extern "C" { diff --git a/tests/ui/format-no-std.rs b/tests/ui/format-no-std.rs index c9b7651bfda05..27c31f48a006c 100644 --- a/tests/ui/format-no-std.rs +++ b/tests/ui/format-no-std.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no no_std executables +//@ run-pass +//@ ignore-emscripten no no_std executables #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/fun-indirect-call.rs b/tests/ui/fun-indirect-call.rs index 49da3d83f4a27..7919be07f7e46 100644 --- a/tests/ui/fun-indirect-call.rs +++ b/tests/ui/fun-indirect-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { return 42; } diff --git a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs index 855749c14b9c3..2e1c863e0f4ca 100644 --- a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs +++ b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -// run-pass +//@ compile-flags: -C opt-level=3 +//@ run-pass fn foo(_i: i32) -> i32 { 1 diff --git a/tests/ui/function-pointer/issue-102289.rs b/tests/ui/function-pointer/issue-102289.rs index de394ca9ad6d4..54e76189ec65a 100644 --- a/tests/ui/function-pointer/issue-102289.rs +++ b/tests/ui/function-pointer/issue-102289.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub(crate) trait Parser: Sized { type Output; diff --git a/tests/ui/function-pointer/sized-ret-with-binder.rs b/tests/ui/function-pointer/sized-ret-with-binder.rs index 104ac4d222ebe..4887ba5efa77f 100644 --- a/tests/ui/function-pointer/sized-ret-with-binder.rs +++ b/tests/ui/function-pointer/sized-ret-with-binder.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures)] diff --git a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs index 8e1c68fd77da0..bf8ae119142df 100644 --- a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs +++ b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> isize { 22 } diff --git a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs index bcde504635d9e..b666884f64ac6 100644 --- a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs +++ b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn each(x: &[T], mut f: F) where F: FnMut(&T) { for val in x { diff --git a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs index 206b3d7b61371..6839d99ba2789 100644 --- a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs +++ b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn each<'a,T,F:FnMut(&'a T)>(x: &'a [T], mut f: F) { for val in x { f(val) diff --git a/tests/ui/functions-closures/clone-closure.rs b/tests/ui/functions-closures/clone-closure.rs index 1e725d8056d10..586592bda10c6 100644 --- a/tests/ui/functions-closures/clone-closure.rs +++ b/tests/ui/functions-closures/clone-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that closures implement `Clone`. #[derive(Clone)] diff --git a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs index ccb2e201d7d12..4f38ea02d9cc3 100644 --- a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs +++ b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::channel; 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 6d5a9876c373c..09675d493939c 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 +//@ run-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 e97785b5cacdf..47835ad844292 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] struct UsizeRef<'a> { diff --git a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs index e9964531c3c0c..c72036e33f2d7 100644 --- a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs +++ b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn with_closure(f: F) -> Result where F: FnOnce(&char) -> Result, { diff --git a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs index 8665cfc21a765..34c94cd786402 100644 --- a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs +++ b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn with_closure(f: F) -> u32 where F: FnOnce(&u32, &u32) -> u32 { diff --git a/tests/ui/functions-closures/closure-immediate.rs b/tests/ui/functions-closures/closure-immediate.rs index 428fc6bdef368..0bda017de5a5c 100644 --- a/tests/ui/functions-closures/closure-immediate.rs +++ b/tests/ui/functions-closures/closure-immediate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // After the work to reoptimize structs, it became possible for immediate logic to fail. // This test verifies that it actually works. diff --git a/tests/ui/functions-closures/closure-inference.rs b/tests/ui/functions-closures/closure-inference.rs index 1877414f09942..b7ffbfdb87fc5 100644 --- a/tests/ui/functions-closures/closure-inference.rs +++ b/tests/ui/functions-closures/closure-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn foo(i: isize) -> isize { i + 1 } diff --git a/tests/ui/functions-closures/closure-inference2.rs b/tests/ui/functions-closures/closure-inference2.rs index 4ce132e86caa4..8db7016be6d99 100644 --- a/tests/ui/functions-closures/closure-inference2.rs +++ b/tests/ui/functions-closures/closure-inference2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a rather underspecified example: #![allow(unused_braces)] diff --git a/tests/ui/functions-closures/closure-reform.rs b/tests/ui/functions-closures/closure-reform.rs index 0bb6159ff4aa1..3277b7bff47bc 100644 --- a/tests/ui/functions-closures/closure-reform.rs +++ b/tests/ui/functions-closures/closure-reform.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/functions-closures/closure-returning-closure.rs b/tests/ui/functions-closures/closure-returning-closure.rs index 17db81687ab27..c4ec792c1022d 100644 --- a/tests/ui/functions-closures/closure-returning-closure.rs +++ b/tests/ui/functions-closures/closure-returning-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let f = |_||x, y| x+y; assert_eq!(f(())(1, 2), 3); diff --git a/tests/ui/functions-closures/closure-to-fn-coercion.rs b/tests/ui/functions-closures/closure-to-fn-coercion.rs index 87ba488b5aef2..4b66294ea7b46 100644 --- a/tests/ui/functions-closures/closure-to-fn-coercion.rs +++ b/tests/ui/functions-closures/closure-to-fn-coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; const FOO: fn(u8) -> u8 = |v: u8| { v }; 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 e7a9383950ffd..b8a11ef5a00e6 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 +//@ run-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/copy-closure.rs b/tests/ui/functions-closures/copy-closure.rs index 72da02421b722..313d39eac3d62 100644 --- a/tests/ui/functions-closures/copy-closure.rs +++ b/tests/ui/functions-closures/copy-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that closures implement `Copy`. fn call T>(f: F) -> T { f() } diff --git a/tests/ui/functions-closures/fn-abi.rs b/tests/ui/functions-closures/fn-abi.rs index ac3a4be3346e3..d33158e89175c 100644 --- a/tests/ui/functions-closures/fn-abi.rs +++ b/tests/ui/functions-closures/fn-abi.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Ensure that declarations and types which use `extern fn` both have the same // ABI (#9309). -// pretty-expanded FIXME #23616 -// aux-build:fn-abi.rs +//@ pretty-expanded FIXME #23616 +//@ aux-build:fn-abi.rs extern crate fn_abi; diff --git a/tests/ui/functions-closures/fn-bare-assign.rs b/tests/ui/functions-closures/fn-bare-assign.rs index f5dab3c840213..d09e0a3bd9251 100644 --- a/tests/ui/functions-closures/fn-bare-assign.rs +++ b/tests/ui/functions-closures/fn-bare-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: isize, called: &mut bool) { assert_eq!(i, 10); 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 922e016ddc808..18015a41564e2 100644 --- a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs +++ b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn bare() {} diff --git a/tests/ui/functions-closures/fn-bare-item.rs b/tests/ui/functions-closures/fn-bare-item.rs index a6e6495a40a84..a0856463bc26e 100644 --- a/tests/ui/functions-closures/fn-bare-item.rs +++ b/tests/ui/functions-closures/fn-bare-item.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() { println!("This is a bare function"); } diff --git a/tests/ui/functions-closures/fn-bare-size.rs b/tests/ui/functions-closures/fn-bare-size.rs index 2ba56eaaed4c7..75725832365c8 100644 --- a/tests/ui/functions-closures/fn-bare-size.rs +++ b/tests/ui/functions-closures/fn-bare-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/functions-closures/fn-bare-spawn.rs b/tests/ui/functions-closures/fn-bare-spawn.rs index 0d46fe220876a..902e5702fbf61 100644 --- a/tests/ui/functions-closures/fn-bare-spawn.rs +++ b/tests/ui/functions-closures/fn-bare-spawn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is what the signature to spawn should look like with bare functions diff --git a/tests/ui/functions-closures/fn-coerce-field.rs b/tests/ui/functions-closures/fn-coerce-field.rs index 38bde7b9e8fbc..dd7be374c8428 100644 --- a/tests/ui/functions-closures/fn-coerce-field.rs +++ b/tests/ui/functions-closures/fn-coerce-field.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] struct r where F: FnOnce() { diff --git a/tests/ui/functions-closures/fn-item-type-cast.rs b/tests/ui/functions-closures/fn-item-type-cast.rs index 4d50ea97b8bc1..ccd3364aaf5ac 100644 --- a/tests/ui/functions-closures/fn-item-type-cast.rs +++ b/tests/ui/functions-closures/fn-item-type-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test explicit coercions from a fn item type to a fn pointer type. diff --git a/tests/ui/functions-closures/fn-item-type-coerce.rs b/tests/ui/functions-closures/fn-item-type-coerce.rs index 7a096764e45fe..e858f9e9e196f 100644 --- a/tests/ui/functions-closures/fn-item-type-coerce.rs +++ b/tests/ui/functions-closures/fn-item-type-coerce.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test implicit coercions from a fn item type to a fn pointer type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: isize) -> isize { x * 2 } fn bar(x: isize) -> isize { x * 4 } diff --git a/tests/ui/functions-closures/fn-item-type-zero-sized.rs b/tests/ui/functions-closures/fn-item-type-zero-sized.rs index bd9f1ed663d57..11f817da7aa80 100644 --- a/tests/ui/functions-closures/fn-item-type-zero-sized.rs +++ b/tests/ui/functions-closures/fn-item-type-zero-sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that fn item types are zero-sized. use std::mem::{size_of, size_of_val}; diff --git a/tests/ui/functions-closures/fn-lval.rs b/tests/ui/functions-closures/fn-lval.rs index 01079eea457c3..aa080f6b985f3 100644 --- a/tests/ui/functions-closures/fn-lval.rs +++ b/tests/ui/functions-closures/fn-lval.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_f: fn(isize) -> isize) { } diff --git a/tests/ui/functions-closures/fn-type-infer.rs b/tests/ui/functions-closures/fn-type-infer.rs index fe6567f22b504..b1624e476ef16 100644 --- a/tests/ui/functions-closures/fn-type-infer.rs +++ b/tests/ui/functions-closures/fn-type-infer.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![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 4ac07123d9dde..dfcbc037412ef 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 +//@ run-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/nullable-pointer-opt-closures.rs b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs index 87dacfba25b10..2cafe1b7aba8a 100644 --- a/tests/ui/functions-closures/nullable-pointer-opt-closures.rs +++ b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/functions-closures/parallel-codegen-closures.rs b/tests/ui/functions-closures/parallel-codegen-closures.rs index 79759daba501c..1842ac4db6060 100644 --- a/tests/ui/functions-closures/parallel-codegen-closures.rs +++ b/tests/ui/functions-closures/parallel-codegen-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] @@ -6,7 +6,7 @@ // Tests parallel codegen - this can fail if the symbol for the anonymous // closure in `sum` pollutes the second codegen unit from the first. -// compile-flags: -C codegen_units=2 +//@ compile-flags: -C codegen_units=2 #![feature(iter_arith)] diff --git a/tests/ui/functions-closures/return-from-closure.rs b/tests/ui/functions-closures/return-from-closure.rs index 656a95f120a43..aaf6a31eb3fec 100644 --- a/tests/ui/functions-closures/return-from-closure.rs +++ b/tests/ui/functions-closures/return-from-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // just to make sure that `return` is only returning from the closure, // not the surrounding function. diff --git a/tests/ui/generic-associated-types/anonymize-bound-vars.rs b/tests/ui/generic-associated-types/anonymize-bound-vars.rs index eb7a12412c6ba..37267329ac4de 100644 --- a/tests/ui/generic-associated-types/anonymize-bound-vars.rs +++ b/tests/ui/generic-associated-types/anonymize-bound-vars.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // regression test for #98702 diff --git a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs index e2d51c6649ab9..fade3c441abec 100644 --- a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs +++ b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs @@ -1,4 +1,4 @@ -// known-bug: #117606 +//@ known-bug: #117606 #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs index 5101de19d3cb6..b2d654b0689ba 100644 --- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs +++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // This gives us problems because `for<'a> I::Item<'a>: Debug` should mean "for // all 'a where I::Item<'a> is WF", but really means "for all 'a possible" diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs index 3174227a7a1e1..b0212414b5a38 100644 --- a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs +++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // This gives us problems because `for<'a> I::Item<'a>: Debug` should mean "for // all 'a where I::Item<'a> is WF", but really means "for all 'a possible" diff --git a/tests/ui/generic-associated-types/bugs/issue-100013.rs b/tests/ui/generic-associated-types/bugs/issue-100013.rs index b13b730d5d8b7..994f41e9f86b2 100644 --- a/tests/ui/generic-associated-types/bugs/issue-100013.rs +++ b/tests/ui/generic-associated-types/bugs/issue-100013.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: unknown -// edition: 2021 +//@ check-fail +//@ known-bug: unknown +//@ edition: 2021 // We really should accept this, but we need implied bounds between the regions // in a coroutine interior. diff --git a/tests/ui/generic-associated-types/bugs/issue-80626.rs b/tests/ui/generic-associated-types/bugs/issue-80626.rs index d6e18010f3b27..a14496280c764 100644 --- a/tests/ui/generic-associated-types/bugs/issue-80626.rs +++ b/tests/ui/generic-associated-types/bugs/issue-80626.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Allocator { type Allocated; diff --git a/tests/ui/generic-associated-types/bugs/issue-87735.rs b/tests/ui/generic-associated-types/bugs/issue-87735.rs index 80737a79899b4..e864ad7c815dd 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87735.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87735.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87735, #88526 +//@ check-fail +//@ known-bug: #87735, #88526 // This should pass, but we need an extension of implied bounds (probably). diff --git a/tests/ui/generic-associated-types/bugs/issue-87755.rs b/tests/ui/generic-associated-types/bugs/issue-87755.rs index cda722d2f0c72..493a400b9823e 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87755.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87755.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87755 +//@ check-fail +//@ known-bug: #87755 // This should pass. diff --git a/tests/ui/generic-associated-types/bugs/issue-87803.rs b/tests/ui/generic-associated-types/bugs/issue-87803.rs index 56237e387ef30..63773894a97cd 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87803.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87803.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87803 +//@ check-fail +//@ known-bug: #87803 // This should pass, but using a type alias vs a reference directly // changes late-bound -> early-bound. diff --git a/tests/ui/generic-associated-types/bugs/issue-88382.rs b/tests/ui/generic-associated-types/bugs/issue-88382.rs index 8f8cc4523a202..4147d8e5344fe 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88382.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88382.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #88382 +//@ check-fail +//@ known-bug: #88382 // This should pass, but has a missed normalization due to HRTB. diff --git a/tests/ui/generic-associated-types/bugs/issue-88460.rs b/tests/ui/generic-associated-types/bugs/issue-88460.rs index 3d2b225f0cd01..50a2bacb070db 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88460.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88460.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Marker {} diff --git a/tests/ui/generic-associated-types/bugs/issue-88526.rs b/tests/ui/generic-associated-types/bugs/issue-88526.rs index 99397744fa655..e2a42aefdd2df 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88526.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88526.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #88526 +//@ check-fail +//@ known-bug: #88526 // This should pass, but requires more logic. diff --git a/tests/ui/generic-associated-types/bugs/issue-91762.rs b/tests/ui/generic-associated-types/bugs/issue-91762.rs index 8f2cc45509ffc..b4799eb12f466 100644 --- a/tests/ui/generic-associated-types/bugs/issue-91762.rs +++ b/tests/ui/generic-associated-types/bugs/issue-91762.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // We almost certainly want this to pass, but // it's particularly difficult currently, because we need a way of specifying diff --git a/tests/ui/generic-associated-types/collections.rs b/tests/ui/generic-associated-types/collections.rs index 15f429afb0274..7239d226927df 100644 --- a/tests/ui/generic-associated-types/collections.rs +++ b/tests/ui/generic-associated-types/collections.rs @@ -4,7 +4,7 @@ // https://smallcultfollowing.com/babysteps/blog/2016/11/03/ // associated-type-constructors-part-2-family-traits/ -// run-pass +//@ run-pass trait Collection { type Iter<'iter>: Iterator where T: 'iter, Self: 'iter; diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs index c5f9a25a6ea9f..3c71c87bb4560 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs index cd7941ed9af79..cd8ca7bb39f2f 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs index db61fc08005bf..6464e16492ad2 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Bar::Assoc GAT. diff --git a/tests/ui/generic-associated-types/construct_with_other_type.rs b/tests/ui/generic-associated-types/construct_with_other_type.rs index 5cb07f5588343..74ac8313cadfd 100644 --- a/tests/ui/generic-associated-types/construct_with_other_type.rs +++ b/tests/ui/generic-associated-types/construct_with_other_type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/generic-associated-types/cross-crate-bounds.rs b/tests/ui/generic-associated-types/cross-crate-bounds.rs index 8934a07fd4e39..84b903aa6aecd 100644 --- a/tests/ui/generic-associated-types/cross-crate-bounds.rs +++ b/tests/ui/generic-associated-types/cross-crate-bounds.rs @@ -1,8 +1,8 @@ // regression test for #73816 // We handled bounds differently when `feature(generic_associated_types)` was enabled -// edition:2018 -// aux-build:foo_defn.rs +//@ edition:2018 +//@ aux-build:foo_defn.rs extern crate foo_defn; diff --git a/tests/ui/generic-associated-types/extended/lending_iterator.rs b/tests/ui/generic-associated-types/extended/lending_iterator.rs index 8bec78d6ecd7b..7cd32413001e3 100644 --- a/tests/ui/generic-associated-types/extended/lending_iterator.rs +++ b/tests/ui/generic-associated-types/extended/lending_iterator.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/extended/lending_iterator_2.rs b/tests/ui/generic-associated-types/extended/lending_iterator_2.rs index eb9c0456a1eed..f4b0dae0a91c3 100644 --- a/tests/ui/generic-associated-types/extended/lending_iterator_2.rs +++ b/tests/ui/generic-associated-types/extended/lending_iterator_2.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs index b43f982283b8b..b0f189ca2ba9c 100644 --- a/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs +++ b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc: PartialEq>; diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.rs b/tests/ui/generic-associated-types/gat-in-trait-path.rs index c1ce7d69f10f0..7eb0aabb33332 100644 --- a/tests/ui/generic-associated-types/gat-in-trait-path.rs +++ b/tests/ui/generic-associated-types/gat-in-trait-path.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![feature(associated_type_defaults)] #![cfg_attr(extended, feature(generic_associated_types_extended))] diff --git a/tests/ui/generic-associated-types/generic-associated-type-bounds.rs b/tests/ui/generic-associated-types/generic-associated-type-bounds.rs index fdc5a72671caa..08b0877be8671 100644 --- a/tests/ui/generic-associated-types/generic-associated-type-bounds.rs +++ b/tests/ui/generic-associated-types/generic-associated-type-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait X { type Y<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs b/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs index 5ef9437c96875..8315e98524a3f 100644 --- a/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs +++ b/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Database: for<'r> HasValueRef<'r, Database = Self> {} diff --git a/tests/ui/generic-associated-types/impl_bounds_ok.rs b/tests/ui/generic-associated-types/impl_bounds_ok.rs index 88f829ea25a5e..b6ea754a65272 100644 --- a/tests/ui/generic-associated-types/impl_bounds_ok.rs +++ b/tests/ui/generic-associated-types/impl_bounds_ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/issue-102114.rs b/tests/ui/generic-associated-types/issue-102114.rs index bb6369d7f8ff3..58518f3f59ab3 100644 --- a/tests/ui/generic-associated-types/issue-102114.rs +++ b/tests/ui/generic-associated-types/issue-102114.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver trait A { type B<'b>; diff --git a/tests/ui/generic-associated-types/issue-102333.rs b/tests/ui/generic-associated-types/issue-102333.rs index 6c72563322f55..809b2ad07fe87 100644 --- a/tests/ui/generic-associated-types/issue-102333.rs +++ b/tests/ui/generic-associated-types/issue-102333.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type T: B = ()>; diff --git a/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs b/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs index 625ccfe89e09f..a1c3b35c2e7ca 100644 --- a/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs +++ b/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Cert { type PublicKey<'a>: From<&'a [u8]>; diff --git a/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs b/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs index c1140bff82bae..b8b8168e4df97 100644 --- a/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs +++ b/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Iterator { type Item<'a>: 'a; diff --git a/tests/ui/generic-associated-types/issue-67424.rs b/tests/ui/generic-associated-types/issue-67424.rs index b6c7c70cd8318..24cce228ed37a 100644 --- a/tests/ui/generic-associated-types/issue-67424.rs +++ b/tests/ui/generic-associated-types/issue-67424.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Fixed by #67160 trait Trait1 { diff --git a/tests/ui/generic-associated-types/issue-67510-pass.rs b/tests/ui/generic-associated-types/issue-67510-pass.rs index 66ce3e807a150..1596f401bbcba 100644 --- a/tests/ui/generic-associated-types/issue-67510-pass.rs +++ b/tests/ui/generic-associated-types/issue-67510-pass.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-68648-1.rs b/tests/ui/generic-associated-types/issue-68648-1.rs index 0df41bab32728..9e0d46f876526 100644 --- a/tests/ui/generic-associated-types/issue-68648-1.rs +++ b/tests/ui/generic-associated-types/issue-68648-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Fun { type F<'a>; diff --git a/tests/ui/generic-associated-types/issue-68649-pass.rs b/tests/ui/generic-associated-types/issue-68649-pass.rs index 7727438779549..9e4384b1a54b1 100644 --- a/tests/ui/generic-associated-types/issue-68649-pass.rs +++ b/tests/ui/generic-associated-types/issue-68649-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Fun { type F<'a>; diff --git a/tests/ui/generic-associated-types/issue-68653.rs b/tests/ui/generic-associated-types/issue-68653.rs index 170b87cf25281..318eafe74f7f9 100644 --- a/tests/ui/generic-associated-types/issue-68653.rs +++ b/tests/ui/generic-associated-types/issue-68653.rs @@ -1,6 +1,6 @@ // A regression test for #68653, which was fixed by #68938. -// check-pass +//@ check-pass trait Fun { type F<'a: 'a>; diff --git a/tests/ui/generic-associated-types/issue-70303.rs b/tests/ui/generic-associated-types/issue-70303.rs index 0edff5e4e3390..fc88682c3c66e 100644 --- a/tests/ui/generic-associated-types/issue-70303.rs +++ b/tests/ui/generic-associated-types/issue-70303.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Document { type Cursor<'a>: DocCursor<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-76407.rs b/tests/ui/generic-associated-types/issue-76407.rs index 9556ec6da2537..d610aa075ae2f 100644 --- a/tests/ui/generic-associated-types/issue-76407.rs +++ b/tests/ui/generic-associated-types/issue-76407.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Marker {} diff --git a/tests/ui/generic-associated-types/issue-76535.rs b/tests/ui/generic-associated-types/issue-76535.rs index 2457a05a06729..cf26b65c85f28 100644 --- a/tests/ui/generic-associated-types/issue-76535.rs +++ b/tests/ui/generic-associated-types/issue-76535.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-76826.rs b/tests/ui/generic-associated-types/issue-76826.rs index ead78453ecfe3..1274ad23be01f 100644 --- a/tests/ui/generic-associated-types/issue-76826.rs +++ b/tests/ui/generic-associated-types/issue-76826.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Iter { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs b/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs index fd3b967d9d77f..1c94067029daf 100644 --- a/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs +++ b/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs @@ -1,6 +1,6 @@ // Test for diagnostics when we have mismatched lifetime due to implicit 'static lifetime in GATs -// check-fail +//@ check-fail pub trait A {} impl A for &dyn A {} diff --git a/tests/ui/generic-associated-types/issue-78671.rs b/tests/ui/generic-associated-types/issue-78671.rs index 327b0c14ae864..ce4c040644a2f 100644 --- a/tests/ui/generic-associated-types/issue-78671.rs +++ b/tests/ui/generic-associated-types/issue-78671.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-79422.rs b/tests/ui/generic-associated-types/issue-79422.rs index a52dd792dda26..bf61dcaee3a52 100644 --- a/tests/ui/generic-associated-types/issue-79422.rs +++ b/tests/ui/generic-associated-types/issue-79422.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-80433-reduced.rs b/tests/ui/generic-associated-types/issue-80433-reduced.rs index 44831a995c66e..db169c8be0ad6 100644 --- a/tests/ui/generic-associated-types/issue-80433-reduced.rs +++ b/tests/ui/generic-associated-types/issue-80433-reduced.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct E {} diff --git a/tests/ui/generic-associated-types/issue-81487.rs b/tests/ui/generic-associated-types/issue-81487.rs index 0d19a75bb7ff9..f1108e8bc4343 100644 --- a/tests/ui/generic-associated-types/issue-81487.rs +++ b/tests/ui/generic-associated-types/issue-81487.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Trait { type Ref<'a>; diff --git a/tests/ui/generic-associated-types/issue-84931.rs b/tests/ui/generic-associated-types/issue-84931.rs index 2ef990a7a9072..ed3d564c94886 100644 --- a/tests/ui/generic-associated-types/issue-84931.rs +++ b/tests/ui/generic-associated-types/issue-84931.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait StreamingIter { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-85921.rs b/tests/ui/generic-associated-types/issue-85921.rs index d281ed9eedbcb..293ce7b816a6b 100644 --- a/tests/ui/generic-associated-types/issue-85921.rs +++ b/tests/ui/generic-associated-types/issue-85921.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc<'a>; diff --git a/tests/ui/generic-associated-types/issue-86218-2.rs b/tests/ui/generic-associated-types/issue-86218-2.rs index 8a5e4a0f3cc39..7066e0a211fc6 100644 --- a/tests/ui/generic-associated-types/issue-86218-2.rs +++ b/tests/ui/generic-associated-types/issue-86218-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-86218.rs b/tests/ui/generic-associated-types/issue-86218.rs index 397a0f2c64903..dba9a498a1d6f 100644 --- a/tests/ui/generic-associated-types/issue-86218.rs +++ b/tests/ui/generic-associated-types/issue-86218.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-86483.rs b/tests/ui/generic-associated-types/issue-86483.rs index 70267637ae9d6..82ef17ca6c9ee 100644 --- a/tests/ui/generic-associated-types/issue-86483.rs +++ b/tests/ui/generic-associated-types/issue-86483.rs @@ -2,7 +2,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass pub trait IceIce where diff --git a/tests/ui/generic-associated-types/issue-86787.rs b/tests/ui/generic-associated-types/issue-86787.rs index 5edd0a9f02f42..88cdd472696bd 100644 --- a/tests/ui/generic-associated-types/issue-86787.rs +++ b/tests/ui/generic-associated-types/issue-86787.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail enum Either { Left(L), diff --git a/tests/ui/generic-associated-types/issue-87429-2.rs b/tests/ui/generic-associated-types/issue-87429-2.rs index feb43ee5aa4ad..31d6d6e554b04 100644 --- a/tests/ui/generic-associated-types/issue-87429-2.rs +++ b/tests/ui/generic-associated-types/issue-87429-2.rs @@ -2,7 +2,7 @@ // predicates in the param env when checking that an associated type satisfies // its bounds does not cause us to not be able to use the bounds on the parameters. -// check-pass +//@ check-pass trait Family { type Member<'a, C: Eq>: for<'b> MyBound<'b, C>; diff --git a/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs b/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs index 2006f9bc74dfe..db4af2f7ed3d6 100644 --- a/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs +++ b/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/issue-87429-specialization.rs b/tests/ui/generic-associated-types/issue-87429-specialization.rs index 6e31f1b21e5c9..87e91162a8630 100644 --- a/tests/ui/generic-associated-types/issue-87429-specialization.rs +++ b/tests/ui/generic-associated-types/issue-87429-specialization.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(specialization)] //~^ WARN incomplete diff --git a/tests/ui/generic-associated-types/issue-87429.rs b/tests/ui/generic-associated-types/issue-87429.rs index 56394823cc519..ccb43fc88f3a9 100644 --- a/tests/ui/generic-associated-types/issue-87429.rs +++ b/tests/ui/generic-associated-types/issue-87429.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Family { type Member<'a>: for<'b> PartialEq>; diff --git a/tests/ui/generic-associated-types/issue-87748.rs b/tests/ui/generic-associated-types/issue-87748.rs index 6cbe3d9022330..384b0ae40e3fd 100644 --- a/tests/ui/generic-associated-types/issue-87748.rs +++ b/tests/ui/generic-associated-types/issue-87748.rs @@ -1,7 +1,7 @@ // Checks that we properly add implied bounds from unnormalized projections in // inputs when typechecking functions. -// check-pass +//@ check-pass trait MyTrait { type Assoc<'a, 'b> where 'b: 'a; diff --git a/tests/ui/generic-associated-types/issue-87750.rs b/tests/ui/generic-associated-types/issue-87750.rs index b35657989efb9..927083605294c 100644 --- a/tests/ui/generic-associated-types/issue-87750.rs +++ b/tests/ui/generic-associated-types/issue-87750.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait PointerFamily { type Pointer; diff --git a/tests/ui/generic-associated-types/issue-88287.rs b/tests/ui/generic-associated-types/issue-88287.rs index 82188493d52bd..5d64ad8eeae0c 100644 --- a/tests/ui/generic-associated-types/issue-88287.rs +++ b/tests/ui/generic-associated-types/issue-88287.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/generic-associated-types/issue-88360.fixed b/tests/ui/generic-associated-types/issue-88360.fixed index 6fb1e2559c0ac..2ebc459f19745 100644 --- a/tests/ui/generic-associated-types/issue-88360.fixed +++ b/tests/ui/generic-associated-types/issue-88360.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait GatTrait { diff --git a/tests/ui/generic-associated-types/issue-88360.rs b/tests/ui/generic-associated-types/issue-88360.rs index c8f07955b6129..011061dd86136 100644 --- a/tests/ui/generic-associated-types/issue-88360.rs +++ b/tests/ui/generic-associated-types/issue-88360.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait GatTrait { diff --git a/tests/ui/generic-associated-types/issue-88405.rs b/tests/ui/generic-associated-types/issue-88405.rs index 8dad6a89fd05d..ec775c6748fa7 100644 --- a/tests/ui/generic-associated-types/issue-88405.rs +++ b/tests/ui/generic-associated-types/issue-88405.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait SomeTrait {} trait OtherTrait { diff --git a/tests/ui/generic-associated-types/issue-88459.rs b/tests/ui/generic-associated-types/issue-88459.rs index 07d7bc06d08ef..776e0f95d09c2 100644 --- a/tests/ui/generic-associated-types/issue-88459.rs +++ b/tests/ui/generic-associated-types/issue-88459.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc<'a>; diff --git a/tests/ui/generic-associated-types/issue-89008.rs b/tests/ui/generic-associated-types/issue-89008.rs index 94b07e674e824..30457f2ed1595 100644 --- a/tests/ui/generic-associated-types/issue-89008.rs +++ b/tests/ui/generic-associated-types/issue-89008.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-89352.rs b/tests/ui/generic-associated-types/issue-89352.rs index 1896d0c87f4ce..5e65d0888d324 100644 --- a/tests/ui/generic-associated-types/issue-89352.rs +++ b/tests/ui/generic-associated-types/issue-89352.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-90014-tait.rs b/tests/ui/generic-associated-types/issue-90014-tait.rs index 1ce5cd3198767..69738aac0a5ce 100644 --- a/tests/ui/generic-associated-types/issue-90014-tait.rs +++ b/tests/ui/generic-associated-types/issue-90014-tait.rs @@ -1,8 +1,8 @@ //! This test is reporting the wrong error. We need //! more inherent associated type tests that use opaque types //! in general. Some variant of this test should compile successfully. -// known-bug: unknown -// edition:2018 +//@ known-bug: unknown +//@ edition:2018 #![feature(impl_trait_in_assoc_type, inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-associated-types/issue-90014-tait2.rs b/tests/ui/generic-associated-types/issue-90014-tait2.rs index 7fb14eddc2c40..4ba32011c0d64 100644 --- a/tests/ui/generic-associated-types/issue-90014-tait2.rs +++ b/tests/ui/generic-associated-types/issue-90014-tait2.rs @@ -2,8 +2,8 @@ //! without respecting its binders (which would ICE). //! Unfortunately we don't even reach opaque type collection, as we ICE in typeck before that. //! See #109281 for the original report. -// edition:2018 -// error-pattern: expected generic lifetime parameter, found `'a` +//@ edition:2018 +//@ error-pattern: expected generic lifetime parameter, found `'a` #![feature(type_alias_impl_trait)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-associated-types/issue-90014.rs b/tests/ui/generic-associated-types/issue-90014.rs index c4d762796e2de..6a66a0c60c6d6 100644 --- a/tests/ui/generic-associated-types/issue-90014.rs +++ b/tests/ui/generic-associated-types/issue-90014.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-90729.rs b/tests/ui/generic-associated-types/issue-90729.rs index bcec2e32121d1..7e9980a1be4f5 100644 --- a/tests/ui/generic-associated-types/issue-90729.rs +++ b/tests/ui/generic-associated-types/issue-90729.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-92096.rs b/tests/ui/generic-associated-types/issue-92096.rs index e285af6660ec3..a34c41795849e 100644 --- a/tests/ui/generic-associated-types/issue-92096.rs +++ b/tests/ui/generic-associated-types/issue-92096.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/generic-associated-types/issue-92280.rs b/tests/ui/generic-associated-types/issue-92280.rs index 9284beea33e5d..8a7eba0d2de3c 100644 --- a/tests/ui/generic-associated-types/issue-92280.rs +++ b/tests/ui/generic-associated-types/issue-92280.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generic-associated-types/issue-92954.rs b/tests/ui/generic-associated-types/issue-92954.rs index 22ce8f9fe3b80..926ebd897eb69 100644 --- a/tests/ui/generic-associated-types/issue-92954.rs +++ b/tests/ui/generic-associated-types/issue-92954.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Assoc<'c>; diff --git a/tests/ui/generic-associated-types/issue-93141.rs b/tests/ui/generic-associated-types/issue-93141.rs index 48c78b9c06760..9472402bce3a3 100644 --- a/tests/ui/generic-associated-types/issue-93141.rs +++ b/tests/ui/generic-associated-types/issue-93141.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Fooey: Sized { type Context<'c> where Self: 'c; diff --git a/tests/ui/generic-associated-types/issue-93262.rs b/tests/ui/generic-associated-types/issue-93262.rs index a7bcd111dfff0..c4a6f0dbaa073 100644 --- a/tests/ui/generic-associated-types/issue-93262.rs +++ b/tests/ui/generic-associated-types/issue-93262.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait { type Assoc<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-93340.rs b/tests/ui/generic-associated-types/issue-93340.rs index 4662fda537b5f..783f8c06ebfdf 100644 --- a/tests/ui/generic-associated-types/issue-93340.rs +++ b/tests/ui/generic-associated-types/issue-93340.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Scalar: 'static { type RefType<'a>: ScalarRef<'a>; diff --git a/tests/ui/generic-associated-types/issue-93341.rs b/tests/ui/generic-associated-types/issue-93341.rs index 737b2bbdb245a..234ce8349ce18 100644 --- a/tests/ui/generic-associated-types/issue-93341.rs +++ b/tests/ui/generic-associated-types/issue-93341.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-93342.rs b/tests/ui/generic-associated-types/issue-93342.rs index d4422d5d1d723..86aa016c40402 100644 --- a/tests/ui/generic-associated-types/issue-93342.rs +++ b/tests/ui/generic-associated-types/issue-93342.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-93874.rs b/tests/ui/generic-associated-types/issue-93874.rs index 30956655ad409..a0e6ef3818ddb 100644 --- a/tests/ui/generic-associated-types/issue-93874.rs +++ b/tests/ui/generic-associated-types/issue-93874.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Build { type Output; diff --git a/tests/ui/generic-associated-types/iterable.rs b/tests/ui/generic-associated-types/iterable.rs index 8ad351bd343cc..980070e580d60 100644 --- a/tests/ui/generic-associated-types/iterable.rs +++ b/tests/ui/generic-associated-types/iterable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Iterable { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/missing-bounds.fixed b/tests/ui/generic-associated-types/missing-bounds.fixed index 054adbffbeafb..703d3c1e0fb17 100644 --- a/tests/ui/generic-associated-types/missing-bounds.fixed +++ b/tests/ui/generic-associated-types/missing-bounds.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Add; diff --git a/tests/ui/generic-associated-types/missing-bounds.rs b/tests/ui/generic-associated-types/missing-bounds.rs index ffafff5e9f586..f40b422887311 100644 --- a/tests/ui/generic-associated-types/missing-bounds.rs +++ b/tests/ui/generic-associated-types/missing-bounds.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Add; diff --git a/tests/ui/generic-associated-types/missing-item-sugg.rs b/tests/ui/generic-associated-types/missing-item-sugg.rs index 35d573d818846..b9266f6f8327a 100644 --- a/tests/ui/generic-associated-types/missing-item-sugg.rs +++ b/tests/ui/generic-associated-types/missing-item-sugg.rs @@ -1,4 +1,4 @@ -// aux-build:missing-item-sugg.rs +//@ aux-build:missing-item-sugg.rs extern crate missing_item_sugg; diff --git a/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs b/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs index de9cad308014d..c8a9246631107 100644 --- a/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs +++ b/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Foo { type Assoc<'a, 'b>; diff --git a/tests/ui/generic-associated-types/parse/in-trait-impl.rs b/tests/ui/generic-associated-types/parse/in-trait-impl.rs index 767098835c484..5ba42be358312 100644 --- a/tests/ui/generic-associated-types/parse/in-trait-impl.rs +++ b/tests/ui/generic-associated-types/parse/in-trait-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only impl Baz for T where T: Foo { type Quux<'a> = ::Bar<'a, 'static>; diff --git a/tests/ui/generic-associated-types/parse/in-trait.rs b/tests/ui/generic-associated-types/parse/in-trait.rs index 6628aac374304..913eceec0dacf 100644 --- a/tests/ui/generic-associated-types/parse/in-trait.rs +++ b/tests/ui/generic-associated-types/parse/in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only use std::ops::Deref; use std::fmt::Debug; diff --git a/tests/ui/generic-associated-types/pointer_family.rs b/tests/ui/generic-associated-types/pointer_family.rs index 80827cd567b4b..17c2b249e1525 100644 --- a/tests/ui/generic-associated-types/pointer_family.rs +++ b/tests/ui/generic-associated-types/pointer_family.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/generic-associated-types/self-outlives-lint.rs b/tests/ui/generic-associated-types/self-outlives-lint.rs index 0ea81b5aecb9e..699b3a8c5092d 100644 --- a/tests/ui/generic-associated-types/self-outlives-lint.rs +++ b/tests/ui/generic-associated-types/self-outlives-lint.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::fmt::Debug; diff --git a/tests/ui/generic-associated-types/streaming_iterator.rs b/tests/ui/generic-associated-types/streaming_iterator.rs index 656fb743ee432..619bffb112e57 100644 --- a/tests/ui/generic-associated-types/streaming_iterator.rs +++ b/tests/ui/generic-associated-types/streaming_iterator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/generic-associated-types/trait-objects.rs b/tests/ui/generic-associated-types/trait-objects.rs index 674bee919bfe1..277ffcc1f0dd3 100644 --- a/tests/ui/generic-associated-types/trait-objects.rs +++ b/tests/ui/generic-associated-types/trait-objects.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/variance_constraints.rs b/tests/ui/generic-associated-types/variance_constraints.rs index 0e9dbb8b1becb..c575e99449f0c 100644 --- a/tests/ui/generic-associated-types/variance_constraints.rs +++ b/tests/ui/generic-associated-types/variance_constraints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue #69184 trait A { diff --git a/tests/ui/generic-const-items/associated-const-equality.rs b/tests/ui/generic-const-items/associated-const-equality.rs index 785d3aa5018ca..3c727097e2b1c 100644 --- a/tests/ui/generic-const-items/associated-const-equality.rs +++ b/tests/ui/generic-const-items/associated-const-equality.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_items, associated_const_equality)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-const-items/basic.rs b/tests/ui/generic-const-items/basic.rs index 73bfa803acd2c..31a404bac88d0 100644 --- a/tests/ui/generic-const-items/basic.rs +++ b/tests/ui/generic-const-items/basic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Basic usage patterns of free & associated generic const items. diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs index 04c3f3eb4340f..34be9fe601400 100644 --- a/tests/ui/generic-const-items/const-trait-impl.rs +++ b/tests/ui/generic-const-items/const-trait-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we can call methods from const trait impls inside of generic const items. diff --git a/tests/ui/generic-const-items/evaluatable-bounds.rs b/tests/ui/generic-const-items/evaluatable-bounds.rs index cdcfcf9188a6e..1a858f4199923 100644 --- a/tests/ui/generic-const-items/evaluatable-bounds.rs +++ b/tests/ui/generic-const-items/evaluatable-bounds.rs @@ -1,7 +1,7 @@ // This is a regression test for issue #104400. -// revisions: unconstrained constrained -//[constrained] check-pass +//@ revisions: unconstrained constrained +//@[constrained] check-pass // Test that we can constrain generic const items that appear inside associated consts by // adding a (makeshift) "evaluatable"-bound to the item. diff --git a/tests/ui/generic-const-items/misplaced-where-clause.fixed b/tests/ui/generic-const-items/misplaced-where-clause.fixed index bff470c288325..078df15a5b707 100644 --- a/tests/ui/generic-const-items/misplaced-where-clause.fixed +++ b/tests/ui/generic-const-items/misplaced-where-clause.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] diff --git a/tests/ui/generic-const-items/misplaced-where-clause.rs b/tests/ui/generic-const-items/misplaced-where-clause.rs index b14c6d594a526..f742738a30488 100644 --- a/tests/ui/generic-const-items/misplaced-where-clause.rs +++ b/tests/ui/generic-const-items/misplaced-where-clause.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] diff --git a/tests/ui/generic-const-items/recursive.rs b/tests/ui/generic-const-items/recursive.rs index 3266b37d38092..8244772168b34 100644 --- a/tests/ui/generic-const-items/recursive.rs +++ b/tests/ui/generic-const-items/recursive.rs @@ -1,6 +1,6 @@ // FIXME(generic_const_items): This leads to a stack overflow in the compiler! -// known-bug: unknown -// ignore-test +//@ known-bug: unknown +//@ ignore-test #![feature(generic_const_items)] #![allow(incomplete_features)] diff --git a/tests/ui/generics/autobind.rs b/tests/ui/generics/autobind.rs index 70606a2a200de..7b691f0b69c80 100644 --- a/tests/ui/generics/autobind.rs +++ b/tests/ui/generics/autobind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Vec) -> T { return x.into_iter().next().unwrap(); } diff --git a/tests/ui/generics/foreign-generic-mismatch.rs b/tests/ui/generics/foreign-generic-mismatch.rs index 403fd73d7df93..3543e3dae42c9 100644 --- a/tests/ui/generics/foreign-generic-mismatch.rs +++ b/tests/ui/generics/foreign-generic-mismatch.rs @@ -1,4 +1,4 @@ -// aux-build: foreign-generic-mismatch.rs +//@ aux-build: foreign-generic-mismatch.rs extern crate foreign_generic_mismatch; diff --git a/tests/ui/generics/generic-alias-unique.rs b/tests/ui/generics/generic-alias-unique.rs index fc138398634d5..571907ea411a0 100644 --- a/tests/ui/generics/generic-alias-unique.rs +++ b/tests/ui/generics/generic-alias-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn id(t: T) -> T { return t; } diff --git a/tests/ui/generics/generic-default-type-params-cross-crate.rs b/tests/ui/generics/generic-default-type-params-cross-crate.rs index f798901132bea..7da61572501ac 100644 --- a/tests/ui/generics/generic-default-type-params-cross-crate.rs +++ b/tests/ui/generics/generic-default-type-params-cross-crate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:default_type_params_xc.rs +//@ run-pass +//@ aux-build:default_type_params_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate default_type_params_xc; diff --git a/tests/ui/generics/generic-default-type-params.rs b/tests/ui/generics/generic-default-type-params.rs index afdd301fde99c..10f6c667fda00 100644 --- a/tests/ui/generics/generic-default-type-params.rs +++ b/tests/ui/generics/generic-default-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { a: A } diff --git a/tests/ui/generics/generic-derived-type.rs b/tests/ui/generics/generic-derived-type.rs index c643496fa7f62..94a84f7bd3edb 100644 --- a/tests/ui/generics/generic-derived-type.rs +++ b/tests/ui/generics/generic-derived-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn g(x: X) -> X { return x; } #[derive(Clone)] diff --git a/tests/ui/generics/generic-exterior-unique.rs b/tests/ui/generics/generic-exterior-unique.rs index 10d87f9f43d0d..e5e3e24ae9474 100644 --- a/tests/ui/generics/generic-exterior-unique.rs +++ b/tests/ui/generics/generic-exterior-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Recbox {x: Box} diff --git a/tests/ui/generics/generic-extern-mangle.rs b/tests/ui/generics/generic-extern-mangle.rs index 985a6f39cd7ab..80bb3217b5bbd 100644 --- a/tests/ui/generics/generic-extern-mangle.rs +++ b/tests/ui/generics/generic-extern-mangle.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; extern "C" fn foo(a: T, b: T) -> T::Output { a + b } diff --git a/tests/ui/generics/generic-fn-infer.rs b/tests/ui/generics/generic-fn-infer.rs index 9ba4224732b44..a335fbd328994 100644 --- a/tests/ui/generics/generic-fn-infer.rs +++ b/tests/ui/generics/generic-fn-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/generics/generic-fn-twice.rs b/tests/ui/generics/generic-fn-twice.rs index 2f25fc24ced0b..f9e08401c6d4c 100644 --- a/tests/ui/generics/generic-fn-twice.rs +++ b/tests/ui/generics/generic-fn-twice.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foomod { pub fn foo() { } diff --git a/tests/ui/generics/generic-fn-unique.rs b/tests/ui/generics/generic-fn-unique.rs index 7e246bce9a10c..695ffdfd618e5 100644 --- a/tests/ui/generics/generic-fn-unique.rs +++ b/tests/ui/generics/generic-fn-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Box) -> Box { return x; } diff --git a/tests/ui/generics/generic-fn.rs b/tests/ui/generics/generic-fn.rs index 8038fabc1ced8..55abea62e3b72 100644 --- a/tests/ui/generics/generic-fn.rs +++ b/tests/ui/generics/generic-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/generics/generic-ivec-leak.rs b/tests/ui/generics/generic-ivec-leak.rs index 7a1d10a646dfc..1150b7f1c835d 100644 --- a/tests/ui/generics/generic-ivec-leak.rs +++ b/tests/ui/generics/generic-ivec-leak.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 92523b76f98d6..a1d539c8c22e2 100644 --- a/tests/ui/generics/generic-newtype-struct.rs +++ b/tests/ui/generics/generic-newtype-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct S(#[allow(dead_code)] T); diff --git a/tests/ui/generics/generic-no-mangle.fixed b/tests/ui/generics/generic-no-mangle.fixed index f51040358c0b3..f20ea0edaa69f 100644 --- a/tests/ui/generics/generic-no-mangle.fixed +++ b/tests/ui/generics/generic-no-mangle.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(no_mangle_generic_items)] diff --git a/tests/ui/generics/generic-no-mangle.rs b/tests/ui/generics/generic-no-mangle.rs index 02015331c5712..2288b5bbe70df 100644 --- a/tests/ui/generics/generic-no-mangle.rs +++ b/tests/ui/generics/generic-no-mangle.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(no_mangle_generic_items)] diff --git a/tests/ui/generics/generic-object.rs b/tests/ui/generics/generic-object.rs index 851424a11b5c1..ec04722f9c9fb 100644 --- a/tests/ui/generics/generic-object.rs +++ b/tests/ui/generics/generic-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn get(&self) -> T; diff --git a/tests/ui/generics/generic-param-attrs.rs b/tests/ui/generics/generic-param-attrs.rs index 3c5cc84c6a6ac..ccc8713273255 100644 --- a/tests/ui/generics/generic-param-attrs.rs +++ b/tests/ui/generics/generic-param-attrs.rs @@ -1,7 +1,7 @@ // This test previously ensured that attributes on formals in generic parameter // lists are rejected without a feature gate. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/generics/generic-recursive-tag.rs b/tests/ui/generics/generic-recursive-tag.rs index 5490822975a79..b5c3f6c2de8ad 100644 --- a/tests/ui/generics/generic-recursive-tag.rs +++ b/tests/ui/generics/generic-recursive-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum list { #[allow(dead_code)] cons(Box, Box>), nil, } diff --git a/tests/ui/generics/generic-static-methods.rs b/tests/ui/generics/generic-static-methods.rs index b39fa081a65cb..8d902cc4b1bb0 100644 --- a/tests/ui/generics/generic-static-methods.rs +++ b/tests/ui/generics/generic-static-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag-corruption.rs b/tests/ui/generics/generic-tag-corruption.rs index ae20a94d9fde6..78fdfe4ac7f2c 100644 --- a/tests/ui/generics/generic-tag-corruption.rs +++ b/tests/ui/generics/generic-tag-corruption.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // This used to cause memory corruption in stage 0. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum thing { some(#[allow(dead_code)] K), } diff --git a/tests/ui/generics/generic-tag-local.rs b/tests/ui/generics/generic-tag-local.rs index 121ec74f8b72d..e7c394efa0922 100644 --- a/tests/ui/generics/generic-tag-local.rs +++ b/tests/ui/generics/generic-tag-local.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(#[allow(dead_code)] T), } diff --git a/tests/ui/generics/generic-tag-match.rs b/tests/ui/generics/generic-tag-match.rs index 09ed6a808e6ca..dd0291e9d8736 100644 --- a/tests/ui/generics/generic-tag-match.rs +++ b/tests/ui/generics/generic-tag-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag-values.rs b/tests/ui/generics/generic-tag-values.rs index 230f477b6e9a3..dace5ab34655d 100644 --- a/tests/ui/generics/generic-tag-values.rs +++ b/tests/ui/generics/generic-tag-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum noption { some(T), } diff --git a/tests/ui/generics/generic-tag.rs b/tests/ui/generics/generic-tag.rs index 9e844c72552b3..cb46c3155a305 100644 --- a/tests/ui/generics/generic-tag.rs +++ b/tests/ui/generics/generic-tag.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/generics/generic-temporary.rs b/tests/ui/generics/generic-temporary.rs index b63b534d03f12..6b3d258a2d297 100644 --- a/tests/ui/generics/generic-temporary.rs +++ b/tests/ui/generics/generic-temporary.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mk() -> isize { return 1; } diff --git a/tests/ui/generics/generic-tup.rs b/tests/ui/generics/generic-tup.rs index 79ebd648cd45a..905c88442025c 100644 --- a/tests/ui/generics/generic-tup.rs +++ b/tests/ui/generics/generic-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn get_third(t: (T, T, T)) -> T { let (_, _, x) = t; return x; } pub fn main() { diff --git a/tests/ui/generics/generic-type-synonym.rs b/tests/ui/generics/generic-type-synonym.rs index 4f181fbcc7e38..879bd91cab50e 100644 --- a/tests/ui/generics/generic-type-synonym.rs +++ b/tests/ui/generics/generic-type-synonym.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { a: T diff --git a/tests/ui/generics/generic-type.rs b/tests/ui/generics/generic-type.rs index aa46db07eee8c..3640fb891de8a 100644 --- a/tests/ui/generics/generic-type.rs +++ b/tests/ui/generics/generic-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/generics/generic-unique.rs b/tests/ui/generics/generic-unique.rs index 2f34712ecfbf3..0976d7f1518d0 100644 --- a/tests/ui/generics/generic-unique.rs +++ b/tests/ui/generics/generic-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple { x: T, y: T, z: T } diff --git a/tests/ui/generics/issue-1112.rs b/tests/ui/generics/issue-1112.rs index 3ba7bb217084c..bf35b28bd4ef8 100644 --- a/tests/ui/generics/issue-1112.rs +++ b/tests/ui/generics/issue-1112.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #1112 // Alignment of interior pointers to dynamic-size types diff --git a/tests/ui/generics/issue-2936.rs b/tests/ui/generics/issue-2936.rs index 6b932d01d55df..3874a4d0c5eb3 100644 --- a/tests/ui/generics/issue-2936.rs +++ b/tests/ui/generics/issue-2936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait bar { diff --git a/tests/ui/generics/issue-32498.rs b/tests/ui/generics/issue-32498.rs index 1b54401097ea9..b7685ac733605 100644 --- a/tests/ui/generics/issue-32498.rs +++ b/tests/ui/generics/issue-32498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Making sure that no overflow occurs. diff --git a/tests/ui/generics/issue-333.rs b/tests/ui/generics/issue-333.rs index 0753aaa079784..9f6d84a55f890 100644 --- a/tests/ui/generics/issue-333.rs +++ b/tests/ui/generics/issue-333.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn quux(x: T) -> T { let f = id::; return f(x); } diff --git a/tests/ui/generics/issue-59508.fixed b/tests/ui/generics/issue-59508.fixed index de8f47d4cff89..ad0b545250f1a 100644 --- a/tests/ui/generics/issue-59508.fixed +++ b/tests/ui/generics/issue-59508.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/generics/issue-59508.rs b/tests/ui/generics/issue-59508.rs index a4c7d4ff26266..f7e670865e303 100644 --- a/tests/ui/generics/issue-59508.rs +++ b/tests/ui/generics/issue-59508.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/generics/issue-94432-garbage-ice.rs b/tests/ui/generics/issue-94432-garbage-ice.rs index 4ddb3a7e9f86b..7ecf510334b02 100644 --- a/tests/ui/generics/issue-94432-garbage-ice.rs +++ b/tests/ui/generics/issue-94432-garbage-ice.rs @@ -1,6 +1,6 @@ -// check-fail -// dont-check-compiler-stdout -// dont-check-compiler-stderr +//@ check-fail +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr fn�a(){fn�p(){e}} //~ ERROR unknown start of token: \u{fffd} //~^ ERROR unknown start of token: \u{fffd} diff --git a/tests/ui/generics/issue-94923.rs b/tests/ui/generics/issue-94923.rs index 893bac0d5e8da..686725dfe3ba6 100644 --- a/tests/ui/generics/issue-94923.rs +++ b/tests/ui/generics/issue-94923.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // regression test for issue #94923 -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 fn f0(mut x: usize) -> usize { for _ in 0..1000 { diff --git a/tests/ui/generics/issue-95208-ignore-qself.fixed b/tests/ui/generics/issue-95208-ignore-qself.fixed index 608b4a20fbc86..0c5bffd974636 100644 --- a/tests/ui/generics/issue-95208-ignore-qself.fixed +++ b/tests/ui/generics/issue-95208-ignore-qself.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208-ignore-qself.rs b/tests/ui/generics/issue-95208-ignore-qself.rs index da7efd576d1cf..f294ae1d6ac93 100644 --- a/tests/ui/generics/issue-95208-ignore-qself.rs +++ b/tests/ui/generics/issue-95208-ignore-qself.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208.fixed b/tests/ui/generics/issue-95208.fixed index a0b1e886ca268..cd9286011e5e4 100644 --- a/tests/ui/generics/issue-95208.fixed +++ b/tests/ui/generics/issue-95208.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208.rs b/tests/ui/generics/issue-95208.rs index 0e3083484ff15..9dd12e3a0cae7 100644 --- a/tests/ui/generics/issue-95208.rs +++ b/tests/ui/generics/issue-95208.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/mid-path-type-params.rs b/tests/ui/generics/mid-path-type-params.rs index a8128207c808c..f7dbd7890793c 100644 --- a/tests/ui/generics/mid-path-type-params.rs +++ b/tests/ui/generics/mid-path-type-params.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S { contents: T, diff --git a/tests/ui/generics/post_monomorphization_error_backtrace.rs b/tests/ui/generics/post_monomorphization_error_backtrace.rs index a1316688075d1..56155ae2bd5f5 100644 --- a/tests/ui/generics/post_monomorphization_error_backtrace.rs +++ b/tests/ui/generics/post_monomorphization_error_backtrace.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn assert_zst() { struct F(T); diff --git a/tests/ui/generics/type-params-in-for-each.rs b/tests/ui/generics/type-params-in-for-each.rs index 53475d2804794..e98f7bbb66bc7 100644 --- a/tests/ui/generics/type-params-in-for-each.rs +++ b/tests/ui/generics/type-params-in-for-each.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S { a: T, diff --git a/tests/ui/global-scope.rs b/tests/ui/global-scope.rs index 944eee5afc307..33b56bca940a8 100644 --- a/tests/ui/global-scope.rs +++ b/tests/ui/global-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn f() -> isize { return 1; } diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs index 4b7eee134e40c..fe2db67013ecc 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test various exhaustive matches for `X..`, `..=X` and `..X` ranges. diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs index d5af7bea54388..03ff706fe6aef 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test half-open range patterns against their expression equivalents // via `.contains(...)` and make sure the dynamic semantics match. diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs index 9a73e89063f3d..98e8b2b04620a 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test the parsing of half-open ranges. diff --git a/tests/ui/half-open-range-patterns/pat-tuple-4.rs b/tests/ui/half-open-range-patterns/pat-tuple-4.rs index 11c4ab9c5fc74..95aae25ada894 100644 --- a/tests/ui/half-open-range-patterns/pat-tuple-4.rs +++ b/tests/ui/half-open-range-patterns/pat-tuple-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exclusive_range_pattern)] diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs index e6d5e64a15b7a..7a82f9ce89a86 100644 --- a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs +++ b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(exclusive_range_pattern)] #![feature(inline_const_pat)] diff --git a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs index 6e7df30949127..62e67530fc7b1 100644 --- a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs +++ b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let xs = [13, 1, 5, 2, 3, 1, 21, 8]; diff --git a/tests/ui/hashmap/hashmap-capacity-overflow.rs b/tests/ui/hashmap/hashmap-capacity-overflow.rs index 2988af06556d9..91aebc3bbba8b 100644 --- a/tests/ui/hashmap/hashmap-capacity-overflow.rs +++ b/tests/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:capacity overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:capacity overflow +//@ ignore-emscripten no processes use std::collections::hash_map::HashMap; use std::mem::size_of; diff --git a/tests/ui/hashmap/hashmap-memory.rs b/tests/ui/hashmap/hashmap-memory.rs index bd364b349e263..0b1e09f53446c 100644 --- a/tests/ui/hashmap/hashmap-memory.rs +++ b/tests/ui/hashmap/hashmap-memory.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes_definitions)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(unused_mut)] -// ignore-emscripten No support for threads +//@ ignore-emscripten No support for threads /** A somewhat reduced test case to expose some Valgrind issues. diff --git a/tests/ui/hello.rs b/tests/ui/hello.rs index c66b7c60fb4ea..d23cbb6115715 100644 --- a/tests/ui/hello.rs +++ b/tests/ui/hello.rs @@ -1,11 +1,11 @@ -// run-pass -// revisions: e2015 e2018 e2021 e2024 +//@ run-pass +//@ revisions: e2015 e2018 e2021 e2024 -//[e2018] edition:2018 -//[e2021] edition:2021 -//[e2024] edition:2024 +//@[e2018] edition:2018 +//@[e2021] edition:2021 +//@[e2024] edition:2024 -//[e2024] compile-flags: -Zunstable-options +//@[e2024] compile-flags: -Zunstable-options fn main() { println!("hello"); diff --git a/tests/ui/hello_world/main.rs b/tests/ui/hello_world/main.rs index 39cb74b709b72..1b687eb137341 100644 --- a/tests/ui/hello_world/main.rs +++ b/tests/ui/hello_world/main.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Test that compiling hello world succeeds with no output of any kind. diff --git a/tests/ui/higher-ranked/leak-check-in-selection.rs b/tests/ui/higher-ranked/leak-check-in-selection.rs index 5b36902ffdfe8..46a0dccb441ef 100644 --- a/tests/ui/higher-ranked/leak-check-in-selection.rs +++ b/tests/ui/higher-ranked/leak-check-in-selection.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![allow(coherence_leak_check)] trait Trait: Sized { diff --git a/tests/ui/higher-ranked/subtype/hr-subtype.rs b/tests/ui/higher-ranked/subtype/hr-subtype.rs index c770e0de85c08..ed9fe2d602826 100644 --- a/tests/ui/higher-ranked/subtype/hr-subtype.rs +++ b/tests/ui/higher-ranked/subtype/hr-subtype.rs @@ -2,30 +2,30 @@ #![allow(dead_code)] -// revisions: bound_a_vs_bound_a -// revisions: bound_a_vs_bound_b -// revisions: bound_inv_a_vs_bound_inv_b -// revisions: bound_co_a_vs_bound_co_b -// revisions: bound_a_vs_free_x -// revisions: free_x_vs_free_x -// revisions: free_x_vs_free_y -// revisions: free_inv_x_vs_free_inv_y -// revisions: bound_a_b_vs_bound_a -// revisions: bound_co_a_b_vs_bound_co_a -// revisions: bound_contra_a_contra_b_ret_co_a -// revisions: bound_co_a_co_b_ret_contra_a -// revisions: bound_inv_a_b_vs_bound_inv_a -// revisions: bound_a_b_ret_a_vs_bound_a_ret_a +//@ revisions: bound_a_vs_bound_a +//@ revisions: bound_a_vs_bound_b +//@ revisions: bound_inv_a_vs_bound_inv_b +//@ revisions: bound_co_a_vs_bound_co_b +//@ revisions: bound_a_vs_free_x +//@ revisions: free_x_vs_free_x +//@ revisions: free_x_vs_free_y +//@ revisions: free_inv_x_vs_free_inv_y +//@ revisions: bound_a_b_vs_bound_a +//@ revisions: bound_co_a_b_vs_bound_co_a +//@ revisions: bound_contra_a_contra_b_ret_co_a +//@ revisions: bound_co_a_co_b_ret_contra_a +//@ revisions: bound_inv_a_b_vs_bound_inv_a +//@ revisions: bound_a_b_ret_a_vs_bound_a_ret_a -//[bound_a_vs_bound_a] check-pass -//[bound_a_vs_bound_b] check-pass -//[bound_inv_a_vs_bound_inv_b] check-pass -//[bound_co_a_vs_bound_co_b] check-pass -//[free_x_vs_free_x] check-pass -//[bound_co_a_b_vs_bound_co_a] check-pass -//[bound_co_a_co_b_ret_contra_a] check-pass -//[bound_a_b_vs_bound_a] check-pass -//[bound_contra_a_contra_b_ret_co_a] check-pass +//@[bound_a_vs_bound_a] check-pass +//@[bound_a_vs_bound_b] check-pass +//@[bound_inv_a_vs_bound_inv_b] check-pass +//@[bound_co_a_vs_bound_co_b] check-pass +//@[free_x_vs_free_x] check-pass +//@[bound_co_a_b_vs_bound_co_a] check-pass +//@[bound_co_a_co_b_ret_contra_a] check-pass +//@[bound_a_b_vs_bound_a] check-pass +//@[bound_contra_a_contra_b_ret_co_a] check-pass fn gimme(_: Option) {} diff --git a/tests/ui/higher-ranked/subtype/placeholder-pattern.rs b/tests/ui/higher-ranked/subtype/placeholder-pattern.rs index 061e66e54d2f4..ff7028ce9b0b6 100644 --- a/tests/ui/higher-ranked/subtype/placeholder-pattern.rs +++ b/tests/ui/higher-ranked/subtype/placeholder-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that higher ranked subtyping correctly works when using // placeholder patterns. fn hr_subtype<'c>(f: for<'a, 'b> fn(&'a (), &'b ())) { diff --git a/tests/ui/higher-ranked/subtype/return-static.rs b/tests/ui/higher-ranked/subtype/return-static.rs index 6455854f34db8..f1534274c86fa 100644 --- a/tests/ui/higher-ranked/subtype/return-static.rs +++ b/tests/ui/higher-ranked/subtype/return-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn make() -> T { panic!() diff --git a/tests/ui/higher-ranked/trait-bounds/complex.rs b/tests/ui/higher-ranked/trait-bounds/complex.rs index 8cdfe247e025e..3a440bf15ebcd 100644 --- a/tests/ui/higher-ranked/trait-bounds/complex.rs +++ b/tests/ui/higher-ranked/trait-bounds/complex.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A<'a> {} trait B<'b> {} diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs index 41f24dde01adc..e015db1eb641f 100644 --- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs +++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs @@ -1,6 +1,6 @@ -// revisions: classic next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass fn ice() where diff --git a/tests/ui/higher-ranked/trait-bounds/future.rs b/tests/ui/higher-ranked/trait-bounds/future.rs index baeb56e5d78cd..9ee012c05d9da 100644 --- a/tests/ui/higher-ranked/trait-bounds/future.rs +++ b/tests/ui/higher-ranked/trait-bounds/future.rs @@ -1,15 +1,15 @@ // ignore-tidy-linelength -// edition:2021 -// revisions: classic next -//[next] compile-flags: -Znext-solver -//[next] check-pass -//[classic] known-bug: #112347 -//[classic] build-fail -//[classic] failure-status: 101 -//[classic] normalize-stderr-test "note: .*\n\n" -> "" -//[classic] normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> "" -//[classic] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -//[classic] rustc-env:RUST_BACKTRACE=0 +//@ edition:2021 +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass +//@[classic] known-bug: #112347 +//@[classic] build-fail +//@[classic] failure-status: 101 +//@[classic] normalize-stderr-test "note: .*\n\n" -> "" +//@[classic] normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> "" +//@[classic] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@[classic] rustc-env:RUST_BACKTRACE=0 #![feature(unboxed_closures)] diff --git a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs index d34b7a29623cf..a884c94734a74 100644 --- a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs +++ b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" fn id( f: &dyn Fn(u32), diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs index cc766c0605c9f..5dec55d561228 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we handle binder levels in object types correctly. @@ -6,7 +6,7 @@ // `&Typer<'tcx>` was getting an incorrect binder level, yielding // weird compilation ICEs and so forth. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Typer<'tcx> { fn method(&self, data: &'tcx isize) -> &'tcx isize { data } 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 8431226a3ece1..f28b0776fdaf7 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,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Typer<'tcx> { fn method(&self, data: &'tcx isize) -> &'tcx isize { data } diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs index f95496a6c3cc0..230a0524df4d2 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs @@ -3,7 +3,7 @@ // In particular, we test this pattern in trait solving, where it is not connected // to any part of the source code. // -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs index ff84ad9d2988e..4c0fe17035aea 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs index afab9986ce2a3..84af57fb2156f 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs index 04519f1160031..84e44f272270b 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we handle binder levels correctly when checking whether a // type can implement `Copy`. In particular, we had a bug where we failed to // liberate the late-bound regions from the impl, and thus wound up diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs index 1fab9758c5c83..0edddf9423e49 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we can parse all the various places that a `for` keyword // can appear representing universal quantification. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs index 42247798f661b..b49c69d90cf57 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // Test that `F : Fn(isize) -> isize + Send` is interpreted as two // distinct bounds on `F`. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs index 6834c392d4e96..d50fd8cb8f338 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // Test that `Fn(isize) -> isize + 'static` parses as `(Fn(isize) -> isize) + // 'static` and not `Fn(isize) -> (isize + 'static)`. The latter would 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 b97fdf4df508f..4a0b8362d4b04 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A basic test of using a higher-ranked trait bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait FnLike { fn call(&self, arg: A) -> R; diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs index d8c726cdd71e5..756b821eeac64 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. trait FnLike { diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs index 41ebb3f5a14ab..255e5d68e50fc 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that `&PrinterSupport`, which is really short for `&'a // PrinterSupport<'b>`, gets properly expanded when it appears in a // closure type. This used to result in messed up De Bruijn indices. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PrinterSupport<'ast> { fn ast_map(&self) -> Option<&'ast usize> { None } diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs index 88d396101dba2..b89d07ec9cafc 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test what happens when a HR obligation is applied to an impl with diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs index a4a8a5ac6ccbc..403c8b8060159 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test HRTB used with the `Fn` trait. fn foo(f: F) { diff --git a/tests/ui/higher-ranked/trait-bounds/issue-100689.rs b/tests/ui/higher-ranked/trait-bounds/issue-100689.rs index 2db7f8a354cf5..f405abfb2a2ef 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-100689.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-100689.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a> { foo: &'a mut usize, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs index 952b81584f30d..b4ef75319e5c1 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait BufferTrait<'buffer> { type Subset<'channel> diff --git a/tests/ui/higher-ranked/trait-bounds/issue-30786.rs b/tests/ui/higher-ranked/trait-bounds/issue-30786.rs index 4a6399c8f6246..ffb2b306ae76a 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-30786.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-30786.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // rust-lang/rust#30786: the use of `for<'b> &'b mut A: Stream>::Item, causing an error in MIR type // checking diff --git a/tests/ui/higher-ranked/trait-bounds/issue-39292.rs b/tests/ui/higher-ranked/trait-bounds/issue-39292.rs index 968cf08916fd6..5e1795a1e6a13 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-39292.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-39292.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #39292. The object vtable was being // incorrectly left with a null pointer. diff --git a/tests/ui/higher-ranked/trait-bounds/issue-42114.rs b/tests/ui/higher-ranked/trait-bounds/issue-42114.rs index 01515fdc9d2bf..94acd92237321 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-42114.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-42114.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn lifetime<'a>() where diff --git a/tests/ui/higher-ranked/trait-bounds/issue-43623.rs b/tests/ui/higher-ranked/trait-bounds/issue-43623.rs index cedcf7c361c3b..339df5688b0b4 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-43623.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-43623.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type Assoc; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-57639.rs b/tests/ui/higher-ranked/trait-bounds/issue-57639.rs index 392e7233b567a..087b5cea41879 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-57639.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-57639.rs @@ -10,7 +10,7 @@ // // See [this comment on GitHub][c] for more details. // -// check-pass +//@ check-pass // // [c]: https://github.com/rust-lang/rust/issues/57639#issuecomment-455685861 diff --git a/tests/ui/higher-ranked/trait-bounds/issue-60283.rs b/tests/ui/higher-ranked/trait-bounds/issue-60283.rs index 05315b3f9f5e9..ce1554b3290f0 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-60283.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-60283.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type Item; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs index 571b8531757cd..0ca8387776a46 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Yokeable<'a> { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs b/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs index 92b7c5deb812e..b2917be403843 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs @@ -3,7 +3,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass trait A where for<'a> Self: 'a, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-90177.rs b/tests/ui/higher-ranked/trait-bounds/issue-90177.rs index b151a9d3ab659..669e789caf922 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-90177.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-90177.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Base<'f> { type Assoc; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95034.rs b/tests/ui/higher-ranked/trait-bounds/issue-95034.rs index af4946a187f15..53b28c2bea453 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-95034.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-95034.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --edition=2021 --crate-type=lib +//@ check-pass +//@ compile-flags: --edition=2021 --crate-type=lib use std::{ future::Future, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs index 027644a280b0f..d1ca6834551e1 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs @@ -1,7 +1,7 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver -//[old] check-pass -//[next] known-bug: #109764 +//@ revisions: old next +//@[next] compile-flags: -Znext-solver +//@[old] check-pass +//@[next] known-bug: #109764 pub struct Bar diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs index f255eac0c4b2c..b4f2da3ae2da1 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo<'a> { type Bar; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs index 4d38cb19e9bf2..00a1c4429698f 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(t: T) -> usize where diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs index c6f29fa59085d..c368f2650629d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FamilyType (GAT workaround) pub trait FamilyLt<'a> { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs index 002054732919e..af086750840a3 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs index 8c2a59868ca5e..5b4c561b5fe7c 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; use std::mem; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs index 03f257a029c17..796ca7de790c2 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Struct {} diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs index 0ea736deeaa84..09fbaf24b8e5e 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefMut; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs index 3ced40230f012..b5edc7e646d94 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait MyTrait<'a> { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs index 1d90226a3f486..4bd3b96e47581 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(rustc_attrs)] trait Parser<'s> { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs index 93ccb42684c5e..44f071d338210 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs index 583470080a2fc..fe3fdab617d9d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs index 00a866f220b2e..7e78138a75b97 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 type BoxFuture = std::pin::Pin>>; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs index 6316ceea156bd..7018c240a27ad 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar { type Type; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs index f6ab9c203b5c7..ced73a40d5d82 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Indexable { type Idx; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs index f7e467b3786dc..d85c6999e26f3 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs index effc329456d46..04f7ef7f09191 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs index 628b5cba10424..b3feda4a531f1 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs index ffd6857d84a6e..61cc82558e84c 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Variable<'a> { type Type; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs index 7072f41066b3a..7bd4e2c9d544c 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs index 58ca5b0c1874a..e1aa1babdbb1a 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Should pass, but we normalize and check bounds before we resolve the generics // of the function (which we know because of the return type). diff --git a/tests/ui/hygiene/assoc_ty_bindings.rs b/tests/ui/hygiene/assoc_ty_bindings.rs index a786127493298..5e42e27062fbd 100644 --- a/tests/ui/hygiene/assoc_ty_bindings.rs +++ b/tests/ui/hygiene/assoc_ty_bindings.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro, associated_type_defaults)] diff --git a/tests/ui/hygiene/auxiliary/def-site-async-await.rs b/tests/ui/hygiene/auxiliary/def-site-async-await.rs index f7e9b80131885..41c4b871e7369 100644 --- a/tests/ui/hygiene/auxiliary/def-site-async-await.rs +++ b/tests/ui/hygiene/auxiliary/def-site-async-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 extern crate opaque_hygiene; diff --git a/tests/ui/hygiene/auxiliary/opaque-hygiene.rs b/tests/ui/hygiene/auxiliary/opaque-hygiene.rs index 7730f91bd6a03..b6192d653f56f 100644 --- a/tests/ui/hygiene/auxiliary/opaque-hygiene.rs +++ b/tests/ui/hygiene/auxiliary/opaque-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/hygiene/cross-crate-codegen-attrs.rs b/tests/ui/hygiene/cross-crate-codegen-attrs.rs index af6b1334387ea..9bd7ecf6849e3 100644 --- a/tests/ui/hygiene/cross-crate-codegen-attrs.rs +++ b/tests/ui/hygiene/cross-crate-codegen-attrs.rs @@ -2,8 +2,8 @@ // We used to gensym the identifiers in attributes, which stopped dependent // crates from seeing them, resulting in linker errors in cases like this one. -// run-pass -// aux-build:codegen-attrs.rs +//@ run-pass +//@ aux-build:codegen-attrs.rs extern crate codegen_attrs; diff --git a/tests/ui/hygiene/cross-crate-define-and-use.rs b/tests/ui/hygiene/cross-crate-define-and-use.rs index 62b1820235c76..00d0faae8df17 100644 --- a/tests/ui/hygiene/cross-crate-define-and-use.rs +++ b/tests/ui/hygiene/cross-crate-define-and-use.rs @@ -3,8 +3,8 @@ // This requires that the definition of `my_struct` preserves the hygiene // information for the tokens in its definition. -// check-pass -// aux-build:use_by_macro.rs +//@ check-pass +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-fields.rs b/tests/ui/hygiene/cross-crate-fields.rs index 1bcd64573ac6e..2bdedb0cf91c3 100644 --- a/tests/ui/hygiene/cross-crate-fields.rs +++ b/tests/ui/hygiene/cross-crate-fields.rs @@ -1,8 +1,8 @@ // Test that fields on a struct defined in another crate are resolved correctly // their names differ only in `SyntaxContext`. -// run-pass -// aux-build:fields.rs +//@ run-pass +//@ aux-build:fields.rs extern crate fields; diff --git a/tests/ui/hygiene/cross-crate-glob-hygiene.rs b/tests/ui/hygiene/cross-crate-glob-hygiene.rs index de5576682a6bd..81cc6927c1d28 100644 --- a/tests/ui/hygiene/cross-crate-glob-hygiene.rs +++ b/tests/ui/hygiene/cross-crate-glob-hygiene.rs @@ -3,7 +3,7 @@ // defines is only not imported because `my_struct` is defined by a macros 2.0 // macro. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-methods.rs b/tests/ui/hygiene/cross-crate-methods.rs index 0e6f57c33f64a..fead9b16168bb 100644 --- a/tests/ui/hygiene/cross-crate-methods.rs +++ b/tests/ui/hygiene/cross-crate-methods.rs @@ -2,8 +2,8 @@ // names differ only in `SyntaxContext`. This also checks that any name // resolution done when monomorphizing is correct. -// run-pass -// aux-build:methods.rs +//@ run-pass +//@ aux-build:methods.rs extern crate methods; diff --git a/tests/ui/hygiene/cross-crate-name-collision.rs b/tests/ui/hygiene/cross-crate-name-collision.rs index 8f118782f2319..7826d743ba56c 100644 --- a/tests/ui/hygiene/cross-crate-name-collision.rs +++ b/tests/ui/hygiene/cross-crate-name-collision.rs @@ -2,8 +2,8 @@ // only differ by `SyntaxContext` do not cause name collisions when imported // in another crate. -// check-pass -// aux-build:needs_hygiene.rs +//@ check-pass +//@ aux-build:needs_hygiene.rs extern crate needs_hygiene; diff --git a/tests/ui/hygiene/cross-crate-name-hiding-2.rs b/tests/ui/hygiene/cross-crate-name-hiding-2.rs index 3eacd775c9e53..2eae000b045e2 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding-2.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding-2.rs @@ -1,7 +1,7 @@ // Check that an identifier from a 2.0 macro in another crate cannot be // resolved with an identifier that's not from a macro expansion. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-name-hiding.rs b/tests/ui/hygiene/cross-crate-name-hiding.rs index dd76ecc5762f5..586e7647df74c 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding.rs @@ -1,7 +1,7 @@ // Check that an item defined by a 2.0 macro in another crate cannot be used in // another crate. -// aux-build:pub_hygiene.rs +//@ aux-build:pub_hygiene.rs extern crate pub_hygiene; diff --git a/tests/ui/hygiene/cross-crate-redefine.rs b/tests/ui/hygiene/cross-crate-redefine.rs index 3cb06b4bad873..e42c5e3de0641 100644 --- a/tests/ui/hygiene/cross-crate-redefine.rs +++ b/tests/ui/hygiene/cross-crate-redefine.rs @@ -1,7 +1,7 @@ // Check that items with identical `SyntaxContext` conflict even when that // context involves a mark from another crate. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-variants.rs b/tests/ui/hygiene/cross-crate-variants.rs index efc73a21f16f3..9634cd5fdb7bf 100644 --- a/tests/ui/hygiene/cross-crate-variants.rs +++ b/tests/ui/hygiene/cross-crate-variants.rs @@ -1,8 +1,8 @@ // Test that variants of an enum defined in another crate are resolved // correctly when their names differ only in `SyntaxContext`. -// run-pass -// aux-build:variants.rs +//@ run-pass +//@ aux-build:variants.rs extern crate variants; diff --git a/tests/ui/hygiene/dollar-crate-modern.rs b/tests/ui/hygiene/dollar-crate-modern.rs index eb176fed87c00..c08976c9260cf 100644 --- a/tests/ui/hygiene/dollar-crate-modern.rs +++ b/tests/ui/hygiene/dollar-crate-modern.rs @@ -1,7 +1,7 @@ // Make sure `$crate` and `crate` work in for basic cases of nested macros. -// check-pass -// aux-build:intercrate.rs +//@ check-pass +//@ aux-build:intercrate.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/eager-from-opaque-2.rs b/tests/ui/hygiene/eager-from-opaque-2.rs index 220e5526745c3..e8f8a9417979d 100644 --- a/tests/ui/hygiene/eager-from-opaque-2.rs +++ b/tests/ui/hygiene/eager-from-opaque-2.rs @@ -1,6 +1,6 @@ // Regression test for the issue #63460. -// check-pass +//@ check-pass #[macro_export] macro_rules! separator { diff --git a/tests/ui/hygiene/eager-from-opaque.rs b/tests/ui/hygiene/eager-from-opaque.rs index 6f3215dd697f3..9208d30d026ce 100644 --- a/tests/ui/hygiene/eager-from-opaque.rs +++ b/tests/ui/hygiene/eager-from-opaque.rs @@ -1,7 +1,7 @@ // Opaque macro can eagerly expand its input without breaking its resolution. // Regression test for issue #63685. -// check-pass +//@ check-pass macro_rules! foo { () => { diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs index 40c5eacee3bad..aaf831d1983e4 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] macro a() { diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs index f3fa2dddaefe5..be3102aeab07f 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![feature(decl_macro)] macro a() { diff --git a/tests/ui/hygiene/format-args.rs b/tests/ui/hygiene/format-args.rs index d74889b95cc12..ff08aecfd9eb7 100644 --- a/tests/ui/hygiene/format-args.rs +++ b/tests/ui/hygiene/format-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] #![feature(format_args_nl)] diff --git a/tests/ui/hygiene/generic_params.rs b/tests/ui/hygiene/generic_params.rs index b42152955f77b..def9be3a1b643 100644 --- a/tests/ui/hygiene/generic_params.rs +++ b/tests/ui/hygiene/generic_params.rs @@ -1,6 +1,6 @@ // Ensure that generic parameters always have modern hygiene. -// check-pass +//@ check-pass #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/hygiene/hir-res-hygiene.rs b/tests/ui/hygiene/hir-res-hygiene.rs index c26cf5fdb5b05..01b346a03af67 100644 --- a/tests/ui/hygiene/hir-res-hygiene.rs +++ b/tests/ui/hygiene/hir-res-hygiene.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:not-libstd.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:not-libstd.rs // Check that paths created in HIR are not affected by in scope names. diff --git a/tests/ui/hygiene/hygiene-dodging-1.rs b/tests/ui/hygiene/hygiene-dodging-1.rs index 69e47e82ba5e6..0a3aebd63b263 100644 --- a/tests/ui/hygiene/hygiene-dodging-1.rs +++ b/tests/ui/hygiene/hygiene-dodging-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] mod x { diff --git a/tests/ui/hygiene/hygiene.rs b/tests/ui/hygiene/hygiene.rs index fb351cf0faf65..a937e11eef663 100644 --- a/tests/ui/hygiene/hygiene.rs +++ b/tests/ui/hygiene/hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn f() { diff --git a/tests/ui/hygiene/hygienic-labels-in-let.rs b/tests/ui/hygiene/hygienic-labels-in-let.rs index 8cf66f31a0a1d..14848ca382be2 100644 --- a/tests/ui/hygiene/hygienic-labels-in-let.rs +++ b/tests/ui/hygiene/hygienic-labels-in-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(unused_labels)] diff --git a/tests/ui/hygiene/hygienic-labels.rs b/tests/ui/hygiene/hygienic-labels.rs index 6a7d81f045bfc..5084338f8df6f 100644 --- a/tests/ui/hygiene/hygienic-labels.rs +++ b/tests/ui/hygiene/hygienic-labels.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(unused_labels)] // Test that labels injected by macros do not break hygiene. diff --git a/tests/ui/hygiene/intercrate.rs b/tests/ui/hygiene/intercrate.rs index 2de62f6aff77f..eacd3874c47a1 100644 --- a/tests/ui/hygiene/intercrate.rs +++ b/tests/ui/hygiene/intercrate.rs @@ -1,4 +1,4 @@ -// aux-build:intercrate.rs +//@ aux-build:intercrate.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/issue-15221.rs b/tests/ui/hygiene/issue-15221.rs index 4b8319a8304ff..ebb1a234051aa 100644 --- a/tests/ui/hygiene/issue-15221.rs +++ b/tests/ui/hygiene/issue-15221.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(path_statements)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 macro_rules! inner { ($e:pat ) => ($e) diff --git a/tests/ui/hygiene/issue-29746.rs b/tests/ui/hygiene/issue-29746.rs index 3470a7e09ad8b..53833e855e506 100644 --- a/tests/ui/hygiene/issue-29746.rs +++ b/tests/ui/hygiene/issue-29746.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // zip!(a1,a2,a3,a4) is equivalent to: // a1.zip(a2).zip(a3).zip(a4).map(|(((x1,x2),x3),x4)| (x1,x2,x3,x4)) macro_rules! zip { diff --git a/tests/ui/hygiene/issue-32922.rs b/tests/ui/hygiene/issue-32922.rs index 54ec44a1cf4e5..8027e2c3bcf08 100644 --- a/tests/ui/hygiene/issue-32922.rs +++ b/tests/ui/hygiene/issue-32922.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { () => { let x = 1; diff --git a/tests/ui/hygiene/issue-40847.rs b/tests/ui/hygiene/issue-40847.rs index 087b40ad6cdf7..c12214be06e1c 100644 --- a/tests/ui/hygiene/issue-40847.rs +++ b/tests/ui/hygiene/issue-40847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! gen { ($name:ident ( $($dol:tt $var:ident)* ) $($body:tt)*) => { macro_rules! $name { diff --git a/tests/ui/hygiene/issue-44128.rs b/tests/ui/hygiene/issue-44128.rs index 5e03bdb8c5be8..021d340bacf7f 100644 --- a/tests/ui/hygiene/issue-44128.rs +++ b/tests/ui/hygiene/issue-44128.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] #![feature(decl_macro)] diff --git a/tests/ui/hygiene/issue-47311.rs b/tests/ui/hygiene/issue-47311.rs index 3f1b7397301c1..e12b174f82fa2 100644 --- a/tests/ui/hygiene/issue-47311.rs +++ b/tests/ui/hygiene/issue-47311.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/hygiene/issue-47312.rs b/tests/ui/hygiene/issue-47312.rs index c8b5c36767cf6..8d11d3b9ce293 100644 --- a/tests/ui/hygiene/issue-47312.rs +++ b/tests/ui/hygiene/issue-47312.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/hygiene/issue-61574-const-parameters.rs b/tests/ui/hygiene/issue-61574-const-parameters.rs index 3634ee004f7f7..040fcacd71b51 100644 --- a/tests/ui/hygiene/issue-61574-const-parameters.rs +++ b/tests/ui/hygiene/issue-61574-const-parameters.rs @@ -1,7 +1,7 @@ // A more comprehensive test that const parameters have correctly implemented // hygiene -// check-pass +//@ check-pass use std::ops::Add; diff --git a/tests/ui/hygiene/issue-77523-def-site-async-await.rs b/tests/ui/hygiene/issue-77523-def-site-async-await.rs index 2af60ff6f53b6..102112381d392 100644 --- a/tests/ui/hygiene/issue-77523-def-site-async-await.rs +++ b/tests/ui/hygiene/issue-77523-def-site-async-await.rs @@ -1,6 +1,6 @@ -// build-pass -// aux-build:opaque-hygiene.rs -// aux-build:def-site-async-await.rs +//@ build-pass +//@ aux-build:opaque-hygiene.rs +//@ aux-build:def-site-async-await.rs // Regression test for issue #77523 // Tests that we don't ICE when an unusual combination diff --git a/tests/ui/hygiene/items.rs b/tests/ui/hygiene/items.rs index a7ed749f526ea..6600b35ac31c2 100644 --- a/tests/ui/hygiene/items.rs +++ b/tests/ui/hygiene/items.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/lambda-var-hygiene.rs b/tests/ui/hygiene/lambda-var-hygiene.rs index bf06765e5dd41..ff0c6e08a4991 100644 --- a/tests/ui/hygiene/lambda-var-hygiene.rs +++ b/tests/ui/hygiene/lambda-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex: macro_rules! bad_macro { ($ex:expr) => ({(|_x| { $ex }) (9) }) diff --git a/tests/ui/hygiene/legacy_interaction.rs b/tests/ui/hygiene/legacy_interaction.rs index 4d150baf5d491..277650b545064 100644 --- a/tests/ui/hygiene/legacy_interaction.rs +++ b/tests/ui/hygiene/legacy_interaction.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// aux-build:legacy_interaction.rs +//@ aux-build:legacy_interaction.rs #![feature(decl_macro)] #[allow(unused)] diff --git a/tests/ui/hygiene/lexical.rs b/tests/ui/hygiene/lexical.rs index 81de974c20355..eb9d5dbe42a7e 100644 --- a/tests/ui/hygiene/lexical.rs +++ b/tests/ui/hygiene/lexical.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/local_inner_macros.rs b/tests/ui/hygiene/local_inner_macros.rs index 71ffcac40d384..cb3dbda63dbd9 100644 --- a/tests/ui/hygiene/local_inner_macros.rs +++ b/tests/ui/hygiene/local_inner_macros.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:local_inner_macros.rs +//@ check-pass +//@ aux-build:local_inner_macros.rs extern crate local_inner_macros; diff --git a/tests/ui/hygiene/macro-metavars-legacy.rs b/tests/ui/hygiene/macro-metavars-legacy.rs index 09070f0f561a6..96b6303012af6 100644 --- a/tests/ui/hygiene/macro-metavars-legacy.rs +++ b/tests/ui/hygiene/macro-metavars-legacy.rs @@ -2,7 +2,7 @@ #![feature(rustc_attrs)] -// run-pass +//@ run-pass macro_rules! make_mac { ( $($dollar:tt $arg:ident),+ ) => { diff --git a/tests/ui/hygiene/macro-metavars-transparent.rs b/tests/ui/hygiene/macro-metavars-transparent.rs index e475b5728a098..3eb4a8946fe3d 100644 --- a/tests/ui/hygiene/macro-metavars-transparent.rs +++ b/tests/ui/hygiene/macro-metavars-transparent.rs @@ -3,7 +3,7 @@ #![feature(rustc_attrs)] -// run-pass +//@ run-pass #[rustc_macro_transparency = "transparent"] macro_rules! k { diff --git a/tests/ui/hygiene/nested-dollar-crate.rs b/tests/ui/hygiene/nested-dollar-crate.rs index e8703bc77ee8b..6ec4043a6e2d4 100644 --- a/tests/ui/hygiene/nested-dollar-crate.rs +++ b/tests/ui/hygiene/nested-dollar-crate.rs @@ -1,6 +1,6 @@ -// aux-build:nested-dollar-crate.rs -// edition:2018 -// run-pass +//@ aux-build:nested-dollar-crate.rs +//@ edition:2018 +//@ run-pass extern crate nested_dollar_crate; diff --git a/tests/ui/hygiene/no_implicit_prelude-2018.rs b/tests/ui/hygiene/no_implicit_prelude-2018.rs index 83ca28167a468..015bff870908e 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2018.rs +++ b/tests/ui/hygiene/no_implicit_prelude-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[no_implicit_prelude] mod bar { diff --git a/tests/ui/hygiene/no_implicit_prelude-2021.rs b/tests/ui/hygiene/no_implicit_prelude-2021.rs index 0fe9ae56c6564..9e793ec7c6d97 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2021.rs +++ b/tests/ui/hygiene/no_implicit_prelude-2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![no_implicit_prelude] diff --git a/tests/ui/hygiene/panic-location.rs b/tests/ui/hygiene/panic-location.rs index 5cf169dfb141b..a98960d74b019 100644 --- a/tests/ui/hygiene/panic-location.rs +++ b/tests/ui/hygiene/panic-location.rs @@ -1,6 +1,6 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 // // Regression test for issue #70963 // The captured stderr from this test reports a location diff --git a/tests/ui/hygiene/prelude-import-hygiene.rs b/tests/ui/hygiene/prelude-import-hygiene.rs index 51e7bed6580b3..a27c375369bc4 100644 --- a/tests/ui/hygiene/prelude-import-hygiene.rs +++ b/tests/ui/hygiene/prelude-import-hygiene.rs @@ -1,11 +1,11 @@ // Make sure that attribute used when injecting the prelude are resolved // hygienically. -// check-pass -// aux-build:not-libstd.rs +//@ check-pass +//@ aux-build:not-libstd.rs -//revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@revisions: rust2015 rust2018 +//@[rust2018] edition:2018 // The prelude import shouldn't see these as candidates for when it's trying to // use the built-in macros. diff --git a/tests/ui/hygiene/privacy-early.rs b/tests/ui/hygiene/privacy-early.rs index 58fc74d65a54a..07680a7b9b22d 100644 --- a/tests/ui/hygiene/privacy-early.rs +++ b/tests/ui/hygiene/privacy-early.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/hygiene/specialization.rs b/tests/ui/hygiene/specialization.rs index b8c4c1b0d587c..a3bd36877cf80 100644 --- a/tests/ui/hygiene/specialization.rs +++ b/tests/ui/hygiene/specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs b/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs index c8c5c72bf95c4..f08693f221898 100644 --- a/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs +++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:stdlib-prelude.rs +//@ check-pass +//@ aux-build:stdlib-prelude.rs #![feature(decl_macro)] #![feature(prelude_import)] diff --git a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs index 721bb7281c0ff..e392c5611ba26 100644 --- a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs +++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(dropping_copy_types)] diff --git a/tests/ui/hygiene/thread-local-not-in-prelude.rs b/tests/ui/hygiene/thread-local-not-in-prelude.rs index e5ed09c600bf9..bee9908bbbc28 100644 --- a/tests/ui/hygiene/thread-local-not-in-prelude.rs +++ b/tests/ui/hygiene/thread-local-not-in-prelude.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] extern crate std; diff --git a/tests/ui/hygiene/trait_items-2.rs b/tests/ui/hygiene/trait_items-2.rs index cd9122656cd2d..d070d678bedb9 100644 --- a/tests/ui/hygiene/trait_items-2.rs +++ b/tests/ui/hygiene/trait_items-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/traits-in-scope.rs b/tests/ui/hygiene/traits-in-scope.rs index 548bb226b713c..2f391f1062e3f 100644 --- a/tests/ui/hygiene/traits-in-scope.rs +++ b/tests/ui/hygiene/traits-in-scope.rs @@ -2,7 +2,7 @@ // It is not clear whether this is desirable behavior or not. // It is also not clear how to prevent it if it is not desirable. -// check-pass +//@ check-pass #![feature(decl_macro)] #![feature(trait_alias)] diff --git a/tests/ui/hygiene/transparent-basic.rs b/tests/ui/hygiene/transparent-basic.rs index bfa1713e4edda..b8f67decd1819 100644 --- a/tests/ui/hygiene/transparent-basic.rs +++ b/tests/ui/hygiene/transparent-basic.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:transparent-basic.rs +//@ check-pass +//@ aux-build:transparent-basic.rs #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/hygiene/unpretty-debug.rs b/tests/ui/hygiene/unpretty-debug.rs index 6e936bb3d830c..20c909b1cbee7 100644 --- a/tests/ui/hygiene/unpretty-debug.rs +++ b/tests/ui/hygiene/unpretty-debug.rs @@ -1,8 +1,8 @@ -// check-pass -// compile-flags: -Zunpretty=expanded,hygiene +//@ check-pass +//@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -// normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "\d+#" -> "0#" // minimal junk #![feature(no_core)] diff --git a/tests/ui/hygiene/unpretty-debug.stdout b/tests/ui/hygiene/unpretty-debug.stdout index 3d686f95df9ea..cab3fe2f29b1f 100644 --- a/tests/ui/hygiene/unpretty-debug.stdout +++ b/tests/ui/hygiene/unpretty-debug.stdout @@ -1,8 +1,8 @@ -// check-pass -// compile-flags: -Zunpretty=expanded,hygiene +//@ check-pass +//@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -// normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "\d+#" -> "0#" // minimal junk #![feature /* 0#0 */(no_core)] diff --git a/tests/ui/hygiene/wrap_unhygienic_example.rs b/tests/ui/hygiene/wrap_unhygienic_example.rs index f6b48156888cf..6412117b2a6c7 100644 --- a/tests/ui/hygiene/wrap_unhygienic_example.rs +++ b/tests/ui/hygiene/wrap_unhygienic_example.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass -// aux-build:my_crate.rs -// aux-build:unhygienic_example.rs +//@ aux-build:my_crate.rs +//@ aux-build:unhygienic_example.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/xcrate.rs b/tests/ui/hygiene/xcrate.rs index 6366bebb52f3f..3567a4848e47c 100644 --- a/tests/ui/hygiene/xcrate.rs +++ b/tests/ui/hygiene/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs #![feature(decl_macro)] diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed index 74f3c887f0276..76a3b2563ca8b 100644 --- a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed +++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test(t: &mut dyn Iterator) -> u64 { *t.min().unwrap() //~ ERROR the `min` method cannot be invoked on } diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs index 3b02c5a5ad15a..fb5c612605263 100644 --- a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs +++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test(t: &dyn Iterator) -> u64 { *t.min().unwrap() //~ ERROR the `min` method cannot be invoked on } diff --git a/tests/ui/illegal-ufcs-drop.fixed b/tests/ui/illegal-ufcs-drop.fixed index c088c82791b4d..2b1c967ed1e07 100644 --- a/tests/ui/illegal-ufcs-drop.fixed +++ b/tests/ui/illegal-ufcs-drop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dropping_references)] diff --git a/tests/ui/illegal-ufcs-drop.rs b/tests/ui/illegal-ufcs-drop.rs index 1389b11218865..99dda0dab3406 100644 --- a/tests/ui/illegal-ufcs-drop.rs +++ b/tests/ui/illegal-ufcs-drop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dropping_references)] diff --git a/tests/ui/impl-header-lifetime-elision/bare_type.rs b/tests/ui/impl-header-lifetime-elision/bare_type.rs index 9af98f870d2d5..bf119ffe7edb6 100644 --- a/tests/ui/impl-header-lifetime-elision/bare_type.rs +++ b/tests/ui/impl-header-lifetime-elision/bare_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] type MyType<'a, T> = &'a T; diff --git a/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs b/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs index 929b82bfc432e..1568eddd30819 100644 --- a/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs +++ b/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Verify that we do not ICE when anonymous lifetimes appear inside an AnonConst. pub struct EntriesBuffer(Box<[[u8; HashesEntry::LEN]; 5]>); 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 6301ac4a323f6..fb5f9b0aeee55 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 +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/inherent-impl.rs b/tests/ui/impl-header-lifetime-elision/inherent-impl.rs index 9d7b2f2d088cc..da071cfcefbdc 100644 --- a/tests/ui/impl-header-lifetime-elision/inherent-impl.rs +++ b/tests/ui/impl-header-lifetime-elision/inherent-impl.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Foo<'a>(&'a u8); diff --git a/tests/ui/impl-header-lifetime-elision/path-underscore.rs b/tests/ui/impl-header-lifetime-elision/path-underscore.rs index f39ba57338404..7098f82f33ff0 100644 --- a/tests/ui/impl-header-lifetime-elision/path-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/path-underscore.rs @@ -1,6 +1,6 @@ // Test that `impl MyTrait for Foo<'_>` works. -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/ref-underscore.rs b/tests/ui/impl-header-lifetime-elision/ref-underscore.rs index 5be04d08a09e5..33808b2077bee 100644 --- a/tests/ui/impl-header-lifetime-elision/ref-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/ref-underscore.rs @@ -1,6 +1,6 @@ // Test that `impl MyTrait for &i32` works and is equivalent to any lifetime. -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/trait-underscore.rs b/tests/ui/impl-header-lifetime-elision/trait-underscore.rs index 3e13b0426eccb..1b90583a5cb56 100644 --- a/tests/ui/impl-header-lifetime-elision/trait-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/trait-underscore.rs @@ -1,7 +1,7 @@ // Test that `impl MyTrait<'_> for &i32` is equivalent to `impl<'a, // 'b> MyTrait<'a> for &'b i32`. // -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-inherent-non-conflict.rs b/tests/ui/impl-inherent-non-conflict.rs index be524f87c9fb1..41ab865892a1a 100644 --- a/tests/ui/impl-inherent-non-conflict.rs +++ b/tests/ui/impl-inherent-non-conflict.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that a user-defined type admits multiple inherent methods // with the same name, which can be called on values that have a // precise enough type to allow distinguishing between the methods. diff --git a/tests/ui/impl-not-adjacent-to-type.rs b/tests/ui/impl-not-adjacent-to-type.rs index 97caf90838778..7fc927b1d64fc 100644 --- a/tests/ui/impl-not-adjacent-to-type.rs +++ b/tests/ui/impl-not-adjacent-to-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub struct Point { diff --git a/tests/ui/impl-privacy-xc-1.rs b/tests/ui/impl-privacy-xc-1.rs index c9f7f09c7bd0e..1a2af8098f59e 100644 --- a/tests/ui/impl-privacy-xc-1.rs +++ b/tests/ui/impl-privacy-xc-1.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:impl_privacy_xc_1.rs +//@ run-pass +//@ aux-build:impl_privacy_xc_1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate impl_privacy_xc_1; diff --git a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs index 0908a0bf39df9..843dfcee420f5 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy(U); diff --git a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs index 8173f8df11b0c..151d183669c1a 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs @@ -1,8 +1,8 @@ // This is a non-regression test for issue #114325: an "unexpected unsized tail" ICE happened during // codegen, and was fixed by MIR drop tracking #107421. -// edition: 2021 -// build-pass: ICEd during codegen. +//@ edition: 2021 +//@ build-pass: ICEd during codegen. #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs index b5ea90bb0c7c6..b310998dfdcaa 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/impl-trait/associated-impl-trait-type.rs b/tests/ui/impl-trait/associated-impl-trait-type.rs index f5981261c3838..a0c2cef0fcf27 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/impl-trait/async_scope_creep.rs b/tests/ui/impl-trait/async_scope_creep.rs index 60975439a33eb..0fb355c523373 100644 --- a/tests/ui/impl-trait/async_scope_creep.rs +++ b/tests/ui/impl-trait/async_scope_creep.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// check-pass -// revisions: tait rpit +//@ edition:2021 +//@ check-pass +//@ revisions: tait rpit struct Pending {} diff --git a/tests/ui/impl-trait/auto-trait-coherence.rs b/tests/ui/impl-trait/auto-trait-coherence.rs index e4226b2007483..0f089c5adbd7f 100644 --- a/tests/ui/impl-trait/auto-trait-coherence.rs +++ b/tests/ui/impl-trait/auto-trait-coherence.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that type alias impls traits do not leak auto-traits for // the purposes of coherence checking diff --git a/tests/ui/impl-trait/auto-trait-leak-rpass.rs b/tests/ui/impl-trait/auto-trait-leak-rpass.rs index 9976a018b46dd..55ba3e0d14e6e 100644 --- a/tests/ui/impl-trait/auto-trait-leak-rpass.rs +++ b/tests/ui/impl-trait/auto-trait-leak-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Fast path, main can see the concrete type returned. fn before() -> impl FnMut(i32) { diff --git a/tests/ui/impl-trait/autoderef.rs b/tests/ui/impl-trait/autoderef.rs index 48ff8be6549fe..afab4e980a8b9 100644 --- a/tests/ui/impl-trait/autoderef.rs +++ b/tests/ui/impl-trait/autoderef.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass use std::path::Path; use std::ffi::OsStr; diff --git a/tests/ui/impl-trait/bivariant-lifetime-liveness.rs b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs index fe99fe3f34068..1792d8cef9f54 100644 --- a/tests/ui/impl-trait/bivariant-lifetime-liveness.rs +++ b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 116794 // Uncaptured lifetimes should not be required to be live. diff --git a/tests/ui/impl-trait/bound-normalization-fail.rs b/tests/ui/impl-trait/bound-normalization-fail.rs index 566a4a7adccb9..f6e5e6c17aa53 100644 --- a/tests/ui/impl-trait/bound-normalization-fail.rs +++ b/tests/ui/impl-trait/bound-normalization-fail.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // See issue 60414 diff --git a/tests/ui/impl-trait/bound-normalization-pass.rs b/tests/ui/impl-trait/bound-normalization-pass.rs index 5613c1916c6cd..801187b6f5e0e 100644 --- a/tests/ui/impl-trait/bound-normalization-pass.rs +++ b/tests/ui/impl-trait/bound-normalization-pass.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// revisions: default sa +//@ check-pass +//@ edition:2018 +//@ revisions: default sa #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs index 89b0e3c55f9e1..452e99b80ae2b 100644 --- a/tests/ui/impl-trait/bounds_regression.rs +++ b/tests/ui/impl-trait/bounds_regression.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait FakeCoroutine { type Yield; diff --git a/tests/ui/impl-trait/can-return-unconstrained-closure.rs b/tests/ui/impl-trait/can-return-unconstrained-closure.rs index 7ae1ac4f5767c..1f8bdbc5054d8 100644 --- a/tests/ui/impl-trait/can-return-unconstrained-closure.rs +++ b/tests/ui/impl-trait/can-return-unconstrained-closure.rs @@ -10,7 +10,7 @@ // concrete type against the bound, which forces the return type to be // `&'static i32` here. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn make_identity() -> impl Sized { |x: &'static i32| x diff --git a/tests/ui/impl-trait/closure-calling-parent-fn.rs b/tests/ui/impl-trait/closure-calling-parent-fn.rs index 9dab334a217c2..9f6092211b924 100644 --- a/tests/ui/impl-trait/closure-calling-parent-fn.rs +++ b/tests/ui/impl-trait/closure-calling-parent-fn.rs @@ -5,7 +5,7 @@ // `foo` and hence is treated opaquely within the closure body. This // resulted in a failed subtype relationship. // -// check-pass +//@ check-pass fn foo() -> impl Copy { || foo(); } fn bar() -> impl Copy { || bar(); } diff --git a/tests/ui/impl-trait/closure-in-impl-trait-arg.rs b/tests/ui/impl-trait/closure-in-impl-trait-arg.rs index 3cfce459e37dc..b522e0a816c63 100644 --- a/tests/ui/impl-trait/closure-in-impl-trait-arg.rs +++ b/tests/ui/impl-trait/closure-in-impl-trait-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn bug(_: impl Iterator) {} diff --git a/tests/ui/impl-trait/closure-in-impl-trait.rs b/tests/ui/impl-trait/closure-in-impl-trait.rs index 3593a1d5c8d10..7c0382ebf4501 100644 --- a/tests/ui/impl-trait/closure-in-impl-trait.rs +++ b/tests/ui/impl-trait/closure-in-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn bug() -> impl Iterator { std::iter::empty() diff --git a/tests/ui/impl-trait/cross-return-site-inference.rs b/tests/ui/impl-trait/cross-return-site-inference.rs index e1071b08c55ec..bed08a6c4186e 100644 --- a/tests/ui/impl-trait/cross-return-site-inference.rs +++ b/tests/ui/impl-trait/cross-return-site-inference.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn foo(b: bool) -> impl std::fmt::Debug { if b { diff --git a/tests/ui/impl-trait/deduce-signature-from-supertrait.rs b/tests/ui/impl-trait/deduce-signature-from-supertrait.rs index 7a51aac44e2e8..4e452994f72e7 100644 --- a/tests/ui/impl-trait/deduce-signature-from-supertrait.rs +++ b/tests/ui/impl-trait/deduce-signature-from-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/defined-by-trait-resolution.rs b/tests/ui/impl-trait/defined-by-trait-resolution.rs index 1744046ddbb73..8d3b38eb9c787 100644 --- a/tests/ui/impl-trait/defined-by-trait-resolution.rs +++ b/tests/ui/impl-trait/defined-by-trait-resolution.rs @@ -1,6 +1,6 @@ //! The trait query `foo: Fn() -> u8` is a valid defining use of RPIT. -// build-pass +//@ build-pass fn returns_u8(_: impl Fn() -> u8) {} diff --git a/tests/ui/impl-trait/deprecated_annotation.rs b/tests/ui/impl-trait/deprecated_annotation.rs index f76724c8ab11d..5b31ded791dbb 100644 --- a/tests/ui/impl-trait/deprecated_annotation.rs +++ b/tests/ui/impl-trait/deprecated_annotation.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(warnings)] diff --git a/tests/ui/impl-trait/divergence.rs b/tests/ui/impl-trait/divergence.rs index 211f7972dbca8..c243299a51697 100644 --- a/tests/ui/impl-trait/divergence.rs +++ b/tests/ui/impl-trait/divergence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo() -> impl MyTrait { panic!(); diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs index 3b7141573847f..138aadc411cec 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Bar` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; } trait Bar { } diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs index e8da52aad0eac..494e38c1e6ae6 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Object` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Alpha {} trait Object {} diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs index aad9d89fe2433..2dc19b9ad6884 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Bar` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs index 8d34c1b6c2af7..662f5389eac96 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs @@ -1,7 +1,7 @@ // Test that `impl Alpha` resets the object-lifetime // default to `'static`. // -// check-pass +//@ check-pass trait Alpha { fn item(&self) -> Box { diff --git a/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs b/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs index a08c2c8765ba6..1caded0592a24 100644 --- a/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs +++ b/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/equal-hidden-lifetimes.rs b/tests/ui/impl-trait/equal-hidden-lifetimes.rs index a6dbf3f08f2a8..8c48307e43298 100644 --- a/tests/ui/impl-trait/equal-hidden-lifetimes.rs +++ b/tests/ui/impl-trait/equal-hidden-lifetimes.rs @@ -1,7 +1,7 @@ // Test that we consider equal regions when checking for hidden regions in // opaque types -// check-pass +//@ check-pass // `'a == 'static` so `&'a i32` is fine as the return type fn equal_regions_static<'a: 'static>(x: &'a i32) -> impl Sized { diff --git a/tests/ui/impl-trait/equality-in-canonical-query.rs b/tests/ui/impl-trait/equality-in-canonical-query.rs index 31ab94f624e5e..6a32f4bec76d4 100644 --- a/tests/ui/impl-trait/equality-in-canonical-query.rs +++ b/tests/ui/impl-trait/equality-in-canonical-query.rs @@ -1,15 +1,15 @@ // issue: #116877 -// revisions: sized clone -//[sized] check-pass -//[clone] known-bug: #108498 -//[clone] failure-status: 101 -//[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" -//[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" -//[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> "" +//@ revisions: sized clone +//@[sized] check-pass +//@[clone] known-bug: #108498 +//@[clone] failure-status: 101 +//@[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" +//@[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" +//@[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" +//@[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> "" #[cfg(sized)] fn rpit() -> impl Sized {} #[cfg(clone)] fn rpit() -> impl Clone {} diff --git a/tests/ui/impl-trait/equality-rpass.rs b/tests/ui/impl-trait/equality-rpass.rs index 607b4a49661cc..da750f4ef1ba3 100644 --- a/tests/ui/impl-trait/equality-rpass.rs +++ b/tests/ui/impl-trait/equality-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs index 0458b56f95f7f..c73f4fc1f65c4 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs @@ -1,7 +1,7 @@ -// revisions: current next -// compile-flags: -Zverbose-internals -//[next] compile-flags: -Znext-solver -// normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" +//@ revisions: current next +//@ compile-flags: -Zverbose-internals +//@[next] compile-flags: -Znext-solver +//@ normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" #![feature(rustc_attrs)] #![rustc_hidden_type_of_opaques] diff --git a/tests/ui/impl-trait/example-calendar.rs b/tests/ui/impl-trait/example-calendar.rs index da45f0d133deb..1dadc5dfcb3ef 100644 --- a/tests/ui/impl-trait/example-calendar.rs +++ b/tests/ui/impl-trait/example-calendar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, step_trait, diff --git a/tests/ui/impl-trait/example-st.rs b/tests/ui/impl-trait/example-st.rs index 1e6ebc52365dc..1581137b02cb8 100644 --- a/tests/ui/impl-trait/example-st.rs +++ b/tests/ui/impl-trait/example-st.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct State; type Error = (); diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs index 1aa23c6082348..9a5eb74bd62cf 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Usizer { fn m(self) -> usize; diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs index 99e0931ab950d..a48e870e982d4 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_f: impl AsRef) {} diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs index 987df4997342f..9218ebf86df88 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: impl AsRef, _: impl AsRef) {} diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed index cd4f2610d3f04..886fc1d005802 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S(T); struct S2; diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs index 024b703e6f235..f3271993867cb 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S(T); struct S2; diff --git a/tests/ui/impl-trait/extra-item.rs b/tests/ui/impl-trait/extra-item.rs index d82237ccecc7d..dab3df592f2f1 100644 --- a/tests/ui/impl-trait/extra-item.rs +++ b/tests/ui/impl-trait/extra-item.rs @@ -1,5 +1,5 @@ -// aux-build:extra-item.rs -// compile-flags:--extern extra_item +//@ aux-build:extra-item.rs +//@ compile-flags:--extern extra_item struct S; diff --git a/tests/ui/impl-trait/fallback.rs b/tests/ui/impl-trait/fallback.rs index 1e6eb5bb35588..a2f05a47a2547 100644 --- a/tests/ui/impl-trait/fallback.rs +++ b/tests/ui/impl-trait/fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn take_edge_counters( x: &mut Option>, diff --git a/tests/ui/impl-trait/feature-self-return-type.rs b/tests/ui/impl-trait/feature-self-return-type.rs index 7555df1b2c709..9746777ccf34a 100644 --- a/tests/ui/impl-trait/feature-self-return-type.rs +++ b/tests/ui/impl-trait/feature-self-return-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test checks that we emit the correct borrowck error when `Self` or a projection is used as // a return type. See #61949 for context. diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs index e1aba8eda1bff..41c5b9f5074de 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs @@ -1,5 +1,5 @@ -// edition:2015 -// check-pass +//@ edition:2015 +//@ check-pass // issue: 114664 fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs index 55d69069afb5c..582386aa7596a 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -1,5 +1,5 @@ -// revisions: edition2015 edition2021 -//[edition2021]edition:2021 +//@ revisions: edition2015 edition2021 +//@[edition2021]edition:2021 #![allow(warnings)] diff --git a/tests/ui/impl-trait/hidden-type-is-opaque.rs b/tests/ui/impl-trait/hidden-type-is-opaque.rs index 72b4028d854f8..3111a21e2096f 100644 --- a/tests/ui/impl-trait/hidden-type-is-opaque.rs +++ b/tests/ui/impl-trait/hidden-type-is-opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn reify_as() -> Thunk { diff --git a/tests/ui/impl-trait/impl-subtyper.rs b/tests/ui/impl-trait/impl-subtyper.rs index 2d99cdd4f506e..cd322fea6612b 100644 --- a/tests/ui/impl-trait/impl-subtyper.rs +++ b/tests/ui/impl-trait/impl-subtyper.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] fn checkpoints() -> impl Iterator { diff --git a/tests/ui/impl-trait/impl-subtyper2.rs b/tests/ui/impl-trait/impl-subtyper2.rs index 2e0acbae68b82..6bac99231b83f 100644 --- a/tests/ui/impl-trait/impl-subtyper2.rs +++ b/tests/ui/impl-trait/impl-subtyper2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn ages() -> Option { None::> diff --git a/tests/ui/impl-trait/impl-trait-plus-priority.rs b/tests/ui/impl-trait/impl-trait-plus-priority.rs index dfac9c0f1ef86..5441a015ac0ac 100644 --- a/tests/ui/impl-trait/impl-trait-plus-priority.rs +++ b/tests/ui/impl-trait/impl-trait-plus-priority.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn f() -> impl A + {} // OK fn f() -> impl A + B {} // OK diff --git a/tests/ui/impl-trait/impl_fn_associativity.rs b/tests/ui/impl-trait/impl_fn_associativity.rs index 71a8f9c77960d..ad37a96805763 100644 --- a/tests/ui/impl-trait/impl_fn_associativity.rs +++ b/tests/ui/impl-trait/impl_fn_associativity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(impl_trait_in_fn_trait_return)] use std::fmt::Debug; diff --git a/tests/ui/impl-trait/implicit-capture-late.rs b/tests/ui/impl-trait/implicit-capture-late.rs index 8bfb16760c918..986620b101bdd 100644 --- a/tests/ui/impl-trait/implicit-capture-late.rs +++ b/tests/ui/impl-trait/implicit-capture-late.rs @@ -1,4 +1,4 @@ -// known-bug: #117647 +//@ known-bug: #117647 #![feature(lifetime_capture_rules_2024)] #![feature(rustc_attrs)] diff --git a/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs b/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs index 01ba902ef0c0d..f309ea516835c 100644 --- a/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs +++ b/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs @@ -1,5 +1,5 @@ //! Check that const eval can use the size of opaque types. -// check-pass +//@ check-pass use std::mem; fn returns_opaque() -> impl Sized { 0u8 diff --git a/tests/ui/impl-trait/in-ctfe/array-len.rs b/tests/ui/impl-trait/in-ctfe/array-len.rs index 73ae20495d577..bbc0a94d72772 100644 --- a/tests/ui/impl-trait/in-ctfe/array-len.rs +++ b/tests/ui/impl-trait/in-ctfe/array-len.rs @@ -1,5 +1,5 @@ //! Check that array lengths can observe associated types of opaque types -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; } diff --git a/tests/ui/impl-trait/in-ctfe/enum-discr.rs b/tests/ui/impl-trait/in-ctfe/enum-discr.rs index 8e4384adaa4cb..c0a4472f416e7 100644 --- a/tests/ui/impl-trait/in-ctfe/enum-discr.rs +++ b/tests/ui/impl-trait/in-ctfe/enum-discr.rs @@ -1,5 +1,5 @@ //! check that const eval can observe associated types of opaque types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; } diff --git a/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs b/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs index 82a9a30a62362..17233f7efc2ac 100644 --- a/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs +++ b/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs @@ -2,7 +2,7 @@ //! opaque types during const eval in order to obtain the exact type //! of associated types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; diff --git a/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs b/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs index 8e3269726fc4a..925abe997e1e9 100644 --- a/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs +++ b/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs @@ -1,5 +1,5 @@ //! Check that pattern matching can observe the hidden type of opaque types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: u8; } diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs index 229a918cdd2e6..365955166e641 100644 --- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs +++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete diff --git a/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs b/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs index 09fbef2ec07b4..a3c4beeb46979 100644 --- a/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs +++ b/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![deny(refining_impl_trait)] diff --git a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs index afb9992de4986..869d44d9e3b76 100644 --- a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs +++ b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // issue: 113796 diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs index af6ffe8339452..e991b74a0f81a 100644 --- a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs +++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // https://github.com/rust-lang/rust/issues/117547 trait T {} diff --git a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs index 87eb7beb1ee1b..a82727bff96a9 100644 --- a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs +++ b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct TestA {} diff --git a/tests/ui/impl-trait/in-trait/deep-match-works.rs b/tests/ui/impl-trait/in-trait/deep-match-works.rs index 8c992743862f6..3978b909ed53a 100644 --- a/tests/ui/impl-trait/in-trait/deep-match-works.rs +++ b/tests/ui/impl-trait/in-trait/deep-match-works.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs index 29bcbe16d835a..9cfac89543058 100644 --- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs +++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs b/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs index 1d1f555080c98..508826e2f77a4 100644 --- a/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs +++ b/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body.rs b/tests/ui/impl-trait/in-trait/default-body.rs index ff70f1e232d01..631ee2b084341 100644 --- a/tests/ui/impl-trait/in-trait/default-body.rs +++ b/tests/ui/impl-trait/in-trait/default-body.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs index ca41eb8bc71fa..282064dae2a13 100644 --- a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs +++ b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { diff --git a/tests/ui/impl-trait/in-trait/default-method-constraint.rs b/tests/ui/impl-trait/in-trait/default-method-constraint.rs index 8ab2e2797f1a7..0615e5b3a15e9 100644 --- a/tests/ui/impl-trait/in-trait/default-method-constraint.rs +++ b/tests/ui/impl-trait/in-trait/default-method-constraint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This didn't work in the previous default RPITIT method hack attempt diff --git a/tests/ui/impl-trait/in-trait/early.rs b/tests/ui/impl-trait/in-trait/early.rs index c4996674dd1c9..21d629b3ca7fe 100644 --- a/tests/ui/impl-trait/in-trait/early.rs +++ b/tests/ui/impl-trait/in-trait/early.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/encode.rs b/tests/ui/impl-trait/in-trait/encode.rs index 4df26b0f29790..8c6a0fdb813f5 100644 --- a/tests/ui/impl-trait/in-trait/encode.rs +++ b/tests/ui/impl-trait/in-trait/encode.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs index ecb5e62c433a0..600dba03b74b9 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs @@ -1,4 +1,4 @@ -// aux-build: rpitit.rs +//@ aux-build: rpitit.rs extern crate rpitit; diff --git a/tests/ui/impl-trait/in-trait/foreign.rs b/tests/ui/impl-trait/in-trait/foreign.rs index 6285d7786d56a..e28bc9e00cbbb 100644 --- a/tests/ui/impl-trait/in-trait/foreign.rs +++ b/tests/ui/impl-trait/in-trait/foreign.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: rpitit.rs +//@ check-pass +//@ aux-build: rpitit.rs #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/gat-outlives.rs b/tests/ui/impl-trait/in-trait/gat-outlives.rs index 83dd6cfce53c5..eb9cac228bd09 100644 --- a/tests/ui/impl-trait/in-trait/gat-outlives.rs +++ b/tests/ui/impl-trait/in-trait/gat-outlives.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/impl-trait/in-trait/issue-102301.rs b/tests/ui/impl-trait/in-trait/issue-102301.rs index 600a21b07be54..2e2a38a29b2bc 100644 --- a/tests/ui/impl-trait/in-trait/issue-102301.rs +++ b/tests/ui/impl-trait/in-trait/issue-102301.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs index 4073ef8ac192a..e0d4f461974f8 100644 --- a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs +++ b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.rs b/tests/ui/impl-trait/in-trait/method-signature-matches.rs index 99ace66facb5f..e6ab932e18e8e 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.rs +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// revisions: mismatch mismatch_async too_many too_few lt +//@ edition: 2021 +//@ revisions: mismatch mismatch_async too_many too_few lt #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs index b97fd7d1ffe90..3a173efb32db0 100644 --- a/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs +++ b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit.rs b/tests/ui/impl-trait/in-trait/nested-rpitit.rs index 58b79c991559d..b19f378cdc161 100644 --- a/tests/ui/impl-trait/in-trait/nested-rpitit.rs +++ b/tests/ui/impl-trait/in-trait/nested-rpitit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/object-safety-sized.rs index 1a23493a94d6b..2bd8ea646a18a 100644 --- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs +++ b/tests/ui/impl-trait/in-trait/object-safety-sized.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn main() { diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl.rs b/tests/ui/impl-trait/in-trait/opaque-in-impl.rs index 3edd588a1b39b..b0279168fde75 100644 --- a/tests/ui/impl-trait/in-trait/opaque-in-impl.rs +++ b/tests/ui/impl-trait/in-trait/opaque-in-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/opaque-variances.rs b/tests/ui/impl-trait/in-trait/opaque-variances.rs index 63e56051d1a8d..f0feea21f84a0 100644 --- a/tests/ui/impl-trait/in-trait/opaque-variances.rs +++ b/tests/ui/impl-trait/in-trait/opaque-variances.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn foo<'a: 'a>(x: &'a Vec) -> impl Sized { () diff --git a/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs index 317ff7fe8538b..7fbdf2e9b16a8 100644 --- a/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs +++ b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { diff --git a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs index 33d3487030e4d..f7546a05bfdb6 100644 --- a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs +++ b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn main() {} diff --git a/tests/ui/impl-trait/in-trait/reveal.rs b/tests/ui/impl-trait/in-trait/reveal.rs index cc78ce8fea2d4..a63e7c457d4bc 100644 --- a/tests/ui/impl-trait/in-trait/reveal.rs +++ b/tests/ui/impl-trait/in-trait/reveal.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/signature-mismatch.rs b/tests/ui/impl-trait/in-trait/signature-mismatch.rs index d85ee5fc70461..7a74281b1f296 100644 --- a/tests/ui/impl-trait/in-trait/signature-mismatch.rs +++ b/tests/ui/impl-trait/in-trait/signature-mismatch.rs @@ -1,6 +1,6 @@ -// edition:2021 -// revisions: success failure -//[success] check-pass +//@ edition:2021 +//@ revisions: success failure +//@[success] check-pass #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs b/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs index 0538663275868..3ef6735de8045 100644 --- a/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs +++ b/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/success.rs b/tests/ui/impl-trait/in-trait/success.rs index eb2349feb29e2..750804f792066 100644 --- a/tests/ui/impl-trait/in-trait/success.rs +++ b/tests/ui/impl-trait/in-trait/success.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed index ecc8488a15299..6764ab002a9d6 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] trait Trait { diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs index 860fea07df964..99a8bfe79fd28 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] trait Trait { diff --git a/tests/ui/impl-trait/in-trait/variances-of-gat.rs b/tests/ui/impl-trait/in-trait/variances-of-gat.rs index aabb6f830ed95..39a647580ef90 100644 --- a/tests/ui/impl-trait/in-trait/variances-of-gat.rs +++ b/tests/ui/impl-trait/in-trait/variances-of-gat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} diff --git a/tests/ui/impl-trait/in-trait/where-clause.rs b/tests/ui/impl-trait/in-trait/where-clause.rs index f7f4980b730b5..e502f67c2b7ef 100644 --- a/tests/ui/impl-trait/in-trait/where-clause.rs +++ b/tests/ui/impl-trait/in-trait/where-clause.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/issue-100187.rs b/tests/ui/impl-trait/issue-100187.rs index fc541c6962928..ed693c824ad52 100644 --- a/tests/ui/impl-trait/issue-100187.rs +++ b/tests/ui/impl-trait/issue-100187.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Ty; diff --git a/tests/ui/impl-trait/issue-102605.rs b/tests/ui/impl-trait/issue-102605.rs index 3bbdf35af8f90..c04dbf4759992 100644 --- a/tests/ui/impl-trait/issue-102605.rs +++ b/tests/ui/impl-trait/issue-102605.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() -> Result<(), String> { Ok(()) diff --git a/tests/ui/impl-trait/issue-103181-1.rs b/tests/ui/impl-trait/issue-103181-1.rs index 14c813cf00fde..75333af58eca5 100644 --- a/tests/ui/impl-trait/issue-103181-1.rs +++ b/tests/ui/impl-trait/issue-103181-1.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// edition:2021 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ edition:2021 mod hyper { use std::{fmt::Debug, future::Future, marker::PhantomData, pin::Pin, task::Poll}; diff --git a/tests/ui/impl-trait/issue-103181-2.rs b/tests/ui/impl-trait/issue-103181-2.rs index b43ac45075e2b..72729e851e36b 100644 --- a/tests/ui/impl-trait/issue-103181-2.rs +++ b/tests/ui/impl-trait/issue-103181-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait SendFuture: Send { type Output; diff --git a/tests/ui/impl-trait/issue-103599.rs b/tests/ui/impl-trait/issue-103599.rs index 043ae67f2e15c..62741a7454cee 100644 --- a/tests/ui/impl-trait/issue-103599.rs +++ b/tests/ui/impl-trait/issue-103599.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T {} diff --git a/tests/ui/impl-trait/issue-108591.rs b/tests/ui/impl-trait/issue-108591.rs index 91ea2e9fb850b..caf080245687b 100644 --- a/tests/ui/impl-trait/issue-108591.rs +++ b/tests/ui/impl-trait/issue-108591.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issue-108592.rs b/tests/ui/impl-trait/issue-108592.rs index 953fffc4898f4..624bb79006ea3 100644 --- a/tests/ui/impl-trait/issue-108592.rs +++ b/tests/ui/impl-trait/issue-108592.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn opaque<'a: 'a>() -> impl Sized {} diff --git a/tests/ui/impl-trait/issue-36792.rs b/tests/ui/impl-trait/issue-36792.rs index 99ae633dd0e75..6682a953fa0bd 100644 --- a/tests/ui/impl-trait/issue-36792.rs +++ b/tests/ui/impl-trait/issue-36792.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> impl Copy { foo } diff --git a/tests/ui/impl-trait/issue-46959.rs b/tests/ui/impl-trait/issue-46959.rs index 3611a956836ce..0acb293384cbe 100644 --- a/tests/ui/impl-trait/issue-46959.rs +++ b/tests/ui/impl-trait/issue-46959.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] #[allow(dead_code)] diff --git a/tests/ui/impl-trait/issue-49556.rs b/tests/ui/impl-trait/issue-49556.rs index c8c172f0e2f7f..82275bf12b464 100644 --- a/tests/ui/impl-trait/issue-49556.rs +++ b/tests/ui/impl-trait/issue-49556.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn iter<'a>(data: &'a [usize]) -> impl Iterator + 'a { data.iter() .map( diff --git a/tests/ui/impl-trait/issue-49579.rs b/tests/ui/impl-trait/issue-49579.rs index 98de014e90bea..4b2f186e38adf 100644 --- a/tests/ui/impl-trait/issue-49579.rs +++ b/tests/ui/impl-trait/issue-49579.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn fibs(n: u32) -> impl Iterator { (0 .. n) diff --git a/tests/ui/impl-trait/issue-49685.rs b/tests/ui/impl-trait/issue-49685.rs index fb328d67b75ab..82556cc242c10 100644 --- a/tests/ui/impl-trait/issue-49685.rs +++ b/tests/ui/impl-trait/issue-49685.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #49685: drop elaboration was not revealing the // value of `impl Trait` returns, leading to an ICE. diff --git a/tests/ui/impl-trait/issue-51185.rs b/tests/ui/impl-trait/issue-51185.rs index 52a2b25539d7c..ddba905835f84 100644 --- a/tests/ui/impl-trait/issue-51185.rs +++ b/tests/ui/impl-trait/issue-51185.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> impl Into fn(&'a ())> { (|_| {}) as for<'a> fn(&'a ()) } diff --git a/tests/ui/impl-trait/issue-55872-2.rs b/tests/ui/impl-trait/issue-55872-2.rs index 8a96fdc5c63d1..caca5c69a4aea 100644 --- a/tests/ui/impl-trait/issue-55872-2.rs +++ b/tests/ui/impl-trait/issue-55872-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/issue-55872-3.rs b/tests/ui/impl-trait/issue-55872-3.rs index 7490a1308006b..3f931027d9a38 100644 --- a/tests/ui/impl-trait/issue-55872-3.rs +++ b/tests/ui/impl-trait/issue-55872-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/issue-56445.rs b/tests/ui/impl-trait/issue-56445.rs index 6dd1648c9b84c..af6182d546b71 100644 --- a/tests/ui/impl-trait/issue-56445.rs +++ b/tests/ui/impl-trait/issue-56445.rs @@ -1,5 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-629426939 -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/impl-trait/issue-68532.rs b/tests/ui/impl-trait/issue-68532.rs index 01a7af0aee40e..ce653ee058f47 100644 --- a/tests/ui/impl-trait/issue-68532.rs +++ b/tests/ui/impl-trait/issue-68532.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct A<'a>(&'a ()); diff --git a/tests/ui/impl-trait/issue-99642-2.rs b/tests/ui/impl-trait/issue-99642-2.rs index 0e88b363338a9..acbf3e3e2a024 100644 --- a/tests/ui/impl-trait/issue-99642-2.rs +++ b/tests/ui/impl-trait/issue-99642-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Opq = impl Sized; diff --git a/tests/ui/impl-trait/issue-99642.rs b/tests/ui/impl-trait/issue-99642.rs index 75af60491e438..ed4786ae8d812 100644 --- a/tests/ui/impl-trait/issue-99642.rs +++ b/tests/ui/impl-trait/issue-99642.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn test() -> impl Iterator { Box::new(0..) as Box> diff --git a/tests/ui/impl-trait/issue-99914.rs b/tests/ui/impl-trait/issue-99914.rs index 4324a0229a6ff..a7858740f09fa 100644 --- a/tests/ui/impl-trait/issue-99914.rs +++ b/tests/ui/impl-trait/issue-99914.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() {} diff --git a/tests/ui/impl-trait/issues/issue-104815.rs b/tests/ui/impl-trait/issues/issue-104815.rs index 7a9826a8dff91..088d7815f701c 100644 --- a/tests/ui/impl-trait/issues/issue-104815.rs +++ b/tests/ui/impl-trait/issues/issue-104815.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct It; diff --git a/tests/ui/impl-trait/issues/issue-105826.rs b/tests/ui/impl-trait/issues/issue-105826.rs index 06dc2d4c8d34b..e3488140dcc7a 100644 --- a/tests/ui/impl-trait/issues/issue-105826.rs +++ b/tests/ui/impl-trait/issues/issue-105826.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::io::Write; diff --git a/tests/ui/impl-trait/issues/issue-42479.rs b/tests/ui/impl-trait/issues/issue-42479.rs index efc1f975d16ed..348f75b2fb6d8 100644 --- a/tests/ui/impl-trait/issues/issue-42479.rs +++ b/tests/ui/impl-trait/issues/issue-42479.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::iter::once; diff --git a/tests/ui/impl-trait/issues/issue-49376.rs b/tests/ui/impl-trait/issues/issue-49376.rs index e4472fcc16097..faf039fc352af 100644 --- a/tests/ui/impl-trait/issues/issue-49376.rs +++ b/tests/ui/impl-trait/issues/issue-49376.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests for nested self-reference which caused a stack overflow. diff --git a/tests/ui/impl-trait/issues/issue-52128.rs b/tests/ui/impl-trait/issues/issue-52128.rs index 5afd380dd4f2e..2504308bb4687 100644 --- a/tests/ui/impl-trait/issues/issue-52128.rs +++ b/tests/ui/impl-trait/issues/issue-52128.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(warnings)] diff --git a/tests/ui/impl-trait/issues/issue-53457.rs b/tests/ui/impl-trait/issues/issue-53457.rs index 7b9c2c53aad4f..bb248ef717733 100644 --- a/tests/ui/impl-trait/issues/issue-53457.rs +++ b/tests/ui/impl-trait/issues/issue-53457.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type X = impl Clone; diff --git a/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs b/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs index 0c34c97e2584f..c8ac477632cd5 100644 --- a/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs +++ b/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs @@ -1,7 +1,7 @@ // This used to ICE because it creates an `impl Trait` that captures a // hidden empty region. -// check-pass +//@ check-pass fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") diff --git a/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs b/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs index c4f738a34b6f3..3567e2368e22b 100644 --- a/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs +++ b/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs @@ -5,7 +5,7 @@ // opaque type. As all regions are now required to outlive the bound in an // opaque type we avoid the issue here. -// check-pass +//@ check-pass struct A(F); diff --git a/tests/ui/impl-trait/issues/issue-65581.rs b/tests/ui/impl-trait/issues/issue-65581.rs index af65b79d3e838..4a9b7f74dd6fa 100644 --- a/tests/ui/impl-trait/issues/issue-65581.rs +++ b/tests/ui/impl-trait/issues/issue-65581.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/issues/issue-77987.rs b/tests/ui/impl-trait/issues/issue-77987.rs index d29710b6f54ca..b77f993effce1 100644 --- a/tests/ui/impl-trait/issues/issue-77987.rs +++ b/tests/ui/impl-trait/issues/issue-77987.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Foo {} impl Foo for U {} diff --git a/tests/ui/impl-trait/issues/issue-78722-2.rs b/tests/ui/impl-trait/issues/issue-78722-2.rs index cf5361e1e602c..26181b612ed25 100644 --- a/tests/ui/impl-trait/issues/issue-78722-2.rs +++ b/tests/ui/impl-trait/issues/issue-78722-2.rs @@ -1,6 +1,6 @@ //! test that we cannot register hidden types for opaque types //! declared outside an anonymous constant. -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issues/issue-78722.rs b/tests/ui/impl-trait/issues/issue-78722.rs index 75ccc8d8e8a9a..5518c2cf12a3b 100644 --- a/tests/ui/impl-trait/issues/issue-78722.rs +++ b/tests/ui/impl-trait/issues/issue-78722.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issues/issue-83919.rs b/tests/ui/impl-trait/issues/issue-83919.rs index 4e699e7f30260..705c2c4dc5e1d 100644 --- a/tests/ui/impl-trait/issues/issue-83919.rs +++ b/tests/ui/impl-trait/issues/issue-83919.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// edition:2021 +//@ edition:2021 use std::future::Future; diff --git a/tests/ui/impl-trait/issues/issue-86201.rs b/tests/ui/impl-trait/issues/issue-86201.rs index 0786e66ca8b06..cde0b86116033 100644 --- a/tests/ui/impl-trait/issues/issue-86201.rs +++ b/tests/ui/impl-trait/issues/issue-86201.rs @@ -1,7 +1,7 @@ #![feature(unboxed_closures)] #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type FunType = impl Fn<()>; static STATIC_FN: FunType = some_fn; diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs index 297b012d90a72..ae6e198c2ad46 100644 --- a/tests/ui/impl-trait/issues/issue-86800.rs +++ b/tests/ui/impl-trait/issues/issue-86800.rs @@ -1,12 +1,12 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// compile-flags:-Z treat-err-as-bug=2 -// error-pattern: due to `-Z treat-err-as-bug=2 -// failure-status:101 -// normalize-stderr-test ".*note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ edition:2021 +//@ compile-flags:-Z treat-err-as-bug=2 +//@ error-pattern: due to `-Z treat-err-as-bug=2 +//@ failure-status:101 +//@ normalize-stderr-test ".*note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 use std::future::Future; diff --git a/tests/ui/impl-trait/issues/issue-89312.rs b/tests/ui/impl-trait/issues/issue-89312.rs index d685a6f120109..4304e3bc1b4e5 100644 --- a/tests/ui/impl-trait/issues/issue-89312.rs +++ b/tests/ui/impl-trait/issues/issue-89312.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait T { type Item; } diff --git a/tests/ui/impl-trait/issues/issue-92305.rs b/tests/ui/impl-trait/issues/issue-92305.rs index 4a89238d07e60..5ecb6984cfe7e 100644 --- a/tests/ui/impl-trait/issues/issue-92305.rs +++ b/tests/ui/impl-trait/issues/issue-92305.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::iter; diff --git a/tests/ui/impl-trait/issues/issue-93788.rs b/tests/ui/impl-trait/issues/issue-93788.rs index 6924931cda5db..6576af0ef5311 100644 --- a/tests/ui/impl-trait/issues/issue-93788.rs +++ b/tests/ui/impl-trait/issues/issue-93788.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct D; diff --git a/tests/ui/impl-trait/lifetime-ambiguity-regression.rs b/tests/ui/impl-trait/lifetime-ambiguity-regression.rs index ce6ae3786e164..6c3310a883d95 100644 --- a/tests/ui/impl-trait/lifetime-ambiguity-regression.rs +++ b/tests/ui/impl-trait/lifetime-ambiguity-regression.rs @@ -4,7 +4,7 @@ //! picking either is fine, but then we'll fail an identity check of the hidden //! type and the expected hidden type. -// check-pass +//@ check-pass fn test<'a: 'b, 'b: 'a>() -> impl IntoIterator)> { None::<(_, (_, _))> diff --git a/tests/ui/impl-trait/lifetimes.rs b/tests/ui/impl-trait/lifetimes.rs index f853117a9c6e4..93a4801fa40ef 100644 --- a/tests/ui/impl-trait/lifetimes.rs +++ b/tests/ui/impl-trait/lifetimes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #![feature(coroutines)] diff --git a/tests/ui/impl-trait/lifetimes2.rs b/tests/ui/impl-trait/lifetimes2.rs index 834f2dc6cb5b6..facf2f75bc4d0 100644 --- a/tests/ui/impl-trait/lifetimes2.rs +++ b/tests/ui/impl-trait/lifetimes2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn keys<'a>(x: &'a Result) -> impl std::fmt::Debug + 'a { match x { diff --git a/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs b/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs index a2dd0a9308d3e..d208f828694e4 100644 --- a/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs +++ b/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass // issue: 114597 -// edition: 2021 +//@ edition: 2021 struct A<'a> { dat: &'a (), diff --git a/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs b/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs index 5251eeee8bb26..c43bf53634dce 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs index 5407fb6dd2804..1e949dee16f7e 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs @@ -1,5 +1,5 @@ // Test that multiple lifetimes are allowed in impl trait types. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait X<'x>: Sized {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs index 0bddce49b4032..fd4679b39326a 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass? +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass? trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs index e363fdb36e3ae..6f90160866ba4 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(type_alias_impl_trait)] trait Trait<'a, 'b> {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs index 0f21dd5ffe508..04d7723747cd0 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs index 13ad1f7215f34..8acbc3130b9f7 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs index c6eea5323fd80..0f85eec75747c 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs index adcbca2a438b4..ef1b31f1d580b 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/needs_least_region_or_bound.rs b/tests/ui/impl-trait/needs_least_region_or_bound.rs index c4bcfe5b28133..d2342ec1abdbf 100644 --- a/tests/ui/impl-trait/needs_least_region_or_bound.rs +++ b/tests/ui/impl-trait/needs_least_region_or_bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MultiRegionTrait<'a, 'b> {} impl<'a, 'b> MultiRegionTrait<'a, 'b> for (&'a u32, &'b u32) {} diff --git a/tests/ui/impl-trait/nested-return-type.rs b/tests/ui/impl-trait/nested-return-type.rs index 7d7a084b89046..86ce2a06cc00a 100644 --- a/tests/ui/impl-trait/nested-return-type.rs +++ b/tests/ui/impl-trait/nested-return-type.rs @@ -1,5 +1,5 @@ // Check that nested impl Trait items work in functions with generic parameters. -// check-pass +//@ check-pass trait Captures<'a> {} diff --git a/tests/ui/impl-trait/nested-return-type2-tait.rs b/tests/ui/impl-trait/nested-return-type2-tait.rs index 089018a1cdf01..7cb98cfe0601f 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Duh {} diff --git a/tests/ui/impl-trait/nested-return-type2-tait2.rs b/tests/ui/impl-trait/nested-return-type2-tait2.rs index b7fee1d91d164..574602079d434 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait2.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type2-tait3.rs b/tests/ui/impl-trait/nested-return-type2-tait3.rs index eed5c271f88eb..e342973178257 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait3.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type2.rs b/tests/ui/impl-trait/nested-return-type2.rs index e1d5511379e7a..f43ac23b5ed95 100644 --- a/tests/ui/impl-trait/nested-return-type2.rs +++ b/tests/ui/impl-trait/nested-return-type2.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir // Using -Zvalidate-mir as a regression test for #107346. diff --git a/tests/ui/impl-trait/nested-return-type3-tait.rs b/tests/ui/impl-trait/nested-return-type3-tait.rs index 3a97e35b4c400..05759fb26979c 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3-tait2.rs b/tests/ui/impl-trait/nested-return-type3-tait2.rs index 5b6f78a989687..927fa8d596b9d 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait2.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3-tait3.rs b/tests/ui/impl-trait/nested-return-type3-tait3.rs index 394d8f581102f..5b3b2d2e1986e 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait3.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3.rs b/tests/ui/impl-trait/nested-return-type3.rs index 74b4dae22ebfd..a5b15dfc9e5a2 100644 --- a/tests/ui/impl-trait/nested-return-type3.rs +++ b/tests/ui/impl-trait/nested-return-type3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Duh {} diff --git a/tests/ui/impl-trait/nested-return-type4.rs b/tests/ui/impl-trait/nested-return-type4.rs index cec70bb1a0d9e..ab21166d94ed2 100644 --- a/tests/ui/impl-trait/nested-return-type4.rs +++ b/tests/ui/impl-trait/nested-return-type4.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn test<'s: 's>(s: &'s str) -> impl std::future::Future { async move { let _s = s; } diff --git a/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs index 287a030cf876b..5bc0c0d4b7abb 100644 --- a/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs +++ b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct VecNumber<'s> { pub vec_number: Vec>, diff --git a/tests/ui/impl-trait/nesting.rs b/tests/ui/impl-trait/nesting.rs index 27bdd5fa483b7..27f572e8b1d5f 100644 --- a/tests/ui/impl-trait/nesting.rs +++ b/tests/ui/impl-trait/nesting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn foo(t: T) -> impl Into<[T; { const FOO: usize = 1; FOO }]> { diff --git a/tests/ui/impl-trait/no-method-suggested-traits.rs b/tests/ui/impl-trait/no-method-suggested-traits.rs index c8abc2d8f8ee0..6fc96f27a671e 100644 --- a/tests/ui/impl-trait/no-method-suggested-traits.rs +++ b/tests/ui/impl-trait/no-method-suggested-traits.rs @@ -1,4 +1,4 @@ -// aux-build:no_method_suggested_traits.rs +//@ aux-build:no_method_suggested_traits.rs extern crate no_method_suggested_traits; struct Foo; diff --git a/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs b/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs index 1025c2c7e8ad7..4fa4402db055f 100644 --- a/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs +++ b/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2021 -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 // We were not normalizing opaques with escaping bound vars during codegen, // leading to later linker errors because of differences in mangled symbol name. diff --git a/tests/ui/impl-trait/normalize-tait-in-const.rs b/tests/ui/impl-trait/normalize-tait-in-const.rs index dd03fd3f754d4..ccd073b807094 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.rs +++ b/tests/ui/impl-trait/normalize-tait-in-const.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(type_alias_impl_trait)] #![feature(const_trait_impl)] diff --git a/tests/ui/impl-trait/not_general_enough_regression_106630.rs b/tests/ui/impl-trait/not_general_enough_regression_106630.rs index 439973950f397..2a9719cfb5a4a 100644 --- a/tests/ui/impl-trait/not_general_enough_regression_106630.rs +++ b/tests/ui/impl-trait/not_general_enough_regression_106630.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass use std::future::Future; diff --git a/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs b/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs index 3e3bc09a62aa8..c1a4d2df28447 100644 --- a/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs +++ b/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/impl-trait/private_unused.rs b/tests/ui/impl-trait/private_unused.rs index 92268f1861d63..fa0926ee8bff8 100644 --- a/tests/ui/impl-trait/private_unused.rs +++ b/tests/ui/impl-trait/private_unused.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/tests/ui/impl-trait/projection.rs b/tests/ui/impl-trait/projection.rs index b33802e2bc8da..d966ef335d51f 100644 --- a/tests/ui/impl-trait/projection.rs +++ b/tests/ui/impl-trait/projection.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // needs to be build-pass, because it is a regression test for a mir validation failure // that only happens during codegen. diff --git a/tests/ui/impl-trait/question_mark.rs b/tests/ui/impl-trait/question_mark.rs index 7bd5cff31bbdf..d7c326b9e1c2a 100644 --- a/tests/ui/impl-trait/question_mark.rs +++ b/tests/ui/impl-trait/question_mark.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/recursive-auto-trait.rs b/tests/ui/impl-trait/recursive-auto-trait.rs index d7b68144ff6ba..3f759837cbf44 100644 --- a/tests/ui/impl-trait/recursive-auto-trait.rs +++ b/tests/ui/impl-trait/recursive-auto-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn is_send(_: T) {} fn foo() -> impl Send { if false { diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.rs b/tests/ui/impl-trait/recursive-coroutine-boxed.rs index 3f677986c137c..a42ae68f28e97 100644 --- a/tests/ui/impl-trait/recursive-coroutine-boxed.rs +++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[current] check-pass -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[current] check-pass +//@[next] compile-flags: -Znext-solver #![feature(coroutines, coroutine_trait)] use std::ops::{Coroutine, CoroutineState}; diff --git a/tests/ui/impl-trait/recursive-coroutine-indirect.rs b/tests/ui/impl-trait/recursive-coroutine-indirect.rs index 99b6be3358fc0..31d22970e048a 100644 --- a/tests/ui/impl-trait/recursive-coroutine-indirect.rs +++ b/tests/ui/impl-trait/recursive-coroutine-indirect.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver -//[next] build-fail +//@[next] build-fail // Deeply normalizing writeback results of opaques makes this into a post-mono error :( #![feature(coroutines)] diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs b/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs index 540a280f0a319..1d82f89d7a1a3 100644 --- a/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs +++ b/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unconditional_recursion)] diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs index 01c933473ea71..b369544782c77 100644 --- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs +++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl PartialEq<(Foo, i32)>; diff --git a/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs b/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs index 9f63a8617babd..0b31adac36657 100644 --- a/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs +++ b/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs @@ -5,7 +5,7 @@ // // See https://github.com/rust-lang/rust/issues/46541 for more details. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs b/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs index 79319dfe796a2..0518e1c69469c 100644 --- a/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs +++ b/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs @@ -5,7 +5,7 @@ // // See https://github.com/rust-lang/rust/issues/46541 for more details. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/return-position-impl-trait-minimal.rs b/tests/ui/impl-trait/return-position-impl-trait-minimal.rs index 6d3c0692970dc..b287cacd40559 100644 --- a/tests/ui/impl-trait/return-position-impl-trait-minimal.rs +++ b/tests/ui/impl-trait/return-position-impl-trait-minimal.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/tests/ui/impl-trait/reveal-during-codegen.rs b/tests/ui/impl-trait/reveal-during-codegen.rs index 7b2ca9c33f6d6..996f0bb8bbf28 100644 --- a/tests/ui/impl-trait/reveal-during-codegen.rs +++ b/tests/ui/impl-trait/reveal-during-codegen.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ build-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn test() -> Option { Some("") diff --git a/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs b/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs index a4e603de1ac24..73c8a6c0aed9f 100644 --- a/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs +++ b/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn iter<'a>(v: Vec<(u32, &'a u32)>) -> impl DoubleEndedIterator { v.into_iter() diff --git a/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs b/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs index 6207381c7452c..00583a06c4c44 100644 --- a/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs +++ b/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // related to #113916, check that using RPITs in functions with lifetime params // which are constrained to be equal compiles. diff --git a/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs b/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs index 91a0e0d48299c..b6395258c892f 100644 --- a/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs +++ b/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/impl-trait/trait_resolution.rs b/tests/ui/impl-trait/trait_resolution.rs index 8dcbbfd6e6492..ee9853b47880f 100644 --- a/tests/ui/impl-trait/trait_resolution.rs +++ b/tests/ui/impl-trait/trait_resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs b/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs index 7bc22ea416f06..0458e4520bfa1 100644 --- a/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs +++ b/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs @@ -1,5 +1,5 @@ //! Check that typeck can observe the size of an opaque type. -// check-pass +//@ check-pass use std::mem::transmute; fn foo() -> impl Sized { 0u8 diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.rs b/tests/ui/impl-trait/two_tait_defining_each_other.rs index 6a9e33500e513..0c3376b413f66 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.rs b/tests/ui/impl-trait/two_tait_defining_each_other2.rs index b2f768f4dcd70..229a74119516d 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other2.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other2.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] type A = impl Foo; //[current]~ ERROR unconstrained opaque type diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.rs b/tests/ui/impl-trait/two_tait_defining_each_other3.rs index 55def937f4860..a596860e176d3 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other3.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other3.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] type A = impl Foo; diff --git a/tests/ui/impl-trait/type-alias-generic-param.rs b/tests/ui/impl-trait/type-alias-generic-param.rs index e4b2e4124202f..c418351b12907 100644 --- a/tests/ui/impl-trait/type-alias-generic-param.rs +++ b/tests/ui/impl-trait/type-alias-generic-param.rs @@ -2,7 +2,7 @@ // Checks that we properly detect defining uses of opaque // types in 'item' position when generic parameters are involved // -// run-pass +//@ run-pass #![feature(impl_trait_in_assoc_type)] trait Meow { //~ WARN trait `Meow` is never used diff --git a/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs index 91be4efd56a15..9269983158092 100644 --- a/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs +++ b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/unactionable_diagnostic.fixed b/tests/ui/impl-trait/unactionable_diagnostic.fixed index d446512ffc281..e9ab9f2cf18ae 100644 --- a/tests/ui/impl-trait/unactionable_diagnostic.fixed +++ b/tests/ui/impl-trait/unactionable_diagnostic.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Trait {} diff --git a/tests/ui/impl-trait/unactionable_diagnostic.rs b/tests/ui/impl-trait/unactionable_diagnostic.rs index 76b9a62ca1338..7e65650277a4a 100644 --- a/tests/ui/impl-trait/unactionable_diagnostic.rs +++ b/tests/ui/impl-trait/unactionable_diagnostic.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Trait {} diff --git a/tests/ui/impl-trait/universal_hrtb_anon.rs b/tests/ui/impl-trait/universal_hrtb_anon.rs index 30c8d291f6ad9..2ac5dd7cfb2dc 100644 --- a/tests/ui/impl-trait/universal_hrtb_anon.rs +++ b/tests/ui/impl-trait/universal_hrtb_anon.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn hrtb(f: impl Fn(&u32) -> u32) -> u32 { f(&22) + f(&44) diff --git a/tests/ui/impl-trait/universal_hrtb_named.rs b/tests/ui/impl-trait/universal_hrtb_named.rs index 07ff5d23e0ca6..11088c206fb40 100644 --- a/tests/ui/impl-trait/universal_hrtb_named.rs +++ b/tests/ui/impl-trait/universal_hrtb_named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn hrtb(f: impl for<'a> Fn(&'a u32) -> &'a u32) -> u32 { f(&22) + f(&44) diff --git a/tests/ui/impl-trait/universal_in_adt_in_parameters.rs b/tests/ui/impl-trait/universal_in_adt_in_parameters.rs index a3829133dfaa0..751700e5331df 100644 --- a/tests/ui/impl-trait/universal_in_adt_in_parameters.rs +++ b/tests/ui/impl-trait/universal_in_adt_in_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs b/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs index e98912d95a505..7cead0fb79526 100644 --- a/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs +++ b/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs b/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs index 23c217a8f8b78..0ab04ebc6731e 100644 --- a/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs +++ b/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/universal_multiple_bounds.rs b/tests/ui/impl-trait/universal_multiple_bounds.rs index 40c1405c39be1..006923653d045 100644 --- a/tests/ui/impl-trait/universal_multiple_bounds.rs +++ b/tests/ui/impl-trait/universal_multiple_bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/unsafety-checking-cycle.rs b/tests/ui/impl-trait/unsafety-checking-cycle.rs index 4a5831c5b73df..2306f079e5da8 100644 --- a/tests/ui/impl-trait/unsafety-checking-cycle.rs +++ b/tests/ui/impl-trait/unsafety-checking-cycle.rs @@ -1,7 +1,7 @@ // Ensure that we don't get a cycle error from trying to determine whether an // opaque type implements `Freeze` in safety checking, when it doesn't matter. -// check-pass +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/impl-trait/variance.rs b/tests/ui/impl-trait/variance.rs index 86da1908509fd..72b4a831badcb 100644 --- a/tests/ui/impl-trait/variance.rs +++ b/tests/ui/impl-trait/variance.rs @@ -1,6 +1,6 @@ -// revisions: old new e2024 -//[e2024] edition: 2024 -//[e2024] compile-flags: -Z unstable-options +//@ revisions: old new e2024 +//@[e2024] edition: 2024 +//@[e2024] compile-flags: -Z unstable-options #![cfg_attr(new, feature(lifetime_capture_rules_2024))] diff --git a/tests/ui/impl-trait/wf-eval-order.rs b/tests/ui/impl-trait/wf-eval-order.rs index 8638fc2e77578..695e910ef3ef3 100644 --- a/tests/ui/impl-trait/wf-eval-order.rs +++ b/tests/ui/impl-trait/wf-eval-order.rs @@ -1,6 +1,6 @@ // Check that we handle evaluating `wf` predicates correctly. -// check-pass +//@ check-pass struct X(T) where diff --git a/tests/ui/impl-trait/xcrate.rs b/tests/ui/impl-trait/xcrate.rs index fe106ff055788..62921fcb0c659 100644 --- a/tests/ui/impl-trait/xcrate.rs +++ b/tests/ui/impl-trait/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs extern crate xcrate; diff --git a/tests/ui/impl-trait/xcrate_simple.rs b/tests/ui/impl-trait/xcrate_simple.rs index 2b1fc97e3217e..18ef20e78e0f6 100644 --- a/tests/ui/impl-trait/xcrate_simple.rs +++ b/tests/ui/impl-trait/xcrate_simple.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs extern crate xcrate; diff --git a/tests/ui/implied-bounds/bevy_world_query.rs b/tests/ui/implied-bounds/bevy_world_query.rs index 2e3d4e6a7c667..e36be26d003f2 100644 --- a/tests/ui/implied-bounds/bevy_world_query.rs +++ b/tests/ui/implied-bounds/bevy_world_query.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // We currently special case bevy from erroring on incorrect implied bounds // from normalization (issue #109628). diff --git a/tests/ui/implied-bounds/gluon_salsa.rs b/tests/ui/implied-bounds/gluon_salsa.rs index cd5500cb458f0..368fb1979098f 100644 --- a/tests/ui/implied-bounds/gluon_salsa.rs +++ b/tests/ui/implied-bounds/gluon_salsa.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Found in a crater run on #118553 pub trait QueryBase { diff --git a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs index 69847d6a8bb53..0963053f57806 100644 --- a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs +++ b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a>(&'a ()) where (): Trait<'a>; diff --git a/tests/ui/implied-bounds/ice-unbound-region-vars.rs b/tests/ui/implied-bounds/ice-unbound-region-vars.rs index 9e1e3feaeec9f..f69d4a4bf8678 100644 --- a/tests/ui/implied-bounds/ice-unbound-region-vars.rs +++ b/tests/ui/implied-bounds/ice-unbound-region-vars.rs @@ -1,7 +1,7 @@ // Because of #109628, we can have unbounded region vars in implied bounds. // Make sure we don't ICE in this case! // -// check-pass +//@ check-pass pub trait MapAccess { type Error; diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs index 9b793642d07c9..48d9e290ffb55 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Error: Error; diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs index 86b10a56c9de8..739f2081132fd 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait AsBufferView { type Device; diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs index 1f5562497c12e..f3401f34eec73 100644 --- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs +++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #25860 +//@ check-pass +//@ known-bug: #25860 // Should fail. The combination of variance and implied bounds for nested // references allows us to infer a longer lifetime than we can prove. diff --git a/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs b/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs index 511a9ad9a2a2b..451ab44b1137a 100644 --- a/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84591 +//@ check-pass +//@ known-bug: #84591 trait Subtrait<'a, 'b, R>: Supertrait<'a, 'b> {} trait Supertrait<'a, 'b> { diff --git a/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs b/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs index 025e5176ff7ee..524f6fa9b3fec 100644 --- a/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs +++ b/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #112832. pub trait QueryDb { diff --git a/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs b/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs index 976054facee5e..125d31c5f9aa7 100644 --- a/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Another minimized regression test for #112832. trait Trait { diff --git a/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs b/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs index e0df96b0de8ea..0ddb5497811ba 100644 --- a/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs +++ b/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Data { type Elem; diff --git a/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs b/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs index 8dcc35a281a77..0088bf0c32540 100644 --- a/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs +++ b/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See issue #109356. We don't want a false positive to the `implied_bounds_entailment` lint. use std::borrow::Cow; diff --git a/tests/ui/implied-bounds/issue-101951.rs b/tests/ui/implied-bounds/issue-101951.rs index 108fef8a15fb3..cbcde9834fbd6 100644 --- a/tests/ui/implied-bounds/issue-101951.rs +++ b/tests/ui/implied-bounds/issue-101951.rs @@ -3,7 +3,7 @@ // This test detected that we didn't correctly resolve // inference variables when computing implied bounds. // -// check-pass +//@ check-pass pub trait BuilderFn<'a> { type Output; } diff --git a/tests/ui/implied-bounds/issue-110161.rs b/tests/ui/implied-bounds/issue-110161.rs index e52c8356b52b3..fecac9ec63aff 100644 --- a/tests/ui/implied-bounds/issue-110161.rs +++ b/tests/ui/implied-bounds/issue-110161.rs @@ -1,7 +1,7 @@ // ICE regression relating to unconstrained lifetimes in implied // bounds. See #110161. -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib trait LtTrait { type Ty; diff --git a/tests/ui/implied-bounds/normalization-nested.rs b/tests/ui/implied-bounds/normalization-nested.rs index 6ceb13e94731f..4527e33a291bb 100644 --- a/tests/ui/implied-bounds/normalization-nested.rs +++ b/tests/ui/implied-bounds/normalization-nested.rs @@ -1,13 +1,13 @@ // Test for normalization of projections that appear in the item bounds // (versus those that appear directly in the input types). // -// revisions: param_ty lifetime param_ty_no_compat lifetime_no_compat +//@ revisions: param_ty lifetime param_ty_no_compat lifetime_no_compat -//[param_ty] check-pass -//[param_ty_no_compat] check-pass -//[lifetime_no_compat] check-pass -//[param_ty_no_compat] compile-flags: -Zno-implied-bounds-compat -//[lifetime_no_compat] compile-flags: -Zno-implied-bounds-compat +//@[param_ty] check-pass +//@[param_ty_no_compat] check-pass +//@[lifetime_no_compat] check-pass +//@[param_ty_no_compat] compile-flags: -Zno-implied-bounds-compat +//@[lifetime_no_compat] compile-flags: -Zno-implied-bounds-compat pub trait Iter { type Item; diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.rs b/tests/ui/implied-bounds/normalization-placeholder-leak.rs index 5350dcbb23314..a9dfa69cfd6a4 100644 --- a/tests/ui/implied-bounds/normalization-placeholder-leak.rs +++ b/tests/ui/implied-bounds/normalization-placeholder-leak.rs @@ -2,9 +2,9 @@ // we incorrectly get `X: placeholder('x)`. // Make sure we ignore these bogus bounds and not use them for anything useful. // -// revisions: fail pass -// [fail] check-fail -// [pass] check-pass +//@ revisions: fail pass +//@ [fail] check-fail +//@ [pass] check-pass trait Trait { type Ty<'a> where Self: 'a; diff --git a/tests/ui/implied-bounds/normalization-preserve-equality.rs b/tests/ui/implied-bounds/normalization-preserve-equality.rs index 557c171e515a3..712c8ce945df0 100644 --- a/tests/ui/implied-bounds/normalization-preserve-equality.rs +++ b/tests/ui/implied-bounds/normalization-preserve-equality.rs @@ -1,9 +1,9 @@ // Both revisions should pass. `borrowck` revision is a bug! // -// revisions: wfcheck borrowck -// [wfcheck] check-pass -// [borrowck] check-fail -// [borrowck] known-bug: #106569 +//@ revisions: wfcheck borrowck +//@ [wfcheck] check-pass +//@ [borrowck] check-fail +//@ [borrowck] known-bug: #106569 struct Equal<'a, 'b>(&'a &'b (), &'b &'a ()); // implies 'a == 'b diff --git a/tests/ui/implied-bounds/normalization.rs b/tests/ui/implied-bounds/normalization.rs index f776fc98a9ede..656e18c7e5b47 100644 --- a/tests/ui/implied-bounds/normalization.rs +++ b/tests/ui/implied-bounds/normalization.rs @@ -1,6 +1,6 @@ // Test that we get implied bounds from complex projections after normalization. -// check-pass +//@ check-pass // implementations wil ensure that // WF(>::Ty) implies T: 'a diff --git a/tests/ui/implied-bounds/trait-where-clause-implied.rs b/tests/ui/implied-bounds/trait-where-clause-implied.rs index 5f9ab66d3c896..c6596eff0132e 100644 --- a/tests/ui/implied-bounds/trait-where-clause-implied.rs +++ b/tests/ui/implied-bounds/trait-where-clause-implied.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a, 'b> { fn method(self, _: &'static &'static ()) diff --git a/tests/ui/imports/ambiguous-1.rs b/tests/ui/imports/ambiguous-1.rs index 2c9815864f013..d175444c0f249 100644 --- a/tests/ui/imports/ambiguous-1.rs +++ b/tests/ui/imports/ambiguous-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-10.rs b/tests/ui/imports/ambiguous-10.rs index 5078b734b472d..7c14e3343eb7f 100644 --- a/tests/ui/imports/ambiguous-10.rs +++ b/tests/ui/imports/ambiguous-10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 mod a { diff --git a/tests/ui/imports/ambiguous-11.rs b/tests/ui/imports/ambiguous-11.rs index 0565b9d22acdb..897b990c1681a 100644 --- a/tests/ui/imports/ambiguous-11.rs +++ b/tests/ui/imports/ambiguous-11.rs @@ -1,4 +1,4 @@ -// aux-build: ambiguous-11-extern.rs +//@ aux-build: ambiguous-11-extern.rs extern crate ambiguous_11_extern; diff --git a/tests/ui/imports/ambiguous-12.rs b/tests/ui/imports/ambiguous-12.rs index 6259c13572c70..a033b51f70970 100644 --- a/tests/ui/imports/ambiguous-12.rs +++ b/tests/ui/imports/ambiguous-12.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-13.rs b/tests/ui/imports/ambiguous-13.rs index 82f933c49ac20..1ea04e05d57f0 100644 --- a/tests/ui/imports/ambiguous-13.rs +++ b/tests/ui/imports/ambiguous-13.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 pub mod object { diff --git a/tests/ui/imports/ambiguous-14.rs b/tests/ui/imports/ambiguous-14.rs index 5e880b48c36f4..30d14be9d0efa 100644 --- a/tests/ui/imports/ambiguous-14.rs +++ b/tests/ui/imports/ambiguous-14.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/98467 mod a { diff --git a/tests/ui/imports/ambiguous-15.rs b/tests/ui/imports/ambiguous-15.rs index 8c75c393a4167..b9e8f020d43a4 100644 --- a/tests/ui/imports/ambiguous-15.rs +++ b/tests/ui/imports/ambiguous-15.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 mod t2 { diff --git a/tests/ui/imports/ambiguous-16.rs b/tests/ui/imports/ambiguous-16.rs index e51e30e3ed508..ed30c9d241a74 100644 --- a/tests/ui/imports/ambiguous-16.rs +++ b/tests/ui/imports/ambiguous-16.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099 mod framing { diff --git a/tests/ui/imports/ambiguous-17.rs b/tests/ui/imports/ambiguous-17.rs index 7d01404ce07a6..28c9c1cc86486 100644 --- a/tests/ui/imports/ambiguous-17.rs +++ b/tests/ui/imports/ambiguous-17.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 pub use evp::*; //~ WARNING ambiguous glob re-exports diff --git a/tests/ui/imports/ambiguous-2.rs b/tests/ui/imports/ambiguous-2.rs index 2918feb059107..087431485ad62 100644 --- a/tests/ui/imports/ambiguous-2.rs +++ b/tests/ui/imports/ambiguous-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: ../ambiguous-1.rs +//@ check-pass +//@ aux-build: ../ambiguous-1.rs // https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396 extern crate ambiguous_1; diff --git a/tests/ui/imports/ambiguous-3.rs b/tests/ui/imports/ambiguous-3.rs index 61a5b6b83fbbf..aa98ffe395e26 100644 --- a/tests/ui/imports/ambiguous-3.rs +++ b/tests/ui/imports/ambiguous-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/47525 fn main() { diff --git a/tests/ui/imports/ambiguous-4-extern.rs b/tests/ui/imports/ambiguous-4-extern.rs index 02546768e0e5c..a045ab3d8a597 100644 --- a/tests/ui/imports/ambiguous-4-extern.rs +++ b/tests/ui/imports/ambiguous-4-extern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-4.rs b/tests/ui/imports/ambiguous-4.rs index 1e8f5be5a882e..fcb7b5c667195 100644 --- a/tests/ui/imports/ambiguous-4.rs +++ b/tests/ui/imports/ambiguous-4.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build: ../ambiguous-4-extern.rs +//@ build-pass +//@ aux-build: ../ambiguous-4-extern.rs extern crate ambiguous_4_extern; diff --git a/tests/ui/imports/ambiguous-5.rs b/tests/ui/imports/ambiguous-5.rs index 56092246ab3ae..28447e10d1b68 100644 --- a/tests/ui/imports/ambiguous-5.rs +++ b/tests/ui/imports/ambiguous-5.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 mod a { diff --git a/tests/ui/imports/ambiguous-6.rs b/tests/ui/imports/ambiguous-6.rs index ba2623bf48a68..955cdc3854fc4 100644 --- a/tests/ui/imports/ambiguous-6.rs +++ b/tests/ui/imports/ambiguous-6.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // https://github.com/rust-lang/rust/issues/112713 pub fn foo() -> u32 { diff --git a/tests/ui/imports/ambiguous-8.rs b/tests/ui/imports/ambiguous-8.rs index d44cd9587acfb..3e5131cc3ed4b 100644 --- a/tests/ui/imports/ambiguous-8.rs +++ b/tests/ui/imports/ambiguous-8.rs @@ -1,4 +1,4 @@ -// aux-build: ambiguous-8-extern.rs +//@ aux-build: ambiguous-8-extern.rs extern crate ambiguous_8_extern; diff --git a/tests/ui/imports/ambiguous-9.rs b/tests/ui/imports/ambiguous-9.rs index 9da2467ad9d2f..97321512df0ea 100644 --- a/tests/ui/imports/ambiguous-9.rs +++ b/tests/ui/imports/ambiguous-9.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 pub mod dsl { diff --git a/tests/ui/imports/auxiliary/gensymed.rs b/tests/ui/imports/auxiliary/gensymed.rs index bbb19f5ec6519..e947985c0f6c4 100644 --- a/tests/ui/imports/auxiliary/gensymed.rs +++ b/tests/ui/imports/auxiliary/gensymed.rs @@ -1,3 +1,3 @@ -// edition:2018 +//@ edition:2018 mod std {} diff --git a/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs b/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs index 9dbefdd531be3..0c01aed74066e 100644 --- a/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs +++ b/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs @@ -1,6 +1,6 @@ -// edition: 2018 -// aux-build: issue-114682-5-extern-1.rs -// compile-flags: --extern issue_114682_5_extern_1 +//@ edition: 2018 +//@ aux-build: issue-114682-5-extern-1.rs +//@ compile-flags: --extern issue_114682_5_extern_1 pub mod p { pub use crate::types::*; diff --git a/tests/ui/imports/bad-import-in-nested.rs b/tests/ui/imports/bad-import-in-nested.rs index 2e95480ad412e..917380164ec67 100644 --- a/tests/ui/imports/bad-import-in-nested.rs +++ b/tests/ui/imports/bad-import-in-nested.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/imports/empty-import-prefix-pass-2015.rs b/tests/ui/imports/empty-import-prefix-pass-2015.rs index a3278007c119a..32125e898135b 100644 --- a/tests/ui/imports/empty-import-prefix-pass-2015.rs +++ b/tests/ui/imports/empty-import-prefix-pass-2015.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 use {}; use {{}}; diff --git a/tests/ui/imports/empty-import-prefix-pass.rs b/tests/ui/imports/empty-import-prefix-pass.rs index d76c0da4bd8eb..10845f32aa292 100644 --- a/tests/ui/imports/empty-import-prefix-pass.rs +++ b/tests/ui/imports/empty-import-prefix-pass.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use {}; use {{}}; diff --git a/tests/ui/imports/export-glob-imports-target.rs b/tests/ui/imports/export-glob-imports-target.rs index 4df807ea4c932..0133e8a94b516 100644 --- a/tests/ui/imports/export-glob-imports-target.rs +++ b/tests/ui/imports/export-glob-imports-target.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] @@ -7,7 +7,7 @@ // Modified to not use export since it's going away. --pcw -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { use foo::bar::*; diff --git a/tests/ui/imports/export-multi.rs b/tests/ui/imports/export-multi.rs index 02bdbe8afff0f..b52e952f33c4a 100644 --- a/tests/ui/imports/export-multi.rs +++ b/tests/ui/imports/export-multi.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use m::f; use m::g; diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs index 79683522888cb..30b98739db702 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a macro can correctly expand the alias // in an `extern crate self as ALIAS` item. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs index 244293be72636..a1feaf2e16151 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Test that `extern crate self;` is accepted // syntactically as an item for use in a macro. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs index 009a92e877645..0b082971b80e5 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a macro can correctly expand `self` in // an `extern crate self as ALIAS` item. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs index 9cebb622eeda3..0cd2a0815615c 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) extern crate self as foo; diff --git a/tests/ui/imports/extern-crate-used.rs b/tests/ui/imports/extern-crate-used.rs index 8198c1816a141..b57dd02cd80c7 100644 --- a/tests/ui/imports/extern-crate-used.rs +++ b/tests/ui/imports/extern-crate-used.rs @@ -1,7 +1,7 @@ // Extern crate items are marked as used if they are used // through extern prelude entries introduced by them. -// edition:2018 +//@ edition:2018 #![deny(unused_extern_crates)] diff --git a/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs b/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs index 30d87f90b30a5..c3ad9c42ac3a7 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 macro_rules! define_iso { () => { extern crate std as iso; diff --git a/tests/ui/imports/extern-prelude-extern-crate-cfg.rs b/tests/ui/imports/extern-prelude-extern-crate-cfg.rs index cfae08fccaa4b..346d63dabe7ee 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-cfg.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-cfg.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// compile-flags:--cfg my_feature +//@ build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags:--cfg my_feature #![no_std] diff --git a/tests/ui/imports/extern-prelude-extern-crate-fail.rs b/tests/ui/imports/extern-prelude-extern-crate-fail.rs index feb1ab09dc9e2..2f018851d1936 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-fail.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-fail.rs @@ -1,5 +1,5 @@ -// aux-build:two_macros.rs -// compile-flags:--extern non_existent +//@ aux-build:two_macros.rs +//@ compile-flags:--extern non_existent mod n { extern crate two_macros; diff --git a/tests/ui/imports/extern-prelude-extern-crate-pass.rs b/tests/ui/imports/extern-prelude-extern-crate-pass.rs index c87d58f63e257..cab33735ba698 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-pass.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-pass.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:two_macros.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs b/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs index 6ff3ab73639c0..666b9f279ae50 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs macro_rules! define_vec { () => { diff --git a/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs b/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs index 9e69a27d7c4ce..02e730e653317 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:two_macros.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:two_macros.rs extern crate two_macros as core; diff --git a/tests/ui/imports/extern-with-ambiguous-1.rs b/tests/ui/imports/extern-with-ambiguous-1.rs index 42c3c20686b36..6d96c3fbeaeae 100644 --- a/tests/ui/imports/extern-with-ambiguous-1.rs +++ b/tests/ui/imports/extern-with-ambiguous-1.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// aux-build: extern-with-ambiguous-1-extern.rs +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-1-extern.rs // `extern-with-ambiguous-1-extern.rs` doesn't has // ambiguous, just for compare. diff --git a/tests/ui/imports/extern-with-ambiguous-2.rs b/tests/ui/imports/extern-with-ambiguous-2.rs index b7c9cccdb6402..dcab2bcc18eac 100644 --- a/tests/ui/imports/extern-with-ambiguous-2.rs +++ b/tests/ui/imports/extern-with-ambiguous-2.rs @@ -1,6 +1,6 @@ -// check-pass -// edition: 2021 -// aux-build: extern-with-ambiguous-2-extern.rs +//@ check-pass +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-2-extern.rs extern crate extern_with_ambiguous_2_extern; diff --git a/tests/ui/imports/extern-with-ambiguous-3.rs b/tests/ui/imports/extern-with-ambiguous-3.rs index 44a9a2a00a453..c65fedbe2c1df 100644 --- a/tests/ui/imports/extern-with-ambiguous-3.rs +++ b/tests/ui/imports/extern-with-ambiguous-3.rs @@ -1,6 +1,6 @@ -// check-pass -// edition: 2021 -// aux-build: extern-with-ambiguous-3-extern.rs +//@ check-pass +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-3-extern.rs // https://github.com/rust-lang/rust/pull/113099#issuecomment-1643974121 extern crate extern_with_ambiguous_3_extern; diff --git a/tests/ui/imports/gensymed.rs b/tests/ui/imports/gensymed.rs index 7b53f0c536ad9..d13a380a7ee82 100644 --- a/tests/ui/imports/gensymed.rs +++ b/tests/ui/imports/gensymed.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:gensymed.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:gensymed.rs extern crate gensymed; diff --git a/tests/ui/imports/glob-conflict-cross-crate-1.rs b/tests/ui/imports/glob-conflict-cross-crate-1.rs index 832e6c888a646..5f0433d13fcfd 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-1.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-1.rs @@ -1,4 +1,4 @@ -// aux-build:glob-conflict.rs +//@ aux-build:glob-conflict.rs extern crate glob_conflict; diff --git a/tests/ui/imports/glob-conflict-cross-crate-2.rs b/tests/ui/imports/glob-conflict-cross-crate-2.rs index 6ba71ad30ac54..b764685dd5796 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-2.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-2.rs @@ -1,4 +1,4 @@ -// aux-build:glob-conflict-cross-crate-2-extern.rs +//@ aux-build:glob-conflict-cross-crate-2-extern.rs extern crate glob_conflict_cross_crate_2_extern; diff --git a/tests/ui/imports/glob-conflict-cross-crate-3.rs b/tests/ui/imports/glob-conflict-cross-crate-3.rs index 535d87d8ea284..7797b5b7c069a 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-3.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-3.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:glob-conflict-cross-crate-2-extern.rs +//@ check-pass +//@ aux-build:glob-conflict-cross-crate-2-extern.rs extern crate glob_conflict_cross_crate_2_extern; diff --git a/tests/ui/imports/glob-cycles.rs b/tests/ui/imports/glob-cycles.rs index f354cc885d00d..066aa3b53ea86 100644 --- a/tests/ui/imports/glob-cycles.rs +++ b/tests/ui/imports/glob-cycles.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { pub use bar::*; diff --git a/tests/ui/imports/glob-use-std.rs b/tests/ui/imports/glob-use-std.rs index ef06cc570d557..b625543da81f5 100644 --- a/tests/ui/imports/glob-use-std.rs +++ b/tests/ui/imports/glob-use-std.rs @@ -1,8 +1,8 @@ // Issue #7580 -// run-fail -// error-pattern:panic works -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic works +//@ ignore-emscripten no processes use std::*; diff --git a/tests/ui/imports/import-after-macro-expand-1.rs b/tests/ui/imports/import-after-macro-expand-1.rs index d7a8aaf2f2e25..ff21e21b629df 100644 --- a/tests/ui/imports/import-after-macro-expand-1.rs +++ b/tests/ui/imports/import-after-macro-expand-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/56593#issue-388659456 struct Foo; diff --git a/tests/ui/imports/import-after-macro-expand-10.rs b/tests/ui/imports/import-after-macro-expand-10.rs index b3520c42dfc57..eb04936a5feb7 100644 --- a/tests/ui/imports/import-after-macro-expand-10.rs +++ b/tests/ui/imports/import-after-macro-expand-10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod b { pub mod http { diff --git a/tests/ui/imports/import-after-macro-expand-11.rs b/tests/ui/imports/import-after-macro-expand-11.rs index 2b81dfc236a5b..897c3001cc928 100644 --- a/tests/ui/imports/import-after-macro-expand-11.rs +++ b/tests/ui/imports/import-after-macro-expand-11.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Debug)] struct H; diff --git a/tests/ui/imports/import-after-macro-expand-12.rs b/tests/ui/imports/import-after-macro-expand-12.rs index f92e8c12fca81..894423815287c 100644 --- a/tests/ui/imports/import-after-macro-expand-12.rs +++ b/tests/ui/imports/import-after-macro-expand-12.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/115377 use module::*; diff --git a/tests/ui/imports/import-after-macro-expand-13.rs b/tests/ui/imports/import-after-macro-expand-13.rs index fd640002c3edc..016d897732d9f 100644 --- a/tests/ui/imports/import-after-macro-expand-13.rs +++ b/tests/ui/imports/import-after-macro-expand-13.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // similar as `import-after-macro-expand-6.rs` use crate::a::HeaderMap; diff --git a/tests/ui/imports/import-after-macro-expand-14.rs b/tests/ui/imports/import-after-macro-expand-14.rs index 4d461a0e20c3a..0af312f375efa 100644 --- a/tests/ui/imports/import-after-macro-expand-14.rs +++ b/tests/ui/imports/import-after-macro-expand-14.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use crate::a::HeaderMap; diff --git a/tests/ui/imports/import-after-macro-expand-2.rs b/tests/ui/imports/import-after-macro-expand-2.rs index ff773fc827200..f0b5fbf02d90d 100644 --- a/tests/ui/imports/import-after-macro-expand-2.rs +++ b/tests/ui/imports/import-after-macro-expand-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/56593#issuecomment-1133174514 use thing::*; diff --git a/tests/ui/imports/import-after-macro-expand-3.rs b/tests/ui/imports/import-after-macro-expand-3.rs index 3babe1470fc10..0043e9016a016 100644 --- a/tests/ui/imports/import-after-macro-expand-3.rs +++ b/tests/ui/imports/import-after-macro-expand-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // similar with `import-after-macro-expand-2.rs` use thing::*; diff --git a/tests/ui/imports/import-after-macro-expand-4.rs b/tests/ui/imports/import-after-macro-expand-4.rs index fc0a232a93cc3..4181c414dd890 100644 --- a/tests/ui/imports/import-after-macro-expand-4.rs +++ b/tests/ui/imports/import-after-macro-expand-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113242#issuecomment-1616034904 // similar with `import-after-macro-expand-2.rs` diff --git a/tests/ui/imports/import-after-macro-expand-5.rs b/tests/ui/imports/import-after-macro-expand-5.rs index ba28b6deac7c3..b9c1790c5fb64 100644 --- a/tests/ui/imports/import-after-macro-expand-5.rs +++ b/tests/ui/imports/import-after-macro-expand-5.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass // https://github.com/rust-lang/rust/issues/105235#issue-1474295873 mod abc { diff --git a/tests/ui/imports/import-after-macro-expand-6.rs b/tests/ui/imports/import-after-macro-expand-6.rs index bff8efebca62e..73dce5985a841 100644 --- a/tests/ui/imports/import-after-macro-expand-6.rs +++ b/tests/ui/imports/import-after-macro-expand-6.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396 pub mod a { diff --git a/tests/ui/imports/import-after-macro-expand-7.rs b/tests/ui/imports/import-after-macro-expand-7.rs index 0402dfdfda703..da31f12a268d5 100644 --- a/tests/ui/imports/import-after-macro-expand-7.rs +++ b/tests/ui/imports/import-after-macro-expand-7.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // a compared case for `import-after-macro-expand-6.rs` pub mod a { diff --git a/tests/ui/imports/import-after-macro-expand-8.rs b/tests/ui/imports/import-after-macro-expand-8.rs index e11d65effdf77..f48be13711457 100644 --- a/tests/ui/imports/import-after-macro-expand-8.rs +++ b/tests/ui/imports/import-after-macro-expand-8.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113242#issuecomment-1616034904 mod a { diff --git a/tests/ui/imports/import-after-macro-expand-9.rs b/tests/ui/imports/import-after-macro-expand-9.rs index deee42c3b84ee..5caac06e7b984 100644 --- a/tests/ui/imports/import-after-macro-expand-9.rs +++ b/tests/ui/imports/import-after-macro-expand-9.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use crate::b::*; diff --git a/tests/ui/imports/import-crate-var.rs b/tests/ui/imports/import-crate-var.rs index aac5a15d3e6b5..2f3b38d5f752d 100644 --- a/tests/ui/imports/import-crate-var.rs +++ b/tests/ui/imports/import-crate-var.rs @@ -1,4 +1,4 @@ -// aux-build:import_crate_var.rs +//@ aux-build:import_crate_var.rs #[macro_use] extern crate import_crate_var; diff --git a/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs b/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs index b76c1680bba82..c0196aef702fa 100644 --- a/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs +++ b/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs @@ -1,7 +1,7 @@ #![crate_type = "rlib"] -// no-prefer-dynamic +//@ no-prefer-dynamic -// compile-flags: -g +//@ compile-flags: -g #[macro_use] mod crate_with_invalid_spans_macros; diff --git a/tests/ui/imports/import-crate-with-invalid-spans/main.rs b/tests/ui/imports/import-crate-with-invalid-spans/main.rs index 64a4deca8c359..3234cf304f740 100644 --- a/tests/ui/imports/import-crate-with-invalid-spans/main.rs +++ b/tests/ui/imports/import-crate-with-invalid-spans/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:crate_with_invalid_spans.rs +//@ run-pass +//@ aux-build:crate_with_invalid_spans.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate crate_with_invalid_spans; diff --git a/tests/ui/imports/import-from.rs b/tests/ui/imports/import-from.rs index 2817977b39394..c5ff4b3abc618 100644 --- a/tests/ui/imports/import-from.rs +++ b/tests/ui/imports/import-from.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use spam::{ham, eggs}; diff --git a/tests/ui/imports/import-glob-0-rpass.rs b/tests/ui/imports/import-glob-0-rpass.rs index 9c6a87279a2d4..b29d7bceac80b 100644 --- a/tests/ui/imports/import-glob-0-rpass.rs +++ b/tests/ui/imports/import-glob-0-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use module_of_many_things::*; use dug::too::greedily::and::too::deep::*; diff --git a/tests/ui/imports/import-glob-1.rs b/tests/ui/imports/import-glob-1.rs index fcc0b63f101dc..510f38145678f 100644 --- a/tests/ui/imports/import-glob-1.rs +++ b/tests/ui/imports/import-glob-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // This should resolve fine. Prior to fix, the last import diff --git a/tests/ui/imports/import-glob-crate.rs b/tests/ui/imports/import-glob-crate.rs index 501392b7829db..0a2ca6ef2c315 100644 --- a/tests/ui/imports/import-glob-crate.rs +++ b/tests/ui/imports/import-glob-crate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::*; pub fn main() { diff --git a/tests/ui/imports/import-in-block.rs b/tests/ui/imports/import-in-block.rs index 19703904ece91..c17e2cffa51b5 100644 --- a/tests/ui/imports/import-in-block.rs +++ b/tests/ui/imports/import-in-block.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { use std::mem::replace; diff --git a/tests/ui/imports/import-loop-2.rs b/tests/ui/imports/import-loop-2.rs index 14a85dd083c09..d9a56cb13784c 100644 --- a/tests/ui/imports/import-loop-2.rs +++ b/tests/ui/imports/import-loop-2.rs @@ -1,4 +1,4 @@ -// error-pattern:import +//@ error-pattern:import mod a { pub use b::x; diff --git a/tests/ui/imports/import-loop.rs b/tests/ui/imports/import-loop.rs index b48783401455d..1ba9e09003349 100644 --- a/tests/ui/imports/import-loop.rs +++ b/tests/ui/imports/import-loop.rs @@ -1,4 +1,4 @@ -// error-pattern:import +//@ error-pattern:import use y::x; diff --git a/tests/ui/imports/import-prefix-macro.rs b/tests/ui/imports/import-prefix-macro.rs index d770bb0da804a..e80f8fa9d04eb 100644 --- a/tests/ui/imports/import-prefix-macro.rs +++ b/tests/ui/imports/import-prefix-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] mod a { pub mod b { diff --git a/tests/ui/imports/import-rename.rs b/tests/ui/imports/import-rename.rs index 9ad2b34b83767..a53766b660c91 100644 --- a/tests/ui/imports/import-rename.rs +++ b/tests/ui/imports/import-rename.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use foo::{x, y as fooy}; use Maybe::{Yes as MaybeYes}; diff --git a/tests/ui/imports/import-rpass.rs b/tests/ui/imports/import-rpass.rs index de8bf62611416..97c64fd9c6320 100644 --- a/tests/ui/imports/import-rpass.rs +++ b/tests/ui/imports/import-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub fn x(y: isize) { println!("{}", y); } } diff --git a/tests/ui/imports/import-trailing-comma.rs b/tests/ui/imports/import-trailing-comma.rs index f65c5c866a3b8..3803b56487f81 100644 --- a/tests/ui/imports/import-trailing-comma.rs +++ b/tests/ui/imports/import-trailing-comma.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use foo::bar::{baz, quux,}; diff --git a/tests/ui/imports/import2-rpass.rs b/tests/ui/imports/import2-rpass.rs index 7b70f799ebf93..7a01d8a4b4936 100644 --- a/tests/ui/imports/import2-rpass.rs +++ b/tests/ui/imports/import2-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use zed::bar; diff --git a/tests/ui/imports/import3-rpass.rs b/tests/ui/imports/import3-rpass.rs index 17797aed3591d..4e555aa2783da 100644 --- a/tests/ui/imports/import3-rpass.rs +++ b/tests/ui/imports/import3-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use baz::zed; diff --git a/tests/ui/imports/import3.rs b/tests/ui/imports/import3.rs index 2c6ac9a00e109..71eea0ebb2666 100644 --- a/tests/ui/imports/import3.rs +++ b/tests/ui/imports/import3.rs @@ -1,4 +1,4 @@ -// error-pattern: unresolved +//@ error-pattern: unresolved use main::bar; fn main() { println!("foo"); } diff --git a/tests/ui/imports/import4-rpass.rs b/tests/ui/imports/import4-rpass.rs index 4fda5386112c0..6b30fe5b977d7 100644 --- a/tests/ui/imports/import4-rpass.rs +++ b/tests/ui/imports/import4-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use zed::bar; diff --git a/tests/ui/imports/import4.rs b/tests/ui/imports/import4.rs index ba3b7fbf53559..8d727ced8907c 100644 --- a/tests/ui/imports/import4.rs +++ b/tests/ui/imports/import4.rs @@ -1,4 +1,4 @@ -// error-pattern: import +//@ error-pattern: import mod a { pub use b::foo; } diff --git a/tests/ui/imports/import5.rs b/tests/ui/imports/import5.rs index be2a55c2d41e0..96d6c62d48a52 100644 --- a/tests/ui/imports/import5.rs +++ b/tests/ui/imports/import5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use foo::bar; mod foo { pub use foo::zed::bar; diff --git a/tests/ui/imports/import6.rs b/tests/ui/imports/import6.rs index e11b28531f942..8632c21e5f7e9 100644 --- a/tests/ui/imports/import6.rs +++ b/tests/ui/imports/import6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use foo::zed; diff --git a/tests/ui/imports/import7.rs b/tests/ui/imports/import7.rs index aca7fbdc4f5dd..ee1ce1a5d3e1d 100644 --- a/tests/ui/imports/import7.rs +++ b/tests/ui/imports/import7.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use foo::zed; diff --git a/tests/ui/imports/import8.rs b/tests/ui/imports/import8.rs index 87f0986bae436..f4a588a2d74d5 100644 --- a/tests/ui/imports/import8.rs +++ b/tests/ui/imports/import8.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use foo::x; use foo::x as z; diff --git a/tests/ui/imports/imports.rs b/tests/ui/imports/imports.rs index acb2b32b59d5f..a770103c212c0 100644 --- a/tests/ui/imports/imports.rs +++ b/tests/ui/imports/imports.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] // Like other items, private imports can be imported and used non-lexically in paths. diff --git a/tests/ui/imports/issue-109148.rs b/tests/ui/imports/issue-109148.rs index 694cb494a15dc..9d657a8738102 100644 --- a/tests/ui/imports/issue-109148.rs +++ b/tests/ui/imports/issue-109148.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // https://github.com/rust-lang/rust/pull/111761#issuecomment-1557777314 macro_rules! m { diff --git a/tests/ui/imports/issue-113953.rs b/tests/ui/imports/issue-113953.rs index 449a074f4b5df..a38bd59b43973 100644 --- a/tests/ui/imports/issue-113953.rs +++ b/tests/ui/imports/issue-113953.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use u8 as imported_u8; use unresolved as u8; //~^ ERROR unresolved import `unresolved` diff --git a/tests/ui/imports/issue-114682-2.rs b/tests/ui/imports/issue-114682-2.rs index 491105e62efea..e99bcf77ab62d 100644 --- a/tests/ui/imports/issue-114682-2.rs +++ b/tests/ui/imports/issue-114682-2.rs @@ -1,4 +1,4 @@ -// aux-build: issue-114682-2-extern.rs +//@ aux-build: issue-114682-2-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1879998900 extern crate issue_114682_2_extern; diff --git a/tests/ui/imports/issue-114682-3.rs b/tests/ui/imports/issue-114682-3.rs index 0f658bfe1597a..6dc4df17a2daf 100644 --- a/tests/ui/imports/issue-114682-3.rs +++ b/tests/ui/imports/issue-114682-3.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-3-extern.rs +//@ check-pass +//@ aux-build: issue-114682-3-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880625909 extern crate issue_114682_3_extern; diff --git a/tests/ui/imports/issue-114682-4.rs b/tests/ui/imports/issue-114682-4.rs index 97615c1041049..32c2ca7b26097 100644 --- a/tests/ui/imports/issue-114682-4.rs +++ b/tests/ui/imports/issue-114682-4.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-4-extern.rs +//@ check-pass +//@ aux-build: issue-114682-4-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_4_extern; diff --git a/tests/ui/imports/issue-114682-5.rs b/tests/ui/imports/issue-114682-5.rs index eb5ac10495bee..7c6132ebd6ffd 100644 --- a/tests/ui/imports/issue-114682-5.rs +++ b/tests/ui/imports/issue-114682-5.rs @@ -1,8 +1,8 @@ -// check-pass -// edition: 2018 -// aux-build: issue-114682-5-extern-1.rs -// aux-build: issue-114682-5-extern-2.rs -// compile-flags: --extern issue_114682_5_extern_1 +//@ check-pass +//@ edition: 2018 +//@ aux-build: issue-114682-5-extern-1.rs +//@ aux-build: issue-114682-5-extern-2.rs +//@ compile-flags: --extern issue_114682_5_extern_1 // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_5_extern_2; diff --git a/tests/ui/imports/issue-114682-6.rs b/tests/ui/imports/issue-114682-6.rs index 29a7d9e942643..d47b9f8a4e857 100644 --- a/tests/ui/imports/issue-114682-6.rs +++ b/tests/ui/imports/issue-114682-6.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-6-extern.rs +//@ check-pass +//@ aux-build: issue-114682-6-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_6_extern; diff --git a/tests/ui/imports/issue-119369.rs b/tests/ui/imports/issue-119369.rs index 0b4dc3f4654bd..79615eba532ed 100644 --- a/tests/ui/imports/issue-119369.rs +++ b/tests/ui/imports/issue-119369.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-119369-extern.rs +//@ check-pass +//@ aux-build: issue-119369-extern.rs // https://github.com/rust-lang/rust/pull/119369#issuecomment-1874905662 diff --git a/tests/ui/imports/issue-18083.rs b/tests/ui/imports/issue-18083.rs index 36420ec142ea5..97c0bc83ad58b 100644 --- a/tests/ui/imports/issue-18083.rs +++ b/tests/ui/imports/issue-18083.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] // These crossed imports should resolve fine, and not block on diff --git a/tests/ui/imports/issue-24883.rs b/tests/ui/imports/issue-24883.rs index 819a20ddbda92..de1000c1badc4 100644 --- a/tests/ui/imports/issue-24883.rs +++ b/tests/ui/imports/issue-24883.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod a { pub mod b { pub struct Foo; } diff --git a/tests/ui/imports/issue-26873-multifile/A/B.rs b/tests/ui/imports/issue-26873-multifile/A/B.rs index ab7b0d81605f3..03702426e0c50 100644 --- a/tests/ui/imports/issue-26873-multifile/A/B.rs +++ b/tests/ui/imports/issue-26873-multifile/A/B.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use super::*; pub struct S; diff --git a/tests/ui/imports/issue-26873-multifile/A/C.rs b/tests/ui/imports/issue-26873-multifile/A/C.rs index b287283df5389..eeba7cb3f2f16 100644 --- a/tests/ui/imports/issue-26873-multifile/A/C.rs +++ b/tests/ui/imports/issue-26873-multifile/A/C.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use super::*; use super::B::S; diff --git a/tests/ui/imports/issue-26873-multifile/A/mod.rs b/tests/ui/imports/issue-26873-multifile/A/mod.rs index 0f18772bf1b25..de4d2250db3a9 100644 --- a/tests/ui/imports/issue-26873-multifile/A/mod.rs +++ b/tests/ui/imports/issue-26873-multifile/A/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub mod B; pub mod C; 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 d369f1e71d06f..2fd9210806b66 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 +//@ run-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 f06c6499eb0fb..603d4e0d65da3 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/imports/issue-26873-multifile/mod.rs b/tests/ui/imports/issue-26873-multifile/mod.rs index a1ba53f919171..9c96ceb0f037e 100644 --- a/tests/ui/imports/issue-26873-multifile/mod.rs +++ b/tests/ui/imports/issue-26873-multifile/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod A; use self::A::*; diff --git a/tests/ui/imports/issue-26930.rs b/tests/ui/imports/issue-26930.rs index 707e71b11249d..f6ce052a2c70a 100644 --- a/tests/ui/imports/issue-26930.rs +++ b/tests/ui/imports/issue-26930.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass extern crate core; use core as core_export; diff --git a/tests/ui/imports/issue-28134.rs b/tests/ui/imports/issue-28134.rs index 0cecdf7a0ec73..70d3a327c1afa 100644 --- a/tests/ui/imports/issue-28134.rs +++ b/tests/ui/imports/issue-28134.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![allow(soft_unstable)] #![test] diff --git a/tests/ui/imports/issue-32119.rs b/tests/ui/imports/issue-32119.rs index 36adb5289aca5..ebf0477e8cb50 100644 --- a/tests/ui/imports/issue-32119.rs +++ b/tests/ui/imports/issue-32119.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub type T = (); mod foo { pub use super::T; } diff --git a/tests/ui/imports/issue-32222.rs b/tests/ui/imports/issue-32222.rs index 4ed06bff80341..8c528bc0a1ebc 100644 --- a/tests/ui/imports/issue-32222.rs +++ b/tests/ui/imports/issue-32222.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { pub fn bar() {} diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.fixed b/tests/ui/imports/issue-32354-suggest-import-rename.fixed index 27f1b8964e2ad..d586ac0738c70 100644 --- a/tests/ui/imports/issue-32354-suggest-import-rename.fixed +++ b/tests/ui/imports/issue-32354-suggest-import-rename.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.rs b/tests/ui/imports/issue-32354-suggest-import-rename.rs index 5a7f234d5fa2b..868f3fe460443 100644 --- a/tests/ui/imports/issue-32354-suggest-import-rename.rs +++ b/tests/ui/imports/issue-32354-suggest-import-rename.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] diff --git a/tests/ui/imports/issue-36881.rs b/tests/ui/imports/issue-36881.rs index 04313872d2713..4aff642ea9584 100644 --- a/tests/ui/imports/issue-36881.rs +++ b/tests/ui/imports/issue-36881.rs @@ -1,4 +1,4 @@ -// aux-build:issue-36881-aux.rs +//@ aux-build:issue-36881-aux.rs fn main() { extern crate issue_36881_aux; diff --git a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed index b463848ae94a8..bc5b72c3f7294 100644 --- a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed +++ b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern crate std as other_std; fn main() {} diff --git a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs index 1b491ac7efe06..5ac7407371d52 100644 --- a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs +++ b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern crate std; fn main() {} diff --git a/tests/ui/imports/issue-45829/rename-extern-vs-use.rs b/tests/ui/imports/issue-45829/rename-extern-vs-use.rs index aef7aa35cf5a3..936dfbc67d088 100644 --- a/tests/ui/imports/issue-45829/rename-extern-vs-use.rs +++ b/tests/ui/imports/issue-45829/rename-extern-vs-use.rs @@ -1,4 +1,4 @@ -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-b.rs mod foo { pub mod bar {} diff --git a/tests/ui/imports/issue-45829/rename-extern-with-tab.rs b/tests/ui/imports/issue-45829/rename-extern-with-tab.rs index 0da8b826c902e..a57bac6e84128 100644 --- a/tests/ui/imports/issue-45829/rename-extern-with-tab.rs +++ b/tests/ui/imports/issue-45829/rename-extern-with-tab.rs @@ -1,5 +1,5 @@ -// aux-build:issue-45829-a.rs -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-a.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_a; extern crate issue_45829_b as issue_45829_a; diff --git a/tests/ui/imports/issue-45829/rename-extern.rs b/tests/ui/imports/issue-45829/rename-extern.rs index 7dbda69322e7a..c82a091981b39 100644 --- a/tests/ui/imports/issue-45829/rename-extern.rs +++ b/tests/ui/imports/issue-45829/rename-extern.rs @@ -1,5 +1,5 @@ -// aux-build:issue-45829-a.rs -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-a.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_a; extern crate issue_45829_b as issue_45829_a; diff --git a/tests/ui/imports/issue-45829/rename-use-vs-extern.rs b/tests/ui/imports/issue-45829/rename-use-vs-extern.rs index 0cf3a77fd7c15..42e1ed6b63285 100644 --- a/tests/ui/imports/issue-45829/rename-use-vs-extern.rs +++ b/tests/ui/imports/issue-45829/rename-use-vs-extern.rs @@ -1,4 +1,4 @@ -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_b; use std as issue_45829_b; diff --git a/tests/ui/imports/issue-4865-1.rs b/tests/ui/imports/issue-4865-1.rs index 68fbee37d0103..1a72b1b5e3f04 100644 --- a/tests/ui/imports/issue-4865-1.rs +++ b/tests/ui/imports/issue-4865-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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-2.rs b/tests/ui/imports/issue-4865-2.rs index cbe1d0d32c649..746a74658ddca 100644 --- a/tests/ui/imports/issue-4865-2.rs +++ b/tests/ui/imports/issue-4865-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Previously, this would have failed to resolve due to the circular // block between `use say` and `pub use hello::*`. // diff --git a/tests/ui/imports/issue-4865-3.rs b/tests/ui/imports/issue-4865-3.rs index 12f9bba18d817..130223558cb84 100644 --- a/tests/ui/imports/issue-4865-3.rs +++ b/tests/ui/imports/issue-4865-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This should resolve fine even with the circular imports as // they are not `pub`. diff --git a/tests/ui/imports/issue-52891.fixed b/tests/ui/imports/issue-52891.fixed index e694b5c9b154f..9faef1703ac28 100644 --- a/tests/ui/imports/issue-52891.fixed +++ b/tests/ui/imports/issue-52891.fixed @@ -1,5 +1,5 @@ -// aux-build:issue-52891.rs -// run-rustfix +//@ aux-build:issue-52891.rs +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/imports/issue-52891.rs b/tests/ui/imports/issue-52891.rs index cd4b40629ab7f..e5fcdf979410e 100644 --- a/tests/ui/imports/issue-52891.rs +++ b/tests/ui/imports/issue-52891.rs @@ -1,5 +1,5 @@ -// aux-build:issue-52891.rs -// run-rustfix +//@ aux-build:issue-52891.rs +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/imports/issue-53140.rs b/tests/ui/imports/issue-53140.rs index 7b4cc176806aa..28cfa59dd3ba1 100644 --- a/tests/ui/imports/issue-53140.rs +++ b/tests/ui/imports/issue-53140.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod m { pub struct S(u8); diff --git a/tests/ui/imports/issue-55811.rs b/tests/ui/imports/issue-55811.rs index 2df328cca8933..51dfd45e7a3d8 100644 --- a/tests/ui/imports/issue-55811.rs +++ b/tests/ui/imports/issue-55811.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-55811.rs +//@ check-pass +//@ aux-build:issue-55811.rs extern crate issue_55811; diff --git a/tests/ui/imports/issue-56125.rs b/tests/ui/imports/issue-56125.rs index ec5747b4bca8c..4e7e7ac67c572 100644 --- a/tests/ui/imports/issue-56125.rs +++ b/tests/ui/imports/issue-56125.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags:--extern issue_56125 -// aux-build:issue-56125.rs +//@ edition:2018 +//@ compile-flags:--extern issue_56125 +//@ aux-build:issue-56125.rs mod m1 { use issue_56125::last_segment::*; diff --git a/tests/ui/imports/issue-56263.rs b/tests/ui/imports/issue-56263.rs index 363781f2daffe..4beb0fbf6d0c0 100644 --- a/tests/ui/imports/issue-56263.rs +++ b/tests/ui/imports/issue-56263.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use ::std; diff --git a/tests/ui/imports/issue-57539.rs b/tests/ui/imports/issue-57539.rs index 90b74eb464779..d97a74291d39b 100644 --- a/tests/ui/imports/issue-57539.rs +++ b/tests/ui/imports/issue-57539.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod core { use core; //~ ERROR `core` is ambiguous diff --git a/tests/ui/imports/issue-59764.rs b/tests/ui/imports/issue-59764.rs index 91b3ddcd84d57..5f7a496117a6a 100644 --- a/tests/ui/imports/issue-59764.rs +++ b/tests/ui/imports/issue-59764.rs @@ -1,6 +1,6 @@ -// aux-build:issue-59764.rs -// compile-flags:--extern issue_59764 -// edition:2018 +//@ aux-build:issue-59764.rs +//@ compile-flags:--extern issue_59764 +//@ edition:2018 #![allow(warnings)] diff --git a/tests/ui/imports/issue-62767.rs b/tests/ui/imports/issue-62767.rs index 01184eea9b495..eb5569e003da0 100644 --- a/tests/ui/imports/issue-62767.rs +++ b/tests/ui/imports/issue-62767.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Minimized case from #62767. mod m { diff --git a/tests/ui/imports/issue-68103.rs b/tests/ui/imports/issue-68103.rs index e775678fc6053..6d90d23cd6520 100644 --- a/tests/ui/imports/issue-68103.rs +++ b/tests/ui/imports/issue-68103.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub extern crate self as name; pub use name::name as bug; diff --git a/tests/ui/imports/issue-85992.rs b/tests/ui/imports/issue-85992.rs index d55241091449a..321c3a9218d67 100644 --- a/tests/ui/imports/issue-85992.rs +++ b/tests/ui/imports/issue-85992.rs @@ -1,7 +1,7 @@ -// edition: 2021 -// compile-flags: --extern issue_85992_extern_1 --extern issue_85992_extern_2 -// aux-build: issue-85992-extern-1.rs -// aux-build: issue-85992-extern-2.rs +//@ edition: 2021 +//@ compile-flags: --extern issue_85992_extern_1 --extern issue_85992_extern_2 +//@ aux-build: issue-85992-extern-1.rs +//@ aux-build: issue-85992-extern-2.rs issue_85992_extern_1::m!(); diff --git a/tests/ui/imports/issue-99695-b.fixed b/tests/ui/imports/issue-99695-b.fixed index 0e60c73b67a44..0108f762400f6 100644 --- a/tests/ui/imports/issue-99695-b.fixed +++ b/tests/ui/imports/issue-99695-b.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { diff --git a/tests/ui/imports/issue-99695-b.rs b/tests/ui/imports/issue-99695-b.rs index 031443a1f5df8..a8ff3645329f5 100644 --- a/tests/ui/imports/issue-99695-b.rs +++ b/tests/ui/imports/issue-99695-b.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { diff --git a/tests/ui/imports/issue-99695.fixed b/tests/ui/imports/issue-99695.fixed index 6bf228b23aad2..51ccd3f8c48d1 100644 --- a/tests/ui/imports/issue-99695.fixed +++ b/tests/ui/imports/issue-99695.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { #[macro_export] diff --git a/tests/ui/imports/issue-99695.rs b/tests/ui/imports/issue-99695.rs index f7199f1497ab0..a52370e0eb085 100644 --- a/tests/ui/imports/issue-99695.rs +++ b/tests/ui/imports/issue-99695.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { #[macro_export] diff --git a/tests/ui/imports/local-modularized-tricky-pass-1.rs b/tests/ui/imports/local-modularized-tricky-pass-1.rs index b52ddaf89549e..e809e5e4d8991 100644 --- a/tests/ui/imports/local-modularized-tricky-pass-1.rs +++ b/tests/ui/imports/local-modularized-tricky-pass-1.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) macro_rules! define_exported { () => { #[macro_export] diff --git a/tests/ui/imports/local-modularized-tricky-pass-2.rs b/tests/ui/imports/local-modularized-tricky-pass-2.rs index d5efbdf78af0f..581bab467f561 100644 --- a/tests/ui/imports/local-modularized-tricky-pass-2.rs +++ b/tests/ui/imports/local-modularized-tricky-pass-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed // into the root module soon enough to act as usual items and shadow globs and preludes. diff --git a/tests/ui/imports/local-modularized.rs b/tests/ui/imports/local-modularized.rs index 8eeb1cf07bb1a..39d0169dd7993 100644 --- a/tests/ui/imports/local-modularized.rs +++ b/tests/ui/imports/local-modularized.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[macro_export(local_inner_macros)] macro_rules! dollar_crate_exported { diff --git a/tests/ui/imports/macro-paths.rs b/tests/ui/imports/macro-paths.rs index cc584e05a6bfd..916442a7c4eab 100644 --- a/tests/ui/imports/macro-paths.rs +++ b/tests/ui/imports/macro-paths.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/imports/macros.rs b/tests/ui/imports/macros.rs index f2a22ad620b11..7f479571e5eed 100644 --- a/tests/ui/imports/macros.rs +++ b/tests/ui/imports/macros.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; // two identity macros `m` and `n` diff --git a/tests/ui/imports/no-pub-reexports-but-used.rs b/tests/ui/imports/no-pub-reexports-but-used.rs index 28991bde829f8..c0d7964ea71e8 100644 --- a/tests/ui/imports/no-pub-reexports-but-used.rs +++ b/tests/ui/imports/no-pub-reexports-but-used.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/115966 mod m { diff --git a/tests/ui/imports/overlapping_pub_trait.rs b/tests/ui/imports/overlapping_pub_trait.rs index 69aba3ae9b4e7..cde9f7d8edb6e 100644 --- a/tests/ui/imports/overlapping_pub_trait.rs +++ b/tests/ui/imports/overlapping_pub_trait.rs @@ -1,4 +1,4 @@ -// aux-build:overlapping_pub_trait_source.rs +//@ aux-build:overlapping_pub_trait_source.rs /* * This crate declares two public paths, `m::Tr` and `prelude::_`. Make sure we prefer the former. diff --git a/tests/ui/imports/private-std-reexport-suggest-public.fixed b/tests/ui/imports/private-std-reexport-suggest-public.fixed index b6fd22f5d3ffc..6374ba00bb4dc 100644 --- a/tests/ui/imports/private-std-reexport-suggest-public.fixed +++ b/tests/ui/imports/private-std-reexport-suggest-public.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] fn main() { use std::mem; //~ ERROR module import `mem` is private diff --git a/tests/ui/imports/private-std-reexport-suggest-public.rs b/tests/ui/imports/private-std-reexport-suggest-public.rs index 1247055af6063..04ec679c4d707 100644 --- a/tests/ui/imports/private-std-reexport-suggest-public.rs +++ b/tests/ui/imports/private-std-reexport-suggest-public.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] fn main() { use foo::mem; //~ ERROR module import `mem` is private diff --git a/tests/ui/imports/reexport-star.rs b/tests/ui/imports/reexport-star.rs index 639ab1a0f3acd..3e41f12fa2d87 100644 --- a/tests/ui/imports/reexport-star.rs +++ b/tests/ui/imports/reexport-star.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod a { pub fn f() {} diff --git a/tests/ui/imports/resolve-other-libc.rs b/tests/ui/imports/resolve-other-libc.rs index 806d854ec8906..d848f8260aad8 100644 --- a/tests/ui/imports/resolve-other-libc.rs +++ b/tests/ui/imports/resolve-other-libc.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/26043 -// compile-flags: --extern libc=test.rlib +//@ compile-flags: --extern libc=test.rlib // The error shall NOT be something similar to the following, because it // indicates that `libc` was wrongly resolved to `libc` shipped with the diff --git a/tests/ui/imports/shadow_builtin_macros.rs b/tests/ui/imports/shadow_builtin_macros.rs index 02c27d5ce333a..5a1490674080b 100644 --- a/tests/ui/imports/shadow_builtin_macros.rs +++ b/tests/ui/imports/shadow_builtin_macros.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs mod foo { extern crate two_macros; diff --git a/tests/ui/imports/unnamed_pub_trait.rs b/tests/ui/imports/unnamed_pub_trait.rs index c38fb17b97649..09a01643c5e0b 100644 --- a/tests/ui/imports/unnamed_pub_trait.rs +++ b/tests/ui/imports/unnamed_pub_trait.rs @@ -1,4 +1,4 @@ -// aux-build:unnamed_pub_trait_source.rs +//@ aux-build:unnamed_pub_trait_source.rs /* * This crate declares an unnameable public path for our item. Make sure we don't suggest diff --git a/tests/ui/imports/unused-import-issue-87973.fixed b/tests/ui/imports/unused-import-issue-87973.fixed index 5c194d18aca36..96508fa3ea2b9 100644 --- a/tests/ui/imports/unused-import-issue-87973.fixed +++ b/tests/ui/imports/unused-import-issue-87973.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_imports)] // Check that attributes get removed too. See #87973. diff --git a/tests/ui/imports/unused-import-issue-87973.rs b/tests/ui/imports/unused-import-issue-87973.rs index c31f0f9796ecf..b04bec07d1823 100644 --- a/tests/ui/imports/unused-import-issue-87973.rs +++ b/tests/ui/imports/unused-import-issue-87973.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_imports)] // Check that attributes get removed too. See #87973. diff --git a/tests/ui/imports/unused-imports-in-test-mode.rs b/tests/ui/imports/unused-imports-in-test-mode.rs index 039f59a8838a1..0902e7cc55ce2 100644 --- a/tests/ui/imports/unused-imports-in-test-mode.rs +++ b/tests/ui/imports/unused-imports-in-test-mode.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![deny(unused_imports)] diff --git a/tests/ui/imports/use-mod.rs b/tests/ui/imports/use-mod.rs index 84da2e70878f2..065079b21e529 100644 --- a/tests/ui/imports/use-mod.rs +++ b/tests/ui/imports/use-mod.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use foo::bar::{self, First}; use self::bar::Second; diff --git a/tests/ui/impossible_range.fixed b/tests/ui/impossible_range.fixed index 3fd950e0dbfc8..423dde94f4f53 100644 --- a/tests/ui/impossible_range.fixed +++ b/tests/ui/impossible_range.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that invalid ranges generate an error during parsing, not an ICE #![allow(path_statements)] diff --git a/tests/ui/impossible_range.rs b/tests/ui/impossible_range.rs index 0fe0e17be669a..002ea792fbfd7 100644 --- a/tests/ui/impossible_range.rs +++ b/tests/ui/impossible_range.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that invalid ranges generate an error during parsing, not an ICE #![allow(path_statements)] diff --git a/tests/ui/inc-range-pat.rs b/tests/ui/inc-range-pat.rs index 1eb7dd0aa3e7a..189dac4feedba 100644 --- a/tests/ui/inc-range-pat.rs +++ b/tests/ui/inc-range-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test old and new syntax for inclusive range patterns. #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/include-macros/normalization.rs b/tests/ui/include-macros/normalization.rs index 889f08e606ec9..d503d137e5535 100644 --- a/tests/ui/include-macros/normalization.rs +++ b/tests/ui/include-macros/normalization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!( diff --git a/tests/ui/include-macros/same-file-in-two-crates.rs b/tests/ui/include-macros/same-file-in-two-crates.rs index f49efa2cf8a89..893024492b171 100644 --- a/tests/ui/include-macros/same-file-in-two-crates.rs +++ b/tests/ui/include-macros/same-file-in-two-crates.rs @@ -8,9 +8,9 @@ // // This is a regression test for https://github.com/rust-lang/rust/issues/85955. -// check-pass -// compile-flags: --crate-type=rlib -// aux-build:same-file-in-two-crates-aux.rs +//@ check-pass +//@ compile-flags: --crate-type=rlib +//@ aux-build:same-file-in-two-crates-aux.rs extern crate same_file_in_two_crates_aux; pub fn foo() -> u32 { diff --git a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs index 0f7282bec5c0e..22ca93c0b2062 100644 --- a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs +++ b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs @@ -1,4 +1,4 @@ -// aux-build:extern-crate.rs +//@ aux-build:extern-crate.rs #![feature(rustc_attrs)] extern crate extern_crate; diff --git a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs index 62c249e58822b..a55317041ccbf 100644 --- a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs +++ b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs @@ -1,4 +1,4 @@ -// aux-build:extern-crate.rs +//@ aux-build:extern-crate.rs extern crate extern_crate; impl extern_crate::StructWithAttr {} diff --git a/tests/ui/indexing/indexing-spans-caller-location.rs b/tests/ui/indexing/indexing-spans-caller-location.rs index 2652f00211dfc..02d8b853734e5 100644 --- a/tests/ui/indexing/indexing-spans-caller-location.rs +++ b/tests/ui/indexing/indexing-spans-caller-location.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for https://github.com/rust-lang/rust/issues/114388 diff --git a/tests/ui/infer-fn-tail-expr.rs b/tests/ui/infer-fn-tail-expr.rs index 413b1877a29fd..31b71e49bd6f7 100644 --- a/tests/ui/infer-fn-tail-expr.rs +++ b/tests/ui/infer-fn-tail-expr.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // issue #680 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() -> Vec { Vec::new() } diff --git a/tests/ui/inference/cannot-infer-async.rs b/tests/ui/inference/cannot-infer-async.rs index b5152d04f6959..e4ab8f90e4bd3 100644 --- a/tests/ui/inference/cannot-infer-async.rs +++ b/tests/ui/inference/cannot-infer-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::io::Error; diff --git a/tests/ui/inference/char-as-str-single.fixed b/tests/ui/inference/char-as-str-single.fixed index 1621a279f03ff..de27417a78dfd 100644 --- a/tests/ui/inference/char-as-str-single.fixed +++ b/tests/ui/inference/char-as-str-single.fixed @@ -3,7 +3,7 @@ // Testing both single-byte and multi-byte characters, as we should handle both. -// run-rustfix +//@ run-rustfix fn main() { let _: char = 'a'; //~ ERROR mismatched types diff --git a/tests/ui/inference/char-as-str-single.rs b/tests/ui/inference/char-as-str-single.rs index 2903142f15991..456729a8308af 100644 --- a/tests/ui/inference/char-as-str-single.rs +++ b/tests/ui/inference/char-as-str-single.rs @@ -3,7 +3,7 @@ // Testing both single-byte and multi-byte characters, as we should handle both. -// run-rustfix +//@ run-rustfix fn main() { let _: char = "a"; //~ ERROR mismatched types diff --git a/tests/ui/inference/infer-binary-operand-behind-reference.rs b/tests/ui/inference/infer-binary-operand-behind-reference.rs index 0c0a3171ee9a1..05b18ca104cf7 100644 --- a/tests/ui/inference/infer-binary-operand-behind-reference.rs +++ b/tests/ui/inference/infer-binary-operand-behind-reference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { // Test that we can infer the type of binary operands when diff --git a/tests/ui/inference/inference-variable-behind-raw-pointer.rs b/tests/ui/inference/inference-variable-behind-raw-pointer.rs index 6662e46b1c7e2..6a67cf593a567 100644 --- a/tests/ui/inference/inference-variable-behind-raw-pointer.rs +++ b/tests/ui/inference/inference-variable-behind-raw-pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // tests that the following code compiles, but produces a future-compatibility warning diff --git a/tests/ui/inference/inference_unstable.rs b/tests/ui/inference/inference_unstable.rs index ad76499591c1f..5a5ac66310d60 100644 --- a/tests/ui/inference/inference_unstable.rs +++ b/tests/ui/inference/inference_unstable.rs @@ -1,9 +1,9 @@ // Ensures #[unstable] functions without opting in the corresponding #![feature] // will not break inference. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs -// run-pass +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs +//@ run-pass extern crate inference_unstable_iterator; extern crate inference_unstable_itertools; diff --git a/tests/ui/inference/inference_unstable_featured.rs b/tests/ui/inference/inference_unstable_featured.rs index 792b29aaadc08..dd8b8d6a470db 100644 --- a/tests/ui/inference/inference_unstable_featured.rs +++ b/tests/ui/inference/inference_unstable_featured.rs @@ -1,8 +1,8 @@ // There should be E0034 "multiple applicable items in scope" if we opt-in for // the feature. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs #![feature(ipu_flatten)] diff --git a/tests/ui/inference/inference_unstable_forced.rs b/tests/ui/inference/inference_unstable_forced.rs index 649b3ed2a6f87..f12db6f0164c5 100644 --- a/tests/ui/inference/inference_unstable_forced.rs +++ b/tests/ui/inference/inference_unstable_forced.rs @@ -1,7 +1,7 @@ // If the unstable API is the only possible solution, // still emit E0658 "use of unstable library feature". -// aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_iterator.rs extern crate inference_unstable_iterator; diff --git a/tests/ui/inference/issue-113354.fixed b/tests/ui/inference/issue-113354.fixed index 804db985ae14e..b9c84220764be 100644 --- a/tests/ui/inference/issue-113354.fixed +++ b/tests/ui/inference/issue-113354.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix fn main() { let _ = || { while let Some(_) = Some(1) { } }; //~ ERROR mismatched types } diff --git a/tests/ui/inference/issue-113354.rs b/tests/ui/inference/issue-113354.rs index ec33d1f8b84e4..c4409a243125b 100644 --- a/tests/ui/inference/issue-113354.rs +++ b/tests/ui/inference/issue-113354.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix fn main() { let _ = || { while Some(_) = Some(1) { } }; //~ ERROR mismatched types } diff --git a/tests/ui/inference/issue-28935.rs b/tests/ui/inference/issue-28935.rs index 872822dbd0f66..3f15280884694 100644 --- a/tests/ui/inference/issue-28935.rs +++ b/tests/ui/inference/issue-28935.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefCell; diff --git a/tests/ui/inference/issue-36053.rs b/tests/ui/inference/issue-36053.rs index 8eee1c33b0e63..6cc1c12a56fcf 100644 --- a/tests/ui/inference/issue-36053.rs +++ b/tests/ui/inference/issue-36053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #36053. ICE was caused due to obligations being // added to a special, dedicated fulfillment cx during a // probe. Problem seems to be related to the particular definition of diff --git a/tests/ui/inference/issue-70703.rs b/tests/ui/inference/issue-70703.rs index d90498e96ea77..326859c9d039a 100644 --- a/tests/ui/inference/issue-70703.rs +++ b/tests/ui/inference/issue-70703.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Factory { type Product; diff --git a/tests/ui/inference/issue-71584.rs b/tests/ui/inference/issue-71584.rs index c96c32d5c0a09..7e4d45ec4a042 100644 --- a/tests/ui/inference/issue-71584.rs +++ b/tests/ui/inference/issue-71584.rs @@ -1,4 +1,4 @@ -// ignore-windows different list of satisfying impls +//@ ignore-windows different list of satisfying impls fn main() { let n: u32 = 1; let mut d: u64 = 2; diff --git a/tests/ui/inference/issue-72616.rs b/tests/ui/inference/issue-72616.rs index 69ade1a7515cb..71e095cc6fc02 100644 --- a/tests/ui/inference/issue-72616.rs +++ b/tests/ui/inference/issue-72616.rs @@ -1,4 +1,4 @@ -// ignore-wasm32 FIXME: ignoring wasm as it suggests slightly different impls +//@ ignore-wasm32 FIXME: ignoring wasm as it suggests slightly different impls // Regression test for #72616, it used to emit incorrect diagnostics, like: // error[E0283]: type annotations needed for `String` diff --git a/tests/ui/inference/issue-80409.rs b/tests/ui/inference/issue-80409.rs index 49c9978fe1558..e54da78614fdf 100644 --- a/tests/ui/inference/issue-80409.rs +++ b/tests/ui/inference/issue-80409.rs @@ -2,16 +2,16 @@ // ignore-tidy-linelength -// revisions: compat no-compat -//[compat] check-pass -//[no-compat] compile-flags: -Zno-implied-bounds-compat -//[no-compat] check-fail -//[no-compat] known-bug: #80409 -//[no-compat] failure-status: 101 -//[no-compat] normalize-stderr-test "note: .*\n\n" -> "" -//[no-compat] normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -//[no-compat] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -//[no-compat] rustc-env:RUST_BACKTRACE=0 +//@ revisions: compat no-compat +//@[compat] check-pass +//@[no-compat] compile-flags: -Zno-implied-bounds-compat +//@[no-compat] check-fail +//@[no-compat] known-bug: #80409 +//@[no-compat] failure-status: 101 +//@[no-compat] normalize-stderr-test "note: .*\n\n" -> "" +//@[no-compat] normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@[no-compat] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@[no-compat] rustc-env:RUST_BACKTRACE=0 #![allow(unreachable_code, unused)] diff --git a/tests/ui/inference/issue-81522.rs b/tests/ui/inference/issue-81522.rs index 902f8fdde58e9..859e5dcfe0c6b 100644 --- a/tests/ui/inference/issue-81522.rs +++ b/tests/ui/inference/issue-81522.rs @@ -3,9 +3,9 @@ // suppresses the corresponding diagnostics emitted from inside them. // But note that this attribute doesn't work for macro invocations if it is appended directly. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs -// run-pass +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs +//@ run-pass extern crate inference_unstable_iterator; extern crate inference_unstable_itertools; diff --git a/tests/ui/inference/lub-glb-with-unbound-infer-var.rs b/tests/ui/inference/lub-glb-with-unbound-infer-var.rs index c9e117089f57b..8660b62016fc3 100644 --- a/tests/ui/inference/lub-glb-with-unbound-infer-var.rs +++ b/tests/ui/inference/lub-glb-with-unbound-infer-var.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for a specific corner case: when we compute the LUB of two fn // types and their parameters have unbound variables. In that case, we // wind up relating those two variables. This was causing an ICE in an diff --git a/tests/ui/inference/newlambdas-ret-infer.rs b/tests/ui/inference/newlambdas-ret-infer.rs index 9b629838ffdf6..893b62e967ddb 100644 --- a/tests/ui/inference/newlambdas-ret-infer.rs +++ b/tests/ui/inference/newlambdas-ret-infer.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the lambda kind is inferred correctly as a return // expression -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn unique() -> Box { return Box::new(|| ()); } diff --git a/tests/ui/inference/newlambdas-ret-infer2.rs b/tests/ui/inference/newlambdas-ret-infer2.rs index abe31a05f2260..cad8b02910b1a 100644 --- a/tests/ui/inference/newlambdas-ret-infer2.rs +++ b/tests/ui/inference/newlambdas-ret-infer2.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the lambda kind is inferred correctly as a return // expression -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn unique() -> Box { Box::new(|| ()) } diff --git a/tests/ui/inference/range-type-infer.rs b/tests/ui/inference/range-type-infer.rs index f07c041717f33..1b44965663453 100644 --- a/tests/ui/inference/range-type-infer.rs +++ b/tests/ui/inference/range-type-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Make sure the type inference for the new range expression work as diff --git a/tests/ui/inference/simple-infer.rs b/tests/ui/inference/simple-infer.rs index 561e4fdec7c6b..e933299f386fc 100644 --- a/tests/ui/inference/simple-infer.rs +++ b/tests/ui/inference/simple-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/inference/str-as-char.fixed b/tests/ui/inference/str-as-char.fixed index 911b067c4d19c..2032723f9de8a 100644 --- a/tests/ui/inference/str-as-char.fixed +++ b/tests/ui/inference/str-as-char.fixed @@ -1,7 +1,7 @@ // When a char literal is used where a str should be, // suggest changing to double quotes. -// run-rustfix +//@ run-rustfix fn main() { let _: &str = "a"; //~ ERROR mismatched types diff --git a/tests/ui/inference/str-as-char.rs b/tests/ui/inference/str-as-char.rs index 832bc871a9e3c..7680bce03b8b9 100644 --- a/tests/ui/inference/str-as-char.rs +++ b/tests/ui/inference/str-as-char.rs @@ -1,7 +1,7 @@ // When a char literal is used where a str should be, // suggest changing to double quotes. -// run-rustfix +//@ run-rustfix fn main() { let _: &str = 'a'; //~ ERROR mismatched types diff --git a/tests/ui/inference/type-infer-generalize-ty-var.rs b/tests/ui/inference/type-infer-generalize-ty-var.rs index 6bf3c61ada84e..8dae835a9dba9 100644 --- a/tests/ui/inference/type-infer-generalize-ty-var.rs +++ b/tests/ui/inference/type-infer-generalize-ty-var.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/infinite/infinite-alias.rs b/tests/ui/infinite/infinite-alias.rs index 45356f359cede..7821780a9a1e5 100644 --- a/tests/ui/infinite/infinite-alias.rs +++ b/tests/ui/infinite/infinite-alias.rs @@ -1,4 +1,4 @@ -// aux-build: alias.rs +//@ aux-build: alias.rs // regression test for 108160 extern crate alias; diff --git a/tests/ui/infinite/infinite-autoderef.rs b/tests/ui/infinite/infinite-autoderef.rs index cbbe1f81df86f..d6956e6945707 100644 --- a/tests/ui/infinite/infinite-autoderef.rs +++ b/tests/ui/infinite/infinite-autoderef.rs @@ -1,5 +1,5 @@ -// error-pattern: reached the recursion limit while auto-dereferencing -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ error-pattern: reached the recursion limit while auto-dereferencing +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::ops::Deref; diff --git a/tests/ui/infinite/infinite-instantiation.rs b/tests/ui/infinite/infinite-instantiation.rs index 9b9f332ca86de..ed6fe693ebf4f 100644 --- a/tests/ui/infinite/infinite-instantiation.rs +++ b/tests/ui/infinite/infinite-instantiation.rs @@ -1,5 +1,5 @@ -// build-fail -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" trait ToOpt: Sized { fn to_option(&self) -> Option; diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs index 90c941c634e06..91cfe89e28a43 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs @@ -1,4 +1,4 @@ -// revisions: feature gated +//@ revisions: feature gated #![cfg_attr(feature, feature(lazy_type_alias))] #![allow(incomplete_features)] diff --git a/tests/ui/infinite/infinite-vec-type-recursion.rs b/tests/ui/infinite/infinite-vec-type-recursion.rs index 71ab4a33013fa..ff270f3bf8cc2 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.rs +++ b/tests/ui/infinite/infinite-vec-type-recursion.rs @@ -1,4 +1,4 @@ -// revisions: feature gated +//@ revisions: feature gated #![cfg_attr(feature, feature(lazy_type_alias))] #![allow(incomplete_features)] diff --git a/tests/ui/infinite/issue-41731-infinite-macro-print.rs b/tests/ui/infinite/issue-41731-infinite-macro-print.rs index d52e6e7e9eb82..7cd3ff3d629e9 100644 --- a/tests/ui/infinite/issue-41731-infinite-macro-print.rs +++ b/tests/ui/infinite/issue-41731-infinite-macro-print.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "5"] diff --git a/tests/ui/infinite/issue-41731-infinite-macro-println.rs b/tests/ui/infinite/issue-41731-infinite-macro-println.rs index 3c2b7ee023b5c..491f18dc4c637 100644 --- a/tests/ui/infinite/issue-41731-infinite-macro-println.rs +++ b/tests/ui/infinite/issue-41731-infinite-macro-println.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "5"] diff --git a/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs b/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs index 42ed5d19deb84..a2970cb5c805f 100644 --- a/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs +++ b/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/inherent-impls-overlap-check/no-overlap.rs b/tests/ui/inherent-impls-overlap-check/no-overlap.rs index 450e6d4202c07..85565a221ac2f 100644 --- a/tests/ui/inherent-impls-overlap-check/no-overlap.rs +++ b/tests/ui/inherent-impls-overlap-check/no-overlap.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:repeat.rs +//@ run-pass +//@ aux-build:repeat.rs // This tests the allocating algo branch of the // inherent impls overlap checker. diff --git a/tests/ui/inherent-impls-overlap-check/overlap.rs b/tests/ui/inherent-impls-overlap-check/overlap.rs index 6f2801197e90c..3265394369816 100644 --- a/tests/ui/inherent-impls-overlap-check/overlap.rs +++ b/tests/ui/inherent-impls-overlap-check/overlap.rs @@ -1,4 +1,4 @@ -// aux-build:repeat.rs +//@ aux-build:repeat.rs #![allow(unused)] diff --git a/tests/ui/inherit-env.rs b/tests/ui/inherit-env.rs index e29fa04bbd50b..e4ae8145d7129 100644 --- a/tests/ui/inherit-env.rs +++ b/tests/ui/inherit-env.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten -// ignore-wasm32 -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten +//@ ignore-wasm32 +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/inline-const/const-expr-array-init.rs b/tests/ui/inline-const/const-expr-array-init.rs index 8a92cdbc0f981..075c27c1cc92d 100644 --- a/tests/ui/inline-const/const-expr-array-init.rs +++ b/tests/ui/inline-const/const-expr-array-init.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-basic.rs b/tests/ui/inline-const/const-expr-basic.rs index dac46fe25ecfc..6a19cc656d02f 100644 --- a/tests/ui/inline-const/const-expr-basic.rs +++ b/tests/ui/inline-const/const-expr-basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-generic-err.rs b/tests/ui/inline-const/const-expr-generic-err.rs index 4e8879af54aff..3c4bbcb3dc9a6 100644 --- a/tests/ui/inline-const/const-expr-generic-err.rs +++ b/tests/ui/inline-const/const-expr-generic-err.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(inline_const)] fn foo() { diff --git a/tests/ui/inline-const/const-expr-generic.rs b/tests/ui/inline-const/const-expr-generic.rs index 3207bfa0e89e6..e634e1d4a47f1 100644 --- a/tests/ui/inline-const/const-expr-generic.rs +++ b/tests/ui/inline-const/const-expr-generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] fn foo() -> usize { diff --git a/tests/ui/inline-const/const-expr-inference.rs b/tests/ui/inline-const/const-expr-inference.rs index 0d5892a74d956..f3b97d3430efa 100644 --- a/tests/ui/inline-const/const-expr-inference.rs +++ b/tests/ui/inline-const/const-expr-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-lifetime.rs b/tests/ui/inline-const/const-expr-lifetime.rs index d883deb2845d3..5dac17645d7a8 100644 --- a/tests/ui/inline-const/const-expr-lifetime.rs +++ b/tests/ui/inline-const/const-expr-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-macro.rs b/tests/ui/inline-const/const-expr-macro.rs index 041f3e15a29b9..bf3cb3c3320fb 100644 --- a/tests/ui/inline-const/const-expr-macro.rs +++ b/tests/ui/inline-const/const-expr-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-reference.rs b/tests/ui/inline-const/const-expr-reference.rs index a54d879f69d74..b3753b0d371af 100644 --- a/tests/ui/inline-const/const-expr-reference.rs +++ b/tests/ui/inline-const/const-expr-reference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-match-pat-inference.rs b/tests/ui/inline-const/const-match-pat-inference.rs index c595824833f5f..3d3533839bc79 100644 --- a/tests/ui/inline-const/const-match-pat-inference.rs +++ b/tests/ui/inline-const/const-match-pat-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const_pat)] diff --git a/tests/ui/inline-const/const-match-pat-lifetime.rs b/tests/ui/inline-const/const-match-pat-lifetime.rs index 595741b101e93..f909e68e7be51 100644 --- a/tests/ui/inline-const/const-match-pat-lifetime.rs +++ b/tests/ui/inline-const/const-match-pat-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-match-pat-range.rs b/tests/ui/inline-const/const-match-pat-range.rs index 0f9372c537f89..7f51815cb7792 100644 --- a/tests/ui/inline-const/const-match-pat-range.rs +++ b/tests/ui/inline-const/const-match-pat-range.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(inline_const_pat, exclusive_range_pattern)] diff --git a/tests/ui/inline-const/const-match-pat.rs b/tests/ui/inline-const/const-match-pat.rs index fc4d37714585e..1580ef258129e 100644 --- a/tests/ui/inline-const/const-match-pat.rs +++ b/tests/ui/inline-const/const-match-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const_pat)] const MMIO_BIT1: u8 = 4; diff --git a/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs b/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs index 5661db4a2530d..a1c3c61484ae6 100644 --- a/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs +++ b/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/expr-unsafe.rs b/tests/ui/inline-const/expr-unsafe.rs index 2370c58a71206..f9d1450503e2a 100644 --- a/tests/ui/inline-const/expr-unsafe.rs +++ b/tests/ui/inline-const/expr-unsafe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_unsafe)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/expr-with-block.rs b/tests/ui/inline-const/expr-with-block.rs index 391872476fccd..07a1c9a10f5c2 100644 --- a/tests/ui/inline-const/expr-with-block.rs +++ b/tests/ui/inline-const/expr-with-block.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] fn main() { match true { diff --git a/tests/ui/inline-const/instance-doesnt-depend-on-type.rs b/tests/ui/inline-const/instance-doesnt-depend-on-type.rs index bc739785c8bb7..17208a230883f 100644 --- a/tests/ui/inline-const/instance-doesnt-depend-on-type.rs +++ b/tests/ui/inline-const/instance-doesnt-depend-on-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 114660 #![feature(inline_const)] diff --git a/tests/ui/inline-const/interpolated.rs b/tests/ui/inline-const/interpolated.rs index 3fcc621c94697..582900e7aa012 100644 --- a/tests/ui/inline-const/interpolated.rs +++ b/tests/ui/inline-const/interpolated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/macro-with-const.rs b/tests/ui/inline-const/macro-with-const.rs index e7393166d8df3..ba75a28f7362c 100644 --- a/tests/ui/inline-const/macro-with-const.rs +++ b/tests/ui/inline-const/macro-with-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! exp { (const $n:expr) => { diff --git a/tests/ui/inline-const/pat-unsafe.rs b/tests/ui/inline-const/pat-unsafe.rs index 5a90920ef3cff..4b05f3a1cddd8 100644 --- a/tests/ui/inline-const/pat-unsafe.rs +++ b/tests/ui/inline-const/pat-unsafe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_unsafe)] #![feature(inline_const_pat)] diff --git a/tests/ui/inline-const/required-const.rs b/tests/ui/inline-const/required-const.rs index 0483410662bfd..3de0ab2a0c06c 100644 --- a/tests/ui/inline-const/required-const.rs +++ b/tests/ui/inline-const/required-const.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zmir-opt-level=3 +//@ build-fail +//@ compile-flags: -Zmir-opt-level=3 #![feature(inline_const)] fn foo() { diff --git a/tests/ui/inlined-main.rs b/tests/ui/inlined-main.rs index 75ff4c87dc618..731ac0dddca61 100644 --- a/tests/ui/inlined-main.rs +++ b/tests/ui/inlined-main.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[inline(always)] fn main() {} diff --git a/tests/ui/inner-attrs-on-impl.rs b/tests/ui/inner-attrs-on-impl.rs index 636e8c4885e6f..1c94169a2e517 100644 --- a/tests/ui/inner-attrs-on-impl.rs +++ b/tests/ui/inner-attrs-on-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/inner-module.rs b/tests/ui/inner-module.rs index 363f753e24872..111f2cab857f2 100644 --- a/tests/ui/inner-module.rs +++ b/tests/ui/inner-module.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod inner { pub mod inner2 { diff --git a/tests/ui/inner-static.rs b/tests/ui/inner-static.rs index adba299ebe22d..9455ec5712fef 100644 --- a/tests/ui/inner-static.rs +++ b/tests/ui/inner-static.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:inner_static.rs +//@ run-pass +//@ aux-build:inner_static.rs extern crate inner_static; diff --git a/tests/ui/instrument-coverage/bad-value.rs b/tests/ui/instrument-coverage/bad-value.rs index 1925c36aa5371..3441738529162 100644 --- a/tests/ui/instrument-coverage/bad-value.rs +++ b/tests/ui/instrument-coverage/bad-value.rs @@ -1,5 +1,5 @@ -// revisions: blank bad -// [blank] compile-flags: -Cinstrument-coverage= -// [bad] compile-flags: -Cinstrument-coverage=bad-value +//@ revisions: blank bad +//@ [blank] compile-flags: -Cinstrument-coverage= +//@ [bad] compile-flags: -Cinstrument-coverage=bad-value fn main() {} diff --git a/tests/ui/instrument-coverage/off-values.rs b/tests/ui/instrument-coverage/off-values.rs index 0f9a0c47425dc..bd13e5d7495a7 100644 --- a/tests/ui/instrument-coverage/off-values.rs +++ b/tests/ui/instrument-coverage/off-values.rs @@ -1,9 +1,9 @@ -// check-pass -// revisions: n no off false zero -// [n] compile-flags: -Cinstrument-coverage=n -// [no] compile-flags: -Cinstrument-coverage=no -// [off] compile-flags: -Cinstrument-coverage=off -// [false] compile-flags: -Cinstrument-coverage=false -// [zero] compile-flags: -Cinstrument-coverage=0 +//@ check-pass +//@ revisions: n no off false zero +//@ [n] compile-flags: -Cinstrument-coverage=n +//@ [no] compile-flags: -Cinstrument-coverage=no +//@ [off] compile-flags: -Cinstrument-coverage=off +//@ [false] compile-flags: -Cinstrument-coverage=false +//@ [zero] compile-flags: -Cinstrument-coverage=0 fn main() {} diff --git a/tests/ui/instrument-coverage/on-values.rs b/tests/ui/instrument-coverage/on-values.rs index cc54c71c656fd..36643c40525ee 100644 --- a/tests/ui/instrument-coverage/on-values.rs +++ b/tests/ui/instrument-coverage/on-values.rs @@ -1,11 +1,11 @@ -// check-pass -// needs-profiler-support -// revisions: default y yes on true all -// [default] compile-flags: -Cinstrument-coverage -// [y] compile-flags: -Cinstrument-coverage=y -// [yes] compile-flags: -Cinstrument-coverage=yes -// [on] compile-flags: -Cinstrument-coverage=on -// [true] compile-flags: -Cinstrument-coverage=true -// [all] compile-flags: -Cinstrument-coverage=all +//@ check-pass +//@ needs-profiler-support +//@ revisions: default y yes on true all +//@ [default] compile-flags: -Cinstrument-coverage +//@ [y] compile-flags: -Cinstrument-coverage=y +//@ [yes] compile-flags: -Cinstrument-coverage=yes +//@ [on] compile-flags: -Cinstrument-coverage=on +//@ [true] compile-flags: -Cinstrument-coverage=true +//@ [all] compile-flags: -Cinstrument-coverage=all fn main() {} diff --git a/tests/ui/instrument-coverage/unstable.rs b/tests/ui/instrument-coverage/unstable.rs index c16bcd0bf6d13..ea2279aaf0cde 100644 --- a/tests/ui/instrument-coverage/unstable.rs +++ b/tests/ui/instrument-coverage/unstable.rs @@ -1,6 +1,6 @@ -// revisions: branch except-unused-functions except-unused-generics -// [branch] compile-flags: -Cinstrument-coverage=branch -// [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions -// [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics +//@ revisions: branch except-unused-functions except-unused-generics +//@ [branch] compile-flags: -Cinstrument-coverage=branch +//@ [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions +//@ [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics fn main() {} diff --git a/tests/ui/instrument-xray/flags-always-never-1.rs b/tests/ui/instrument-xray/flags-always-never-1.rs index 4dd43439eb7c2..91032662e6b22 100644 --- a/tests/ui/instrument-xray/flags-always-never-1.rs +++ b/tests/ui/instrument-xray/flags-always-never-1.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow `always` and `never` simultaneously. // -// needs-xray -// compile-flags: -Z instrument-xray=always,never -// error-pattern: incorrect value `always,never` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always,never +//@ error-pattern: incorrect value `always,never` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/flags-always-never-2.rs b/tests/ui/instrument-xray/flags-always-never-2.rs index 7310aa0a0d288..dd4deaad326b1 100644 --- a/tests/ui/instrument-xray/flags-always-never-2.rs +++ b/tests/ui/instrument-xray/flags-always-never-2.rs @@ -1,9 +1,9 @@ // Checks that `-Z instrument-xray` allows `always` and `never` sequentially. // (The last specified setting wins, like `-Z instrument-xray=no` as well.) // -// needs-xray -// compile-flags: -Z instrument-xray=always -// compile-flags: -Z instrument-xray=never -// check-pass +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always +//@ compile-flags: -Z instrument-xray=never +//@ check-pass fn main() {} diff --git a/tests/ui/instrument-xray/flags-basic.rs b/tests/ui/instrument-xray/flags-basic.rs index b97f0dd8a072c..ab9b7666430f9 100644 --- a/tests/ui/instrument-xray/flags-basic.rs +++ b/tests/ui/instrument-xray/flags-basic.rs @@ -1,9 +1,9 @@ // Verifies basic `-Z instrument-xray` flags. // -// needs-xray -// compile-flags: -Z instrument-xray -// compile-flags: -Z instrument-xray=skip-exit -// compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300 -// check-pass +//@ needs-xray +//@ compile-flags: -Z instrument-xray +//@ compile-flags: -Z instrument-xray=skip-exit +//@ compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300 +//@ check-pass fn main() {} diff --git a/tests/ui/instrument-xray/flags-dupe-always.rs b/tests/ui/instrument-xray/flags-dupe-always.rs index 407f3e2aa5da8..41e4f267b471f 100644 --- a/tests/ui/instrument-xray/flags-dupe-always.rs +++ b/tests/ui/instrument-xray/flags-dupe-always.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow duplicates. // -// needs-xray -// compile-flags: -Z instrument-xray=always,always -// error-pattern: incorrect value `always,always` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always,always +//@ error-pattern: incorrect value `always,always` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs index 75b210a6547ec..ba5ea28d40b7e 100644 --- a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs +++ b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow duplicates. // -// needs-xray -// compile-flags: -Z instrument-xray=ignore-loops,ignore-loops -// error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=ignore-loops,ignore-loops +//@ error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/target-not-supported.rs b/tests/ui/instrument-xray/target-not-supported.rs index e6bdd23e8fc3a..cdae26f993d3b 100644 --- a/tests/ui/instrument-xray/target-not-supported.rs +++ b/tests/ui/instrument-xray/target-not-supported.rs @@ -1,8 +1,8 @@ // Verifies that `-Z instrument-xray` cannot be used with unsupported targets, // -// needs-llvm-components: x86 -// compile-flags: -Z instrument-xray --target x86_64-apple-darwin -// error-pattern: error: XRay instrumentation is not supported for this target +//@ needs-llvm-components: x86 +//@ compile-flags: -Z instrument-xray --target x86_64-apple-darwin +//@ error-pattern: error: XRay instrumentation is not supported for this target #![feature(no_core)] #![no_core] diff --git a/tests/ui/internal-lints/diagnostics_incorrect.rs b/tests/ui/internal-lints/diagnostics_incorrect.rs index 99f99ffcd3597..c1532aa9d57e5 100644 --- a/tests/ui/internal-lints/diagnostics_incorrect.rs +++ b/tests/ui/internal-lints/diagnostics_incorrect.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_attrs)] diff --git a/tests/ui/internal-lints/existing_doc_keyword.rs b/tests/ui/internal-lints/existing_doc_keyword.rs index 7783dc40fcf20..16c350287b226 100644 --- a/tests/ui/internal-lints/existing_doc_keyword.rs +++ b/tests/ui/internal-lints/existing_doc_keyword.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![feature(rustdoc_internals)] diff --git a/tests/ui/internal-lints/query_stability_incorrect.rs b/tests/ui/internal-lints/query_stability_incorrect.rs index f478b73329eb7..a428611caaa47 100644 --- a/tests/ui/internal-lints/query_stability_incorrect.rs +++ b/tests/ui/internal-lints/query_stability_incorrect.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_attrs)] diff --git a/tests/ui/internal-lints/rustc_pass_by_value_self.rs b/tests/ui/internal-lints/rustc_pass_by_value_self.rs index 6ce67dcaf1d9b..d2e0e272025f6 100644 --- a/tests/ui/internal-lints/rustc_pass_by_value_self.rs +++ b/tests/ui/internal-lints/rustc_pass_by_value_self.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options // NOTE: This test doesn't actually require `fulldeps` // so we could instead use it as a `ui` test. // diff --git a/tests/ui/internal/internal-unstable-noallow.rs b/tests/ui/internal/internal-unstable-noallow.rs index 616f6668d02cd..9d925c861226f 100644 --- a/tests/ui/internal/internal-unstable-noallow.rs +++ b/tests/ui/internal/internal-unstable-noallow.rs @@ -3,11 +3,11 @@ // cross-crate macros, and hence need to use error-pattern instead of // the // ~ form. -// aux-build:internal_unstable.rs -// error-pattern:use of unstable library feature 'function' -// error-pattern:use of unstable library feature 'struct_field' -// error-pattern:use of unstable library feature 'method' -// error-pattern:use of unstable library feature 'struct2_field' +//@ aux-build:internal_unstable.rs +//@ error-pattern:use of unstable library feature 'function' +//@ error-pattern:use of unstable library feature 'struct_field' +//@ error-pattern:use of unstable library feature 'method' +//@ error-pattern:use of unstable library feature 'struct2_field' #[macro_use] extern crate internal_unstable; diff --git a/tests/ui/internal/internal-unstable-thread-local.rs b/tests/ui/internal/internal-unstable-thread-local.rs index b9194c6b3705f..351ba03b1b778 100644 --- a/tests/ui/internal/internal-unstable-thread-local.rs +++ b/tests/ui/internal/internal-unstable-thread-local.rs @@ -1,4 +1,4 @@ -// aux-build:internal_unstable.rs +//@ aux-build:internal_unstable.rs #![allow(dead_code)] diff --git a/tests/ui/internal/internal-unstable.rs b/tests/ui/internal/internal-unstable.rs index a4445fefef57d..35a2941633a48 100644 --- a/tests/ui/internal/internal-unstable.rs +++ b/tests/ui/internal/internal-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:internal_unstable.rs +//@ aux-build:internal_unstable.rs #![feature(allow_internal_unstable)] #[allow(dead_code)] diff --git a/tests/ui/intrinsics-always-extern.rs b/tests/ui/intrinsics-always-extern.rs index 22951147d7d87..0afd8353455f2 100644 --- a/tests/ui/intrinsics-always-extern.rs +++ b/tests/ui/intrinsics-always-extern.rs @@ -10,6 +10,7 @@ impl Foo for () { } extern "rust-intrinsic" fn hello() {//~ ERROR intrinsic must + //~^ ERROR unrecognized intrinsic function: `hello` } fn main() { diff --git a/tests/ui/intrinsics-always-extern.stderr b/tests/ui/intrinsics-always-extern.stderr index 24b6da16096e6..32468f99197f3 100644 --- a/tests/ui/intrinsics-always-extern.stderr +++ b/tests/ui/intrinsics-always-extern.stderr @@ -4,6 +4,12 @@ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block LL | extern "rust-intrinsic" fn foo(&self); | ^^^ +error[E0093]: unrecognized intrinsic function: `hello` + --> $DIR/intrinsics-always-extern.rs:12:28 + | +LL | extern "rust-intrinsic" fn hello() { + | ^^^^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block --> $DIR/intrinsics-always-extern.rs:8:43 | @@ -17,8 +23,10 @@ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block | LL | extern "rust-intrinsic" fn hello() { | ____________________________________^ +LL | | LL | | } | |_^ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors +For more information about this error, try `rustc --explain E0093`. diff --git a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs index f36a5f1acc152..a9c92f23cdd09 100644 --- a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs +++ b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics, core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/intrinsics/const-eval-select-backtrace-std.rs b/tests/ui/intrinsics/const-eval-select-backtrace-std.rs index 1164a3a5b0180..1707ed3f1bd8f 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace-std.rs +++ b/tests/ui/intrinsics/const-eval-select-backtrace-std.rs @@ -1,7 +1,7 @@ // See issue #100696. -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 fn main() { &""[1..]; } diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.rs b/tests/ui/intrinsics/const-eval-select-backtrace.rs index ef1c7c4195b91..d6b1c865bdfc7 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace.rs +++ b/tests/ui/intrinsics/const-eval-select-backtrace.rs @@ -1,8 +1,8 @@ #![feature(core_intrinsics)] // See issue #100696. -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 #[track_caller] fn uhoh() { diff --git a/tests/ui/intrinsics/const-eval-select-x86_64.rs b/tests/ui/intrinsics/const-eval-select-x86_64.rs index f3924acf0fa8b..5ba7a443d0bb9 100644 --- a/tests/ui/intrinsics/const-eval-select-x86_64.rs +++ b/tests/ui/intrinsics/const-eval-select-x86_64.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86_64 +//@ run-pass +//@ only-x86_64 #![feature(const_eval_select)] #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/const-eval-select.rs b/tests/ui/intrinsics/const-eval-select.rs index 9ff20d3fbdd9e..353105cb0a163 100644 --- a/tests/ui/intrinsics/const-eval-select.rs +++ b/tests/ui/intrinsics/const-eval-select.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_eval_select)] #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/intrinsic-alignment.rs b/tests/ui/intrinsics/intrinsic-alignment.rs index 6f9df64417e8e..69ccab201e6f1 100644 --- a/tests/ui/intrinsics/intrinsic-alignment.rs +++ b/tests/ui/intrinsics/intrinsic-alignment.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare seems not important to test here +//@ run-pass +//@ ignore-wasm32-bare seems not important to test here #![feature(intrinsics, rustc_attrs)] diff --git a/tests/ui/intrinsics/intrinsic-assume.rs b/tests/ui/intrinsics/intrinsic-assume.rs index 3c9d70cb556bf..38ff8e31b334c 100644 --- a/tests/ui/intrinsics/intrinsic-assume.rs +++ b/tests/ui/intrinsics/intrinsic-assume.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::assume; diff --git a/tests/ui/intrinsics/intrinsic-atomics-cc.rs b/tests/ui/intrinsics/intrinsic-atomics-cc.rs index ce3fa7b0c05e6..612a21a47cf4c 100644 --- a/tests/ui/intrinsics/intrinsic-atomics-cc.rs +++ b/tests/ui/intrinsics/intrinsic-atomics-cc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_intrinsic.rs +//@ run-pass +//@ aux-build:cci_intrinsic.rs extern crate cci_intrinsic; diff --git a/tests/ui/intrinsics/intrinsic-atomics.rs b/tests/ui/intrinsics/intrinsic-atomics.rs index b17f4347be31c..4ad267e3ddb3f 100644 --- a/tests/ui/intrinsics/intrinsic-atomics.rs +++ b/tests/ui/intrinsics/intrinsic-atomics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(intrinsics)] mod rusti { diff --git a/tests/ui/intrinsics/intrinsic-nearby.rs b/tests/ui/intrinsics/intrinsic-nearby.rs index 7b1d1eeaadbd0..990ecfc2b70d0 100644 --- a/tests/ui/intrinsics/intrinsic-nearby.rs +++ b/tests/ui/intrinsics/intrinsic-nearby.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::*; diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const.rs b/tests/ui/intrinsics/intrinsic-raw_eq-const.rs index 32841f5318f8c..47b4e20dfbb7e 100644 --- a/tests/ui/intrinsics/intrinsic-raw_eq-const.rs +++ b/tests/ui/intrinsics/intrinsic-raw_eq-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_intrinsic_raw_eq)] diff --git a/tests/ui/intrinsics/intrinsic-unreachable.rs b/tests/ui/intrinsics/intrinsic-unreachable.rs index 73dd71d482ff5..f43437198763b 100644 --- a/tests/ui/intrinsics/intrinsic-unreachable.rs +++ b/tests/ui/intrinsics/intrinsic-unreachable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics; diff --git a/tests/ui/intrinsics/intrinsic-volatile.rs b/tests/ui/intrinsics/intrinsic-volatile.rs index 7b2c825a2084b..245a716d55ce6 100644 --- a/tests/ui/intrinsics/intrinsic-volatile.rs +++ b/tests/ui/intrinsics/intrinsic-volatile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/intrinsics-integer.rs b/tests/ui/intrinsics/intrinsics-integer.rs index 88bf42b685f4d..bfd7e4714fef8 100644 --- a/tests/ui/intrinsics/intrinsics-integer.rs +++ b/tests/ui/intrinsics/intrinsics-integer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(intrinsics)] #![feature(rustc_attrs)] diff --git a/tests/ui/intrinsics/intrinsics-math.rs b/tests/ui/intrinsics/intrinsics-math.rs index aea9fde691554..4b1a1e871dad8 100644 --- a/tests/ui/intrinsics/intrinsics-math.rs +++ b/tests/ui/intrinsics/intrinsics-math.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten fma not implemented in emscripten +//@ run-pass +//@ ignore-emscripten fma not implemented in emscripten macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ diff --git a/tests/ui/intrinsics/issue-84297-reifying-copy.rs b/tests/ui/intrinsics/issue-84297-reifying-copy.rs index 08ba9ce7ecb29..6795f5d65b27d 100644 --- a/tests/ui/intrinsics/issue-84297-reifying-copy.rs +++ b/tests/ui/intrinsics/issue-84297-reifying-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _unused = if true { diff --git a/tests/ui/intrinsics/non-integer-atomic.rs b/tests/ui/intrinsics/non-integer-atomic.rs index 85ea81ba67961..2d1d088208498 100644 --- a/tests/ui/intrinsics/non-integer-atomic.rs +++ b/tests/ui/intrinsics/non-integer-atomic.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs index 6db2ebb9754bc..2420aec505889 100644 --- a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs +++ b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs @@ -1,9 +1,9 @@ -// run-pass -// revisions: default strict -// [strict]compile-flags: -Zstrict-init-checks +//@ run-pass +//@ revisions: default strict +//@ [strict]compile-flags: -Zstrict-init-checks // ignore-tidy-linelength -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes // This test checks panic emitted from `mem::{uninitialized,zeroed}`. diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs index b0688e530ae71..fcd6612f1259d 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs @@ -1,5 +1,6 @@ #![feature(intrinsics)] #![feature(rustc_attrs)] +#![feature(effects)] extern "rust-intrinsic" { fn size_of() -> usize; //~ ERROR intrinsic safety mismatch @@ -10,4 +11,15 @@ extern "rust-intrinsic" { //~^ ERROR intrinsic safety mismatch } +#[rustc_intrinsic] +const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} +//~^ ERROR intrinsic safety mismatch +//~| ERROR intrinsic has wrong type + +mod foo { + #[rustc_intrinsic] + unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + //~^ ERROR wrong number of const parameters +} + fn main() {} diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr index b6961275e1885..0b579121ac18e 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr @@ -1,17 +1,17 @@ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:5:5 + --> $DIR/safe-intrinsic-mismatch.rs:6:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:9:5 + --> $DIR/safe-intrinsic-mismatch.rs:10:5 | LL | fn assume(b: bool); | ^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:5:5 + --> $DIR/safe-intrinsic-mismatch.rs:6:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -19,12 +19,35 @@ LL | fn size_of() -> usize; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:9:5 + --> $DIR/safe-intrinsic-mismatch.rs:10:5 | LL | fn assume(b: bool); | ^^^^^^^^^^^^^^^^^^ | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: aborting due to 4 previous errors +error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` + --> $DIR/safe-intrinsic-mismatch.rs:15:1 + | +LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0308]: intrinsic has wrong type + --> $DIR/safe-intrinsic-mismatch.rs:15:26 + | +LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^ expected unsafe fn, found normal fn + | + = note: expected signature `unsafe fn(_, _, _)` + found signature `fn(_, _, _)` + +error[E0094]: intrinsic has wrong number of const parameters: found 0, expected 1 + --> $DIR/safe-intrinsic-mismatch.rs:21:31 + | +LL | unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^ expected 1 const parameter + +error: aborting due to 7 previous errors +Some errors have detailed explanations: E0094, E0308. +For more information about an error, try `rustc --explain E0094`. diff --git a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs index 1d7ec5cba17ca..c0a4bcac11bda 100644 --- a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs +++ b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs @@ -1,10 +1,10 @@ -// revisions: BADFLAGS BADTARGET -// [BADFLAGS] compile-flags: --target=aarch64-unknown-linux-gnu -Zbranch-protection=leaf -// [BADFLAGS] check-fail -// [BADFLAGS] needs-llvm-components: aarch64 -// [BADTARGET] compile-flags: --target=x86_64-unknown-linux-gnu -Zbranch-protection=bti -// [BADTARGET] check-fail -// [BADTARGET] needs-llvm-components: x86 +//@ revisions: BADFLAGS BADTARGET +//@ [BADFLAGS] compile-flags: --target=aarch64-unknown-linux-gnu -Zbranch-protection=leaf +//@ [BADFLAGS] check-fail +//@ [BADFLAGS] needs-llvm-components: aarch64 +//@ [BADTARGET] compile-flags: --target=x86_64-unknown-linux-gnu -Zbranch-protection=bti +//@ [BADTARGET] check-fail +//@ [BADTARGET] needs-llvm-components: x86 #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/ui/invalid-compile-flags/codegen-option-without-group.rs b/tests/ui/invalid-compile-flags/codegen-option-without-group.rs index 7bbf47a383951..872b1b673ad51 100644 --- a/tests/ui/invalid-compile-flags/codegen-option-without-group.rs +++ b/tests/ui/invalid-compile-flags/codegen-option-without-group.rs @@ -1 +1 @@ -// compile-flags: --llvm-args +//@ compile-flags: --llvm-args diff --git a/tests/ui/invalid-compile-flags/debug-option-without-group.rs b/tests/ui/invalid-compile-flags/debug-option-without-group.rs index 86e40c1785405..77e73bf5f8a5b 100644 --- a/tests/ui/invalid-compile-flags/debug-option-without-group.rs +++ b/tests/ui/invalid-compile-flags/debug-option-without-group.rs @@ -1 +1 @@ -// compile-flags: --unpretty=hir +//@ compile-flags: --unpretty=hir diff --git a/tests/ui/invalid-compile-flags/fuel.rs b/tests/ui/invalid-compile-flags/fuel.rs index 456bc47d359ee..855aa8581223a 100644 --- a/tests/ui/invalid-compile-flags/fuel.rs +++ b/tests/ui/invalid-compile-flags/fuel.rs @@ -1,11 +1,11 @@ -// revisions: incremental threads -// dont-check-compiler-stderr +//@ revisions: incremental threads +//@ dont-check-compiler-stderr // -// [threads] compile-flags: -Zfuel=a=1 -Zthreads=2 -// [threads] error-pattern:optimization fuel is incompatible with multiple threads +//@ [threads] compile-flags: -Zfuel=a=1 -Zthreads=2 +//@ [threads] error-pattern:optimization fuel is incompatible with multiple threads // -// [incremental] incremental -// [incremental] compile-flags: -Zprint-fuel=a -// [incremental] error-pattern:optimization fuel is incompatible with incremental compilation +//@ [incremental] incremental +//@ [incremental] compile-flags: -Zprint-fuel=a +//@ [incremental] error-pattern:optimization fuel is incompatible with incremental compilation fn main() {} diff --git a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs index 15a88ebdb118a..6a4ecb9d83978 100644 --- a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs +++ b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs @@ -1,19 +1,19 @@ -// revisions: x86 x86_64 aarch64 +//@ revisions: x86 x86_64 aarch64 -// compile-flags: -Zfunction-return=thunk-extern +//@ compile-flags: -Zfunction-return=thunk-extern -//[x86] check-pass -//[x86] needs-llvm-components: x86 -//[x86] compile-flags: --target i686-unknown-linux-gnu +//@[x86] check-pass +//@[x86] needs-llvm-components: x86 +//@[x86] compile-flags: --target i686-unknown-linux-gnu -//[x86_64] check-pass -//[x86_64] needs-llvm-components: x86 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] check-pass +//@[x86_64] needs-llvm-components: x86 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[aarch64] check-fail -//[aarch64] needs-llvm-components: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64 +//@[aarch64] check-fail +//@[aarch64] needs-llvm-components: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64 #![feature(no_core)] #![no_core] diff --git a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs index f925905de3613..f4be36e08f09c 100644 --- a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs +++ b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs @@ -1,20 +1,20 @@ -// revisions: small kernel medium large +//@ revisions: small kernel medium large -// needs-llvm-components: x86 -// compile-flags: --target x86_64-unknown-linux-gnu -Zfunction-return=thunk-extern +//@ needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu -Zfunction-return=thunk-extern -//[small] check-pass -//[small] compile-flags: -Ccode-model=small +//@[small] check-pass +//@[small] compile-flags: -Ccode-model=small -//[kernel] check-pass -//[kernel] compile-flags: -Ccode-model=kernel +//@[kernel] check-pass +//@[kernel] compile-flags: -Ccode-model=kernel -//[medium] check-pass -//[medium] compile-flags: -Ccode-model=medium +//@[medium] check-pass +//@[medium] compile-flags: -Ccode-model=medium -//[large] check-fail -//[large] compile-flags: -Ccode-model=large -//[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models +//@[large] check-fail +//@[large] compile-flags: -Ccode-model=large +//@[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models #![feature(no_core)] #![no_core] diff --git a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs index ee28f5eb6d665..ddb46e5971115 100644 --- a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs +++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs @@ -1,4 +1,4 @@ -// build-fail -// compile-flags: -Cpasses=unknown-pass +//@ build-fail +//@ compile-flags: -Cpasses=unknown-pass fn main() {} diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs index 150723898bd78..16e5619e8e494 100644 --- a/tests/ui/invalid/invalid-debugger-visualizer-option.rs +++ b/tests/ui/invalid/invalid-debugger-visualizer-option.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE" +//@ normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE" #![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument #![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR diff --git a/tests/ui/invalid/issue-114435-layout-type-err.rs b/tests/ui/invalid/issue-114435-layout-type-err.rs index a2d405936875f..f68744a13c156 100644 --- a/tests/ui/invalid/issue-114435-layout-type-err.rs +++ b/tests/ui/invalid/issue-114435-layout-type-err.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --crate-type lib -Cdebuginfo=2 -// error-pattern: the type has an unknown layout +//@ build-fail +//@ compile-flags: --crate-type lib -Cdebuginfo=2 +//@ error-pattern: the type has an unknown layout #![recursion_limit = "10"] macro_rules! link { diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs index 6ec81a943067b..3a80934b8657e 100644 --- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs +++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs @@ -9,24 +9,24 @@ // up clobbering `/dev/null`. Instead we'll use a non-existent path, which // also used to ICE, but even root can't magically write there. -// compile-flags: -o ./does-not-exist/output +//@ compile-flags: -o ./does-not-exist/output // The error-pattern check occurs *before* normalization, and the error patterns // are wildly different between build environments. So this is a cop-out (and we // rely on the checking of the normalized stderr output as our actual // "verification" of the diagnostic). -// error-pattern: error +//@ error-pattern: error // On Mac OS X, we get an error like the below -// normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/" +//@ normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/" // On Linux, we get an error like the below -// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/" +//@ normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/" -// ignore-windows - this is a unix-specific test -// ignore-emscripten - the file-system issues do not replicate here -// ignore-wasm - the file-system issues do not replicate here -// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten - the file-system issues do not replicate here +//@ ignore-wasm - the file-system issues do not replicate here +//@ ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu #![crate_type = "lib"] diff --git a/tests/ui/issue-11881.rs b/tests/ui/issue-11881.rs index f6360db9b5f44..1abe079720337 100644 --- a/tests/ui/issue-11881.rs +++ b/tests/ui/issue-11881.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/issue-13560.rs b/tests/ui/issue-13560.rs index 3397202bef2fd..6174fa9324b1b 100644 --- a/tests/ui/issue-13560.rs +++ b/tests/ui/issue-13560.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-build:issue-13560-1.rs -// aux-build:issue-13560-2.rs -// aux-build:issue-13560-3.rs +//@ run-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-build:issue-13560-1.rs +//@ aux-build:issue-13560-2.rs +//@ aux-build:issue-13560-3.rs // Regression test for issue #13560, the test itself is all in the dependent // libraries. The fail which previously failed to compile is the one numbered 3. diff --git a/tests/ui/issue-15924.rs b/tests/ui/issue-15924.rs index d8b3914d0d4f7..77e1ae697c579 100644 --- a/tests/ui/issue-15924.rs +++ b/tests/ui/issue-15924.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fmt; use std::marker::PhantomData; diff --git a/tests/ui/issue-16822.rs b/tests/ui/issue-16822.rs index c611c33affd75..94d89f88f4705 100644 --- a/tests/ui/issue-16822.rs +++ b/tests/ui/issue-16822.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-16822.rs +//@ run-pass +//@ aux-build:issue-16822.rs extern crate issue_16822 as lib; diff --git a/tests/ui/issue-18502.rs b/tests/ui/issue-18502.rs index 2082ae7a99152..3e2c37ee8aa94 100644 --- a/tests/ui/issue-18502.rs +++ b/tests/ui/issue-18502.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-18502.rs +//@ run-pass +//@ aux-build:issue-18502.rs extern crate issue_18502 as fmt; diff --git a/tests/ui/issue-24106.rs b/tests/ui/issue-24106.rs index 45f0bd5b6796b..4f7b299b12f5c 100644 --- a/tests/ui/issue-24106.rs +++ b/tests/ui/issue-24106.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-24106.rs +//@ run-pass +//@ aux-build:issue-24106.rs extern crate issue_24106; diff --git a/tests/ui/issue-76387-llvm-miscompile.rs b/tests/ui/issue-76387-llvm-miscompile.rs index a7fc9da633963..d674ebb5eaf17 100644 --- a/tests/ui/issue-76387-llvm-miscompile.rs +++ b/tests/ui/issue-76387-llvm-miscompile.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=3 -// aux-build: issue-76387.rs -// run-pass +//@ compile-flags: -C opt-level=3 +//@ aux-build: issue-76387.rs +//@ run-pass // Regression test for issue #76387 // Tests that LLVM doesn't miscompile this diff --git a/tests/ui/issues/auxiliary/cgu_test.rs b/tests/ui/issues/auxiliary/cgu_test.rs index 5ed973164a1c0..1103fcb1f0b28 100644 --- a/tests/ui/issues/auxiliary/cgu_test.rs +++ b/tests/ui/issues/auxiliary/cgu_test.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: --crate-type=lib pub fn id(t: T) -> T { t diff --git a/tests/ui/issues/auxiliary/cgu_test_a.rs b/tests/ui/issues/auxiliary/cgu_test_a.rs index a3dcd92012ee9..7998f1870b8fe 100644 --- a/tests/ui/issues/auxiliary/cgu_test_a.rs +++ b/tests/ui/issues/auxiliary/cgu_test_a.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Ccodegen-units=2 --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: -Ccodegen-units=2 --crate-type=lib extern crate cgu_test; diff --git a/tests/ui/issues/auxiliary/cgu_test_b.rs b/tests/ui/issues/auxiliary/cgu_test_b.rs index a3dcd92012ee9..7998f1870b8fe 100644 --- a/tests/ui/issues/auxiliary/cgu_test_b.rs +++ b/tests/ui/issues/auxiliary/cgu_test_b.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Ccodegen-units=2 --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: -Ccodegen-units=2 --crate-type=lib extern crate cgu_test; diff --git a/tests/ui/issues/auxiliary/issue-111011.rs b/tests/ui/issues/auxiliary/issue-111011.rs index 927134a588c18..7130234f41e22 100644 --- a/tests/ui/issues/auxiliary/issue-111011.rs +++ b/tests/ui/issues/auxiliary/issue-111011.rs @@ -1,6 +1,6 @@ #![feature(async_closure)] -// edition:2021 +//@ edition:2021 fn foo(x: impl FnOnce() -> Box) {} // just to make sure async closures can still be suggested for boxing. diff --git a/tests/ui/issues/auxiliary/issue-12133-dylib2.rs b/tests/ui/issues/auxiliary/issue-12133-dylib2.rs index 30de740060001..42e13ad69082e 100644 --- a/tests/ui/issues/auxiliary/issue-12133-dylib2.rs +++ b/tests/ui/issues/auxiliary/issue-12133-dylib2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "dylib"] diff --git a/tests/ui/issues/auxiliary/issue-12133-rlib.rs b/tests/ui/issues/auxiliary/issue-12133-rlib.rs index 39c261e1162f1..1adaf2b0379d2 100644 --- a/tests/ui/issues/auxiliary/issue-12133-rlib.rs +++ b/tests/ui/issues/auxiliary/issue-12133-rlib.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-14344-1.rs b/tests/ui/issues/auxiliary/issue-14344-1.rs index 954a1e554dabd..b2e3ac9400e75 100644 --- a/tests/ui/issues/auxiliary/issue-14344-1.rs +++ b/tests/ui/issues/auxiliary/issue-14344-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-18913-1.rs b/tests/ui/issues/auxiliary/issue-18913-1.rs index 053c5ada5eeff..caa2c707b560d 100644 --- a/tests/ui/issues/auxiliary/issue-18913-1.rs +++ b/tests/ui/issues/auxiliary/issue-18913-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![crate_name = "foo"] diff --git a/tests/ui/issues/auxiliary/issue-18913-2.rs b/tests/ui/issues/auxiliary/issue-18913-2.rs index 54747b45f523e..802f5ab3899bb 100644 --- a/tests/ui/issues/auxiliary/issue-18913-2.rs +++ b/tests/ui/issues/auxiliary/issue-18913-2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![crate_name = "foo"] diff --git a/tests/ui/issues/auxiliary/issue-25185-1.rs b/tests/ui/issues/auxiliary/issue-25185-1.rs index e957be9c1c1b6..032d7d5de348b 100644 --- a/tests/ui/issues/auxiliary/issue-25185-1.rs +++ b/tests/ui/issues/auxiliary/issue-25185-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-31702-2.rs b/tests/ui/issues/auxiliary/issue-31702-2.rs index d360ae0ca7e37..16300b0f5d530 100644 --- a/tests/ui/issues/auxiliary/issue-31702-2.rs +++ b/tests/ui/issues/auxiliary/issue-31702-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -g +//@ compile-flags: -g extern crate issue_31702_1; diff --git a/tests/ui/issues/issue-10228.rs b/tests/ui/issues/issue-10228.rs index ebf8b436f132f..7934afc7b9b3f 100644 --- a/tests/ui/issues/issue-10228.rs +++ b/tests/ui/issues/issue-10228.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum StdioContainer { CreatePipe(bool) diff --git a/tests/ui/issues/issue-10396.rs b/tests/ui/issues/issue-10396.rs index d16ea3dc344c1..082216d557cfc 100644 --- a/tests/ui/issues/issue-10396.rs +++ b/tests/ui/issues/issue-10396.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] enum Foo<'s> { diff --git a/tests/ui/issues/issue-10436.rs b/tests/ui/issues/issue-10436.rs index a7a20bad51750..672aa2464dc13 100644 --- a/tests/ui/issues/issue-10436.rs +++ b/tests/ui/issues/issue-10436.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn works(x: T) -> Vec { vec![x] } fn also_works(x: T) -> Vec { vec![x] } diff --git a/tests/ui/issues/issue-10456.rs b/tests/ui/issues/issue-10456.rs index 9f8d259552085..a43cc5d36f1e2 100644 --- a/tests/ui/issues/issue-10456.rs +++ b/tests/ui/issues/issue-10456.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub struct Foo; diff --git a/tests/ui/issues/issue-10638.rs b/tests/ui/issues/issue-10638.rs index e359669c00dad..f82023f2da558 100644 --- a/tests/ui/issues/issue-10638.rs +++ b/tests/ui/issues/issue-10638.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { //// I am not a doc comment! diff --git a/tests/ui/issues/issue-106755.rs b/tests/ui/issues/issue-106755.rs index 5eabc3bfb1384..40cb83fcabc0c 100644 --- a/tests/ui/issues/issue-106755.rs +++ b/tests/ui/issues/issue-106755.rs @@ -1,4 +1,4 @@ -// compile-flags:-Ztranslate-lang=en_US +//@ compile-flags:-Ztranslate-lang=en_US #![feature(negative_impls)] #![feature(marker_trait_attr)] diff --git a/tests/ui/issues/issue-10683.rs b/tests/ui/issues/issue-10683.rs index dcb221f8c5776..675a8323fc42f 100644 --- a/tests/ui/issues/issue-10683.rs +++ b/tests/ui/issues/issue-10683.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 static NAME: &'static str = "hello world"; diff --git a/tests/ui/issues/issue-10718.rs b/tests/ui/issues/issue-10718.rs index a1de0cfe6ca6a..5d3cf2621acd1 100644 --- a/tests/ui/issues/issue-10718.rs +++ b/tests/ui/issues/issue-10718.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(p: F) { p(); diff --git a/tests/ui/issues/issue-10734.rs b/tests/ui/issues/issue-10734.rs index 723e6ed22ddea..8daa401748c7c 100644 --- a/tests/ui/issues/issue-10734.rs +++ b/tests/ui/issues/issue-10734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static mut drop_count: usize = 0; diff --git a/tests/ui/issues/issue-10767.rs b/tests/ui/issues/issue-10767.rs index 5670cd458f394..7d74f1e901721 100644 --- a/tests/ui/issues/issue-10767.rs +++ b/tests/ui/issues/issue-10767.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { fn f() { diff --git a/tests/ui/issues/issue-10802.rs b/tests/ui/issues/issue-10802.rs index 99e1a92dfcc29..eca701ce98c95 100644 --- a/tests/ui/issues/issue-10802.rs +++ b/tests/ui/issues/issue-10802.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct DroppableStruct; diff --git a/tests/ui/issues/issue-10806.rs b/tests/ui/issues/issue-10806.rs index 2f1d7bb5aaf3d..731edc8335d6e 100644 --- a/tests/ui/issues/issue-10806.rs +++ b/tests/ui/issues/issue-10806.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn foo() -> isize { 3 diff --git a/tests/ui/issues/issue-10853.rs b/tests/ui/issues/issue-10853.rs index 3dcabf9b16536..0b0bcb710ade1 100644 --- a/tests/ui/issues/issue-10853.rs +++ b/tests/ui/issues/issue-10853.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![deny(missing_docs)] #![doc="module"] diff --git a/tests/ui/issues/issue-10902.rs b/tests/ui/issues/issue-10902.rs index 162482d49abd5..72f08ec3f9489 100644 --- a/tests/ui/issues/issue-10902.rs +++ b/tests/ui/issues/issue-10902.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod two_tuple { pub trait T { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-11047.rs b/tests/ui/issues/issue-11047.rs index 7a4acea453757..6e1b2856afcde 100644 --- a/tests/ui/issues/issue-11047.rs +++ b/tests/ui/issues/issue-11047.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that static methods can be invoked on `type` aliases #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-11085.rs b/tests/ui/issues/issue-11085.rs index 47c03238b55f0..c4a9f5f69bdb4 100644 --- a/tests/ui/issues/issue-11085.rs +++ b/tests/ui/issues/issue-11085.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { #[cfg(fail)] diff --git a/tests/ui/issues/issue-11205.rs b/tests/ui/issues/issue-11205.rs index ce0951eafdd34..f21a52050ffde 100644 --- a/tests/ui/issues/issue-11205.rs +++ b/tests/ui/issues/issue-11205.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-11224.rs b/tests/ui/issues/issue-11224.rs index e1c1df99aca9e..3a504604b6a9d 100644 --- a/tests/ui/issues/issue-11224.rs +++ b/tests/ui/issues/issue-11224.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-11224.rs +//@ run-pass +//@ aux-build:issue-11224.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_11224 as unused; diff --git a/tests/ui/issues/issue-11267.rs b/tests/ui/issues/issue-11267.rs index 848ed6ac7a8ff..036ad1d54edcd 100644 --- a/tests/ui/issues/issue-11267.rs +++ b/tests/ui/issues/issue-11267.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that unary structs can be mutably borrowed. struct Empty; diff --git a/tests/ui/issues/issue-11382.rs b/tests/ui/issues/issue-11382.rs index 42a7a0d04a108..18c8c756f32e3 100644 --- a/tests/ui/issues/issue-11382.rs +++ b/tests/ui/issues/issue-11382.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", 1.2); } diff --git a/tests/ui/issues/issue-11384.rs b/tests/ui/issues/issue-11384.rs index 0105b4d223e4d..0d1cce71958e3 100644 --- a/tests/ui/issues/issue-11384.rs +++ b/tests/ui/issues/issue-11384.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Common { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-11508.rs b/tests/ui/issues/issue-11508.rs index 49868b73efa22..e7ed7a9f15f1d 100644 --- a/tests/ui/issues/issue-11508.rs +++ b/tests/ui/issues/issue-11508.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-11508.rs +//@ run-pass +//@ aux-build:issue-11508.rs extern crate issue_11508 as rand; diff --git a/tests/ui/issues/issue-11529.rs b/tests/ui/issues/issue-11529.rs index 9a6cc8e9fe881..db7ff85d46b0f 100644 --- a/tests/ui/issues/issue-11529.rs +++ b/tests/ui/issues/issue-11529.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-11529.rs +//@ run-pass +//@ aux-build:issue-11529.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_11529 as a; diff --git a/tests/ui/issues/issue-11552.rs b/tests/ui/issues/issue-11552.rs index 9fb9f3d2e3f34..d4784e53e6b41 100644 --- a/tests/ui/issues/issue-11552.rs +++ b/tests/ui/issues/issue-11552.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] #[derive(Clone)] diff --git a/tests/ui/issues/issue-11592.rs b/tests/ui/issues/issue-11592.rs index a4611f2f90ecb..cb1a92e809a9d 100644 --- a/tests/ui/issues/issue-11592.rs +++ b/tests/ui/issues/issue-11592.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! Ensure the private trait Bar isn't complained about. #![deny(missing_docs)] diff --git a/tests/ui/issues/issue-11677.rs b/tests/ui/issues/issue-11677.rs index be18c736f1483..32e129b2c01d6 100644 --- a/tests/ui/issues/issue-11677.rs +++ b/tests/ui/issues/issue-11677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-11680.rs b/tests/ui/issues/issue-11680.rs index bfa8f5c5a1b41..9f3dfebcc812c 100644 --- a/tests/ui/issues/issue-11680.rs +++ b/tests/ui/issues/issue-11680.rs @@ -1,4 +1,4 @@ -// aux-build:issue-11680.rs +//@ aux-build:issue-11680.rs extern crate issue_11680 as other; diff --git a/tests/ui/issues/issue-11709.rs b/tests/ui/issues/issue-11709.rs index 2d6956649a283..8a11074eca8e2 100644 --- a/tests/ui/issues/issue-11709.rs +++ b/tests/ui/issues/issue-11709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Don't panic on blocks without results diff --git a/tests/ui/issues/issue-11740.rs b/tests/ui/issues/issue-11740.rs index c3badfd9b4904..c6099c2a0c041 100644 --- a/tests/ui/issues/issue-11740.rs +++ b/tests/ui/issues/issue-11740.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Attr { name: String, diff --git a/tests/ui/issues/issue-11820.rs b/tests/ui/issues/issue-11820.rs index dc6349b10ee58..372ce2c2a1616 100644 --- a/tests/ui/issues/issue-11820.rs +++ b/tests/ui/issues/issue-11820.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(noop_method_call)] diff --git a/tests/ui/issues/issue-11869.rs b/tests/ui/issues/issue-11869.rs index b300f4593a7c6..606a0c7b9d9f4 100644 --- a/tests/ui/issues/issue-11869.rs +++ b/tests/ui/issues/issue-11869.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A { a: String diff --git a/tests/ui/issues/issue-11958.rs b/tests/ui/issues/issue-11958.rs index a7af01e25b4e2..9185c5158af64 100644 --- a/tests/ui/issues/issue-11958.rs +++ b/tests/ui/issues/issue-11958.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We shouldn't need to rebind a moved upvar as mut if it's already // marked as mut diff --git a/tests/ui/issues/issue-12033.rs b/tests/ui/issues/issue-12033.rs index 9dc7573c9d362..0bf6490bafed8 100644 --- a/tests/ui/issues/issue-12033.rs +++ b/tests/ui/issues/issue-12033.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; fn main() { diff --git a/tests/ui/issues/issue-12133-1.rs b/tests/ui/issues/issue-12133-1.rs index 96ad5abd5483e..dc3f7f33da145 100644 --- a/tests/ui/issues/issue-12133-1.rs +++ b/tests/ui/issues/issue-12133-1.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_rlib as a; extern crate issue_12133_dylib as b; diff --git a/tests/ui/issues/issue-12133-2.rs b/tests/ui/issues/issue-12133-2.rs index 02fec65c2ed54..55742a1b3838d 100644 --- a/tests/ui/issues/issue-12133-2.rs +++ b/tests/ui/issues/issue-12133-2.rs @@ -1,9 +1,9 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs -// no-prefer-dynamic +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs +//@ no-prefer-dynamic -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_rlib as a; extern crate issue_12133_dylib as b; diff --git a/tests/ui/issues/issue-12133-3.rs b/tests/ui/issues/issue-12133-3.rs index 988b61e3bafa8..572337679af2b 100644 --- a/tests/ui/issues/issue-12133-3.rs +++ b/tests/ui/issues/issue-12133-3.rs @@ -1,12 +1,12 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs -// aux-build:issue-12133-dylib2.rs -// ignore-emscripten no dylib support -// ignore-musl -// needs-dynamic-linking +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs +//@ aux-build:issue-12133-dylib2.rs +//@ ignore-emscripten no dylib support +//@ ignore-musl +//@ needs-dynamic-linking -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_dylib2 as other; diff --git a/tests/ui/issues/issue-12285.rs b/tests/ui/issues/issue-12285.rs index 24ac5d2fbbf90..fe199147128b4 100644 --- a/tests/ui/issues/issue-12285.rs +++ b/tests/ui/issues/issue-12285.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; diff --git a/tests/ui/issues/issue-12612.rs b/tests/ui/issues/issue-12612.rs index d254f6941a339..0ffe7422fb310 100644 --- a/tests/ui/issues/issue-12612.rs +++ b/tests/ui/issues/issue-12612.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:issue-12612-1.rs -// aux-build:issue-12612-2.rs +//@ aux-build:issue-12612-1.rs +//@ aux-build:issue-12612-2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12612_1 as foo; extern crate issue_12612_2 as bar; diff --git a/tests/ui/issues/issue-12660.rs b/tests/ui/issues/issue-12660.rs index 44c492b43f0a8..997c10ae5cf8f 100644 --- a/tests/ui/issues/issue-12660.rs +++ b/tests/ui/issues/issue-12660.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-12660-aux.rs +//@ run-pass +//@ aux-build:issue-12660-aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue12660aux; diff --git a/tests/ui/issues/issue-12677.rs b/tests/ui/issues/issue-12677.rs index d0e4c17d4facf..dbc2dbc85276e 100644 --- a/tests/ui/issues/issue-12677.rs +++ b/tests/ui/issues/issue-12677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let s = "Hello"; diff --git a/tests/ui/issues/issue-12699.rs b/tests/ui/issues/issue-12699.rs index e26c2d7cde234..3222fbe00ea2f 100644 --- a/tests/ui/issues/issue-12699.rs +++ b/tests/ui/issues/issue-12699.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare can't block the thread -// ignore-sgx not supported +//@ run-pass +//@ ignore-wasm32-bare can't block the thread +//@ ignore-sgx not supported #![allow(deprecated)] use std::thread; diff --git a/tests/ui/issues/issue-12729.rs b/tests/ui/issues/issue-12729.rs index aa0b04af28e25..43e692b895ade 100644 --- a/tests/ui/issues/issue-12729.rs +++ b/tests/ui/issues/issue-12729.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo; diff --git a/tests/ui/issues/issue-12744.rs b/tests/ui/issues/issue-12744.rs index e2756ec970c39..eaf92d413d57e 100644 --- a/tests/ui/issues/issue-12744.rs +++ b/tests/ui/issues/issue-12744.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { fn test() -> Box { Box::new(1) } println!("{:?}", test()) diff --git a/tests/ui/issues/issue-12860.rs b/tests/ui/issues/issue-12860.rs index 01b642cdfccc4..255f667079375 100644 --- a/tests/ui/issues/issue-12860.rs +++ b/tests/ui/issues/issue-12860.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashSet; #[derive(Copy, Clone, PartialEq, Eq, Hash)] diff --git a/tests/ui/issues/issue-12909.rs b/tests/ui/issues/issue-12909.rs index a68d73a004f5d..3af8c07d7a76e 100644 --- a/tests/ui/issues/issue-12909.rs +++ b/tests/ui/issues/issue-12909.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-12920.rs b/tests/ui/issues/issue-12920.rs index a0cfea055be2b..7f453e499d48c 100644 --- a/tests/ui/issues/issue-12920.rs +++ b/tests/ui/issues/issue-12920.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes pub fn main() { panic!(); diff --git a/tests/ui/issues/issue-13027.rs b/tests/ui/issues/issue-13027.rs index ac0d1f11bd786..fbd1d75067b5c 100644 --- a/tests/ui/issues/issue-13027.rs +++ b/tests/ui/issues/issue-13027.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that match expression handles overlapped literal and range // properly in the presence of guard function. diff --git a/tests/ui/issues/issue-13105.rs b/tests/ui/issues/issue-13105.rs index 15a98c779833a..1ef9a6b7e33c3 100644 --- a/tests/ui/issues/issue-13105.rs +++ b/tests/ui/issues/issue-13105.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { #[allow(anonymous_parameters)] diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/issues/issue-13167.rs index 747f652d4af0c..3cf8367a67802 100644 --- a/tests/ui/issues/issue-13167.rs +++ b/tests/ui/issues/issue-13167.rs @@ -1,7 +1,7 @@ -// check-pass -// pretty-expanded FIXME #23616 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ pretty-expanded FIXME #23616 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::slice; diff --git a/tests/ui/issues/issue-13202.rs b/tests/ui/issues/issue-13202.rs index 16debb5b6c4a6..89205fc7fd1a2 100644 --- a/tests/ui/issues/issue-13202.rs +++ b/tests/ui/issues/issue-13202.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:bad input -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:bad input +//@ ignore-emscripten no processes fn main() { Some("foo").unwrap_or(panic!("bad input")).to_string(); diff --git a/tests/ui/issues/issue-13204.rs b/tests/ui/issues/issue-13204.rs index 3d6aba8455a94..01362f6fe61d6 100644 --- a/tests/ui/issues/issue-13204.rs +++ b/tests/ui/issues/issue-13204.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // Test that when instantiating trait default methods, typeck handles // lifetime parameters defined on the method bound correctly. diff --git a/tests/ui/issues/issue-13214.rs b/tests/ui/issues/issue-13214.rs index 0cf8d0675e6ab..7144094d8c25c 100644 --- a/tests/ui/issues/issue-13214.rs +++ b/tests/ui/issues/issue-13214.rs @@ -1,9 +1,9 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // defining static with struct that contains enum // with &'static str variant used to cause ICE -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum Foo { Bar, diff --git a/tests/ui/issues/issue-13259-windows-tcb-trash.rs b/tests/ui/issues/issue-13259-windows-tcb-trash.rs index 740e7780de67a..803cda091b9bf 100644 --- a/tests/ui/issues/issue-13259-windows-tcb-trash.rs +++ b/tests/ui/issues/issue-13259-windows-tcb-trash.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-13264.rs b/tests/ui/issues/issue-13264.rs index 691bb63a2feb8..bf4ec388c4fd0 100644 --- a/tests/ui/issues/issue-13264.rs +++ b/tests/ui/issues/issue-13264.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-13323.rs b/tests/ui/issues/issue-13323.rs index 71e14d4dab5a6..8f334404f9ab8 100644 --- a/tests/ui/issues/issue-13323.rs +++ b/tests/ui/issues/issue-13323.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct StrWrap { s: String diff --git a/tests/ui/issues/issue-13405.rs b/tests/ui/issues/issue-13405.rs index 732172b23ed19..b2b26ab39c57b 100644 --- a/tests/ui/issues/issue-13405.rs +++ b/tests/ui/issues/issue-13405.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { i: &'a bool, diff --git a/tests/ui/issues/issue-13434.rs b/tests/ui/issues/issue-13434.rs index 1b7d3e20173a7..caf7b6323933e 100644 --- a/tests/ui/issues/issue-13434.rs +++ b/tests/ui/issues/issue-13434.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct MyStruct; diff --git a/tests/ui/issues/issue-13482-2.rs b/tests/ui/issues/issue-13482-2.rs index b5b81dea73e8b..619e9d748efb3 100644 --- a/tests/ui/issues/issue-13482-2.rs +++ b/tests/ui/issues/issue-13482-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z verbose-internals +//@ compile-flags:-Z verbose-internals fn main() { let x = [1,2]; diff --git a/tests/ui/issues/issue-13507-2.rs b/tests/ui/issues/issue-13507-2.rs index 63f3589c6cc63..afd88a1488153 100644 --- a/tests/ui/issues/issue-13507-2.rs +++ b/tests/ui/issues/issue-13507-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:issue-13507.rs +//@ aux-build:issue-13507.rs extern crate issue_13507; use issue_13507::testtypes; diff --git a/tests/ui/issues/issue-13620.rs b/tests/ui/issues/issue-13620.rs index 3c3c19df75d63..0225114e6c38b 100644 --- a/tests/ui/issues/issue-13620.rs +++ b/tests/ui/issues/issue-13620.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-13620-1.rs -// aux-build:issue-13620-2.rs +//@ run-pass +//@ aux-build:issue-13620-1.rs +//@ aux-build:issue-13620-2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_13620_2 as crate2; diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/issues/issue-13665.rs index a3843c65034bc..3d5cffa98552c 100644 --- a/tests/ui/issues/issue-13665.rs +++ b/tests/ui/issues/issue-13665.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo<'r>() { let maybe_value_ref: Option<&'r u8> = None; diff --git a/tests/ui/issues/issue-13703.rs b/tests/ui/issues/issue-13703.rs index 424c99974b3eb..9748ab3719ef5 100644 --- a/tests/ui/issues/issue-13703.rs +++ b/tests/ui/issues/issue-13703.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize } pub fn foo<'a, 'b>(x: Foo<'a, 'b>, _o: Option<& & ()>) { let _y = x.foo; } diff --git a/tests/ui/issues/issue-13763.rs b/tests/ui/issues/issue-13763.rs index dd5f6dbc9dcbb..3044c671169c1 100644 --- a/tests/ui/issues/issue-13763.rs +++ b/tests/ui/issues/issue-13763.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod u8 { pub const BITS: usize = 8; diff --git a/tests/ui/issues/issue-13775.rs b/tests/ui/issues/issue-13775.rs index f5977effc4093..1d7a40b72d331 100644 --- a/tests/ui/issues/issue-13775.rs +++ b/tests/ui/issues/issue-13775.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { #[allow(anonymous_parameters)] diff --git a/tests/ui/issues/issue-13808.rs b/tests/ui/issues/issue-13808.rs index 9f9db067bf4b5..91b771c6a68c2 100644 --- a/tests/ui/issues/issue-13808.rs +++ b/tests/ui/issues/issue-13808.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { listener: Box, diff --git a/tests/ui/issues/issue-13867.rs b/tests/ui/issues/issue-13867.rs index 9510aae775341..ad7d6d663935e 100644 --- a/tests/ui/issues/issue-13867.rs +++ b/tests/ui/issues/issue-13867.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that codegen works correctly when there are multiple refutable // patterns in match expression. diff --git a/tests/ui/issues/issue-13872.rs b/tests/ui/issues/issue-13872.rs index aade6b8367c0b..5589d2d4f68c1 100644 --- a/tests/ui/issues/issue-13872.rs +++ b/tests/ui/issues/issue-13872.rs @@ -1,9 +1,9 @@ -// run-pass -// aux-build:issue-13872-1.rs -// aux-build:issue-13872-2.rs -// aux-build:issue-13872-3.rs +//@ run-pass +//@ aux-build:issue-13872-1.rs +//@ aux-build:issue-13872-2.rs +//@ aux-build:issue-13872-3.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_13872_3 as other; diff --git a/tests/ui/issues/issue-14082.rs b/tests/ui/issues/issue-14082.rs index 52b8c86802f06..116002415dfa6 100644 --- a/tests/ui/issues/issue-14082.rs +++ b/tests/ui/issues/issue-14082.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_imports, dead_code)] diff --git a/tests/ui/issues/issue-14229.rs b/tests/ui/issues/issue-14229.rs index 477a2c6505337..eb6324da3b6ed 100644 --- a/tests/ui/issues/issue-14229.rs +++ b/tests/ui/issues/issue-14229.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo: Sized { fn foo(self) {} } diff --git a/tests/ui/issues/issue-14254.rs b/tests/ui/issues/issue-14254.rs index 6f9308376415d..9175ac8f92e05 100644 --- a/tests/ui/issues/issue-14254.rs +++ b/tests/ui/issues/issue-14254.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo: Sized { fn bar(&self); diff --git a/tests/ui/issues/issue-14308.rs b/tests/ui/issues/issue-14308.rs index e067bcdf34adb..724be160d06ff 100644 --- a/tests/ui/issues/issue-14308.rs +++ b/tests/ui/issues/issue-14308.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A(isize); diff --git a/tests/ui/issues/issue-14330.rs b/tests/ui/issues/issue-14330.rs index 0844fc72045e1..f6461c834a5e4 100644 --- a/tests/ui/issues/issue-14330.rs +++ b/tests/ui/issues/issue-14330.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[macro_use] extern crate std as std2; diff --git a/tests/ui/issues/issue-14344.rs b/tests/ui/issues/issue-14344.rs index 33b1df827d353..17863c7809ea6 100644 --- a/tests/ui/issues/issue-14344.rs +++ b/tests/ui/issues/issue-14344.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-14344-1.rs -// aux-build:issue-14344-2.rs +//@ run-pass +//@ aux-build:issue-14344-1.rs +//@ aux-build:issue-14344-2.rs extern crate issue_14344_1; extern crate issue_14344_2; diff --git a/tests/ui/issues/issue-14382.rs b/tests/ui/issues/issue-14382.rs index b5c2362f05c41..74d938783aefe 100644 --- a/tests/ui/issues/issue-14382.rs +++ b/tests/ui/issues/issue-14382.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct Matrix4(#[allow(dead_code)] S); trait POrd {} diff --git a/tests/ui/issues/issue-14393.rs b/tests/ui/issues/issue-14393.rs index df635407af6ee..b7e64d6dca6ab 100644 --- a/tests/ui/issues/issue-14393.rs +++ b/tests/ui/issues/issue-14393.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { match ("", 1_usize) { diff --git a/tests/ui/issues/issue-14399.rs b/tests/ui/issues/issue-14399.rs index 0c6c4d8dc6bd3..cb768f63baaae 100644 --- a/tests/ui/issues/issue-14399.rs +++ b/tests/ui/issues/issue-14399.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-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 // which is coerced to Box). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] struct B1; diff --git a/tests/ui/issues/issue-14421.rs b/tests/ui/issues/issue-14421.rs index c59bd87065f25..4acbce66b6f1d 100644 --- a/tests/ui/issues/issue-14421.rs +++ b/tests/ui/issues/issue-14421.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// aux-build:issue-14421.rs +//@ aux-build:issue-14421.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_14421 as bug_lib; diff --git a/tests/ui/issues/issue-14422.rs b/tests/ui/issues/issue-14422.rs index b9e2065d01468..ed9e72390c55a 100644 --- a/tests/ui/issues/issue-14422.rs +++ b/tests/ui/issues/issue-14422.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// aux-build:issue-14422.rs +//@ aux-build:issue-14422.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_14422 as bug_lib; diff --git a/tests/ui/issues/issue-1451.rs b/tests/ui/issues/issue-1451.rs index ad8928b2043ac..735b766bd0cf2 100644 --- a/tests/ui/issues/issue-1451.rs +++ b/tests/ui/issues/issue-1451.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_snake_case)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-1460.rs b/tests/ui/issues/issue-1460.rs index e663f7fd4c9bf..c201f026bca36 100644 --- a/tests/ui/issues/issue-1460.rs +++ b/tests/ui/issues/issue-1460.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { {|i: u32| if 1 == i { }}; //~ WARN unused closure that must be used diff --git a/tests/ui/issues/issue-14821.rs b/tests/ui/issues/issue-14821.rs index 00b2e3607fcba..b11a885b3a03f 100644 --- a/tests/ui/issues/issue-14821.rs +++ b/tests/ui/issues/issue-14821.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] trait SomeTrait {} diff --git a/tests/ui/issues/issue-14865.rs b/tests/ui/issues/issue-14865.rs index 56e78e78f1856..e0f8bfe942856 100644 --- a/tests/ui/issues/issue-14865.rs +++ b/tests/ui/issues/issue-14865.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum X { diff --git a/tests/ui/issues/issue-14875.rs b/tests/ui/issues/issue-14875.rs index fca3309155d54..235d255716f33 100644 --- a/tests/ui/issues/issue-14875.rs +++ b/tests/ui/issues/issue-14875.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Check that values are not leaked when a dtor panics (#14875) diff --git a/tests/ui/issues/issue-14901.rs b/tests/ui/issues/issue-14901.rs index 5319abbdf0e5c..ddc12b9ef3c94 100644 --- a/tests/ui/issues/issue-14901.rs +++ b/tests/ui/issues/issue-14901.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Reader {} enum Wrapper<'a> { diff --git a/tests/ui/issues/issue-14919.rs b/tests/ui/issues/issue-14919.rs index 943615433549e..8a8324e57eabf 100644 --- a/tests/ui/issues/issue-14919.rs +++ b/tests/ui/issues/issue-14919.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Matcher { fn next_match(&mut self) -> Option<(usize, usize)>; diff --git a/tests/ui/issues/issue-14959.rs b/tests/ui/issues/issue-14959.rs index e31a9431558f6..401bd82ded352 100644 --- a/tests/ui/issues/issue-14959.rs +++ b/tests/ui/issues/issue-14959.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/issues/issue-15043.rs b/tests/ui/issues/issue-15043.rs index 53748be8a02f7..b00c878086dca 100644 --- a/tests/ui/issues/issue-15043.rs +++ b/tests/ui/issues/issue-15043.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(warnings)] diff --git a/tests/ui/issues/issue-15063.rs b/tests/ui/issues/issue-15063.rs index 4082675129dc5..969dbe5fad299 100644 --- a/tests/ui/issues/issue-15063.rs +++ b/tests/ui/issues/issue-15063.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] enum Two { A, B} diff --git a/tests/ui/issues/issue-15104.rs b/tests/ui/issues/issue-15104.rs index 47b207ea9cbf5..e68c94c370ed4 100644 --- a/tests/ui/issues/issue-15104.rs +++ b/tests/ui/issues/issue-15104.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(count_members(&[1, 2, 3, 4]), 4); diff --git a/tests/ui/issues/issue-15129-rpass.rs b/tests/ui/issues/issue-15129-rpass.rs index 522d0209c2951..e2ddb989072ee 100644 --- a/tests/ui/issues/issue-15129-rpass.rs +++ b/tests/ui/issues/issue-15129-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub enum T { T1(()), diff --git a/tests/ui/issues/issue-15155.rs b/tests/ui/issues/issue-15155.rs index 7b137b4af56a7..3bc612be27958 100644 --- a/tests/ui/issues/issue-15155.rs +++ b/tests/ui/issues/issue-15155.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait TraitWithSend: Send {} trait IndirectTraitWithSend: TraitWithSend {} diff --git a/tests/ui/issues/issue-15189.rs b/tests/ui/issues/issue-15189.rs index a9c884bdcfd8d..4dbe2179dd9c1 100644 --- a/tests/ui/issues/issue-15189.rs +++ b/tests/ui/issues/issue-15189.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! third { ($e:expr) => ({let x = 2; $e[x]}) } diff --git a/tests/ui/issues/issue-15444.rs b/tests/ui/issues/issue-15444.rs index e94afee963419..a9a33bd5de458 100644 --- a/tests/ui/issues/issue-15444.rs +++ b/tests/ui/issues/issue-15444.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait MyTrait { fn foo(&self); diff --git a/tests/ui/issues/issue-15523-big.rs b/tests/ui/issues/issue-15523-big.rs index 05414f1db72be..7214a4fb1d517 100644 --- a/tests/ui/issues/issue-15523-big.rs +++ b/tests/ui/issues/issue-15523-big.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 15523: derive(PartialOrd) should use the provided // discriminant values for the derived ordering. // diff --git a/tests/ui/issues/issue-15523.rs b/tests/ui/issues/issue-15523.rs index 220a34b9b0f3f..9fc2e51c6ab63 100644 --- a/tests/ui/issues/issue-15523.rs +++ b/tests/ui/issues/issue-15523.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 15523: derive(PartialOrd) should use the provided // discriminant values for the derived ordering. // diff --git a/tests/ui/issues/issue-15562.rs b/tests/ui/issues/issue-15562.rs index dc0ecd365226c..faa46cd5ece59 100644 --- a/tests/ui/issues/issue-15562.rs +++ b/tests/ui/issues/issue-15562.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-15562.rs +//@ run-pass +//@ aux-build:issue-15562.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_15562 as i; diff --git a/tests/ui/issues/issue-15571.rs b/tests/ui/issues/issue-15571.rs index 5f228b2863e46..cf17113a28260 100644 --- a/tests/ui/issues/issue-15571.rs +++ b/tests/ui/issues/issue-15571.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn match_on_local() { let mut foo: Option> = Some(Box::new(5)); diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/issues/issue-15673.rs index a8733d7f157fd..bb61c24627643 100644 --- a/tests/ui/issues/issue-15673.rs +++ b/tests/ui/issues/issue-15673.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(iter_arith)] diff --git a/tests/ui/issues/issue-15734.rs b/tests/ui/issues/issue-15734.rs index 77517f6181394..b8d0b088a8940 100644 --- a/tests/ui/issues/issue-15734.rs +++ b/tests/ui/issues/issue-15734.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::ops::Index; diff --git a/tests/ui/issues/issue-15735.rs b/tests/ui/issues/issue-15735.rs index f9ba34405f698..f5b3803f1553f 100644 --- a/tests/ui/issues/issue-15735.rs +++ b/tests/ui/issues/issue-15735.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct A<'a> { a: &'a i32, diff --git a/tests/ui/issues/issue-15763.rs b/tests/ui/issues/issue-15763.rs index ae0863615e2c7..0ebadd80541f0 100644 --- a/tests/ui/issues/issue-15763.rs +++ b/tests/ui/issues/issue-15763.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #[derive(PartialEq, Debug)] diff --git a/tests/ui/issues/issue-15774.rs b/tests/ui/issues/issue-15774.rs index ed2235758b9d9..383003b2dd78b 100644 --- a/tests/ui/issues/issue-15774.rs +++ b/tests/ui/issues/issue-15774.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(warnings)] #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-15793.rs b/tests/ui/issues/issue-15793.rs index 769012b1ba7a2..af92e9dfa4c1c 100644 --- a/tests/ui/issues/issue-15793.rs +++ b/tests/ui/issues/issue-15793.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum NestedEnum { diff --git a/tests/ui/issues/issue-15858.rs b/tests/ui/issues/issue-15858.rs index e3e3c293d7a74..2d4aac01fbe8e 100644 --- a/tests/ui/issues/issue-15858.rs +++ b/tests/ui/issues/issue-15858.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut DROP_RAN: bool = false; trait Bar { diff --git a/tests/ui/issues/issue-16151.rs b/tests/ui/issues/issue-16151.rs index 48a14b2af7c97..20a3b5a04da23 100644 --- a/tests/ui/issues/issue-16151.rs +++ b/tests/ui/issues/issue-16151.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/issues/issue-16256.rs b/tests/ui/issues/issue-16256.rs index eec23437bcb06..f5873331c2d28 100644 --- a/tests/ui/issues/issue-16256.rs +++ b/tests/ui/issues/issue-16256.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let mut buf = Vec::new(); diff --git a/tests/ui/issues/issue-16278.rs b/tests/ui/issues/issue-16278.rs index 2f47b694ae912..0d3b4a90ce727 100644 --- a/tests/ui/issues/issue-16278.rs +++ b/tests/ui/issues/issue-16278.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-cr // this file has some special \r\n endings (use xxd to see them) diff --git a/tests/ui/issues/issue-16441.rs b/tests/ui/issues/issue-16441.rs index bafa204e06b25..21608cf04c31d 100644 --- a/tests/ui/issues/issue-16441.rs +++ b/tests/ui/issues/issue-16441.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Empty; diff --git a/tests/ui/issues/issue-16452.rs b/tests/ui/issues/issue-16452.rs index faf9edd3b2640..07dbf4729e6f7 100644 --- a/tests/ui/issues/issue-16452.rs +++ b/tests/ui/issues/issue-16452.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { if true { return } diff --git a/tests/ui/issues/issue-16492.rs b/tests/ui/issues/issue-16492.rs index 7fa808237bf09..cfdba5fda351c 100644 --- a/tests/ui/issues/issue-16492.rs +++ b/tests/ui/issues/issue-16492.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] use std::rc::Rc; diff --git a/tests/ui/issues/issue-16530.rs b/tests/ui/issues/issue-16530.rs index 25817a2a63d60..a24c6f09d39ce 100644 --- a/tests/ui/issues/issue-16530.rs +++ b/tests/ui/issues/issue-16530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] use std::hash::{SipHasher, Hasher, Hash}; diff --git a/tests/ui/issues/issue-16560.rs b/tests/ui/issues/issue-16560.rs index d5fffc7ef9bc1..37b536e644d86 100644 --- a/tests/ui/issues/issue-16560.rs +++ b/tests/ui/issues/issue-16560.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::mem; diff --git a/tests/ui/issues/issue-16596.rs b/tests/ui/issues/issue-16596.rs index e7a0963025117..51441e8e782ac 100644 --- a/tests/ui/issues/issue-16596.rs +++ b/tests/ui/issues/issue-16596.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait MatrixRow { fn dummy(&self) { }} diff --git a/tests/ui/issues/issue-1660.rs b/tests/ui/issues/issue-1660.rs index aa60a8d8a9693..a114a9083134e 100644 --- a/tests/ui/issues/issue-1660.rs +++ b/tests/ui/issues/issue-1660.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { static _x: isize = 1<<2; diff --git a/tests/ui/issues/issue-16643.rs b/tests/ui/issues/issue-16643.rs index c74a554af2e42..e00978ce66aae 100644 --- a/tests/ui/issues/issue-16643.rs +++ b/tests/ui/issues/issue-16643.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-16643.rs +//@ run-pass +//@ aux-build:issue-16643.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_16643 as i; diff --git a/tests/ui/issues/issue-16648.rs b/tests/ui/issues/issue-16648.rs index 539f015fa281f..7f3d3217bee09 100644 --- a/tests/ui/issues/issue-16648.rs +++ b/tests/ui/issues/issue-16648.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x: (isize, &[isize]) = (2, &[1, 2]); assert_eq!(match x { diff --git a/tests/ui/issues/issue-16668.rs b/tests/ui/issues/issue-16668.rs index 92efb42fe3091..2b2370b0e2b4c 100644 --- a/tests/ui/issues/issue-16668.rs +++ b/tests/ui/issues/issue-16668.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Parser<'a, I, O> { parse: Box Result + 'a> diff --git a/tests/ui/issues/issue-16671.rs b/tests/ui/issues/issue-16671.rs index eff8e275bb58b..f7f4f4348afab 100644 --- a/tests/ui/issues/issue-16671.rs +++ b/tests/ui/issues/issue-16671.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(warnings)] diff --git a/tests/ui/issues/issue-16725.rs b/tests/ui/issues/issue-16725.rs index 2cf8a60697dd6..7741f828c4740 100644 --- a/tests/ui/issues/issue-16725.rs +++ b/tests/ui/issues/issue-16725.rs @@ -1,4 +1,4 @@ -// aux-build:issue-16725.rs +//@ aux-build:issue-16725.rs extern crate issue_16725 as foo; diff --git a/tests/ui/issues/issue-16739.rs b/tests/ui/issues/issue-16739.rs index b21ea4bcd7869..39cc1b78fcee6 100644 --- a/tests/ui/issues/issue-16739.rs +++ b/tests/ui/issues/issue-16739.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] // Test that unboxing shim for calling rust-call ABI methods through a diff --git a/tests/ui/issues/issue-16745.rs b/tests/ui/issues/issue-16745.rs index e9137df0f1e84..99c85bcffcf81 100644 --- a/tests/ui/issues/issue-16745.rs +++ b/tests/ui/issues/issue-16745.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { const X: u8 = 0; let out: u8 = match 0u8 { diff --git a/tests/ui/issues/issue-16774.rs b/tests/ui/issues/issue-16774.rs index 2b308ef76e43d..bef7f0f975cf6 100644 --- a/tests/ui/issues/issue-16774.rs +++ b/tests/ui/issues/issue-16774.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/issues/issue-16783.rs b/tests/ui/issues/issue-16783.rs index 4af4031d278b8..a69ecb353bb3c 100644 --- a/tests/ui/issues/issue-16783.rs +++ b/tests/ui/issues/issue-16783.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x = [1, 2, 3]; diff --git a/tests/ui/issues/issue-16819.rs b/tests/ui/issues/issue-16819.rs index cc0200904e510..320695118d5f8 100644 --- a/tests/ui/issues/issue-16819.rs +++ b/tests/ui/issues/issue-16819.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // `#[cfg]` on struct field permits empty unusable struct diff --git a/tests/ui/issues/issue-16922-rpass.rs b/tests/ui/issues/issue-16922-rpass.rs index c3c6ff304888d..6cce4179b7cd7 100644 --- a/tests/ui/issues/issue-16922-rpass.rs +++ b/tests/ui/issues/issue-16922-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::any::Any; diff --git a/tests/ui/issues/issue-1696.rs b/tests/ui/issues/issue-1696.rs index b5d77df3a1864..08002ad3c58b1 100644 --- a/tests/ui/issues/issue-1696.rs +++ b/tests/ui/issues/issue-1696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; pub fn main() { diff --git a/tests/ui/issues/issue-16994.rs b/tests/ui/issues/issue-16994.rs index 8d3074bcee9cc..fa3988e099945 100644 --- a/tests/ui/issues/issue-16994.rs +++ b/tests/ui/issues/issue-16994.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn cb<'a,T>(_x: Box, bool))) -> T>) -> T { panic!() diff --git a/tests/ui/issues/issue-17068.rs b/tests/ui/issues/issue-17068.rs index fe2c1a34bb4ae..af565da3366b9 100644 --- a/tests/ui/issues/issue-17068.rs +++ b/tests/ui/issues/issue-17068.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that regionck creates the right region links in the pattern // binding of a for loop diff --git a/tests/ui/issues/issue-17121.rs b/tests/ui/issues/issue-17121.rs index 1e7b9f015b969..0a788b317cdb9 100644 --- a/tests/ui/issues/issue-17121.rs +++ b/tests/ui/issues/issue-17121.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fs::File; use std::io::{self, BufReader, Read}; diff --git a/tests/ui/issues/issue-17216.rs b/tests/ui/issues/issue-17216.rs index 05baa1bffdd80..31b16ef3a2f7b 100644 --- a/tests/ui/issues/issue-17216.rs +++ b/tests/ui/issues/issue-17216.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Leak<'a> { dropped: &'a mut bool diff --git a/tests/ui/issues/issue-17302.rs b/tests/ui/issues/issue-17302.rs index cf7a2f1b0631a..c499cc5281f3a 100644 --- a/tests/ui/issues/issue-17302.rs +++ b/tests/ui/issues/issue-17302.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut DROPPED: [bool; 2] = [false, false]; diff --git a/tests/ui/issues/issue-17322.rs b/tests/ui/issues/issue-17322.rs index b4fc40c3f2b7c..71ff38a01453d 100644 --- a/tests/ui/issues/issue-17322.rs +++ b/tests/ui/issues/issue-17322.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::io::{self, Write}; diff --git a/tests/ui/issues/issue-17336.rs b/tests/ui/issues/issue-17336.rs index 97782ff9f0ef5..8ce2caaeaa57b 100644 --- a/tests/ui/issues/issue-17336.rs +++ b/tests/ui/issues/issue-17336.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(unused_must_use)] #![allow(ambiguous_wide_pointer_comparisons)] diff --git a/tests/ui/issues/issue-17351.rs b/tests/ui/issues/issue-17351.rs index 12bb8a73b7bd4..15bff07f6e541 100644 --- a/tests/ui/issues/issue-17351.rs +++ b/tests/ui/issues/issue-17351.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait Str { fn foo(&self) {} } //~ WARN method `foo` is never used impl Str for str {} diff --git a/tests/ui/issues/issue-17361.rs b/tests/ui/issues/issue-17361.rs index e97fc3afd1ccc..8e85f0791d676 100644 --- a/tests/ui/issues/issue-17361.rs +++ b/tests/ui/issues/issue-17361.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that astconv doesn't forget about mutability of &mut str -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { fn foo(_: &mut T) {} diff --git a/tests/ui/issues/issue-17450.rs b/tests/ui/issues/issue-17450.rs index 1ac0af1754ba4..d8b20169ee0c4 100644 --- a/tests/ui/issues/issue-17450.rs +++ b/tests/ui/issues/issue-17450.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code, warnings)] static mut x: isize = 3; diff --git a/tests/ui/issues/issue-17503.rs b/tests/ui/issues/issue-17503.rs index 9a92c06e1593b..6c966b5319cd9 100644 --- a/tests/ui/issues/issue-17503.rs +++ b/tests/ui/issues/issue-17503.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let s: &[isize] = &[0, 1, 2, 3, 4]; let ss: &&[isize] = &s; diff --git a/tests/ui/issues/issue-17546.rs b/tests/ui/issues/issue-17546.rs index 6c62010f1762b..ade6335055ac8 100644 --- a/tests/ui/issues/issue-17546.rs +++ b/tests/ui/issues/issue-17546.rs @@ -1,4 +1,4 @@ -// ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions +//@ ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions use foo::MyEnum::Result; use foo::NoResult; // Through a re-export diff --git a/tests/ui/issues/issue-17662.rs b/tests/ui/issues/issue-17662.rs index a2683808b523d..e75613e04d333 100644 --- a/tests/ui/issues/issue-17662.rs +++ b/tests/ui/issues/issue-17662.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-17662.rs +//@ run-pass +//@ aux-build:issue-17662.rs extern crate issue_17662 as i; diff --git a/tests/ui/issues/issue-17732.rs b/tests/ui/issues/issue-17732.rs index 8f63d5baef875..4bf7ee286e156 100644 --- a/tests/ui/issues/issue-17732.rs +++ b/tests/ui/issues/issue-17732.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Person { type string; diff --git a/tests/ui/issues/issue-17734.rs b/tests/ui/issues/issue-17734.rs index ba8d6c21ca859..984adeece6dee 100644 --- a/tests/ui/issues/issue-17734.rs +++ b/tests/ui/issues/issue-17734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that generating drop glue for Box doesn't ICE diff --git a/tests/ui/issues/issue-17746.rs b/tests/ui/issues/issue-17746.rs index bab64a4b5ae08..231fcb41a1130 100644 --- a/tests/ui/issues/issue-17746.rs +++ b/tests/ui/issues/issue-17746.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #17746 diff --git a/tests/ui/issues/issue-17771.rs b/tests/ui/issues/issue-17771.rs index 2f6464668c2ce..d7c0ea3eb2a6f 100644 --- a/tests/ui/issues/issue-17771.rs +++ b/tests/ui/issues/issue-17771.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Aaa { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-17816.rs b/tests/ui/issues/issue-17816.rs index 7ca47d50335f0..da28a14685f6c 100644 --- a/tests/ui/issues/issue-17816.rs +++ b/tests/ui/issues/issue-17816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-17877.rs b/tests/ui/issues/issue-17877.rs index 126e01de5ee3f..7df0fffa41c8a 100644 --- a/tests/ui/issues/issue-17877.rs +++ b/tests/ui/issues/issue-17877.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(match [0u8; 1024] { diff --git a/tests/ui/issues/issue-17897.rs b/tests/ui/issues/issue-17897.rs index 6873c7ccb7f1c..dbb560a199bf7 100644 --- a/tests/ui/issues/issue-17897.rs +++ b/tests/ui/issues/issue-17897.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn action(mut cb: Box usize>) -> usize { cb(1) } diff --git a/tests/ui/issues/issue-17904.rs b/tests/ui/issues/issue-17904.rs index c3f504ac1b9d7..5eaa306e80ef0 100644 --- a/tests/ui/issues/issue-17904.rs +++ b/tests/ui/issues/issue-17904.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that we can parse where clauses on various forms of tuple // structs. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Bar(T) where T: Copy; struct Bleh(T, U) where T: Copy, U: Sized; diff --git a/tests/ui/issues/issue-17905.rs b/tests/ui/issues/issue-17905.rs index 83cea8b439580..6238379b5a04b 100644 --- a/tests/ui/issues/issue-17905.rs +++ b/tests/ui/issues/issue-17905.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] #[allow(dead_code)] diff --git a/tests/ui/issues/issue-18088.rs b/tests/ui/issues/issue-18088.rs index c557b5a6512b9..ba198884c639f 100644 --- a/tests/ui/issues/issue-18088.rs +++ b/tests/ui/issues/issue-18088.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Indexable: std::ops::Index { fn index2(&self, i: usize) -> &T { diff --git a/tests/ui/issues/issue-18110.rs b/tests/ui/issues/issue-18110.rs index 41c29e77da5c5..8ab9be1953124 100644 --- a/tests/ui/issues/issue-18110.rs +++ b/tests/ui/issues/issue-18110.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { ({return},); diff --git a/tests/ui/issues/issue-18173.rs b/tests/ui/issues/issue-18173.rs index 010efee9f8ab6..a9f20e827fbe3 100644 --- a/tests/ui/issues/issue-18173.rs +++ b/tests/ui/issues/issue-18173.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type T; } diff --git a/tests/ui/issues/issue-18188.rs b/tests/ui/issues/issue-18188.rs index ce166724affe7..b99e6aea6bd75 100644 --- a/tests/ui/issues/issue-18188.rs +++ b/tests/ui/issues/issue-18188.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub trait Promisable: Send + Sync {} impl Promisable for T {} diff --git a/tests/ui/issues/issue-18232.rs b/tests/ui/issues/issue-18232.rs index 7e6f6ef0f3904..5ace22311928f 100644 --- a/tests/ui/issues/issue-18232.rs +++ b/tests/ui/issues/issue-18232.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Cursor<'a>(::std::marker::PhantomData<&'a ()>); diff --git a/tests/ui/issues/issue-18352.rs b/tests/ui/issues/issue-18352.rs index 5d93ed0646caa..8b6aa82ea8c0c 100644 --- a/tests/ui/issues/issue-18352.rs +++ b/tests/ui/issues/issue-18352.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const X: &'static str = "12345"; diff --git a/tests/ui/issues/issue-18353.rs b/tests/ui/issues/issue-18353.rs index 3d15c9980c352..a9c0b3bcdbd5e 100644 --- a/tests/ui/issues/issue-18353.rs +++ b/tests/ui/issues/issue-18353.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that wrapping an unsized struct in an enum which gets optimised does // not ICE. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Str { f: [u8] diff --git a/tests/ui/issues/issue-18389.rs b/tests/ui/issues/issue-18389.rs index 26b607f4081f7..0ab3f14545727 100644 --- a/tests/ui/issues/issue-18389.rs +++ b/tests/ui/issues/issue-18389.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::any::Any; use std::any::TypeId; diff --git a/tests/ui/issues/issue-18446-2.rs b/tests/ui/issues/issue-18446-2.rs index 85422d4d2611a..d403487c001fb 100644 --- a/tests/ui/issues/issue-18446-2.rs +++ b/tests/ui/issues/issue-18446-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that methods in trait impls should override default methods. diff --git a/tests/ui/issues/issue-18464.rs b/tests/ui/issues/issue-18464.rs index 14d2d0a6c8dff..9950647198395 100644 --- a/tests/ui/issues/issue-18464.rs +++ b/tests/ui/issues/issue-18464.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] const LOW_RANGE: char = '0'; diff --git a/tests/ui/issues/issue-18501.rs b/tests/ui/issues/issue-18501.rs index 0ca23074c5520..559428d4d08dc 100644 --- a/tests/ui/issues/issue-18501.rs +++ b/tests/ui/issues/issue-18501.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that we don't ICE when inlining a function from another // crate that uses a trait method as a value due to incorrectly // translating the def ID of the trait during AST decoding. -// aux-build:issue-18501.rs -// pretty-expanded FIXME #23616 +//@ aux-build:issue-18501.rs +//@ pretty-expanded FIXME #23616 extern crate issue_18501 as issue; diff --git a/tests/ui/issues/issue-18514.rs b/tests/ui/issues/issue-18514.rs index 48e7f07418f4f..89f58d3988d9e 100644 --- a/tests/ui/issues/issue-18514.rs +++ b/tests/ui/issues/issue-18514.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test that we don't ICE when codegenning a generic impl method from // an extern crate that contains a match expression on a local // variable place where one of the match case bodies contains an // expression that autoderefs through an overloaded generic deref // impl. -// aux-build:issue-18514.rs +//@ aux-build:issue-18514.rs extern crate issue_18514 as ice; use ice::{Tr, St}; diff --git a/tests/ui/issues/issue-18539.rs b/tests/ui/issues/issue-18539.rs index 745df26e3209c..eaf8294aa478a 100644 --- a/tests/ui/issues/issue-18539.rs +++ b/tests/ui/issues/issue-18539.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that coercing bare fn's that return a zero sized type to // a closure doesn't cause an LLVM ERROR -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/issues/issue-18685.rs index bfe24b663f60f..cea60e6f4f254 100644 --- a/tests/ui/issues/issue-18685.rs +++ b/tests/ui/issues/issue-18685.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the self param space is not used in a conflicting // manner by unboxed closures within a default method on a trait -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Tr { fn foo(&self); diff --git a/tests/ui/issues/issue-18711.rs b/tests/ui/issues/issue-18711.rs index 4358418775250..c62f83004ae51 100644 --- a/tests/ui/issues/issue-18711.rs +++ b/tests/ui/issues/issue-18711.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that we don't panic on a RefCell borrow conflict in certain // code paths involving unboxed closures. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 -// aux-build:issue-18711.rs +//@ aux-build:issue-18711.rs extern crate issue_18711 as issue; fn main() { diff --git a/tests/ui/issues/issue-18738.rs b/tests/ui/issues/issue-18738.rs index bcc1ec03f2625..d3e0965e5454e 100644 --- a/tests/ui/issues/issue-18738.rs +++ b/tests/ui/issues/issue-18738.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { diff --git a/tests/ui/issues/issue-18767.rs b/tests/ui/issues/issue-18767.rs index 2a5721b7295e1..87762406da607 100644 --- a/tests/ui/issues/issue-18767.rs +++ b/tests/ui/issues/issue-18767.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that regionck uses the right memcat for patterns in for loops // and doesn't ICE. diff --git a/tests/ui/issues/issue-18804/main.rs b/tests/ui/issues/issue-18804/main.rs index 47c3f13d23cad..d83fe697470b3 100644 --- a/tests/ui/issues/issue-18804/main.rs +++ b/tests/ui/issues/issue-18804/main.rs @@ -1,15 +1,15 @@ -// run-pass +//@ run-pass // Test for issue #18804, #[linkage] does not propagate through generic // functions. Failure results in a linker error. -// ignore-emscripten no weak symbol support -// ignore-windows no extern_weak linkage -// ignore-macos no extern_weak linkage +//@ ignore-emscripten no weak symbol support +//@ ignore-windows no extern_weak linkage +//@ ignore-macos no extern_weak linkage -// aux-build:lib.rs +//@ aux-build:lib.rs // rust-lang/rust#56772: nikic says we need this to be proper test. -// compile-flags: -C no-prepopulate-passes -C passes=name-anon-globals +//@ compile-flags: -C no-prepopulate-passes -C passes=name-anon-globals extern crate lib; diff --git a/tests/ui/issues/issue-18809.rs b/tests/ui/issues/issue-18809.rs index cc5b4a64c6d26..d3ef6abc8bdc8 100644 --- a/tests/ui/issues/issue-18809.rs +++ b/tests/ui/issues/issue-18809.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tup { type T0; type T1; diff --git a/tests/ui/issues/issue-18845.rs b/tests/ui/issues/issue-18845.rs index 83fab4b5e8feb..c9dc175b10a8a 100644 --- a/tests/ui/issues/issue-18845.rs +++ b/tests/ui/issues/issue-18845.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This used to generate invalid IR in that even if we took the // `false` branch we'd still try to free the Box from the other // arm. This was due to treating `*Box::new(9)` as an rvalue datum diff --git a/tests/ui/issues/issue-18859.rs b/tests/ui/issues/issue-18859.rs index c4575bce925f6..854b7ed62f05b 100644 --- a/tests/ui/issues/issue-18859.rs +++ b/tests/ui/issues/issue-18859.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub mod bar { diff --git a/tests/ui/issues/issue-18906.rs b/tests/ui/issues/issue-18906.rs index 976a9f49b9d0e..95ad8073955e9 100644 --- a/tests/ui/issues/issue-18906.rs +++ b/tests/ui/issues/issue-18906.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Borrow { fn borrow(&self) -> &Borrowed; diff --git a/tests/ui/issues/issue-18913.rs b/tests/ui/issues/issue-18913.rs index 27fae6d7757db..7f9137d95c24f 100644 --- a/tests/ui/issues/issue-18913.rs +++ b/tests/ui/issues/issue-18913.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-18913-1.rs -// aux-build:issue-18913-2.rs +//@ run-pass +//@ aux-build:issue-18913-1.rs +//@ aux-build:issue-18913-2.rs extern crate foo; diff --git a/tests/ui/issues/issue-18952.rs b/tests/ui/issues/issue-18952.rs index 56378b59e3642..9fdafb1ff4a90 100644 --- a/tests/ui/issues/issue-18952.rs +++ b/tests/ui/issues/issue-18952.rs @@ -1,5 +1,5 @@ // This issue tests fn_traits overloading on arity. -// run-pass +//@ run-pass #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/issues/issue-18988.rs b/tests/ui/issues/issue-18988.rs index 708965d81d8d6..9dffe5640809a 100644 --- a/tests/ui/issues/issue-18988.rs +++ b/tests/ui/issues/issue-18988.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] pub trait Foo : Send { } diff --git a/tests/ui/issues/issue-19001.rs b/tests/ui/issues/issue-19001.rs index 76c380c2fc97e..51aebf88c95fb 100644 --- a/tests/ui/issues/issue-19001.rs +++ b/tests/ui/issues/issue-19001.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check that we handle recursive arrays correctly in `type_of` diff --git a/tests/ui/issues/issue-19037.rs b/tests/ui/issues/issue-19037.rs index 74623da145470..961ef69a3b96d 100644 --- a/tests/ui/issues/issue-19037.rs +++ b/tests/ui/issues/issue-19037.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Str([u8]); diff --git a/tests/ui/issues/issue-19097.rs b/tests/ui/issues/issue-19097.rs index 2f4b0d575bb3c..a329ba6f073e2 100644 --- a/tests/ui/issues/issue-19097.rs +++ b/tests/ui/issues/issue-19097.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // regression test for #19097 diff --git a/tests/ui/issues/issue-19098.rs b/tests/ui/issues/issue-19098.rs index 3d05f11b69712..97e8ca17de1ec 100644 --- a/tests/ui/issues/issue-19098.rs +++ b/tests/ui/issues/issue-19098.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Handler { fn handle(&self, _: &mut String); } diff --git a/tests/ui/issues/issue-19100.fixed b/tests/ui/issues/issue-19100.fixed index 029855de2dea0..1162490048cd2 100644 --- a/tests/ui/issues/issue-19100.fixed +++ b/tests/ui/issues/issue-19100.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-19100.rs b/tests/ui/issues/issue-19100.rs index bd9e4ea5b601b..fefed0daa72bb 100644 --- a/tests/ui/issues/issue-19100.rs +++ b/tests/ui/issues/issue-19100.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-19127.rs b/tests/ui/issues/issue-19127.rs index c847ac9e43597..dd0526592e48f 100644 --- a/tests/ui/issues/issue-19127.rs +++ b/tests/ui/issues/issue-19127.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo T>(f: F) {} fn id<'a>(input: &'a u8) -> &'a u8 { input } diff --git a/tests/ui/issues/issue-19129-1.rs b/tests/ui/issues/issue-19129-1.rs index 03a9691018ae1..65340b413e9c5 100644 --- a/tests/ui/issues/issue-19129-1.rs +++ b/tests/ui/issues/issue-19129-1.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-19129-2.rs b/tests/ui/issues/issue-19129-2.rs index 991d79d415943..6562c54b0b7c2 100644 --- a/tests/ui/issues/issue-19129-2.rs +++ b/tests/ui/issues/issue-19129-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-19135.rs b/tests/ui/issues/issue-19135.rs index 84540a3ff5fea..42288511ab588 100644 --- a/tests/ui/issues/issue-19135.rs +++ b/tests/ui/issues/issue-19135.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; #[derive(Debug)] diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs index 26553f56b8407..763d07db2cde4 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs @@ -1,6 +1,6 @@ //! Test that absolute path names are correct when a crate is not linked into the root namespace -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs mod foo { pub extern crate issue_1920; diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs index 8d4a5f66310b3..b5a90b2c8e8ba 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs @@ -1,6 +1,6 @@ //! Test that when a crate is linked under another name that name is used in global paths -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs extern crate issue_1920 as bar; diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs index 520db50f94ae7..372c8b1511c40 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs @@ -1,6 +1,6 @@ //! Test that when a crate is linked multiple times that the shortest absolute path name is used -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs mod foo { pub extern crate issue_1920; diff --git a/tests/ui/issues/issue-19293.rs b/tests/ui/issues/issue-19293.rs index b6e9e3d065a48..7a971a59c3d84 100644 --- a/tests/ui/issues/issue-19293.rs +++ b/tests/ui/issues/issue-19293.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-19293.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:issue-19293.rs +//@ pretty-expanded FIXME #23616 extern crate issue_19293; use issue_19293::{Foo, MyEnum}; diff --git a/tests/ui/issues/issue-19340-1.rs b/tests/ui/issues/issue-19340-1.rs index e3cc2daae9b9e..c1ba0d23b6ff6 100644 --- a/tests/ui/issues/issue-19340-1.rs +++ b/tests/ui/issues/issue-19340-1.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-19340-1.rs +//@ aux-build:issue-19340-1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_19340_1 as lib; diff --git a/tests/ui/issues/issue-19340-2.rs b/tests/ui/issues/issue-19340-2.rs index a222e9e462104..dd1bda78a9795 100644 --- a/tests/ui/issues/issue-19340-2.rs +++ b/tests/ui/issues/issue-19340-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Homura { Madoka { diff --git a/tests/ui/issues/issue-19367.rs b/tests/ui/issues/issue-19367.rs index 0699533e72b7b..ce8451dd2de13 100644 --- a/tests/ui/issues/issue-19367.rs +++ b/tests/ui/issues/issue-19367.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { o: Option } diff --git a/tests/ui/issues/issue-19398.rs b/tests/ui/issues/issue-19398.rs index a9d0acaa26f4d..751fffb174487 100644 --- a/tests/ui/issues/issue-19398.rs +++ b/tests/ui/issues/issue-19398.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait T { unsafe extern "Rust" fn foo(&self); diff --git a/tests/ui/issues/issue-19404.rs b/tests/ui/issues/issue-19404.rs index f1cf1feb00542..ff9bb1f2e037e 100644 --- a/tests/ui/issues/issue-19404.rs +++ b/tests/ui/issues/issue-19404.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] use std::any::TypeId; diff --git a/tests/ui/issues/issue-19479.rs b/tests/ui/issues/issue-19479.rs index 70bfe7213f2ca..2818be310be05 100644 --- a/tests/ui/issues/issue-19479.rs +++ b/tests/ui/issues/issue-19479.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Base { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-19499.rs b/tests/ui/issues/issue-19499.rs index d09056ce3de4f..0bd70865211a2 100644 --- a/tests/ui/issues/issue-19499.rs +++ b/tests/ui/issues/issue-19499.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(unused_variables)] // Regression test for issue #19499. Due to incorrect caching of trait @@ -7,7 +7,7 @@ // reasonable examples) let to ambiguity errors about not being able // to infer sufficient type information. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let n = 0; diff --git a/tests/ui/issues/issue-19601.rs b/tests/ui/issues/issue-19601.rs index 176e6ba410670..e97819e4122da 100644 --- a/tests/ui/issues/issue-19601.rs +++ b/tests/ui/issues/issue-19601.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A {} struct B where B: A> { t: T } diff --git a/tests/ui/issues/issue-1962.fixed b/tests/ui/issues/issue-1962.fixed index 897fd172b29f3..f0002be4bea00 100644 --- a/tests/ui/issues/issue-1962.fixed +++ b/tests/ui/issues/issue-1962.fixed @@ -1,5 +1,5 @@ -// compile-flags: -D while-true -// run-rustfix +//@ compile-flags: -D while-true +//@ run-rustfix fn main() { let mut i = 0; diff --git a/tests/ui/issues/issue-1962.rs b/tests/ui/issues/issue-1962.rs index 71e874100874f..9c8fb500ba35c 100644 --- a/tests/ui/issues/issue-1962.rs +++ b/tests/ui/issues/issue-1962.rs @@ -1,5 +1,5 @@ -// compile-flags: -D while-true -// run-rustfix +//@ compile-flags: -D while-true +//@ run-rustfix fn main() { let mut i = 0; diff --git a/tests/ui/issues/issue-19631.rs b/tests/ui/issues/issue-19631.rs index 694e6dcd15a9e..a20df9c9d4cd1 100644 --- a/tests/ui/issues/issue-19631.rs +++ b/tests/ui/issues/issue-19631.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PoolManager { type C; diff --git a/tests/ui/issues/issue-19632.rs b/tests/ui/issues/issue-19632.rs index 203976079fb88..53e25112ecc42 100644 --- a/tests/ui/issues/issue-19632.rs +++ b/tests/ui/issues/issue-19632.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PoolManager { type C; diff --git a/tests/ui/issues/issue-1974.rs b/tests/ui/issues/issue-1974.rs index 74a54a6029e1c..ea67b2541de8c 100644 --- a/tests/ui/issues/issue-1974.rs +++ b/tests/ui/issues/issue-1974.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue 1974 // Don't double free the condition allocation -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let s = "hej".to_string(); diff --git a/tests/ui/issues/issue-19811-escape-unicode.rs b/tests/ui/issues/issue-19811-escape-unicode.rs index a2c50bc022ded..7be77b88494b2 100644 --- a/tests/ui/issues/issue-19811-escape-unicode.rs +++ b/tests/ui/issues/issue-19811-escape-unicode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut escaped = String::from(""); diff --git a/tests/ui/issues/issue-19850.rs b/tests/ui/issues/issue-19850.rs index 4a578c398a826..5e8ba2d4881f2 100644 --- a/tests/ui/issues/issue-19850.rs +++ b/tests/ui/issues/issue-19850.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that `::Output` and `Self::Output` are accepted as type annotations in let // bindings -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Int { fn one() -> Self; diff --git a/tests/ui/issues/issue-19982.rs b/tests/ui/issues/issue-19982.rs index 12419c109c5d4..4bace6d734ff1 100644 --- a/tests/ui/issues/issue-19982.rs +++ b/tests/ui/issues/issue-19982.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/issues/issue-20009.rs b/tests/ui/issues/issue-20009.rs index f289e58c50e68..ed884d1283420 100644 --- a/tests/ui/issues/issue-20009.rs +++ b/tests/ui/issues/issue-20009.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Check that associated types are `Sized` -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-20055-box-trait.rs b/tests/ui/issues/issue-20055-box-trait.rs index 36f597450adb8..43f1f43ba2785 100644 --- a/tests/ui/issues/issue-20055-box-trait.rs +++ b/tests/ui/issues/issue-20055-box-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // See Issues #20055 and #21695. // We are checking here that the temporaries `Box<[i8, k]>`, for `k` diff --git a/tests/ui/issues/issue-20055-box-unsized-array.rs b/tests/ui/issues/issue-20055-box-unsized-array.rs index 1246c80651f64..2663bcfb4f727 100644 --- a/tests/ui/issues/issue-20055-box-unsized-array.rs +++ b/tests/ui/issues/issue-20055-box-unsized-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #2005: Check that boxed fixed-size arrays are properly // accounted for (namely, only deallocated if they were actually // created) when they appear as temporaries in unused arms of a match diff --git a/tests/ui/issues/issue-20174.rs b/tests/ui/issues/issue-20174.rs index 4ed5a97c172d3..7b49fe8c7b472 100644 --- a/tests/ui/issues/issue-20174.rs +++ b/tests/ui/issues/issue-20174.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct GradFn usize>(F); fn main() { diff --git a/tests/ui/issues/issue-20186.rs b/tests/ui/issues/issue-20186.rs index 54d68f100521d..79dad71844f6e 100644 --- a/tests/ui/issues/issue-20186.rs +++ b/tests/ui/issues/issue-20186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] struct Foo; diff --git a/tests/ui/issues/issue-20313-rpass.rs b/tests/ui/issues/issue-20313-rpass.rs index 591f3659e98f3..66ba97b1074f0 100644 --- a/tests/ui/issues/issue-20313-rpass.rs +++ b/tests/ui/issues/issue-20313-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(link_llvm_intrinsics)] extern "C" { diff --git a/tests/ui/issues/issue-20389.rs b/tests/ui/issues/issue-20389.rs index 9bc3efcc1c4bf..7d3b49ee25f4c 100644 --- a/tests/ui/issues/issue-20389.rs +++ b/tests/ui/issues/issue-20389.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-20389.rs +//@ aux-build:issue-20389.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_20389; diff --git a/tests/ui/issues/issue-20396.rs b/tests/ui/issues/issue-20396.rs index 4a34f8b385f0f..46a06bb8e3c71 100644 --- a/tests/ui/issues/issue-20396.rs +++ b/tests/ui/issues/issue-20396.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/issues/issue-20413.rs index 4de22f0c9177d..0f602b32fabe4 100644 --- a/tests/ui/issues/issue-20413.rs +++ b/tests/ui/issues/issue-20413.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Foo { fn answer(self); } diff --git a/tests/ui/issues/issue-20414.rs b/tests/ui/issues/issue-20414.rs index 2496e342a2fb1..ea086c2fbebb8 100644 --- a/tests/ui/issues/issue-20414.rs +++ b/tests/ui/issues/issue-20414.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { fn method(self) -> isize; diff --git a/tests/ui/issues/issue-20427.rs b/tests/ui/issues/issue-20427.rs index cfd8b2191ac38..ff84023ebf272 100644 --- a/tests/ui/issues/issue-20427.rs +++ b/tests/ui/issues/issue-20427.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] @@ -6,7 +6,7 @@ #![allow(non_camel_case_types)] #![allow(deprecated, deprecated_in_future)] -// aux-build:i8.rs +//@ aux-build:i8.rs extern crate i8; use std::string as i16; diff --git a/tests/ui/issues/issue-20454.rs b/tests/ui/issues/issue-20454.rs index 46cae33f102ec..e56f2ffa371a3 100644 --- a/tests/ui/issues/issue-20454.rs +++ b/tests/ui/issues/issue-20454.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] use std::thread; diff --git a/tests/ui/issues/issue-20544.rs b/tests/ui/issues/issue-20544.rs index 0f4d314f166c7..2aaae17294d3e 100644 --- a/tests/ui/issues/issue-20544.rs +++ b/tests/ui/issues/issue-20544.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures)] #![feature(fn_traits)] diff --git a/tests/ui/issues/issue-20575.rs b/tests/ui/issues/issue-20575.rs index 0ca67d9dc710e..f8ff8b7d23d9b 100644 --- a/tests/ui/issues/issue-20575.rs +++ b/tests/ui/issues/issue-20575.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that overloaded calls work with zero arity closures -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let functions: [Box Option<()>>; 1] = [Box::new(|| None)]; diff --git a/tests/ui/issues/issue-20644.rs b/tests/ui/issues/issue-20644.rs index a3a9ea7405f29..f71e1a5ba8f9a 100644 --- a/tests/ui/issues/issue-20644.rs +++ b/tests/ui/issues/issue-20644.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(stable_features)] @@ -6,7 +6,7 @@ // A reduced version of the rustbook ice. The problem this encountered // had to do with codegen ignoring binders. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(os)] diff --git a/tests/ui/issues/issue-20676.rs b/tests/ui/issues/issue-20676.rs index 2bc5034960a1b..b3319950b42a5 100644 --- a/tests/ui/issues/issue-20676.rs +++ b/tests/ui/issues/issue-20676.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #20676. Error was that we didn't support // UFCS-style calls to a method in `Trait` where `Self` was bound to a // trait object of type `Trait`. See also `ufcs-trait-object.rs`. diff --git a/tests/ui/issues/issue-2074.rs b/tests/ui/issues/issue-2074.rs index a6bea38580477..ebf0de4348cac 100644 --- a/tests/ui/issues/issue-2074.rs +++ b/tests/ui/issues/issue-2074.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-20763-1.rs b/tests/ui/issues/issue-20763-1.rs index 858d313fc3235..ea2e696767da7 100644 --- a/tests/ui/issues/issue-20763-1.rs +++ b/tests/ui/issues/issue-20763-1.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait T0 { type O; diff --git a/tests/ui/issues/issue-20763-2.rs b/tests/ui/issues/issue-20763-2.rs index aa5bed209eed1..149bfcb8c99a9 100644 --- a/tests/ui/issues/issue-20763-2.rs +++ b/tests/ui/issues/issue-20763-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait T0 { type O; diff --git a/tests/ui/issues/issue-20797.rs b/tests/ui/issues/issue-20797.rs index ef0e72571efb2..3d3160c6e85d6 100644 --- a/tests/ui/issues/issue-20797.rs +++ b/tests/ui/issues/issue-20797.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Regression test for #20797. diff --git a/tests/ui/issues/issue-20803.rs b/tests/ui/issues/issue-20803.rs index f657cf6cdd725..47bf52b31a026 100644 --- a/tests/ui/issues/issue-20803.rs +++ b/tests/ui/issues/issue-20803.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn foo(x: T) -> >::Output where i32: Add { diff --git a/tests/ui/issues/issue-20847.rs b/tests/ui/issues/issue-20847.rs index 03e632263e673..364b07bf6922f 100644 --- a/tests/ui/issues/issue-20847.rs +++ b/tests/ui/issues/issue-20847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits)] fn say(x: u32, y: u32) { diff --git a/tests/ui/issues/issue-20953.rs b/tests/ui/issues/issue-20953.rs index 4ec7e3195ebe0..936e7aec52d12 100644 --- a/tests/ui/issues/issue-20953.rs +++ b/tests/ui/issues/issue-20953.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-20971.rs b/tests/ui/issues/issue-20971.rs index 2e10418178c42..377a3d9ea304b 100644 --- a/tests/ui/issues/issue-20971.rs +++ b/tests/ui/issues/issue-20971.rs @@ -1,8 +1,8 @@ // Regression test for Issue #20971. -// run-fail -// error-pattern:Hello, world! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:Hello, world! +//@ ignore-emscripten no processes pub trait Parser { type Input; diff --git a/tests/ui/issues/issue-21033.rs b/tests/ui/issues/issue-21033.rs index 91f72eb369bca..4ddc7a1db5800 100644 --- a/tests/ui/issues/issue-21033.rs +++ b/tests/ui/issues/issue-21033.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(box_patterns)] diff --git a/tests/ui/issues/issue-21140.rs b/tests/ui/issues/issue-21140.rs index 01de901112ecf..fbae052d0180e 100644 --- a/tests/ui/issues/issue-21140.rs +++ b/tests/ui/issues/issue-21140.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait where Self::Out: std::fmt::Display { type Out; } diff --git a/tests/ui/issues/issue-21174-2.rs b/tests/ui/issues/issue-21174-2.rs index c90f91f6a699a..06f3ceaac3501 100644 --- a/tests/ui/issues/issue-21174-2.rs +++ b/tests/ui/issues/issue-21174-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] trait Trait<'a> { diff --git a/tests/ui/issues/issue-21202.rs b/tests/ui/issues/issue-21202.rs index 2c5f1394449b4..66f6ef3b83fb5 100644 --- a/tests/ui/issues/issue-21202.rs +++ b/tests/ui/issues/issue-21202.rs @@ -1,4 +1,4 @@ -// aux-build:issue-21202.rs +//@ aux-build:issue-21202.rs extern crate issue_21202 as crate1; diff --git a/tests/ui/issues/issue-21245.rs b/tests/ui/issues/issue-21245.rs index c8e55a0cc20a5..f25ebf718b16b 100644 --- a/tests/ui/issues/issue-21245.rs +++ b/tests/ui/issues/issue-21245.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for issue #21245. Check that we are able to infer // the types in these examples correctly. It used to be that // insufficient type propagation caused the type of the iterator to be // incorrectly unified with the `*const` type to which it is coerced. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/issues/issue-21291.rs b/tests/ui/issues/issue-21291.rs index b351e22d862d4..357d5520028fb 100644 --- a/tests/ui/issues/issue-21291.rs +++ b/tests/ui/issues/issue-21291.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support // Regression test for unwrapping the result of `join`, issue #21291 diff --git a/tests/ui/issues/issue-21306.rs b/tests/ui/issues/issue-21306.rs index b06a475e4df46..bf42e70a5bc04 100644 --- a/tests/ui/issues/issue-21306.rs +++ b/tests/ui/issues/issue-21306.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; diff --git a/tests/ui/issues/issue-21361.rs b/tests/ui/issues/issue-21361.rs index c970e77abb72b..6f0bafc3b1b07 100644 --- a/tests/ui/issues/issue-21361.rs +++ b/tests/ui/issues/issue-21361.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let v = vec![1, 2, 3]; diff --git a/tests/ui/issues/issue-21384.rs b/tests/ui/issues/issue-21384.rs index caa99a1598267..7dc531e9c2bd1 100644 --- a/tests/ui/issues/issue-21384.rs +++ b/tests/ui/issues/issue-21384.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use ::std::ops::RangeFull; diff --git a/tests/ui/issues/issue-21400.rs b/tests/ui/issues/issue-21400.rs index 4a85158d97a45..2c4bbe3d3175a 100644 --- a/tests/ui/issues/issue-21400.rs +++ b/tests/ui/issues/issue-21400.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #21400 which itself was extracted from // stackoverflow.com/questions/28031155/is-my-borrow-checker-drunk/28031580 diff --git a/tests/ui/issues/issue-21402.rs b/tests/ui/issues/issue-21402.rs index d140b6162ceec..28d1e1a0d7739 100644 --- a/tests/ui/issues/issue-21402.rs +++ b/tests/ui/issues/issue-21402.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Hash)] struct Foo { diff --git a/tests/ui/issues/issue-21622.rs b/tests/ui/issues/issue-21622.rs index 2d4cddac9117f..8dbc2c21ba951 100644 --- a/tests/ui/issues/issue-21622.rs +++ b/tests/ui/issues/issue-21622.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-21634.rs b/tests/ui/issues/issue-21634.rs index 2731bfd767f3e..270a893474adf 100644 --- a/tests/ui/issues/issue-21634.rs +++ b/tests/ui/issues/issue-21634.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/tests/ui/issues/issue-21655.rs b/tests/ui/issues/issue-21655.rs index d1cd4ec7b8a01..1068b28b33838 100644 --- a/tests/ui/issues/issue-21655.rs +++ b/tests/ui/issues/issue-21655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(it: &mut dyn Iterator) { for x in it { diff --git a/tests/ui/issues/issue-2170-exe.rs b/tests/ui/issues/issue-2170-exe.rs index a89579706c8dc..9e3586afbbc97 100644 --- a/tests/ui/issues/issue-2170-exe.rs +++ b/tests/ui/issues/issue-2170-exe.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-2170-lib.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:issue-2170-lib.rs +//@ pretty-expanded FIXME #23616 extern crate issue_2170_lib; diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs index 38103ff4f9c85..a349253063c02 100644 --- a/tests/ui/issues/issue-21763.rs +++ b/tests/ui/issues/issue-21763.rs @@ -1,6 +1,6 @@ // Regression test for HashMap only impl'ing Send/Sync if its contents do -// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" +//@ normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" use std::collections::HashMap; use std::rc::Rc; diff --git a/tests/ui/issues/issue-21891.rs b/tests/ui/issues/issue-21891.rs index 576f0253e63e0..1feb0daa2d175 100644 --- a/tests/ui/issues/issue-21891.rs +++ b/tests/ui/issues/issue-21891.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static foo: [usize; 3] = [1, 2, 3]; diff --git a/tests/ui/issues/issue-2190-1.rs b/tests/ui/issues/issue-2190-1.rs index e67a924b9eedc..5b2890c89fbcf 100644 --- a/tests/ui/issues/issue-2190-1.rs +++ b/tests/ui/issues/issue-2190-1.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads use std::thread::Builder; diff --git a/tests/ui/issues/issue-21909.rs b/tests/ui/issues/issue-21909.rs index 6a6cdcfee159d..bbf654cb2088e 100644 --- a/tests/ui/issues/issue-21909.rs +++ b/tests/ui/issues/issue-21909.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self, arg: X); diff --git a/tests/ui/issues/issue-21922.rs b/tests/ui/issues/issue-21922.rs index 9727b2efe9a9a..6404ab8b7aa0f 100644 --- a/tests/ui/issues/issue-21922.rs +++ b/tests/ui/issues/issue-21922.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn show(z: i32) { println!("{}", z) diff --git a/tests/ui/issues/issue-22008.rs b/tests/ui/issues/issue-22008.rs index 004255822669d..b537ce8c2721c 100644 --- a/tests/ui/issues/issue-22008.rs +++ b/tests/ui/issues/issue-22008.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let command = "a"; diff --git a/tests/ui/issues/issue-22036.rs b/tests/ui/issues/issue-22036.rs index 30da2130a3132..befdf7ead06d2 100644 --- a/tests/ui/issues/issue-22036.rs +++ b/tests/ui/issues/issue-22036.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait DigitCollection: Sized { type Iter: Iterator; diff --git a/tests/ui/issues/issue-2214.rs b/tests/ui/issues/issue-2214.rs index 1994c3515ab3b..3c45898420442 100644 --- a/tests/ui/issues/issue-2214.rs +++ b/tests/ui/issues/issue-2214.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-sgx no libc #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-22258.rs b/tests/ui/issues/issue-22258.rs index 93ead5818d595..a1eb8ba14ca98 100644 --- a/tests/ui/issues/issue-22258.rs +++ b/tests/ui/issues/issue-22258.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn f(a: T, b: T) -> ::Output { diff --git a/tests/ui/issues/issue-22346.rs b/tests/ui/issues/issue-22346.rs index 5f6d9dcc9ae43..42280a7ddb630 100644 --- a/tests/ui/issues/issue-22346.rs +++ b/tests/ui/issues/issue-22346.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // This used to cause an ICE because the retslot for the "return" had the wrong type fn testcase<'a>() -> Box + 'a> { diff --git a/tests/ui/issues/issue-22356.rs b/tests/ui/issues/issue-22356.rs index 47fad3bb909e5..6b0024ee0ee6f 100644 --- a/tests/ui/issues/issue-22356.rs +++ b/tests/ui/issues/issue-22356.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(type_alias_bounds)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-22403.rs b/tests/ui/issues/issue-22403.rs index 8d85590943519..89c956913f932 100644 --- a/tests/ui/issues/issue-22403.rs +++ b/tests/ui/issues/issue-22403.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = Box::new([1, 2, 3]); let y = x as Box<[i32]>; diff --git a/tests/ui/issues/issue-22426.rs b/tests/ui/issues/issue-22426.rs index adf060a8292be..d5254528a1283 100644 --- a/tests/ui/issues/issue-22426.rs +++ b/tests/ui/issues/issue-22426.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { match 42 { diff --git a/tests/ui/issues/issue-22471.rs b/tests/ui/issues/issue-22471.rs index 69879ab7fdf1b..a983fec05c865 100644 --- a/tests/ui/issues/issue-22471.rs +++ b/tests/ui/issues/issue-22471.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(type_alias_bounds)] diff --git a/tests/ui/issues/issue-22577.rs b/tests/ui/issues/issue-22577.rs index 8aca21bf10fe4..09857c95e1ba6 100644 --- a/tests/ui/issues/issue-22577.rs +++ b/tests/ui/issues/issue-22577.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::{fs, net}; diff --git a/tests/ui/issues/issue-22603.rs b/tests/ui/issues/issue-22603.rs index a83e291f999ab..63d5e3b2ae6cb 100644 --- a/tests/ui/issues/issue-22603.rs +++ b/tests/ui/issues/issue-22603.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/issues/issue-22629.rs b/tests/ui/issues/issue-22629.rs index 7beeb126ee45c..0a75d3dd15203 100644 --- a/tests/ui/issues/issue-22629.rs +++ b/tests/ui/issues/issue-22629.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::borrow::{ToOwned, Cow}; diff --git a/tests/ui/issues/issue-22638.rs b/tests/ui/issues/issue-22638.rs index 67fd147ae23c9..3e04eb41b98de 100644 --- a/tests/ui/issues/issue-22638.rs +++ b/tests/ui/issues/issue-22638.rs @@ -1,7 +1,7 @@ -// build-fail -// normalize-stderr-test: "<\{closure@.+`" -> "$$CLOSURE`" -// normalize-stderr-test: ".nll/" -> "/" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ normalize-stderr-test: "<\{closure@.+`" -> "$$CLOSURE`" +//@ normalize-stderr-test: ".nll/" -> "/" +//@ ignore-compare-mode-next-solver (hangs) #![allow(unused)] diff --git a/tests/ui/issues/issue-22673.rs b/tests/ui/issues/issue-22673.rs index 4b9b4d6b23da4..019c45dbadc8a 100644 --- a/tests/ui/issues/issue-22673.rs +++ b/tests/ui/issues/issue-22673.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Expr: PartialEq { type Item; diff --git a/tests/ui/issues/issue-22777.rs b/tests/ui/issues/issue-22777.rs index 486683d12d604..56b385a16919c 100644 --- a/tests/ui/issues/issue-22777.rs +++ b/tests/ui/issues/issue-22777.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // This test is reduced from librustc_ast. It is just checking that we // can successfully deal with a "deep" structure, which the drop-check // was hitting a recursion limit on at one point. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-22781.rs b/tests/ui/issues/issue-22781.rs index d644cec4d5666..36314afd6222d 100644 --- a/tests/ui/issues/issue-22781.rs +++ b/tests/ui/issues/issue-22781.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] use std::collections::HashMap; use std::collections::hash_map::Entry::Vacant; diff --git a/tests/ui/issues/issue-22789.rs b/tests/ui/issues/issue-22789.rs index cef4075376686..95ebe6baaa38b 100644 --- a/tests/ui/issues/issue-22789.rs +++ b/tests/ui/issues/issue-22789.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/issues/issue-22814.rs b/tests/ui/issues/issue-22814.rs index 4079adfc8b62d..95ddeb15b57dd 100644 --- a/tests/ui/issues/issue-22814.rs +++ b/tests/ui/issues/issue-22814.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Test {} macro_rules! test { diff --git a/tests/ui/issues/issue-2284.rs b/tests/ui/issues/issue-2284.rs index 6f2c958341b5e..281dce913ad20 100644 --- a/tests/ui/issues/issue-2284.rs +++ b/tests/ui/issues/issue-2284.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Send { fn f(&self); diff --git a/tests/ui/issues/issue-22864-1.rs b/tests/ui/issues/issue-22864-1.rs index 0fad5433d6caa..3d88a2a50b464 100644 --- a/tests/ui/issues/issue-22864-1.rs +++ b/tests/ui/issues/issue-22864-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { struct Fun(F); let f = Fun(|x| 3*x); diff --git a/tests/ui/issues/issue-22864-2.rs b/tests/ui/issues/issue-22864-2.rs index 4aa9e3e086b09..1b702f4f509c3 100644 --- a/tests/ui/issues/issue-22864-2.rs +++ b/tests/ui/issues/issue-22864-2.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support pub fn main() { let f = || || 0; diff --git a/tests/ui/issues/issue-2288.rs b/tests/ui/issues/issue-2288.rs index 6fd690a4d956a..f424cca79d3c7 100644 --- a/tests/ui/issues/issue-2288.rs +++ b/tests/ui/issues/issue-2288.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait clam { diff --git a/tests/ui/issues/issue-22894.rs b/tests/ui/issues/issue-22894.rs index 93c1db914ea44..e8fc680f04224 100644 --- a/tests/ui/issues/issue-22894.rs +++ b/tests/ui/issues/issue-22894.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[allow(dead_code)] static X: &'static str = &*""; fn main() {} diff --git a/tests/ui/issues/issue-22933-1.rs b/tests/ui/issues/issue-22933-1.rs index 3c9aa26697907..8f1f5a5048a30 100644 --- a/tests/ui/issues/issue-22933-1.rs +++ b/tests/ui/issues/issue-22933-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct CNFParser { token: char, diff --git a/tests/ui/issues/issue-22992-2.rs b/tests/ui/issues/issue-22992-2.rs index 042af40eda697..c2edb4286585d 100644 --- a/tests/ui/issues/issue-22992-2.rs +++ b/tests/ui/issues/issue-22992-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A(B); struct B; diff --git a/tests/ui/issues/issue-22992.rs b/tests/ui/issues/issue-22992.rs index 292a0ae298dcf..3bc15cc948ad3 100644 --- a/tests/ui/issues/issue-22992.rs +++ b/tests/ui/issues/issue-22992.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { val: i32 } impl std::ops::Deref for X { diff --git a/tests/ui/issues/issue-23036.rs b/tests/ui/issues/issue-23036.rs index d67f184720e6c..5186fccd042b2 100644 --- a/tests/ui/issues/issue-23036.rs +++ b/tests/ui/issues/issue-23036.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::path::Path; diff --git a/tests/ui/issues/issue-2311-2.rs b/tests/ui/issues/issue-2311-2.rs index 760d4edaa98d8..5a0b49a501fc7 100644 --- a/tests/ui/issues/issue-2311-2.rs +++ b/tests/ui/issues/issue-2311-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-2311.rs b/tests/ui/issues/issue-2311.rs index 21ff19f7f0316..dc2fb394f83ca 100644 --- a/tests/ui/issues/issue-2311.rs +++ b/tests/ui/issues/issue-2311.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait clam { fn get(self) -> A; } trait foo { diff --git a/tests/ui/issues/issue-2312.rs b/tests/ui/issues/issue-2312.rs index 8a94bcbd4cc18..ecd296aac7a19 100644 --- a/tests/ui/issues/issue-2312.rs +++ b/tests/ui/issues/issue-2312.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-23122-2.rs b/tests/ui/issues/issue-23122-2.rs index 338789c2e8719..2880b9564170c 100644 --- a/tests/ui/issues/issue-23122-2.rs +++ b/tests/ui/issues/issue-23122-2.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Next { type Next: Next; } diff --git a/tests/ui/issues/issue-2316-c.rs b/tests/ui/issues/issue-2316-c.rs index d975aa695c836..52e2995ec5871 100644 --- a/tests/ui/issues/issue-2316-c.rs +++ b/tests/ui/issues/issue-2316-c.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-2316-a.rs -// aux-build:issue-2316-b.rs +//@ run-pass +//@ aux-build:issue-2316-a.rs +//@ aux-build:issue-2316-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_2316_b; use issue_2316_b::cloth; diff --git a/tests/ui/issues/issue-23261.rs b/tests/ui/issues/issue-23261.rs index e21f86351eeee..69f141e8bf870 100644 --- a/tests/ui/issues/issue-23261.rs +++ b/tests/ui/issues/issue-23261.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Matching on a DST struct should not trigger an LLVM assertion. struct Foo { diff --git a/tests/ui/issues/issue-23304-1.rs b/tests/ui/issues/issue-23304-1.rs index 1805c1c19b90b..6b80646704a74 100644 --- a/tests/ui/issues/issue-23304-1.rs +++ b/tests/ui/issues/issue-23304-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(u8)] diff --git a/tests/ui/issues/issue-23304-2.rs b/tests/ui/issues/issue-23304-2.rs index 6376fdb654501..17eb79e93d2ad 100644 --- a/tests/ui/issues/issue-23304-2.rs +++ b/tests/ui/issues/issue-23304-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum X { A = 42 as isize } diff --git a/tests/ui/issues/issue-23311.rs b/tests/ui/issues/issue-23311.rs index 62c96840b3bc4..e827fa1670fb3 100644 --- a/tests/ui/issues/issue-23311.rs +++ b/tests/ui/issues/issue-23311.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we do not ICE when pattern matching an array against a slice. diff --git a/tests/ui/issues/issue-23336.rs b/tests/ui/issues/issue-23336.rs index cd71d7eed8979..e71c2af0c85d6 100644 --- a/tests/ui/issues/issue-23336.rs +++ b/tests/ui/issues/issue-23336.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Data { fn doit(&self) {} } impl Data for T {} pub trait UnaryLogic { type D: Data; } diff --git a/tests/ui/issues/issue-23354-2.rs b/tests/ui/issues/issue-23354-2.rs index c291d8a5eaf3d..90de1276cc6bc 100644 --- a/tests/ui/issues/issue-23354-2.rs +++ b/tests/ui/issues/issue-23354-2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic evaluated -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic evaluated +//@ ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-23354.rs b/tests/ui/issues/issue-23354.rs index 8b7c2eef2fc1b..31783842dac00 100644 --- a/tests/ui/issues/issue-23354.rs +++ b/tests/ui/issues/issue-23354.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic evaluated -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic evaluated +//@ ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-23406.rs b/tests/ui/issues/issue-23406.rs index d00d5d6f944e6..819f0feb6147a 100644 --- a/tests/ui/issues/issue-23406.rs +++ b/tests/ui/issues/issue-23406.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] trait Inner { type T; diff --git a/tests/ui/issues/issue-23433.rs b/tests/ui/issues/issue-23433.rs index d4fbbde62ffa5..831cdc0e4672d 100644 --- a/tests/ui/issues/issue-23433.rs +++ b/tests/ui/issues/issue-23433.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Don't fail if we encounter a NonNull where T is an unsized type use std::ptr::NonNull; diff --git a/tests/ui/issues/issue-23442.rs b/tests/ui/issues/issue-23442.rs index d1e4317e5b469..883c5bb511ae6 100644 --- a/tests/ui/issues/issue-23442.rs +++ b/tests/ui/issues/issue-23442.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-23477.rs b/tests/ui/issues/issue-23477.rs index 1ce05ba390d76..fa69a1d762682 100644 --- a/tests/ui/issues/issue-23477.rs +++ b/tests/ui/issues/issue-23477.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -g +//@ build-pass +//@ compile-flags: -g pub struct Dst { pub a: (), diff --git a/tests/ui/issues/issue-23485.rs b/tests/ui/issues/issue-23485.rs index 07ed0f1b00df8..530f0558b6c9e 100644 --- a/tests/ui/issues/issue-23485.rs +++ b/tests/ui/issues/issue-23485.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test for an ICE that occurred when a default method implementation // was applied to a type that did not meet the prerequisites. The diff --git a/tests/ui/issues/issue-23491.rs b/tests/ui/issues/issue-23491.rs index efd831123530e..0a2dfa4257a03 100644 --- a/tests/ui/issues/issue-23491.rs +++ b/tests/ui/issues/issue-23491.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Node(#[allow(dead_code)] T); diff --git a/tests/ui/issues/issue-23550.rs b/tests/ui/issues/issue-23550.rs index 9cce9a0a98b63..0cc25596ab681 100644 --- a/tests/ui/issues/issue-23550.rs +++ b/tests/ui/issues/issue-23550.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs index b967e6aecdd43..980a2c01f23ae 100644 --- a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs +++ b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Issue 23611: this test is ensuring that, for an instance `X` of the diff --git a/tests/ui/issues/issue-23649-1.rs b/tests/ui/issues/issue-23649-1.rs index fc0c9a605fa8d..1c4252b40c6c0 100644 --- a/tests/ui/issues/issue-23649-1.rs +++ b/tests/ui/issues/issue-23649-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; pub struct X([u8]); diff --git a/tests/ui/issues/issue-23649-2.rs b/tests/ui/issues/issue-23649-2.rs index ce7d8e3a75547..4a953de1768d5 100644 --- a/tests/ui/issues/issue-23649-2.rs +++ b/tests/ui/issues/issue-23649-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::path::{Path, PathBuf}; diff --git a/tests/ui/issues/issue-23649-3.rs b/tests/ui/issues/issue-23649-3.rs index 8f61c71d6eb7c..524055d99b477 100644 --- a/tests/ui/issues/issue-23649-3.rs +++ b/tests/ui/issues/issue-23649-3.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[derive(PartialEq)] struct Slice { slice: [u8] } diff --git a/tests/ui/issues/issue-23699.rs b/tests/ui/issues/issue-23699.rs index 952548837e418..6dde2dfd93001 100644 --- a/tests/ui/issues/issue-23699.rs +++ b/tests/ui/issues/issue-23699.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn gimme_a_raw_pointer(_: *const T) { } diff --git a/tests/ui/issues/issue-2380-b.rs b/tests/ui/issues/issue-2380-b.rs index d708c7b4213b2..722b463de09f6 100644 --- a/tests/ui/issues/issue-2380-b.rs +++ b/tests/ui/issues/issue-2380-b.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2380.rs +//@ run-pass +//@ aux-build:issue-2380.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate a; diff --git a/tests/ui/issues/issue-23808.rs b/tests/ui/issues/issue-23808.rs index b10682521a4b0..6af0bd422e3a5 100644 --- a/tests/ui/issues/issue-23808.rs +++ b/tests/ui/issues/issue-23808.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/issues/issue-2383.rs b/tests/ui/issues/issue-2383.rs index 06e61ce680b38..eecbaa2562e89 100644 --- a/tests/ui/issues/issue-2383.rs +++ b/tests/ui/issues/issue-2383.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::collections::VecDeque; diff --git a/tests/ui/issues/issue-23891.rs b/tests/ui/issues/issue-23891.rs index 73467f715cb8b..131139470f9fc 100644 --- a/tests/ui/issues/issue-23891.rs +++ b/tests/ui/issues/issue-23891.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! id { ($s: pat) => ($s); } diff --git a/tests/ui/issues/issue-23898.rs b/tests/ui/issues/issue-23898.rs index 3de365675ad22..0d8fd7ea4eba3 100644 --- a/tests/ui/issues/issue-23898.rs +++ b/tests/ui/issues/issue-23898.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-23958.rs b/tests/ui/issues/issue-23958.rs index 7e90d75860071..2f1fb42a27795 100644 --- a/tests/ui/issues/issue-23958.rs +++ b/tests/ui/issues/issue-23958.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Collection where for<'a> &'a Self: IntoIterator { fn my_iter(&self) -> <&Self as IntoIterator>::IntoIter { self.into_iter() diff --git a/tests/ui/issues/issue-23992.rs b/tests/ui/issues/issue-23992.rs index 1ff44bd7f2daf..08a99d357bc43 100644 --- a/tests/ui/issues/issue-23992.rs +++ b/tests/ui/issues/issue-23992.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Outer(T); pub struct Inner<'a> { value: &'a bool } diff --git a/tests/ui/issues/issue-24086.rs b/tests/ui/issues/issue-24086.rs index 54622afbcfc13..4d2e6a7b23b37 100644 --- a/tests/ui/issues/issue-24086.rs +++ b/tests/ui/issues/issue-24086.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-2414-c.rs b/tests/ui/issues/issue-2414-c.rs index f6fe9798067a8..1437a4199dc22 100644 --- a/tests/ui/issues/issue-2414-c.rs +++ b/tests/ui/issues/issue-2414-c.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-2414-a.rs -// aux-build:issue-2414-b.rs +//@ run-pass +//@ aux-build:issue-2414-a.rs +//@ aux-build:issue-2414-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate b; diff --git a/tests/ui/issues/issue-24161.rs b/tests/ui/issues/issue-24161.rs index f4cdd982ac641..974add4386165 100644 --- a/tests/ui/issues/issue-24161.rs +++ b/tests/ui/issues/issue-24161.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Copy,Clone)] struct Functions { diff --git a/tests/ui/issues/issue-24227.rs b/tests/ui/issues/issue-24227.rs index 12816c235f8d8..acc82bdabb5e7 100644 --- a/tests/ui/issues/issue-24227.rs +++ b/tests/ui/issues/issue-24227.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This resulted in an ICE. Test for future-proofing // Issue #24227 diff --git a/tests/ui/issues/issue-2428.rs b/tests/ui/issues/issue-2428.rs index 94b830de3e67e..9cb02460f35b7 100644 --- a/tests/ui/issues/issue-2428.rs +++ b/tests/ui/issues/issue-2428.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-24308.rs b/tests/ui/issues/issue-24308.rs index 40950938fc712..976d901ccbfaf 100644 --- a/tests/ui/issues/issue-24308.rs +++ b/tests/ui/issues/issue-24308.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { fn method1() {} fn method2(); diff --git a/tests/ui/issues/issue-24353.rs b/tests/ui/issues/issue-24353.rs index f78255b7e2bc4..369fc238d1173 100644 --- a/tests/ui/issues/issue-24353.rs +++ b/tests/ui/issues/issue-24353.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] fn main() { return (); diff --git a/tests/ui/issues/issue-24389.rs b/tests/ui/issues/issue-24389.rs index 7cc7611769ad4..95bb2af9b25c5 100644 --- a/tests/ui/issues/issue-24389.rs +++ b/tests/ui/issues/issue-24389.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo; diff --git a/tests/ui/issues/issue-24434.rs b/tests/ui/issues/issue-24434.rs index 4c1bfc03c9a2b..4cf1f8b50f7c4 100644 --- a/tests/ui/issues/issue-24434.rs +++ b/tests/ui/issues/issue-24434.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:--cfg set1 +//@ check-pass +//@ compile-flags:--cfg set1 #![cfg_attr(set1, feature(rustc_attrs))] #![rustc_dummy] diff --git a/tests/ui/issues/issue-2445-b.rs b/tests/ui/issues/issue-2445-b.rs index f369eae3af348..8f52c0f47a594 100644 --- a/tests/ui/issues/issue-2445-b.rs +++ b/tests/ui/issues/issue-2445-b.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct c1 { x: T, diff --git a/tests/ui/issues/issue-2445.rs b/tests/ui/issues/issue-2445.rs index 5730ce165748e..da82a489c1e57 100644 --- a/tests/ui/issues/issue-2445.rs +++ b/tests/ui/issues/issue-2445.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct c1 { x: T, diff --git a/tests/ui/issues/issue-24533.rs b/tests/ui/issues/issue-24533.rs index 8592bf430721e..497a72da6c277 100644 --- a/tests/ui/issues/issue-24533.rs +++ b/tests/ui/issues/issue-24533.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] use std::slice::Iter; use std::io::{Error, ErrorKind, Result}; diff --git a/tests/ui/issues/issue-24589.rs b/tests/ui/issues/issue-24589.rs index 6b03e14f961ee..e08e06a88b84f 100644 --- a/tests/ui/issues/issue-24589.rs +++ b/tests/ui/issues/issue-24589.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct _X([u8]); impl std::ops::Deref for _X { diff --git a/tests/ui/issues/issue-2463.rs b/tests/ui/issues/issue-2463.rs index d24a47c53d9ee..7650da845e34d 100644 --- a/tests/ui/issues/issue-2463.rs +++ b/tests/ui/issues/issue-2463.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Pair { f: isize, g: isize } diff --git a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs index 773792c7a3f1f..d1ab717264b4c 100644 --- a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs +++ b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-24687-lib.rs -// compile-flags:-g +//@ run-pass +//@ aux-build:issue-24687-lib.rs +//@ compile-flags:-g extern crate issue_24687_lib as d; diff --git a/tests/ui/issues/issue-2470-bounds-check-overflow.rs b/tests/ui/issues/issue-2470-bounds-check-overflow.rs index f0e8e185e5633..241bc8fda9c21 100644 --- a/tests/ui/issues/issue-2470-bounds-check-overflow.rs +++ b/tests/ui/issues/issue-2470-bounds-check-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes use std::mem; diff --git a/tests/ui/issues/issue-2472.rs b/tests/ui/issues/issue-2472.rs index c790bc2d09548..afebc7b16e5cb 100644 --- a/tests/ui/issues/issue-2472.rs +++ b/tests/ui/issues/issue-2472.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2472-b.rs +//@ run-pass +//@ aux-build:issue-2472-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_2472_b; diff --git a/tests/ui/issues/issue-24779.rs b/tests/ui/issues/issue-24779.rs index f1283d0dcf5bb..f371828606c4b 100644 --- a/tests/ui/issues/issue-24779.rs +++ b/tests/ui/issues/issue-24779.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!((||||42)()(), 42); } diff --git a/tests/ui/issues/issue-2487-a.rs b/tests/ui/issues/issue-2487-a.rs index fe12dad74f53f..6cdb9f2afe25a 100644 --- a/tests/ui/issues/issue-2487-a.rs +++ b/tests/ui/issues/issue-2487-a.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct socket { sock: isize, diff --git a/tests/ui/issues/issue-24945-repeat-dash-opts.rs b/tests/ui/issues/issue-24945-repeat-dash-opts.rs index cf3834952c6a6..5d8044b0a1a06 100644 --- a/tests/ui/issues/issue-24945-repeat-dash-opts.rs +++ b/tests/ui/issues/issue-24945-repeat-dash-opts.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // This test is just checking that we continue to accept `-g -g -O -O` // as options to the compiler. -// compile-flags:-g -g -O -O +//@ compile-flags:-g -g -O -O fn main() { assert_eq!(1, 1); diff --git a/tests/ui/issues/issue-24947.rs b/tests/ui/issues/issue-24947.rs index 23705b4c9e7c8..c607cb7ec89d6 100644 --- a/tests/ui/issues/issue-24947.rs +++ b/tests/ui/issues/issue-24947.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #24947 ICE using a trait-associated const in an array size diff --git a/tests/ui/issues/issue-24954.rs b/tests/ui/issues/issue-24954.rs index 0177dd4eae5a2..fe16e29d70f3b 100644 --- a/tests/ui/issues/issue-24954.rs +++ b/tests/ui/issues/issue-24954.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($y:expr) => ({ $y = 2; diff --git a/tests/ui/issues/issue-2502.rs b/tests/ui/issues/issue-2502.rs index 63151002438c3..d857099e7b9c4 100644 --- a/tests/ui/issues/issue-2502.rs +++ b/tests/ui/issues/issue-2502.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct font<'a> { fontbuf: &'a Vec , diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs index c7063b24608c2..ea9ab290904c3 100644 --- a/tests/ui/issues/issue-25089.rs +++ b/tests/ui/issues/issue-25089.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/issues/issue-25145.rs b/tests/ui/issues/issue-25145.rs index f5ae28fbbab16..7edaa91d4a0cf 100644 --- a/tests/ui/issues/issue-25145.rs +++ b/tests/ui/issues/issue-25145.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; diff --git a/tests/ui/issues/issue-25180.rs b/tests/ui/issues/issue-25180.rs index 29dc07f491427..339aca0375465 100644 --- a/tests/ui/issues/issue-25180.rs +++ b/tests/ui/issues/issue-25180.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs index 383c9a1e9c4ab..ee54a21694e6b 100644 --- a/tests/ui/issues/issue-25185.rs +++ b/tests/ui/issues/issue-25185.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-25185-1.rs -// aux-build:issue-25185-2.rs -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ aux-build:issue-25185-1.rs +//@ aux-build:issue-25185-2.rs +//@ ignore-wasm32-bare no libc for ffi testing extern crate issue_25185_2; diff --git a/tests/ui/issues/issue-2526-a.rs b/tests/ui/issues/issue-2526-a.rs index f3fdc0bd377f3..62e687f7f3faa 100644 --- a/tests/ui/issues/issue-2526-a.rs +++ b/tests/ui/issues/issue-2526-a.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2526.rs +//@ run-pass +//@ aux-build:issue-2526.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-25279.rs b/tests/ui/issues/issue-25279.rs index fdc516d3761ac..7d85a122e1734 100644 --- a/tests/ui/issues/issue-25279.rs +++ b/tests/ui/issues/issue-25279.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S<'a>(&'a ()); impl<'a> S<'a> { diff --git a/tests/ui/issues/issue-25343.rs b/tests/ui/issues/issue-25343.rs index 95a0bd9155d96..878f248867766 100644 --- a/tests/ui/issues/issue-25343.rs +++ b/tests/ui/issues/issue-25343.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused)] fn main() { || { diff --git a/tests/ui/issues/issue-25394.rs b/tests/ui/issues/issue-25394.rs index 2f0ae19fcb15f..689c9f33af029 100644 --- a/tests/ui/issues/issue-25394.rs +++ b/tests/ui/issues/issue-25394.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] struct Row([T]); diff --git a/tests/ui/issues/issue-25467.rs b/tests/ui/issues/issue-25467.rs index 31ac5f0f34b48..1ba5a0ef697a1 100644 --- a/tests/ui/issues/issue-25467.rs +++ b/tests/ui/issues/issue-25467.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-25467.rs +//@ aux-build:issue-25467.rs pub type Issue25467BarT = (); pub type Issue25467FooT = (); diff --git a/tests/ui/issues/issue-25497.rs b/tests/ui/issues/issue-25497.rs index 25f5ab90f7fd3..58dcf416dbebb 100644 --- a/tests/ui/issues/issue-25497.rs +++ b/tests/ui/issues/issue-25497.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Clone, Debug, PartialEq)] enum Expression { Dummy, diff --git a/tests/ui/issues/issue-2550.rs b/tests/ui/issues/issue-2550.rs index 04ec66b80d7bb..4fc5ba1f7b284 100644 --- a/tests/ui/issues/issue-2550.rs +++ b/tests/ui/issues/issue-2550.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct C { x: usize, diff --git a/tests/ui/issues/issue-25515.rs b/tests/ui/issues/issue-25515.rs index e7b9ea3acfc01..5eaea683e2128 100644 --- a/tests/ui/issues/issue-25515.rs +++ b/tests/ui/issues/issue-25515.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; struct Foo<'r>(&'r mut i32); diff --git a/tests/ui/issues/issue-25549-multiple-drop.rs b/tests/ui/issues/issue-25549-multiple-drop.rs index 25a2da707dc0f..1eec15a4aa28f 100644 --- a/tests/ui/issues/issue-25549-multiple-drop.rs +++ b/tests/ui/issues/issue-25549-multiple-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Foo<'r>(&'r mut i32); diff --git a/tests/ui/issues/issue-25579.rs b/tests/ui/issues/issue-25579.rs index 5f5a0f4d2671c..f4bbb41469e18 100644 --- a/tests/ui/issues/issue-25579.rs +++ b/tests/ui/issues/issue-25579.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Sexpression { Num(()), diff --git a/tests/ui/issues/issue-25679.rs b/tests/ui/issues/issue-25679.rs index 8415eba887b00..75da3becb5436 100644 --- a/tests/ui/issues/issue-25679.rs +++ b/tests/ui/issues/issue-25679.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Device { type Resources; } diff --git a/tests/ui/issues/issue-25693.rs b/tests/ui/issues/issue-25693.rs index 9af0ba100e84f..3f4a2247edf25 100644 --- a/tests/ui/issues/issue-25693.rs +++ b/tests/ui/issues/issue-25693.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub trait Parameters { type SelfRef; } diff --git a/tests/ui/issues/issue-25746-bool-transmute.rs b/tests/ui/issues/issue-25746-bool-transmute.rs index bc2f4a7c1b715..f8cdc980daa48 100644 --- a/tests/ui/issues/issue-25746-bool-transmute.rs +++ b/tests/ui/issues/issue-25746-bool-transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::transmute; fn main() { diff --git a/tests/ui/issues/issue-25757.rs b/tests/ui/issues/issue-25757.rs index ec1864d7deb58..dc9c2ffaa6fad 100644 --- a/tests/ui/issues/issue-25757.rs +++ b/tests/ui/issues/issue-25757.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { a: u32 } diff --git a/tests/ui/issues/issue-25810.rs b/tests/ui/issues/issue-25810.rs index f32216f325482..aa60e8afbef57 100644 --- a/tests/ui/issues/issue-25810.rs +++ b/tests/ui/issues/issue-25810.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = X(15); let y = x.foo(); diff --git a/tests/ui/issues/issue-26095.rs b/tests/ui/issues/issue-26095.rs index 638f8f5718760..34c617dc495a7 100644 --- a/tests/ui/issues/issue-26095.rs +++ b/tests/ui/issues/issue-26095.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-2611-3.rs b/tests/ui/issues/issue-2611-3.rs index a95a748e091a2..c95ebae33fa9b 100644 --- a/tests/ui/issues/issue-2611-3.rs +++ b/tests/ui/issues/issue-2611-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Tests that impls are allowed to have looser, more permissive bounds // than the traits require. diff --git a/tests/ui/issues/issue-26127.rs b/tests/ui/issues/issue-26127.rs index b76f1ba51a4c8..45f50efdccbdb 100644 --- a/tests/ui/issues/issue-26127.rs +++ b/tests/ui/issues/issue-26127.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr { type T; } impl Tr for u8 { type T=(); } struct S(#[allow(dead_code)] I::T); diff --git a/tests/ui/issues/issue-26186.rs b/tests/ui/issues/issue-26186.rs index f93869352ea61..225cfb4876aaa 100644 --- a/tests/ui/issues/issue-26186.rs +++ b/tests/ui/issues/issue-26186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::sync::Mutex; use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/issues/issue-26205.rs b/tests/ui/issues/issue-26205.rs index f5f39ded021ef..de1846e3e0175 100644 --- a/tests/ui/issues/issue-26205.rs +++ b/tests/ui/issues/issue-26205.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/issues/issue-2631-b.rs b/tests/ui/issues/issue-2631-b.rs index c7f6728e3f2c8..fb2ecd74a6595 100644 --- a/tests/ui/issues/issue-2631-b.rs +++ b/tests/ui/issues/issue-2631-b.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:issue-2631-a.rs +//@ aux-build:issue-2631-a.rs extern crate req; diff --git a/tests/ui/issues/issue-2642.rs b/tests/ui/issues/issue-2642.rs index 95c5632258eaa..d7d97b847999e 100644 --- a/tests/ui/issues/issue-2642.rs +++ b/tests/ui/issues/issue-2642.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() { let _x: usize = loop { loop { break; } }; diff --git a/tests/ui/issues/issue-26468.rs b/tests/ui/issues/issue-26468.rs index 71cc90e8bd170..2103b354977f8 100644 --- a/tests/ui/issues/issue-26468.rs +++ b/tests/ui/issues/issue-26468.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum FooMode { diff --git a/tests/ui/issues/issue-26484.rs b/tests/ui/issues/issue-26484.rs index 3b40b3dd8f075..c7053505567ab 100644 --- a/tests/ui/issues/issue-26484.rs +++ b/tests/ui/issues/issue-26484.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-g +//@ run-pass +//@ compile-flags:-g fn helper bool>(_f: F) { print!(""); diff --git a/tests/ui/issues/issue-26614.rs b/tests/ui/issues/issue-26614.rs index b8ebbdc5abc3e..576c7545924b3 100644 --- a/tests/ui/issues/issue-26614.rs +++ b/tests/ui/issues/issue-26614.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Mirror { type It; diff --git a/tests/ui/issues/issue-26641.rs b/tests/ui/issues/issue-26641.rs index 3256b71660fec..983bcbea92731 100644 --- a/tests/ui/issues/issue-26641.rs +++ b/tests/ui/issues/issue-26641.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Parser<'a>(#[allow(dead_code)] Box); fn main() { diff --git a/tests/ui/issues/issue-26646.rs b/tests/ui/issues/issue-26646.rs index 86e4bd7e8f8f0..b1789b1a91fc2 100644 --- a/tests/ui/issues/issue-26646.rs +++ b/tests/ui/issues/issue-26646.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_attributes)] #[repr(C)] diff --git a/tests/ui/issues/issue-26655.rs b/tests/ui/issues/issue-26655.rs index cb386c908a489..7f1858fdb7d0e 100644 --- a/tests/ui/issues/issue-26655.rs +++ b/tests/ui/issues/issue-26655.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Check that the destructors of simple enums are run on unwinding diff --git a/tests/ui/issues/issue-26709.rs b/tests/ui/issues/issue-26709.rs index 8a8186de5cc82..5c31bd6562887 100644 --- a/tests/ui/issues/issue-26709.rs +++ b/tests/ui/issues/issue-26709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(dead_code)] T); impl<'a, T: ?Sized> Drop for Wrapper<'a, T> { diff --git a/tests/ui/issues/issue-26802.rs b/tests/ui/issues/issue-26802.rs index 307a67160980d..62fcc617b46a4 100644 --- a/tests/ui/issues/issue-26802.rs +++ b/tests/ui/issues/issue-26802.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo<'a> { fn bar<'b>(&self, x: &'b u8) -> u8 where 'a: 'b { *x+7 } } diff --git a/tests/ui/issues/issue-26805.rs b/tests/ui/issues/issue-26805.rs index bcf8a6731910f..cf75908570acf 100644 --- a/tests/ui/issues/issue-26805.rs +++ b/tests/ui/issues/issue-26805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct NonOrd; fn main() { diff --git a/tests/ui/issues/issue-26997.rs b/tests/ui/issues/issue-26997.rs index 3653e62732d41..5441dc68bae6c 100644 --- a/tests/ui/issues/issue-26997.rs +++ b/tests/ui/issues/issue-26997.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] pub struct Foo { x: isize, diff --git a/tests/ui/issues/issue-27054-primitive-binary-ops.rs b/tests/ui/issues/issue-27054-primitive-binary-ops.rs index c6f925de5d7a8..96b0edf838ebf 100644 --- a/tests/ui/issues/issue-27054-primitive-binary-ops.rs +++ b/tests/ui/issues/issue-27054-primitive-binary-ops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = &mut 1; assert_eq!(*x + { *x=2; 1 }, 2); diff --git a/tests/ui/issues/issue-2708.rs b/tests/ui/issues/issue-2708.rs index 4e53b9d145f0b..68ac4bc343c3f 100644 --- a/tests/ui/issues/issue-2708.rs +++ b/tests/ui/issues/issue-2708.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 diff --git a/tests/ui/issues/issue-27105.rs b/tests/ui/issues/issue-27105.rs index 3339af364a005..3308f3e8e010d 100644 --- a/tests/ui/issues/issue-27105.rs +++ b/tests/ui/issues/issue-27105.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/issues/issue-2723-b.rs b/tests/ui/issues/issue-2723-b.rs index 1910561d0ba43..731e521f26f89 100644 --- a/tests/ui/issues/issue-2723-b.rs +++ b/tests/ui/issues/issue-2723-b.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-2723-a.rs +//@ run-pass +//@ aux-build:issue-2723-a.rs extern crate issue_2723_a; use issue_2723_a::f; diff --git a/tests/ui/issues/issue-27240.rs b/tests/ui/issues/issue-27240.rs index b518e58d19471..60d98a6725e1b 100644 --- a/tests/ui/issues/issue-27240.rs +++ b/tests/ui/issues/issue-27240.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] use std::fmt; diff --git a/tests/ui/issues/issue-27268.rs b/tests/ui/issues/issue-27268.rs index 161e2d4d204eb..e8704d215e888 100644 --- a/tests/ui/issues/issue-27268.rs +++ b/tests/ui/issues/issue-27268.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { const _C: &'static dyn Fn() = &||{}; } diff --git a/tests/ui/issues/issue-27281.rs b/tests/ui/issues/issue-27281.rs index 717d8b2c2aa37..e76fd135dcd23 100644 --- a/tests/ui/issues/issue-27281.rs +++ b/tests/ui/issues/issue-27281.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type T; type U; diff --git a/tests/ui/issues/issue-27401-dropflag-reinit.rs b/tests/ui/issues/issue-27401-dropflag-reinit.rs index ab54af29bd6b9..b89497241e096 100644 --- a/tests/ui/issues/issue-27401-dropflag-reinit.rs +++ b/tests/ui/issues/issue-27401-dropflag-reinit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that when a `let`-binding occurs in a loop, its associated // drop-flag is reinitialized (to indicate "needs-drop" at the end of diff --git a/tests/ui/issues/issue-27433.fixed b/tests/ui/issues/issue-27433.fixed index ce31f6bea4bdd..ff6704e393b5b 100644 --- a/tests/ui/issues/issue-27433.fixed +++ b/tests/ui/issues/issue-27433.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 42u32; #[allow(unused_variables, non_snake_case)] diff --git a/tests/ui/issues/issue-27433.rs b/tests/ui/issues/issue-27433.rs index 01411a51c1372..2a34b43f58d22 100644 --- a/tests/ui/issues/issue-27433.rs +++ b/tests/ui/issues/issue-27433.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 42u32; #[allow(unused_variables, non_snake_case)] diff --git a/tests/ui/issues/issue-2761.rs b/tests/ui/issues/issue-2761.rs index 3ba098abbe65a..b44a24e09f258 100644 --- a/tests/ui/issues/issue-2761.rs +++ b/tests/ui/issues/issue-2761.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:custom message -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:custom message +//@ ignore-emscripten no processes fn main() { assert!(false, "custom message"); diff --git a/tests/ui/issues/issue-27639.rs b/tests/ui/issues/issue-27639.rs index 945fbad91f653..95edcb8695e21 100644 --- a/tests/ui/issues/issue-27639.rs +++ b/tests/ui/issues/issue-27639.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-27697.rs b/tests/ui/issues/issue-27697.rs index 12af8a8e875af..87ee190c01c45 100644 --- a/tests/ui/issues/issue-27697.rs +++ b/tests/ui/issues/issue-27697.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-27859.rs b/tests/ui/issues/issue-27859.rs index 233670681f375..4b4d2d28575f0 100644 --- a/tests/ui/issues/issue-27859.rs +++ b/tests/ui/issues/issue-27859.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32 issue 42629 +//@ run-pass +//@ ignore-wasm32 issue 42629 #[inline(never)] fn foo(a: f32, b: f32) -> f32 { diff --git a/tests/ui/issues/issue-27889.rs b/tests/ui/issues/issue-27889.rs index 623416a5d0032..8737f03db1a59 100644 --- a/tests/ui/issues/issue-27889.rs +++ b/tests/ui/issues/issue-27889.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Test that a field can have the same name in different variants diff --git a/tests/ui/issues/issue-27949.rs b/tests/ui/issues/issue-27949.rs index e905da72aad70..e10c60085072f 100644 --- a/tests/ui/issues/issue-27949.rs +++ b/tests/ui/issues/issue-27949.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // At one time, the `==` operator (and other binary operators) did not // support subtyping during type checking, and would therefore require diff --git a/tests/ui/issues/issue-27997.rs b/tests/ui/issues/issue-27997.rs index dd74cf752493b..85317cec061ad 100644 --- a/tests/ui/issues/issue-27997.rs +++ b/tests/ui/issues/issue-27997.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::{Ordering, AtomicUsize}; use std::mem; diff --git a/tests/ui/issues/issue-28181.rs b/tests/ui/issues/issue-28181.rs index c46e131c6ac53..e1cb5ba1c8828 100644 --- a/tests/ui/issues/issue-28181.rs +++ b/tests/ui/issues/issue-28181.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(f: F) -> usize where F: Fn([usize; 1]) -> usize { f([2]) } fn main() { diff --git a/tests/ui/issues/issue-28279.rs b/tests/ui/issues/issue-28279.rs index bab5df122c87f..23814b284e905 100644 --- a/tests/ui/issues/issue-28279.rs +++ b/tests/ui/issues/issue-28279.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/tests/ui/issues/issue-28498-must-work-ex1.rs b/tests/ui/issues/issue-28498-must-work-ex1.rs index 37234699893cd..813cd8645f923 100644 --- a/tests/ui/issues/issue-28498-must-work-ex1.rs +++ b/tests/ui/issues/issue-28498-must-work-ex1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md diff --git a/tests/ui/issues/issue-28498-must-work-ex2.rs b/tests/ui/issues/issue-28498-must-work-ex2.rs index ab0b71960821a..98514b1163675 100644 --- a/tests/ui/issues/issue-28498-must-work-ex2.rs +++ b/tests/ui/issues/issue-28498-must-work-ex2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md diff --git a/tests/ui/issues/issue-28498-ugeh-ex1.rs b/tests/ui/issues/issue-28498-ugeh-ex1.rs index ce49cf1ff991d..f606d2489484a 100644 --- a/tests/ui/issues/issue-28498-ugeh-ex1.rs +++ b/tests/ui/issues/issue-28498-ugeh-ex1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text diff --git a/tests/ui/issues/issue-28550.rs b/tests/ui/issues/issue-28550.rs index 95583f80515a5..31c7057d06f8c 100644 --- a/tests/ui/issues/issue-28550.rs +++ b/tests/ui/issues/issue-28550.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct AT,T>(F::Output); struct BT,T>(A); diff --git a/tests/ui/issues/issue-28561.rs b/tests/ui/issues/issue-28561.rs index beb12c36dcafa..f9b0ceb22fc66 100644 --- a/tests/ui/issues/issue-28561.rs +++ b/tests/ui/issues/issue-28561.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd, Clone, Copy)] struct Array { f00: [T; 00], diff --git a/tests/ui/issues/issue-28600.rs b/tests/ui/issues/issue-28600.rs index 52db0d5fd84a9..a5427b94a57c5 100644 --- a/tests/ui/issues/issue-28600.rs +++ b/tests/ui/issues/issue-28600.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // #28600 ICE: pub extern fn with parameter type &str inside struct impl struct Test; diff --git a/tests/ui/issues/issue-28625.rs b/tests/ui/issues/issue-28625.rs index 15a6a63d5ef0b..2f25bf8c734ff 100644 --- a/tests/ui/issues/issue-28625.rs +++ b/tests/ui/issues/issue-28625.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" trait Bar { type Bar; diff --git a/tests/ui/issues/issue-28777.rs b/tests/ui/issues/issue-28777.rs index 1f426b7185e8f..f67e11e369466 100644 --- a/tests/ui/issues/issue-28777.rs +++ b/tests/ui/issues/issue-28777.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn main() { let v1 = { 1 + {2} * {3} }; diff --git a/tests/ui/issues/issue-28828.rs b/tests/ui/issues/issue-28828.rs index 03968809eb724..b5d7385cf28f0 100644 --- a/tests/ui/issues/issue-28828.rs +++ b/tests/ui/issues/issue-28828.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { type Out; } diff --git a/tests/ui/issues/issue-28839.rs b/tests/ui/issues/issue-28839.rs index c086f412a2885..76b0fa2d6e089 100644 --- a/tests/ui/issues/issue-28839.rs +++ b/tests/ui/issues/issue-28839.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Foo; diff --git a/tests/ui/issues/issue-28936.rs b/tests/ui/issues/issue-28936.rs index da9e92c0c8043..96503f0711d27 100644 --- a/tests/ui/issues/issue-28936.rs +++ b/tests/ui/issues/issue-28936.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub type Session = i32; pub struct StreamParser<'a, T> { _tokens: T, diff --git a/tests/ui/issues/issue-2895.rs b/tests/ui/issues/issue-2895.rs index d8c08996bc3a8..6301a86375344 100644 --- a/tests/ui/issues/issue-2895.rs +++ b/tests/ui/issues/issue-2895.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/issues/issue-28983.rs b/tests/ui/issues/issue-28983.rs index 3db26a1ee5ffe..5273dab16c16f 100644 --- a/tests/ui/issues/issue-28983.rs +++ b/tests/ui/issues/issue-28983.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Test { type T; } impl Test for u32 { diff --git a/tests/ui/issues/issue-28999.rs b/tests/ui/issues/issue-28999.rs index cec3e25da868c..572a0beff61f6 100644 --- a/tests/ui/issues/issue-28999.rs +++ b/tests/ui/issues/issue-28999.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Xyz<'a, V> { pub v: (V, &'a u32), } diff --git a/tests/ui/issues/issue-29030.rs b/tests/ui/issues/issue-29030.rs index 723e358407f66..c92853fb5dc2f 100644 --- a/tests/ui/issues/issue-29030.rs +++ b/tests/ui/issues/issue-29030.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] struct Message<'a, P: 'a = &'a [u8]> { diff --git a/tests/ui/issues/issue-29037.rs b/tests/ui/issues/issue-29037.rs index 155ed144b3a36..0e03d8e20ae71 100644 --- a/tests/ui/issues/issue-29037.rs +++ b/tests/ui/issues/issue-29037.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // This test ensures that each pointer type `P` is covariant in `X`. diff --git a/tests/ui/issues/issue-2904.rs b/tests/ui/issues/issue-2904.rs index 73aa78f09b9ea..1ae3a8ad656ea 100644 --- a/tests/ui/issues/issue-2904.rs +++ b/tests/ui/issues/issue-2904.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/tests/ui/issues/issue-29048.rs b/tests/ui/issues/issue-29048.rs index 039f072f107b2..d379b67251c39 100644 --- a/tests/ui/issues/issue-29048.rs +++ b/tests/ui/issues/issue-29048.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Chan; pub struct ChanSelect<'c, T> { chans: Vec<(&'c Chan, T)>, diff --git a/tests/ui/issues/issue-29053.rs b/tests/ui/issues/issue-29053.rs index 34c4a0f8f3e48..3b61dc1152214 100644 --- a/tests/ui/issues/issue-29053.rs +++ b/tests/ui/issues/issue-29053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x: &'static str = "x"; diff --git a/tests/ui/issues/issue-29071-2.rs b/tests/ui/issues/issue-29071-2.rs index f27bf0261db58..cad776b984227 100644 --- a/tests/ui/issues/issue-29071-2.rs +++ b/tests/ui/issues/issue-29071-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn t1() -> u32 { let x; diff --git a/tests/ui/issues/issue-29071.rs b/tests/ui/issues/issue-29071.rs index 8bdacf2cebb2c..ab83914d5e80a 100644 --- a/tests/ui/issues/issue-29071.rs +++ b/tests/ui/issues/issue-29071.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-29092.rs b/tests/ui/issues/issue-29092.rs index f20d2a424b056..a5b2f4884f6e0 100644 --- a/tests/ui/issues/issue-29092.rs +++ b/tests/ui/issues/issue-29092.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #29092. // // (Possibly redundant with regression test run-pass/issue-30530.rs) diff --git a/tests/ui/issues/issue-29147-rpass.rs b/tests/ui/issues/issue-29147-rpass.rs index 439f8bb5308f2..7ac6a98e8e1f7 100644 --- a/tests/ui/issues/issue-29147-rpass.rs +++ b/tests/ui/issues/issue-29147-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![recursion_limit="1024"] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-29265.rs b/tests/ui/issues/issue-29265.rs index f554c4d16c7d1..a3da9be3a3b65 100644 --- a/tests/ui/issues/issue-29265.rs +++ b/tests/ui/issues/issue-29265.rs @@ -1,5 +1,5 @@ -// aux-build:issue-29265.rs -// check-pass +//@ aux-build:issue-29265.rs +//@ check-pass extern crate issue_29265 as lib; diff --git a/tests/ui/issues/issue-29276.rs b/tests/ui/issues/issue-29276.rs index 02b69565953cb..9b05e6de671a5 100644 --- a/tests/ui/issues/issue-29276.rs +++ b/tests/ui/issues/issue-29276.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct S([u8; { struct Z; 0 }]); diff --git a/tests/ui/issues/issue-2935.rs b/tests/ui/issues/issue-2935.rs index 37f8181991c40..bcc25f6187b5d 100644 --- a/tests/ui/issues/issue-2935.rs +++ b/tests/ui/issues/issue-2935.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-29466.rs b/tests/ui/issues/issue-29466.rs index f8785a6321792..dbc37506a17f2 100644 --- a/tests/ui/issues/issue-29466.rs +++ b/tests/ui/issues/issue-29466.rs @@ -1,6 +1,6 @@ // ignore-tidy-filelength // -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-29485.rs b/tests/ui/issues/issue-29485.rs index 8d58ee6d92c4b..56865d0e5db15 100644 --- a/tests/ui/issues/issue-29485.rs +++ b/tests/ui/issues/issue-29485.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_attributes)] -// aux-build:issue-29485.rs -// needs-unwind -// ignore-emscripten no threads +//@ aux-build:issue-29485.rs +//@ needs-unwind +//@ ignore-emscripten no threads #[feature(recover)] diff --git a/tests/ui/issues/issue-29516.rs b/tests/ui/issues/issue-29516.rs index 6779d508dd6c6..52fd5ba8839d2 100644 --- a/tests/ui/issues/issue-29516.rs +++ b/tests/ui/issues/issue-29516.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/issues/issue-29522.rs b/tests/ui/issues/issue-29522.rs index 3d2de5ef63a8c..2a39ef28bdbbc 100644 --- a/tests/ui/issues/issue-29522.rs +++ b/tests/ui/issues/issue-29522.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // check that we don't accidentally capture upvars just because their name // occurs in a path diff --git a/tests/ui/issues/issue-29540.rs b/tests/ui/issues/issue-29540.rs index c0de20822bacf..6bfeae8559dc9 100644 --- a/tests/ui/issues/issue-29540.rs +++ b/tests/ui/issues/issue-29540.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[derive(Debug)] pub struct Config { pub name: String, diff --git a/tests/ui/issues/issue-29663.rs b/tests/ui/issues/issue-29663.rs index e2e89a8bfa3fe..ed512f14f4ced 100644 --- a/tests/ui/issues/issue-29663.rs +++ b/tests/ui/issues/issue-29663.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // write_volatile causes an LLVM assert with composite types diff --git a/tests/ui/issues/issue-29668.rs b/tests/ui/issues/issue-29668.rs index 3d6c27bcda145..76b9429329631 100644 --- a/tests/ui/issues/issue-29668.rs +++ b/tests/ui/issues/issue-29668.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Functions can return unnameable types mod m1 { diff --git a/tests/ui/issues/issue-29710.rs b/tests/ui/issues/issue-29710.rs index bc98d389c6e15..906ffe9e77b65 100644 --- a/tests/ui/issues/issue-29710.rs +++ b/tests/ui/issues/issue-29710.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_results)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-29740.rs b/tests/ui/issues/issue-29740.rs index 20398890baf74..e26e2c882dc3a 100644 --- a/tests/ui/issues/issue-29740.rs +++ b/tests/ui/issues/issue-29740.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #29740. Inefficient MIR matching algorithms // generated way too much code for this sort of case, leading to OOM. diff --git a/tests/ui/issues/issue-29743.rs b/tests/ui/issues/issue-29743.rs index 250cd7e1b25e9..8e522a7482190 100644 --- a/tests/ui/issues/issue-29743.rs +++ b/tests/ui/issues/issue-29743.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut i = [1, 2, 3]; diff --git a/tests/ui/issues/issue-29821.rs b/tests/ui/issues/issue-29821.rs index 54be3afb59d0a..508009337a5a5 100644 --- a/tests/ui/issues/issue-29821.rs +++ b/tests/ui/issues/issue-29821.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub trait Foo { type FooAssoc; diff --git a/tests/ui/issues/issue-29857.rs b/tests/ui/issues/issue-29857.rs index 6f4c5f45d0d9c..9d4c9b2935a28 100644 --- a/tests/ui/issues/issue-29857.rs +++ b/tests/ui/issues/issue-29857.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-2989.rs b/tests/ui/issues/issue-2989.rs index a95867514073c..fc35d1906368f 100644 --- a/tests/ui/issues/issue-2989.rs +++ b/tests/ui/issues/issue-2989.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait methods { //~ WARN trait `methods` is never used diff --git a/tests/ui/issues/issue-29948.rs b/tests/ui/issues/issue-29948.rs index 3ed701480b5ed..77e1f6807d9b7 100644 --- a/tests/ui/issues/issue-29948.rs +++ b/tests/ui/issues/issue-29948.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::panic; diff --git a/tests/ui/issues/issue-30018-panic.rs b/tests/ui/issues/issue-30018-panic.rs index cba3055a22111..f5482d7c741df 100644 --- a/tests/ui/issues/issue-30018-panic.rs +++ b/tests/ui/issues/issue-30018-panic.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Regression test for Issue #30018. This is very similar to the // original reported test, except that the panic is wrapped in a // spawned thread to isolate the expected error result from the // SIGTRAP injected by the drop-flag consistency checking. -// needs-unwind -// ignore-emscripten no threads support +//@ needs-unwind +//@ ignore-emscripten no threads support struct Foo; diff --git a/tests/ui/issues/issue-30081.rs b/tests/ui/issues/issue-30081.rs index e7fca96ed9ec0..538e89f224697 100644 --- a/tests/ui/issues/issue-30081.rs +++ b/tests/ui/issues/issue-30081.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This used to segfault #30081 pub enum Instruction { diff --git a/tests/ui/issues/issue-3012-2.rs b/tests/ui/issues/issue-3012-2.rs index 7d32c51f5699c..913f92fa8e204 100644 --- a/tests/ui/issues/issue-3012-2.rs +++ b/tests/ui/issues/issue-3012-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-3012-1.rs +//@ run-pass +//@ aux-build:issue-3012-1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate socketlib; diff --git a/tests/ui/issues/issue-30123.rs b/tests/ui/issues/issue-30123.rs index 705355d91bf3c..f6511b5f290d2 100644 --- a/tests/ui/issues/issue-30123.rs +++ b/tests/ui/issues/issue-30123.rs @@ -1,4 +1,4 @@ -// aux-build:issue-30123-aux.rs +//@ aux-build:issue-30123-aux.rs extern crate issue_30123_aux; use issue_30123_aux::*; diff --git a/tests/ui/issues/issue-3026.rs b/tests/ui/issues/issue-3026.rs index 4619a3fe78718..9d1c0f5a34122 100644 --- a/tests/ui/issues/issue-3026.rs +++ b/tests/ui/issues/issue-3026.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-3029.rs b/tests/ui/issues/issue-3029.rs index 43c8a0a23fb5b..a070578969cb2 100644 --- a/tests/ui/issues/issue-3029.rs +++ b/tests/ui/issues/issue-3029.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:so long -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:so long +//@ ignore-emscripten no processes #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-3037.rs b/tests/ui/issues/issue-3037.rs index ff4d32c284073..166f4b91cbc39 100644 --- a/tests/ui/issues/issue-3037.rs +++ b/tests/ui/issues/issue-3037.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] enum what { } diff --git a/tests/ui/issues/issue-30371.rs b/tests/ui/issues/issue-30371.rs index eea548c482ff2..d3ac5fd9587d1 100644 --- a/tests/ui/issues/issue-30371.rs +++ b/tests/ui/issues/issue-30371.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(for_loops_over_fallibles)] #![deny(unused_variables)] diff --git a/tests/ui/issues/issue-30380.rs b/tests/ui/issues/issue-30380.rs index 48b329c5de148..534bb3423d0fb 100644 --- a/tests/ui/issues/issue-30380.rs +++ b/tests/ui/issues/issue-30380.rs @@ -1,9 +1,9 @@ // check that panics in destructors during assignment do not leave // destroyed values lying around for other destructors to observe. -// run-fail -// error-pattern:panicking destructors ftw! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicking destructors ftw! +//@ ignore-emscripten no processes struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/tests/ui/issues/issue-30490.rs b/tests/ui/issues/issue-30490.rs index 4f0eeac8f71e8..0d918bc3dd549 100644 --- a/tests/ui/issues/issue-30490.rs +++ b/tests/ui/issues/issue-30490.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Child I/O swaps not privileged +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Child I/O swaps not privileged // Previously libstd would set stdio descriptors of a child process // by `dup`ing the requested descriptors to inherit directly into the diff --git a/tests/ui/issues/issue-3052.rs b/tests/ui/issues/issue-3052.rs index ee2456da3e215..4aa785e797f34 100644 --- a/tests/ui/issues/issue-3052.rs +++ b/tests/ui/issues/issue-3052.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 type Connection = Box) + 'static>; diff --git a/tests/ui/issues/issue-30530.rs b/tests/ui/issues/issue-30530.rs index 111fb8aa506a4..2c00e6d676884 100644 --- a/tests/ui/issues/issue-30530.rs +++ b/tests/ui/issues/issue-30530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #30530: alloca's created for storing // intermediate scratch values during brace-less match arms need to be // initialized with their drop-flag set to "dropped" (or else we end diff --git a/tests/ui/issues/issue-30615.rs b/tests/ui/issues/issue-30615.rs index c718449d84eed..6157e593ea327 100644 --- a/tests/ui/issues/issue-30615.rs +++ b/tests/ui/issues/issue-30615.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { &0u8 as *const u8 as *const dyn PartialEq; &[0u8] as *const [u8; 1] as *const [u8]; diff --git a/tests/ui/issues/issue-30756.rs b/tests/ui/issues/issue-30756.rs index 836db951bb785..d103776406c52 100644 --- a/tests/ui/issues/issue-30756.rs +++ b/tests/ui/issues/issue-30756.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(unsafe_code)] thread_local!(static FOO: u8 = 1); diff --git a/tests/ui/issues/issue-30891.rs b/tests/ui/issues/issue-30891.rs index 30f55e0bd640c..25b7165d01167 100644 --- a/tests/ui/issues/issue-30891.rs +++ b/tests/ui/issues/issue-30891.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ERROR_CONST: bool = true; fn get() -> bool { diff --git a/tests/ui/issues/issue-3091.rs b/tests/ui/issues/issue-3091.rs index 0c0a412420aa4..a4f9b3718446a 100644 --- a/tests/ui/issues/issue-3091.rs +++ b/tests/ui/issues/issue-3091.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 1; diff --git a/tests/ui/issues/issue-3109.rs b/tests/ui/issues/issue-3109.rs index bd807cad753f3..89beaa2222732 100644 --- a/tests/ui/issues/issue-3109.rs +++ b/tests/ui/issues/issue-3109.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { println!("{:?}", ("hi there!", "you")); } diff --git a/tests/ui/issues/issue-3121.rs b/tests/ui/issues/issue-3121.rs index 4bf5b9b60a804..aa150f11cf400 100644 --- a/tests/ui/issues/issue-3121.rs +++ b/tests/ui/issues/issue-3121.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-31260.rs b/tests/ui/issues/issue-31260.rs index 4db7445b025e5..5e9fffb195c64 100644 --- a/tests/ui/issues/issue-31260.rs +++ b/tests/ui/issues/issue-31260.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] pub struct Struct { pub field: K, diff --git a/tests/ui/issues/issue-31267-additional.rs b/tests/ui/issues/issue-31267-additional.rs index c6e93533e7c51..ef7a5002bf162 100644 --- a/tests/ui/issues/issue-31267-additional.rs +++ b/tests/ui/issues/issue-31267-additional.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Clone, Copy, Debug)] struct Bar; diff --git a/tests/ui/issues/issue-31267.rs b/tests/ui/issues/issue-31267.rs index 50843c89eb4a8..d6081bb87439f 100644 --- a/tests/ui/issues/issue-31267.rs +++ b/tests/ui/issues/issue-31267.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #31267 diff --git a/tests/ui/issues/issue-31299.rs b/tests/ui/issues/issue-31299.rs index e3c422cb97c7b..b01b73bf373e8 100644 --- a/tests/ui/issues/issue-31299.rs +++ b/tests/ui/issues/issue-31299.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #31299. This was generating an overflow error // because of eager normalization: // diff --git a/tests/ui/issues/issue-3136-b.rs b/tests/ui/issues/issue-3136-b.rs index 33d97fe7c834f..2995c96ebb911 100644 --- a/tests/ui/issues/issue-3136-b.rs +++ b/tests/ui/issues/issue-3136-b.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-3136-a.rs +//@ run-pass +//@ aux-build:issue-3136-a.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_3136_a; diff --git a/tests/ui/issues/issue-3149.rs b/tests/ui/issues/issue-3149.rs index 6ab3bc846a3e3..b0abd5996b1e9 100644 --- a/tests/ui/issues/issue-3149.rs +++ b/tests/ui/issues/issue-3149.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn Matrix4(m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, diff --git a/tests/ui/issues/issue-31702.rs b/tests/ui/issues/issue-31702.rs index 5b24eead34505..1cf01f7f04ecc 100644 --- a/tests/ui/issues/issue-31702.rs +++ b/tests/ui/issues/issue-31702.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-31702-1.rs -// aux-build:issue-31702-2.rs +//@ run-pass +//@ aux-build:issue-31702-1.rs +//@ aux-build:issue-31702-2.rs // this test is actually entirely in the linked library crates diff --git a/tests/ui/issues/issue-31776.rs b/tests/ui/issues/issue-31776.rs index c86623ce2898c..632defbcf273f 100644 --- a/tests/ui/issues/issue-31776.rs +++ b/tests/ui/issues/issue-31776.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Various scenarios in which `pub` is required in blocks diff --git a/tests/ui/issues/issue-32008.rs b/tests/ui/issues/issue-32008.rs index 6c2e206796fc0..9075085bab746 100644 --- a/tests/ui/issues/issue-32008.rs +++ b/tests/ui/issues/issue-32008.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Tests that binary operators allow subtyping on both the LHS and RHS, diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed index 4fc5f64ff9a45..abcef9fcbd9d4 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Foo(u8); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs index 3c4859f07a2e7..920ec34841920 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Foo(u8); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed index cee0e59297657..db406a4c3ac1e 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Bar(u8); struct Foo(Bar); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs index 39e9df4224e74..74242931b4e73 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Bar(u8); struct Foo(Bar); diff --git a/tests/ui/issues/issue-3220.rs b/tests/ui/issues/issue-3220.rs index 7dc672edb54bb..62a979b47c7f8 100644 --- a/tests/ui/issues/issue-3220.rs +++ b/tests/ui/issues/issue-3220.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct thing { x: isize, } diff --git a/tests/ui/issues/issue-32292.rs b/tests/ui/issues/issue-32292.rs index 99b865391de57..2181dff505ace 100644 --- a/tests/ui/issues/issue-32292.rs +++ b/tests/ui/issues/issue-32292.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(warnings)] #[derive(Hash, Ord, PartialOrd, Eq, PartialEq, Debug, Clone, Copy)] diff --git a/tests/ui/issues/issue-32324.rs b/tests/ui/issues/issue-32324.rs index 2df547b2e0c92..50ecfe993d438 100644 --- a/tests/ui/issues/issue-32324.rs +++ b/tests/ui/issues/issue-32324.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Resources { diff --git a/tests/ui/issues/issue-32377.rs b/tests/ui/issues/issue-32377.rs index 555f6abd791ac..6e4a7661a237e 100644 --- a/tests/ui/issues/issue-32377.rs +++ b/tests/ui/issues/issue-32377.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" use std::mem; use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-32389.rs b/tests/ui/issues/issue-32389.rs index cc94cc819d665..683c4874e8c20 100644 --- a/tests/ui/issues/issue-32389.rs +++ b/tests/ui/issues/issue-32389.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> T { loop {} } fn test() { diff --git a/tests/ui/issues/issue-32518.rs b/tests/ui/issues/issue-32518.rs index 808b40f71b398..45a882850c009 100644 --- a/tests/ui/issues/issue-32518.rs +++ b/tests/ui/issues/issue-32518.rs @@ -1,8 +1,8 @@ -// run-pass -// no-prefer-dynamic -// aux-build:cgu_test.rs -// aux-build:cgu_test_a.rs -// aux-build:cgu_test_b.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:cgu_test.rs +//@ aux-build:cgu_test_a.rs +//@ aux-build:cgu_test_b.rs extern crate cgu_test_a; extern crate cgu_test_b; diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/issues/issue-32797.rs index b12b929f8fcf8..6711a8f9fe58a 100644 --- a/tests/ui/issues/issue-32797.rs +++ b/tests/ui/issues/issue-32797.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub use bar::*; mod bar { diff --git a/tests/ui/issues/issue-32805.rs b/tests/ui/issues/issue-32805.rs index 23c19473903bc..717c00a248ad4 100644 --- a/tests/ui/issues/issue-32805.rs +++ b/tests/ui/issues/issue-32805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn const_mir() -> f32 { 9007199791611905.0 } fn main() { diff --git a/tests/ui/issues/issue-3290.rs b/tests/ui/issues/issue-3290.rs index 7014d517f181e..50c432288ce18 100644 --- a/tests/ui/issues/issue-3290.rs +++ b/tests/ui/issues/issue-3290.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-33187.rs b/tests/ui/issues/issue-33187.rs index 8db9e00588564..6a039527b3b37 100644 --- a/tests/ui/issues/issue-33187.rs +++ b/tests/ui/issues/issue-33187.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(::Data); diff --git a/tests/ui/issues/issue-33202.rs b/tests/ui/issues/issue-33202.rs index 11b89ae1b47b5..3fef98606afab 100644 --- a/tests/ui/issues/issue-33202.rs +++ b/tests/ui/issues/issue-33202.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(C)] pub enum CPOption { PSome(T), diff --git a/tests/ui/issues/issue-33241.rs b/tests/ui/issues/issue-33241.rs index 5f9f1e4a74211..1c497876a90da 100644 --- a/tests/ui/issues/issue-33241.rs +++ b/tests/ui/issues/issue-33241.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt; diff --git a/tests/ui/issues/issue-33287.rs b/tests/ui/issues/issue-33287.rs index b3f8730578151..4d0f757b7a59f 100644 --- a/tests/ui/issues/issue-33287.rs +++ b/tests/ui/issues/issue-33287.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unconditional_panic)] diff --git a/tests/ui/issues/issue-33387.rs b/tests/ui/issues/issue-33387.rs index 499fa7c1f27ac..5d323612e411c 100644 --- a/tests/ui/issues/issue-33387.rs +++ b/tests/ui/issues/issue-33387.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_attrs)] use std::sync::Arc; diff --git a/tests/ui/issues/issue-33461.rs b/tests/ui/issues/issue-33461.rs index 4e01d4d3061f9..0de05c6687afb 100644 --- a/tests/ui/issues/issue-33461.rs +++ b/tests/ui/issues/issue-33461.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-33687.rs b/tests/ui/issues/issue-33687.rs index ac802ed86dc63..a5693b3aca8e4 100644 --- a/tests/ui/issues/issue-33687.rs +++ b/tests/ui/issues/issue-33687.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures)] #![feature(fn_traits)] diff --git a/tests/ui/issues/issue-33770.rs b/tests/ui/issues/issue-33770.rs index f3c99015b6d82..b4290955be5f1 100644 --- a/tests/ui/issues/issue-33770.rs +++ b/tests/ui/issues/issue-33770.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::{Command, Stdio}; use std::env; diff --git a/tests/ui/issues/issue-3389.rs b/tests/ui/issues/issue-3389.rs index 294a07229fb92..4e73a2cf0015e 100644 --- a/tests/ui/issues/issue-3389.rs +++ b/tests/ui/issues/issue-3389.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-33941.rs b/tests/ui/issues/issue-33941.rs index e3b6dcf55a744..0ad7cbe8efc41 100644 --- a/tests/ui/issues/issue-33941.rs +++ b/tests/ui/issues/issue-33941.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::collections::HashMap; diff --git a/tests/ui/issues/issue-33992.rs b/tests/ui/issues/issue-33992.rs index a6b137ba64594..d1c62c830a93f 100644 --- a/tests/ui/issues/issue-33992.rs +++ b/tests/ui/issues/issue-33992.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-windows -// ignore-macos -// ignore-emscripten common linkage not implemented right now +//@ run-pass +//@ ignore-windows +//@ ignore-macos +//@ ignore-emscripten common linkage not implemented right now #![feature(linkage)] diff --git a/tests/ui/issues/issue-34074.rs b/tests/ui/issues/issue-34074.rs index ca7d7b49a042f..9b3dee11d9b79 100644 --- a/tests/ui/issues/issue-34074.rs +++ b/tests/ui/issues/issue-34074.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure several unnamed function parameters don't conflict with each other trait Tr { diff --git a/tests/ui/issues/issue-3424.rs b/tests/ui/issues/issue-3424.rs index 43d75a6525f9c..4d1a652142032 100644 --- a/tests/ui/issues/issue-3424.rs +++ b/tests/ui/issues/issue-3424.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // rustc --test ignores2.rs && ./ignores2 diff --git a/tests/ui/issues/issue-3429.rs b/tests/ui/issues/issue-3429.rs index 9d94c3ff61c48..38ea7df1aa030 100644 --- a/tests/ui/issues/issue-3429.rs +++ b/tests/ui/issues/issue-3429.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = 1_usize; diff --git a/tests/ui/issues/issue-34418.rs b/tests/ui/issues/issue-34418.rs index 6132f744b50a9..0dcefb019359f 100644 --- a/tests/ui/issues/issue-34418.rs +++ b/tests/ui/issues/issue-34418.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! make_item { () => { fn f() {} } diff --git a/tests/ui/issues/issue-34427.rs b/tests/ui/issues/issue-34427.rs index a14b5b9e278b8..519e839ad5f41 100644 --- a/tests/ui/issues/issue-34427.rs +++ b/tests/ui/issues/issue-34427.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #34427: On ARM, the code in `foo` at one time was generating // a machine code instruction of the form: `str r0, [r0, rN]!` (for // some N), which is not legal because the source register and base diff --git a/tests/ui/issues/issue-3447.rs b/tests/ui/issues/issue-3447.rs index ee5b22778117e..ab844b0bb9061 100644 --- a/tests/ui/issues/issue-3447.rs +++ b/tests/ui/issues/issue-3447.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-34503.rs b/tests/ui/issues/issue-34503.rs index d2c95d990ecde..68d84bae3d859 100644 --- a/tests/ui/issues/issue-34503.rs +++ b/tests/ui/issues/issue-34503.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { struct X; trait Foo { diff --git a/tests/ui/issues/issue-34569.rs b/tests/ui/issues/issue-34569.rs index 1f68560509e8c..25b2e7fbe1608 100644 --- a/tests/ui/issues/issue-34569.rs +++ b/tests/ui/issues/issue-34569.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-g +//@ run-pass +//@ compile-flags:-g // In this test we just want to make sure that the code below does not lead to // a debuginfo verification assertion during compilation. This was caused by the diff --git a/tests/ui/issues/issue-34571.rs b/tests/ui/issues/issue-34571.rs index c392f59d8da4a..1242a9e2b5c01 100644 --- a/tests/ui/issues/issue-34571.rs +++ b/tests/ui/issues/issue-34571.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(u8)] enum Foo { Foo(#[allow(dead_code)] u8), diff --git a/tests/ui/issues/issue-34751.rs b/tests/ui/issues/issue-34751.rs index 6309c0a025723..1e842049b14c1 100644 --- a/tests/ui/issues/issue-34751.rs +++ b/tests/ui/issues/issue-34751.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // #34751 ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)' diff --git a/tests/ui/issues/issue-34780.rs b/tests/ui/issues/issue-34780.rs index fbedad35b864a..ee5cc0750dceb 100644 --- a/tests/ui/issues/issue-34780.rs +++ b/tests/ui/issues/issue-34780.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(stable_features)] #![feature(associated_consts)] diff --git a/tests/ui/issues/issue-34796.rs b/tests/ui/issues/issue-34796.rs index 88d5c50a27d29..1a417b3483068 100644 --- a/tests/ui/issues/issue-34796.rs +++ b/tests/ui/issues/issue-34796.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test case exposes conditions where the encoding of a trait object type // with projection predicates would differ between this crate and the upstream @@ -8,7 +8,7 @@ // the symbol name. // The fix was to make the order in which predicates get encoded stable. -// aux-build:issue-34796-aux.rs +//@ aux-build:issue-34796-aux.rs extern crate issue_34796_aux; fn mk() -> T { loop {} } diff --git a/tests/ui/issues/issue-34839.rs b/tests/ui/issues/issue-34839.rs index 8ffed827e9087..73edba5817af3 100644 --- a/tests/ui/issues/issue-34839.rs +++ b/tests/ui/issues/issue-34839.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait RegularExpression: Sized { type Text; diff --git a/tests/ui/issues/issue-3500.rs b/tests/ui/issues/issue-3500.rs index 7b39cc16cab4a..038707ef1ecc7 100644 --- a/tests/ui/issues/issue-3500.rs +++ b/tests/ui/issues/issue-3500.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = &Some(1); diff --git a/tests/ui/issues/issue-3521-2.fixed b/tests/ui/issues/issue-3521-2.fixed index 140c24b9395ca..2a6e0829bc0f5 100644 --- a/tests/ui/issues/issue-3521-2.fixed +++ b/tests/ui/issues/issue-3521-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 100; diff --git a/tests/ui/issues/issue-3521-2.rs b/tests/ui/issues/issue-3521-2.rs index f66efec45e549..bd82202006545 100644 --- a/tests/ui/issues/issue-3521-2.rs +++ b/tests/ui/issues/issue-3521-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 100; diff --git a/tests/ui/issues/issue-35423.rs b/tests/ui/issues/issue-35423.rs index 202ffcc1d0d61..c43d35fea7837 100644 --- a/tests/ui/issues/issue-35423.rs +++ b/tests/ui/issues/issue-35423.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main () { let x = 4; match x { diff --git a/tests/ui/issues/issue-3556.rs b/tests/ui/issues/issue-3556.rs index 3c1934ade3555..72fd46e0a4a1c 100644 --- a/tests/ui/issues/issue-3556.rs +++ b/tests/ui/issues/issue-3556.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] diff --git a/tests/ui/issues/issue-3559.rs b/tests/ui/issues/issue-3559.rs index 9d498584a9d1d..ffb937cf5d253 100644 --- a/tests/ui/issues/issue-3559.rs +++ b/tests/ui/issues/issue-3559.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; fn check_strs(actual: &str, expected: &str) -> bool { diff --git a/tests/ui/issues/issue-35600.rs b/tests/ui/issues/issue-35600.rs index f0bab6010d724..40df0b6dfd890 100644 --- a/tests/ui/issues/issue-35600.rs +++ b/tests/ui/issues/issue-35600.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-3563-3.rs b/tests/ui/issues/issue-3563-3.rs index 6346b82167cb8..a28198e7dbf61 100644 --- a/tests/ui/issues/issue-3563-3.rs +++ b/tests/ui/issues/issue-3563-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-3574.rs b/tests/ui/issues/issue-3574.rs index eb967577ffb1a..36c1e2ad93ee8 100644 --- a/tests/ui/issues/issue-3574.rs +++ b/tests/ui/issues/issue-3574.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs diff --git a/tests/ui/issues/issue-35815.rs b/tests/ui/issues/issue-35815.rs index 05fd1b15d43d0..1a09d8041e459 100644 --- a/tests/ui/issues/issue-35815.rs +++ b/tests/ui/issues/issue-35815.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/issues/issue-35976.rs b/tests/ui/issues/issue-35976.rs index aa6f74cb5d45a..8249da4a01d16 100644 --- a/tests/ui/issues/issue-35976.rs +++ b/tests/ui/issues/issue-35976.rs @@ -1,5 +1,5 @@ -// revisions: imported unimported -//[imported] check-pass +//@ revisions: imported unimported +//@[imported] check-pass mod private { pub trait Future { diff --git a/tests/ui/issues/issue-36023.rs b/tests/ui/issues/issue-36023.rs index 64d92bf8c3ca8..32e8af65c7d11 100644 --- a/tests/ui/issues/issue-36023.rs +++ b/tests/ui/issues/issue-36023.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::ops::Deref; diff --git a/tests/ui/issues/issue-36036-associated-type-layout.rs b/tests/ui/issues/issue-36036-associated-type-layout.rs index 022f9a5d556f1..63f9927c67826 100644 --- a/tests/ui/issues/issue-36036-associated-type-layout.rs +++ b/tests/ui/issues/issue-36036-associated-type-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 36036: computing the layout of a type composed from another // trait's associated type caused compiler to ICE when the associated // type was allowed to be unsized, even though the known instantiated diff --git a/tests/ui/issues/issue-36075.rs b/tests/ui/issues/issue-36075.rs index bc5bdc3ff9ef7..a563332ad78e9 100644 --- a/tests/ui/issues/issue-36075.rs +++ b/tests/ui/issues/issue-36075.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait DeclarationParser { type Declaration; diff --git a/tests/ui/issues/issue-3609.rs b/tests/ui/issues/issue-3609.rs index 57ff12a08ce3c..a226e5b01362a 100644 --- a/tests/ui/issues/issue-3609.rs +++ b/tests/ui/issues/issue-3609.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/tests/ui/issues/issue-36116.rs b/tests/ui/issues/issue-36116.rs index c7c70c7afe743..2313e189aff7d 100644 --- a/tests/ui/issues/issue-36116.rs +++ b/tests/ui/issues/issue-36116.rs @@ -1,6 +1,6 @@ // Unnecessary path disambiguator is ok -// check-pass +//@ check-pass macro_rules! m { ($p: path) => { diff --git a/tests/ui/issues/issue-36260.rs b/tests/ui/issues/issue-36260.rs index d96dc80ea719c..265b0d2f80217 100644 --- a/tests/ui/issues/issue-36260.rs +++ b/tests/ui/issues/issue-36260.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure this compiles without getting a linker error because of missing // drop-glue because the collector missed adding drop-glue for the closure: diff --git a/tests/ui/issues/issue-36278-prefix-nesting.rs b/tests/ui/issues/issue-36278-prefix-nesting.rs index 5f476932018c5..3f2ca7a246064 100644 --- a/tests/ui/issues/issue-36278-prefix-nesting.rs +++ b/tests/ui/issues/issue-36278-prefix-nesting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 36278: On an unsized struct with >1 level of nontrivial // nesting, ensure we are computing dynamic size of prefix correctly. diff --git a/tests/ui/issues/issue-36379.rs b/tests/ui/issues/issue-36379.rs index 3a3e6f47067d9..6e275b03a7029 100644 --- a/tests/ui/issues/issue-36379.rs +++ b/tests/ui/issues/issue-36379.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn _test() -> impl Default { } diff --git a/tests/ui/issues/issue-36401.rs b/tests/ui/issues/issue-36401.rs index f51197b01c7ed..d5aa24e71492a 100644 --- a/tests/ui/issues/issue-36401.rs +++ b/tests/ui/issues/issue-36401.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] pub enum Event { Key(u8), diff --git a/tests/ui/issues/issue-36474.rs b/tests/ui/issues/issue-36474.rs index 90ee5b3cd4b26..ddfa1829e3afc 100644 --- a/tests/ui/issues/issue-36474.rs +++ b/tests/ui/issues/issue-36474.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { remove_axis(&3, 0); } diff --git a/tests/ui/issues/issue-3656.rs b/tests/ui/issues/issue-3656.rs index 4a9f94306d5b8..ff3b782ade926 100644 --- a/tests/ui/issues/issue-3656.rs +++ b/tests/ui/issues/issue-3656.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] // Issue #3656 // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test with +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test with #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed index a95781c6edc82..bf100755b9068 100644 --- a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed +++ b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] fn f(x:isize) { let child: isize = x + 1; diff --git a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs index 8aa0897ecb4dc..375178172bb08 100644 --- a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs +++ b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] fn f(x:isize) { static child: isize = x + 1; diff --git a/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs b/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs index 34bbb66d979a2..8fcd0c3f41c9a 100644 --- a/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs +++ b/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This tests for an ICE (and, if ignored, subsequent LLVM abort) when // a lifetime-parametric fn is passed into a context whose expected // type has a differing lifetime parameterization. diff --git a/tests/ui/issues/issue-36786-resolve-call.rs b/tests/ui/issues/issue-36786-resolve-call.rs index e5341ba7dbedd..de7b0e18d5210 100644 --- a/tests/ui/issues/issue-36786-resolve-call.rs +++ b/tests/ui/issues/issue-36786-resolve-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that types that rely on obligations are autoderefed // correctly diff --git a/tests/ui/issues/issue-36816.rs b/tests/ui/issues/issue-36816.rs index 54690b43c46ef..d15a9c7abe15b 100644 --- a/tests/ui/issues/issue-36816.rs +++ b/tests/ui/issues/issue-36816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! m { () => { 1 } } macro_rules! n { () => { 1 + m!() } } diff --git a/tests/ui/issues/issue-36839.rs b/tests/ui/issues/issue-36839.rs index ca3d66b1c8eb7..654c0f6e4b54a 100644 --- a/tests/ui/issues/issue-36839.rs +++ b/tests/ui/issues/issue-36839.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/issues/issue-36856.rs b/tests/ui/issues/issue-36856.rs index f2dfaf3dd367e..afeba012fa0d6 100644 --- a/tests/ui/issues/issue-36856.rs +++ b/tests/ui/issues/issue-36856.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for #36856. -// compile-flags:-g +//@ compile-flags:-g fn g() -> bool { false diff --git a/tests/ui/issues/issue-36936.rs b/tests/ui/issues/issue-36936.rs index 486a422b754ce..4fbac00212672 100644 --- a/tests/ui/issues/issue-36936.rs +++ b/tests/ui/issues/issue-36936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that casts are not being treated as lexprs. fn main() { diff --git a/tests/ui/issues/issue-36954.rs b/tests/ui/issues/issue-36954.rs index 56ff9926ef11b..411e99b603da4 100644 --- a/tests/ui/issues/issue-36954.rs +++ b/tests/ui/issues/issue-36954.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-36954.rs +//@ run-pass +//@ aux-build:issue-36954.rs extern crate issue_36954 as lib; diff --git a/tests/ui/issues/issue-3702.rs b/tests/ui/issues/issue-3702.rs index f48d549b3eb2c..bb79e3a7f9384 100644 --- a/tests/ui/issues/issue-3702.rs +++ b/tests/ui/issues/issue-3702.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-37051.rs b/tests/ui/issues/issue-37051.rs index 9cae6cf5e7665..fa9cc5964fe1f 100644 --- a/tests/ui/issues/issue-37051.rs +++ b/tests/ui/issues/issue-37051.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/issues/issue-37109.rs b/tests/ui/issues/issue-37109.rs index 1e57d5f95e8de..5276266523d8d 100644 --- a/tests/ui/issues/issue-37109.rs +++ b/tests/ui/issues/issue-37109.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ToRef<'a> { type Ref: 'a; } diff --git a/tests/ui/issues/issue-37131.rs b/tests/ui/issues/issue-37131.rs index ac2d1d1ed8b73..3ea14672e239a 100644 --- a/tests/ui/issues/issue-37131.rs +++ b/tests/ui/issues/issue-37131.rs @@ -1,9 +1,9 @@ // Tests that compiling for a target which is not installed will result in a helpful // error message. -// compile-flags: --target=thumbv6m-none-eabi -// ignore-arm -// needs-llvm-components: arm +//@ compile-flags: --target=thumbv6m-none-eabi +//@ ignore-arm +//@ needs-llvm-components: arm -// error-pattern:target may not be installed +//@ error-pattern:target may not be installed fn main() { } diff --git a/tests/ui/issues/issue-37291/main.rs b/tests/ui/issues/issue-37291/main.rs index 6fb6b50da2038..86571353295c0 100644 --- a/tests/ui/issues/issue-37291/main.rs +++ b/tests/ui/issues/issue-37291/main.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:lib.rs +//@ aux-build:lib.rs // Regression test for #37291. The problem was that the starting // environment for a specialization check was not including the diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs index c109be005238f..1646f16e1ecea 100644 --- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs +++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test: ".nll/" -> "/" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" +//@ ignore-compare-mode-next-solver (hangs) trait Mirror { type Image; diff --git a/tests/ui/issues/issue-3743.rs b/tests/ui/issues/issue-3743.rs index 07741914f802c..575445661afbb 100644 --- a/tests/ui/issues/issue-3743.rs +++ b/tests/ui/issues/issue-3743.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // If `Mul` used an associated type for its output, this test would // work more smoothly. diff --git a/tests/ui/issues/issue-37510.rs b/tests/ui/issues/issue-37510.rs index 2081c9f7e26ec..62a90c5604bd9 100644 --- a/tests/ui/issues/issue-37510.rs +++ b/tests/ui/issues/issue-37510.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: &mut i32) -> bool { true } diff --git a/tests/ui/issues/issue-3753.rs b/tests/ui/issues/issue-3753.rs index dc9e42bad97d5..a243ceab83ebe 100644 --- a/tests/ui/issues/issue-3753.rs +++ b/tests/ui/issues/issue-3753.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #3656 // Issue Name: pub method preceded by attribute can't be parsed // Abstract: Visibility parsing failed when compiler parsing diff --git a/tests/ui/issues/issue-37598.rs b/tests/ui/issues/issue-37598.rs index 458e999c3faa2..a3832c2e5888a 100644 --- a/tests/ui/issues/issue-37598.rs +++ b/tests/ui/issues/issue-37598.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn check(list: &[u8]) { match list { diff --git a/tests/ui/issues/issue-37665.rs b/tests/ui/issues/issue-37665.rs index 81ff478aabc63..db74b1f025987 100644 --- a/tests/ui/issues/issue-37665.rs +++ b/tests/ui/issues/issue-37665.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=mir +//@ compile-flags: -Z unpretty=mir use std::path::MAIN_SEPARATOR; diff --git a/tests/ui/issues/issue-37686.rs b/tests/ui/issues/issue-37686.rs index ba58e9e9d8976..5a72f2fc74c2d 100644 --- a/tests/ui/issues/issue-37686.rs +++ b/tests/ui/issues/issue-37686.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { match (0, 0) { (usize::MIN, usize::MAX) => {} diff --git a/tests/ui/issues/issue-37725.rs b/tests/ui/issues/issue-37725.rs index 1c6df0da60c0e..28b4527ebb9a9 100644 --- a/tests/ui/issues/issue-37725.rs +++ b/tests/ui/issues/issue-37725.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // compiler-opts: -Zmir-opt-level=2 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-37733.rs b/tests/ui/issues/issue-37733.rs index e211e2c3336e5..fff42e9fc3c99 100644 --- a/tests/ui/issues/issue-37733.rs +++ b/tests/ui/issues/issue-37733.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] type A = for<> fn(); diff --git a/tests/ui/issues/issue-38160.rs b/tests/ui/issues/issue-38160.rs index 0da8b7900a8a5..0395aea63ee97 100644 --- a/tests/ui/issues/issue-38160.rs +++ b/tests/ui/issues/issue-38160.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MyTrait { const MY_CONST: &'static str; diff --git a/tests/ui/issues/issue-38190.rs b/tests/ui/issues/issue-38190.rs index 3bb4c7b980cac..539d7f2ed3be4 100644 --- a/tests/ui/issues/issue-38190.rs +++ b/tests/ui/issues/issue-38190.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-38190.rs +//@ run-pass +//@ aux-build:issue-38190.rs #[macro_use] extern crate issue_38190; diff --git a/tests/ui/issues/issue-38226.rs b/tests/ui/issues/issue-38226.rs index 3213e3618a88b..d8bd9d64a7c60 100644 --- a/tests/ui/issues/issue-38226.rs +++ b/tests/ui/issues/issue-38226.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass // This test makes sure that we don't run into a linker error because of the // middle::reachable pass missing trait methods with default impls. -// aux-build:issue-38226-aux.rs +//@ aux-build:issue-38226-aux.rs // Need -Cno-prepopulate-passes to really disable inlining, otherwise the faulty // code gets optimized out: -// compile-flags: -Cno-prepopulate-passes -Cpasses=name-anon-globals +//@ compile-flags: -Cno-prepopulate-passes -Cpasses=name-anon-globals extern crate issue_38226_aux; diff --git a/tests/ui/issues/issue-38381.rs b/tests/ui/issues/issue-38381.rs index 82d4a4e325ac0..a51ee78eb76fb 100644 --- a/tests/ui/issues/issue-38381.rs +++ b/tests/ui/issues/issue-38381.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-38437.rs b/tests/ui/issues/issue-38437.rs index e141216906545..2cb1a95619191 100644 --- a/tests/ui/issues/issue-38437.rs +++ b/tests/ui/issues/issue-38437.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that drop elaboration clears the "master" discriminant // drop flag even if it protects no fields. diff --git a/tests/ui/issues/issue-3847.rs b/tests/ui/issues/issue-3847.rs index 16e0b00b39a85..73aaab4183694 100644 --- a/tests/ui/issues/issue-3847.rs +++ b/tests/ui/issues/issue-3847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod buildings { pub struct Tower { pub height: usize } } diff --git a/tests/ui/issues/issue-38556.rs b/tests/ui/issues/issue-38556.rs index 63fd9db08ff2f..b04558707e148 100644 --- a/tests/ui/issues/issue-38556.rs +++ b/tests/ui/issues/issue-38556.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub struct Foo; diff --git a/tests/ui/issues/issue-38727.rs b/tests/ui/issues/issue-38727.rs index 2d418b652699e..6d9c5f30e06fa 100644 --- a/tests/ui/issues/issue-38727.rs +++ b/tests/ui/issues/issue-38727.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #[repr(u64)] enum A { diff --git a/tests/ui/issues/issue-3874.rs b/tests/ui/issues/issue-3874.rs index f9553d88d2410..737f2c69e1edc 100644 --- a/tests/ui/issues/issue-3874.rs +++ b/tests/ui/issues/issue-3874.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum PureCounter { PureCounterVariant(usize) } diff --git a/tests/ui/issues/issue-38763.rs b/tests/ui/issues/issue-38763.rs index a966cf217e165..05cd648dcfe97 100644 --- a/tests/ui/issues/issue-38763.rs +++ b/tests/ui/issues/issue-38763.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #[repr(C)] pub struct Foo(i128); diff --git a/tests/ui/issues/issue-38875/issue-38875.rs b/tests/ui/issues/issue-38875/issue-38875.rs index 124e4d6fd419a..86c1d10e903b2 100644 --- a/tests/ui/issues/issue-38875/issue-38875.rs +++ b/tests/ui/issues/issue-38875/issue-38875.rs @@ -1,5 +1,5 @@ -// aux-build:issue-38875-b.rs -// check-pass +//@ aux-build:issue-38875-b.rs +//@ check-pass extern crate issue_38875_b; diff --git a/tests/ui/issues/issue-3888-2.rs b/tests/ui/issues/issue-3888-2.rs index d1ef914bdeccb..c06d20961c2a5 100644 --- a/tests/ui/issues/issue-3888-2.rs +++ b/tests/ui/issues/issue-3888-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] { &v[1..5] diff --git a/tests/ui/issues/issue-38942.rs b/tests/ui/issues/issue-38942.rs index 308bdd6e28cc4..3f80beb53f357 100644 --- a/tests/ui/issues/issue-38942.rs +++ b/tests/ui/issues/issue-38942.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // See https://github.com/rust-lang/rust/issues/38942 #[repr(u64)] diff --git a/tests/ui/issues/issue-3895.rs b/tests/ui/issues/issue-3895.rs index c560ca60dd3b0..6bd173d48785b 100644 --- a/tests/ui/issues/issue-3895.rs +++ b/tests/ui/issues/issue-3895.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-38987.rs b/tests/ui/issues/issue-38987.rs index cb4e1b0d409db..713fd5027918f 100644 --- a/tests/ui/issues/issue-38987.rs +++ b/tests/ui/issues/issue-38987.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = -0x8000_0000_0000_0000_0000_0000_0000_0000i128; } diff --git a/tests/ui/issues/issue-39089.rs b/tests/ui/issues/issue-39089.rs index c7d4f8bd32065..b00b842380235 100644 --- a/tests/ui/issues/issue-39089.rs +++ b/tests/ui/issues/issue-39089.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] fn f Sized>() {} diff --git a/tests/ui/issues/issue-39175.rs b/tests/ui/issues/issue-39175.rs index 3866e0651c302..ddba8052b5edf 100644 --- a/tests/ui/issues/issue-39175.rs +++ b/tests/ui/issues/issue-39175.rs @@ -3,9 +3,9 @@ // the fix to suggested paths is not platform-dependent and will apply on // these platforms also. -// ignore-windows -// ignore-emscripten -// ignore-sgx no processes +//@ ignore-windows +//@ ignore-emscripten +//@ ignore-sgx no processes use std::process::Command; // use std::os::unix::process::CommandExt; diff --git a/tests/ui/issues/issue-39367.rs b/tests/ui/issues/issue-39367.rs index 039b47ae78078..dd16d4da1bdd2 100644 --- a/tests/ui/issues/issue-39367.rs +++ b/tests/ui/issues/issue-39367.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-39548.rs b/tests/ui/issues/issue-39548.rs index 304e37bf3d6b0..e46114154f9d5 100644 --- a/tests/ui/issues/issue-39548.rs +++ b/tests/ui/issues/issue-39548.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass type Array = [(); ((1 < 2) == false) as usize]; fn main() { diff --git a/tests/ui/issues/issue-39709.rs b/tests/ui/issues/issue-39709.rs index 69ef2700ef367..df3286721f51f 100644 --- a/tests/ui/issues/issue-39709.rs +++ b/tests/ui/issues/issue-39709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] fn main() { println!("{}", { macro_rules! x { ($(t:tt)*) => {} } 33 }); diff --git a/tests/ui/issues/issue-3979-2.rs b/tests/ui/issues/issue-3979-2.rs index 4ec128a4586d4..620090bc3ecd4 100644 --- a/tests/ui/issues/issue-3979-2.rs +++ b/tests/ui/issues/issue-3979-2.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait A { fn a_method(&self); diff --git a/tests/ui/issues/issue-3979-generics.rs b/tests/ui/issues/issue-3979-generics.rs index 519de1cad6ef9..12f6137dd2aff 100644 --- a/tests/ui/issues/issue-3979-generics.rs +++ b/tests/ui/issues/issue-3979-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-3979-xcrate.rs b/tests/ui/issues/issue-3979-xcrate.rs index fcb1f55c32f9c..7660405929bfb 100644 --- a/tests/ui/issues/issue-3979-xcrate.rs +++ b/tests/ui/issues/issue-3979-xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-3979-traits.rs +//@ aux-build:issue-3979-traits.rs extern crate issue_3979_traits; use issue_3979_traits::{Positioned, Movable}; diff --git a/tests/ui/issues/issue-3979.rs b/tests/ui/issues/issue-3979.rs index 72949d8c757ab..238df225f0f34 100644 --- a/tests/ui/issues/issue-3979.rs +++ b/tests/ui/issues/issue-3979.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-39808.rs b/tests/ui/issues/issue-39808.rs index a47013673738c..99e3d9b4bcdfd 100644 --- a/tests/ui/issues/issue-39808.rs +++ b/tests/ui/issues/issue-39808.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // Regression test for #39808. The type parameter of `Owned` was diff --git a/tests/ui/issues/issue-39827.rs b/tests/ui/issues/issue-39827.rs index 782c668c843bf..e3248c9e9ac72 100644 --- a/tests/ui/issues/issue-39827.rs +++ b/tests/ui/issues/issue-39827.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::{ volatile_copy_memory, volatile_store, volatile_load, diff --git a/tests/ui/issues/issue-3991.rs b/tests/ui/issues/issue-3991.rs index 4851eddf53354..97bddb9250a06 100644 --- a/tests/ui/issues/issue-3991.rs +++ b/tests/ui/issues/issue-3991.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct HasNested { nest: Vec > , diff --git a/tests/ui/issues/issue-39984.rs b/tests/ui/issues/issue-39984.rs index 1c9ae26cab22e..eff5d69bf84b1 100644 --- a/tests/ui/issues/issue-39984.rs +++ b/tests/ui/issues/issue-39984.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unreachable_code)] // Regression test for issue #39984. diff --git a/tests/ui/issues/issue-40136.rs b/tests/ui/issues/issue-40136.rs index 29d3fc2d56026..d5ccebdc85d1f 100644 --- a/tests/ui/issues/issue-40136.rs +++ b/tests/ui/issues/issue-40136.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] macro_rules! m { () => { 0 } } diff --git a/tests/ui/issues/issue-40235.rs b/tests/ui/issues/issue-40235.rs index 0f799c3503f39..2bdbb2f229e1f 100644 --- a/tests/ui/issues/issue-40235.rs +++ b/tests/ui/issues/issue-40235.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn foo() {} diff --git a/tests/ui/issues/issue-4025.rs b/tests/ui/issues/issue-4025.rs index dc534c64c6040..c75421fb82f15 100644 --- a/tests/ui/issues/issue-4025.rs +++ b/tests/ui/issues/issue-4025.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_mut)] /* diff --git a/tests/ui/issues/issue-40350.rs b/tests/ui/issues/issue-40350.rs index a39a8519aa986..50d74f27b6350 100644 --- a/tests/ui/issues/issue-40350.rs +++ b/tests/ui/issues/issue-40350.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E { A = { diff --git a/tests/ui/issues/issue-40408.rs b/tests/ui/issues/issue-40408.rs index 81acc41cb8335..a1c1c58218132 100644 --- a/tests/ui/issues/issue-40408.rs +++ b/tests/ui/issues/issue-40408.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", 0E+10); println!("{}", 0e+10); diff --git a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs index 3ae84be05783f..9ce54862265dc 100644 --- a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs +++ b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] fn f() { diff --git a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs index 48bb8d36f5552..771502894f13c 100644 --- a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs +++ b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] fn f() { diff --git a/tests/ui/issues/issue-40782.fixed b/tests/ui/issues/issue-40782.fixed index 305a9c3292a4c..ff376b5a52c5f 100644 --- a/tests/ui/issues/issue-40782.fixed +++ b/tests/ui/issues/issue-40782.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _i in 0..2 { //~ ERROR missing `in` diff --git a/tests/ui/issues/issue-40782.rs b/tests/ui/issues/issue-40782.rs index 43460ec1535ce..28c12aec665ad 100644 --- a/tests/ui/issues/issue-40782.rs +++ b/tests/ui/issues/issue-40782.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _i 0..2 { //~ ERROR missing `in` diff --git a/tests/ui/issues/issue-40883.rs b/tests/ui/issues/issue-40883.rs index 8a4aef46dd514..a4646d67c6847 100644 --- a/tests/ui/issues/issue-40883.rs +++ b/tests/ui/issues/issue-40883.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check that we don't have linear stack usage with multiple calls to `push` diff --git a/tests/ui/issues/issue-40951.rs b/tests/ui/issues/issue-40951.rs index 49171eba6b3c4..e99fe76c08527 100644 --- a/tests/ui/issues/issue-40951.rs +++ b/tests/ui/issues/issue-40951.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for #40951. diff --git a/tests/ui/issues/issue-41053.rs b/tests/ui/issues/issue-41053.rs index 967edfd441576..f46bf6b4aa168 100644 --- a/tests/ui/issues/issue-41053.rs +++ b/tests/ui/issues/issue-41053.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-41053.rs +//@ run-pass +//@ aux-build:issue-41053.rs pub trait Trait { fn foo(&self) {} } diff --git a/tests/ui/issues/issue-41213.rs b/tests/ui/issues/issue-41213.rs index 5c91bf71102d9..97f80a99a8322 100644 --- a/tests/ui/issues/issue-41213.rs +++ b/tests/ui/issues/issue-41213.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum A { A1, diff --git a/tests/ui/issues/issue-41272.rs b/tests/ui/issues/issue-41272.rs index 1f4da46f8944c..255bbfe90a15d 100644 --- a/tests/ui/issues/issue-41272.rs +++ b/tests/ui/issues/issue-41272.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo; diff --git a/tests/ui/issues/issue-41298.rs b/tests/ui/issues/issue-41298.rs index a1b4de39bee4c..6008110712348 100644 --- a/tests/ui/issues/issue-41298.rs +++ b/tests/ui/issues/issue-41298.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Function { t: T, f: F } diff --git a/tests/ui/issues/issue-41479.rs b/tests/ui/issues/issue-41479.rs index 6daaf440e4b7b..c8ebad6c5e071 100644 --- a/tests/ui/issues/issue-41479.rs +++ b/tests/ui/issues/issue-41479.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn split(pair: (A, B)) { let _a = pair.0; let _b = pair.1; diff --git a/tests/ui/issues/issue-41498.rs b/tests/ui/issues/issue-41498.rs index ad918ecddebb3..57f36b27d3c25 100644 --- a/tests/ui/issues/issue-41498.rs +++ b/tests/ui/issues/issue-41498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // regression test for issue #41498. struct S; diff --git a/tests/ui/issues/issue-41549.rs b/tests/ui/issues/issue-41549.rs index d19926a541af2..8f57515415c6e 100644 --- a/tests/ui/issues/issue-41549.rs +++ b/tests/ui/issues/issue-41549.rs @@ -1,4 +1,4 @@ -// aux-build:issue-41549.rs +//@ aux-build:issue-41549.rs extern crate issue_41549; diff --git a/tests/ui/issues/issue-41604.rs b/tests/ui/issues/issue-41604.rs index 11a1cc25b712a..3cd16a2a598ba 100644 --- a/tests/ui/issues/issue-41604.rs +++ b/tests/ui/issues/issue-41604.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct B; impl B { diff --git a/tests/ui/issues/issue-41628.rs b/tests/ui/issues/issue-41628.rs index 92159824eb0e2..255e4243e0119 100644 --- a/tests/ui/issues/issue-41628.rs +++ b/tests/ui/issues/issue-41628.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] #[used] diff --git a/tests/ui/issues/issue-41652/issue-41652.rs b/tests/ui/issues/issue-41652/issue-41652.rs index d8a6f4c8d9d04..34518d906a677 100644 --- a/tests/ui/issues/issue-41652/issue-41652.rs +++ b/tests/ui/issues/issue-41652/issue-41652.rs @@ -1,4 +1,4 @@ -// aux-build:issue-41652-b.rs +//@ aux-build:issue-41652-b.rs extern crate issue_41652_b; diff --git a/tests/ui/issues/issue-41677.rs b/tests/ui/issues/issue-41677.rs index afddbc799b773..211d1176363f5 100644 --- a/tests/ui/issues/issue-41677.rs +++ b/tests/ui/issues/issue-41677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #41677. The local variable was winding up with // a type `Receiver` where `?T` was unconstrained, because we // failed to enforce the WF obligations and `?T` is a bivariant type diff --git a/tests/ui/issues/issue-41696.rs b/tests/ui/issues/issue-41696.rs index d094f71942fb7..0b01efe7a7b13 100644 --- a/tests/ui/issues/issue-41696.rs +++ b/tests/ui/issues/issue-41696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![recursion_limit = "128"] diff --git a/tests/ui/issues/issue-41744.rs b/tests/ui/issues/issue-41744.rs index dcdd1c21ee527..af360d9580771 100644 --- a/tests/ui/issues/issue-41744.rs +++ b/tests/ui/issues/issue-41744.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tc {} impl Tc for bool {} diff --git a/tests/ui/issues/issue-41849-variance-req.rs b/tests/ui/issues/issue-41849-variance-req.rs index af081083a35e1..1da844ab4bf0b 100644 --- a/tests/ui/issues/issue-41849-variance-req.rs +++ b/tests/ui/issues/issue-41849-variance-req.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #41849. diff --git a/tests/ui/issues/issue-41888.rs b/tests/ui/issues/issue-41888.rs index 32df520f2794f..12d617bafc396 100644 --- a/tests/ui/issues/issue-41888.rs +++ b/tests/ui/issues/issue-41888.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = g(Some(E::F(K))); } type R = Result<(), ()>; diff --git a/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs b/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs index 3d678ba041b4e..2a2b88410959c 100644 --- a/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs +++ b/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #41936. The coerce-unsized trait check in // coherence was using subtyping, which triggered variance diff --git a/tests/ui/issues/issue-41998.rs b/tests/ui/issues/issue-41998.rs index 7696a3108d1da..303bf7a575138 100644 --- a/tests/ui/issues/issue-41998.rs +++ b/tests/ui/issues/issue-41998.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { diff --git a/tests/ui/issues/issue-42007.rs b/tests/ui/issues/issue-42007.rs index a477e476eb9f6..b8ea7e871a736 100644 --- a/tests/ui/issues/issue-42007.rs +++ b/tests/ui/issues/issue-42007.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-42007-s.rs +//@ aux-build:issue-42007-s.rs extern crate issue_42007_s; diff --git a/tests/ui/issues/issue-4208.rs b/tests/ui/issues/issue-4208.rs index 3b01811a9e80e..1691bec980b26 100644 --- a/tests/ui/issues/issue-4208.rs +++ b/tests/ui/issues/issue-4208.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-4208-cc.rs +//@ aux-build:issue-4208-cc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate numeric; use numeric::{sin, Angle}; diff --git a/tests/ui/issues/issue-42148.rs b/tests/ui/issues/issue-42148.rs index cb8c0d6edb6e1..f2c4e484e5b37 100644 --- a/tests/ui/issues/issue-42148.rs +++ b/tests/ui/issues/issue-42148.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Zst; fn main() { diff --git a/tests/ui/issues/issue-42210.rs b/tests/ui/issues/issue-42210.rs index 318e3099f98ba..cec32c97375e0 100644 --- a/tests/ui/issues/issue-42210.rs +++ b/tests/ui/issues/issue-42210.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for #42210. -// compile-flags: -g +//@ compile-flags: -g trait Foo { fn foo() { } diff --git a/tests/ui/issues/issue-4228.rs b/tests/ui/issues/issue-4228.rs index 491000b6510a8..8ae8a84dac972 100644 --- a/tests/ui/issues/issue-4228.rs +++ b/tests/ui/issues/issue-4228.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/issues/issue-42453.rs b/tests/ui/issues/issue-42453.rs index 92fefceabc131..9ed9080e8a92e 100644 --- a/tests/ui/issues/issue-42453.rs +++ b/tests/ui/issues/issue-42453.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-42467.rs b/tests/ui/issues/issue-42467.rs index afa1bcd13fc82..6e0f294d802e7 100644 --- a/tests/ui/issues/issue-42467.rs +++ b/tests/ui/issues/issue-42467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo(T); diff --git a/tests/ui/issues/issue-4252.rs b/tests/ui/issues/issue-4252.rs index 9b82121baa289..1939ad15f143a 100644 --- a/tests/ui/issues/issue-4252.rs +++ b/tests/ui/issues/issue-4252.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait X { fn call(&self, x: &T); fn default_method(&self, x: &T) { diff --git a/tests/ui/issues/issue-42552.rs b/tests/ui/issues/issue-42552.rs index 50d28a2f0c60d..998cde44be015 100644 --- a/tests/ui/issues/issue-42552.rs +++ b/tests/ui/issues/issue-42552.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for an obscure issue with the projection cache. fn into_iter(a: &I) -> Groups { diff --git a/tests/ui/issues/issue-42956.rs b/tests/ui/issues/issue-42956.rs index e6b3f9ffab73c..a124ca84f3c34 100644 --- a/tests/ui/issues/issue-42956.rs +++ b/tests/ui/issues/issue-42956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(stable_features)] #![feature(associated_consts)] diff --git a/tests/ui/issues/issue-43057.rs b/tests/ui/issues/issue-43057.rs index 4ce52af434c0c..4dd1fe461f1b4 100644 --- a/tests/ui/issues/issue-43057.rs +++ b/tests/ui/issues/issue-43057.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] macro_rules! column { diff --git a/tests/ui/issues/issue-43205.rs b/tests/ui/issues/issue-43205.rs index f47d5a347bb11..9f54d4258bf1d 100644 --- a/tests/ui/issues/issue-43205.rs +++ b/tests/ui/issues/issue-43205.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = &&[()][0]; println!("{:?}", &[(),()][1]); diff --git a/tests/ui/issues/issue-43291.rs b/tests/ui/issues/issue-43291.rs index 52b629e35c8b8..e3fea3c942601 100644 --- a/tests/ui/issues/issue-43291.rs +++ b/tests/ui/issues/issue-43291.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!(!0usize as *const (), foo(0, 1)); assert_eq!(!0usize as *const (), (0i8 - 1) as *const ()); diff --git a/tests/ui/issues/issue-4333.rs b/tests/ui/issues/issue-4333.rs index 3df319b683f47..9b45e1665beac 100644 --- a/tests/ui/issues/issue-4333.rs +++ b/tests/ui/issues/issue-4333.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::io; diff --git a/tests/ui/issues/issue-43357.rs b/tests/ui/issues/issue-43357.rs index 474c9765595b0..fd20bac804074 100644 --- a/tests/ui/issues/issue-43357.rs +++ b/tests/ui/issues/issue-43357.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Trait { type Output; diff --git a/tests/ui/issues/issue-43483.rs b/tests/ui/issues/issue-43483.rs index 76dd1c2eb5817..2c62671d0c711 100644 --- a/tests/ui/issues/issue-43483.rs +++ b/tests/ui/issues/issue-43483.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] trait VecN { diff --git a/tests/ui/issues/issue-43692.rs b/tests/ui/issues/issue-43692.rs index a9999c2265191..abd1f56d4223b 100644 --- a/tests/ui/issues/issue-43692.rs +++ b/tests/ui/issues/issue-43692.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!('\u{10__FFFF}', '\u{10FFFF}'); assert_eq!("\u{10_F0FF__}foo\u{1_0_0_0__}", "\u{10F0FF}foo\u{1000}"); diff --git a/tests/ui/issues/issue-43806.rs b/tests/ui/issues/issue-43806.rs index 8c8cccfb2bb82..7d90715bcc34c 100644 --- a/tests/ui/issues/issue-43806.rs +++ b/tests/ui/issues/issue-43806.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_results)] diff --git a/tests/ui/issues/issue-43853.rs b/tests/ui/issues/issue-43853.rs index dd42c1e3cb831..ed07314531c3d 100644 --- a/tests/ui/issues/issue-43853.rs +++ b/tests/ui/issues/issue-43853.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::panic; diff --git a/tests/ui/issues/issue-4387.rs b/tests/ui/issues/issue-4387.rs index 84592f16a4ca9..1299c4fcc3a8d 100644 --- a/tests/ui/issues/issue-4387.rs +++ b/tests/ui/issues/issue-4387.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _foo = [0; 2*4]; diff --git a/tests/ui/issues/issue-43910.rs b/tests/ui/issues/issue-43910.rs index d8c8773293030..041147dc49ddb 100644 --- a/tests/ui/issues/issue-43910.rs +++ b/tests/ui/issues/issue-43910.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-43923.rs b/tests/ui/issues/issue-43923.rs index ad35a668554bd..4cd46b6ca6025 100644 --- a/tests/ui/issues/issue-43923.rs +++ b/tests/ui/issues/issue-43923.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] struct A { ptr: T } diff --git a/tests/ui/issues/issue-44056.rs b/tests/ui/issues/issue-44056.rs index a4903ed2cb427..12e4f018466f0 100644 --- a/tests/ui/issues/issue-44056.rs +++ b/tests/ui/issues/issue-44056.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(55996): should be run on targets supporting avx) -// only-x86_64 -// no-prefer-dynamic -// compile-flags: -Ctarget-feature=+avx -Clto +//@ build-pass (FIXME(55996): should be run on targets supporting avx) +//@ only-x86_64 +//@ no-prefer-dynamic +//@ compile-flags: -Ctarget-feature=+avx -Clto fn main() {} diff --git a/tests/ui/issues/issue-44216-add-instant.rs b/tests/ui/issues/issue-44216-add-instant.rs index 78cfecf2f32f0..1db0adedcf51b 100644 --- a/tests/ui/issues/issue-44216-add-instant.rs +++ b/tests/ui/issues/issue-44216-add-instant.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-add-system-time.rs b/tests/ui/issues/issue-44216-add-system-time.rs index 7e9a3f802ec89..207f72fade813 100644 --- a/tests/ui/issues/issue-44216-add-system-time.rs +++ b/tests/ui/issues/issue-44216-add-system-time.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44216-sub-instant.rs b/tests/ui/issues/issue-44216-sub-instant.rs index e40f80d449d96..2457d2aaa0446 100644 --- a/tests/ui/issues/issue-44216-sub-instant.rs +++ b/tests/ui/issues/issue-44216-sub-instant.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-sub-system-time.rs b/tests/ui/issues/issue-44216-sub-system-time.rs index 2c5a000fab692..7e33f22793374 100644 --- a/tests/ui/issues/issue-44216-sub-system-time.rs +++ b/tests/ui/issues/issue-44216-sub-system-time.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44239.fixed b/tests/ui/issues/issue-44239.fixed index e6c29cee97d2f..5466726fc9d4b 100644 --- a/tests/ui/issues/issue-44239.fixed +++ b/tests/ui/issues/issue-44239.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, non_upper_case_globals)] fn main() { const n: usize = 0; diff --git a/tests/ui/issues/issue-44239.rs b/tests/ui/issues/issue-44239.rs index 482ed194c7a1c..b07c3f6dbeffc 100644 --- a/tests/ui/issues/issue-44239.rs +++ b/tests/ui/issues/issue-44239.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, non_upper_case_globals)] fn main() { let n: usize = 0; diff --git a/tests/ui/issues/issue-44247.rs b/tests/ui/issues/issue-44247.rs index 3544880fade1c..1ddd5a6dc0b3f 100644 --- a/tests/ui/issues/issue-44247.rs +++ b/tests/ui/issues/issue-44247.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait T { type X; diff --git a/tests/ui/issues/issue-4464.rs b/tests/ui/issues/issue-4464.rs index 7ac107150a03b..a2d6ed718c298 100644 --- a/tests/ui/issues/issue-4464.rs +++ b/tests/ui/issues/issue-4464.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] } diff --git a/tests/ui/issues/issue-44730.rs b/tests/ui/issues/issue-44730.rs index 0493811b279a7..0c2af7e9f2f6c 100644 --- a/tests/ui/issues/issue-44730.rs +++ b/tests/ui/issues/issue-44730.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! dox #![deny(missing_docs)] diff --git a/tests/ui/issues/issue-44851.rs b/tests/ui/issues/issue-44851.rs index 23daaeb0f0088..d5fe4f6746d9a 100644 --- a/tests/ui/issues/issue-44851.rs +++ b/tests/ui/issues/issue-44851.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! a { () => { "a" } } diff --git a/tests/ui/issues/issue-4541.rs b/tests/ui/issues/issue-4541.rs index e7f26d021515c..cf6208478c465 100644 --- a/tests/ui/issues/issue-4541.rs +++ b/tests/ui/issues/issue-4541.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn parse_args() -> String { let args: Vec<_> = ::std::env::args().collect(); diff --git a/tests/ui/issues/issue-4542.rs b/tests/ui/issues/issue-4542.rs index 2386561c39d26..bd63246fa33a3 100644 --- a/tests/ui/issues/issue-4542.rs +++ b/tests/ui/issues/issue-4542.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::env; diff --git a/tests/ui/issues/issue-45425.rs b/tests/ui/issues/issue-45425.rs index 10ce374eadadd..fad8284caf5ba 100644 --- a/tests/ui/issues/issue-45425.rs +++ b/tests/ui/issues/issue-45425.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::ops::Add; diff --git a/tests/ui/issues/issue-4545.rs b/tests/ui/issues/issue-4545.rs index 86fcf9af21fc5..6a2f04e4511a0 100644 --- a/tests/ui/issues/issue-4545.rs +++ b/tests/ui/issues/issue-4545.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-4545.rs +//@ run-pass +//@ aux-build:issue-4545.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_4545 as somelib; pub fn main() { somelib::mk::(); } diff --git a/tests/ui/issues/issue-45510.rs b/tests/ui/issues/issue-45510.rs index 9e104ce6c4f30..d73218a385924 100644 --- a/tests/ui/issues/issue-45510.rs +++ b/tests/ui/issues/issue-45510.rs @@ -1,5 +1,5 @@ // Test overloaded resolution of fn_traits. -// run-pass +//@ run-pass #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/issues/issue-45562.fixed b/tests/ui/issues/issue-45562.fixed index ac700fbd04643..8dcdd3a541ce4 100644 --- a/tests/ui/issues/issue-45562.fixed +++ b/tests/ui/issues/issue-45562.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[no_mangle] pub static RAH: usize = 5; //~^ ERROR const items should never be `#[no_mangle]` diff --git a/tests/ui/issues/issue-45562.rs b/tests/ui/issues/issue-45562.rs index eabb5a5cecf81..08f6c8046dce4 100644 --- a/tests/ui/issues/issue-45562.rs +++ b/tests/ui/issues/issue-45562.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[no_mangle] pub const RAH: usize = 5; //~^ ERROR const items should never be `#[no_mangle]` diff --git a/tests/ui/issues/issue-45697-1.rs b/tests/ui/issues/issue-45697-1.rs index b45f1170b86c5..53e5559968969 100644 --- a/tests/ui/issues/issue-45697-1.rs +++ b/tests/ui/issues/issue-45697-1.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -C overflow-checks=on +//@ compile-flags: -C overflow-checks=on struct S<'a> { pointer: &'a mut isize diff --git a/tests/ui/issues/issue-45697.rs b/tests/ui/issues/issue-45697.rs index db6d1d8fa2a92..653924077684b 100644 --- a/tests/ui/issues/issue-45697.rs +++ b/tests/ui/issues/issue-45697.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -C overflow-checks=off +//@ compile-flags: -C overflow-checks=off struct S<'a> { pointer: &'a mut isize diff --git a/tests/ui/issues/issue-45731.rs b/tests/ui/issues/issue-45731.rs index d20c07276a8c5..8e483d08cb516 100644 --- a/tests/ui/issues/issue-45731.rs +++ b/tests/ui/issues/issue-45731.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:--test -g +//@ compile-flags:--test -g #[cfg(target_os = "macos")] #[test] diff --git a/tests/ui/issues/issue-46069.rs b/tests/ui/issues/issue-46069.rs index f80ea932001f1..adfb567d7dd32 100644 --- a/tests/ui/issues/issue-46069.rs +++ b/tests/ui/issues/issue-46069.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::iter::{Fuse, Cloned}; use std::slice::Iter; diff --git a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed index 8668d8acd5b30..d8402cdf07e38 100644 --- a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed +++ b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs index c8494612ca340..0e04680911c80 100644 --- a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs +++ b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/issues/issue-46855.rs b/tests/ui/issues/issue-46855.rs index aa6378f8594bc..acea242046fde 100644 --- a/tests/ui/issues/issue-46855.rs +++ b/tests/ui/issues/issue-46855.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -Zmir-opt-level=1 +//@ compile-flags: -Zmir-opt-level=1 use std::mem; diff --git a/tests/ui/issues/issue-46964.rs b/tests/ui/issues/issue-46964.rs index 28fa92f2091e7..6a29d91df7383 100644 --- a/tests/ui/issues/issue-46964.rs +++ b/tests/ui/issues/issue-46964.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod my_mod { #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct Name<'a> { diff --git a/tests/ui/issues/issue-47309.rs b/tests/ui/issues/issue-47309.rs index abed9687b4993..99f1ccbc5758c 100644 --- a/tests/ui/issues/issue-47309.rs +++ b/tests/ui/issues/issue-47309.rs @@ -2,8 +2,8 @@ // instantiate a default impl of a method with lifetime parameters. // See https://github.com/rust-lang/rust/issues/47309 -// compile-flags:-Clink-dead-code -// build-pass +//@ compile-flags:-Clink-dead-code +//@ build-pass #![crate_type="rlib"] diff --git a/tests/ui/issues/issue-4734.rs b/tests/ui/issues/issue-4734.rs index 29c965d7ff531..938d7064789de 100644 --- a/tests/ui/issues/issue-4734.rs +++ b/tests/ui/issues/issue-4734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "e;" where // `e` is a type which requires a destructor. diff --git a/tests/ui/issues/issue-4735.rs b/tests/ui/issues/issue-4735.rs index 3ea4b01cd2bbe..1223e15b2d9e8 100644 --- a/tests/ui/issues/issue-4735.rs +++ b/tests/ui/issues/issue-4735.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::mem::transmute; diff --git a/tests/ui/issues/issue-47364.rs b/tests/ui/issues/issue-47364.rs index b524354d9a197..b657b3d3bde98 100644 --- a/tests/ui/issues/issue-47364.rs +++ b/tests/ui/issues/issue-47364.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags: -C codegen-units=8 -O +//@ compile-flags: -C codegen-units=8 -O #![allow(non_snake_case)] fn main() { diff --git a/tests/ui/issues/issue-4759-1.rs b/tests/ui/issues/issue-4759-1.rs index 96fae0fecd9e3..7368a7b2f845b 100644 --- a/tests/ui/issues/issue-4759-1.rs +++ b/tests/ui/issues/issue-4759-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait U { fn f(self); } impl U for isize { fn f(self) {} } pub fn main() { 4.f(); } diff --git a/tests/ui/issues/issue-4759.rs b/tests/ui/issues/issue-4759.rs index e5b9e2ed57438..49fe5f9275948 100644 --- a/tests/ui/issues/issue-4759.rs +++ b/tests/ui/issues/issue-4759.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_shorthand_field_patterns)] struct T { a: Box } diff --git a/tests/ui/issues/issue-47638.rs b/tests/ui/issues/issue-47638.rs index a1ed3c3654401..e5a51ce0c06f0 100644 --- a/tests/ui/issues/issue-47638.rs +++ b/tests/ui/issues/issue-47638.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) { f diff --git a/tests/ui/issues/issue-47673.rs b/tests/ui/issues/issue-47673.rs index b5f0febfbeeac..d395ac677e751 100644 --- a/tests/ui/issues/issue-47673.rs +++ b/tests/ui/issues/issue-47673.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] use {{}, {}}; diff --git a/tests/ui/issues/issue-47703-1.rs b/tests/ui/issues/issue-47703-1.rs index 61d684c2a81b7..9913d1fefe080 100644 --- a/tests/ui/issues/issue-47703-1.rs +++ b/tests/ui/issues/issue-47703-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct AtomicRefMut<'a> { value: &'a mut i32, diff --git a/tests/ui/issues/issue-47703-tuple.rs b/tests/ui/issues/issue-47703-tuple.rs index bad187ead81d9..17a0da8c5f8e0 100644 --- a/tests/ui/issues/issue-47703-tuple.rs +++ b/tests/ui/issues/issue-47703-tuple.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct WithDrop; diff --git a/tests/ui/issues/issue-47703.rs b/tests/ui/issues/issue-47703.rs index 38be6f5d2a986..deece30098719 100644 --- a/tests/ui/issues/issue-47703.rs +++ b/tests/ui/issues/issue-47703.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct MyStruct<'a> { field: &'a mut (), diff --git a/tests/ui/issues/issue-47722.rs b/tests/ui/issues/issue-47722.rs index 5645a634343f6..da08b8addda90 100644 --- a/tests/ui/issues/issue-47722.rs +++ b/tests/ui/issues/issue-47722.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that automatic coercions from &mut T to *mut T // allow borrows of T to expire immediately - essentially, that diff --git a/tests/ui/issues/issue-48006.rs b/tests/ui/issues/issue-48006.rs index cfef270e5a67c..e48146d07bc14 100644 --- a/tests/ui/issues/issue-48006.rs +++ b/tests/ui/issues/issue-48006.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(step_trait)] diff --git a/tests/ui/issues/issue-48132.rs b/tests/ui/issues/issue-48132.rs index f564aefe78ced..d8d7167a4ce82 100644 --- a/tests/ui/issues/issue-48132.rs +++ b/tests/ui/issues/issue-48132.rs @@ -1,7 +1,7 @@ // Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/issues/issue-48159.rs b/tests/ui/issues/issue-48159.rs index fc8f31fb1ef33..2060e708e2726 100644 --- a/tests/ui/issues/issue-48159.rs +++ b/tests/ui/issues/issue-48159.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::mem; diff --git a/tests/ui/issues/issue-4830.rs b/tests/ui/issues/issue-4830.rs index a8553bd6bf3db..364def61da846 100644 --- a/tests/ui/issues/issue-4830.rs +++ b/tests/ui/issues/issue-4830.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Scheduler { /// The event loop used to drive the scheduler and perform I/O diff --git a/tests/ui/issues/issue-4875.rs b/tests/ui/issues/issue-4875.rs index 8d361314f73a0..3b09331873cce 100644 --- a/tests/ui/issues/issue-4875.rs +++ b/tests/ui/issues/issue-4875.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // regression test for issue 4875 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo { data: T, diff --git a/tests/ui/issues/issue-48984.rs b/tests/ui/issues/issue-48984.rs index cb340f848978c..0440789a480aa 100644 --- a/tests/ui/issues/issue-48984.rs +++ b/tests/ui/issues/issue-48984.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-48984-aux.rs +//@ aux-build:issue-48984-aux.rs extern crate issue48984aux; use issue48984aux::Bar; diff --git a/tests/ui/issues/issue-49298.rs b/tests/ui/issues/issue-49298.rs index 6e58fa12ca705..b10b5b90fd73a 100644 --- a/tests/ui/issues/issue-49298.rs +++ b/tests/ui/issues/issue-49298.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![allow(unused_mut)] // under NLL we get warning about `x` below: rust-lang/rust#54499 @@ -6,7 +6,7 @@ // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // This test is checking that the space allocated for `x.1` does not // overlap with `y`. (The reason why such a thing happened at one diff --git a/tests/ui/issues/issue-49544.rs b/tests/ui/issues/issue-49544.rs index ed356275fc135..bb052501f8b15 100644 --- a/tests/ui/issues/issue-49544.rs +++ b/tests/ui/issues/issue-49544.rs @@ -1,5 +1,5 @@ -// aux-build:issue-49544.rs -// check-pass +//@ aux-build:issue-49544.rs +//@ check-pass extern crate issue_49544; use issue_49544::foo; diff --git a/tests/ui/issues/issue-49632.rs b/tests/ui/issues/issue-49632.rs index 155fd0d24ebe2..f17891c45013f 100644 --- a/tests/ui/issues/issue-49632.rs +++ b/tests/ui/issues/issue-49632.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(stmt_expr_attributes)] pub fn main() { diff --git a/tests/ui/issues/issue-49851/compiler-builtins-error.rs b/tests/ui/issues/issue-49851/compiler-builtins-error.rs index 4e56cca33d6a9..3b62cc73f93d6 100644 --- a/tests/ui/issues/issue-49851/compiler-builtins-error.rs +++ b/tests/ui/issues/issue-49851/compiler-builtins-error.rs @@ -1,8 +1,8 @@ //~ ERROR can't find crate for `core` //~^ ERROR can't find crate for `compiler_builtins` -// compile-flags: --target thumbv7em-none-eabihf -// needs-llvm-components: arm +//@ compile-flags: --target thumbv7em-none-eabihf +//@ needs-llvm-components: arm #![deny(unsafe_code)] #![deny(warnings)] #![no_std] diff --git a/tests/ui/issues/issue-49854.rs b/tests/ui/issues/issue-49854.rs index 0e1db00a34ce9..b5a3f07dd4b85 100644 --- a/tests/ui/issues/issue-49854.rs +++ b/tests/ui/issues/issue-49854.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ffi::OsString; fn main() { diff --git a/tests/ui/issues/issue-49955.rs b/tests/ui/issues/issue-49955.rs index f2f3ebff2db18..c2f160bd6d4cc 100644 --- a/tests/ui/issues/issue-49955.rs +++ b/tests/ui/issues/issue-49955.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ALL_THE_NUMS: [u32; 1] = [ 1 diff --git a/tests/ui/issues/issue-49973.rs b/tests/ui/issues/issue-49973.rs index af421c52fb0ec..c8f7c8ea32fe7 100644 --- a/tests/ui/issues/issue-49973.rs +++ b/tests/ui/issues/issue-49973.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] #[repr(i32)] enum E { diff --git a/tests/ui/issues/issue-50187.rs b/tests/ui/issues/issue-50187.rs index 4b0aeaab4101f..7304903b95440 100644 --- a/tests/ui/issues/issue-50187.rs +++ b/tests/ui/issues/issue-50187.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/issues/issue-50411.rs b/tests/ui/issues/issue-50411.rs index cd728b15256e9..7fbbadac1e2bb 100644 --- a/tests/ui/issues/issue-50411.rs +++ b/tests/ui/issues/issue-50411.rs @@ -3,8 +3,8 @@ // elaborate-drops invoked on it) and then try to elaboate drops a // second time. Uncool. -// compile-flags:-Zmir-opt-level=4 -// build-pass +//@ compile-flags:-Zmir-opt-level=4 +//@ build-pass fn main() { let _ = (0 .. 1).filter(|_| [1].iter().all(|_| true)).count(); diff --git a/tests/ui/issues/issue-50415.rs b/tests/ui/issues/issue-50415.rs index 151b9fe442c03..5f6211eb149dd 100644 --- a/tests/ui/issues/issue-50415.rs +++ b/tests/ui/issues/issue-50415.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // Simplified test case let _ = || 0..=1; diff --git a/tests/ui/issues/issue-50442.rs b/tests/ui/issues/issue-50442.rs index 25c7dde7a5fb7..70c764f33ddf9 100644 --- a/tests/ui/issues/issue-50442.rs +++ b/tests/ui/issues/issue-50442.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Void {} diff --git a/tests/ui/issues/issue-50471.rs b/tests/ui/issues/issue-50471.rs index 7278c392d5456..1d8bad20377c7 100644 --- a/tests/ui/issues/issue-50471.rs +++ b/tests/ui/issues/issue-50471.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { assert!({false}); diff --git a/tests/ui/issues/issue-50518.rs b/tests/ui/issues/issue-50518.rs index 1e7b7794929ec..9ac0a297fef3d 100644 --- a/tests/ui/issues/issue-50518.rs +++ b/tests/ui/issues/issue-50518.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; struct Meta { diff --git a/tests/ui/issues/issue-50571.fixed b/tests/ui/issues/issue-50571.fixed index 13c830cd0d4b1..37ed729be8168 100644 --- a/tests/ui/issues/issue-50571.fixed +++ b/tests/ui/issues/issue-50571.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/issues/issue-50571.rs b/tests/ui/issues/issue-50571.rs index 6fe13e3f707db..97a042d3ec1fb 100644 --- a/tests/ui/issues/issue-50571.rs +++ b/tests/ui/issues/issue-50571.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/issues/issue-5067.rs b/tests/ui/issues/issue-5067.rs index 5857a081596cb..47d07f0df014c 100644 --- a/tests/ui/issues/issue-5067.rs +++ b/tests/ui/issues/issue-5067.rs @@ -3,7 +3,7 @@ // Tests that repetition matchers cannot match the empty token tree (since that would be // ambiguous). -// edition:2018 +//@ edition:2018 macro_rules! foo { ( $()* ) => {}; diff --git a/tests/ui/issues/issue-50761.rs b/tests/ui/issues/issue-50761.rs index 1bf494ba8f97e..6911bfa0265e7 100644 --- a/tests/ui/issues/issue-50761.rs +++ b/tests/ui/issues/issue-50761.rs @@ -1,6 +1,6 @@ // Confirm that we don't accidentally divide or mod by zero in llvm_type -// build-pass +//@ build-pass mod a { pub trait A {} diff --git a/tests/ui/issues/issue-50811.rs b/tests/ui/issues/issue-50811.rs index 2a20e50fa4543..aaf1c17f59b5f 100644 --- a/tests/ui/issues/issue-50811.rs +++ b/tests/ui/issues/issue-50811.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![allow(invalid_nan_comparisons)] diff --git a/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs b/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs index 1e20a54606955..c68b6d1935478 100644 --- a/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs +++ b/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs @@ -1,5 +1,5 @@ -// revisions: default miropt -//[miropt]compile-flags: -Z mir-opt-level=3 +//@ revisions: default miropt +//@[miropt]compile-flags: -Z mir-opt-level=3 // ~^ This flag is for #77668, it used to be ICE. #![crate_type = "lib"] diff --git a/tests/ui/issues/issue-50865-private-impl-trait/main.rs b/tests/ui/issues/issue-50865-private-impl-trait/main.rs index 16dfac53ad1be..b951388594f05 100644 --- a/tests/ui/issues/issue-50865-private-impl-trait/main.rs +++ b/tests/ui/issues/issue-50865-private-impl-trait/main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:lib.rs +//@ run-pass +//@ aux-build:lib.rs // Regression test for #50865. // When using generics or specifying the type directly, this example diff --git a/tests/ui/issues/issue-51044.rs b/tests/ui/issues/issue-51044.rs index 628d7876965d5..d7761b50b4c4b 100644 --- a/tests/ui/issues/issue-51044.rs +++ b/tests/ui/issues/issue-51044.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // regression test for issue #50825 // Check that the feature gate normalizes associated types. diff --git a/tests/ui/issues/issue-51655.rs b/tests/ui/issues/issue-51655.rs index 36fd90dabedc8..05f71623d1419 100644 --- a/tests/ui/issues/issue-51655.rs +++ b/tests/ui/issues/issue-51655.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] const PATH_DOT: &[u8] = &[b'.']; diff --git a/tests/ui/issues/issue-51798.rs b/tests/ui/issues/issue-51798.rs index b075809e93ac2..f4d59f39952eb 100644 --- a/tests/ui/issues/issue-51798.rs +++ b/tests/ui/issues/issue-51798.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:issue-51798.rs -// check-pass +//@ edition:2018 +//@ aux-build:issue-51798.rs +//@ check-pass extern crate issue_51798; diff --git a/tests/ui/issues/issue-51907.rs b/tests/ui/issues/issue-51907.rs index 9378f4357134b..bf3f629df4970 100644 --- a/tests/ui/issues/issue-51907.rs +++ b/tests/ui/issues/issue-51907.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { extern "C" fn borrow(&self); extern "C" fn take(self: Box); diff --git a/tests/ui/issues/issue-5192.rs b/tests/ui/issues/issue-5192.rs index e2f835c199738..8911e7a733b14 100644 --- a/tests/ui/issues/issue-5192.rs +++ b/tests/ui/issues/issue-5192.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait EventLoop { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-51947.rs b/tests/ui/issues/issue-51947.rs index c877fb8aef19b..eda48aa5cf47a 100644 --- a/tests/ui/issues/issue-51947.rs +++ b/tests/ui/issues/issue-51947.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![feature(linkage)] diff --git a/tests/ui/issues/issue-52140/main.rs b/tests/ui/issues/issue-52140/main.rs index aeac4340455bb..a7c76e68d3a3f 100644 --- a/tests/ui/issues/issue-52140/main.rs +++ b/tests/ui/issues/issue-52140/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:some_crate.rs -// compile-flags:--extern some_crate -// edition:2018 +//@ run-pass +//@ aux-build:some_crate.rs +//@ compile-flags:--extern some_crate +//@ edition:2018 mod foo { pub use some_crate; diff --git a/tests/ui/issues/issue-52141/main.rs b/tests/ui/issues/issue-52141/main.rs index 7eea1726cf36c..dc22b01ff844a 100644 --- a/tests/ui/issues/issue-52141/main.rs +++ b/tests/ui/issues/issue-52141/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:some_crate.rs -// compile-flags:--extern some_crate -// edition:2018 +//@ run-pass +//@ aux-build:some_crate.rs +//@ compile-flags:--extern some_crate +//@ edition:2018 use some_crate as some_name; diff --git a/tests/ui/issues/issue-5239-2.rs b/tests/ui/issues/issue-5239-2.rs index b501c6e1853ca..8239b06404a4b 100644 --- a/tests/ui/issues/issue-5239-2.rs +++ b/tests/ui/issues/issue-5239-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #5239 diff --git a/tests/ui/issues/issue-52489.rs b/tests/ui/issues/issue-52489.rs index 8efe216989ade..95a3d43105c75 100644 --- a/tests/ui/issues/issue-52489.rs +++ b/tests/ui/issues/issue-52489.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:issue-52489.rs -// compile-flags:--extern issue_52489 +//@ edition:2018 +//@ aux-build:issue-52489.rs +//@ compile-flags:--extern issue_52489 use issue_52489; //~^ ERROR use of unstable library feature 'issue_52489_unstable' diff --git a/tests/ui/issues/issue-52705/main.rs b/tests/ui/issues/issue-52705/main.rs index 90bb8ca7537d5..92bd9a279ad88 100644 --- a/tests/ui/issues/issue-52705/main.rs +++ b/tests/ui/issues/issue-52705/main.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:png2.rs -// compile-flags:--extern png2 -// edition:2018 +//@ aux-build:png2.rs +//@ compile-flags:--extern png2 +//@ edition:2018 mod png { use png2 as png_ext; diff --git a/tests/ui/issues/issue-5280.rs b/tests/ui/issues/issue-5280.rs index 5c5ce6c987ad1..66452c3677679 100644 --- a/tests/ui/issues/issue-5280.rs +++ b/tests/ui/issues/issue-5280.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] type FontTableTag = u32; diff --git a/tests/ui/issues/issue-5315.rs b/tests/ui/issues/issue-5315.rs index 81d075a98a904..64a48b9e84234 100644 --- a/tests/ui/issues/issue-5315.rs +++ b/tests/ui/issues/issue-5315.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct A(#[allow(dead_code)] bool); diff --git a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs index 64aa2836a7dd1..cb35a641c5e39 100644 --- a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs +++ b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Fooable { fn yes(self); diff --git a/tests/ui/issues/issue-53275.rs b/tests/ui/issues/issue-53275.rs index 5ae6fb2d47249..13c35c8fdaad5 100644 --- a/tests/ui/issues/issue-53275.rs +++ b/tests/ui/issues/issue-53275.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![allow(unconditional_panic)] diff --git a/tests/ui/issues/issue-53333.rs b/tests/ui/issues/issue-53333.rs index ccc9971f93c56..468b7d8075fe1 100644 --- a/tests/ui/issues/issue-53333.rs +++ b/tests/ui/issues/issue-53333.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// edition:2018 +//@ edition:2018 fn main() { use std; diff --git a/tests/ui/issues/issue-53419.rs b/tests/ui/issues/issue-53419.rs index 892ec66afecf9..55d41f2005d29 100644 --- a/tests/ui/issues/issue-53419.rs +++ b/tests/ui/issues/issue-53419.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { bar: dyn for<'r> Fn(usize, &'r dyn FnMut()) diff --git a/tests/ui/issues/issue-53568.rs b/tests/ui/issues/issue-53568.rs index 49ae444f97e4b..9862d4ced12c3 100644 --- a/tests/ui/issues/issue-53568.rs +++ b/tests/ui/issues/issue-53568.rs @@ -1,7 +1,7 @@ // Regression test for an NLL-related ICE (#53568) -- we failed to // resolve inference variables in "custom type-ops". // -// check-pass +//@ check-pass trait Future { type Item; diff --git a/tests/ui/issues/issue-53728.rs b/tests/ui/issues/issue-53728.rs index 77b5010f77675..364965228c608 100644 --- a/tests/ui/issues/issue-53728.rs +++ b/tests/ui/issues/issue-53728.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(u16)] diff --git a/tests/ui/issues/issue-53843.rs b/tests/ui/issues/issue-53843.rs index f305b370ce62a..d4b0b1e332bdf 100644 --- a/tests/ui/issues/issue-53843.rs +++ b/tests/ui/issues/issue-53843.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-54094.rs b/tests/ui/issues/issue-54094.rs index ec38dc40e610a..4ca7d1d81b621 100644 --- a/tests/ui/issues/issue-54094.rs +++ b/tests/ui/issues/issue-54094.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Zoo { type X; } diff --git a/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs b/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs index 412028bdcdcbb..70d0bee733262 100644 --- a/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs +++ b/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // -// compile-flags: -Ccodegen-units=1 -O +//@ compile-flags: -Ccodegen-units=1 -O fn linidx(row: usize, col: usize) -> usize { row * 1 + col * 3 diff --git a/tests/ui/issues/issue-54477-reduced-2.rs b/tests/ui/issues/issue-54477-reduced-2.rs index 199d69b45404c..5f65e54518208 100644 --- a/tests/ui/issues/issue-54477-reduced-2.rs +++ b/tests/ui/issues/issue-54477-reduced-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // rust-lang/rust#54477: runtime bug in the VecDeque library that was // exposed by this test case, derived from test suite of crates.io // `collection` crate. diff --git a/tests/ui/issues/issue-54696.rs b/tests/ui/issues/issue-54696.rs index 15355d30db6a5..75b1824f0b383 100644 --- a/tests/ui/issues/issue-54696.rs +++ b/tests/ui/issues/issue-54696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // We shouldn't promote this diff --git a/tests/ui/issues/issue-5518.rs b/tests/ui/issues/issue-5518.rs index 97ed9ef309d5a..4e1049f02fbc3 100644 --- a/tests/ui/issues/issue-5518.rs +++ b/tests/ui/issues/issue-5518.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-5518.rs +//@ run-pass +//@ aux-build:issue-5518.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_5518 as other; diff --git a/tests/ui/issues/issue-5521.rs b/tests/ui/issues/issue-5521.rs index cafdbc399616f..45896ae81284d 100644 --- a/tests/ui/issues/issue-5521.rs +++ b/tests/ui/issues/issue-5521.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-5521.rs +//@ aux-build:issue-5521.rs diff --git a/tests/ui/issues/issue-55376.rs b/tests/ui/issues/issue-55376.rs index 4adff2b4544ca..5a6862b6530b1 100644 --- a/tests/ui/issues/issue-55376.rs +++ b/tests/ui/issues/issue-55376.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that paths in `pub(...)` don't fail HIR verification. #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-55380.rs b/tests/ui/issues/issue-55380.rs index f7cb296d3b8bb..54894cdede021 100644 --- a/tests/ui/issues/issue-55380.rs +++ b/tests/ui/issues/issue-55380.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/issues/issue-5550.rs b/tests/ui/issues/issue-5550.rs index 6ea24747b3965..e967590c65057 100644 --- a/tests/ui/issues/issue-5550.rs +++ b/tests/ui/issues/issue-5550.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let s: String = "foobar".to_string(); diff --git a/tests/ui/issues/issue-5554.rs b/tests/ui/issues/issue-5554.rs index afe333ed709d6..532d1b4092e70 100644 --- a/tests/ui/issues/issue-5554.rs +++ b/tests/ui/issues/issue-5554.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct X { diff --git a/tests/ui/issues/issue-5572.rs b/tests/ui/issues/issue-5572.rs index 175dc879dda74..8a4c867f58514 100644 --- a/tests/ui/issues/issue-5572.rs +++ b/tests/ui/issues/issue-5572.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_t: T) { } diff --git a/tests/ui/issues/issue-56128.rs b/tests/ui/issues/issue-56128.rs index 10b50943c23a4..cc170f60250ff 100644 --- a/tests/ui/issues/issue-56128.rs +++ b/tests/ui/issues/issue-56128.rs @@ -1,7 +1,7 @@ // Regression test for #56128. When this `pub(super) use...` gets // exploded in the HIR, we were not handling ids correctly. // -// check-pass +//@ check-pass mod bar { pub(super) use self::baz::{x, y}; diff --git a/tests/ui/issues/issue-56175.rs b/tests/ui/issues/issue-56175.rs index ca1d0d4310ae9..daffe806a900c 100644 --- a/tests/ui/issues/issue-56175.rs +++ b/tests/ui/issues/issue-56175.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:reexported_trait=reexported-trait.rs +//@ edition:2018 +//@ aux-crate:reexported_trait=reexported-trait.rs fn main() { reexported_trait::FooStruct.trait_method(); diff --git a/tests/ui/issues/issue-56229.rs b/tests/ui/issues/issue-56229.rs index 9e5897b98925a..1c6dd72ed2dea 100644 --- a/tests/ui/issues/issue-56229.rs +++ b/tests/ui/issues/issue-56229.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Mirror { type Other; diff --git a/tests/ui/issues/issue-56237.rs b/tests/ui/issues/issue-56237.rs index 534b85acec82c..3c0a235f3ec2c 100644 --- a/tests/ui/issues/issue-56237.rs +++ b/tests/ui/issues/issue-56237.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-5666.rs b/tests/ui/issues/issue-5666.rs index 810895b1b1bc4..76e2f8229a0f9 100644 --- a/tests/ui/issues/issue-5666.rs +++ b/tests/ui/issues/issue-5666.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Dog { name : String diff --git a/tests/ui/issues/issue-56870.rs b/tests/ui/issues/issue-56870.rs index 137a0ede0b33c..fc6deedd029f1 100644 --- a/tests/ui/issues/issue-56870.rs +++ b/tests/ui/issues/issue-56870.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Regression test for #56870: Internal compiler error (traits & associated consts) use std::fmt::Debug; diff --git a/tests/ui/issues/issue-5688.rs b/tests/ui/issues/issue-5688.rs index b6e364c2f4095..a7db1dfb15f6c 100644 --- a/tests/ui/issues/issue-5688.rs +++ b/tests/ui/issues/issue-5688.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /* # Corrupted initialization in the static struct diff --git a/tests/ui/issues/issue-56943.rs b/tests/ui/issues/issue-56943.rs index 8fc77abdbf588..9664567ec9ea0 100644 --- a/tests/ui/issues/issue-56943.rs +++ b/tests/ui/issues/issue-56943.rs @@ -1,4 +1,4 @@ -// aux-build:issue-56943.rs +//@ aux-build:issue-56943.rs extern crate issue_56943; diff --git a/tests/ui/issues/issue-5708.rs b/tests/ui/issues/issue-5708.rs index 6fe9943d3689f..ce9ef78ffcd9c 100644 --- a/tests/ui/issues/issue-5708.rs +++ b/tests/ui/issues/issue-5708.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] /* # ICE when returning struct with reference to trait diff --git a/tests/ui/issues/issue-57156.rs b/tests/ui/issues/issue-57156.rs index 9f5ec9f27715c..12251509abd2d 100644 --- a/tests/ui/issues/issue-57156.rs +++ b/tests/ui/issues/issue-57156.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Output; diff --git a/tests/ui/issues/issue-57162.rs b/tests/ui/issues/issue-57162.rs index 6507006028721..5e62d0eb010bc 100644 --- a/tests/ui/issues/issue-57162.rs +++ b/tests/ui/issues/issue-57162.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} impl Foo for dyn Send {} diff --git a/tests/ui/issues/issue-5718.rs b/tests/ui/issues/issue-5718.rs index f29a1e2a060d2..c30061298d179 100644 --- a/tests/ui/issues/issue-5718.rs +++ b/tests/ui/issues/issue-5718.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Element; diff --git a/tests/ui/issues/issue-57198-pass.rs b/tests/ui/issues/issue-57198-pass.rs index 3857def9824f8..06f30603c3169 100644 --- a/tests/ui/issues/issue-57198-pass.rs +++ b/tests/ui/issues/issue-57198-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod m { pub fn r#for() {} diff --git a/tests/ui/issues/issue-57271.rs b/tests/ui/issues/issue-57271.rs index f74222e3e51db..20d081ecb3ce6 100644 --- a/tests/ui/issues/issue-57271.rs +++ b/tests/ui/issues/issue-57271.rs @@ -1,4 +1,4 @@ -// aux-build:issue-57271-lib.rs +//@ aux-build:issue-57271-lib.rs extern crate issue_57271_lib; diff --git a/tests/ui/issues/issue-57399-self-return-impl-trait.rs b/tests/ui/issues/issue-57399-self-return-impl-trait.rs index c7fe40e7b506c..bcf1b18a9ff43 100644 --- a/tests/ui/issues/issue-57399-self-return-impl-trait.rs +++ b/tests/ui/issues/issue-57399-self-return-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T { type T; diff --git a/tests/ui/issues/issue-5741.rs b/tests/ui/issues/issue-5741.rs index b9eaf0be7fb3a..dad16dd39e235 100644 --- a/tests/ui/issues/issue-5741.rs +++ b/tests/ui/issues/issue-5741.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(while_true)] #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/issues/issue-5754.rs index d90816635aba4..2b61da02c3045 100644 --- a/tests/ui/issues/issue-5754.rs +++ b/tests/ui/issues/issue-5754.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct TwoDoubles { r: f64, diff --git a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed index 4cae080033ca2..1823f0d3d4ccf 100644 --- a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed +++ b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs index e2658295af791..47ab91177e057 100644 --- a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs +++ b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-57781.rs b/tests/ui/issues/issue-57781.rs index f5015aaf5d81f..7f0d2eda9bb84 100644 --- a/tests/ui/issues/issue-57781.rs +++ b/tests/ui/issues/issue-57781.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::UnsafeCell; use std::collections::HashMap; diff --git a/tests/ui/issues/issue-58212.rs b/tests/ui/issues/issue-58212.rs index 4695497c3a184..f266db603bf1c 100644 --- a/tests/ui/issues/issue-58212.rs +++ b/tests/ui/issues/issue-58212.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait FromUnchecked { fn from_unchecked(); diff --git a/tests/ui/issues/issue-58375-monomorphize-default-impls.rs b/tests/ui/issues/issue-58375-monomorphize-default-impls.rs index 6da6f398dfcc6..769a1176edd36 100644 --- a/tests/ui/issues/issue-58375-monomorphize-default-impls.rs +++ b/tests/ui/issues/issue-58375-monomorphize-default-impls.rs @@ -2,8 +2,8 @@ // instantiate a default impl for DecodeUtf16<::Item> // See https://github.com/rust-lang/rust/issues/58375 -// build-pass -// compile-flags:-C link-dead-code +//@ build-pass +//@ compile-flags:-C link-dead-code #![crate_type = "rlib"] diff --git a/tests/ui/issues/issue-5844.rs b/tests/ui/issues/issue-5844.rs index 0db1ccf76d992..23021207ae195 100644 --- a/tests/ui/issues/issue-5844.rs +++ b/tests/ui/issues/issue-5844.rs @@ -1,4 +1,4 @@ -//aux-build:issue-5844-aux.rs +//@aux-build:issue-5844-aux.rs extern crate issue_5844_aux; diff --git a/tests/ui/issues/issue-58463.rs b/tests/ui/issues/issue-58463.rs index 9573c9b703aa3..6e4b909bc3835 100644 --- a/tests/ui/issues/issue-58463.rs +++ b/tests/ui/issues/issue-58463.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-C debuginfo=2 +//@ run-pass +//@ compile-flags:-C debuginfo=2 fn foo() -> impl Copy { foo diff --git a/tests/ui/issues/issue-5884.rs b/tests/ui/issues/issue-5884.rs index 991c52321bfeb..17cb4133632ab 100644 --- a/tests/ui/issues/issue-5884.rs +++ b/tests/ui/issues/issue-5884.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo { a: isize, diff --git a/tests/ui/issues/issue-5900.rs b/tests/ui/issues/issue-5900.rs index a7dc0eff43a23..986a8233ef2aa 100644 --- a/tests/ui/issues/issue-5900.rs +++ b/tests/ui/issues/issue-5900.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod foo { use super::Bar; diff --git a/tests/ui/issues/issue-59020.rs b/tests/ui/issues/issue-59020.rs index a2b11764a2fc6..5692afe811e83 100644 --- a/tests/ui/issues/issue-59020.rs +++ b/tests/ui/issues/issue-59020.rs @@ -1,6 +1,6 @@ -// edition:2018 -// run-pass -// ignore-emscripten no threads support +//@ edition:2018 +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; use std::time::Duration; diff --git a/tests/ui/issues/issue-5917.rs b/tests/ui/issues/issue-5917.rs index 6ab7081cf8843..8e91b1052a2d0 100644 --- a/tests/ui/issues/issue-5917.rs +++ b/tests/ui/issues/issue-5917.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct T (&'static [isize]); diff --git a/tests/ui/issues/issue-59326.rs b/tests/ui/issues/issue-59326.rs index c0e8837749eb4..e9634ad9fd8fe 100644 --- a/tests/ui/issues/issue-59326.rs +++ b/tests/ui/issues/issue-59326.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Service { type S; } diff --git a/tests/ui/issues/issue-5950.rs b/tests/ui/issues/issue-5950.rs index 492a9d5723a88..a0822459ad148 100644 --- a/tests/ui/issues/issue-5950.rs +++ b/tests/ui/issues/issue-5950.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use local as local_alias; diff --git a/tests/ui/issues/issue-59756.fixed b/tests/ui/issues/issue-59756.fixed index 7b55d0f17e690..954ba9176261f 100644 --- a/tests/ui/issues/issue-59756.fixed +++ b/tests/ui/issues/issue-59756.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-59756.rs b/tests/ui/issues/issue-59756.rs index 3742f31abade2..de349f43f464b 100644 --- a/tests/ui/issues/issue-59756.rs +++ b/tests/ui/issues/issue-59756.rs @@ -1,5 +1,5 @@ -// run-rustfix -// ignore-test (rustfix needs multiple suggestions) +//@ run-rustfix +//@ ignore-test (rustfix needs multiple suggestions) // // FIXME: Re-enable this test once we support choosing // between multiple mutually exclusive suggestions for the same span diff --git a/tests/ui/issues/issue-5988.rs b/tests/ui/issues/issue-5988.rs index 303fb4fbc9416..801a5edca08f3 100644 --- a/tests/ui/issues/issue-5988.rs +++ b/tests/ui/issues/issue-5988.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait B { fn f(&self); diff --git a/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs b/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs index 145e3a7928d23..7ed8819f3220a 100644 --- a/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs +++ b/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn f() -> bool { diff --git a/tests/ui/issues/issue-6117.rs b/tests/ui/issues/issue-6117.rs index 5235d53d84a14..4fa99d955c935 100644 --- a/tests/ui/issues/issue-6117.rs +++ b/tests/ui/issues/issue-6117.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Either { Left(T), Right(U) } diff --git a/tests/ui/issues/issue-6130.rs b/tests/ui/issues/issue-6130.rs index a33ea68694779..c675a8a41dd0b 100644 --- a/tests/ui/issues/issue-6130.rs +++ b/tests/ui/issues/issue-6130.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: usize = 0; diff --git a/tests/ui/issues/issue-61475.rs b/tests/ui/issues/issue-61475.rs index 680449c9ef3e6..ff5e109ea7c8c 100644 --- a/tests/ui/issues/issue-61475.rs +++ b/tests/ui/issues/issue-61475.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/issues/issue-6153.rs b/tests/ui/issues/issue-6153.rs index 25f026f214bf9..cd78c85d94b55 100644 --- a/tests/ui/issues/issue-6153.rs +++ b/tests/ui/issues/issue-6153.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn swap(f: F) -> Vec where F: FnOnce(Vec) -> Vec { diff --git a/tests/ui/issues/issue-61894.rs b/tests/ui/issues/issue-61894.rs index fe934bdeb6031..40ad6a8d76a01 100644 --- a/tests/ui/issues/issue-61894.rs +++ b/tests/ui/issues/issue-61894.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/issues/issue-6318.rs b/tests/ui/issues/issue-6318.rs index e5f245f6fb80f..3b17754ffdc36 100644 --- a/tests/ui/issues/issue-6318.rs +++ b/tests/ui/issues/issue-6318.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub enum Thing { A(Box) diff --git a/tests/ui/issues/issue-6344-let.rs b/tests/ui/issues/issue-6344-let.rs index a7b6a2e2d6678..1e1bdfa17bed2 100644 --- a/tests/ui/issues/issue-6344-let.rs +++ b/tests/ui/issues/issue-6344-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct A { x: usize } diff --git a/tests/ui/issues/issue-6344-match.rs b/tests/ui/issues/issue-6344-match.rs index 4505a34c716c7..9251e274383da 100644 --- a/tests/ui/issues/issue-6344-match.rs +++ b/tests/ui/issues/issue-6344-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct A { x: usize } diff --git a/tests/ui/issues/issue-64430.rs b/tests/ui/issues/issue-64430.rs index 0bc66e06e6731..bc98dbf8520f0 100644 --- a/tests/ui/issues/issue-64430.rs +++ b/tests/ui/issues/issue-64430.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] pub struct Foo; diff --git a/tests/ui/issues/issue-64593.rs b/tests/ui/issues/issue-64593.rs index 9e787f638a998..e553538100676 100644 --- a/tests/ui/issues/issue-64593.rs +++ b/tests/ui/issues/issue-64593.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub struct Error(std::num::NonZeroU32); diff --git a/tests/ui/issues/issue-65462.rs b/tests/ui/issues/issue-65462.rs index 8c39ea531d244..e148c8aeeb2b5 100644 --- a/tests/ui/issues/issue-65462.rs +++ b/tests/ui/issues/issue-65462.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass enum Empty {} enum Enum { diff --git a/tests/ui/issues/issue-6557.rs b/tests/ui/issues/issue-6557.rs index 757e9608f1a1f..89ebb0610dd37 100644 --- a/tests/ui/issues/issue-6557.rs +++ b/tests/ui/issues/issue-6557.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(box_patterns)] diff --git a/tests/ui/issues/issue-66308.rs b/tests/ui/issues/issue-66308.rs index 8460b359ae38a..41f81323e6fbf 100644 --- a/tests/ui/issues/issue-66308.rs +++ b/tests/ui/issues/issue-66308.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type lib -C opt-level=0 +//@ build-pass +//@ compile-flags: --crate-type lib -C opt-level=0 // Regression test for LLVM crash affecting Emscripten targets diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs index ec1997ccd5d66..26466bf838c40 100644 --- a/tests/ui/issues/issue-67552.rs +++ b/tests/ui/issues/issue-67552.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -Copt-level=0 -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: ".nll/" -> "/" fn main() { rec(Empty); diff --git a/tests/ui/issues/issue-68010-large-zst-consts.rs b/tests/ui/issues/issue-68010-large-zst-consts.rs index 3277df69c0285..167c92f004e1d 100644 --- a/tests/ui/issues/issue-68010-large-zst-consts.rs +++ b/tests/ui/issues/issue-68010-large-zst-consts.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { println!("{}", [(); usize::MAX].len()); diff --git a/tests/ui/issues/issue-68696-catch-during-unwind.rs b/tests/ui/issues/issue-68696-catch-during-unwind.rs index 2b12a62d0eb25..2368cccef0d8b 100644 --- a/tests/ui/issues/issue-68696-catch-during-unwind.rs +++ b/tests/ui/issues/issue-68696-catch-during-unwind.rs @@ -3,7 +3,7 @@ // due to incorrect assumption that a current thread is not panicking when // entering the catch_unwind. // -// run-pass +//@ run-pass use std::panic::catch_unwind; diff --git a/tests/ui/issues/issue-6892.rs b/tests/ui/issues/issue-6892.rs index a361461a4ce38..aff00cf60bacd 100644 --- a/tests/ui/issues/issue-6892.rs +++ b/tests/ui/issues/issue-6892.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "let _ = e;" // where `e` is a type which requires a destructor. diff --git a/tests/ui/issues/issue-68951.rs b/tests/ui/issues/issue-68951.rs index 1c1e92c5bbcbb..2d639a62d45ac 100644 --- a/tests/ui/issues/issue-68951.rs +++ b/tests/ui/issues/issue-68951.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let array = [0x42u8; 10]; diff --git a/tests/ui/issues/issue-6898.rs b/tests/ui/issues/issue-6898.rs index 44fd4bd07350d..cc0fe35fc8839 100644 --- a/tests/ui/issues/issue-6898.rs +++ b/tests/ui/issues/issue-6898.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 use std::mem; diff --git a/tests/ui/issues/issue-6919.rs b/tests/ui/issues/issue-6919.rs index 6f1e1f97708ef..3aa66882c1920 100644 --- a/tests/ui/issues/issue-6919.rs +++ b/tests/ui/issues/issue-6919.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_attributes)] -// aux-build:iss.rs +//@ aux-build:iss.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue6919_3; diff --git a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs index 83f9b16c4086a..9c60affbccd59 100644 --- a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs +++ b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs @@ -1,8 +1,8 @@ -// run-pass -// compile-flags: -Zlink-directives=no -// ignore-windows - this will probably only work on unixish systems -// ignore-fuchsia - missing __libc_start_main for some reason (#84733) -// ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling +//@ run-pass +//@ compile-flags: -Zlink-directives=no +//@ ignore-windows - this will probably only work on unixish systems +//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) +//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling #[link(name = "some-random-non-existent-library", kind = "static")] extern "C" {} diff --git a/tests/ui/issues/issue-70093/issue-70093.rs b/tests/ui/issues/issue-70093/issue-70093.rs index 86459dc904a6e..8697423933893 100644 --- a/tests/ui/issues/issue-70093/issue-70093.rs +++ b/tests/ui/issues/issue-70093/issue-70093.rs @@ -1,8 +1,8 @@ -// run-pass -// compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes -// ignore-windows - this will probably only work on unixish systems -// ignore-fuchsia - missing __libc_start_main for some reason (#84733) -// ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling +//@ run-pass +//@ compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes +//@ ignore-windows - this will probably only work on unixish systems +//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) +//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling #[link(name = "some-random-non-existent-library", kind = "static")] extern "C" {} diff --git a/tests/ui/issues/issue-7012.rs b/tests/ui/issues/issue-7012.rs index 90eba1706956d..69b881e2a43b3 100644 --- a/tests/ui/issues/issue-7012.rs +++ b/tests/ui/issues/issue-7012.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-70673.rs b/tests/ui/issues/issue-70673.rs index 3561f40127737..3793ee7f58b70 100644 --- a/tests/ui/issues/issue-70673.rs +++ b/tests/ui/issues/issue-70673.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/70673. -// run-pass +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/issues/issue-70746.rs b/tests/ui/issues/issue-70746.rs index 8930c15f57edc..e7b4855039796 100644 --- a/tests/ui/issues/issue-70746.rs +++ b/tests/ui/issues/issue-70746.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait1 { type C; diff --git a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed index cbc0e8c061b82..8b473de4ac2e2 100644 --- a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed +++ b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; use std::ops::DerefMut; struct Bar(u8); diff --git a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs index 6e87c7174c633..38d23fb842875 100644 --- a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs +++ b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; use std::ops::DerefMut; struct Bar(u8); diff --git a/tests/ui/issues/issue-7178.rs b/tests/ui/issues/issue-7178.rs index 30aa736cdc619..153ce2cf05711 100644 --- a/tests/ui/issues/issue-7178.rs +++ b/tests/ui/issues/issue-7178.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-7178.rs +//@ run-pass +//@ aux-build:issue-7178.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_7178 as cross_crate_self; diff --git a/tests/ui/issues/issue-72002.rs b/tests/ui/issues/issue-72002.rs index 54ff89355ff3a..ce3463069b881 100644 --- a/tests/ui/issues/issue-72002.rs +++ b/tests/ui/issues/issue-72002.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Indexable; impl Indexable { diff --git a/tests/ui/issues/issue-72278.rs b/tests/ui/issues/issue-72278.rs index 92fd1f73a937f..2a9cd9423915f 100644 --- a/tests/ui/issues/issue-72278.rs +++ b/tests/ui/issues/issue-72278.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] diff --git a/tests/ui/issues/issue-7268.rs b/tests/ui/issues/issue-7268.rs index 309176fb0c557..99b780bcf5c49 100644 --- a/tests/ui/issues/issue-7268.rs +++ b/tests/ui/issues/issue-7268.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_: T) {} diff --git a/tests/ui/issues/issue-72933-match-stack-overflow.rs b/tests/ui/issues/issue-72933-match-stack-overflow.rs index aa796bcf5a0f3..6d091a9108192 100644 --- a/tests/ui/issues/issue-72933-match-stack-overflow.rs +++ b/tests/ui/issues/issue-72933-match-stack-overflow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-filelength #![crate_type="rlib"] diff --git a/tests/ui/issues/issue-73112.rs b/tests/ui/issues/issue-73112.rs index cc7be9c95aef6..89075b756249d 100644 --- a/tests/ui/issues/issue-73112.rs +++ b/tests/ui/issues/issue-73112.rs @@ -1,4 +1,4 @@ -// aux-build:issue-73112.rs +//@ aux-build:issue-73112.rs extern crate issue_73112; diff --git a/tests/ui/issues/issue-73229.rs b/tests/ui/issues/issue-73229.rs index 35346199add92..6d5eec2365e5e 100644 --- a/tests/ui/issues/issue-73229.rs +++ b/tests/ui/issues/issue-73229.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn any() -> T { loop {} diff --git a/tests/ui/issues/issue-7344.rs b/tests/ui/issues/issue-7344.rs index f1727d0c1aef1..9503037723e5b 100644 --- a/tests/ui/issues/issue-7344.rs +++ b/tests/ui/issues/issue-7344.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-74236/auxiliary/dep.rs b/tests/ui/issues/issue-74236/auxiliary/dep.rs index 45f2601d307c8..88c182c44da50 100644 --- a/tests/ui/issues/issue-74236/auxiliary/dep.rs +++ b/tests/ui/issues/issue-74236/auxiliary/dep.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod private { pub struct Pub; } diff --git a/tests/ui/issues/issue-74236/main.rs b/tests/ui/issues/issue-74236/main.rs index daa7cfcf9a106..741d9e476b3f5 100644 --- a/tests/ui/issues/issue-74236/main.rs +++ b/tests/ui/issues/issue-74236/main.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:dep.rs -// compile-flags:--extern dep +//@ edition:2018 +//@ aux-build:dep.rs +//@ compile-flags:--extern dep fn main() { // Trigger an error that will print the path of dep::private::Pub (as "dep::Renamed"). diff --git a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs index 36e9932602fb0..c0ffed27e6fb4 100644 --- a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +++ b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-filelength #![crate_type = "rlib"] diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/issues/issue-7519-match-unit-in-arg.rs index 7d838cbb09b76..2b5f1b7f16959 100644 --- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs +++ b/tests/ui/issues/issue-7519-match-unit-in-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* #7519 ICE pattern matching unit in function argument diff --git a/tests/ui/issues/issue-7563.rs b/tests/ui/issues/issue-7563.rs index c62405554b4d1..9ee8857b99960 100644 --- a/tests/ui/issues/issue-7563.rs +++ b/tests/ui/issues/issue-7563.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait IDummy { fn do_nothing(&self); diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/issues/issue-75704.rs index aed7ddbcb8c9c..1672bf0b4c338 100644 --- a/tests/ui/issues/issue-75704.rs +++ b/tests/ui/issues/issue-75704.rs @@ -1,6 +1,6 @@ // Caused an infinite loop during SimlifyCfg MIR transform previously. // -// build-pass +//@ build-pass fn main() { loop { continue; } diff --git a/tests/ui/issues/issue-7575.rs b/tests/ui/issues/issue-7575.rs index 0074f660c4ef0..8b1fdf6c851e2 100644 --- a/tests/ui/issues/issue-7575.rs +++ b/tests/ui/issues/issue-7575.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { //~ WARN trait `Foo` is never used fn new() -> bool { false } diff --git a/tests/ui/issues/issue-76042.rs b/tests/ui/issues/issue-76042.rs index 34d5293799aa7..279e860459d2c 100644 --- a/tests/ui/issues/issue-76042.rs +++ b/tests/ui/issues/issue-76042.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0 +//@ run-pass +//@ compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0 fn foo(a: i128, b: i128, s: u32) -> (i128, i128) { if s == 128 { diff --git a/tests/ui/issues/issue-7607-2.rs b/tests/ui/issues/issue-7607-2.rs index 420a0ffd3cc4b..654f26bf298d7 100644 --- a/tests/ui/issues/issue-7607-2.rs +++ b/tests/ui/issues/issue-7607-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod a { pub struct Foo { a: usize } diff --git a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed index 8103a7ca47d4e..6fde4e390fa1a 100644 --- a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed +++ b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] pub mod foo { diff --git a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs index 730332853c124..30a8535faf5cc 100644 --- a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs +++ b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] pub mod foo { diff --git a/tests/ui/issues/issue-7660.rs b/tests/ui/issues/issue-7660.rs index ad0b8ecff39e9..4b0f7d84b75e5 100644 --- a/tests/ui/issues/issue-7660.rs +++ b/tests/ui/issues/issue-7660.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for issue 7660 // rvalue lifetime too short when equivalent `match` works -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-7663.rs b/tests/ui/issues/issue-7663.rs index b15e215db0f0c..ad52ea2112704 100644 --- a/tests/ui/issues/issue-7663.rs +++ b/tests/ui/issues/issue-7663.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports, dead_code)] diff --git a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs index c089c33083984..742152b6c8162 100644 --- a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs +++ b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/issues/issue-77218/issue-77218-2.fixed b/tests/ui/issues/issue-77218/issue-77218-2.fixed index 0e835d49c6d58..98d79b5da6561 100644 --- a/tests/ui/issues/issue-77218/issue-77218-2.fixed +++ b/tests/ui/issues/issue-77218/issue-77218-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while let Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218-2.rs b/tests/ui/issues/issue-77218/issue-77218-2.rs index 01dca1ae16c78..3be38f8f721da 100644 --- a/tests/ui/issues/issue-77218/issue-77218-2.rs +++ b/tests/ui/issues/issue-77218/issue-77218-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218.fixed b/tests/ui/issues/issue-77218/issue-77218.fixed index 4907b43b9a985..6ce9dd1c2c57a 100644 --- a/tests/ui/issues/issue-77218/issue-77218.fixed +++ b/tests/ui/issues/issue-77218/issue-77218.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while let Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218.rs b/tests/ui/issues/issue-77218/issue-77218.rs index 0ed154bf4d808..14edc065d0e63 100644 --- a/tests/ui/issues/issue-77218/issue-77218.rs +++ b/tests/ui/issues/issue-77218/issue-77218.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-7784.rs b/tests/ui/issues/issue-7784.rs index b7323f09daff2..90b88ae572764 100644 --- a/tests/ui/issues/issue-7784.rs +++ b/tests/ui/issues/issue-7784.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; diff --git a/tests/ui/issues/issue-78192.rs b/tests/ui/issues/issue-78192.rs index b5c3001599ad7..bec2a82910cfa 100644 --- a/tests/ui/issues/issue-78192.rs +++ b/tests/ui/issues/issue-78192.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] diff --git a/tests/ui/issues/issue-7899.rs b/tests/ui/issues/issue-7899.rs index fb631f83697ed..a2aee240da7a3 100644 --- a/tests/ui/issues/issue-7899.rs +++ b/tests/ui/issues/issue-7899.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-7899.rs +//@ aux-build:issue-7899.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_7899 as testcrate; diff --git a/tests/ui/issues/issue-7911.rs b/tests/ui/issues/issue-7911.rs index 114574b9009d8..11da4df5285f1 100644 --- a/tests/ui/issues/issue-7911.rs +++ b/tests/ui/issues/issue-7911.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // (Closes #7911) Test that we can use the same self expression // with different mutability in macro in two methods diff --git a/tests/ui/issues/issue-8044.rs b/tests/ui/issues/issue-8044.rs index 858f98b654d31..b965e0bbb1077 100644 --- a/tests/ui/issues/issue-8044.rs +++ b/tests/ui/issues/issue-8044.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-8044.rs +//@ run-pass +//@ aux-build:issue-8044.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8044 as minimal; use minimal::{BTree, leaf}; diff --git a/tests/ui/issues/issue-81584.fixed b/tests/ui/issues/issue-81584.fixed index 1cad59f1062c6..c3d33a1b4f8bc 100644 --- a/tests/ui/issues/issue-81584.fixed +++ b/tests/ui/issues/issue-81584.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![vec![0, 1], vec![2]] .into_iter() diff --git a/tests/ui/issues/issue-81584.rs b/tests/ui/issues/issue-81584.rs index 452288db08bd8..27db73aaa2c86 100644 --- a/tests/ui/issues/issue-81584.rs +++ b/tests/ui/issues/issue-81584.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![vec![0, 1], vec![2]] .into_iter() diff --git a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs index 505e7b84b5cd2..88d56185f6bda 100644 --- a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs +++ b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/issues/issue-81918.rs b/tests/ui/issues/issue-81918.rs index 8938b8a6f2c52..ee9721c2493de 100644 --- a/tests/ui/issues/issue-81918.rs +++ b/tests/ui/issues/issue-81918.rs @@ -1,6 +1,6 @@ -// check-pass -// dont-check-compiler-stdout -// compile-flags: -Z unpretty=mir-cfg +//@ check-pass +//@ dont-check-compiler-stdout +//@ compile-flags: -Z unpretty=mir-cfg // This checks that unpretty=mir-cfg does not panic. See #81918. diff --git a/tests/ui/issues/issue-8248.rs b/tests/ui/issues/issue-8248.rs index 94b1a5203b47e..c34575df368c9 100644 --- a/tests/ui/issues/issue-8248.rs +++ b/tests/ui/issues/issue-8248.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } //~ WARN method `dummy` is never used diff --git a/tests/ui/issues/issue-8249.rs b/tests/ui/issues/issue-8249.rs index d09dff3a69709..67a42619316cc 100644 --- a/tests/ui/issues/issue-8249.rs +++ b/tests/ui/issues/issue-8249.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-8259.rs b/tests/ui/issues/issue-8259.rs index 2802bea7fe028..f790e1a2155df 100644 --- a/tests/ui/issues/issue-8259.rs +++ b/tests/ui/issues/issue-8259.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// aux-build:issue-8259.rs +//@ aux-build:issue-8259.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8259 as other; static a: other::Foo<'static> = other::Foo::A; diff --git a/tests/ui/issues/issue-83048.rs b/tests/ui/issues/issue-83048.rs index 8e4fb6eae9dff..6c941133a152c 100644 --- a/tests/ui/issues/issue-83048.rs +++ b/tests/ui/issues/issue-83048.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-tree +//@ compile-flags: -Z unpretty=thir-tree pub fn main() { break; //~ ERROR: `break` outside of a loop or labeled block [E0268] diff --git a/tests/ui/issues/issue-8391.rs b/tests/ui/issues/issue-8391.rs index 1a90369659bd7..20698eed18b7b 100644 --- a/tests/ui/issues/issue-8391.rs +++ b/tests/ui/issues/issue-8391.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = match Some(1) { diff --git a/tests/ui/issues/issue-8398.rs b/tests/ui/issues/issue-8398.rs index 0ef39b6a6b327..6f91b1dbb28ae 100644 --- a/tests/ui/issues/issue-8398.rs +++ b/tests/ui/issues/issue-8398.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Writer { fn write(&mut self, b: &[u8]) -> Result<(), ()>; diff --git a/tests/ui/issues/issue-8401.rs b/tests/ui/issues/issue-8401.rs index 1257bab6c0cd6..b72616bb28f24 100644 --- a/tests/ui/issues/issue-8401.rs +++ b/tests/ui/issues/issue-8401.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-8401.rs +//@ run-pass +//@ aux-build:issue-8401.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8401; diff --git a/tests/ui/issues/issue-8498.rs b/tests/ui/issues/issue-8498.rs index e6241b7610992..92904e2198f68 100644 --- a/tests/ui/issues/issue-8498.rs +++ b/tests/ui/issues/issue-8498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { match &[(Box::new(5),Box::new(7))] { diff --git a/tests/ui/issues/issue-8506.rs b/tests/ui/issues/issue-8506.rs index cc32b89234f21..48abd7efc7b91 100644 --- a/tests/ui/issues/issue-8506.rs +++ b/tests/ui/issues/issue-8506.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-8521.rs b/tests/ui/issues/issue-8521.rs index 15fbd4465a01a..78ce85787d5cf 100644 --- a/tests/ui/issues/issue-8521.rs +++ b/tests/ui/issues/issue-8521.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo1 {} trait A {} diff --git a/tests/ui/issues/issue-85461.rs b/tests/ui/issues/issue-85461.rs index 092105df24e21..7fe7a4aa579fb 100644 --- a/tests/ui/issues/issue-85461.rs +++ b/tests/ui/issues/issue-85461.rs @@ -1,7 +1,7 @@ -// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 -// build-pass -// needs-profiler-support -// needs-dynamic-linking +//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 +//@ build-pass +//@ needs-profiler-support +//@ needs-dynamic-linking // Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries // with dead code and #[inline(always)]. diff --git a/tests/ui/issues/issue-8578.rs b/tests/ui/issues/issue-8578.rs index 2346ef5a950d9..e081d7a541521 100644 --- a/tests/ui/issues/issue-8578.rs +++ b/tests/ui/issues/issue-8578.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct UninterpretedOption_NamePart { name_part: Option, diff --git a/tests/ui/issues/issue-87199.rs b/tests/ui/issues/issue-87199.rs index d16d406767300..081c45d6151dd 100644 --- a/tests/ui/issues/issue-87199.rs +++ b/tests/ui/issues/issue-87199.rs @@ -2,7 +2,7 @@ // other than the only supported `?Sized` would still cause the compiler // to assume that the `Sized` bound was relaxed. -// check-fail +//@ check-fail // Check that these function definitions only emit warnings, not errors fn arg(_: T) {} diff --git a/tests/ui/issues/issue-8727.rs b/tests/ui/issues/issue-8727.rs index a9b8126618fe5..4ef6600037482 100644 --- a/tests/ui/issues/issue-8727.rs +++ b/tests/ui/issues/issue-8727.rs @@ -1,8 +1,8 @@ // Verify the compiler fails with an error on infinite function // recursions. -// build-fail -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" fn generic() { //~ WARN function cannot return without recursing generic::>(); diff --git a/tests/ui/issues/issue-87707.rs b/tests/ui/issues/issue-87707.rs index c14e52dfe4cf4..a0da8a740ac39 100644 --- a/tests/ui/issues/issue-87707.rs +++ b/tests/ui/issues/issue-87707.rs @@ -1,9 +1,9 @@ // test for #87707 -// edition:2018 -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// needs-unwind uses catch_unwind +//@ edition:2018 +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ needs-unwind uses catch_unwind use std::sync::Once; use std::panic; diff --git a/tests/ui/issues/issue-8783.rs b/tests/ui/issues/issue-8783.rs index cfffd9eb0182d..a7c96b69b1893 100644 --- a/tests/ui/issues/issue-8783.rs +++ b/tests/ui/issues/issue-8783.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct X { pub x: usize } impl Default for X { diff --git a/tests/ui/issues/issue-88150.rs b/tests/ui/issues/issue-88150.rs index 555a38637a436..1dadba307c0b5 100644 --- a/tests/ui/issues/issue-88150.rs +++ b/tests/ui/issues/issue-88150.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:-C debuginfo=2 -// edition:2018 +//@ run-pass +//@ compile-flags:-C debuginfo=2 +//@ edition:2018 use core::marker::PhantomData; diff --git a/tests/ui/issues/issue-8860.rs b/tests/ui/issues/issue-8860.rs index b89a80c1307cf..67e9a276ae487 100644 --- a/tests/ui/issues/issue-8860.rs +++ b/tests/ui/issues/issue-8860.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] static mut DROP: isize = 0; diff --git a/tests/ui/issues/issue-8898.rs b/tests/ui/issues/issue-8898.rs index 31d5ff86e7c82..4447704f059c2 100644 --- a/tests/ui/issues/issue-8898.rs +++ b/tests/ui/issues/issue-8898.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn assert_repr_eq(obj : T, expected : String) { assert_eq!(expected, format!("{:?}", obj)); diff --git a/tests/ui/issues/issue-9047.rs b/tests/ui/issues/issue-9047.rs index fa8d75aec7a3b..97733588d514b 100644 --- a/tests/ui/issues/issue-9047.rs +++ b/tests/ui/issues/issue-9047.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] fn decode() -> String { diff --git a/tests/ui/issues/issue-9110.rs b/tests/ui/issues/issue-9110.rs index cbf3c92d0332a..9aeda7d5b1b90 100644 --- a/tests/ui/issues/issue-9110.rs +++ b/tests/ui/issues/issue-9110.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_snake_case)] macro_rules! silly_macro { diff --git a/tests/ui/issues/issue-9123.rs b/tests/ui/issues/issue-9123.rs index 8c21d06c4776f..e554a8c8ff29f 100644 --- a/tests/ui/issues/issue-9123.rs +++ b/tests/ui/issues/issue-9123.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9123.rs +//@ run-pass +//@ aux-build:issue-9123.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9123; diff --git a/tests/ui/issues/issue-9129.rs b/tests/ui/issues/issue-9129.rs index 5d623ed540f76..3856cd133e855 100644 --- a/tests/ui/issues/issue-9129.rs +++ b/tests/ui/issues/issue-9129.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-91489.rs b/tests/ui/issues/issue-91489.rs index f028a4a3c6a63..0566302c4811c 100644 --- a/tests/ui/issues/issue-91489.rs +++ b/tests/ui/issues/issue-91489.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for #91489 diff --git a/tests/ui/issues/issue-9155.rs b/tests/ui/issues/issue-9155.rs index 4b5c451e853ed..e177c5978005c 100644 --- a/tests/ui/issues/issue-9155.rs +++ b/tests/ui/issues/issue-9155.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9155.rs +//@ run-pass +//@ aux-build:issue-9155.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9155; diff --git a/tests/ui/issues/issue-9188.rs b/tests/ui/issues/issue-9188.rs index 34e61fdf68bc0..df2f90a0f16bb 100644 --- a/tests/ui/issues/issue-9188.rs +++ b/tests/ui/issues/issue-9188.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-9188.rs +//@ run-pass +//@ aux-build:issue-9188.rs extern crate issue_9188; diff --git a/tests/ui/issues/issue-9243.rs b/tests/ui/issues/issue-9243.rs index 59fdb466285b4..34ae944d1d866 100644 --- a/tests/ui/issues/issue-9243.rs +++ b/tests/ui/issues/issue-9243.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // Regression test for issue 9243 #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-9249.rs b/tests/ui/issues/issue-9249.rs index caaba668ad7a6..893d01637de30 100644 --- a/tests/ui/issues/issue-9249.rs +++ b/tests/ui/issues/issue-9249.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static DATA:&'static [&'static str] = &["my string"]; fn main() { } diff --git a/tests/ui/issues/issue-9259.rs b/tests/ui/issues/issue-9259.rs index d838edbdd6616..c45288f7d65e1 100644 --- a/tests/ui/issues/issue-9259.rs +++ b/tests/ui/issues/issue-9259.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct A<'a> { diff --git a/tests/ui/issues/issue-92741.fixed b/tests/ui/issues/issue-92741.fixed index d07aeb6c029fe..cb37d25273f4d 100644 --- a/tests/ui/issues/issue-92741.fixed +++ b/tests/ui/issues/issue-92741.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() {} fn _foo() -> bool { if true { true } else { false } diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/issues/issue-92741.rs index 413d5bf047853..f2e5fdafd9cb8 100644 --- a/tests/ui/issues/issue-92741.rs +++ b/tests/ui/issues/issue-92741.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() {} fn _foo() -> bool { & //~ ERROR 4:5: 6:36: mismatched types [E0308] diff --git a/tests/ui/issues/issue-9382.rs b/tests/ui/issues/issue-9382.rs index 65718343fc6a9..4b37e5b381f53 100644 --- a/tests/ui/issues/issue-9382.rs +++ b/tests/ui/issues/issue-9382.rs @@ -1,7 +1,7 @@ -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 -// run-pass +//@ run-pass #![allow(dead_code)] // Tests for a previous bug that occurred due to an interaction diff --git a/tests/ui/issues/issue-9446.rs b/tests/ui/issues/issue-9446.rs index e200840d29051..a6ea91e8785d2 100644 --- a/tests/ui/issues/issue-9446.rs +++ b/tests/ui/issues/issue-9446.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Wrapper(String); impl Wrapper { diff --git a/tests/ui/issues/issue-9719.rs b/tests/ui/issues/issue-9719.rs index e8c3c9c194a38..e48c020328a8a 100644 --- a/tests/ui/issues/issue-9719.rs +++ b/tests/ui/issues/issue-9719.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub enum Enum { diff --git a/tests/ui/issues/issue-9737.rs b/tests/ui/issues/issue-9737.rs index 7d3e05678471e..a8a17e58dd6ff 100644 --- a/tests/ui/issues/issue-9737.rs +++ b/tests/ui/issues/issue-9737.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] macro_rules! f { (v: $x:expr) => ( println!("{}", $x) ) diff --git a/tests/ui/issues/issue-9837.rs b/tests/ui/issues/issue-9837.rs index 5d2c822a5767a..33152a5d077fa 100644 --- a/tests/ui/issues/issue-9837.rs +++ b/tests/ui/issues/issue-9837.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const C1: i32 = 0x12345678; const C2: isize = C1 as i16 as isize; diff --git a/tests/ui/issues/issue-9906.rs b/tests/ui/issues/issue-9906.rs index a2870cf0f6eb7..b425df4975f1c 100644 --- a/tests/ui/issues/issue-9906.rs +++ b/tests/ui/issues/issue-9906.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9906.rs +//@ run-pass +//@ aux-build:issue-9906.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9906 as testmod; diff --git a/tests/ui/issues/issue-9918.rs b/tests/ui/issues/issue-9918.rs index 63ad7040d6764..017e833aefb25 100644 --- a/tests/ui/issues/issue-9918.rs +++ b/tests/ui/issues/issue-9918.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!((0 + 0u8) as char, '\0'); diff --git a/tests/ui/issues/issue-9942.rs b/tests/ui/issues/issue-9942.rs index f4880446526e7..76c9090330669 100644 --- a/tests/ui/issues/issue-9942.rs +++ b/tests/ui/issues/issue-9942.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { const S: usize = 23 as usize; [0; S]; () diff --git a/tests/ui/issues/issue-9951.rs b/tests/ui/issues/issue-9951.rs index 5db3f74efaa3e..42a65c701f76c 100644 --- a/tests/ui/issues/issue-9951.rs +++ b/tests/ui/issues/issue-9951.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-9968.rs b/tests/ui/issues/issue-9968.rs index 3ab90d99af9cc..5ceea056634a1 100644 --- a/tests/ui/issues/issue-9968.rs +++ b/tests/ui/issues/issue-9968.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9968.rs +//@ run-pass +//@ aux-build:issue-9968.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9968 as lib; diff --git a/tests/ui/issues/issue-99838.rs b/tests/ui/issues/issue-99838.rs index 3bddca43daaf3..687b47fbe71a6 100644 --- a/tests/ui/issues/issue-99838.rs +++ b/tests/ui/issues/issue-99838.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::hint; diff --git a/tests/ui/item-name-overload.rs b/tests/ui/item-name-overload.rs index c8a302a2c5b9e..54aa470e59ea1 100644 --- a/tests/ui/item-name-overload.rs +++ b/tests/ui/item-name-overload.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub fn baz() { } diff --git a/tests/ui/iterators/array-of-ranges.rs b/tests/ui/iterators/array-of-ranges.rs index 037540a3e89e6..1ec1032940ad5 100644 --- a/tests/ui/iterators/array-of-ranges.rs +++ b/tests/ui/iterators/array-of-ranges.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [0..1] {} diff --git a/tests/ui/iterators/array.rs b/tests/ui/iterators/array.rs index 5985c74e11fdf..c83c5889967c1 100644 --- a/tests/ui/iterators/array.rs +++ b/tests/ui/iterators/array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [1, 2] {} diff --git a/tests/ui/iterators/into-iter-on-arrays-2018.rs b/tests/ui/iterators/into-iter-on-arrays-2018.rs index 60995170a5164..d23544052362f 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2018.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2018.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-2021.rs b/tests/ui/iterators/into-iter-on-arrays-2021.rs index 158317efe4782..1bda0ebf6cb8e 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2021.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.fixed b/tests/ui/iterators/into-iter-on-arrays-lint.fixed index 5b91aaf9ea554..be754a28ffa92 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.fixed +++ b/tests/ui/iterators/into-iter-on-arrays-lint.fixed @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.rs b/tests/ui/iterators/into-iter-on-arrays-lint.rs index 25b0cef73d777..e4dddb325cd37 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.rs +++ b/tests/ui/iterators/into-iter-on-arrays-lint.rs @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iterator-type-inference-shift.rs b/tests/ui/iterators/into-iterator-type-inference-shift.rs index 9151172fd15ed..b550dc27f5c60 100644 --- a/tests/ui/iterators/into-iterator-type-inference-shift.rs +++ b/tests/ui/iterators/into-iterator-type-inference-shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] @@ -8,7 +8,7 @@ // propagation yet, and so we just saw a type variable, yielding an // error. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait IntoIterator { type Iter: Iterator; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed index 513b5bd13d838..81e532a89235b 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.rs b/tests/ui/iterators/invalid-iterator-chain-fixable.rs index 79b861702c785..06b493d588989 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.rs +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/issue-58952-filter-type-length.rs b/tests/ui/iterators/issue-58952-filter-type-length.rs index 8e9cc84ec0339..9904eddb598ce 100644 --- a/tests/ui/iterators/issue-58952-filter-type-length.rs +++ b/tests/ui/iterators/issue-58952-filter-type-length.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-compare-mode-next-solver (hangs) +//@ run-pass +//@ ignore-compare-mode-next-solver (hangs) //! This snippet causes the type length to blowup exponentially, //! so check that we don't accidentally exceed the type length limit. diff --git a/tests/ui/iterators/iter-cloned-type-inference.rs b/tests/ui/iterators/iter-cloned-type-inference.rs index 898e337197152..10f9558811887 100644 --- a/tests/ui/iterators/iter-cloned-type-inference.rs +++ b/tests/ui/iterators/iter-cloned-type-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // Test to see that the element type of .cloned() can be inferred diff --git a/tests/ui/iterators/iter-count-overflow-debug.rs b/tests/ui/iterators/iter-count-overflow-debug.rs index 8e59c11e9dccb..333d3f258adbc 100644 --- a/tests/ui/iterators/iter-count-overflow-debug.rs +++ b/tests/ui/iterators/iter-count-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-count-overflow-ndebug.rs b/tests/ui/iterators/iter-count-overflow-ndebug.rs index dcaaff671b257..a4d5db2221d21 100644 --- a/tests/ui/iterators/iter-count-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-count-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX); diff --git a/tests/ui/iterators/iter-map-fold-type-length.rs b/tests/ui/iterators/iter-map-fold-type-length.rs index 8ce4fcd873174..6444fb9dada98 100644 --- a/tests/ui/iterators/iter-map-fold-type-length.rs +++ b/tests/ui/iterators/iter-map-fold-type-length.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Check that type lengths don't explode with `Map` folds. //! //! The normal limit is a million, and this test used to exceed 1.5 million, but diff --git a/tests/ui/iterators/iter-position-overflow-debug.rs b/tests/ui/iterators/iter-position-overflow-debug.rs index 7a871e744c984..f27f2233c409f 100644 --- a/tests/ui/iterators/iter-position-overflow-debug.rs +++ b/tests/ui/iterators/iter-position-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-position-overflow-ndebug.rs b/tests/ui/iterators/iter-position-overflow-ndebug.rs index e610c35599c4c..f15cd9ec2a276 100644 --- a/tests/ui/iterators/iter-position-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-position-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { let n = usize::MAX as u64; diff --git a/tests/ui/iterators/iter-range.rs b/tests/ui/iterators/iter-range.rs index 993d93790e039..9594729c06cf0 100644 --- a/tests/ui/iterators/iter-range.rs +++ b/tests/ui/iterators/iter-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn range_(a: isize, b: isize, mut it: F) where F: FnMut(isize) { diff --git a/tests/ui/iterators/iter-step-overflow-debug.rs b/tests/ui/iterators/iter-step-overflow-debug.rs index 6aa349ebed29b..f72e389f551ca 100644 --- a/tests/ui/iterators/iter-step-overflow-debug.rs +++ b/tests/ui/iterators/iter-step-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-step-overflow-ndebug.rs b/tests/ui/iterators/iter-step-overflow-ndebug.rs index 33e708769badb..509b532aaa203 100644 --- a/tests/ui/iterators/iter-step-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-step-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { let mut it = u8::MAX..; diff --git a/tests/ui/iterators/iter-sum-overflow-debug.rs b/tests/ui/iterators/iter-sum-overflow-debug.rs index 24c764ff95873..32efc925a454e 100644 --- a/tests/ui/iterators/iter-sum-overflow-debug.rs +++ b/tests/ui/iterators/iter-sum-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-sum-overflow-ndebug.rs b/tests/ui/iterators/iter-sum-overflow-ndebug.rs index 69f4744cc2a1a..821425ea84e46 100644 --- a/tests/ui/iterators/iter-sum-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-sum-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { assert_eq!([1i32, i32::MAX].iter().sum::(), diff --git a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs index be45c075d7331..8fffd19e2beae 100644 --- a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C overflow-checks +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C overflow-checks use std::panic; diff --git a/tests/ui/iterators/rsplit-clone.rs b/tests/ui/iterators/rsplit-clone.rs index 911da74295722..bdef21f3dd661 100644 --- a/tests/ui/iterators/rsplit-clone.rs +++ b/tests/ui/iterators/rsplit-clone.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // RSplit previously required T: Clone in order to be Clone diff --git a/tests/ui/iterators/skip-count-overflow.rs b/tests/ui/iterators/skip-count-overflow.rs index 64dee3e3c8b20..6f8ca7173fe2b 100644 --- a/tests/ui/iterators/skip-count-overflow.rs +++ b/tests/ui/iterators/skip-count-overflow.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C overflow-checks -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C overflow-checks -C opt-level=3 fn main() { let i = (0..usize::MAX).chain(0..10).skip(usize::MAX); diff --git a/tests/ui/json/json-and-color.rs b/tests/ui/json/json-and-color.rs index 6f8326fe247ba..e5f44cedc80ef 100644 --- a/tests/ui/json/json-and-color.rs +++ b/tests/ui/json/json-and-color.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=artifacts --error-format=json --color never +//@ compile-flags: --json=artifacts --error-format=json --color never fn main() {} diff --git a/tests/ui/json/json-and-error-format.rs b/tests/ui/json/json-and-error-format.rs index 6e2d73c76b7cb..0a00106f726ea 100644 --- a/tests/ui/json/json-and-error-format.rs +++ b/tests/ui/json/json-and-error-format.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=artifacts --error-format=short +//@ compile-flags: --json=artifacts --error-format=short fn main() {} diff --git a/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs b/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs index 991ea1d85d2ca..94b1e188ced97 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs +++ b/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// ignore-test Not a test. Used by other tests +//@ ignore-test Not a test. Used by other tests // ignore-tidy-cr // For easier verifying, the byte offsets in this file should match those diff --git a/tests/ui/json/json-bom-plus-crlf-multifile.rs b/tests/ui/json/json-bom-plus-crlf-multifile.rs index 9290e010403a1..ae608770aae37 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile.rs +++ b/tests/ui/json/json-bom-plus-crlf-multifile.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json // ignore-tidy-cr #[path = "json-bom-plus-crlf-multifile-aux.rs"] diff --git a/tests/ui/json/json-bom-plus-crlf-multifile.stderr b/tests/ui/json/json-bom-plus-crlf-multifile.stderr index 0c6c654d60a15..2ed26f9a8a576 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile.stderr +++ b/tests/ui/json/json-bom-plus-crlf-multifile.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":612,"byte_end":618,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":622,"byte_end":622,"line_start":17,"line_end":17,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":622,"byte_end":623,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":613,"byte_end":619,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":623,"byte_end":623,"line_start":17,"line_end":17,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -52,7 +52,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":672,"byte_end":678,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":682,"byte_end":682,"line_start":19,"line_end":19,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":682,"byte_end":683,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":673,"byte_end":679,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":683,"byte_end":683,"line_start":19,"line_end":19,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -80,7 +80,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":735,"byte_end":741,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":746,"byte_end":746,"line_start":23,"line_end":23,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":746,"byte_end":747,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":736,"byte_end":742,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":747,"byte_end":747,"line_start":23,"line_end":23,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -108,7 +108,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":792,"byte_end":798,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":802,"byte_end":810,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":793,"byte_end":799,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/tests/ui/json/json-bom-plus-crlf.rs b/tests/ui/json/json-bom-plus-crlf.rs index be5b7dd2a86a1..4a309128199fc 100644 --- a/tests/ui/json/json-bom-plus-crlf.rs +++ b/tests/ui/json/json-bom-plus-crlf.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json // ignore-tidy-cr // For easier verifying, the byte offsets in this file should match those diff --git a/tests/ui/json/json-bom-plus-crlf.stderr b/tests/ui/json/json-bom-plus-crlf.stderr index 31dbacb59e1ee..b5e6f658616c3 100644 --- a/tests/ui/json/json-bom-plus-crlf.stderr +++ b/tests/ui/json/json-bom-plus-crlf.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":597,"byte_end":603,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":607,"byte_end":607,"line_start":16,"line_end":16,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":607,"byte_end":608,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":598,"byte_end":604,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":608,"byte_end":608,"line_start":16,"line_end":16,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -52,7 +52,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":657,"byte_end":663,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":667,"byte_end":667,"line_start":18,"line_end":18,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":667,"byte_end":668,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":658,"byte_end":664,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":668,"byte_end":668,"line_start":18,"line_end":18,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -80,7 +80,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":720,"byte_end":726,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":731,"byte_end":731,"line_start":22,"line_end":22,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":731,"byte_end":732,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":721,"byte_end":727,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":732,"byte_end":732,"line_start":22,"line_end":22,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -108,7 +108,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":786,"byte_end":794,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":777,"byte_end":783,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":787,"byte_end":795,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":778,"byte_end":784,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/tests/ui/json/json-invalid.rs b/tests/ui/json/json-invalid.rs index 54d0dd1849a3f..a0d1db76d97aa 100644 --- a/tests/ui/json/json-invalid.rs +++ b/tests/ui/json/json-invalid.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=foo --error-format=json +//@ compile-flags: --json=foo --error-format=json fn main() {} diff --git a/tests/ui/json/json-multiple.rs b/tests/ui/json/json-multiple.rs index fb126339dc216..296a60d24537b 100644 --- a/tests/ui/json/json-multiple.rs +++ b/tests/ui/json/json-multiple.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (different metadata emitted in different modes) -// compile-flags: --json=diagnostic-short --json artifacts --error-format=json +//@ build-pass +//@ ignore-pass (different metadata emitted in different modes) +//@ compile-flags: --json=diagnostic-short --json artifacts --error-format=json #![crate_type = "lib"] diff --git a/tests/ui/json/json-options.rs b/tests/ui/json/json-options.rs index 8b6ba131eb002..33df25e27b6a3 100644 --- a/tests/ui/json/json-options.rs +++ b/tests/ui/json/json-options.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (different metadata emitted in different modes) -// compile-flags: --json=diagnostic-short,artifacts --error-format=json +//@ build-pass +//@ ignore-pass (different metadata emitted in different modes) +//@ compile-flags: --json=diagnostic-short,artifacts --error-format=json #![crate_type = "lib"] diff --git a/tests/ui/json/json-short.rs b/tests/ui/json/json-short.rs index 7414a55869c60..1b8f0b463668e 100644 --- a/tests/ui/json/json-short.rs +++ b/tests/ui/json/json-short.rs @@ -1 +1 @@ -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json diff --git a/tests/ui/json/json-short.stderr b/tests/ui/json/json-short.stderr index a18bceaa6cf10..a3d579cadccff 100644 --- a/tests/ui/json/json-short.stderr +++ b/tests/ui/json/json-short.stderr @@ -13,7 +13,7 @@ If you don't know the basics of Rust, you can look at the [Rust Book][rust-book] to get started. [rust-book]: https://doc.rust-lang.org/book/ -"},"level":"error","spans":[{"file_name":"$DIR/json-short.rs","byte_start":62,"byte_end":62,"line_start":1,"line_end":1,"column_start":63,"column_end":63,"is_primary":true,"text":[{"text":"// compile-flags: --json=diagnostic-short --error-format=json","highlight_start":63,"highlight_end":63}],"label":"consider adding a `main` function to `$DIR/json-short.rs`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-short.rs:1:63: error[E0601]: `main` function not found in crate `json_short` +"},"level":"error","spans":[{"file_name":"$DIR/json-short.rs","byte_start":63,"byte_end":63,"line_start":1,"line_end":1,"column_start":64,"column_end":64,"is_primary":true,"text":[{"text":"//@ compile-flags: --json=diagnostic-short --error-format=json","highlight_start":64,"highlight_end":64}],"label":"consider adding a `main` function to `$DIR/json-short.rs`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-short.rs:1:64: error[E0601]: `main` function not found in crate `json_short` "} {"$message_type":"diagnostic","message":"aborting due to 1 previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 1 previous error "} diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs index 87d47556bdd25..c785736f42e4b 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.rs +++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs @@ -1,6 +1,6 @@ // Test that Copy bounds inherited by trait are checked. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/kinds-in-metadata.rs b/tests/ui/kinds-in-metadata.rs index 136037a7acf74..d557f949c763c 100644 --- a/tests/ui/kinds-in-metadata.rs +++ b/tests/ui/kinds-in-metadata.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:kinds_in_metadata.rs +//@ run-pass +//@ aux-build:kinds_in_metadata.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/label/label-beginning-with-underscore.rs b/tests/ui/label/label-beginning-with-underscore.rs index 4b620864aabf5..d5e076ddf50f4 100644 --- a/tests/ui/label/label-beginning-with-underscore.rs +++ b/tests/ui/label/label-beginning-with-underscore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_labels)] diff --git a/tests/ui/label/label_break_value_desugared_break.rs b/tests/ui/label/label_break_value_desugared_break.rs index 70227d869337d..b7e7fd47c27f3 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 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] -// run-pass +//@ run-pass fn main() { let _: Result<(), ()> = try { 'foo: { diff --git a/tests/ui/label/label_break_value_illegal_uses.fixed b/tests/ui/label/label_break_value_illegal_uses.fixed index fb75276b4f4d1..a22f7a7761020 100644 --- a/tests/ui/label/label_break_value_illegal_uses.fixed +++ b/tests/ui/label/label_break_value_illegal_uses.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // These are forbidden occurrences of label-break-value diff --git a/tests/ui/label/label_break_value_illegal_uses.rs b/tests/ui/label/label_break_value_illegal_uses.rs index 3cbf41380e6c5..a9194c9221d19 100644 --- a/tests/ui/label/label_break_value_illegal_uses.rs +++ b/tests/ui/label/label_break_value_illegal_uses.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // These are forbidden occurrences of label-break-value diff --git a/tests/ui/lambda-infer-unresolved.rs b/tests/ui/lambda-infer-unresolved.rs index 9cc466b28ec51..f30832044dcf1 100644 --- a/tests/ui/lambda-infer-unresolved.rs +++ b/tests/ui/lambda-infer-unresolved.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // This should typecheck even though the type of e is not fully diff --git a/tests/ui/lang-items/duplicate.rs b/tests/ui/lang-items/duplicate.rs index f88d23544145a..2b68fef87c0a7 100644 --- a/tests/ui/lang-items/duplicate.rs +++ b/tests/ui/lang-items/duplicate.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" +//@ normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" #![feature(lang_items)] #[lang = "sized"] diff --git a/tests/ui/lang-items/issue-19660.rs b/tests/ui/lang-items/issue-19660.rs index 400ac310b9649..aff57df7ece98 100644 --- a/tests/ui/lang-items/issue-19660.rs +++ b/tests/ui/lang-items/issue-19660.rs @@ -1,4 +1,4 @@ -// error-pattern: requires `copy` lang_item +//@ error-pattern: requires `copy` lang_item #![feature(lang_items, start, no_core)] #![no_core] diff --git a/tests/ui/lang-items/lang-item-missing.rs b/tests/ui/lang-items/lang-item-missing.rs index 4e26343242e01..8762594202a1c 100644 --- a/tests/ui/lang-items/lang-item-missing.rs +++ b/tests/ui/lang-items/lang-item-missing.rs @@ -1,7 +1,7 @@ // Test that a missing lang item (in this case `sized`) does not cause an ICE, // see #17392. -// error-pattern: requires `sized` lang_item +//@ error-pattern: requires `sized` lang_item #![feature(start, no_core)] #![no_core] diff --git a/tests/ui/lang-items/required-lang-item.rs b/tests/ui/lang-items/required-lang-item.rs index 7f8933ac2ad65..495daf08dd224 100644 --- a/tests/ui/lang-items/required-lang-item.rs +++ b/tests/ui/lang-items/required-lang-item.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 #![feature(lang_items, no_core)] #![no_core] diff --git a/tests/ui/lang-items/start_lang_item_args.rs b/tests/ui/lang-items/start_lang_item_args.rs index 4a0302bcb1528..5bb99e2adc88f 100644 --- a/tests/ui/lang-items/start_lang_item_args.rs +++ b/tests/ui/lang-items/start_lang_item_args.rs @@ -1,6 +1,6 @@ -// check-fail -// revisions: missing_all_args missing_sigpipe_arg missing_ret start_ret too_many_args -// revisions: main_ty main_args main_ret argc argv_inner_ptr argv sigpipe +//@ check-fail +//@ revisions: missing_all_args missing_sigpipe_arg missing_ret start_ret too_many_args +//@ revisions: main_ty main_args main_ret argc argv_inner_ptr argv sigpipe #![feature(lang_items, no_core)] #![no_core] diff --git a/tests/ui/lang-items/start_lang_item_with_target_feature.rs b/tests/ui/lang-items/start_lang_item_with_target_feature.rs index 3052b7bb56373..4717304c5c6b8 100644 --- a/tests/ui/lang-items/start_lang_item_with_target_feature.rs +++ b/tests/ui/lang-items/start_lang_item_with_target_feature.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// check-fail +//@ only-x86_64 +//@ check-fail #![feature(lang_items, no_core, target_feature_11)] #![no_core] diff --git a/tests/ui/last-use-in-block.rs b/tests/ui/last-use-in-block.rs index 1ab847dcd8afc..4a166b97bda4b 100644 --- a/tests/ui/last-use-in-block.rs +++ b/tests/ui/last-use-in-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_parens)] diff --git a/tests/ui/last-use-in-cap-clause.rs b/tests/ui/last-use-in-cap-clause.rs index 98d43463287ad..23c263c98058f 100644 --- a/tests/ui/last-use-in-cap-clause.rs +++ b/tests/ui/last-use-in-cap-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure #1399 stays fixed diff --git a/tests/ui/last-use-is-capture.rs b/tests/ui/last-use-is-capture.rs index 1055fe7995ba6..6e07895f1d301 100644 --- a/tests/ui/last-use-is-capture.rs +++ b/tests/ui/last-use-is-capture.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure #1399 stays fixed diff --git a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs index 4154c27924323..4c2f15d2e95f9 100644 --- a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs +++ b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs @@ -1,5 +1,5 @@ -// aux-build:upstream_alias.rs -// check-pass +//@ aux-build:upstream_alias.rs +//@ check-pass extern crate upstream_alias; diff --git a/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs b/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs index e56a34218e231..76364f0911cae 100644 --- a/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs +++ b/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Gats<'a> { type Assoc; diff --git a/tests/ui/late-bound-lifetimes/issue-36381.rs b/tests/ui/late-bound-lifetimes/issue-36381.rs index 7db56f1dce86c..23ab15c31160a 100644 --- a/tests/ui/late-bound-lifetimes/issue-36381.rs +++ b/tests/ui/late-bound-lifetimes/issue-36381.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #36381. The monomorphization collector was asserting that // there are no projection types, but the `<&str as // StreamOnce>::Position` projection contained a late-bound region, diff --git a/tests/ui/late-bound-lifetimes/issue-47511.rs b/tests/ui/late-bound-lifetimes/issue-47511.rs index 7894435154082..94a68c7a1a6c7 100644 --- a/tests/ui/late-bound-lifetimes/issue-47511.rs +++ b/tests/ui/late-bound-lifetimes/issue-47511.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: X) -> X { unimplemented!() diff --git a/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs b/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs index 91839673c1f7a..719913a44d869 100644 --- a/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs +++ b/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: X) -> X { unimplemented!() diff --git a/tests/ui/late-bound-lifetimes/predicate-is-global.rs b/tests/ui/late-bound-lifetimes/predicate-is-global.rs index be017a3f94fb4..bc8eca5b9b24b 100644 --- a/tests/ui/late-bound-lifetimes/predicate-is-global.rs +++ b/tests/ui/late-bound-lifetimes/predicate-is-global.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc; diff --git a/tests/ui/layout/big-type-no-err.rs b/tests/ui/layout/big-type-no-err.rs index af8191a9cb919..cd90771a9c22d 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 +//@ run-pass trait Foo { type Assoc; } diff --git a/tests/ui/layout/debug.rs b/tests/ui/layout/debug.rs index 65f2f3b89af1f..b917cceafd507 100644 --- a/tests/ui/layout/debug.rs +++ b/tests/ui/layout/debug.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" #![feature(never_type, rustc_attrs, type_alias_impl_trait, repr_simd)] #![crate_type = "lib"] diff --git a/tests/ui/layout/enum.rs b/tests/ui/layout/enum.rs index 7ac2eaa8600c4..bde8450b9d569 100644 --- a/tests/ui/layout/enum.rs +++ b/tests/ui/layout/enum.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various enum layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/hexagon-enum.rs b/tests/ui/layout/hexagon-enum.rs index 4c58537e309ea..e3a5c53671d40 100644 --- a/tests/ui/layout/hexagon-enum.rs +++ b/tests/ui/layout/hexagon-enum.rs @@ -1,5 +1,5 @@ -// compile-flags: --target hexagon-unknown-linux-musl -// needs-llvm-components: hexagon +//@ compile-flags: --target hexagon-unknown-linux-musl +//@ needs-llvm-components: hexagon // // Verify that the hexagon targets implement the repr(C) for enums correctly. // diff --git a/tests/ui/layout/issue-112048-unsizing-field-order.rs b/tests/ui/layout/issue-112048-unsizing-field-order.rs index ebc4b9e98b7ab..7f065759b7a6a 100644 --- a/tests/ui/layout/issue-112048-unsizing-field-order.rs +++ b/tests/ui/layout/issue-112048-unsizing-field-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that unsizing doesn't reorder fields. diff --git a/tests/ui/layout/issue-112048-unsizing-niche.rs b/tests/ui/layout/issue-112048-unsizing-niche.rs index e59e063df99be..f7669100095e8 100644 --- a/tests/ui/layout/issue-112048-unsizing-niche.rs +++ b/tests/ui/layout/issue-112048-unsizing-niche.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that unsizing does not change which field is considered for niche layout. diff --git a/tests/ui/layout/issue-113941.rs b/tests/ui/layout/issue-113941.rs index 7a54e28b35034..e33141f14c895 100644 --- a/tests/ui/layout/issue-113941.rs +++ b/tests/ui/layout/issue-113941.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: normal randomize-layout -// [randomize-layout]compile-flags: -Zrandomize-layout +//@ build-pass +//@ revisions: normal randomize-layout +//@ [randomize-layout]compile-flags: -Zrandomize-layout enum Void {} diff --git a/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs b/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs index 65845d2c9fece..b6450395ac6ba 100644 --- a/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs +++ b/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs @@ -7,7 +7,7 @@ // the compiler would ICE when trying to figure out if `Ref` is a // dynamically-sized type (DST). -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs index af5f5885d67c5..3acacc4559c1b 100644 --- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs +++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/layout/issue-96185-overaligned-enum.rs b/tests/ui/layout/issue-96185-overaligned-enum.rs index ae1e6b012c39b..3889a423906ea 100644 --- a/tests/ui/layout/issue-96185-overaligned-enum.rs +++ b/tests/ui/layout/issue-96185-overaligned-enum.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/layout/layout-cycle.rs b/tests/ui/layout/layout-cycle.rs index 85685058e49f5..3c930def43b2b 100644 --- a/tests/ui/layout/layout-cycle.rs +++ b/tests/ui/layout/layout-cycle.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR: a cycle occurred during layout computation //~| ERROR: cycle detected when computing layout of diff --git a/tests/ui/layout/struct.rs b/tests/ui/layout/struct.rs index e74cf5a952b25..484490a5f780c 100644 --- a/tests/ui/layout/struct.rs +++ b/tests/ui/layout/struct.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various struct layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/thin-meta-implies-thin-ptr.rs b/tests/ui/layout/thin-meta-implies-thin-ptr.rs index 972579ea8be0d..1cf560b683255 100644 --- a/tests/ui/layout/thin-meta-implies-thin-ptr.rs +++ b/tests/ui/layout/thin-meta-implies-thin-ptr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(ptr_metadata)] diff --git a/tests/ui/layout/thumb-enum.rs b/tests/ui/layout/thumb-enum.rs index 3b43b1b83fa6e..57a9a2d813709 100644 --- a/tests/ui/layout/thumb-enum.rs +++ b/tests/ui/layout/thumb-enum.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabihf -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabihf +//@ needs-llvm-components: arm // // Verify that thumb targets implement the repr(C) for enums correctly. // diff --git a/tests/ui/layout/too-big-with-padding.rs b/tests/ui/layout/too-big-with-padding.rs index cf41ac872c21b..76703100145ad 100644 --- a/tests/ui/layout/too-big-with-padding.rs +++ b/tests/ui/layout/too-big-with-padding.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target i686-unknown-linux-gnu --crate-type lib -// needs-llvm-components: x86 +//@ build-fail +//@ compile-flags: --target i686-unknown-linux-gnu --crate-type lib +//@ needs-llvm-components: x86 #![feature(no_core, lang_items)] #![allow(internal_features)] #![no_std] diff --git a/tests/ui/layout/unsafe-cell-hides-niche.rs b/tests/ui/layout/unsafe-cell-hides-niche.rs index e87c402f8f964..b3158839de0d6 100644 --- a/tests/ui/layout/unsafe-cell-hides-niche.rs +++ b/tests/ui/layout/unsafe-cell-hides-niche.rs @@ -3,9 +3,9 @@ // test checks that an `Option>` has the same // size in memory as an `Option>` (namely, 8 bytes). -// check-pass -// compile-flags: --crate-type=lib -// only-x86 +//@ check-pass +//@ compile-flags: --crate-type=lib +//@ only-x86 #![feature(repr_simd)] diff --git a/tests/ui/layout/valid_range_oob.rs b/tests/ui/layout/valid_range_oob.rs index 74aa47fe40549..12f519ff2ca58 100644 --- a/tests/ui/layout/valid_range_oob.rs +++ b/tests/ui/layout/valid_range_oob.rs @@ -1,7 +1,7 @@ -// failure-status: 101 -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ failure-status: 101 +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(rustc_attrs)] diff --git a/tests/ui/layout/zero-sized-array-enum-niche.rs b/tests/ui/layout/zero-sized-array-enum-niche.rs index 23bbbfbfc5881..095afc4337a55 100644 --- a/tests/ui/layout/zero-sized-array-enum-niche.rs +++ b/tests/ui/layout/zero-sized-array-enum-niche.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/lazy-and-or.rs b/tests/ui/lazy-and-or.rs index 0b44a70a569fc..f9dbeb68959a3 100644 --- a/tests/ui/lazy-and-or.rs +++ b/tests/ui/lazy-and-or.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn incr(x: &mut isize) -> bool { *x += 1; assert!((false)); return false; } diff --git a/tests/ui/lazy-type-alias-impl-trait/branches2.rs b/tests/ui/lazy-type-alias-impl-trait/branches2.rs index 04218f5643d1c..467400f1c2445 100644 --- a/tests/ui/lazy-type-alias-impl-trait/branches2.rs +++ b/tests/ui/lazy-type-alias-impl-trait/branches2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::iter::FromIterator + PartialEq> + std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs index 80aba0ba04d85..3f8567c3057a8 100644 --- a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs +++ b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutine_trait, negative_impls)] diff --git a/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs b/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs index d07d732c78570..353b67a382b0c 100644 --- a/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs +++ b/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs b/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs index f75a88aa8f064..a7a17d38c9625 100644 --- a/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs +++ b/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/nested.rs b/tests/ui/lazy-type-alias-impl-trait/nested.rs index f8291112739c1..17adbd2630cef 100644 --- a/tests/ui/lazy-type-alias-impl-trait/nested.rs +++ b/tests/ui/lazy-type-alias-impl-trait/nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs b/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs index 8d03b5158d662..acc306ec698ac 100644 --- a/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs +++ b/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/recursion.rs b/tests/ui/lazy-type-alias-impl-trait/recursion.rs index cf7cd5d26ca2f..5193356059904 100644 --- a/tests/ui/lazy-type-alias-impl-trait/recursion.rs +++ b/tests/ui/lazy-type-alias-impl-trait/recursion.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/recursion2.rs b/tests/ui/lazy-type-alias-impl-trait/recursion2.rs index 6b3d9ff4cdec8..e14da32e1166e 100644 --- a/tests/ui/lazy-type-alias-impl-trait/recursion2.rs +++ b/tests/ui/lazy-type-alias-impl-trait/recursion2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs b/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs index 007101498238d..9f786ff4b5437 100644 --- a/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs +++ b/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs index ec9a67399756b..42adfd274a3de 100644 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs +++ b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete diff --git a/tests/ui/lazy-type-alias/enum-variant.rs b/tests/ui/lazy-type-alias/enum-variant.rs index 6d18e9eca62f5..d9b7dff266473 100644 --- a/tests/ui/lazy-type-alias/enum-variant.rs +++ b/tests/ui/lazy-type-alias/enum-variant.rs @@ -1,5 +1,5 @@ // Regression test for issue #113736. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete and may not be safe to use diff --git a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs index 07389961c4c68..efd7763919840 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs +++ b/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs @@ -1,9 +1,9 @@ // This test serves as a regression test for issue #114468 and it also ensures that we consider // type aliases from external crates that don't have `lazy_type_alias` enabled to be eager. -// aux-crate:eager=eager.rs -// edition: 2021 -// check-pass +//@ aux-crate:eager=eager.rs +//@ edition: 2021 +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs index 31a19161b6c96..07490ad45e001 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs @@ -1,6 +1,6 @@ -// revisions: locally_eager locally_lazy -// aux-crate:lazy=lazy.rs -// edition: 2021 +//@ revisions: locally_eager locally_lazy +//@ aux-crate:lazy=lazy.rs +//@ edition: 2021 // Test that we treat lazy type aliases from external crates as lazy independently of whether the // local crate enables `lazy_type_alias` or not. diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs index c08e45975de10..804801ed591b4 100644 --- a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs +++ b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs @@ -1,7 +1,7 @@ // Check that we imply outlives-bounds on lazy type aliases. -// revisions: pos neg -//[pos] check-pass +//@ revisions: pos neg +//@[pos] check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.fixed b/tests/ui/lazy-type-alias/leading-where-clause.fixed index 07ebc09b30ee6..885556c1efe7f 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.fixed +++ b/tests/ui/lazy-type-alias/leading-where-clause.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.rs b/tests/ui/lazy-type-alias/leading-where-clause.rs index 4a6542934720d..a0a09a2a08ee1 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.rs +++ b/tests/ui/lazy-type-alias/leading-where-clause.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs b/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs index d0abd3ebf24b8..f42ed64684f70 100644 --- a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs +++ b/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs @@ -1,7 +1,7 @@ // Check that we don't issue the lint `type_alias_bounds` for // lazy type aliases since the bounds are indeed enforced. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/variance.rs b/tests/ui/lazy-type-alias/variance.rs index f83215856b859..dae2069502a20 100644 --- a/tests/ui/lazy-type-alias/variance.rs +++ b/tests/ui/lazy-type-alias/variance.rs @@ -1,7 +1,7 @@ // This is a regression test for issue #114221. // Check that we compute variances for lazy type aliases. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/let-else/const-fn.rs b/tests/ui/let-else/const-fn.rs index a3921b8033fc0..802558719f6d8 100644 --- a/tests/ui/let-else/const-fn.rs +++ b/tests/ui/let-else/const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // issue #101932 diff --git a/tests/ui/let-else/issue-100103.rs b/tests/ui/let-else/issue-100103.rs index f5f9b2f5f0634..c90b7958ba047 100644 --- a/tests/ui/let-else/issue-100103.rs +++ b/tests/ui/let-else/issue-100103.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(try_blocks)] diff --git a/tests/ui/let-else/issue-102317.rs b/tests/ui/let-else/issue-102317.rs index 7369b4938eed4..d94410e10a8de 100644 --- a/tests/ui/let-else/issue-102317.rs +++ b/tests/ui/let-else/issue-102317.rs @@ -1,6 +1,6 @@ // issue #102317 -// build-pass -// compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir +//@ build-pass +//@ compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir struct SegmentJob; diff --git a/tests/ui/let-else/issue-99975.rs b/tests/ui/let-else/issue-99975.rs index 5b164f347e7dd..244d946392fc7 100644 --- a/tests/ui/let-else/issue-99975.rs +++ b/tests/ui/let-else/issue-99975.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C opt-level=3 -Zvalidate-mir +//@ run-pass +//@ compile-flags: -C opt-level=3 -Zvalidate-mir diff --git a/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs b/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs index b0a6264a10d45..2a2f4c84eeadc 100644 --- a/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs +++ b/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass diff --git a/tests/ui/let-else/let-else-bindings.rs b/tests/ui/let-else/let-else-bindings.rs index 53ac398b8f523..0ce4bdef031ff 100644 --- a/tests/ui/let-else/let-else-bindings.rs +++ b/tests/ui/let-else/let-else-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // adapted from tests/ui/binding/if-let.rs #![allow(dead_code)] diff --git a/tests/ui/let-else/let-else-bool-binop-init.fixed b/tests/ui/let-else/let-else-bool-binop-init.fixed index 20e558ca909cf..0c8a4e45eb5c5 100644 --- a/tests/ui/let-else/let-else-bool-binop-init.fixed +++ b/tests/ui/let-else/let-else-bool-binop-init.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-bool-binop-init.rs b/tests/ui/let-else/let-else-bool-binop-init.rs index f88179a940b5d..7aa585ad89980 100644 --- a/tests/ui/let-else/let-else-bool-binop-init.rs +++ b/tests/ui/let-else/let-else-bool-binop-init.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-brace-before-else.fixed b/tests/ui/let-else/let-else-brace-before-else.fixed index 2d85e3878cc98..75e8f455982cd 100644 --- a/tests/ui/let-else/let-else-brace-before-else.fixed +++ b/tests/ui/let-else/let-else-brace-before-else.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-brace-before-else.rs b/tests/ui/let-else/let-else-brace-before-else.rs index 5c3375b3f2866..d238cb7231e5a 100644 --- a/tests/ui/let-else/let-else-brace-before-else.rs +++ b/tests/ui/let-else/let-else-brace-before-else.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-deref-coercion-annotated.rs b/tests/ui/let-else/let-else-deref-coercion-annotated.rs index 60fdf825a336a..ac0af172ede0d 100644 --- a/tests/ui/let-else/let-else-deref-coercion-annotated.rs +++ b/tests/ui/let-else/let-else-deref-coercion-annotated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Taken from https://github.com/rust-lang/rust/blob/6cc0a764e082d9c0abcf37a768d5889247ba13e2/compiler/rustc_typeck/src/check/_match.rs#L445-L462 // diff --git a/tests/ui/let-else/let-else-drop-order.rs b/tests/ui/let-else/let-else-drop-order.rs index e91e5de84e4bd..062d56659b529 100644 --- a/tests/ui/let-else/let-else-drop-order.rs +++ b/tests/ui/let-else/let-else-drop-order.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// check-run-results +//@ run-pass +//@ edition:2021 +//@ check-run-results // // Drop order tests for let else // diff --git a/tests/ui/let-else/let-else-irrefutable.rs b/tests/ui/let-else/let-else-irrefutable.rs index f4b338eb0af95..f9675ff5938eb 100644 --- a/tests/ui/let-else/let-else-irrefutable.rs +++ b/tests/ui/let-else/let-else-irrefutable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let x = 1 else { return }; //~ WARN irrefutable `let...else` pattern diff --git a/tests/ui/let-else/let-else-non-copy.rs b/tests/ui/let-else/let-else-non-copy.rs index 08c07dd1a43ac..4f59824396ef5 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 +//@ run-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-ref-bindings-pass.rs b/tests/ui/let-else/let-else-ref-bindings-pass.rs index 62fc65731cd2f..b37825bc56735 100644 --- a/tests/ui/let-else/let-else-ref-bindings-pass.rs +++ b/tests/ui/let-else/let-else-ref-bindings-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/let-else/let-else-run-pass.rs b/tests/ui/let-else/let-else-run-pass.rs index a0fb6c683f8ce..e0a1cd75fd7a6 100644 --- a/tests/ui/let-else/let-else-run-pass.rs +++ b/tests/ui/let-else/let-else-run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/let-else/let-else-source-expr-nomove-pass.rs b/tests/ui/let-else/let-else-source-expr-nomove-pass.rs index ee378abcf2bad..ee82e45dc9868 100644 --- a/tests/ui/let-else/let-else-source-expr-nomove-pass.rs +++ b/tests/ui/let-else/let-else-source-expr-nomove-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // issue #89688 diff --git a/tests/ui/let-else/let-else-temp-borrowck.rs b/tests/ui/let-else/let-else-temp-borrowck.rs index 6b4642d2f9852..32fb8509a4754 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 +//@ run-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/let-else/let-else-temporary-lifetime.rs b/tests/ui/let-else/let-else-temporary-lifetime.rs index c23eaa997fe4d..7fa2f4afc315d 100644 --- a/tests/ui/let-else/let-else-temporary-lifetime.rs +++ b/tests/ui/let-else/let-else-temporary-lifetime.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zvalidate-mir +//@ run-pass +//@ compile-flags: -Zvalidate-mir use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/let-else/let-else.rs b/tests/ui/let-else/let-else.rs index 3505533e63f14..01a92e4358719 100644 --- a/tests/ui/let-else/let-else.rs +++ b/tests/ui/let-else/let-else.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let Some(x) = Some(1) else { diff --git a/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs b/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs index 5b528d6e1e144..f615ae7e95b75 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 +//@ run-pass // ignore-tidy-cr // nondoc comment with bare CR: ' ' diff --git a/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs b/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs index 9ba01540aaf23..b355997a4b370 100644 --- a/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs +++ b/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-cr // ignore-tidy-cr (repeated again because of tidy bug) // license is ignored because tidy can't handle the CRLF here properly. diff --git a/tests/ui/lexical-scoping.rs b/tests/ui/lexical-scoping.rs index 04904958a6cae..f858369f7ce7e 100644 --- a/tests/ui/lexical-scoping.rs +++ b/tests/ui/lexical-scoping.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that items in subscopes can shadow type parameters and local variables (see issue #23880). #![allow(unused)] diff --git a/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs b/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs index 05e3763e9d103..da41e17c4173d 100644 --- a/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs +++ b/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // issue: #115807 trait Chip: for<'a> TraitWithLifetime<'a> + SomeMarker { diff --git a/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs index 0335f72b7846f..35ef6fc019dd6 100644 --- a/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs +++ b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lifetimes/bare-trait-object-borrowck.rs b/tests/ui/lifetimes/bare-trait-object-borrowck.rs index 45f5e4ae129a1..c54d3effffe52 100644 --- a/tests/ui/lifetimes/bare-trait-object-borrowck.rs +++ b/tests/ui/lifetimes/bare-trait-object-borrowck.rs @@ -1,5 +1,5 @@ #![allow(bare_trait_objects)] -// check-pass +//@ check-pass pub struct FormatWith<'a, I, F> { sep: &'a str, /// FormatWith uses interior mutability because Display::fmt takes &self. diff --git a/tests/ui/lifetimes/bare-trait-object.rs b/tests/ui/lifetimes/bare-trait-object.rs index 9eff618c734d5..2feb8a880b1d9 100644 --- a/tests/ui/lifetimes/bare-trait-object.rs +++ b/tests/ui/lifetimes/bare-trait-object.rs @@ -1,5 +1,5 @@ // Verify that lifetime resolution correctly accounts for `Fn` bare trait objects. -// check-pass +//@ check-pass #![allow(bare_trait_objects)] // This should work as: fn next_u32(fill_buf: &mut dyn FnMut(&mut [u8])) diff --git a/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs index 69a7b61bab418..a6dc50a54ce53 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs @@ -1,5 +1,5 @@ // Verify that elided lifetimes inside anonymous constants are not forced to be `'static`. -// check-pass +//@ check-pass fn foo() -> [(); { let a = 10_usize; diff --git a/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs index c1425fa4243d5..00730615ed629 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S { _t: T, diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs index 9c9965d8fb8b5..f821b83f37ae0 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a>(&'a ()); diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs index ff84d25114960..4011f6c9687ce 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a> { x: &'a (), diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs index b9d2711fd9cbb..7797ed13b002c 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Sqlite {} diff --git a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed index aa3bce2945b68..2ceaaf0339d92 100644 --- a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed +++ b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Greeter0 { fn greet(&self); diff --git a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs index 20c88ec69813a..e7d427517b5f1 100644 --- a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs +++ b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Greeter0 { fn greet(&self); diff --git a/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs b/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs index 5d5429ec895be..a1d5488bbbd14 100644 --- a/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs +++ b/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_lifetimes)] trait Trait2 { diff --git a/tests/ui/lifetimes/issue-105227.fixed b/tests/ui/lifetimes/issue-105227.fixed index f6ed9c82e9158..ef64e1e654169 100644 --- a/tests/ui/lifetimes/issue-105227.fixed +++ b/tests/ui/lifetimes/issue-105227.fixed @@ -1,6 +1,6 @@ // Regression test for issue #105227. -// run-rustfix +//@ run-rustfix #![allow(warnings)] fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator + 'a { //~^ HELP to declare that `impl Iterator` captures `'_`, you can introduce a named lifetime parameter `'a` diff --git a/tests/ui/lifetimes/issue-105227.rs b/tests/ui/lifetimes/issue-105227.rs index 6427a50bb87e2..f37765ffafa1b 100644 --- a/tests/ui/lifetimes/issue-105227.rs +++ b/tests/ui/lifetimes/issue-105227.rs @@ -1,6 +1,6 @@ // Regression test for issue #105227. -// run-rustfix +//@ run-rustfix #![allow(warnings)] fn chars0(v :(& str, &str)) -> impl Iterator { //~^ HELP to declare that `impl Iterator` captures `'_`, you can introduce a named lifetime parameter `'a` diff --git a/tests/ui/lifetimes/issue-105507.fixed b/tests/ui/lifetimes/issue-105507.fixed index 277ce8a77e974..177da01b154b3 100644 --- a/tests/ui/lifetimes/issue-105507.fixed +++ b/tests/ui/lifetimes/issue-105507.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // #![allow(warnings)] struct Wrapper<'a, T: ?Sized>(&'a T); diff --git a/tests/ui/lifetimes/issue-105507.rs b/tests/ui/lifetimes/issue-105507.rs index f46c6b6f21e86..858fa19a0295b 100644 --- a/tests/ui/lifetimes/issue-105507.rs +++ b/tests/ui/lifetimes/issue-105507.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // #![allow(warnings)] struct Wrapper<'a, T: ?Sized>(&'a T); diff --git a/tests/ui/lifetimes/issue-36744-without-calls.rs b/tests/ui/lifetimes/issue-36744-without-calls.rs index dc5dc4f13c0b8..def88453b6c2d 100644 --- a/tests/ui/lifetimes/issue-36744-without-calls.rs +++ b/tests/ui/lifetimes/issue-36744-without-calls.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Tests for an LLVM abort when storing a lifetime-parametric fn into // context that is expecting one that is not lifetime-parametric // (i.e., has no `for <'_>`). diff --git a/tests/ui/lifetimes/issue-54378.rs b/tests/ui/lifetimes/issue-54378.rs index aa42d4a7c41f6..b835b08d31e9c 100644 --- a/tests/ui/lifetimes/issue-54378.rs +++ b/tests/ui/lifetimes/issue-54378.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #54378. diff --git a/tests/ui/lifetimes/issue-67498.rs b/tests/ui/lifetimes/issue-67498.rs index 8d88264353a72..b921aabf89da2 100644 --- a/tests/ui/lifetimes/issue-67498.rs +++ b/tests/ui/lifetimes/issue-67498.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #67498. diff --git a/tests/ui/lifetimes/issue-69314.fixed b/tests/ui/lifetimes/issue-69314.fixed index 41116d4ea6170..285d192b44c76 100644 --- a/tests/ui/lifetimes/issue-69314.fixed +++ b/tests/ui/lifetimes/issue-69314.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code, unused_mut, unused_variables)] struct A {} struct Msg<'a> { diff --git a/tests/ui/lifetimes/issue-69314.rs b/tests/ui/lifetimes/issue-69314.rs index 17445341eb689..345f77850608d 100644 --- a/tests/ui/lifetimes/issue-69314.rs +++ b/tests/ui/lifetimes/issue-69314.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code, unused_mut, unused_variables)] struct A {} struct Msg<'a> { diff --git a/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs index b9aab27142e31..1dbe4f35ca883 100644 --- a/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs +++ b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn assert_static(_: T) {} diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs index 348586fa26bcc..ab6581686150e 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Trait { type Output; diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs index 782c38200a06f..03913869503c5 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(unboxed_closures)] use std::future::Future; diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives.rs b/tests/ui/lifetimes/issue-76168-hr-outlives.rs index 9366e94c90ff5..3a45ec8143a76 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(unboxed_closures)] use std::future::Future; diff --git a/tests/ui/lifetimes/issue-77175.rs b/tests/ui/lifetimes/issue-77175.rs index 8072691ae3c9b..aa4cde8857130 100644 --- a/tests/ui/lifetimes/issue-77175.rs +++ b/tests/ui/lifetimes/issue-77175.rs @@ -1,6 +1,6 @@ #[deny(single_use_lifetimes)] -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass // Prior to the fix, the compiler complained that the 'a lifetime was only used // once. This was obviously wrong since the lifetime is used twice: For the s3 diff --git a/tests/ui/lifetimes/issue-83737-binders-across-types.rs b/tests/ui/lifetimes/issue-83737-binders-across-types.rs index e130561e46673..d20c84dae3f79 100644 --- a/tests/ui/lifetimes/issue-83737-binders-across-types.rs +++ b/tests/ui/lifetimes/issue-83737-binders-across-types.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --edition 2018 -// compile-flags: --crate-type rlib +//@ build-pass +//@ compile-flags: --edition 2018 +//@ compile-flags: --crate-type rlib use std::future::Future; diff --git a/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs index c496a3556c84e..466bcdc6be0fc 100644 --- a/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs +++ b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --edition 2018 -// compile-flags: --crate-type rlib +//@ build-pass +//@ compile-flags: --edition 2018 +//@ compile-flags: --crate-type rlib use std::future::Future; diff --git a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs index 7f0ea730dd37b..a47e71afcf0b1 100644 --- a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs +++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct Foo {} impl Foo { diff --git a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs index 604687ce71126..4e093bb2e17dc 100644 --- a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs +++ b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail static STATIC_VAR_FIVE: &One(); //~^ cannot find type diff --git a/tests/ui/lifetimes/issue-84398.rs b/tests/ui/lifetimes/issue-84398.rs index 1912fa59b7990..cc59f14e6a83e 100644 --- a/tests/ui/lifetimes/issue-84398.rs +++ b/tests/ui/lifetimes/issue-84398.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Deserialize<'de>: Sized {} pub trait DeserializeOwned: for<'de> Deserialize<'de> {} diff --git a/tests/ui/lifetimes/issue-84604.rs b/tests/ui/lifetimes/issue-84604.rs index b315ef0519071..3f83b0c1cd3ca 100644 --- a/tests/ui/lifetimes/issue-84604.rs +++ b/tests/ui/lifetimes/issue-84604.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Csymbol-mangling-version=v0 +//@ run-pass +//@ compile-flags: -Csymbol-mangling-version=v0 pub fn f() {} pub trait Frob {} diff --git a/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed index bd85da1a76384..1963b8bd907be 100644 --- a/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime may not live long enough diff --git a/tests/ui/lifetimes/issue-90170-elision-mismatch.rs b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs index 3c495368bbc37..c32f4d5c8beb4 100644 --- a/tests/ui/lifetimes/issue-90170-elision-mismatch.rs +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime may not live long enough diff --git a/tests/ui/lifetimes/issue-91763.rs b/tests/ui/lifetimes/issue-91763.rs index 2e8807fe639ac..5df69cff3be7d 100644 --- a/tests/ui/lifetimes/issue-91763.rs +++ b/tests/ui/lifetimes/issue-91763.rs @@ -1,4 +1,4 @@ -// aux-build:issue-91763-aux.rs +//@ aux-build:issue-91763-aux.rs #![deny(elided_lifetimes_in_paths)] diff --git a/tests/ui/lifetimes/issue-93911.rs b/tests/ui/lifetimes/issue-93911.rs index b7ccac1ee521c..0452472b3e2b1 100644 --- a/tests/ui/lifetimes/issue-93911.rs +++ b/tests/ui/lifetimes/issue-93911.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs index 0d030370527b2..98bc673be256d 100644 --- a/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs +++ b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs @@ -1,4 +1,4 @@ -// aux-build:lifetime_bound_will_change_warning_lib.rs +//@ aux-build:lifetime_bound_will_change_warning_lib.rs // Test that various corner cases cause an error. These are tests // that used to pass before we tweaked object defaults. diff --git a/tests/ui/lifetimes/nested.rs b/tests/ui/lifetimes/nested.rs index f3f1f2016f237..2d1b963d8d02d 100644 --- a/tests/ui/lifetimes/nested.rs +++ b/tests/ui/lifetimes/nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn method<'a>(_i: &'a i32) { fn inner<'a>(_j: &'a f32) {} diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed index 7c41549043915..d3616c0b1750d 100644 --- a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs index d6ce112ec93d4..8d89460076764 100644 --- a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/limits/huge-array-simple-32.rs b/tests/ui/limits/huge-array-simple-32.rs index f25b8887402ea..6ff981cd160ab 100644 --- a/tests/ui/limits/huge-array-simple-32.rs +++ b/tests/ui/limits/huge-array-simple-32.rs @@ -1,5 +1,5 @@ -// ignore-64bit -// build-fail +//@ ignore-64bit +//@ build-fail #![allow(arithmetic_overflow)] diff --git a/tests/ui/limits/huge-array-simple-64.rs b/tests/ui/limits/huge-array-simple-64.rs index c5778c428ae61..13b284503bf52 100644 --- a/tests/ui/limits/huge-array-simple-64.rs +++ b/tests/ui/limits/huge-array-simple-64.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit #![allow(arithmetic_overflow)] diff --git a/tests/ui/limits/huge-array.rs b/tests/ui/limits/huge-array.rs index 811cf25dd7681..97cfd1ff8fb2c 100644 --- a/tests/ui/limits/huge-array.rs +++ b/tests/ui/limits/huge-array.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn generic(t: T) { let s: [T; 1518600000] = [t; 1518600000]; diff --git a/tests/ui/limits/huge-enum.rs b/tests/ui/limits/huge-enum.rs index dd4bae60d3e0d..a6e6c5b73beea 100644 --- a/tests/ui/limits/huge-enum.rs +++ b/tests/ui/limits/huge-enum.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" -// normalize-stderr-test "\[u32; \d+\]" -> "TYPE" +//@ build-fail +//@ normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" +//@ normalize-stderr-test "\[u32; \d+\]" -> "TYPE" #[cfg(target_pointer_width = "32")] type BIG = Option<[u32; (1<<29)-1]>; diff --git a/tests/ui/limits/huge-struct.rs b/tests/ui/limits/huge-struct.rs index 904e2774b199c..c9fd56b3a578a 100644 --- a/tests/ui/limits/huge-struct.rs +++ b/tests/ui/limits/huge-struct.rs @@ -1,7 +1,7 @@ -// build-fail -// normalize-stderr-test "S32" -> "SXX" -// normalize-stderr-test "S1M" -> "SXX" -// error-pattern: too big for the current +//@ build-fail +//@ normalize-stderr-test "S32" -> "SXX" +//@ normalize-stderr-test "S1M" -> "SXX" +//@ error-pattern: too big for the current struct S32 { v0: T, diff --git a/tests/ui/limits/issue-15919-32.rs b/tests/ui/limits/issue-15919-32.rs index 3254cb2c5bbf1..d1d1c33918130 100644 --- a/tests/ui/limits/issue-15919-32.rs +++ b/tests/ui/limits/issue-15919-32.rs @@ -1,5 +1,5 @@ -// ignore-64bit -// build-fail +//@ ignore-64bit +//@ build-fail fn main() { let x = [0usize; 0xffff_ffff]; //~ ERROR too big diff --git a/tests/ui/limits/issue-15919-64.rs b/tests/ui/limits/issue-15919-64.rs index 272e8800d6861..7e6200882a966 100644 --- a/tests/ui/limits/issue-15919-64.rs +++ b/tests/ui/limits/issue-15919-64.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit fn main() { let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big diff --git a/tests/ui/limits/issue-17913.rs b/tests/ui/limits/issue-17913.rs index 6b37d6f0551e1..5df8c48c7ec0c 100644 --- a/tests/ui/limits/issue-17913.rs +++ b/tests/ui/limits/issue-17913.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; usize::MAX]" -// error-pattern: too big for the current architecture +//@ build-fail +//@ normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; usize::MAX]" +//@ error-pattern: too big for the current architecture #[cfg(target_pointer_width = "64")] fn main() { diff --git a/tests/ui/limits/issue-55878.rs b/tests/ui/limits/issue-55878.rs index c1c54646db871..1372433e11a57 100644 --- a/tests/ui/limits/issue-55878.rs +++ b/tests/ui/limits/issue-55878.rs @@ -1,8 +1,8 @@ -// build-fail -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ build-fail +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" -// error-pattern: are too big for the current architecture +//@ error-pattern: are too big for the current architecture fn main() { println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>()); } diff --git a/tests/ui/limits/issue-56762.rs b/tests/ui/limits/issue-56762.rs index 1c7facb045d46..17b3ad8b01e2d 100644 --- a/tests/ui/limits/issue-56762.rs +++ b/tests/ui/limits/issue-56762.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 const HUGE_SIZE: usize = !0usize / 8; diff --git a/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs b/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs index 2560ffe168be5..9c150c119d069 100644 --- a/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs +++ b/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs @@ -1,6 +1,6 @@ -// build-fail -// only-x86_64 -// compile-flags: -Zmir-opt-level=0 +//@ build-fail +//@ only-x86_64 +//@ compile-flags: -Zmir-opt-level=0 fn main() { Bug::V([0; !0]); //~ ERROR are too big for the current diff --git a/tests/ui/limits/issue-75158-64.rs b/tests/ui/limits/issue-75158-64.rs index 06c209c078f19..b294b147a91a2 100644 --- a/tests/ui/limits/issue-75158-64.rs +++ b/tests/ui/limits/issue-75158-64.rs @@ -1,7 +1,7 @@ //~ ERROR -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit struct S { x: [T; !0], diff --git a/tests/ui/link-section.rs b/tests/ui/link-section.rs index 48efb07ff48bc..9299b4d08b231 100644 --- a/tests/ui/link-section.rs +++ b/tests/ui/link-section.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #[cfg(not(target_os = "macos"))] diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs b/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs index 0a296f0b2ef4c..49a46b202e4b1 100644 --- a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs +++ b/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(link_cfg)] #![crate_type = "rlib"] diff --git a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs index ce8d9848e4250..61eb4fb66b571 100644 --- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs +++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs @@ -1,6 +1,6 @@ -// build-fail -// failure-status: 101 -// known-bug: #109681 +//@ build-fail +//@ failure-status: 101 +//@ known-bug: #109681 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero // initializers, since it generates invalid LLVM IR. diff --git a/tests/ui/linkage-attr/incompatible-flavor.rs b/tests/ui/linkage-attr/incompatible-flavor.rs index 90c2b612f22da..acf720bc97a13 100644 --- a/tests/ui/linkage-attr/incompatible-flavor.rs +++ b/tests/ui/linkage-attr/incompatible-flavor.rs @@ -1,6 +1,6 @@ -// compile-flags: --target=x86_64-unknown-linux-gnu -C linker-flavor=msvc --crate-type=rlib -// error-pattern: linker flavor `msvc` is incompatible with the current target -// needs-llvm-components: +//@ compile-flags: --target=x86_64-unknown-linux-gnu -C linker-flavor=msvc --crate-type=rlib +//@ error-pattern: linker flavor `msvc` is incompatible with the current target +//@ needs-llvm-components: #![feature(no_core)] #![no_core] diff --git a/tests/ui/linkage-attr/issue-10755.rs b/tests/ui/linkage-attr/issue-10755.rs index 0df5d842cb2a0..58d5b5ead573c 100644 --- a/tests/ui/linkage-attr/issue-10755.rs +++ b/tests/ui/linkage-attr/issue-10755.rs @@ -1,7 +1,7 @@ -// build-fail -// dont-check-compiler-stderr -// compile-flags: -C linker=llllll -// error-pattern: `llllll` +//@ build-fail +//@ dont-check-compiler-stderr +//@ compile-flags: -C linker=llllll +//@ error-pattern: `llllll` // Before, the error-pattern checked for "not found". On WSL with appendWindowsPath=true, running // in invalid command returns a PermissionDenied instead. diff --git a/tests/ui/linkage-attr/link-cfg-works.rs b/tests/ui/linkage-attr/link-cfg-works.rs index 254091ff2508c..7b936bc43b1a0 100644 --- a/tests/ui/linkage-attr/link-cfg-works.rs +++ b/tests/ui/linkage-attr/link-cfg-works.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:link-cfg-works-transitive-rlib.rs -// aux-build:link-cfg-works-transitive-dylib.rs +//@ run-pass +//@ aux-build:link-cfg-works-transitive-rlib.rs +//@ aux-build:link-cfg-works-transitive-dylib.rs #![feature(link_cfg)] diff --git a/tests/ui/linkage-attr/link-self-contained-consistency.rs b/tests/ui/linkage-attr/link-self-contained-consistency.rs index 9be72f559a9c4..def63233e9414 100644 --- a/tests/ui/linkage-attr/link-self-contained-consistency.rs +++ b/tests/ui/linkage-attr/link-self-contained-consistency.rs @@ -1,10 +1,10 @@ // Checks that self-contained linking components cannot be both enabled and disabled at the same // time on the CLI. -// check-fail -// revisions: one many -// [one] compile-flags: -Clink-self-contained=-linker -Clink-self-contained=+linker -Zunstable-options -// [many] compile-flags: -Clink-self-contained=+linker,+crto -Clink-self-contained=-linker,-crto -Zunstable-options +//@ check-fail +//@ revisions: one many +//@ [one] compile-flags: -Clink-self-contained=-linker -Clink-self-contained=+linker -Zunstable-options +//@ [many] compile-flags: -Clink-self-contained=+linker,+crto -Clink-self-contained=-linker,-crto -Zunstable-options // ignore-tidy-linelength fn main() {} diff --git a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs index 3a0910658b7a9..b43df63411217 100644 --- a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs +++ b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs @@ -2,10 +2,10 @@ // collision on the symbol generated for the external linkage item in // an extern crate. -// build-fail -// aux-build:def_colliding_external.rs +//@ build-fail +//@ aux-build:def_colliding_external.rs // FIXME(#83838) codegen-units=1 triggers llvm asserts -// compile-flags: -Ccodegen-units=16 +//@ compile-flags: -Ccodegen-units=16 extern crate def_colliding_external as dep1; diff --git a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs index c1df9ccef2273..df952504eef7a 100644 --- a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs +++ b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs @@ -1,6 +1,6 @@ -// build-fail +//@ build-fail // FIXME(#83838) codegen-units=1 triggers llvm asserts -// compile-flags: -Ccodegen-units=16 +//@ compile-flags: -Ccodegen-units=16 #![feature(linkage)] mod dep1 { diff --git a/tests/ui/linkage-attr/linkage-import.rs b/tests/ui/linkage-attr/linkage-import.rs index f754ddc6e08fd..838d1fc29a238 100644 --- a/tests/ui/linkage-attr/linkage-import.rs +++ b/tests/ui/linkage-attr/linkage-import.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build:def_external.rs +//@ build-pass +//@ aux-build:def_external.rs extern crate def_external as dep; diff --git a/tests/ui/linkage-attr/linkage1.rs b/tests/ui/linkage-attr/linkage1.rs index deab7a251cbd4..2edb80bf1b025 100644 --- a/tests/ui/linkage-attr/linkage1.rs +++ b/tests/ui/linkage-attr/linkage1.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows -// ignore-macos -// ignore-emscripten doesn't support this linkage -// ignore-sgx weak linkage not permitted -// aux-build:linkage1.rs +//@ run-pass +//@ ignore-windows +//@ ignore-macos +//@ ignore-emscripten doesn't support this linkage +//@ ignore-sgx weak linkage not permitted +//@ aux-build:linkage1.rs #![feature(linkage)] diff --git a/tests/ui/linkage-attr/linkage2.rs b/tests/ui/linkage-attr/linkage2.rs index aa42874f7ba8a..b1e64dabac7f8 100644 --- a/tests/ui/linkage-attr/linkage2.rs +++ b/tests/ui/linkage-attr/linkage2.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(linkage)] diff --git a/tests/ui/linkage-attr/linkage3.rs b/tests/ui/linkage-attr/linkage3.rs index cac10af6338d7..f95e5eecc48f7 100644 --- a/tests/ui/linkage-attr/linkage3.rs +++ b/tests/ui/linkage-attr/linkage3.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(linkage)] diff --git a/tests/ui/linkage-attr/unstable-flavor.rs b/tests/ui/linkage-attr/unstable-flavor.rs index c2c16b28bff10..82d9dff38741c 100644 --- a/tests/ui/linkage-attr/unstable-flavor.rs +++ b/tests/ui/linkage-attr/unstable-flavor.rs @@ -2,13 +2,13 @@ // unique codepath checking all unstable options (see `LinkerFlavorCli::is_unstable` and its // caller). If it passes, all the other unstable options are rejected as well. // -// revisions: bpf ptx -// [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf --crate-type=rlib -// [bpf] error-pattern: linker flavor `bpf` is unstable, the `-Z unstable-options` flag -// [bpf] needs-llvm-components: -// [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx --crate-type=rlib -// [ptx] error-pattern: linker flavor `ptx` is unstable, the `-Z unstable-options` flag -// [ptx] needs-llvm-components: +//@ revisions: bpf ptx +//@ [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf --crate-type=rlib +//@ [bpf] error-pattern: linker flavor `bpf` is unstable, the `-Z unstable-options` flag +//@ [bpf] needs-llvm-components: +//@ [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx --crate-type=rlib +//@ [ptx] error-pattern: linker flavor `ptx` is unstable, the `-Z unstable-options` flag +//@ [ptx] needs-llvm-components: #![feature(no_core)] #![no_core] diff --git a/tests/ui/lint-group-denied-lint-allowed.rs b/tests/ui/lint-group-denied-lint-allowed.rs index 8156b6ef617e6..86b63bb31e3c7 100644 --- a/tests/ui/lint-group-denied-lint-allowed.rs +++ b/tests/ui/lint-group-denied-lint-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -D unused -A unused-variables +//@ check-pass +//@ compile-flags: -D unused -A unused-variables fn main() { let x = 1; diff --git a/tests/ui/lint-group-forbid-always-trumps-cli.rs b/tests/ui/lint-group-forbid-always-trumps-cli.rs index 77b792f98d5b1..4b63452bf5d46 100644 --- a/tests/ui/lint-group-forbid-always-trumps-cli.rs +++ b/tests/ui/lint-group-forbid-always-trumps-cli.rs @@ -1,4 +1,4 @@ -// compile-flags: -F unused -A unused +//@ compile-flags: -F unused -A unused fn main() { let x = 1; diff --git a/tests/ui/lint-unknown-lints-at-crate-level.rs b/tests/ui/lint-unknown-lints-at-crate-level.rs index 61d27f1eff199..c8cf65ce93a9a 100644 --- a/tests/ui/lint-unknown-lints-at-crate-level.rs +++ b/tests/ui/lint-unknown-lints-at-crate-level.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -D warnings -D unknown-lints +//@ run-pass +//@ compile-flags: -D warnings -D unknown-lints #![allow(unknown_lints)] #![allow(random_lint_name)] diff --git a/tests/ui/lint/auxiliary/add-impl.rs b/tests/ui/lint/auxiliary/add-impl.rs index 9d0e3068aed73..7ee4a4e4fde64 100644 --- a/tests/ui/lint/auxiliary/add-impl.rs +++ b/tests/ui/lint/auxiliary/add-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lint/auxiliary/stability-cfg2.rs b/tests/ui/lint/auxiliary/stability-cfg2.rs index c995038e5a8a7..ed69d26a9cb1e 100644 --- a/tests/ui/lint/auxiliary/stability-cfg2.rs +++ b/tests/ui/lint/auxiliary/stability-cfg2.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg foo +//@ compile-flags:--cfg foo #![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))] #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] diff --git a/tests/ui/lint/auxiliary/stability_cfg2.rs b/tests/ui/lint/auxiliary/stability_cfg2.rs index c995038e5a8a7..ed69d26a9cb1e 100644 --- a/tests/ui/lint/auxiliary/stability_cfg2.rs +++ b/tests/ui/lint/auxiliary/stability_cfg2.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg foo +//@ compile-flags:--cfg foo #![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))] #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] diff --git a/tests/ui/lint/bad-lint-cap.rs b/tests/ui/lint/bad-lint-cap.rs index e65c8319d1ad3..aab3f723796d6 100644 --- a/tests/ui/lint/bad-lint-cap.rs +++ b/tests/ui/lint/bad-lint-cap.rs @@ -1,4 +1,4 @@ -// compile-flags: --cap-lints test -// error-pattern: unknown lint level: `test` +//@ compile-flags: --cap-lints test +//@ error-pattern: unknown lint level: `test` fn main() {} diff --git a/tests/ui/lint/bad-lint-cap2.rs b/tests/ui/lint/bad-lint-cap2.rs index 8bc8aca20490b..193f967671db0 100644 --- a/tests/ui/lint/bad-lint-cap2.rs +++ b/tests/ui/lint/bad-lint-cap2.rs @@ -1,4 +1,4 @@ -// compile-flags: --cap-lints deny +//@ compile-flags: --cap-lints deny #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/bad-lint-cap3.rs b/tests/ui/lint/bad-lint-cap3.rs index c38105870e4c0..c0c45a21421bc 100644 --- a/tests/ui/lint/bad-lint-cap3.rs +++ b/tests/ui/lint/bad-lint-cap3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --cap-lints warn +//@ check-pass +//@ compile-flags: --cap-lints warn #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/clashing-extern-fn-recursion.rs b/tests/ui/lint/clashing-extern-fn-recursion.rs index ab0fd0a2e7085..40bef400594f6 100644 --- a/tests/ui/lint/clashing-extern-fn-recursion.rs +++ b/tests/ui/lint/clashing-extern-fn-recursion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // This tests checks that clashing_extern_declarations handles types that are recursive through a // pointer or ref argument. See #75512. diff --git a/tests/ui/lint/clashing-extern-fn-wasm.rs b/tests/ui/lint/clashing-extern-fn-wasm.rs index eeb2b8eae2566..862e649b474cc 100644 --- a/tests/ui/lint/clashing-extern-fn-wasm.rs +++ b/tests/ui/lint/clashing-extern-fn-wasm.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #[cfg(target_arch = "wasm32")] diff --git a/tests/ui/lint/clashing-extern-fn.rs b/tests/ui/lint/clashing-extern-fn.rs index 9740742fbbb0f..ce027c8255459 100644 --- a/tests/ui/lint/clashing-extern-fn.rs +++ b/tests/ui/lint/clashing-extern-fn.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:external_extern_fn.rs +//@ check-pass +//@ aux-build:external_extern_fn.rs #![crate_type = "lib"] #![warn(clashing_extern_declarations)] diff --git a/tests/ui/lint/cli-lint-override.rs b/tests/ui/lint/cli-lint-override.rs index a0e853fc38489..4b3fd0d9c01c9 100644 --- a/tests/ui/lint/cli-lint-override.rs +++ b/tests/ui/lint/cli-lint-override.rs @@ -1,12 +1,12 @@ // Tests that subsequent lints specified via the command line override // each other, except for ForceWarn and Forbid, which cannot be overridden. // -// revisions: warn_deny forbid_warn force_warn_deny +//@ revisions: warn_deny forbid_warn force_warn_deny // -//[warn_deny] compile-flags: --warn missing_abi --deny missing_abi -//[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi -//[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi -//[force_warn_deny] check-pass +//@[warn_deny] compile-flags: --warn missing_abi --deny missing_abi +//@[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi +//@[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi +//@[force_warn_deny] check-pass extern fn foo() {} diff --git a/tests/ui/lint/cli-unknown-force-warn.rs b/tests/ui/lint/cli-unknown-force-warn.rs index a9e4e4a60179e..007f8dd8732a8 100644 --- a/tests/ui/lint/cli-unknown-force-warn.rs +++ b/tests/ui/lint/cli-unknown-force-warn.rs @@ -1,11 +1,11 @@ // Checks that rustc correctly errors when passed an invalid lint with // `--force-warn`. This is a regression test for issue #86958. -// check-pass -// compile-flags: --force-warn foo-qux +//@ check-pass +//@ compile-flags: --force-warn foo-qux -// error-pattern: unknown lint: `foo_qux` -// error-pattern: requested on the command line with `--force-warn foo_qux` -// error-pattern: `#[warn(unknown_lints)]` on by default +//@ error-pattern: unknown lint: `foo_qux` +//@ error-pattern: requested on the command line with `--force-warn foo_qux` +//@ error-pattern: `#[warn(unknown_lints)]` on by default fn main() {} diff --git a/tests/ui/lint/command-line-lint-group-allow.rs b/tests/ui/lint/command-line-lint-group-allow.rs index 21c0df0288fa0..e9e57a5e7beeb 100644 --- a/tests/ui/lint/command-line-lint-group-allow.rs +++ b/tests/ui/lint/command-line-lint-group-allow.rs @@ -1,5 +1,5 @@ -// compile-flags: -A bad-style -// check-pass +//@ compile-flags: -A bad-style +//@ check-pass fn main() { let _InappropriateCamelCasing = true; diff --git a/tests/ui/lint/command-line-lint-group-deny.rs b/tests/ui/lint/command-line-lint-group-deny.rs index da999f33e200f..1e9cc4faaff79 100644 --- a/tests/ui/lint/command-line-lint-group-deny.rs +++ b/tests/ui/lint/command-line-lint-group-deny.rs @@ -1,4 +1,4 @@ -// compile-flags: -D bad-style +//@ compile-flags: -D bad-style fn main() { let _InappropriateCamelCasing = true; //~ ERROR should have a snake diff --git a/tests/ui/lint/command-line-lint-group-forbid.rs b/tests/ui/lint/command-line-lint-group-forbid.rs index 4e5c2aca5e0d6..667566bd2c6a1 100644 --- a/tests/ui/lint/command-line-lint-group-forbid.rs +++ b/tests/ui/lint/command-line-lint-group-forbid.rs @@ -1,4 +1,4 @@ -// compile-flags: -F bad-style +//@ compile-flags: -F bad-style fn main() { let _InappropriateCamelCasing = true; //~ ERROR should have a snake diff --git a/tests/ui/lint/command-line-lint-group-warn.rs b/tests/ui/lint/command-line-lint-group-warn.rs index f4536f9c9e218..9807e95dd8053 100644 --- a/tests/ui/lint/command-line-lint-group-warn.rs +++ b/tests/ui/lint/command-line-lint-group-warn.rs @@ -1,5 +1,5 @@ -// compile-flags: -W bad-style -// check-pass +//@ compile-flags: -W bad-style +//@ check-pass fn main() { let _InappropriateCamelCasing = true; diff --git a/tests/ui/lint/command-line-register-lint-tool.rs b/tests/ui/lint/command-line-register-lint-tool.rs index d6e95fd3ec403..60480718219a8 100644 --- a/tests/ui/lint/command-line-register-lint-tool.rs +++ b/tests/ui/lint/command-line-register-lint-tool.rs @@ -1,5 +1,5 @@ -// compile-flags: -A known_tool::foo -// check-pass +//@ compile-flags: -A known_tool::foo +//@ check-pass #![feature(register_tool)] #![register_tool(known_tool)] diff --git a/tests/ui/lint/command-line-register-unknown-lint-tool.rs b/tests/ui/lint/command-line-register-unknown-lint-tool.rs index 59fc020009507..b4e9a067fe29f 100644 --- a/tests/ui/lint/command-line-register-unknown-lint-tool.rs +++ b/tests/ui/lint/command-line-register-unknown-lint-tool.rs @@ -1,4 +1,4 @@ -// compile-flags: -A unknown_tool::foo -// error-pattern: unknown lint tool: `unknown_tool` +//@ compile-flags: -A unknown_tool::foo +//@ error-pattern: unknown lint tool: `unknown_tool` fn main() {} diff --git a/tests/ui/lint/dead-code/alias-in-pat.rs b/tests/ui/lint/dead-code/alias-in-pat.rs index 69d455f3b60e0..f22a8f8408b7a 100644 --- a/tests/ui/lint/dead-code/alias-in-pat.rs +++ b/tests/ui/lint/dead-code/alias-in-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs index b71bcd0fab547..37c78bc68ed0c 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this test checks that the `dead_code` lint is *NOT* being emited // for `foo` as `foo` is being used by `main`, and so the `#[expect]` diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs index f8a5d31a0f248..d2ead24b57ca0 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this test makes sure that the `unfulfilled_lint_expectations` lint // is being emited for `foo` as foo is not dead code, it's pub diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs index 24fafa3d1b804..323bb06b681c1 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs @@ -1,5 +1,5 @@ -// check-pass -// revisions: allow expect +//@ check-pass +//@ revisions: allow expect // this test checks that no matter if we put #[allow(dead_code)] // or #[expect(dead_code)], no warning is being emited diff --git a/tests/ui/lint/dead-code/anon-const-in-pat.rs b/tests/ui/lint/dead-code/anon-const-in-pat.rs index 4d7fdddf246ed..e2d8c90edcca2 100644 --- a/tests/ui/lint/dead-code/anon-const-in-pat.rs +++ b/tests/ui/lint/dead-code/anon-const-in-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const_pat)] #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/associated-type.rs b/tests/ui/lint/dead-code/associated-type.rs index 25106a66e7e36..542a64afbf2da 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 +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/const-and-self.rs b/tests/ui/lint/dead-code/const-and-self.rs index 5c96e4d0ecb9e..f2e48a58166e4 100644 --- a/tests/ui/lint/dead-code/const-and-self.rs +++ b/tests/ui/lint/dead-code/const-and-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/empty-unused-public-enum.rs b/tests/ui/lint/dead-code/empty-unused-public-enum.rs index 15b04496ba7b1..4d69f26b55c3a 100644 --- a/tests/ui/lint/dead-code/empty-unused-public-enum.rs +++ b/tests/ui/lint/dead-code/empty-unused-public-enum.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![deny(unused)] pub enum E {} diff --git a/tests/ui/lint/dead-code/enum-variants.rs b/tests/ui/lint/dead-code/enum-variants.rs index 91c97232eedb1..9499ffdecd748 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 +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/in-closure.rs b/tests/ui/lint/dead-code/in-closure.rs index c55634405ed7b..c89ec44aebbf6 100644 --- a/tests/ui/lint/dead-code/in-closure.rs +++ b/tests/ui/lint/dead-code/in-closure.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/issue-59003.rs b/tests/ui/lint/dead-code/issue-59003.rs index 966d6412870b6..e3dcaca577889 100644 --- a/tests/ui/lint/dead-code/issue-59003.rs +++ b/tests/ui/lint/dead-code/issue-59003.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't have any false positives about the "struct is never constructed" lint. diff --git a/tests/ui/lint/dead-code/issue-68408-false-positive.rs b/tests/ui/lint/dead-code/issue-68408-false-positive.rs index 7ee6b5d72889f..88ed111c5560b 100644 --- a/tests/ui/lint/dead-code/issue-68408-false-positive.rs +++ b/tests/ui/lint/dead-code/issue-68408-false-positive.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't have any false positives here. diff --git a/tests/ui/lint/dead-code/issue-85071-2.rs b/tests/ui/lint/dead-code/issue-85071-2.rs index f0639931c84f3..5db8735899410 100644 --- a/tests/ui/lint/dead-code/issue-85071-2.rs +++ b/tests/ui/lint/dead-code/issue-85071-2.rs @@ -2,7 +2,7 @@ // of a function, and the warning is about an unreachable definition // instead of an unreachable expression. -// check-pass +//@ check-pass #![warn(unused_variables,unreachable_code)] diff --git a/tests/ui/lint/dead-code/issue-85071.rs b/tests/ui/lint/dead-code/issue-85071.rs index d6969321cad4b..84f2c9fc74eeb 100644 --- a/tests/ui/lint/dead-code/issue-85071.rs +++ b/tests/ui/lint/dead-code/issue-85071.rs @@ -4,7 +4,7 @@ // in this regard, which led to confusing "unused variable" warnings // without an accompanying explanatory "unreachable expression" warning. -// check-pass +//@ check-pass #![warn(unused_variables,unreachable_code)] diff --git a/tests/ui/lint/dead-code/issue-85255.rs b/tests/ui/lint/dead-code/issue-85255.rs index d75a8e2dd41a8..cba951eef729d 100644 --- a/tests/ui/lint/dead-code/issue-85255.rs +++ b/tests/ui/lint/dead-code/issue-85255.rs @@ -1,5 +1,5 @@ // Unused `pub` fields in non-`pub` structs should also trigger dead code warnings. -// check-pass +//@ check-pass #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/leading-underscore.rs b/tests/ui/lint/dead-code/leading-underscore.rs index d3582961b3e39..0ef123efc2405 100644 --- a/tests/ui/lint/dead-code/leading-underscore.rs +++ b/tests/ui/lint/dead-code/leading-underscore.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/offset-of-correct-param-env.rs b/tests/ui/lint/dead-code/offset-of-correct-param-env.rs index ae81a2524396c..61babdeb28b5b 100644 --- a/tests/ui/lint/dead-code/offset-of-correct-param-env.rs +++ b/tests/ui/lint/dead-code/offset-of-correct-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(offset_of_nested)] #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/self-assign.rs b/tests/ui/lint/dead-code/self-assign.rs index ea7ce98d88413..072a899e1bdb1 100644 --- a/tests/ui/lint/dead-code/self-assign.rs +++ b/tests/ui/lint/dead-code/self-assign.rs @@ -1,9 +1,9 @@ // Test that dead code warnings are issued for superfluous assignments of // fields or variables to themselves (issue #75356). -// ignore-test FIXME(81658, 83171) +//@ ignore-test FIXME(81658, 83171) -// check-pass +//@ check-pass #![allow(unused_assignments)] #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/trait-impl.rs b/tests/ui/lint/dead-code/trait-impl.rs index 92e389a938ab3..ba0365b194fe6 100644 --- a/tests/ui/lint/dead-code/trait-impl.rs +++ b/tests/ui/lint/dead-code/trait-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] enum Foo { diff --git a/tests/ui/lint/dead-code/type-in-foreign.rs b/tests/ui/lint/dead-code/type-in-foreign.rs index b6c593f316f05..f34d9245809aa 100644 --- a/tests/ui/lint/dead-code/type-in-foreign.rs +++ b/tests/ui/lint/dead-code/type-in-foreign.rs @@ -1,5 +1,5 @@ // Verify that we do not warn on types that are used by foreign functions. -// check-pass +//@ check-pass #![deny(dead_code)] #[repr(C)] diff --git a/tests/ui/lint/dead-code/type-in-transparent.rs b/tests/ui/lint/dead-code/type-in-transparent.rs index 5dd6f93fd0318..3760bf9c0df1f 100644 --- a/tests/ui/lint/dead-code/type-in-transparent.rs +++ b/tests/ui/lint/dead-code/type-in-transparent.rs @@ -1,5 +1,5 @@ // Verify that we do not warn on fields that are part of transparent types. -// check-pass +//@ check-pass #![deny(dead_code)] #[repr(transparent)] diff --git a/tests/ui/lint/dead-code/unused-variant-pub.rs b/tests/ui/lint/dead-code/unused-variant-pub.rs index 3a9061340eb81..c955146d60abb 100644 --- a/tests/ui/lint/dead-code/unused-variant-pub.rs +++ b/tests/ui/lint/dead-code/unused-variant-pub.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![deny(unused)] pub struct F; diff --git a/tests/ui/lint/dead-code/with-impl.rs b/tests/ui/lint/dead-code/with-impl.rs index 147ec7b9e2e6c..8164948ef9657 100644 --- a/tests/ui/lint/dead-code/with-impl.rs +++ b/tests/ui/lint/dead-code/with-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dropping_copy_types.rs b/tests/ui/lint/dropping_copy_types.rs index 2412222d6d16d..ef1291325affe 100644 --- a/tests/ui/lint/dropping_copy_types.rs +++ b/tests/ui/lint/dropping_copy_types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dropping_copy_types)] diff --git a/tests/ui/lint/dropping_references.rs b/tests/ui/lint/dropping_references.rs index bb02cb75a9014..7f0e7c3e35b72 100644 --- a/tests/ui/lint/dropping_references.rs +++ b/tests/ui/lint/dropping_references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dropping_references)] diff --git a/tests/ui/lint/empty-lint-attributes.rs b/tests/ui/lint/empty-lint-attributes.rs index 9a0ec253322e4..b12b4064990bd 100644 --- a/tests/ui/lint/empty-lint-attributes.rs +++ b/tests/ui/lint/empty-lint-attributes.rs @@ -1,6 +1,6 @@ #![feature(lint_reasons)] -// check-pass +//@ check-pass // Empty (and reason-only) lint attributes are legal—although we may want to // lint them in the future (Issue #55112). diff --git a/tests/ui/lint/enable-unstable-lib-feature.rs b/tests/ui/lint/enable-unstable-lib-feature.rs index aa6a973d7bd85..bb554eb1309ee 100644 --- a/tests/ui/lint/enable-unstable-lib-feature.rs +++ b/tests/ui/lint/enable-unstable-lib-feature.rs @@ -1,6 +1,6 @@ // Test that enabling an unstable feature disables warnings -// aux-build:stability-cfg2.rs +//@ aux-build:stability-cfg2.rs #![feature(unstable_test_feature)] #![deny(non_snake_case)] // To trigger a hard error diff --git a/tests/ui/lint/expansion-time-include.rs b/tests/ui/lint/expansion-time-include.rs index 4ea89d5adff94..3ecc01b045c41 100644 --- a/tests/ui/lint/expansion-time-include.rs +++ b/tests/ui/lint/expansion-time-include.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for expansion-time.rs +//@ ignore-test auxiliary file for expansion-time.rs 1 2 diff --git a/tests/ui/lint/expansion-time.rs b/tests/ui/lint/expansion-time.rs index f23c7cb0dca14..1e1f8f9e1b6a5 100644 --- a/tests/ui/lint/expansion-time.rs +++ b/tests/ui/lint/expansion-time.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[warn(meta_variable_misuse)] macro_rules! foo { diff --git a/tests/ui/lint/expr-field.rs b/tests/ui/lint/expr-field.rs index 638fbf521c451..1d74a311ab7cd 100644 --- a/tests/ui/lint/expr-field.rs +++ b/tests/ui/lint/expr-field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct A { pub x: u32, diff --git a/tests/ui/lint/fn_must_use.rs b/tests/ui/lint/fn_must_use.rs index b4e9da0fc8405..be18ffedabb19 100644 --- a/tests/ui/lint/fn_must_use.rs +++ b/tests/ui/lint/fn_must_use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/for_loop_over_fallibles.rs b/tests/ui/lint/for_loop_over_fallibles.rs index 43d71c2e808a9..52c3b8f2aae5f 100644 --- a/tests/ui/lint/for_loop_over_fallibles.rs +++ b/tests/ui/lint/for_loop_over_fallibles.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { // Common diff --git a/tests/ui/lint/forbid-error-capped.rs b/tests/ui/lint/forbid-error-capped.rs index b56471a756d1e..f5059793eddf7 100644 --- a/tests/ui/lint/forbid-error-capped.rs +++ b/tests/ui/lint/forbid-error-capped.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // compile-args: --cap-lints=warn -Fwarnings // This checks that the forbid attribute checking is ignored when the forbidden diff --git a/tests/ui/lint/forbid-group-member.rs b/tests/ui/lint/forbid-group-member.rs index d03e858438b60..092340d57babc 100644 --- a/tests/ui/lint/forbid-group-member.rs +++ b/tests/ui/lint/forbid-group-member.rs @@ -1,7 +1,7 @@ // Check what happens when we forbid a group but // then allow a member of that group. // -// check-pass +//@ check-pass #![forbid(unused)] diff --git a/tests/ui/lint/force-warn/allow-warnings.rs b/tests/ui/lint/force-warn/allow-warnings.rs index 0199381fcbb54..9dbd9b6e5266b 100644 --- a/tests/ui/lint/force-warn/allow-warnings.rs +++ b/tests/ui/lint/force-warn/allow-warnings.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite allowing all warnings in module -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/lint/force-warn/allowed-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-by-default-lint.rs index b24ab822d9303..f0c9663c0d3a2 100644 --- a/tests/ui/lint/force-warn/allowed-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is allow-by-default) to warn -// compile-flags: --force-warn elided_lifetimes_in_paths -// check-pass +//@ compile-flags: --force-warn elided_lifetimes_in_paths +//@ check-pass struct Foo<'a> { x: &'a u32, diff --git a/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs index 257df13efe097..24631bdd63946 100644 --- a/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A mutable_transmutes --force-warn mutable_transmutes -// check-pass +//@ compile-flags: -A mutable_transmutes --force-warn mutable_transmutes +//@ check-pass fn main() { unsafe { diff --git a/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs index 0d4b468c2b337..2eb5bfe80cfa7 100644 --- a/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn mutable_transmutes -// check-pass +//@ compile-flags: --force-warn mutable_transmutes +//@ check-pass #![allow(mutable_transmutes)] fn main() { diff --git a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs index 9b1edba41aafe..1d4fe7a3f0a57 100644 --- a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite $LINT_GROUP (which contains $LINT) being allowed -// compile-flags: --force-warn bare_trait_objects -// check-pass +//@ compile-flags: --force-warn bare_trait_objects +//@ check-pass #![allow(rust_2018_idioms)] diff --git a/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs index 06b3728677676..e8194d7caf973 100644 --- a/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/lint/force-warn/cap-lints-allow.rs b/tests/ui/lint/force-warn/cap-lints-allow.rs index 9609ea994312f..a4492494489c1 100644 --- a/tests/ui/lint/force-warn/cap-lints-allow.rs +++ b/tests/ui/lint/force-warn/cap-lints-allow.rs @@ -1,7 +1,7 @@ // --force-warn $LINT casuses $LINT to warn despite --cap-lints // set to allow -// compile-flags: --cap-lints allow --force-warn bare_trait_objects -// check-pass +//@ compile-flags: --cap-lints allow --force-warn bare_trait_objects +//@ check-pass pub trait SomeTrait {} diff --git a/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs index e65f156bfdc9a..5a9d29c520d1f 100644 --- a/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT to warn despite $LINT being // allowed in module and cap-lints set to warn -// compile-flags: --cap-lints warn --force-warn rust-2021-compatibility -// check-pass +//@ compile-flags: --cap-lints warn --force-warn rust-2021-compatibility +//@ check-pass #![allow(ellipsis_inclusive_range_patterns)] pub fn f() -> bool { diff --git a/tests/ui/lint/force-warn/deny-by-default-lint.rs b/tests/ui/lint/force-warn/deny-by-default-lint.rs index c2e9377e90854..c4a2da03facda 100644 --- a/tests/ui/lint/force-warn/deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/deny-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn -// compile-flags: --force-warn mutable_transmutes -// check-pass +//@ compile-flags: --force-warn mutable_transmutes +//@ check-pass fn main() { unsafe { diff --git a/tests/ui/lint/force-warn/lint-group-allow-warnings.rs b/tests/ui/lint/force-warn/lint-group-allow-warnings.rs index 4b95f4d2dfbba..658f6a7266b64 100644 --- a/tests/ui/lint/force-warn/lint-group-allow-warnings.rs +++ b/tests/ui/lint/force-warn/lint-group-allow-warnings.rs @@ -1,8 +1,8 @@ // --force-warn $LINT_GROUP causes $LINT in $LINT_GROUP to warn // despite all warnings being allowed in module // warn-by-default lint to warn -// compile-flags: --force-warn nonstandard_style -// check-pass +//@ compile-flags: --force-warn nonstandard_style +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs index 9736027452a8d..2f7f64be05691 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms -// check-pass +//@ compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms +//@ check-pass pub trait SomeTrait {} diff --git a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs index 99cad614c25cd..818d021e60f98 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT to warn despite // $LINT_GROUP being allowed in module -// compile-flags: --force-warn rust_2018_idioms -// check-pass +//@ compile-flags: --force-warn rust_2018_idioms +//@ check-pass #![allow(rust_2018_idioms)] diff --git a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs index f0aacd773401f..358a7a32cfe01 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn rust-2018-idioms -// check-pass +//@ compile-flags: --force-warn rust-2018-idioms +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs b/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs index 47a480ad7083a..7da0960068f22 100644 --- a/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs +++ b/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite being allowed in one submodule (but not the other) -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass mod one { #![allow(dead_code)] diff --git a/tests/ui/lint/force-warn/warnings-lint-group.rs b/tests/ui/lint/force-warn/warnings-lint-group.rs index d1d4f5602f271..944070527a159 100644 --- a/tests/ui/lint/force-warn/warnings-lint-group.rs +++ b/tests/ui/lint/force-warn/warnings-lint-group.rs @@ -1,5 +1,5 @@ // --force-warn warnings is an error -// compile-flags: --force-warn warnings -// error-pattern: `warnings` lint group is not supported +//@ compile-flags: --force-warn warnings +//@ error-pattern: `warnings` lint group is not supported fn main() {} diff --git a/tests/ui/lint/forgetting_copy_types.rs b/tests/ui/lint/forgetting_copy_types.rs index 224c7bcd5f63e..c0bf0bf05ef5a 100644 --- a/tests/ui/lint/forgetting_copy_types.rs +++ b/tests/ui/lint/forgetting_copy_types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(forgetting_copy_types)] diff --git a/tests/ui/lint/forgetting_references.rs b/tests/ui/lint/forgetting_references.rs index bd51e98003159..ecfa23ee49705 100644 --- a/tests/ui/lint/forgetting_references.rs +++ b/tests/ui/lint/forgetting_references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(forgetting_references)] diff --git a/tests/ui/lint/function-item-references.rs b/tests/ui/lint/function-item-references.rs index 05213f4ed4bc8..918d72e28a918 100644 --- a/tests/ui/lint/function-item-references.rs +++ b/tests/ui/lint/function-item-references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_variadic)] #![warn(function_item_references)] use std::fmt::Pointer; diff --git a/tests/ui/lint/future-incompat-json-test.rs b/tests/ui/lint/future-incompat-json-test.rs index 6ccd670294c60..741c863db2356 100644 --- a/tests/ui/lint/future-incompat-json-test.rs +++ b/tests/ui/lint/future-incompat-json-test.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zfuture-incompat-test --json=future-incompat --error-format=json -// check-pass +//@ compile-flags: -Zfuture-incompat-test --json=future-incompat --error-format=json +//@ check-pass // The `-Zfuture-incompat-test flag causes any normal warning to be included // in the future-incompatible report. The stderr output here should mention diff --git a/tests/ui/lint/future-incompat-json-test.stderr b/tests/ui/lint/future-incompat-json-test.stderr index f33a5cab6ba09..bf29b9577db5e 100644 --- a/tests/ui/lint/future-incompat-json-test.stderr +++ b/tests/ui/lint/future-incompat-json-test.stderr @@ -1,4 +1,4 @@ -{"$message_type":"future_incompat","future_incompat_report":[{"diagnostic":{"$message_type":"diagnostic","message":"unused variable: `x`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"_x","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused variable: `x` +{"$message_type":"future_incompat","future_incompat_report":[{"diagnostic":{"$message_type":"diagnostic","message":"unused variable: `x`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":340,"byte_end":341,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":340,"byte_end":341,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"_x","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused variable: `x` --> $DIR/future-incompat-json-test.rs:9:9 | LL | let x = 1; diff --git a/tests/ui/lint/future-incompat-test.rs b/tests/ui/lint/future-incompat-test.rs index c5f477cc4500e..e0c8da661084e 100644 --- a/tests/ui/lint/future-incompat-test.rs +++ b/tests/ui/lint/future-incompat-test.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zfuture-incompat-test -// check-pass +//@ compile-flags: -Zfuture-incompat-test +//@ check-pass // The `-Zfuture-incompat-test flag causes any normal warning to be included // in the future-incompatible report. The stderr output here should mention diff --git a/tests/ui/lint/inclusive-range-pattern-syntax.fixed b/tests/ui/lint/inclusive-range-pattern-syntax.fixed index bee5d4ae4b1b3..1c47673cfc3ef 100644 --- a/tests/ui/lint/inclusive-range-pattern-syntax.fixed +++ b/tests/ui/lint/inclusive-range-pattern-syntax.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/lint/inclusive-range-pattern-syntax.rs b/tests/ui/lint/inclusive-range-pattern-syntax.rs index d98c10c26c7cf..e6e8c1c9532c4 100644 --- a/tests/ui/lint/inclusive-range-pattern-syntax.rs +++ b/tests/ui/lint/inclusive-range-pattern-syntax.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/lint/inert-attr-macro.rs b/tests/ui/lint/inert-attr-macro.rs index dc0bb8ac26593..90303a1fc3d1c 100644 --- a/tests/ui/lint/inert-attr-macro.rs +++ b/tests/ui/lint/inert-attr-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/lint/internal/trivial-diagnostics.rs b/tests/ui/lint/internal/trivial-diagnostics.rs index e536e1164fceb..b93a20a52bbd3 100644 --- a/tests/ui/lint/internal/trivial-diagnostics.rs +++ b/tests/ui/lint/internal/trivial-diagnostics.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options +//@ compile-flags: -Zunstable-options pub fn issue_111280() { struct_span_err(msg).emit(); //~ ERROR cannot find value `msg` diff --git a/tests/ui/lint/invalid-nan-comparison-suggestion.fixed b/tests/ui/lint/invalid-nan-comparison-suggestion.fixed index feafc6c1b8c13..46b2d4e9c3f5c 100644 --- a/tests/ui/lint/invalid-nan-comparison-suggestion.fixed +++ b/tests/ui/lint/invalid-nan-comparison-suggestion.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let x = 5f32; diff --git a/tests/ui/lint/invalid-nan-comparison-suggestion.rs b/tests/ui/lint/invalid-nan-comparison-suggestion.rs index ad5eb66e5f17d..558b433d794af 100644 --- a/tests/ui/lint/invalid-nan-comparison-suggestion.rs +++ b/tests/ui/lint/invalid-nan-comparison-suggestion.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let x = 5f32; diff --git a/tests/ui/lint/invalid-nan-comparison.rs b/tests/ui/lint/invalid-nan-comparison.rs index d7e793ca58301..202a5e27e8e4e 100644 --- a/tests/ui/lint/invalid-nan-comparison.rs +++ b/tests/ui/lint/invalid-nan-comparison.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { f32(); diff --git a/tests/ui/lint/invalid_from_utf8.rs b/tests/ui/lint/invalid_from_utf8.rs index 43ceffb71e509..e87afe9094cab 100644 --- a/tests/ui/lint/invalid_from_utf8.rs +++ b/tests/ui/lint/invalid_from_utf8.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] #![feature(concat_bytes)] diff --git a/tests/ui/lint/invalid_value-polymorphic.rs b/tests/ui/lint/invalid_value-polymorphic.rs index 98f82b792fccc..6a31ac17d96ff 100644 --- a/tests/ui/lint/invalid_value-polymorphic.rs +++ b/tests/ui/lint/invalid_value-polymorphic.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Zmir-enable-passes=+InstSimplify -// build-pass +//@ compile-flags: --crate-type=lib -Zmir-enable-passes=+InstSimplify +//@ build-pass #![feature(core_intrinsics)] diff --git a/tests/ui/lint/issue-101284.rs b/tests/ui/lint/issue-101284.rs index 1381d4f172724..ab5d8587ccb96 100644 --- a/tests/ui/lint/issue-101284.rs +++ b/tests/ui/lint/issue-101284.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![deny(rust_2021_compatibility)] pub struct Warns { diff --git a/tests/ui/lint/issue-102705.rs b/tests/ui/lint/issue-102705.rs index 5bcc8950adafb..37cc3f8cc25b0 100644 --- a/tests/ui/lint/issue-102705.rs +++ b/tests/ui/lint/issue-102705.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(opaque_hidden_inferred_bound)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-103317.fixed b/tests/ui/lint/issue-103317.fixed index 5a987423e5b95..72b4b667783ae 100644 --- a/tests/ui/lint/issue-103317.fixed +++ b/tests/ui/lint/issue-103317.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #[warn(unreachable_pub)] mod inner { diff --git a/tests/ui/lint/issue-103317.rs b/tests/ui/lint/issue-103317.rs index c2ba939e13c6f..8333a5b9a71d3 100644 --- a/tests/ui/lint/issue-103317.rs +++ b/tests/ui/lint/issue-103317.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #[warn(unreachable_pub)] mod inner { diff --git a/tests/ui/lint/issue-103435-extra-parentheses.fixed b/tests/ui/lint/issue-103435-extra-parentheses.fixed index 74b5aa06e355a..4371336188c08 100644 --- a/tests/ui/lint/issue-103435-extra-parentheses.fixed +++ b/tests/ui/lint/issue-103435-extra-parentheses.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] fn main() { diff --git a/tests/ui/lint/issue-103435-extra-parentheses.rs b/tests/ui/lint/issue-103435-extra-parentheses.rs index cc81a64f21779..c9170f32373f0 100644 --- a/tests/ui/lint/issue-103435-extra-parentheses.rs +++ b/tests/ui/lint/issue-103435-extra-parentheses.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] fn main() { diff --git a/tests/ui/lint/issue-104897.rs b/tests/ui/lint/issue-104897.rs index 2d298aff9db89..3cfe94bbd222d 100644 --- a/tests/ui/lint/issue-104897.rs +++ b/tests/ui/lint/issue-104897.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f(){(print!(á diff --git a/tests/ui/lint/issue-108155.rs b/tests/ui/lint/issue-108155.rs index 4ae0cbd92ff16..1c4166136e340 100644 --- a/tests/ui/lint/issue-108155.rs +++ b/tests/ui/lint/issue-108155.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // check that `deref_into_dyn_supertrait` doesn't cause ICE by eagerly converting // a cancelled lint diff --git a/tests/ui/lint/issue-109529.fixed b/tests/ui/lint/issue-109529.fixed index 5ad489073eead..d12cc81d09c1a 100644 --- a/tests/ui/lint/issue-109529.fixed +++ b/tests/ui/lint/issue-109529.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _ in 0..=255 as u8 {} //~ ERROR range endpoint is out of range diff --git a/tests/ui/lint/issue-109529.rs b/tests/ui/lint/issue-109529.rs index 383d7bc4cf31f..1a3c1ff15bad0 100644 --- a/tests/ui/lint/issue-109529.rs +++ b/tests/ui/lint/issue-109529.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _ in 0..256 as u8 {} //~ ERROR range endpoint is out of range diff --git a/tests/ui/lint/issue-110573.rs b/tests/ui/lint/issue-110573.rs index d9f0868b7659d..d6c1b9b296db4 100644 --- a/tests/ui/lint/issue-110573.rs +++ b/tests/ui/lint/issue-110573.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(warnings)] diff --git a/tests/ui/lint/issue-112489.rs b/tests/ui/lint/issue-112489.rs index 559edf0e4f23c..631816ca75967 100644 --- a/tests/ui/lint/issue-112489.rs +++ b/tests/ui/lint/issue-112489.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Borrow; struct S; diff --git a/tests/ui/lint/issue-121070-let-range.rs b/tests/ui/lint/issue-121070-let-range.rs index 84598dcd2581d..1f575cfaca556 100644 --- a/tests/ui/lint/issue-121070-let-range.rs +++ b/tests/ui/lint/issue-121070-let-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/lint/issue-14837.rs b/tests/ui/lint/issue-14837.rs index a83bc4150021f..73c63cde2baa8 100644 --- a/tests/ui/lint/issue-14837.rs +++ b/tests/ui/lint/issue-14837.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #[deny(dead_code)] pub enum Foo { diff --git a/tests/ui/lint/issue-1866.rs b/tests/ui/lint/issue-1866.rs index caac0c504141e..386aeeb6ad015 100644 --- a/tests/ui/lint/issue-1866.rs +++ b/tests/ui/lint/issue-1866.rs @@ -1,9 +1,9 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![warn(clashing_extern_declarations)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub type rust_task = usize; diff --git a/tests/ui/lint/issue-19102.rs b/tests/ui/lint/issue-19102.rs index 1f32d10b644ab..0680fe6f8b6f1 100644 --- a/tests/ui/lint/issue-19102.rs +++ b/tests/ui/lint/issue-19102.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] #![deny(unused_qualifications)] diff --git a/tests/ui/lint/issue-20343.rs b/tests/ui/lint/issue-20343.rs index f0f4eccc676a1..24e8062b1f37f 100644 --- a/tests/ui/lint/issue-20343.rs +++ b/tests/ui/lint/issue-20343.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for Issue #20343. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![deny(dead_code)] diff --git a/tests/ui/lint/issue-31924-non-snake-ffi.rs b/tests/ui/lint/issue-31924-non-snake-ffi.rs index 5b9faca4911e8..ade4e630fb2f4 100644 --- a/tests/ui/lint/issue-31924-non-snake-ffi.rs +++ b/tests/ui/lint/issue-31924-non-snake-ffi.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_snake_case)] diff --git a/tests/ui/lint/issue-34798.rs b/tests/ui/lint/issue-34798.rs index f0d710123cd70..064fc7c4ad69b 100644 --- a/tests/ui/lint/issue-34798.rs +++ b/tests/ui/lint/issue-34798.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(improper_ctypes)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs b/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs index 0a951cfa91c58..41cf6184929dd 100644 --- a/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs +++ b/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] 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 f30d7e2edcc88..8e74531e7762a 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 +//@ run-pass #![allow(unused_variables)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/issue-54099-camel-case-underscore-types.rs b/tests/ui/lint/issue-54099-camel-case-underscore-types.rs index b2bf87358a4d1..64e6dafd9417b 100644 --- a/tests/ui/lint/issue-54099-camel-case-underscore-types.rs +++ b/tests/ui/lint/issue-54099-camel-case-underscore-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![forbid(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-57410-1.rs b/tests/ui/lint/issue-57410-1.rs index d825cb1800864..6c0b54d74ec5e 100644 --- a/tests/ui/lint/issue-57410-1.rs +++ b/tests/ui/lint/issue-57410-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Originally from #53925. // Tests that the `unreachable_pub` lint doesn't fire for `pub self::bar::Bar`. diff --git a/tests/ui/lint/issue-57410.rs b/tests/ui/lint/issue-57410.rs index 0cf4b8068e46b..ed0fbc87bfbdb 100644 --- a/tests/ui/lint/issue-57410.rs +++ b/tests/ui/lint/issue-57410.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that the `unreachable_pub` lint doesn't fire for `pub self::imp::f`. diff --git a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs index b4fc3317487d2..37d9612931717 100644 --- a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs +++ b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs @@ -12,7 +12,7 @@ // effort for bug like this, which 1. end users are unlikely to run into in the // first place, and 2. they won't see the redundant output anyway. -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![forbid(forbidden_lint_groups)] diff --git a/tests/ui/lint/issue-79546-fuel-ice.rs b/tests/ui/lint/issue-79546-fuel-ice.rs index 0e9f54088b8e9..dbee924d26e70 100644 --- a/tests/ui/lint/issue-79546-fuel-ice.rs +++ b/tests/ui/lint/issue-79546-fuel-ice.rs @@ -1,7 +1,7 @@ // Regression test for the ICE described in #79546. -// compile-flags: --cap-lints=allow -Zfuel=issue79546=0 -// check-pass +//@ compile-flags: --cap-lints=allow -Zfuel=issue79546=0 +//@ check-pass #![crate_name="issue79546"] struct S; diff --git a/tests/ui/lint/issue-80988.rs b/tests/ui/lint/issue-80988.rs index 5b910f1d8df9d..80decd8e7369e 100644 --- a/tests/ui/lint/issue-80988.rs +++ b/tests/ui/lint/issue-80988.rs @@ -1,6 +1,6 @@ // Regression test for #80988 // -// check-pass +//@ check-pass #![forbid(warnings)] diff --git a/tests/ui/lint/issue-81218.rs b/tests/ui/lint/issue-81218.rs index f02aa9040ebc5..623d6488aadcf 100644 --- a/tests/ui/lint/issue-81218.rs +++ b/tests/ui/lint/issue-81218.rs @@ -1,6 +1,6 @@ // Regression test for #81218 // -// check-pass +//@ check-pass #![forbid(warnings)] diff --git a/tests/ui/lint/issue-83477.rs b/tests/ui/lint/issue-83477.rs index 4262a28799db2..d134650f221d4 100644 --- a/tests/ui/lint/issue-83477.rs +++ b/tests/ui/lint/issue-83477.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunstable-options -// check-pass +//@ compile-flags: -Zunstable-options +//@ check-pass #![warn(rustc::internal)] #[allow(rustc::foo::bar::default_hash_types)] diff --git a/tests/ui/lint/issue-87274-paren-parent.rs b/tests/ui/lint/issue-87274-paren-parent.rs index 0141c5a252f6a..409824cc9406d 100644 --- a/tests/ui/lint/issue-87274-paren-parent.rs +++ b/tests/ui/lint/issue-87274-paren-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that we properly lint at 'paren' expressions fn foo() -> Result<(), String> { diff --git a/tests/ui/lint/issue-89469.rs b/tests/ui/lint/issue-89469.rs index 3a6ab452840ac..f691d6b5a9287 100644 --- a/tests/ui/lint/issue-89469.rs +++ b/tests/ui/lint/issue-89469.rs @@ -1,7 +1,7 @@ // Regression test for #89469, where an extra non_snake_case warning was // reported for a shorthand field binding. -// check-pass +//@ check-pass #![deny(non_snake_case)] #[allow(non_snake_case)] diff --git a/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs b/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs index 425e2703c94c4..583dc9e215178 100644 --- a/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs +++ b/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Allowing the code lint should work without warning and // the text flow char in the comment should be ignored. diff --git a/tests/ui/lint/known-tool-in-submodule/root.rs b/tests/ui/lint/known-tool-in-submodule/root.rs index 80806dcbd280a..dadbfa3ee9d6e 100644 --- a/tests/ui/lint/known-tool-in-submodule/root.rs +++ b/tests/ui/lint/known-tool-in-submodule/root.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(register_tool)] #![register_tool(tool)] diff --git a/tests/ui/lint/known-tool-in-submodule/submodule.rs b/tests/ui/lint/known-tool-in-submodule/submodule.rs index bb25e10056fae..0bb2b93d53b73 100644 --- a/tests/ui/lint/known-tool-in-submodule/submodule.rs +++ b/tests/ui/lint/known-tool-in-submodule/submodule.rs @@ -1,4 +1,4 @@ -// ignore-test: not a test +//@ ignore-test: not a test #[allow(tool::lint)] pub fn foo() {} diff --git a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs index 866a4d10ff5a4..dfa0b8015d037 100644 --- a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs +++ b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs @@ -1,11 +1,11 @@ #![deny(large_assignments)] #![feature(large_assignments)] #![move_size_limit = "1000"] -// build-fail -// only-64bit +//@ build-fail +//@ only-64bit -// edition:2018 -// compile-flags: -Zmir-opt-level=1 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=1 use std::{sync::Arc, rc::Rc}; diff --git a/tests/ui/lint/large_assignments/copy_into_fn.rs b/tests/ui/lint/large_assignments/copy_into_fn.rs index ee204bf7af17d..5222e833bcc8f 100644 --- a/tests/ui/lint/large_assignments/copy_into_fn.rs +++ b/tests/ui/lint/large_assignments/copy_into_fn.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(large_assignments)] #![move_size_limit = "1000"] diff --git a/tests/ui/lint/large_assignments/large_future.rs b/tests/ui/lint/large_assignments/large_future.rs index a69ff356c6b47..28c358bdbf086 100644 --- a/tests/ui/lint/large_assignments/large_future.rs +++ b/tests/ui/lint/large_assignments/large_future.rs @@ -1,13 +1,13 @@ #![deny(large_assignments)] #![cfg_attr(attribute, feature(large_assignments))] #![cfg_attr(attribute, move_size_limit = "1000")] -// build-fail -// only-64bit -// revisions: attribute option -// [option]compile-flags: -Zmove-size-limit=1000 +//@ build-fail +//@ only-64bit +//@ revisions: attribute option +//@ [option]compile-flags: -Zmove-size-limit=1000 -// edition:2018 -// compile-flags: -Zmir-opt-level=0 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=0 fn main() { let x = async { diff --git a/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs b/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs index b7a70dfdda0e3..1f582c21dfbdc 100644 --- a/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs +++ b/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs @@ -1,11 +1,11 @@ #![deny(large_assignments)] #![feature(large_assignments)] #![move_size_limit = "1000"] -// build-fail -// only-64bit +//@ build-fail +//@ only-64bit -// edition:2018 -// compile-flags: -Zmir-opt-level=0 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=0 use std::{sync::Arc, rc::Rc}; diff --git a/tests/ui/lint/large_assignments/move_into_fn.rs b/tests/ui/lint/large_assignments/move_into_fn.rs index 359705bfc03ec..73ec08fa23a74 100644 --- a/tests/ui/lint/large_assignments/move_into_fn.rs +++ b/tests/ui/lint/large_assignments/move_into_fn.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(large_assignments)] #![move_size_limit = "1000"] diff --git a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs index 8e15b4da35a49..b885352dfd949 100644 --- a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs +++ b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(let_underscore_drop)] fn main() { diff --git a/tests/ui/lint/let_underscore/let_underscore_drop.rs b/tests/ui/lint/let_underscore/let_underscore_drop.rs index a31b18ed59465..58988ec05d79f 100644 --- a/tests/ui/lint/let_underscore/let_underscore_drop.rs +++ b/tests/ui/lint/let_underscore/let_underscore_drop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(let_underscore_drop)] struct NontrivialDrop; diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.rs b/tests/ui/lint/let_underscore/let_underscore_lock.rs index df7e60e39409d..51d81e68043f9 100644 --- a/tests/ui/lint/let_underscore/let_underscore_lock.rs +++ b/tests/ui/lint/let_underscore/let_underscore_lock.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::sync::{Arc, Mutex}; struct Struct { diff --git a/tests/ui/lint/lint-cap-trait-bounds.rs b/tests/ui/lint/lint-cap-trait-bounds.rs index d9c28dd0aa6eb..e3806082ee1bf 100644 --- a/tests/ui/lint/lint-cap-trait-bounds.rs +++ b/tests/ui/lint/lint-cap-trait-bounds.rs @@ -1,7 +1,7 @@ // Regression test for https://github.com/rust-lang/rust/issues/43134 -// check-pass -// compile-flags: --cap-lints allow +//@ check-pass +//@ compile-flags: --cap-lints allow type Foo = Option; diff --git a/tests/ui/lint/lint-cap.rs b/tests/ui/lint/lint-cap.rs index 461b923ccd47d..4f67a76f68f38 100644 --- a/tests/ui/lint/lint-cap.rs +++ b/tests/ui/lint/lint-cap.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cap-lints allow +//@ run-pass +//@ compile-flags: --cap-lints allow #![deny(warnings)] diff --git a/tests/ui/lint/lint-const-item-mutation.rs b/tests/ui/lint/lint-const-item-mutation.rs index 4bf5e0a9e212a..d51d3c394937c 100644 --- a/tests/ui/lint/lint-const-item-mutation.rs +++ b/tests/ui/lint/lint-const-item-mutation.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct MyStruct { field: bool, diff --git a/tests/ui/lint/lint-ctypes-113436.rs b/tests/ui/lint/lint-ctypes-113436.rs index 4f733b5bb16f2..d5acdc45f92e5 100644 --- a/tests/ui/lint/lint-ctypes-113436.rs +++ b/tests/ui/lint/lint-ctypes-113436.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes_definitions)] #[repr(C)] diff --git a/tests/ui/lint/lint-ctypes-113900.rs b/tests/ui/lint/lint-ctypes-113900.rs index ac4ff1ae2dfd0..3dd196a409448 100644 --- a/tests/ui/lint/lint-ctypes-113900.rs +++ b/tests/ui/lint/lint-ctypes-113900.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Extending `improper_ctypes` to check external-ABI fn-ptrs means that it can encounter // projections which cannot be normalized - unsurprisingly, this shouldn't crash the compiler. diff --git a/tests/ui/lint/lint-ctypes-66202.rs b/tests/ui/lint/lint-ctypes-66202.rs index ebab41d143e67..e4cfa54c8d8b8 100644 --- a/tests/ui/lint/lint-ctypes-66202.rs +++ b/tests/ui/lint/lint-ctypes-66202.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] diff --git a/tests/ui/lint/lint-ctypes-73249-1.rs b/tests/ui/lint/lint-ctypes-73249-1.rs index cf416c3fe8b12..0ca91ef294f05 100644 --- a/tests/ui/lint/lint-ctypes-73249-1.rs +++ b/tests/ui/lint/lint-ctypes-73249-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub trait Foo { diff --git a/tests/ui/lint/lint-ctypes-73249-4.rs b/tests/ui/lint/lint-ctypes-73249-4.rs index 6c72bd691b17c..37099c1313ade 100644 --- a/tests/ui/lint/lint-ctypes-73249-4.rs +++ b/tests/ui/lint/lint-ctypes-73249-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] use std::marker::PhantomData; diff --git a/tests/ui/lint/lint-ctypes-73249.rs b/tests/ui/lint/lint-ctypes-73249.rs index 5b48fa9b7376f..c5f2318ef0af0 100644 --- a/tests/ui/lint/lint-ctypes-73249.rs +++ b/tests/ui/lint/lint-ctypes-73249.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub trait Foo { diff --git a/tests/ui/lint/lint-ctypes-73251.rs b/tests/ui/lint/lint-ctypes-73251.rs index a00d1a75aec2c..68eeb67deeae3 100644 --- a/tests/ui/lint/lint-ctypes-73251.rs +++ b/tests/ui/lint/lint-ctypes-73251.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] diff --git a/tests/ui/lint/lint-ctypes-73747.rs b/tests/ui/lint/lint-ctypes-73747.rs index 293ffd5c28e10..a2562e3b4213b 100644 --- a/tests/ui/lint/lint-ctypes-73747.rs +++ b/tests/ui/lint/lint-ctypes-73747.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[repr(transparent)] struct NonNullRawComPtr { diff --git a/tests/ui/lint/lint-exceeding-bitshifts.rs b/tests/ui/lint/lint-exceeding-bitshifts.rs index 048c1aff8a9be..ea9d5ce6781fb 100644 --- a/tests/ui/lint/lint-exceeding-bitshifts.rs +++ b/tests/ui/lint/lint-exceeding-bitshifts.rs @@ -1,10 +1,10 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) -// normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" #![crate_type="lib"] #![warn(arithmetic_overflow)] 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 07a32904a5e64..eb110869e44e8 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 +//@ run-pass #![feature(stmt_expr_attributes)] #![deny(unused_parens)] diff --git a/tests/ui/lint/lint-ffi-safety-all-phantom.rs b/tests/ui/lint/lint-ffi-safety-all-phantom.rs index 7419d34580097..25445c32f123a 100644 --- a/tests/ui/lint/lint-ffi-safety-all-phantom.rs +++ b/tests/ui/lint/lint-ffi-safety-all-phantom.rs @@ -2,7 +2,7 @@ // It ensures that transparent types where all fields are PhantomData are marked as // FFI-safe. -// check-pass +//@ check-pass #[repr(transparent)] #[derive(Copy, Clone)] diff --git a/tests/ui/lint/lint-forbid-cmdline.rs b/tests/ui/lint/lint-forbid-cmdline.rs index 32a92e09b14a9..8a4eb449d3c8a 100644 --- a/tests/ui/lint/lint-forbid-cmdline.rs +++ b/tests/ui/lint/lint-forbid-cmdline.rs @@ -1,4 +1,4 @@ -// compile-flags: -F deprecated +//@ compile-flags: -F deprecated #[allow(deprecated)] //~ ERROR allow(deprecated) incompatible fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs b/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs index 15ceb61957107..d76d02762c0e0 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicBool, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs b/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs index 63204c725c3dc..121843214b13c 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicPtr, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs b/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs index 488d268eee810..16853a3150531 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicUsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs b/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs index 4fb8605b45225..51dbf19c72f31 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// check-pass +//@ only-x86_64 +//@ check-pass use std::sync::atomic::{AtomicUsize, Ordering}; trait Foo { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs b/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs index 22034472c71d0..30662f072d3e0 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{compiler_fence, fence, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs b/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs index 734b63324af25..bdeacac4957b6 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicIsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-int.rs b/tests/ui/lint/lint-invalid-atomic-ordering-int.rs index 462c9670f435f..7ea89433a18ff 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-int.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-int.rs @@ -1,5 +1,5 @@ // FIXME: add support for `// only-atomic` to compiletest/header.rs -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs b/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs index 984f7edebd1df..ae10de7b2641b 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicPtr, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs b/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs index 80ec3b9ee345c..aa5aefe272ae1 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicU16, AtomicU32, AtomicU64, AtomicU8, AtomicUsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-level-macro-def-mod.rs b/tests/ui/lint/lint-level-macro-def-mod.rs index 79f7d1206df20..d5335cef47bc1 100644 --- a/tests/ui/lint/lint-level-macro-def-mod.rs +++ b/tests/ui/lint/lint-level-macro-def-mod.rs @@ -1,7 +1,7 @@ // This checks that exported macros lint as part of their module of origin, not // the root module. // -// check-pass +//@ check-pass //! Top level documentation #![deny(missing_docs)] diff --git a/tests/ui/lint/lint-level-macro-def.rs b/tests/ui/lint/lint-level-macro-def.rs index 720f4b453abf5..7b3b4b26b01b3 100644 --- a/tests/ui/lint/lint-level-macro-def.rs +++ b/tests/ui/lint/lint-level-macro-def.rs @@ -2,7 +2,7 @@ // // This is a regression test for issue #59306. // -// check-pass +//@ check-pass #[deny(missing_docs)] diff --git a/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs b/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs index d085db43aa94a..6e1c812383693 100644 --- a/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs +++ b/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Issue #7526: lowercase static constants in patterns look like bindings // This is similar to lint-lowercase-static-const-pattern.rs, except it diff --git a/tests/ui/lint/lint-missing-copy-implementations-allow.rs b/tests/ui/lint/lint-missing-copy-implementations-allow.rs index 051a905aed643..d688dfe95eeca 100644 --- a/tests/ui/lint/lint-missing-copy-implementations-allow.rs +++ b/tests/ui/lint/lint-missing-copy-implementations-allow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(missing_copy_implementations)] // Don't recommend implementing Copy on something stateful like an iterator. diff --git a/tests/ui/lint/lint-missing-doc.rs b/tests/ui/lint/lint-missing-doc.rs index b59f2212f51b3..0b7c99e501216 100644 --- a/tests/ui/lint/lint-missing-doc.rs +++ b/tests/ui/lint/lint-missing-doc.rs @@ -1,6 +1,6 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -// aux-build:missing_docs.rs +//@ aux-build:missing_docs.rs #![deny(missing_docs)] #![allow(dead_code)] #![feature(associated_type_defaults, extern_types)] diff --git a/tests/ui/lint/lint-non-camel-case-variant.rs b/tests/ui/lint/lint-non-camel-case-variant.rs index 2b1a52f25be87..e31c70472384e 100644 --- a/tests/ui/lint/lint-non-camel-case-variant.rs +++ b/tests/ui/lint/lint-non-camel-case-variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] diff --git a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs index b832e4bcd6223..30091253f4d56 100644 --- a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs +++ b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // This is ok because we often use the trailing underscore to mean 'prime' -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[forbid(non_camel_case_types)] type Foo_ = isize; diff --git a/tests/ui/lint/lint-non-snake-case-crate-2.rs b/tests/ui/lint/lint-non-snake-case-crate-2.rs index 1b763a9d868d9..b4b816a5a5775 100644 --- a/tests/ui/lint/lint-non-snake-case-crate-2.rs +++ b/tests/ui/lint/lint-non-snake-case-crate-2.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-name NonSnakeCase -// error-pattern: crate `NonSnakeCase` should have a snake case name +//@ compile-flags: --crate-name NonSnakeCase +//@ error-pattern: crate `NonSnakeCase` should have a snake case name #![deny(non_snake_case)] diff --git a/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs b/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs index 9f0c87dcaa61c..a43d2974ff3ff 100644 --- a/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs +++ b/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![deny(non_snake_case)] diff --git a/tests/ui/lint/lint-output-format-2.rs b/tests/ui/lint/lint-output-format-2.rs index 985166e095dfc..96d8030d574ad 100644 --- a/tests/ui/lint/lint-output-format-2.rs +++ b/tests/ui/lint/lint-output-format-2.rs @@ -1,7 +1,7 @@ -// aux-build:lint_output_format.rs +//@ aux-build:lint_output_format.rs #![feature(unstable_test_feature)] -// check-pass +//@ check-pass extern crate lint_output_format; use lint_output_format::{foo, bar}; diff --git a/tests/ui/lint/lint-output-format.rs b/tests/ui/lint/lint-output-format.rs index 67e8ec8f13b4f..0f2ff00c0cfd5 100644 --- a/tests/ui/lint/lint-output-format.rs +++ b/tests/ui/lint/lint-output-format.rs @@ -1,5 +1,5 @@ -// compile-flags: -F unused_features -// aux-build:lint_output_format.rs +//@ compile-flags: -F unused_features +//@ aux-build:lint_output_format.rs #![allow(deprecated)] diff --git a/tests/ui/lint/lint-pre-expansion-extern-module.rs b/tests/ui/lint/lint-pre-expansion-extern-module.rs index 30e2ed8b7a623..b76879ccbb80e 100644 --- a/tests/ui/lint/lint-pre-expansion-extern-module.rs +++ b/tests/ui/lint/lint-pre-expansion-extern-module.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -W rust-2018-compatibility -// error-pattern: `try` is a keyword in the 2018 edition +//@ check-pass +//@ compile-flags: -W rust-2018-compatibility +//@ error-pattern: `try` is a keyword in the 2018 edition fn main() {} diff --git a/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs b/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs index 2df6d08e7aeb6..c2ac9ec11cd42 100644 --- a/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs +++ b/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_pub)] diff --git a/tests/ui/lint/lint-qualification.fixed b/tests/ui/lint/lint-qualification.fixed index c144930136234..18d69ef1b53a2 100644 --- a/tests/ui/lint/lint-qualification.fixed +++ b/tests/ui/lint/lint-qualification.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] #![allow(deprecated)] diff --git a/tests/ui/lint/lint-qualification.rs b/tests/ui/lint/lint-qualification.rs index 80904303559d8..8cf3425db2f2b 100644 --- a/tests/ui/lint/lint-qualification.rs +++ b/tests/ui/lint/lint-qualification.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] #![allow(deprecated)] diff --git a/tests/ui/lint/lint-removed-cmdline-deny.rs b/tests/ui/lint/lint-removed-cmdline-deny.rs index 8cf91cf60eb1d..e56a95d292a43 100644 --- a/tests/ui/lint/lint-removed-cmdline-deny.rs +++ b/tests/ui/lint/lint-removed-cmdline-deny.rs @@ -1,11 +1,11 @@ // The raw_pointer_derived lint warns about its removal // cc #30346 -// compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive +//@ compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive -// error-pattern:lint `raw_pointer_derive` has been removed -// error-pattern:requested on the command line with `-D raw_pointer_derive` -// error-pattern:requested on the command line with `-D renamed-and-removed-lints` +//@ error-pattern:lint `raw_pointer_derive` has been removed +//@ error-pattern:requested on the command line with `-D raw_pointer_derive` +//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints` #![warn(unused)] diff --git a/tests/ui/lint/lint-removed-cmdline.rs b/tests/ui/lint/lint-removed-cmdline.rs index 34373df3a9c62..3c9d3eb8e7ba6 100644 --- a/tests/ui/lint/lint-removed-cmdline.rs +++ b/tests/ui/lint/lint-removed-cmdline.rs @@ -1,11 +1,11 @@ // The raw_pointer_derived lint warns about its removal // cc #30346 -// compile-flags:-D raw_pointer_derive +//@ compile-flags:-D raw_pointer_derive -// error-pattern:lint `raw_pointer_derive` has been removed -// error-pattern:`#[warn(renamed_and_removed_lints)]` on by default -// error-pattern:requested on the command line with `-D raw_pointer_derive` +//@ error-pattern:lint `raw_pointer_derive` has been removed +//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default +//@ error-pattern:requested on the command line with `-D raw_pointer_derive` #![warn(unused)] diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.rs b/tests/ui/lint/lint-renamed-cmdline-deny.rs index 01629aaca80d4..13500d006f86c 100644 --- a/tests/ui/lint/lint-renamed-cmdline-deny.rs +++ b/tests/ui/lint/lint-renamed-cmdline-deny.rs @@ -1,10 +1,10 @@ -// compile-flags:-D renamed-and-removed-lints -D bare_trait_object +//@ compile-flags:-D renamed-and-removed-lints -D bare_trait_object -// error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` -// error-pattern:use the new name `bare_trait_objects` -// error-pattern:requested on the command line with `-D bare_trait_object` -// error-pattern:requested on the command line with `-D renamed-and-removed-lints` -// error-pattern:unused +//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` +//@ error-pattern:use the new name `bare_trait_objects` +//@ error-pattern:requested on the command line with `-D bare_trait_object` +//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints` +//@ error-pattern:unused #[deny(unused)] fn main() { let unused = (); } diff --git a/tests/ui/lint/lint-renamed-cmdline.rs b/tests/ui/lint/lint-renamed-cmdline.rs index fba7c33311df4..7adea98a609f4 100644 --- a/tests/ui/lint/lint-renamed-cmdline.rs +++ b/tests/ui/lint/lint-renamed-cmdline.rs @@ -1,9 +1,9 @@ -// compile-flags:-D bare_trait_object +//@ compile-flags:-D bare_trait_object -// error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` -// error-pattern:requested on the command line with `-D bare_trait_object` -// error-pattern:`#[warn(renamed_and_removed_lints)]` on by default -// error-pattern:unused +//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` +//@ error-pattern:requested on the command line with `-D bare_trait_object` +//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default +//@ error-pattern:unused #[deny(unused)] fn main() { let unused = (); } diff --git a/tests/ui/lint/lint-shorthand-field.fixed b/tests/ui/lint/lint-shorthand-field.fixed index 7cd5717bc5aac..d87af58a0757e 100644 --- a/tests/ui/lint/lint-shorthand-field.fixed +++ b/tests/ui/lint/lint-shorthand-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(nonstandard_style, unused_variables, unused_mut)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/lint-shorthand-field.rs b/tests/ui/lint/lint-shorthand-field.rs index 22de9c3254590..bfe4241b6ba5c 100644 --- a/tests/ui/lint/lint-shorthand-field.rs +++ b/tests/ui/lint/lint-shorthand-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(nonstandard_style, unused_variables, unused_mut)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/lint-stability-2.rs b/tests/ui/lint/lint-stability-2.rs index 94a8d08c8fe9c..644b12670a6c2 100644 --- a/tests/ui/lint/lint-stability-2.rs +++ b/tests/ui/lint/lint-stability-2.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// aux-build:stability_cfg1.rs +//@ aux-build:lint_stability.rs +//@ aux-build:stability_cfg1.rs #![allow(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability-deprecated.rs b/tests/ui/lint/lint-stability-deprecated.rs index 80bc85ff557fc..b6288619a4303 100644 --- a/tests/ui/lint/lint-stability-deprecated.rs +++ b/tests/ui/lint/lint-stability-deprecated.rs @@ -1,8 +1,8 @@ -// check-pass -// aux-build:lint_stability.rs -// aux-build:inherited_stability.rs -// aux-build:stability_cfg1.rs -// aux-build:stability-cfg2.rs +//@ check-pass +//@ aux-build:lint_stability.rs +//@ aux-build:inherited_stability.rs +//@ aux-build:stability_cfg1.rs +//@ aux-build:stability-cfg2.rs #![warn(deprecated)] #![feature(staged_api, unstable_test_feature)] diff --git a/tests/ui/lint/lint-stability-fields-deprecated.rs b/tests/ui/lint/lint-stability-fields-deprecated.rs index a5511966d7e79..8feead7f1932f 100644 --- a/tests/ui/lint/lint-stability-fields-deprecated.rs +++ b/tests/ui/lint/lint-stability-fields-deprecated.rs @@ -1,4 +1,4 @@ -// aux-build:lint_stability_fields.rs +//@ aux-build:lint_stability_fields.rs #![deny(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability-fields.rs b/tests/ui/lint/lint-stability-fields.rs index 51990b6eef161..6ac6798cdb19d 100644 --- a/tests/ui/lint/lint-stability-fields.rs +++ b/tests/ui/lint/lint-stability-fields.rs @@ -1,4 +1,4 @@ -// aux-build:lint_stability_fields.rs +//@ aux-build:lint_stability_fields.rs #![allow(deprecated)] #![allow(dead_code)] #![feature(staged_api)] diff --git a/tests/ui/lint/lint-stability.rs b/tests/ui/lint/lint-stability.rs index d0f0e9f807123..eaf9796df6a3c 100644 --- a/tests/ui/lint/lint-stability.rs +++ b/tests/ui/lint/lint-stability.rs @@ -1,7 +1,7 @@ -// aux-build:lint_stability.rs -// aux-build:inherited_stability.rs -// aux-build:stability_cfg1.rs -// aux-build:stability-cfg2.rs +//@ aux-build:lint_stability.rs +//@ aux-build:inherited_stability.rs +//@ aux-build:stability_cfg1.rs +//@ aux-build:stability-cfg2.rs #![allow(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability2.rs b/tests/ui/lint/lint-stability2.rs index 9ae23dac61bef..254ec8f9bee1e 100644 --- a/tests/ui/lint/lint-stability2.rs +++ b/tests/ui/lint/lint-stability2.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// error-pattern: use of deprecated function +//@ aux-build:lint_stability.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] diff --git a/tests/ui/lint/lint-stability3.rs b/tests/ui/lint/lint-stability3.rs index 4452846ec0a96..3c5652ae03042 100644 --- a/tests/ui/lint/lint-stability3.rs +++ b/tests/ui/lint/lint-stability3.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// error-pattern: use of deprecated function +//@ aux-build:lint_stability.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/lint/lint-type-limits.rs b/tests/ui/lint/lint-type-limits.rs index 2b140f86964ca..4c4cbda7517ba 100644 --- a/tests/ui/lint/lint-type-limits.rs +++ b/tests/ui/lint/lint-type-limits.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } fn foo() { diff --git a/tests/ui/lint/lint-type-limits2.rs b/tests/ui/lint/lint-type-limits2.rs index 3f90119cd8954..4f268296fd985 100644 --- a/tests/ui/lint/lint-type-limits2.rs +++ b/tests/ui/lint/lint-type-limits2.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] #![warn(overflowing_literals)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } diff --git a/tests/ui/lint/lint-type-limits3.rs b/tests/ui/lint/lint-type-limits3.rs index ceecf9ab30bb8..1a08d75aba689 100644 --- a/tests/ui/lint/lint-type-limits3.rs +++ b/tests/ui/lint/lint-type-limits3.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] #![warn(overflowing_literals)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } fn qux() { diff --git a/tests/ui/lint/lint-type-overflow2.rs b/tests/ui/lint/lint-type-overflow2.rs index 9b1eb510bbd83..f007b45b8479d 100644 --- a/tests/ui/lint/lint-type-overflow2.rs +++ b/tests/ui/lint/lint-type-overflow2.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![deny(overflowing_literals)] diff --git a/tests/ui/lint/lint-unconditional-drop-recursion.rs b/tests/ui/lint/lint-unconditional-drop-recursion.rs index 348cd28013979..63abd8b3b6f79 100644 --- a/tests/ui/lint/lint-unconditional-drop-recursion.rs +++ b/tests/ui/lint/lint-unconditional-drop-recursion.rs @@ -1,6 +1,6 @@ // Because drop recursion can only be detected after drop elaboration which // happens for codegen: -// build-fail +//@ build-fail #![deny(unconditional_recursion)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-unexported-no-mangle.rs b/tests/ui/lint/lint-unexported-no-mangle.rs index f260fc32303cf..63eeb3374d22d 100644 --- a/tests/ui/lint/lint-unexported-no-mangle.rs +++ b/tests/ui/lint/lint-unexported-no-mangle.rs @@ -1,4 +1,4 @@ -// compile-flags:-F private_no_mangle_fns -F no_mangle_const_items -F private_no_mangle_statics +//@ compile-flags:-F private_no_mangle_fns -F no_mangle_const_items -F private_no_mangle_statics #[no_mangle] fn foo() { diff --git a/tests/ui/lint/lint-unknown-feature-default.rs b/tests/ui/lint/lint-unknown-feature-default.rs index 84a2e5a4b3549..c1614e0f7ac68 100644 --- a/tests/ui/lint/lint-unknown-feature-default.rs +++ b/tests/ui/lint/lint-unknown-feature-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests the default for the unused_features lint diff --git a/tests/ui/lint/lint-unknown-feature.rs b/tests/ui/lint/lint-unknown-feature.rs index 1af8d4ff8420f..188617467974e 100644 --- a/tests/ui/lint/lint-unknown-feature.rs +++ b/tests/ui/lint/lint-unknown-feature.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_features)] diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs b/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs index c7f8d434c0401..68c5e3b1a3a08 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs @@ -1,4 +1,4 @@ -// check-pass -// compile-flags:-A unknown-lints -D bogus -D dead_cod +//@ check-pass +//@ compile-flags:-A unknown-lints -D bogus -D dead_cod fn main() { } diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs index 31bc204735664..c92c3999ce90d 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs @@ -1,9 +1,9 @@ -// compile-flags:-D unknown-lints -D bogus -D dead_cod +//@ compile-flags:-D unknown-lints -D bogus -D dead_cod -// error-pattern:unknown lint: `bogus` -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:requested on the command line with `-D dead_cod` -// error-pattern:requested on the command line with `-D unknown-lints` -// error-pattern:did you mean: `dead_code` +//@ error-pattern:unknown lint: `bogus` +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:requested on the command line with `-D dead_cod` +//@ error-pattern:requested on the command line with `-D unknown-lints` +//@ error-pattern:did you mean: `dead_code` fn main() { } diff --git a/tests/ui/lint/lint-unknown-lint-cmdline.rs b/tests/ui/lint/lint-unknown-lint-cmdline.rs index 81539cb6dc15a..202c617235fae 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline.rs @@ -1,11 +1,11 @@ -// check-pass -// compile-flags:-D bogus -D dead_cod +//@ check-pass +//@ compile-flags:-D bogus -D dead_cod -// error-pattern:unknown lint: `bogus` -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:`#[warn(unknown_lints)]` on by default -// error-pattern:unknown lint: `dead_cod` -// error-pattern:requested on the command line with `-D dead_cod` -// error-pattern:did you mean: `dead_code` +//@ error-pattern:unknown lint: `bogus` +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:`#[warn(unknown_lints)]` on by default +//@ error-pattern:unknown lint: `dead_cod` +//@ error-pattern:requested on the command line with `-D dead_cod` +//@ error-pattern:did you mean: `dead_code` fn main() { } diff --git a/tests/ui/lint/lint-unnecessary-parens.fixed b/tests/ui/lint/lint-unnecessary-parens.fixed index b17914da6e6a3..973bbd70f257f 100644 --- a/tests/ui/lint/lint-unnecessary-parens.fixed +++ b/tests/ui/lint/lint-unnecessary-parens.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] #![allow(while_true)] // for rustfix diff --git a/tests/ui/lint/lint-unnecessary-parens.rs b/tests/ui/lint/lint-unnecessary-parens.rs index 4cbd6562cd395..40cd61fcc2c0e 100644 --- a/tests/ui/lint/lint-unnecessary-parens.rs +++ b/tests/ui/lint/lint-unnecessary-parens.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] #![allow(while_true)] // for rustfix diff --git a/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs b/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs index 71dec40ea44f0..6e16a796ff19d 100644 --- a/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs +++ b/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs @@ -1,3 +1,3 @@ -// ignore-test: not a test +//@ ignore-test: not a test pub fn try() {} diff --git a/tests/ui/lint/lints-in-foreign-macros.rs b/tests/ui/lint/lints-in-foreign-macros.rs index 1e8b6788a60bb..49e83bae6421f 100644 --- a/tests/ui/lint/lints-in-foreign-macros.rs +++ b/tests/ui/lint/lints-in-foreign-macros.rs @@ -1,5 +1,5 @@ -// aux-build:lints-in-foreign-macros.rs -// check-pass +//@ aux-build:lints-in-foreign-macros.rs +//@ check-pass #![warn(unused_imports)] //~ missing documentation for the crate [missing_docs] #![warn(missing_docs)] diff --git a/tests/ui/lint/missing-copy-implementations-negative-copy.rs b/tests/ui/lint/missing-copy-implementations-negative-copy.rs index b29d2209fa9f9..7860f54e7f32e 100644 --- a/tests/ui/lint/missing-copy-implementations-negative-copy.rs +++ b/tests/ui/lint/missing-copy-implementations-negative-copy.rs @@ -1,7 +1,7 @@ // Regression test for issue #101980. // Ensure that we don't suggest impl'ing `Copy` for a type if it already impl's `!Copy`. -// check-pass +//@ check-pass #![feature(negative_impls)] #![deny(missing_copy_implementations)] diff --git a/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs index 2d5e90720ef2a..16f448674b29a 100644 --- a/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs +++ b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs @@ -2,7 +2,7 @@ // Ensure that we don't suggest impl'ing `Copy` for a type if it or at least one // of it's variants are marked as `non_exhaustive`. -// check-pass +//@ check-pass #![deny(missing_copy_implementations)] diff --git a/tests/ui/lint/must_not_suspend/boxed.rs b/tests/ui/lint/must_not_suspend/boxed.rs index 1f823fc559d40..661bacf45855b 100644 --- a/tests/ui/lint/must_not_suspend/boxed.rs +++ b/tests/ui/lint/must_not_suspend/boxed.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/dedup.rs b/tests/ui/lint/must_not_suspend/dedup.rs index 867bdf2ec12bf..0fc8868e013eb 100644 --- a/tests/ui/lint/must_not_suspend/dedup.rs +++ b/tests/ui/lint/must_not_suspend/dedup.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs index 1554408c174ce..d22a3ef70c82e 100644 --- a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs +++ b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[must_not_suspend = "You gotta use Umm's, ya know?"] //~ ERROR the `#[must_not_suspend]` struct Umm { diff --git a/tests/ui/lint/must_not_suspend/gated.rs b/tests/ui/lint/must_not_suspend/gated.rs index fe8192b0eaa7f..3c618f0a3dc5e 100644 --- a/tests/ui/lint/must_not_suspend/gated.rs +++ b/tests/ui/lint/must_not_suspend/gated.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// edition:2018 +//@ edition:2018 #![deny(must_not_suspend)] //~^ WARNING unknown lint: `must_not_suspend` diff --git a/tests/ui/lint/must_not_suspend/generic.rs b/tests/ui/lint/must_not_suspend/generic.rs index b3effa020c48f..b9b9ae8caa211 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 +//@ edition:2018 +//@ run-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 8714be6449f92..9274bafa41593 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 +//@ edition:2018 +//@ run-pass #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/issue-89562.rs b/tests/ui/lint/must_not_suspend/issue-89562.rs index acdb36fcdabf9..99a548130720f 100644 --- a/tests/ui/lint/must_not_suspend/issue-89562.rs +++ b/tests/ui/lint/must_not_suspend/issue-89562.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass use std::sync::Mutex; diff --git a/tests/ui/lint/must_not_suspend/mutex.rs b/tests/ui/lint/must_not_suspend/mutex.rs index 7bb895e7d3643..d14f7130b4cff 100644 --- a/tests/ui/lint/must_not_suspend/mutex.rs +++ b/tests/ui/lint/must_not_suspend/mutex.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/other_items.rs b/tests/ui/lint/must_not_suspend/other_items.rs index 5aa1abb14d3fa..7a42a2bba03b0 100644 --- a/tests/ui/lint/must_not_suspend/other_items.rs +++ b/tests/ui/lint/must_not_suspend/other_items.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/ref.rs b/tests/ui/lint/must_not_suspend/ref.rs index 3b6ef39c9fe0d..5cd433b41c3a7 100644 --- a/tests/ui/lint/must_not_suspend/ref.rs +++ b/tests/ui/lint/must_not_suspend/ref.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/return.rs b/tests/ui/lint/must_not_suspend/return.rs index 5b1fa5e272118..a04f6a4cfb430 100644 --- a/tests/ui/lint/must_not_suspend/return.rs +++ b/tests/ui/lint/must_not_suspend/return.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/trait.rs b/tests/ui/lint/must_not_suspend/trait.rs index 6c911cb4b0f09..534fb9bfd18f2 100644 --- a/tests/ui/lint/must_not_suspend/trait.rs +++ b/tests/ui/lint/must_not_suspend/trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/unit.rs b/tests/ui/lint/must_not_suspend/unit.rs index af4a76caa4e11..e62c153df57ef 100644 --- a/tests/ui/lint/must_not_suspend/unit.rs +++ b/tests/ui/lint/must_not_suspend/unit.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![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 2d5dd01e5bffb..64432e4460ae8 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 +//@ edition:2018 +//@ run-pass #![feature(must_not_suspend)] #![warn(must_not_suspend)] diff --git a/tests/ui/lint/noop-method-call.fixed b/tests/ui/lint/noop-method-call.fixed index 4d9834f7df625..279dc8a3cd0cc 100644 --- a/tests/ui/lint/noop-method-call.fixed +++ b/tests/ui/lint/noop-method-call.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/lint/noop-method-call.rs b/tests/ui/lint/noop-method-call.rs index 6242a00e03348..447a4c62410b0 100644 --- a/tests/ui/lint/noop-method-call.rs +++ b/tests/ui/lint/noop-method-call.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/lint/not_found.rs b/tests/ui/lint/not_found.rs index de120b6e084b8..8e79c6da15273 100644 --- a/tests/ui/lint/not_found.rs +++ b/tests/ui/lint/not_found.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this tests the `unknown_lint` lint, especially the suggestions diff --git a/tests/ui/lint/outer-forbid.rs b/tests/ui/lint/outer-forbid.rs index ba330258d111f..a2edf6bba0184 100644 --- a/tests/ui/lint/outer-forbid.rs +++ b/tests/ui/lint/outer-forbid.rs @@ -12,7 +12,7 @@ // // The test is much cleaner if we deduplicate, though. -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![forbid(unused, non_snake_case)] #![forbid(forbidden_lint_groups)] diff --git a/tests/ui/lint/ptr_null_checks.rs b/tests/ui/lint/ptr_null_checks.rs index 4925019be1e19..19d328856fd16 100644 --- a/tests/ui/lint/ptr_null_checks.rs +++ b/tests/ui/lint/ptr_null_checks.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr; diff --git a/tests/ui/lint/reasons-erroneous.rs b/tests/ui/lint/reasons-erroneous.rs index 7b286eb1d18e5..7366a03232f3f 100644 --- a/tests/ui/lint/reasons-erroneous.rs +++ b/tests/ui/lint/reasons-erroneous.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(lint_reasons)] diff --git a/tests/ui/lint/reasons-forbidden.rs b/tests/ui/lint/reasons-forbidden.rs index 947099fdd13e7..0b08e7571db0c 100644 --- a/tests/ui/lint/reasons-forbidden.rs +++ b/tests/ui/lint/reasons-forbidden.rs @@ -8,7 +8,7 @@ // // The test is much cleaner if we deduplicate, though. -// compile-flags: -Z deduplicate-diagnostics=true +//@ compile-flags: -Z deduplicate-diagnostics=true #![forbid( unsafe_code, diff --git a/tests/ui/lint/reasons.rs b/tests/ui/lint/reasons.rs index da1c740c4a344..4c2f92af1c70e 100644 --- a/tests/ui/lint/reasons.rs +++ b/tests/ui/lint/reasons.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(elided_lifetimes_in_paths, diff --git a/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs b/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs index 5a94ccd746803..2a58af0fedcc5 100644 --- a/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs +++ b/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type="proc-macro"] #![crate_name="redundant_semi_proc_macro"] extern crate proc_macro; diff --git a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs index 08a5c6c2b634a..33c7e26ba4725 100644 --- a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs +++ b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs @@ -1,4 +1,4 @@ -// aux-build:redundant-semi-proc-macro-def.rs +//@ aux-build:redundant-semi-proc-macro-def.rs #![deny(redundant_semicolons)] extern crate redundant_semi_proc_macro; diff --git a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr index e31d14c559639..d42aa1d613ffa 100644 --- a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr +++ b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr @@ -1,4 +1,4 @@ -TokenStream [Ident { ident: "fn", span: #0 bytes(198..200) }, Ident { ident: "span_preservation", span: #0 bytes(201..218) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(218..220) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(228..231) }, Ident { ident: "tst", span: #0 bytes(232..235) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(236..237) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(238..241) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(241..242) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(242..243) }, Ident { ident: "match", span: #0 bytes(289..294) }, Ident { ident: "tst", span: #0 bytes(295..298) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(483..486) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(487..488) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(488..489) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(490..492) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(492..493) }, Ident { ident: "_", span: #0 bytes(502..503) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(504..505) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(505..506) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(507..509) }], span: #0 bytes(299..515) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(515..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(517..518) }], span: #0 bytes(222..562) }] +TokenStream [Ident { ident: "fn", span: #0 bytes(199..201) }, Ident { ident: "span_preservation", span: #0 bytes(202..219) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(219..221) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(229..232) }, Ident { ident: "tst", span: #0 bytes(233..236) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(237..238) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(239..242) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(242..243) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(243..244) }, Ident { ident: "match", span: #0 bytes(290..295) }, Ident { ident: "tst", span: #0 bytes(296..299) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(484..487) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(488..489) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(489..490) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(491..493) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(493..494) }, Ident { ident: "_", span: #0 bytes(503..504) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(505..506) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(506..507) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(508..510) }], span: #0 bytes(300..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(517..518) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(518..519) }], span: #0 bytes(223..563) }] error: unnecessary trailing semicolon --> $DIR/redundant-semi-proc-macro.rs:9:19 | diff --git a/tests/ui/lint/reference_casting.rs b/tests/ui/lint/reference_casting.rs index e5d84e464fdc4..d6897ab7b141a 100644 --- a/tests/ui/lint/reference_casting.rs +++ b/tests/ui/lint/reference_casting.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail extern "C" { // N.B., mutability can be easily incorrect in FFI calls -- as diff --git a/tests/ui/lint/renamed-lints-still-apply.rs b/tests/ui/lint/renamed-lints-still-apply.rs index 01cd32536728e..ff448763f865f 100644 --- a/tests/ui/lint/renamed-lints-still-apply.rs +++ b/tests/ui/lint/renamed-lints-still-apply.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![deny(single_use_lifetime)] //~^ WARNING renamed //~| NOTE `#[warn(renamed_and_removed_lints)]` on by default diff --git a/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs b/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs index 912e831d88a7d..e94755618cf4e 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #[expect(drop_bounds)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs b/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs index 6b255b799b7ec..ce4b89f5d999f 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs b/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs index 9f591ba985232..8f2550651257e 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs index b95815bc50b98..7bfb84c882694 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs index 07c60fa0c325b..e6f7471b93ce5 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs index dc9a719a3f7e7..1534d5f862cd5 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs index 5fdb710416f04..d066a2b6ba6bf 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #[warn(unused_variables)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs index 82ca49461ed23..7a57ab0f9818f 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] //! This file tests the `#[expect]` attribute implementation for tool lints. The same diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs index d38e65533869a..577c6855fbe84 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // ignore-tidy-linelength #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs index 1e2ff12a20624..44a715e4cdca9 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs index 77cb5e88bf713..7c0ecd1901017 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs index b4183d982118e..29e60a265da4b 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs index a3c3933d70038..efe921b76af3f 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs @@ -1,7 +1,7 @@ -// compile-flags: --force-warn while_true -// compile-flags: --force-warn unused_variables -// compile-flags: --force-warn unused_mut -// check-pass +//@ compile-flags: --force-warn while_true +//@ compile-flags: --force-warn unused_variables +//@ compile-flags: --force-warn unused_mut +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs index 080e300232b03..2751f5d8303fa 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs @@ -1,7 +1,7 @@ -// compile-flags: --force-warn while_true -// compile-flags: --force-warn unused_variables -// compile-flags: --force-warn unused_mut -// check-pass +//@ compile-flags: --force-warn while_true +//@ compile-flags: --force-warn unused_variables +//@ compile-flags: --force-warn unused_mut +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs index 6624b930e5e70..545939b13698a 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs index 5d928b3cab3fe..9431655c41d3e 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs b/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs index 98080b4e8224f..f02dfdcea3054 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs index 2b6c3c6a1fdf6..613335193841c 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs @@ -1,6 +1,6 @@ // This ensures that ICEs like rust#94953 don't happen -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout index 0ee3a03c38847..6a6b4dcff92e1 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout +++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout @@ -1,8 +1,8 @@ #![feature(prelude_import)] #![no_std] // This ensures that ICEs like rust#94953 don't happen -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(lint_reasons)] #[prelude_import] diff --git a/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs b/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs index 0cade7fef02fd..7b60b55eb6120 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Dunused_attributes +//@ check-pass +//@ compile-flags: -Dunused_attributes #![deny(unused_crate_dependencies)] #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs index f62c8a19031dc..858d75f7a543b 100644 --- a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs +++ b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(mixed_script_confusables)] struct ΑctuallyNotLatin; diff --git a/tests/ui/lint/rustdoc-group.rs b/tests/ui/lint/rustdoc-group.rs index 130abe4253a13..0d38c94ac0556 100644 --- a/tests/ui/lint/rustdoc-group.rs +++ b/tests/ui/lint/rustdoc-group.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type lib +//@ check-pass +//@ compile-flags: --crate-type lib #![deny(rustdoc)] //~^ WARNING removed: use `rustdoc::all` #![deny(rustdoc::all)] // has no effect when run with rustc directly diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs index 374506366f802..6dd9d3d4dee2a 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs @@ -1,5 +1,5 @@ -// aux-build:foreign-crate.rs -// check-pass +//@ aux-build:foreign-crate.rs +//@ check-pass extern crate foreign_crate; diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs index fff380934e8e9..33efdb3f08d3a 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(stmt_expr_attributes)] #![warn(semicolon_in_expressions_from_macros)] diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs index 2c63311e65978..05fbfec2ae577 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that trailing semicolons cause warnings by default macro_rules! foo { diff --git a/tests/ui/lint/special-upper-lower-cases.rs b/tests/ui/lint/special-upper-lower-cases.rs index 761be61fa07f6..d77ffbcbfa3d1 100644 --- a/tests/ui/lint/special-upper-lower-cases.rs +++ b/tests/ui/lint/special-upper-lower-cases.rs @@ -3,7 +3,7 @@ // The diagnostics don't provide meaningful suggestions for them // as we cannot convert them properly. -// check-pass +//@ check-pass #![allow(uncommon_codepoints, unused)] diff --git a/tests/ui/lint/suggestions.fixed b/tests/ui/lint/suggestions.fixed index 35851690b7381..b017438a8bdc9 100644 --- a/tests/ui/lint/suggestions.fixed +++ b/tests/ui/lint/suggestions.fixed @@ -1,5 +1,5 @@ // ignore-tidy-tab -// run-rustfix +//@ run-rustfix #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 diff --git a/tests/ui/lint/suggestions.rs b/tests/ui/lint/suggestions.rs index be6f0d6b30fed..2419686a8793b 100644 --- a/tests/ui/lint/suggestions.rs +++ b/tests/ui/lint/suggestions.rs @@ -1,5 +1,5 @@ // ignore-tidy-tab -// run-rustfix +//@ run-rustfix #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 diff --git a/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs index 2583e431ec173..12d92ad2ec687 100644 --- a/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs +++ b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/lint/test-inner-fn.rs b/tests/ui/lint/test-inner-fn.rs index d419cc6fa4553..13b7f44f0b40d 100644 --- a/tests/ui/lint/test-inner-fn.rs +++ b/tests/ui/lint/test-inner-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --test -D unnameable_test_items +//@ compile-flags: --test -D unnameable_test_items #[test] fn foo() { diff --git a/tests/ui/lint/trivial-cast-ice.rs b/tests/ui/lint/trivial-cast-ice.rs index f781fab2212cc..881301c8ef617 100644 --- a/tests/ui/lint/trivial-cast-ice.rs +++ b/tests/ui/lint/trivial-cast-ice.rs @@ -1,5 +1,5 @@ -// aux-build:trivial-cast-ice.rs -// check-pass +//@ aux-build:trivial-cast-ice.rs +//@ check-pass // Demonstrates the ICE in #102561 diff --git a/tests/ui/lint/type-overflow.rs b/tests/ui/lint/type-overflow.rs index 6234b794c1f48..7239e1c983764 100644 --- a/tests/ui/lint/type-overflow.rs +++ b/tests/ui/lint/type-overflow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(overflowing_literals)] fn main() { diff --git a/tests/ui/lint/unaligned_references_external_macro.rs b/tests/ui/lint/unaligned_references_external_macro.rs index b655a2a8f63a2..3a97e2112a144 100644 --- a/tests/ui/lint/unaligned_references_external_macro.rs +++ b/tests/ui/lint/unaligned_references_external_macro.rs @@ -1,4 +1,4 @@ -// aux-build:unaligned_references_external_crate.rs +//@ aux-build:unaligned_references_external_crate.rs extern crate unaligned_references_external_crate; diff --git a/tests/ui/lint/unconditional_panic_98444.rs b/tests/ui/lint/unconditional_panic_98444.rs index 011fabfbbe94c..56e0cf68d8a86 100644 --- a/tests/ui/lint/unconditional_panic_98444.rs +++ b/tests/ui/lint/unconditional_panic_98444.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { let xs: [i32; 5] = [1, 2, 3, 4, 5]; diff --git a/tests/ui/lint/undropped_manually_drops.rs b/tests/ui/lint/undropped_manually_drops.rs index 7286121a40483..737bd5cd0f472 100644 --- a/tests/ui/lint/undropped_manually_drops.rs +++ b/tests/ui/lint/undropped_manually_drops.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct S; diff --git a/tests/ui/lint/unknown-lints/allow-in-other-module.rs b/tests/ui/lint/unknown-lints/allow-in-other-module.rs index 20bf0d7af03cb..399359c32070c 100644 --- a/tests/ui/lint/unknown-lints/allow-in-other-module.rs +++ b/tests/ui/lint/unknown-lints/allow-in-other-module.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that the unknown_lints lint doesn't fire for an unknown lint loaded from a separate file. // The key part is that the stderr output should be empty. diff --git a/tests/ui/lint/unknown-lints/other.rs b/tests/ui/lint/unknown-lints/other.rs index a5111c00a3ecf..f917bff6d6022 100644 --- a/tests/ui/lint/unknown-lints/other.rs +++ b/tests/ui/lint/unknown-lints/other.rs @@ -1,4 +1,4 @@ -// ignore-test +//@ ignore-test // Companion to allow-in-other-module.rs diff --git a/tests/ui/lint/unnecessary-extern-crate.rs b/tests/ui/lint/unnecessary-extern-crate.rs index af2bd84bd53be..6ca3b96758f15 100644 --- a/tests/ui/lint/unnecessary-extern-crate.rs +++ b/tests/ui/lint/unnecessary-extern-crate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_extern_crates)] #![feature(test, rustc_private)] diff --git a/tests/ui/lint/unreachable-async-fn.rs b/tests/ui/lint/unreachable-async-fn.rs index eedd877fe7841..0a699a9ff40bc 100644 --- a/tests/ui/lint/unreachable-async-fn.rs +++ b/tests/ui/lint/unreachable-async-fn.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(dead_code)] async fn foo () { // unreachable lint doesn't trigger diff --git a/tests/ui/lint/unreachable_pub.rs b/tests/ui/lint/unreachable_pub.rs index a50467ce82daf..22c091e112be3 100644 --- a/tests/ui/lint/unreachable_pub.rs +++ b/tests/ui/lint/unreachable_pub.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] #![warn(unreachable_pub)] diff --git a/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs b/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs index 26871c98dbef4..6849e9170c15c 100644 --- a/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs +++ b/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lint/unsafe_code/forge_unsafe_block.rs b/tests/ui/lint/unsafe_code/forge_unsafe_block.rs index a1bd7b4131984..6392849f91595 100644 --- a/tests/ui/lint/unsafe_code/forge_unsafe_block.rs +++ b/tests/ui/lint/unsafe_code/forge_unsafe_block.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:forge_unsafe_block.rs +//@ check-pass +//@ aux-build:forge_unsafe_block.rs #[macro_use] extern crate forge_unsafe_block; diff --git a/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs b/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs index ac547293c583a..44a5f4fb44e65 100644 --- a/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs +++ b/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_braces)] diff --git a/tests/ui/lint/unused-qualification-in-derive-expansion.rs b/tests/ui/lint/unused-qualification-in-derive-expansion.rs index c2efbf507fec8..5cea9086d12d4 100644 --- a/tests/ui/lint/unused-qualification-in-derive-expansion.rs +++ b/tests/ui/lint/unused-qualification-in-derive-expansion.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:add-impl.rs +//@ run-pass +//@ aux-build:add-impl.rs #![forbid(unused_qualifications)] diff --git a/tests/ui/lint/unused/assoc-types.rs b/tests/ui/lint/unused/assoc-types.rs index cebb9b4090ce9..62490604d83e0 100644 --- a/tests/ui/lint/unused/assoc-types.rs +++ b/tests/ui/lint/unused/assoc-types.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// revisions: rpitit assoc_ty +//@ edition: 2021 +//@ revisions: rpitit assoc_ty #![deny(unused_must_use)] diff --git a/tests/ui/lint/unused/auxiliary/must-use-foreign.rs b/tests/ui/lint/unused/auxiliary/must-use-foreign.rs index f773f09c3821b..e2751eb60d69b 100644 --- a/tests/ui/lint/unused/auxiliary/must-use-foreign.rs +++ b/tests/ui/lint/unused/auxiliary/must-use-foreign.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::future::Future; diff --git a/tests/ui/lint/unused/const-local-var.rs b/tests/ui/lint/unused/const-local-var.rs index 89ca16fe003e9..69b697978ed58 100644 --- a/tests/ui/lint/unused/const-local-var.rs +++ b/tests/ui/lint/unused/const-local-var.rs @@ -1,5 +1,5 @@ // regression test for https://github.com/rust-lang/rust/issues/69016 -// check-pass +//@ check-pass #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/unused/issue-103320-must-use-ops.rs b/tests/ui/lint/unused/issue-103320-must-use-ops.rs index 597d312fa5ecb..5749fef46908f 100644 --- a/tests/ui/lint/unused/issue-103320-must-use-ops.rs +++ b/tests/ui/lint/unused/issue-103320-must-use-ops.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_must_use)] #![feature(never_type)] diff --git a/tests/ui/lint/unused/issue-104397.rs b/tests/ui/lint/unused/issue-104397.rs index c17e532c17f20..29a3e1b4f14a7 100644 --- a/tests/ui/lint/unused/issue-104397.rs +++ b/tests/ui/lint/unused/issue-104397.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs b/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs index 8af9e6f3d9503..f794ebdefec72 100644 --- a/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs +++ b/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] fn main() { diff --git a/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs b/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs index 4822a9b2c7ff8..10a69ff618001 100644 --- a/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs +++ b/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(box_patterns)] diff --git a/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed b/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed index 1350b7ca6996c..4af596dd7ebbf 100644 --- a/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed +++ b/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused)] diff --git a/tests/ui/lint/unused/issue-54180-unused-ref-field.rs b/tests/ui/lint/unused/issue-54180-unused-ref-field.rs index 7b3392b609a0a..a96b777b1dae6 100644 --- a/tests/ui/lint/unused/issue-54180-unused-ref-field.rs +++ b/tests/ui/lint/unused/issue-54180-unused-ref-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused)] diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed index 9c52ca5577e4a..7cf4aa6cdd493 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns, stmt_expr_attributes, yeet_expr)] diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs index 196ecf0c1bb85..013255dc21397 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns, stmt_expr_attributes, yeet_expr)] diff --git a/tests/ui/lint/unused/issue-70041.rs b/tests/ui/lint/unused/issue-70041.rs index 22e42295eedf3..817dfe8211496 100644 --- a/tests/ui/lint/unused/issue-70041.rs +++ b/tests/ui/lint/unused/issue-70041.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2018 -// run-pass +//@ compile-flags: --edition=2018 +//@ run-pass macro_rules! regex { //~^ WARN unused macro definition diff --git a/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs b/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs index 24d77e36d94f5..71c4b660604a0 100644 --- a/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs +++ b/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/71290 for details. #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed b/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed index aac918f2bc817..8d64222e1b0bc 100644 --- a/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed +++ b/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #81314: Unused variable lint should // span only the identifier and not the rest of the pattern diff --git a/tests/ui/lint/unused/issue-81314-unused-span-ident.rs b/tests/ui/lint/unused/issue-81314-unused-span-ident.rs index 78296f4258d73..d90e57972eeb3 100644 --- a/tests/ui/lint/unused/issue-81314-unused-span-ident.rs +++ b/tests/ui/lint/unused/issue-81314-unused-span-ident.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #81314: Unused variable lint should // span only the identifier and not the rest of the pattern diff --git a/tests/ui/lint/unused/issue-88519-unused-paren.rs b/tests/ui/lint/unused/issue-88519-unused-paren.rs index ce3d15ac183fe..30f5dcf2615d5 100644 --- a/tests/ui/lint/unused/issue-88519-unused-paren.rs +++ b/tests/ui/lint/unused/issue-88519-unused-paren.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/88519 #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/issue-90807-unused-paren.rs b/tests/ui/lint/unused/issue-90807-unused-paren.rs index 4c0930f967d89..dbd633041d43a 100644 --- a/tests/ui/lint/unused/issue-90807-unused-paren.rs +++ b/tests/ui/lint/unused/issue-90807-unused-paren.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/90807 #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/lint-unused-extern-crate.rs b/tests/ui/lint/unused/lint-unused-extern-crate.rs index 79df58b704247..58ce3a4f55c7d 100644 --- a/tests/ui/lint/unused/lint-unused-extern-crate.rs +++ b/tests/ui/lint/unused/lint-unused-extern-crate.rs @@ -1,8 +1,8 @@ -// aux-build:lint_unused_extern_crate.rs -// aux-build:lint_unused_extern_crate2.rs -// aux-build:lint_unused_extern_crate3.rs -// aux-build:lint_unused_extern_crate4.rs -// aux-build:lint_unused_extern_crate5.rs +//@ aux-build:lint_unused_extern_crate.rs +//@ aux-build:lint_unused_extern_crate2.rs +//@ aux-build:lint_unused_extern_crate3.rs +//@ aux-build:lint_unused_extern_crate4.rs +//@ aux-build:lint_unused_extern_crate5.rs #![deny(unused_extern_crates)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-self.fixed b/tests/ui/lint/unused/lint-unused-mut-self.fixed index 92ce103586c25..d64facb50d3b4 100644 --- a/tests/ui/lint/unused/lint-unused-mut-self.fixed +++ b/tests/ui/lint/unused/lint-unused-mut-self.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-self.rs b/tests/ui/lint/unused/lint-unused-mut-self.rs index 70736ce216e5e..6333dca34da43 100644 --- a/tests/ui/lint/unused/lint-unused-mut-self.rs +++ b/tests/ui/lint/unused/lint-unused-mut-self.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.rs b/tests/ui/lint/unused/lint-unused-mut-variables.rs index 5334ab5824d7a..f0c7dff666e29 100644 --- a/tests/ui/lint/unused/lint-unused-mut-variables.rs +++ b/tests/ui/lint/unused/lint-unused-mut-variables.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Exercise the unused_mut attribute in some positive and negative cases diff --git a/tests/ui/lint/unused/lint-unused-variables.rs b/tests/ui/lint/unused/lint-unused-variables.rs index 621c6ef84140f..84c26c334f0ae 100644 --- a/tests/ui/lint/unused/lint-unused-variables.rs +++ b/tests/ui/lint/unused/lint-unused-variables.rs @@ -1,5 +1,5 @@ -// compile-flags: --cfg something -// edition:2018 +//@ compile-flags: --cfg something +//@ edition:2018 #![feature(async_closure)] #![deny(unused_variables)] diff --git a/tests/ui/lint/unused/must-use-block-expr.fixed b/tests/ui/lint/unused/must-use-block-expr.fixed index 642012812bd2a..ab9c88a9981d4 100644 --- a/tests/ui/lint/unused/must-use-block-expr.fixed +++ b/tests/ui/lint/unused/must-use-block-expr.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-block-expr.rs b/tests/ui/lint/unused/must-use-block-expr.rs index e0a680aa07d08..93ea3a13f4d2e 100644 --- a/tests/ui/lint/unused/must-use-block-expr.rs +++ b/tests/ui/lint/unused/must-use-block-expr.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-box-from-raw.rs b/tests/ui/lint/unused/must-use-box-from-raw.rs index 9ea7726894cbc..1bc7732251387 100644 --- a/tests/ui/lint/unused/must-use-box-from-raw.rs +++ b/tests/ui/lint/unused/must-use-box-from-raw.rs @@ -1,6 +1,6 @@ // #99269 -// check-pass +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-foreign.rs b/tests/ui/lint/unused/must-use-foreign.rs index 21a1105856218..a1d8ad47bbf86 100644 --- a/tests/ui/lint/unused/must-use-foreign.rs +++ b/tests/ui/lint/unused/must-use-foreign.rs @@ -1,6 +1,6 @@ -// edition:2021 -// aux-build:must-use-foreign.rs -// check-pass +//@ edition:2021 +//@ aux-build:must-use-foreign.rs +//@ check-pass extern crate must_use_foreign; diff --git a/tests/ui/lint/unused/must-use-ops.rs b/tests/ui/lint/unused/must-use-ops.rs index 60f877aa8b303..f61cf0fcfcb49 100644 --- a/tests/ui/lint/unused/must-use-ops.rs +++ b/tests/ui/lint/unused/must-use-ops.rs @@ -1,6 +1,6 @@ // Issue #50124 - Test warning for unused operator expressions -// check-pass +//@ check-pass #![warn(unused_must_use)] #![feature(never_type)] 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 37dc519a20401..57e5da0a47209 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 +//@ run-pass #![deny(unused_parens)] #![allow(unreachable_code)] diff --git a/tests/ui/lint/unused/trait-alias-supertrait.rs b/tests/ui/lint/unused/trait-alias-supertrait.rs index 46f00c06bf1ca..ed9658e5b95ec 100644 --- a/tests/ui/lint/unused/trait-alias-supertrait.rs +++ b/tests/ui/lint/unused/trait-alias-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we only consider *Self* supertrait predicates // in the `unused_must_use` lint. diff --git a/tests/ui/lint/unused/unused-async.rs b/tests/ui/lint/unused/unused-async.rs index 6355f47f037c7..a288e96d53091 100644 --- a/tests/ui/lint/unused/unused-async.rs +++ b/tests/ui/lint/unused/unused-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_must_use)] diff --git a/tests/ui/lint/unused/unused-attr-duplicate.rs b/tests/ui/lint/unused/unused-attr-duplicate.rs index 692617eacfbf4..407af40654e8b 100644 --- a/tests/ui/lint/unused/unused-attr-duplicate.rs +++ b/tests/ui/lint/unused/unused-attr-duplicate.rs @@ -1,6 +1,6 @@ // Tests for repeating attribute warnings. -// aux-build:lint_unused_extern_crate.rs -// compile-flags:--test +//@ aux-build:lint_unused_extern_crate.rs +//@ compile-flags:--test // Not tested due to extra requirements: // - panic_handler: needs extra setup // - target_feature: platform-specific diff --git a/tests/ui/lint/unused/unused-closure.rs b/tests/ui/lint/unused/unused-closure.rs index 12ee8b3a9bb8b..9106edee65380 100644 --- a/tests/ui/lint/unused/unused-closure.rs +++ b/tests/ui/lint/unused/unused-closure.rs @@ -1,5 +1,5 @@ // Test that closures and coroutines are "must use" types. -// edition:2018 +//@ edition:2018 #![feature(async_closure)] #![feature(coroutines)] diff --git a/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed b/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed index c21f18015c11a..e8b6dd8640346 100644 --- a/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed +++ b/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![forbid(unused_mut)] diff --git a/tests/ui/lint/unused/unused-mut-warning-captured-var.rs b/tests/ui/lint/unused/unused-mut-warning-captured-var.rs index 3119d83a0ebf8..f46c76b3f5976 100644 --- a/tests/ui/lint/unused/unused-mut-warning-captured-var.rs +++ b/tests/ui/lint/unused/unused-mut-warning-captured-var.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![forbid(unused_mut)] diff --git a/tests/ui/lint/unused/unused-parens-issue-106413.rs b/tests/ui/lint/unused/unused-parens-issue-106413.rs index 7e76ab073b486..81aa41cda0744 100644 --- a/tests/ui/lint/unused/unused-parens-issue-106413.rs +++ b/tests/ui/lint/unused/unused-parens-issue-106413.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] fn id(t: T) -> T { t } diff --git a/tests/ui/lint/unused_braces.fixed b/tests/ui/lint/unused_braces.fixed index e691fb37e6c43..73658a4a939d1 100644 --- a/tests/ui/lint/unused_braces.fixed +++ b/tests/ui/lint/unused_braces.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces, unused_parens)] #![allow(unreachable_code, unused_unsafe)] // for rustfix diff --git a/tests/ui/lint/unused_braces.rs b/tests/ui/lint/unused_braces.rs index 0d260d2cbc93f..87134c73a2c08 100644 --- a/tests/ui/lint/unused_braces.rs +++ b/tests/ui/lint/unused_braces.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces, unused_parens)] #![allow(unreachable_code, unused_unsafe)] // for rustfix diff --git a/tests/ui/lint/unused_braces_borrow.fixed b/tests/ui/lint/unused_braces_borrow.fixed index 583506f891d01..b545f1bb7bb5f 100644 --- a/tests/ui/lint/unused_braces_borrow.fixed +++ b/tests/ui/lint/unused_braces_borrow.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] diff --git a/tests/ui/lint/unused_braces_borrow.rs b/tests/ui/lint/unused_braces_borrow.rs index b7c529d73b94e..499602182deeb 100644 --- a/tests/ui/lint/unused_braces_borrow.rs +++ b/tests/ui/lint/unused_braces_borrow.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] diff --git a/tests/ui/lint/unused_braces_macro.rs b/tests/ui/lint/unused_braces_macro.rs index bfee95378bffe..d0b42a12ff5c9 100644 --- a/tests/ui/lint/unused_braces_macro.rs +++ b/tests/ui/lint/unused_braces_macro.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub fn foo () {} fn main() { diff --git a/tests/ui/lint/unused_import_warning_issue_45268.rs b/tests/ui/lint/unused_import_warning_issue_45268.rs index 7aa4d4959e7a6..afa946976f8c6 100644 --- a/tests/ui/lint/unused_import_warning_issue_45268.rs +++ b/tests/ui/lint/unused_import_warning_issue_45268.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] // Warning explanation here, it's OK diff --git a/tests/ui/lint/unused_labels.rs b/tests/ui/lint/unused_labels.rs index 87a5392fd30fd..4839e975e91c8 100644 --- a/tests/ui/lint/unused_labels.rs +++ b/tests/ui/lint/unused_labels.rs @@ -2,7 +2,7 @@ // should also deal with the edge cases where a label is shadowed, // within nested loops -// check-pass +//@ check-pass #![warn(unused_labels)] diff --git a/tests/ui/lint/unused_parens_json_suggestion.fixed b/tests/ui/lint/unused_parens_json_suggestion.fixed index b73197ef1bd0b..89fd0d866149e 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_json_suggestion.fixed @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_json_suggestion.rs b/tests/ui/lint/unused_parens_json_suggestion.rs index 4339655cf9d51..4526084196c75 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_json_suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_json_suggestion.stderr b/tests/ui/lint/unused_parens_json_suggestion.stderr index 88f6be4236b2b..1f4928cd464c4 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value +{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value --> $DIR/unused_parens_json_suggestion.rs:17:14 | LL | let _a = (1 / (2 + 3)); diff --git a/tests/ui/lint/unused_parens_multibyte_recovery.rs b/tests/ui/lint/unused_parens_multibyte_recovery.rs index bc03faf3fce6c..630b25d192a44 100644 --- a/tests/ui/lint/unused_parens_multibyte_recovery.rs +++ b/tests/ui/lint/unused_parens_multibyte_recovery.rs @@ -1,8 +1,8 @@ // ignore-tidy-trailing-newlines // -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter // // Verify that unused parens lint does not try to create a span // which points in the middle of a multibyte character. diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed index 39d7a1127b642..e2774d5d7e5d6 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.rs b/tests/ui/lint/unused_parens_remove_json_suggestion.rs index 2748bd3f73df6..b3ac87178dbc7 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr index 80371c1594f71..9268fc1abc443 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:18:8 | LL | if (_b) { @@ -16,7 +16,7 @@ LL + if _b { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:29:7 | LL | if(c) { @@ -29,7 +29,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:33:8 | LL | if (c){ @@ -42,7 +42,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:37:11 | LL | while (false && true){ @@ -55,7 +55,7 @@ LL + while false && true { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:38:12 | LL | if (c) { @@ -68,7 +68,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:44:10 | LL | while(true && false) { @@ -81,7 +81,7 @@ LL + while true && false { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:45:18 | LL | for _ in (0 .. 3){ @@ -94,7 +94,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:50:14 | LL | for _ in (0 .. 3) { @@ -107,7 +107,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:51:15 | LL | while (true && false) { diff --git a/tests/ui/lint/unused_variables-issue-82488.fixed b/tests/ui/lint/unused_variables-issue-82488.fixed index 3cb2c90d0d348..e5a22a22291a7 100644 --- a/tests/ui/lint/unused_variables-issue-82488.fixed +++ b/tests/ui/lint/unused_variables-issue-82488.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_variables)] struct Point { diff --git a/tests/ui/lint/unused_variables-issue-82488.rs b/tests/ui/lint/unused_variables-issue-82488.rs index 007b0799bbb0d..a0b9ac1078d27 100644 --- a/tests/ui/lint/unused_variables-issue-82488.rs +++ b/tests/ui/lint/unused_variables-issue-82488.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_variables)] struct Point { diff --git a/tests/ui/lint/use-redundant/issue-92904.rs b/tests/ui/lint/use-redundant/issue-92904.rs index 511d9d263cf85..a767ef7a7724c 100644 --- a/tests/ui/lint/use-redundant/issue-92904.rs +++ b/tests/ui/lint/use-redundant/issue-92904.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Foo(bar::Bar); diff --git a/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs index 6b1e018d2dc30..28d1fea98b582 100644 --- a/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs +++ b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-glob.rs b/tests/ui/lint/use-redundant/use-redundant-glob.rs index bd9e51b6f5942..3d3fe2579b54c 100644 --- a/tests/ui/lint/use-redundant/use-redundant-glob.rs +++ b/tests/ui/lint/use-redundant/use-redundant-glob.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs index 0fb60840f8ad0..7c8db64536109 100644 --- a/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs +++ b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(nonstandard_style)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-not-parent.rs b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs index c97a3d34163c1..fd08fcc3773e5 100644 --- a/tests/ui/lint/use-redundant/use-redundant-not-parent.rs +++ b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub mod bar { pub struct Foo(pub Bar); diff --git a/tests/ui/lint/use-redundant/use-redundant.rs b/tests/ui/lint/use-redundant/use-redundant.rs index 53315dcf638ae..88d3ee75a3f2d 100644 --- a/tests/ui/lint/use-redundant/use-redundant.rs +++ b/tests/ui/lint/use-redundant/use-redundant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] use crate::foo::Bar; diff --git a/tests/ui/lint/use_suggestion_json.rs b/tests/ui/lint/use_suggestion_json.rs index 6a947f1430280..1a797c71bf4bb 100644 --- a/tests/ui/lint/use_suggestion_json.rs +++ b/tests/ui/lint/use_suggestion_json.rs @@ -1,6 +1,6 @@ -// ignore-windows -// ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions -// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options +//@ ignore-windows +//@ ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions +//@ compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr index b3c973680b7f8..16fb1682d4a69 100644 --- a/tests/ui/lint/use_suggestion_json.stderr +++ b/tests/ui/lint/use_suggestion_json.stderr @@ -73,8 +73,8 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 561, - "byte_end": 565, + "byte_start": 564, + "byte_end": 568, "line_start": 12, "line_end": 12, "column_start": 12, @@ -101,8 +101,8 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -124,8 +124,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -147,8 +147,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -170,8 +170,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -193,8 +193,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -216,8 +216,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -239,8 +239,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -262,8 +262,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -285,8 +285,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -308,8 +308,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -331,8 +331,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -354,8 +354,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, diff --git a/tests/ui/lint/warn-ctypes-inhibit.rs b/tests/ui/lint/warn-ctypes-inhibit.rs index 15d8b09d2ecfc..e3952dd00492a 100644 --- a/tests/ui/lint/warn-ctypes-inhibit.rs +++ b/tests/ui/lint/warn-ctypes-inhibit.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags:-D improper-ctypes +//@ compile-flags:-D improper-ctypes -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(improper_ctypes)] mod libc { diff --git a/tests/ui/lint/warn-path-statement.rs b/tests/ui/lint/warn-path-statement.rs index 2435be623f310..dc78aeb51ed89 100644 --- a/tests/ui/lint/warn-path-statement.rs +++ b/tests/ui/lint/warn-path-statement.rs @@ -1,4 +1,4 @@ -// compile-flags: -D path-statements +//@ compile-flags: -D path-statements struct Droppy; impl Drop for Droppy { diff --git a/tests/ui/lint/wide_pointer_comparisons.rs b/tests/ui/lint/wide_pointer_comparisons.rs index 961b998c95663..37807776d2f12 100644 --- a/tests/ui/lint/wide_pointer_comparisons.rs +++ b/tests/ui/lint/wide_pointer_comparisons.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/list.rs b/tests/ui/list.rs index e44c94b3219ab..7e5c2d8548b50 100644 --- a/tests/ui/list.rs +++ b/tests/ui/list.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum list { #[allow(dead_code)] cons(isize, Box), nil, } diff --git a/tests/ui/liveness/liveness-asm.rs b/tests/ui/liveness/liveness-asm.rs index ea5f033cb8644..7169292b7bafc 100644 --- a/tests/ui/liveness/liveness-asm.rs +++ b/tests/ui/liveness/liveness-asm.rs @@ -1,7 +1,7 @@ // Ensure inout asm! operands are marked as used by the liveness pass -// only-x86_64 -// check-pass +//@ only-x86_64 +//@ check-pass #![allow(dead_code)] #![warn(unused_assignments)] 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 b463f4368d111..298181e5529d9 100644 --- a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs +++ b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/liveness/liveness-consts.rs b/tests/ui/liveness/liveness-consts.rs index 8fe2453ca2292..40d30fb9113a9 100644 --- a/tests/ui/liveness/liveness-consts.rs +++ b/tests/ui/liveness/liveness-consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] #![allow(unreachable_code)] diff --git a/tests/ui/liveness/liveness-derive.rs b/tests/ui/liveness/liveness-derive.rs index 1921d0d72bc7b..99eb249d00d7d 100644 --- a/tests/ui/liveness/liveness-derive.rs +++ b/tests/ui/liveness/liveness-derive.rs @@ -1,8 +1,8 @@ // Test for interaction between #[automatically_derived] attribute used by // built-in derives and lints generated by liveness pass. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![warn(unused)] pub trait T: Sized { diff --git a/tests/ui/liveness/liveness-upvars.rs b/tests/ui/liveness/liveness-upvars.rs index 17158dfbc6ccf..7898b97888230 100644 --- a/tests/ui/liveness/liveness-upvars.rs +++ b/tests/ui/liveness/liveness-upvars.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(coroutines)] #![warn(unused)] #![allow(unreachable_code)] diff --git a/tests/ui/log-err-phi.rs b/tests/ui/log-err-phi.rs index c0e04d2c97343..1bb97758782b0 100644 --- a/tests/ui/log-err-phi.rs +++ b/tests/ui/log-err-phi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { if false { diff --git a/tests/ui/log-knows-the-names-of-variants.rs b/tests/ui/log-knows-the-names-of-variants.rs index cf2876b6eee88..cb82cb4878a11 100644 --- a/tests/ui/log-knows-the-names-of-variants.rs +++ b/tests/ui/log-knows-the-names-of-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/log-poly.rs b/tests/ui/log-poly.rs index 14e1b40e16849..64994a558174c 100644 --- a/tests/ui/log-poly.rs +++ b/tests/ui/log-poly.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] enum Numbers { diff --git a/tests/ui/logging-only-prints-once.rs b/tests/ui/logging-only-prints-once.rs index 6d16819ceb0f0..75ef0a274ee48 100644 --- a/tests/ui/logging-only-prints-once.rs +++ b/tests/ui/logging-only-prints-once.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-windows -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-windows +//@ ignore-emscripten no threads support use std::cell::Cell; use std::fmt; diff --git a/tests/ui/loops/dont-suggest-break-thru-item.rs b/tests/ui/loops/dont-suggest-break-thru-item.rs index 308101115e521..34a9a57bfed05 100644 --- a/tests/ui/loops/dont-suggest-break-thru-item.rs +++ b/tests/ui/loops/dont-suggest-break-thru-item.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(inline_const)] diff --git a/tests/ui/loops/for-each-loop-panic.rs b/tests/ui/loops/for-each-loop-panic.rs index 5156999f4db9c..04784cac8f2fc 100644 --- a/tests/ui/loops/for-each-loop-panic.rs +++ b/tests/ui/loops/for-each-loop-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:moop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:moop +//@ ignore-emscripten no processes fn main() { for _ in 0_usize..10_usize { diff --git a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs index 6e030f1cc4875..881c9e88c468c 100644 --- a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs +++ b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -C opt-level=3 -// error-pattern: index out of bounds: the len is 0 but the index is 16777216 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ compile-flags: -C opt-level=3 +//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support fn do_test(x: usize) { let mut arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs index 7f43e4d1a51f8..9a85d1b01eb46 100644 --- a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs +++ b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs @@ -1,11 +1,11 @@ // Ensure we appropriately error instead of overflowing a calculation when creating a new Alloc // Layout -// run-fail -// compile-flags: -C opt-level=3 -// error-pattern: index out of bounds: the len is 0 but the index is 16777216 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ compile-flags: -C opt-level=3 +//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support fn do_test(x: usize) { let arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/loop-break-unsize.rs b/tests/ui/loops/loop-break-unsize.rs index 974c63cea85e4..634acab8d47c7 100644 --- a/tests/ui/loops/loop-break-unsize.rs +++ b/tests/ui/loops/loop-break-unsize.rs @@ -1,5 +1,5 @@ // Regression test for #62312 -// check-pass +//@ check-pass fn main() { let _ = loop { diff --git a/tests/ui/loud_ui.rs b/tests/ui/loud_ui.rs index 6a151fa49f883..2a73e49e17206 100644 --- a/tests/ui/loud_ui.rs +++ b/tests/ui/loud_ui.rs @@ -1,4 +1,4 @@ -// should-fail +//@ should-fail // this test ensures that when we forget to use // any `//~ ERROR` comments whatsoever, that the test doesn't succeed diff --git a/tests/ui/lowering/issue-96847.rs b/tests/ui/lowering/issue-96847.rs index 2aa34c8b33528..9408f6b9b4abc 100644 --- a/tests/ui/lowering/issue-96847.rs +++ b/tests/ui/lowering/issue-96847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that this doesn't abort during AST lowering. In #96847 it did abort // because the attribute was being lowered twice. diff --git a/tests/ui/lto/all-crates.rs b/tests/ui/lto/all-crates.rs index e910b2a9f961a..ceabf9f05dffd 100644 --- a/tests/ui/lto/all-crates.rs +++ b/tests/ui/lto/all-crates.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -Clto=thin -// no-prefer-dynamic +//@ compile-flags: -Clto=thin +//@ no-prefer-dynamic fn main() { println!("hello!"); diff --git a/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs b/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs index dd471154b4ff2..ff7a42d8797bc 100644 --- a/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs +++ b/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs @@ -1,4 +1,4 @@ -// compile-flags: -g --crate-type=rlib +//@ compile-flags: -g --crate-type=rlib pub struct StructWithLifetime<'a>(&'a i32); pub fn mk_struct_with_lt<'a>(x: &'a i32) -> StructWithLifetime<'a> { diff --git a/tests/ui/lto/auxiliary/dylib.rs b/tests/ui/lto/auxiliary/dylib.rs index e8b7f8f9f4735..f4c8d0b6065cf 100644 --- a/tests/ui/lto/auxiliary/dylib.rs +++ b/tests/ui/lto/auxiliary/dylib.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z thinlto -C codegen-units=8 +//@ compile-flags: -Z thinlto -C codegen-units=8 #[inline] pub fn foo(b: u8) { diff --git a/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs b/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs index ec6d056035784..7b518d466aff3 100644 --- a/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs +++ b/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs b/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs index ec6d056035784..7b518d466aff3 100644 --- a/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs +++ b/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs index d24375b2d0a63..cc5665a52a1dc 100644 --- a/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs @@ -1,5 +1,5 @@ -// compile-flags: -Clinker-plugin-lto -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/msvc-imp-present.rs b/tests/ui/lto/auxiliary/msvc-imp-present.rs index 933af050a6a2a..55e349d320316 100644 --- a/tests/ui/lto/auxiliary/msvc-imp-present.rs +++ b/tests/ui/lto/auxiliary/msvc-imp-present.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Z thinlto -C codegen-units=8 -C prefer-dynamic +//@ no-prefer-dynamic +//@ compile-flags: -Z thinlto -C codegen-units=8 -C prefer-dynamic #![crate_type = "rlib"] #![crate_type = "dylib"] diff --git a/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs b/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs index 5fd3f1996ddf8..aae450f41ed15 100644 --- a/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs +++ b/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/thinlto-dylib.rs b/tests/ui/lto/auxiliary/thinlto-dylib.rs index 9d17c35dafc25..716ec2ed98020 100644 --- a/tests/ui/lto/auxiliary/thinlto-dylib.rs +++ b/tests/ui/lto/auxiliary/thinlto-dylib.rs @@ -4,7 +4,7 @@ // This simulates the `rustc_driver` crate, and the main crate simulates rustc's main binary hooking // into this driver. -// compile-flags: -Zdylib-lto -C lto=thin +//@ compile-flags: -Zdylib-lto -C lto=thin use std::panic; diff --git a/tests/ui/lto/debuginfo-lto.rs b/tests/ui/lto/debuginfo-lto.rs index e4beee9e737ba..f189a1df05673 100644 --- a/tests/ui/lto/debuginfo-lto.rs +++ b/tests/ui/lto/debuginfo-lto.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass // This test case makes sure that we don't run into LLVM's dreaded // "possible ODR violation" assertion when compiling with LTO + Debuginfo. // It covers cases that have traditionally been prone to cause this error. // If new cases emerge, add them to this file. -// aux-build:debuginfo-lto-aux.rs -// compile-flags: -C lto -g -// no-prefer-dynamic +//@ aux-build:debuginfo-lto-aux.rs +//@ compile-flags: -C lto -g +//@ no-prefer-dynamic extern crate debuginfo_lto_aux; diff --git a/tests/ui/lto/dylib-works.rs b/tests/ui/lto/dylib-works.rs index 9e0782b590ef6..51f1ac4ab14e7 100644 --- a/tests/ui/lto/dylib-works.rs +++ b/tests/ui/lto/dylib-works.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:dylib.rs +//@ aux-build:dylib.rs extern crate dylib; diff --git a/tests/ui/lto/fat-lto.rs b/tests/ui/lto/fat-lto.rs index c8d8095a265d5..73d6801a25acb 100644 --- a/tests/ui/lto/fat-lto.rs +++ b/tests/ui/lto/fat-lto.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -Clto=fat -// no-prefer-dynamic +//@ run-pass +//@ compile-flags: -Clto=fat +//@ no-prefer-dynamic fn main() { println!("hello!"); diff --git a/tests/ui/lto/issue-100772.rs b/tests/ui/lto/issue-100772.rs index eeb511962362b..29ec5b9bf9647 100644 --- a/tests/ui/lto/issue-100772.rs +++ b/tests/ui/lto/issue-100772.rs @@ -1,8 +1,8 @@ -// build-pass -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi -// no-prefer-dynamic -// only-x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ no-prefer-dynamic +//@ only-x86_64-unknown-linux-gnu #![feature(allocator_api)] diff --git a/tests/ui/lto/issue-105637.rs b/tests/ui/lto/issue-105637.rs index 0d9f0bec00fd3..2cc70964b4cbf 100644 --- a/tests/ui/lto/issue-105637.rs +++ b/tests/ui/lto/issue-105637.rs @@ -9,9 +9,9 @@ // In this test, we reproduce this setup by installing a panic hook in both the main and an LTOed // dylib: the last hook set should be the one being executed, the dylib's. -// aux-build: thinlto-dylib.rs -// run-fail -// check-run-results +//@ aux-build: thinlto-dylib.rs +//@ run-fail +//@ check-run-results extern crate thinlto_dylib; diff --git a/tests/ui/lto/issue-11154.rs b/tests/ui/lto/issue-11154.rs index e11cdc82f32c7..914b0b73e4749 100644 --- a/tests/ui/lto/issue-11154.rs +++ b/tests/ui/lto/issue-11154.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -C lto -C prefer-dynamic +//@ build-fail +//@ compile-flags: -C lto -C prefer-dynamic -// error-pattern: cannot prefer dynamic linking +//@ error-pattern: cannot prefer dynamic linking fn main() {} diff --git a/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs b/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs index f381240e70a44..f742cd78697f8 100644 --- a/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs +++ b/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs @@ -1,3 +1,3 @@ -// compile-flags: -C lto -C embed-bitcode=no +//@ compile-flags: -C lto -C embed-bitcode=no fn main() {} diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs index e540094a3ece8..679d44baae78c 100644 --- a/tests/ui/lto/lto-duplicate-symbols.rs +++ b/tests/ui/lto/lto-duplicate-symbols.rs @@ -1,10 +1,10 @@ -// build-fail -// aux-build:lto-duplicate-symbols1.rs -// aux-build:lto-duplicate-symbols2.rs -// error-pattern:Linking globals named 'foo': symbol multiply defined! -// compile-flags: -C lto -// no-prefer-dynamic -// normalize-stderr-test: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu" +//@ build-fail +//@ aux-build:lto-duplicate-symbols1.rs +//@ aux-build:lto-duplicate-symbols2.rs +//@ error-pattern:Linking globals named 'foo': symbol multiply defined! +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ normalize-stderr-test: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu" extern crate lto_duplicate_symbols1; extern crate lto_duplicate_symbols2; diff --git a/tests/ui/lto/lto-many-codegen-units.rs b/tests/ui/lto/lto-many-codegen-units.rs index f0f461ffec810..fb6636fb81514 100644 --- a/tests/ui/lto/lto-many-codegen-units.rs +++ b/tests/ui/lto/lto-many-codegen-units.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C lto -C codegen-units=8 -// no-prefer-dynamic +//@ run-pass +//@ compile-flags: -C lto -C codegen-units=8 +//@ no-prefer-dynamic fn main() { } diff --git a/tests/ui/lto/lto-opt-level-s.rs b/tests/ui/lto/lto-opt-level-s.rs index a7d9d5024d314..9b8592b47d226 100644 --- a/tests/ui/lto/lto-opt-level-s.rs +++ b/tests/ui/lto/lto-opt-level-s.rs @@ -1,6 +1,6 @@ -// compile-flags: -Clinker-plugin-lto -Copt-level=s -// build-pass -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto -Copt-level=s +//@ build-pass +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/lto-opt-level-z.rs b/tests/ui/lto/lto-opt-level-z.rs index bf1f5e2b2635a..1d063f146cbd5 100644 --- a/tests/ui/lto/lto-opt-level-z.rs +++ b/tests/ui/lto/lto-opt-level-z.rs @@ -1,6 +1,6 @@ -// compile-flags: -Clinker-plugin-lto -Copt-level=z -// build-pass -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto -Copt-level=z +//@ build-pass +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs index 6ef1d4540b8d7..18e937cb29a62 100644 --- a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs @@ -1,7 +1,7 @@ -// compile-flags: -C lto -// aux-build:lto-rustc-loads-linker-plugin.rs -// run-pass -// no-prefer-dynamic +//@ compile-flags: -C lto +//@ aux-build:lto-rustc-loads-linker-plugin.rs +//@ run-pass +//@ no-prefer-dynamic // This test ensures that if a dependency was compiled with // `-Clinker-plugin-lto` then we can compile with `-Clto` and still link against diff --git a/tests/ui/lto/lto-still-runs-thread-dtors.rs b/tests/ui/lto/lto-still-runs-thread-dtors.rs index 635ad783b3155..a93d7cf35cc75 100644 --- a/tests/ui/lto/lto-still-runs-thread-dtors.rs +++ b/tests/ui/lto/lto-still-runs-thread-dtors.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C lto -// no-prefer-dynamic -// ignore-emscripten no threads support +//@ run-pass +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs index 4d54ce32fb563..a38d0e2b2e3c0 100644 --- a/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs @@ -1,7 +1,7 @@ -// compile-flags: -C lto=thin -// aux-build:lto-rustc-loads-linker-plugin.rs -// run-pass -// no-prefer-dynamic +//@ compile-flags: -C lto=thin +//@ aux-build:lto-rustc-loads-linker-plugin.rs +//@ run-pass +//@ no-prefer-dynamic // Same as the adjacent `lto-thin-rustc-loads-linker-plugin.rs` test, only with // ThinLTO. diff --git a/tests/ui/lto/msvc-imp-present.rs b/tests/ui/lto/msvc-imp-present.rs index 5498afb293734..5125dbafe4a49 100644 --- a/tests/ui/lto/msvc-imp-present.rs +++ b/tests/ui/lto/msvc-imp-present.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// aux-build:msvc-imp-present.rs -// compile-flags: -Z thinlto -C codegen-units=8 -// no-prefer-dynamic +//@ aux-build:msvc-imp-present.rs +//@ compile-flags: -Z thinlto -C codegen-units=8 +//@ no-prefer-dynamic // On MSVC we have a "hack" where we emit symbols that look like `_imp_$name` // for all exported statics. This is done because we apply `dllimport` to all diff --git a/tests/ui/lto/thin-lto-global-allocator.rs b/tests/ui/lto/thin-lto-global-allocator.rs index e00c5caf97c6d..4ffd850a52354 100644 --- a/tests/ui/lto/thin-lto-global-allocator.rs +++ b/tests/ui/lto/thin-lto-global-allocator.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z thinlto -C codegen-units=2 +//@ run-pass +//@ compile-flags: -Z thinlto -C codegen-units=2 #[global_allocator] static A: std::alloc::System = std::alloc::System; diff --git a/tests/ui/lto/thin-lto-inlines.rs b/tests/ui/lto/thin-lto-inlines.rs index dca7918077ec8..eeaae5c4c2575 100644 --- a/tests/ui/lto/thin-lto-inlines.rs +++ b/tests/ui/lto/thin-lto-inlines.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -Z thinlto -C codegen-units=8 -O -// ignore-emscripten can't inspect instructions on emscripten +//@ compile-flags: -Z thinlto -C codegen-units=8 -O +//@ ignore-emscripten can't inspect instructions on emscripten // We want to assert here that ThinLTO will inline across codegen units. There's // not really a great way to do that in general so we sort of hack around it by diff --git a/tests/ui/lto/thin-lto-inlines2.rs b/tests/ui/lto/thin-lto-inlines2.rs index 1eb29657c70d6..735557ab491c5 100644 --- a/tests/ui/lto/thin-lto-inlines2.rs +++ b/tests/ui/lto/thin-lto-inlines2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass -// compile-flags: -C codegen-units=8 -O -C lto=thin -// aux-build:thin-lto-inlines-aux.rs -// no-prefer-dynamic -// ignore-emscripten can't inspect instructions on emscripten +//@ compile-flags: -C codegen-units=8 -O -C lto=thin +//@ aux-build:thin-lto-inlines-aux.rs +//@ no-prefer-dynamic +//@ ignore-emscripten can't inspect instructions on emscripten // We want to assert here that ThinLTO will inline across codegen units. There's // not really a great way to do that in general so we sort of hack around it by diff --git a/tests/ui/lto/weak-works.rs b/tests/ui/lto/weak-works.rs index 163a3870248ff..00e10b97d60cb 100644 --- a/tests/ui/lto/weak-works.rs +++ b/tests/ui/lto/weak-works.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -C codegen-units=8 -Z thinlto -// ignore-windows +//@ compile-flags: -C codegen-units=8 -Z thinlto +//@ ignore-windows #![feature(linkage)] diff --git a/tests/ui/lub-glb/empty-binder-future-compat.rs b/tests/ui/lub-glb/empty-binder-future-compat.rs index 8700a88a36ea0..aae1c917d129b 100644 --- a/tests/ui/lub-glb/empty-binder-future-compat.rs +++ b/tests/ui/lub-glb/empty-binder-future-compat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn lt_in_fn_fn<'a: 'a>() -> fn(fn(&'a ())) { |_| () } diff --git a/tests/ui/lub-glb/empty-binders.rs b/tests/ui/lub-glb/empty-binders.rs index f9d07e79fdabf..a3a5b47e7e0ff 100644 --- a/tests/ui/lub-glb/empty-binders.rs +++ b/tests/ui/lub-glb/empty-binders.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Check that computing the lub works even for empty binders. fn lt<'a: 'a>() -> &'a () { diff --git a/tests/ui/lub-glb/old-lub-glb-hr-eq.rs b/tests/ui/lub-glb/old-lub-glb-hr-eq.rs index fbf4aee02045d..97062ec91af5a 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-eq.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-eq.rs @@ -4,7 +4,7 @@ // longer get an error, because we recognize these two types as // equivalent! // -// check-pass +//@ check-pass fn foo(x: fn(&u8, &u8), y: for<'a> fn(&'a u8, &'a u8)) { // The two types above are actually equivalent. With the older diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs index 589119abb9b7c..7a49d624a0546 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs @@ -2,8 +2,8 @@ // general than the other. Test the case where the more general type (`x`) is the first // match arm specifically. -// revisions: leak noleak -//[noleak] compile-flags:-Zno-leak-check +//@ revisions: leak noleak +//@[noleak] compile-flags:-Zno-leak-check fn foo(x: for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8, y: for<'a> fn(&'a u8, &'a u8) -> &'a u8) { // The two types above are not equivalent. With the older LUB/GLB diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs index 9940c40da8134..0efbbc3ef6518 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs @@ -11,10 +11,10 @@ // choose to make this always in error in the future - we perform the leak check // after coercing a function pointer. -// revisions: leak noleak -//[noleak] compile-flags: -Zno-leak-check +//@ revisions: leak noleak +//@[noleak] compile-flags: -Zno-leak-check -//[noleak] check-pass +//@[noleak] check-pass fn foo(x: for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8, y: for<'a> fn(&'a u8, &'a u8) -> &'a u8) { // The two types above are not equivalent. With the older LUB/GLB diff --git a/tests/ui/macro_backtrace/main.rs b/tests/ui/macro_backtrace/main.rs index 6cee3b4cd96d5..e39cecb5938b4 100644 --- a/tests/ui/macro_backtrace/main.rs +++ b/tests/ui/macro_backtrace/main.rs @@ -1,7 +1,7 @@ // Test that the macro backtrace facility works -// aux-build:ping.rs -// revisions: default -Zmacro-backtrace -//[-Zmacro-backtrace] compile-flags: -Z macro-backtrace +//@ aux-build:ping.rs +//@ revisions: default -Zmacro-backtrace +//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace #[macro_use] extern crate ping; diff --git a/tests/ui/macros/assert-as-macro.rs b/tests/ui/macros/assert-as-macro.rs index 23c0548081333..391b056292f84 100644 --- a/tests/ui/macros/assert-as-macro.rs +++ b/tests/ui/macros/assert-as-macro.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:assertion failed: 1 == 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion failed: 1 == 2 +//@ ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/tests/ui/macros/assert-eq-macro-msg.rs b/tests/ui/macros/assert-eq-macro-msg.rs index 3d921f4007257..39eeefeeef90e 100644 --- a/tests/ui/macros/assert-eq-macro-msg.rs +++ b/tests/ui/macros/assert-eq-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 -// error-pattern: left: 2 -// error-pattern: right: 3 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 +//@ error-pattern: left: 2 +//@ error-pattern: right: 3 +//@ ignore-emscripten no processes fn main() { assert_eq!(1 + 1, 3, "1 + 1 definitely should be 3"); diff --git a/tests/ui/macros/assert-eq-macro-panic.rs b/tests/ui/macros/assert-eq-macro-panic.rs index 6745290cbfcf9..22c3a8a634f4b 100644 --- a/tests/ui/macros/assert-eq-macro-panic.rs +++ b/tests/ui/macros/assert-eq-macro-panic.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left == right` failed -// error-pattern: left: 14 -// error-pattern: right: 15 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left == right` failed +//@ error-pattern: left: 14 +//@ error-pattern: right: 15 +//@ ignore-emscripten no processes fn main() { assert_eq!(14, 15); diff --git a/tests/ui/macros/assert-eq-macro-success.rs b/tests/ui/macros/assert-eq-macro-success.rs index 57858b348379a..490cd9315b6e2 100644 --- a/tests/ui/macros/assert-eq-macro-success.rs +++ b/tests/ui/macros/assert-eq-macro-success.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { x : isize } diff --git a/tests/ui/macros/assert-eq-macro-unsized.rs b/tests/ui/macros/assert-eq-macro-unsized.rs index 00823216bf6f7..243f04b67d786 100644 --- a/tests/ui/macros/assert-eq-macro-unsized.rs +++ b/tests/ui/macros/assert-eq-macro-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!([1, 2, 3][..], vec![1, 2, 3][..]); } diff --git a/tests/ui/macros/assert-format-lazy.rs b/tests/ui/macros/assert-format-lazy.rs index c7f05d763b7a4..e0830660dd76f 100644 --- a/tests/ui/macros/assert-format-lazy.rs +++ b/tests/ui/macros/assert-format-lazy.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ compile-flags: -C debug_assertions=yes #[allow(unreachable_code)] fn main() { diff --git a/tests/ui/macros/assert-long-condition.rs b/tests/ui/macros/assert-long-condition.rs index 1974ec9d6db8c..424d566e4393f 100644 --- a/tests/ui/macros/assert-long-condition.rs +++ b/tests/ui/macros/assert-long-condition.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// ignore-emscripten no processes +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ ignore-emscripten no processes // ignore-tidy-linelength fn main() { diff --git a/tests/ui/macros/assert-macro-explicit.rs b/tests/ui/macros/assert-macro-explicit.rs index 3d1a9a6b1ad1c..167581d2525e1 100644 --- a/tests/ui/macros/assert-macro-explicit.rs +++ b/tests/ui/macros/assert-macro-explicit.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:assertion failed: false -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion failed: false +//@ ignore-emscripten no processes fn main() { assert!(false); diff --git a/tests/ui/macros/assert-macro-fmt.rs b/tests/ui/macros/assert-macro-fmt.rs index ceec53ceb9f54..475544303796d 100644 --- a/tests/ui/macros/assert-macro-fmt.rs +++ b/tests/ui/macros/assert-macro-fmt.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern: panicked -// error-pattern: test-assert-fmt 42 rust -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern: panicked +//@ error-pattern: test-assert-fmt 42 rust +//@ ignore-emscripten no processes fn main() { assert!(false, "test-assert-fmt {} {}", 42, "rust"); diff --git a/tests/ui/macros/assert-macro-owned.rs b/tests/ui/macros/assert-macro-owned.rs index fb4b389b80b83..46a59db1390c2 100644 --- a/tests/ui/macros/assert-macro-owned.rs +++ b/tests/ui/macros/assert-macro-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-assert-owned -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-assert-owned +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/assert-macro-static.rs b/tests/ui/macros/assert-macro-static.rs index fccc3259281f9..7d9e345d516a3 100644 --- a/tests/ui/macros/assert-macro-static.rs +++ b/tests/ui/macros/assert-macro-static.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-assert-static -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-assert-static +//@ ignore-emscripten no processes fn main() { assert!(false, "test-assert-static"); diff --git a/tests/ui/macros/assert-matches-macro-msg.rs b/tests/ui/macros/assert-matches-macro-msg.rs index 7af6a0778433a..efa4121da9232 100644 --- a/tests/ui/macros/assert-matches-macro-msg.rs +++ b/tests/ui/macros/assert-matches-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 -// error-pattern: left: 2 -// error-pattern: right: 3 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 +//@ error-pattern: left: 2 +//@ error-pattern: right: 3 +//@ ignore-emscripten no processes #![feature(assert_matches)] diff --git a/tests/ui/macros/assert-ne-macro-msg.rs b/tests/ui/macros/assert-ne-macro-msg.rs index adda0af88f28b..0a578e1baf93c 100644 --- a/tests/ui/macros/assert-ne-macro-msg.rs +++ b/tests/ui/macros/assert-ne-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 -// error-pattern: left: 2 -// error-pattern: right: 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 +//@ error-pattern: left: 2 +//@ error-pattern: right: 2 +//@ ignore-emscripten no processes fn main() { assert_ne!(1 + 1, 2, "1 + 1 definitely should not be 2"); diff --git a/tests/ui/macros/assert-ne-macro-panic.rs b/tests/ui/macros/assert-ne-macro-panic.rs index d977473a2ded2..9cf5f05e9f18b 100644 --- a/tests/ui/macros/assert-ne-macro-panic.rs +++ b/tests/ui/macros/assert-ne-macro-panic.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left != right` failed -// error-pattern: left: 14 -// error-pattern: right: 14 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left != right` failed +//@ error-pattern: left: 14 +//@ error-pattern: right: 14 +//@ ignore-emscripten no processes fn main() { assert_ne!(14, 14); diff --git a/tests/ui/macros/assert-ne-macro-success.rs b/tests/ui/macros/assert-ne-macro-success.rs index 89b3a4c9d6a40..4078bb0700448 100644 --- a/tests/ui/macros/assert-ne-macro-success.rs +++ b/tests/ui/macros/assert-ne-macro-success.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { x : isize } diff --git a/tests/ui/macros/assert-ne-macro-unsized.rs b/tests/ui/macros/assert-ne-macro-unsized.rs index e8a86e3da0687..9938ac9d65b2d 100644 --- a/tests/ui/macros/assert-ne-macro-unsized.rs +++ b/tests/ui/macros/assert-ne-macro-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_ne!([6, 6, 6][..], vec![1, 2, 3][..]); } diff --git a/tests/ui/macros/assert-trailing-junk.rs b/tests/ui/macros/assert-trailing-junk.rs index da725e19e2ada..16f68dfcf9b65 100644 --- a/tests/ui/macros/assert-trailing-junk.rs +++ b/tests/ui/macros/assert-trailing-junk.rs @@ -1,5 +1,5 @@ -// revisions: with-generic-asset without-generic-asset -// [with-generic-asset] compile-flags: --cfg feature="generic_assert" +//@ revisions: with-generic-asset without-generic-asset +//@ [with-generic-asset] compile-flags: --cfg feature="generic_assert" // Ensure assert macro does not ignore trailing garbage. // diff --git a/tests/ui/macros/assert.rs b/tests/ui/macros/assert.rs index a314db907b8a2..4a8ea816747a6 100644 --- a/tests/ui/macros/assert.rs +++ b/tests/ui/macros/assert.rs @@ -1,5 +1,5 @@ -// revisions: with-generic-asset without-generic-asset -// [with-generic-asset] compile-flags: --cfg feature="generic_assert" +//@ revisions: with-generic-asset without-generic-asset +//@ [with-generic-asset] compile-flags: --cfg feature="generic_assert" fn main() { assert!(); //~ ERROR requires a boolean expression diff --git a/tests/ui/macros/attr-from-macro.rs b/tests/ui/macros/attr-from-macro.rs index bb3a5c94d419b..b745599ffd443 100644 --- a/tests/ui/macros/attr-from-macro.rs +++ b/tests/ui/macros/attr-from-macro.rs @@ -1,5 +1,5 @@ -// aux-build:attr-from-macro.rs -// run-pass +//@ aux-build:attr-from-macro.rs +//@ run-pass extern crate attr_from_macro; diff --git a/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs b/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs index 26d4c96d52433..1596f890bbba1 100644 --- a/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs +++ b/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! custom_matches { diff --git a/tests/ui/macros/auxiliary/hello_macro.rs b/tests/ui/macros/auxiliary/hello_macro.rs index a05b8d54dc10e..10f474bd1b395 100644 --- a/tests/ui/macros/auxiliary/hello_macro.rs +++ b/tests/ui/macros/auxiliary/hello_macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/issue-100199.rs b/tests/ui/macros/auxiliary/issue-100199.rs index 9e190b542db49..9ee9a2f503942 100644 --- a/tests/ui/macros/auxiliary/issue-100199.rs +++ b/tests/ui/macros/auxiliary/issue-100199.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/proc_macro_def.rs b/tests/ui/macros/auxiliary/proc_macro_def.rs index 0497e4ae07d9a..6574bf184fb75 100644 --- a/tests/ui/macros/auxiliary/proc_macro_def.rs +++ b/tests/ui/macros/auxiliary/proc_macro_def.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/proc_macro_sequence.rs b/tests/ui/macros/auxiliary/proc_macro_sequence.rs index 2f69cbc945080..de2efdfecf147 100644 --- a/tests/ui/macros/auxiliary/proc_macro_sequence.rs +++ b/tests/ui/macros/auxiliary/proc_macro_sequence.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_span, proc_macro_quote)] diff --git a/tests/ui/macros/bang-after-name.fixed b/tests/ui/macros/bang-after-name.fixed index c107ddd5d03bd..3cad1f9aa77ae 100644 --- a/tests/ui/macros/bang-after-name.fixed +++ b/tests/ui/macros/bang-after-name.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_macros)] macro_rules! foo { //~ ERROR macro names aren't followed by a `!` diff --git a/tests/ui/macros/bang-after-name.rs b/tests/ui/macros/bang-after-name.rs index 7654d8c440390..26f8899105011 100644 --- a/tests/ui/macros/bang-after-name.rs +++ b/tests/ui/macros/bang-after-name.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_macros)] macro_rules! foo! { //~ ERROR macro names aren't followed by a `!` diff --git a/tests/ui/macros/builtin-env-issue-114010.rs b/tests/ui/macros/builtin-env-issue-114010.rs index 819b8b1e8abe0..29ccb79a64f8b 100644 --- a/tests/ui/macros/builtin-env-issue-114010.rs +++ b/tests/ui/macros/builtin-env-issue-114010.rs @@ -1,5 +1,5 @@ -// unset-rustc-env:oopsie -// unset-rustc-env:a""a +//@ unset-rustc-env:oopsie +//@ unset-rustc-env:a""a env![r#"oopsie"#]; //~^ ERROR environment variable `oopsie` not defined at compile time diff --git a/tests/ui/macros/builtin-std-paths.rs b/tests/ui/macros/builtin-std-paths.rs index 2083f9ba3dc34..4612ef4248780 100644 --- a/tests/ui/macros/builtin-std-paths.rs +++ b/tests/ui/macros/builtin-std-paths.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive( core::clone::Clone, diff --git a/tests/ui/macros/colorful-write-macros.rs b/tests/ui/macros/colorful-write-macros.rs index eb1872cc7f094..f20ca00b804e2 100644 --- a/tests/ui/macros/colorful-write-macros.rs +++ b/tests/ui/macros/colorful-write-macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::io::Write; use std::fmt; diff --git a/tests/ui/macros/concat-bytes.rs b/tests/ui/macros/concat-bytes.rs index fd8f99417ec98..36227a712cc00 100644 --- a/tests/ui/macros/concat-bytes.rs +++ b/tests/ui/macros/concat-bytes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(concat_bytes)] fn main() { diff --git a/tests/ui/macros/concat-rpass.rs b/tests/ui/macros/concat-rpass.rs index 0c30a39d6a255..3fbc80e0e99ef 100644 --- a/tests/ui/macros/concat-rpass.rs +++ b/tests/ui/macros/concat-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!(format!(concat!("foo", "bar", "{}"), "baz"), "foobarbaz".to_string()); diff --git a/tests/ui/macros/conditional-debug-macro-on.rs b/tests/ui/macros/conditional-debug-macro-on.rs index 8665da89758ca..2b726378fba57 100644 --- a/tests/ui/macros/conditional-debug-macro-on.rs +++ b/tests/ui/macros/conditional-debug-macro-on.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // exits early if println! evaluates its arguments, otherwise it // will hit the panic. diff --git a/tests/ui/macros/cross-crate-pat-span.rs b/tests/ui/macros/cross-crate-pat-span.rs index ed67142ce3de2..cd4e791d2f993 100644 --- a/tests/ui/macros/cross-crate-pat-span.rs +++ b/tests/ui/macros/cross-crate-pat-span.rs @@ -1,6 +1,6 @@ -// edition:2021 -// check-pass -// aux-build: foreign-crate-macro-pat.rs +//@ edition:2021 +//@ check-pass +//@ aux-build: foreign-crate-macro-pat.rs // // Tests that the edition of the foreign crate is used // when determining the behavior of the `:pat` matcher. diff --git a/tests/ui/macros/die-macro-2.rs b/tests/ui/macros/die-macro-2.rs index ebbce528a18fa..e5456bdfca0f9 100644 --- a/tests/ui/macros/die-macro-2.rs +++ b/tests/ui/macros/die-macro-2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn main() { panic!("test"); diff --git a/tests/ui/macros/die-macro-expr.rs b/tests/ui/macros/die-macro-expr.rs index c4b5f68ddf9ff..fb92dd66e3dc3 100644 --- a/tests/ui/macros/die-macro-expr.rs +++ b/tests/ui/macros/die-macro-expr.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn main() { let __isize: isize = panic!("test"); diff --git a/tests/ui/macros/die-macro-pure.rs b/tests/ui/macros/die-macro-pure.rs index 588fbe61b0e76..484eed3d720f0 100644 --- a/tests/ui/macros/die-macro-pure.rs +++ b/tests/ui/macros/die-macro-pure.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn f() { panic!("test"); diff --git a/tests/ui/macros/die-macro.rs b/tests/ui/macros/die-macro.rs index 2a726efe8225d..b717eed3fb438 100644 --- a/tests/ui/macros/die-macro.rs +++ b/tests/ui/macros/die-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Just testing that panic!() type checks in statement or expr diff --git a/tests/ui/macros/doc-comment.rs b/tests/ui/macros/doc-comment.rs index 9de39e9b56c98..577f1afa0df4e 100644 --- a/tests/ui/macros/doc-comment.rs +++ b/tests/ui/macros/doc-comment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that we properly handle a nested macro expansion // involving a `#[doc]` attribute #![deny(missing_docs)] diff --git a/tests/ui/macros/dollar-crate-nested-encoding.rs b/tests/ui/macros/dollar-crate-nested-encoding.rs index 5242f7830bbdb..b8a59339896a0 100644 --- a/tests/ui/macros/dollar-crate-nested-encoding.rs +++ b/tests/ui/macros/dollar-crate-nested-encoding.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:dollar-crate-nested-encoding.rs +//@ check-pass +//@ aux-build:dollar-crate-nested-encoding.rs extern crate dollar_crate_nested_encoding; diff --git a/tests/ui/macros/duplicate-builtin.rs b/tests/ui/macros/duplicate-builtin.rs index 35f0f429059a9..c75782128f425 100644 --- a/tests/ui/macros/duplicate-builtin.rs +++ b/tests/ui/macros/duplicate-builtin.rs @@ -1,4 +1,4 @@ -// compile-flags:--crate-type lib +//@ compile-flags:--crate-type lib #![feature(decl_macro)] #![feature(rustc_attrs)] diff --git a/tests/ui/macros/edition-macro-pats.rs b/tests/ui/macros/edition-macro-pats.rs index 040894712a8ca..f5388e09c74a5 100644 --- a/tests/ui/macros/edition-macro-pats.rs +++ b/tests/ui/macros/edition-macro-pats.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 macro_rules! foo { (a $x:pat_param) => {}; diff --git a/tests/ui/macros/format-args-temporaries-async.rs b/tests/ui/macros/format-args-temporaries-async.rs index d959329b9fce2..741844409ac08 100644 --- a/tests/ui/macros/format-args-temporaries-async.rs +++ b/tests/ui/macros/format-args-temporaries-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::fmt::{self, Display}; use std::future::Future; diff --git a/tests/ui/macros/format-args-temporaries-in-write.rs b/tests/ui/macros/format-args-temporaries-in-write.rs index 339ccbc33ac98..b4c1e212221fc 100644 --- a/tests/ui/macros/format-args-temporaries-in-write.rs +++ b/tests/ui/macros/format-args-temporaries-in-write.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::fmt::{self, Display}; diff --git a/tests/ui/macros/format-args-temporaries.rs b/tests/ui/macros/format-args-temporaries.rs index 1ff6e3f80d6d5..ad9792bc796cf 100644 --- a/tests/ui/macros/format-args-temporaries.rs +++ b/tests/ui/macros/format-args-temporaries.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::{self, Display}; diff --git a/tests/ui/macros/html-literals.rs b/tests/ui/macros/html-literals.rs index e5ff425041a9c..b30de7b7ee684 100644 --- a/tests/ui/macros/html-literals.rs +++ b/tests/ui/macros/html-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // A test of the macro system. Can we do HTML literals? diff --git a/tests/ui/macros/include-single-expr-helper-1.rs b/tests/ui/macros/include-single-expr-helper-1.rs index aa6380bd24dc7..ddeeb982f64cd 100644 --- a/tests/ui/macros/include-single-expr-helper-1.rs +++ b/tests/ui/macros/include-single-expr-helper-1.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for include-single-expr.rs +//@ ignore-test auxiliary file for include-single-expr.rs 0 diff --git a/tests/ui/macros/include-single-expr-helper.rs b/tests/ui/macros/include-single-expr-helper.rs index 84d8b69603b6b..e8ad9746b02cd 100644 --- a/tests/ui/macros/include-single-expr-helper.rs +++ b/tests/ui/macros/include-single-expr-helper.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for include-single-expr.rs +//@ ignore-test auxiliary file for include-single-expr.rs 0 10 diff --git a/tests/ui/macros/include-single-expr.rs b/tests/ui/macros/include-single-expr.rs index 0f4c29ec01456..c501f5d97ca55 100644 --- a/tests/ui/macros/include-single-expr.rs +++ b/tests/ui/macros/include-single-expr.rs @@ -1,4 +1,4 @@ -// error-pattern include macro expected single expression +//@ error-pattern include macro expected single expression fn main() { include!("include-single-expr-helper.rs"); diff --git a/tests/ui/macros/issue-100199.rs b/tests/ui/macros/issue-100199.rs index 6e50afa075984..b1bcc535d74af 100644 --- a/tests/ui/macros/issue-100199.rs +++ b/tests/ui/macros/issue-100199.rs @@ -5,7 +5,7 @@ struct Foo {} // an unexpected dummy span (lo == 0 == hi) while attempting to print a // suggestion. -// aux-build: issue-100199.rs +//@ aux-build: issue-100199.rs extern crate issue_100199; diff --git a/tests/ui/macros/issue-112342-2.rs b/tests/ui/macros/issue-112342-2.rs index e797aff94d2f3..6387fd4243525 100644 --- a/tests/ui/macros/issue-112342-2.rs +++ b/tests/ui/macros/issue-112342-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // same as #95267, ignore doc comment although it's a bug. diff --git a/tests/ui/macros/issue-118786.rs b/tests/ui/macros/issue-118786.rs index 84af3a651137e..cc6c751813b36 100644 --- a/tests/ui/macros/issue-118786.rs +++ b/tests/ui/macros/issue-118786.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib -O -C debug-assertions=yes +//@ compile-flags: --crate-type lib -O -C debug-assertions=yes // Regression test for issue 118786 diff --git a/tests/ui/macros/issue-19163.rs b/tests/ui/macros/issue-19163.rs index d98c5912af2ee..e08bd6e393bdb 100644 --- a/tests/ui/macros/issue-19163.rs +++ b/tests/ui/macros/issue-19163.rs @@ -1,4 +1,4 @@ -// aux-build:issue-19163.rs +//@ aux-build:issue-19163.rs #[macro_use] extern crate issue_19163; diff --git a/tests/ui/macros/issue-22463.rs b/tests/ui/macros/issue-22463.rs index 8f7b27cb9a056..efb61e9ed6845 100644 --- a/tests/ui/macros/issue-22463.rs +++ b/tests/ui/macros/issue-22463.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! items { () => { type A = (); diff --git a/tests/ui/macros/issue-25274.rs b/tests/ui/macros/issue-25274.rs index 65b29bba8c812..3ed47b6a89484 100644 --- a/tests/ui/macros/issue-25274.rs +++ b/tests/ui/macros/issue-25274.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! test { ( diff --git a/tests/ui/macros/issue-26322.rs b/tests/ui/macros/issue-26322.rs index c1dc80eb7c591..aaffbb081e22a 100644 --- a/tests/ui/macros/issue-26322.rs +++ b/tests/ui/macros/issue-26322.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/macros/issue-2804-2.rs b/tests/ui/macros/issue-2804-2.rs index d02725505ac19..6702f4249aa17 100644 --- a/tests/ui/macros/issue-2804-2.rs +++ b/tests/ui/macros/issue-2804-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Minimized version of issue-2804.rs. Both check that callee IDs don't // clobber the previous node ID in a macro expr diff --git a/tests/ui/macros/issue-2804.rs b/tests/ui/macros/issue-2804.rs index 571028c5e4005..0b6f9487ece2a 100644 --- a/tests/ui/macros/issue-2804.rs +++ b/tests/ui/macros/issue-2804.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/macros/issue-33185.rs b/tests/ui/macros/issue-33185.rs index 0d6669146a625..8d7e305f1e359 100644 --- a/tests/ui/macros/issue-33185.rs +++ b/tests/ui/macros/issue-33185.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[macro_export] diff --git a/tests/ui/macros/issue-34171.rs b/tests/ui/macros/issue-34171.rs index 157c58c459d66..fbc2ea50097da 100644 --- a/tests/ui/macros/issue-34171.rs +++ b/tests/ui/macros/issue-34171.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! null { ($i:tt) => {} } macro_rules! apply_null { diff --git a/tests/ui/macros/issue-37175.rs b/tests/ui/macros/issue-37175.rs index 9ec9d48d18b53..e25ddfce6f2dd 100644 --- a/tests/ui/macros/issue-37175.rs +++ b/tests/ui/macros/issue-37175.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! m { (<$t:ty>) => { stringify!($t) } } fn main() { println!("{}", m!(>)); diff --git a/tests/ui/macros/issue-39467.rs b/tests/ui/macros/issue-39467.rs index 397751e4ec37a..5405ec3fb3d5b 100644 --- a/tests/ui/macros/issue-39467.rs +++ b/tests/ui/macros/issue-39467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] macro_rules! expr { () => { () } } diff --git a/tests/ui/macros/issue-40469.rs b/tests/ui/macros/issue-40469.rs index 9b22aaef289a5..faa4c6581af7f 100644 --- a/tests/ui/macros/issue-40469.rs +++ b/tests/ui/macros/issue-40469.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/macros/issue-40770.rs b/tests/ui/macros/issue-40770.rs index c9713c157981d..d90294acd2510 100644 --- a/tests/ui/macros/issue-40770.rs +++ b/tests/ui/macros/issue-40770.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] macro_rules! m { ($e:expr) => { diff --git a/tests/ui/macros/issue-41803.rs b/tests/ui/macros/issue-41803.rs index bccfdc611460e..69162da12ac93 100644 --- a/tests/ui/macros/issue-41803.rs +++ b/tests/ui/macros/issue-41803.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] /// A compile-time map from identifiers to arbitrary (heterogeneous) expressions diff --git a/tests/ui/macros/issue-42954.fixed b/tests/ui/macros/issue-42954.fixed index a73054c92570e..acfc36e2bff2f 100644 --- a/tests/ui/macros/issue-42954.fixed +++ b/tests/ui/macros/issue-42954.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_must_use, unused_comparisons)] diff --git a/tests/ui/macros/issue-42954.rs b/tests/ui/macros/issue-42954.rs index 5f9b0e31da5cc..91362946f845a 100644 --- a/tests/ui/macros/issue-42954.rs +++ b/tests/ui/macros/issue-42954.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_must_use, unused_comparisons)] diff --git a/tests/ui/macros/issue-44127.rs b/tests/ui/macros/issue-44127.rs index 21b2e68264a14..a6e2840c7f849 100644 --- a/tests/ui/macros/issue-44127.rs +++ b/tests/ui/macros/issue-44127.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] diff --git a/tests/ui/macros/issue-5060.rs b/tests/ui/macros/issue-5060.rs index c4760bc029b62..bca71e7e5c792 100644 --- a/tests/ui/macros/issue-5060.rs +++ b/tests/ui/macros/issue-5060.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! print_hd_tl { ($field_hd:ident, $($field_tl:ident),+) => ({ print!("{}", stringify!($field_hd)); diff --git a/tests/ui/macros/issue-52169.rs b/tests/ui/macros/issue-52169.rs index f178cd30cb499..b1a09e83ee980 100644 --- a/tests/ui/macros/issue-52169.rs +++ b/tests/ui/macros/issue-52169.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused_macro_rules)] macro_rules! a { diff --git a/tests/ui/macros/issue-57597.rs b/tests/ui/macros/issue-57597.rs index ebeb3fe07adb4..fd45f53cbd415 100644 --- a/tests/ui/macros/issue-57597.rs +++ b/tests/ui/macros/issue-57597.rs @@ -2,7 +2,7 @@ // // Make sure that nested matchers work correctly rather than causing an infinite loop or crash. -// edition:2018 +//@ edition:2018 macro_rules! foo1 { ($($($i:ident)?)+) => {}; diff --git a/tests/ui/macros/issue-63102.rs b/tests/ui/macros/issue-63102.rs index 6af5b18680640..acc068cde7e9c 100644 --- a/tests/ui/macros/issue-63102.rs +++ b/tests/ui/macros/issue-63102.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] macro foo { diff --git a/tests/ui/macros/issue-68058.rs b/tests/ui/macros/issue-68058.rs index 24da2620c2eaf..0e6e445fd1082 100644 --- a/tests/ui/macros/issue-68058.rs +++ b/tests/ui/macros/issue-68058.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { ($doc: expr) => { diff --git a/tests/ui/macros/issue-69838-dir/bar.rs b/tests/ui/macros/issue-69838-dir/bar.rs index ec12f8c5cb442..4433005b85f15 100644 --- a/tests/ui/macros/issue-69838-dir/bar.rs +++ b/tests/ui/macros/issue-69838-dir/bar.rs @@ -1,3 +1,3 @@ -// ignore-test -- this is an auxiliary file as part of another test. +//@ ignore-test -- this is an auxiliary file as part of another test. pub fn i_am_in_bar() {} diff --git a/tests/ui/macros/issue-69838-dir/included.rs b/tests/ui/macros/issue-69838-dir/included.rs index 9900b8fd5092c..11fcd3eff725d 100644 --- a/tests/ui/macros/issue-69838-dir/included.rs +++ b/tests/ui/macros/issue-69838-dir/included.rs @@ -1,3 +1,3 @@ -// ignore-test -- this is an auxiliary file as part of another test. +//@ ignore-test -- this is an auxiliary file as part of another test. pub mod bar; diff --git a/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs b/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs index 2a4e97f0ef5f1..908669d337b5b 100644 --- a/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs +++ b/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass include!("issue-69838-dir/included.rs"); diff --git a/tests/ui/macros/issue-70446.rs b/tests/ui/macros/issue-70446.rs index 407094d55ffef..35ffe3dfbfda7 100644 --- a/tests/ui/macros/issue-70446.rs +++ b/tests/ui/macros/issue-70446.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { ($(: $p:path)? $(: $l:lifetime)? ) => { bar! {$(: $p)? $(: $l)? } }; diff --git a/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs b/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs index e76b09d4bb947..8c3eb523ec51a 100644 --- a/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs +++ b/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs @@ -1,5 +1,5 @@ -// aux-build:issue-75982.rs -// check-pass +//@ aux-build:issue-75982.rs +//@ check-pass // Regression test for issue #75982 // Tests that don't ICE when invoking a foreign macro diff --git a/tests/ui/macros/issue-77475.rs b/tests/ui/macros/issue-77475.rs index 7b32a33ea4f17..b161f1eb39d23 100644 --- a/tests/ui/macros/issue-77475.rs +++ b/tests/ui/macros/issue-77475.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test of #77475, this used to be ICE. #![feature(decl_macro)] diff --git a/tests/ui/macros/issue-78333.rs b/tests/ui/macros/issue-78333.rs index c376f2067045b..faf608bd78269 100644 --- a/tests/ui/macros/issue-78333.rs +++ b/tests/ui/macros/issue-78333.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![no_implicit_prelude] diff --git a/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs b/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs index 9d1fae7a234fe..bdb9f87341023 100644 --- a/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs +++ b/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for #78892 diff --git a/tests/ui/macros/issue-81006.rs b/tests/ui/macros/issue-81006.rs index 602eb59742879..0fe0036765ff3 100644 --- a/tests/ui/macros/issue-81006.rs +++ b/tests/ui/macros/issue-81006.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // First format below would cause a panic, second would generate error with incorrect span diff --git a/tests/ui/macros/issue-83340.rs b/tests/ui/macros/issue-83340.rs index d26200295cdcf..edf9c5612fb0c 100644 --- a/tests/ui/macros/issue-83340.rs +++ b/tests/ui/macros/issue-83340.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { println!( diff --git a/tests/ui/macros/issue-83344.rs b/tests/ui/macros/issue-83344.rs index c5f7f72358780..61ae1739095bf 100644 --- a/tests/ui/macros/issue-83344.rs +++ b/tests/ui/macros/issue-83344.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { println!("{}\ diff --git a/tests/ui/macros/issue-84429-matches-edition.rs b/tests/ui/macros/issue-84429-matches-edition.rs index 53f134c265fd7..a1b146e23b6ab 100644 --- a/tests/ui/macros/issue-84429-matches-edition.rs +++ b/tests/ui/macros/issue-84429-matches-edition.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass // // Regression test for issue #84429 // Tests that we can properly invoke `matches!` from a 2021-edition crate. diff --git a/tests/ui/macros/issue-86082-option-env-invalid-char.rs b/tests/ui/macros/issue-86082-option-env-invalid-char.rs index b556b24d6aa6a..5d24ad2dcad9f 100644 --- a/tests/ui/macros/issue-86082-option-env-invalid-char.rs +++ b/tests/ui/macros/issue-86082-option-env-invalid-char.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #86082 // diff --git a/tests/ui/macros/issue-8709.rs b/tests/ui/macros/issue-8709.rs index ea7525d4477de..afde304e821bf 100644 --- a/tests/ui/macros/issue-8709.rs +++ b/tests/ui/macros/issue-8709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! sty { ($t:ty) => (stringify!($t)) diff --git a/tests/ui/macros/issue-87877.rs b/tests/ui/macros/issue-87877.rs index a40e2c5f9705a..7976343564430 100644 --- a/tests/ui/macros/issue-87877.rs +++ b/tests/ui/macros/issue-87877.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! two_items { () => { diff --git a/tests/ui/macros/issue-88206.rs b/tests/ui/macros/issue-88206.rs index 14e2f66068b01..abf58fdcbc815 100644 --- a/tests/ui/macros/issue-88206.rs +++ b/tests/ui/macros/issue-88206.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![warn(unused_imports)] diff --git a/tests/ui/macros/issue-88228.rs b/tests/ui/macros/issue-88228.rs index ec55a262509aa..48b405264fef5 100644 --- a/tests/ui/macros/issue-88228.rs +++ b/tests/ui/macros/issue-88228.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z deduplicate-diagnostics=yes -// edition:2018 +//@ compile-flags: -Z deduplicate-diagnostics=yes +//@ edition:2018 mod hey { //~ HELP consider importing this derive macro //~^ HELP consider importing this macro diff --git a/tests/ui/macros/issue-8851.rs b/tests/ui/macros/issue-8851.rs index faacfe5f8952d..4a398d15997f6 100644 --- a/tests/ui/macros/issue-8851.rs +++ b/tests/ui/macros/issue-8851.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // after fixing #9384 and implementing hygiene for match bindings, // this now fails because the insertion of the 'y' into the match // doesn't cause capture. Making this macro hygienic (as I've done) // could very well make this test case completely pointless.... -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum T { A(isize), diff --git a/tests/ui/macros/issue-92267.rs b/tests/ui/macros/issue-92267.rs index f1daaeb743e83..ff27717bcfa7f 100644 --- a/tests/ui/macros/issue-92267.rs +++ b/tests/ui/macros/issue-92267.rs @@ -1,3 +1,3 @@ -// check-fail +//@ check-fail pub fn main() { println!("🦀%%%", 0) } //~ ERROR argument never used diff --git a/tests/ui/macros/issue-95267.rs b/tests/ui/macros/issue-95267.rs index a2fe402bccf8f..ab003413b5896 100644 --- a/tests/ui/macros/issue-95267.rs +++ b/tests/ui/macros/issue-95267.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // The doc comment here is ignored. This is a bug, but #95267 showed that // existing programs rely on this behaviour, and changing it would require some diff --git a/tests/ui/macros/issue-95533.rs b/tests/ui/macros/issue-95533.rs index 905c14dc5fd21..f2bdc346496aa 100644 --- a/tests/ui/macros/issue-95533.rs +++ b/tests/ui/macros/issue-95533.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![no_implicit_prelude] // the macro should not rely on the prelude being imported diff --git a/tests/ui/macros/issue-98466-allow.rs b/tests/ui/macros/issue-98466-allow.rs index c260148c148d0..2faf39749c46d 100644 --- a/tests/ui/macros/issue-98466-allow.rs +++ b/tests/ui/macros/issue-98466-allow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(named_arguments_used_positionally)] fn main() { diff --git a/tests/ui/macros/issue-98466.fixed b/tests/ui/macros/issue-98466.fixed index e46e22f001fe3..37157706212f9 100644 --- a/tests/ui/macros/issue-98466.fixed +++ b/tests/ui/macros/issue-98466.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let mut _x: usize; diff --git a/tests/ui/macros/issue-98466.rs b/tests/ui/macros/issue-98466.rs index 2c3b099afdeaf..4f45605d6afbb 100644 --- a/tests/ui/macros/issue-98466.rs +++ b/tests/ui/macros/issue-98466.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let mut _x: usize; diff --git a/tests/ui/macros/issue-98790.rs b/tests/ui/macros/issue-98790.rs index 8fe6fc41d10b7..b489efe9ce939 100644 --- a/tests/ui/macros/issue-98790.rs +++ b/tests/ui/macros/issue-98790.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! stringify_item { ($item:item) => { diff --git a/tests/ui/macros/issue-99261.rs b/tests/ui/macros/issue-99261.rs index 40d26d08cba11..7ea9974564afc 100644 --- a/tests/ui/macros/issue-99261.rs +++ b/tests/ui/macros/issue-99261.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(named_arguments_used_positionally)] diff --git a/tests/ui/macros/issue-99265.fixed b/tests/ui/macros/issue-99265.fixed index f3be9c6285d6c..06cd07362c930 100644 --- a/tests/ui/macros/issue-99265.fixed +++ b/tests/ui/macros/issue-99265.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("{b} {a}", a=1, b=2); diff --git a/tests/ui/macros/issue-99265.rs b/tests/ui/macros/issue-99265.rs index e7cf608765b0d..619d265420f93 100644 --- a/tests/ui/macros/issue-99265.rs +++ b/tests/ui/macros/issue-99265.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("{b} {}", a=1, b=2); diff --git a/tests/ui/macros/issue-99907.fixed b/tests/ui/macros/issue-99907.fixed index 9e0e1b80ee59f..7da49b2a6063e 100644 --- a/tests/ui/macros/issue-99907.fixed +++ b/tests/ui/macros/issue-99907.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("Hello {f:.1}!", f = 0.02f32); diff --git a/tests/ui/macros/issue-99907.rs b/tests/ui/macros/issue-99907.rs index eebcfc2efecc9..716bb99979c7e 100644 --- a/tests/ui/macros/issue-99907.rs +++ b/tests/ui/macros/issue-99907.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("Hello {:.1}!", f = 0.02f32); diff --git a/tests/ui/macros/lint-trailing-macro-call.rs b/tests/ui/macros/lint-trailing-macro-call.rs index f8e847563915e..66dce057d0f5c 100644 --- a/tests/ui/macros/lint-trailing-macro-call.rs +++ b/tests/ui/macros/lint-trailing-macro-call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Ensures that we properly lint // a removed 'expression' resulting from a macro 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 2d78ae6f90833..85a65300eaf6d 100644 --- a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs +++ b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(trace_macros, log_syntax)] diff --git a/tests/ui/macros/macro-2.rs b/tests/ui/macros/macro-2.rs index a315981b6a69f..f28a567cd4ebe 100644 --- a/tests/ui/macros/macro-2.rs +++ b/tests/ui/macros/macro-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { macro_rules! mylambda_tt { diff --git a/tests/ui/macros/macro-as-fn-body.rs b/tests/ui/macros/macro-as-fn-body.rs index 6781c9a9ed4e0..e0542edc2a521 100644 --- a/tests/ui/macros/macro-as-fn-body.rs +++ b/tests/ui/macros/macro-as-fn-body.rs @@ -1,5 +1,5 @@ // -// run-pass +//@ run-pass // // Description - ensure Interpolated blocks can act as valid function bodies // Covered cases: free functions, struct methods, and default trait functions diff --git a/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs b/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs index 66597c0acf628..c7a22c8b518b4 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] @@ -6,7 +6,7 @@ // then that `?` is not interpreted as a separator. In other words, `$(pat)?+` matches `pat +` // or `+` but does not match `pat` or `pat ? pat`. -// edition:2015 +//@ edition:2015 macro_rules! foo { // Check for `?`. diff --git a/tests/ui/macros/macro-at-most-once-rep-2015.rs b/tests/ui/macros/macro-at-most-once-rep-2015.rs index f68100d4557d6..8f2531a25aeaf 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2015.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2015.rs @@ -1,6 +1,6 @@ // Tests that `?` is a Kleene op and not a macro separator in the 2015 edition. -// edition:2015 +//@ edition:2015 macro_rules! foo { ($(a)?) => {}; diff --git a/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs b/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs index b37f3853016a6..0ca7e984c8812 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] @@ -6,7 +6,7 @@ // then that `?` is not interpreted as a separator. In other words, `$(pat)?+` matches `pat +` // or `+` but does not match `pat` or `pat ? pat`. -// edition:2018 +//@ edition:2018 macro_rules! foo { // Check for `?`. diff --git a/tests/ui/macros/macro-at-most-once-rep-2018.rs b/tests/ui/macros/macro-at-most-once-rep-2018.rs index 886a25bbcbcb2..7f43055ded6f4 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2018.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2018.rs @@ -1,6 +1,6 @@ // Tests that `?` is a Kleene op and not a macro separator in the 2018 edition. -// edition:2018 +//@ edition:2018 macro_rules! foo { ($(a)?) => {}; diff --git a/tests/ui/macros/macro-attribute-expansion.rs b/tests/ui/macros/macro-attribute-expansion.rs index f01e5c44a67a0..be682b38865d3 100644 --- a/tests/ui/macros/macro-attribute-expansion.rs +++ b/tests/ui/macros/macro-attribute-expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! descriptions { ($name:ident is $desc:expr) => { // Check that we will correctly expand attributes diff --git a/tests/ui/macros/macro-attributes.rs b/tests/ui/macros/macro-attributes.rs index d382e8b719713..57ba0d3bf56bb 100644 --- a/tests/ui/macros/macro-attributes.rs +++ b/tests/ui/macros/macro-attributes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! compiles_fine { (#[$at:meta]) => { diff --git a/tests/ui/macros/macro-block-nonterminal.rs b/tests/ui/macros/macro-block-nonterminal.rs index a6c9dd6e187e5..fef4116e3adda 100644 --- a/tests/ui/macros/macro-block-nonterminal.rs +++ b/tests/ui/macros/macro-block-nonterminal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! do_block{ ($val:block) => {$val} diff --git a/tests/ui/macros/macro-comma-behavior-rpass.rs b/tests/ui/macros/macro-comma-behavior-rpass.rs index 8406b4e78f6be..14ac1dd42124d 100644 --- a/tests/ui/macros/macro-comma-behavior-rpass.rs +++ b/tests/ui/macros/macro-comma-behavior-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_imports)] // Ideally, any macro call with a trailing comma should behave // identically to a call without the comma. @@ -11,8 +11,8 @@ // // There is a companion failing test. -// compile-flags: --test -C debug_assertions=yes -// revisions: std core +//@ compile-flags: --test -C debug_assertions=yes +//@ revisions: std core #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-comma-behavior.rs b/tests/ui/macros/macro-comma-behavior.rs index 27d50ff3d57ea..f00d4d3e85842 100644 --- a/tests/ui/macros/macro-comma-behavior.rs +++ b/tests/ui/macros/macro-comma-behavior.rs @@ -1,7 +1,7 @@ // Companion test to the similarly-named file in run-pass. -// compile-flags: -C debug_assertions=yes -// revisions: std core +//@ compile-flags: -C debug_assertions=yes +//@ revisions: std core #![feature(lang_items)] #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-comma-support-rpass.rs b/tests/ui/macros/macro-comma-support-rpass.rs index 2f08ad3c343ab..724bd5af2dcff 100644 --- a/tests/ui/macros/macro-comma-support-rpass.rs +++ b/tests/ui/macros/macro-comma-support-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is meant to be a comprehensive test of invocations with/without // trailing commas (or other, similar optionally-trailing separators). // Every macro is accounted for, even those not tested in this file. @@ -9,8 +9,8 @@ // detail. -// compile-flags: --test -C debug_assertions=yes -// revisions: std core +//@ compile-flags: --test -C debug_assertions=yes +//@ revisions: std core #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-crate-def-only.rs b/tests/ui/macros/macro-crate-def-only.rs index 514b33e389781..f15394df35765 100644 --- a/tests/ui/macros/macro-crate-def-only.rs +++ b/tests/ui/macros/macro-crate-def-only.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_def_only.rs +//@ run-pass +//@ aux-build:macro_crate_def_only.rs #[macro_use] #[no_link] diff --git a/tests/ui/macros/macro-crate-nonterminal-non-root.rs b/tests/ui/macros/macro-crate-nonterminal-non-root.rs index 67899556f8adf..79d57bb9dac92 100644 --- a/tests/ui/macros/macro-crate-nonterminal-non-root.rs +++ b/tests/ui/macros/macro-crate-nonterminal-non-root.rs @@ -1,4 +1,4 @@ -// aux-build:macro_crate_nonterminal.rs +//@ aux-build:macro_crate_nonterminal.rs mod foo { #[macro_use] diff --git a/tests/ui/macros/macro-crate-nonterminal-renamed.rs b/tests/ui/macros/macro-crate-nonterminal-renamed.rs index 87bd397f06523..53e0b771f4a91 100644 --- a/tests/ui/macros/macro-crate-nonterminal-renamed.rs +++ b/tests/ui/macros/macro-crate-nonterminal-renamed.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_nonterminal.rs +//@ run-pass +//@ aux-build:macro_crate_nonterminal.rs #[macro_use] extern crate macro_crate_nonterminal as new_name; diff --git a/tests/ui/macros/macro-crate-nonterminal.rs b/tests/ui/macros/macro-crate-nonterminal.rs index 4b1056fc72510..f4930e3a55ce3 100644 --- a/tests/ui/macros/macro-crate-nonterminal.rs +++ b/tests/ui/macros/macro-crate-nonterminal.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_nonterminal.rs +//@ run-pass +//@ aux-build:macro_crate_nonterminal.rs #[macro_use] extern crate macro_crate_nonterminal; diff --git a/tests/ui/macros/macro-crate-use.rs b/tests/ui/macros/macro-crate-use.rs index 5c37cac96860e..f0a5b957b77f2 100644 --- a/tests/ui/macros/macro-crate-use.rs +++ b/tests/ui/macros/macro-crate-use.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn increment(x: usize) -> usize { x + 1 diff --git a/tests/ui/macros/macro-deep_expansion.rs b/tests/ui/macros/macro-deep_expansion.rs index e13d8e1fc849e..1ac466ba1ea44 100644 --- a/tests/ui/macros/macro-deep_expansion.rs +++ b/tests/ui/macros/macro-deep_expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo2 { () => { diff --git a/tests/ui/macros/macro-def-site-super.rs b/tests/ui/macros/macro-def-site-super.rs index 716a8ced5bb74..4921cdd5371d2 100644 --- a/tests/ui/macros/macro-def-site-super.rs +++ b/tests/ui/macros/macro-def-site-super.rs @@ -1,7 +1,7 @@ // `super` in a `macro` refers to the parent module of the macro itself and not its reexport. -// check-pass -// aux-build:macro-def-site-super.rs +//@ check-pass +//@ aux-build:macro-def-site-super.rs extern crate macro_def_site_super; diff --git a/tests/ui/macros/macro-delimiter-significance.rs b/tests/ui/macros/macro-delimiter-significance.rs index 89f222b0530bb..8b532e19196b3 100644 --- a/tests/ui/macros/macro-delimiter-significance.rs +++ b/tests/ui/macros/macro-delimiter-significance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { vec![1_usize, 2, 3].len(); } diff --git a/tests/ui/macros/macro-deprecation.rs b/tests/ui/macros/macro-deprecation.rs index a7f327cf53b1e..27560849c6813 100644 --- a/tests/ui/macros/macro-deprecation.rs +++ b/tests/ui/macros/macro-deprecation.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:deprecated-macros.rs +//@ check-pass +//@ aux-build:deprecated-macros.rs #[macro_use] extern crate deprecated_macros; diff --git a/tests/ui/macros/macro-doc-comments.rs b/tests/ui/macros/macro-doc-comments.rs index fcc64cc0670de..47740e26fb6fa 100644 --- a/tests/ui/macros/macro-doc-comments.rs +++ b/tests/ui/macros/macro-doc-comments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] macro_rules! doc { diff --git a/tests/ui/macros/macro-doc-escapes.rs b/tests/ui/macros/macro-doc-escapes.rs index ff5a5793b2094..81c8d3383b579 100644 --- a/tests/ui/macros/macro-doc-escapes.rs +++ b/tests/ui/macros/macro-doc-escapes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When expanding a macro, documentation attributes (including documentation comments) must be // passed "as is" without being parsed. Otherwise, some text will be incorrectly interpreted as // escape sequences, leading to an ICE. diff --git a/tests/ui/macros/macro-doc-raw-str-hashes.rs b/tests/ui/macros/macro-doc-raw-str-hashes.rs index a003bff3c04db..fd6f28a0c76d7 100644 --- a/tests/ui/macros/macro-doc-raw-str-hashes.rs +++ b/tests/ui/macros/macro-doc-raw-str-hashes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The number of `#`s used to wrap the documentation comment should differ regarding the content. // // Related issue: #27489 diff --git a/tests/ui/macros/macro-expanded-include/foo/mod.rs b/tests/ui/macros/macro-expanded-include/foo/mod.rs index 2e4c4c7f8a99c..926d84c93e58f 100644 --- a/tests/ui/macros/macro-expanded-include/foo/mod.rs +++ b/tests/ui/macros/macro-expanded-include/foo/mod.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) macro_rules! m { () => { include!("file.txt"); } diff --git a/tests/ui/macros/macro-expanded-include/test.rs b/tests/ui/macros/macro-expanded-include/test.rs index 20da58a7e8ede..69fcb090959cf 100644 --- a/tests/ui/macros/macro-expanded-include/test.rs +++ b/tests/ui/macros/macro-expanded-include/test.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// build-pass (FIXME(62277): could be check-pass?) +//@ needs-asm-support +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] #[macro_use] diff --git a/tests/ui/macros/macro-export-inner-module.rs b/tests/ui/macros/macro-export-inner-module.rs index 1f23e90b65cd5..6eccc90dc67ec 100644 --- a/tests/ui/macros/macro-export-inner-module.rs +++ b/tests/ui/macros/macro-export-inner-module.rs @@ -1,5 +1,5 @@ -// run-pass -//aux-build:macro_export_inner_module.rs +//@ run-pass +//@aux-build:macro_export_inner_module.rs #[macro_use] #[no_link] extern crate macro_export_inner_module; diff --git a/tests/ui/macros/macro-first-set.rs b/tests/ui/macros/macro-first-set.rs index eeb1ddd84ae58..0f8f26b88c288 100644 --- a/tests/ui/macros/macro-first-set.rs +++ b/tests/ui/macros/macro-first-set.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] //{{{ issue 40569 ============================================================== diff --git a/tests/ui/macros/macro-follow-rpass.rs b/tests/ui/macros/macro-follow-rpass.rs index ca93655631f7e..8350887922531 100644 --- a/tests/ui/macros/macro-follow-rpass.rs +++ b/tests/ui/macros/macro-follow-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] // Check the macro follow sets (see corresponding cfail test). diff --git a/tests/ui/macros/macro-followed-by-seq.rs b/tests/ui/macros/macro-followed-by-seq.rs index 71d59d8d31bb9..f4756d42088ad 100644 --- a/tests/ui/macros/macro-followed-by-seq.rs +++ b/tests/ui/macros/macro-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] // Regression test for issue #25436: check that things which can be // followed by any token also permit X* to come afterwards. diff --git a/tests/ui/macros/macro-in-expression-context.fixed b/tests/ui/macros/macro-in-expression-context.fixed index f22caf2793fd5..f4d04ca37bf5b 100644 --- a/tests/ui/macros/macro-in-expression-context.fixed +++ b/tests/ui/macros/macro-in-expression-context.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-in-expression-context.rs b/tests/ui/macros/macro-in-expression-context.rs index 1a056e582ff47..8921a05637725 100644 --- a/tests/ui/macros/macro-in-expression-context.rs +++ b/tests/ui/macros/macro-in-expression-context.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-in-fn.rs b/tests/ui/macros/macro-in-fn.rs index d354fe4a7dbfa..2ffa6b2e4572e 100644 --- a/tests/ui/macros/macro-in-fn.rs +++ b/tests/ui/macros/macro-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] pub fn moo() { diff --git a/tests/ui/macros/macro-include-items.rs b/tests/ui/macros/macro-include-items.rs index ad6f04009b6c7..9423d2c494930 100644 --- a/tests/ui/macros/macro-include-items.rs +++ b/tests/ui/macros/macro-include-items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs index 8f9dcb94794b6..08fe2c928302e 100644 --- a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs +++ b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 macro_rules! four { () => (4) diff --git a/tests/ui/macros/macro-lifetime-used-with-bound.rs b/tests/ui/macros/macro-lifetime-used-with-bound.rs index ea3f74c9adab0..438301ecbb99f 100644 --- a/tests/ui/macros/macro-lifetime-used-with-bound.rs +++ b/tests/ui/macros/macro-lifetime-used-with-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] macro_rules! foo { ($l:lifetime, $l2:lifetime) => { diff --git a/tests/ui/macros/macro-lifetime-used-with-labels.rs b/tests/ui/macros/macro-lifetime-used-with-labels.rs index 59017da3b696e..3b51b8050b348 100644 --- a/tests/ui/macros/macro-lifetime-used-with-labels.rs +++ b/tests/ui/macros/macro-lifetime-used-with-labels.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_labels)] #![allow(unreachable_code)] diff --git a/tests/ui/macros/macro-lifetime-used-with-static.rs b/tests/ui/macros/macro-lifetime-used-with-static.rs index 8552c4b81633d..a1faa512514e0 100644 --- a/tests/ui/macros/macro-lifetime-used-with-static.rs +++ b/tests/ui/macros/macro-lifetime-used-with-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($l:lifetime) => { fn f(arg: &$l str) -> &$l str { diff --git a/tests/ui/macros/macro-lifetime.rs b/tests/ui/macros/macro-lifetime.rs index 5931fe0090770..9690f40b2c3a4 100644 --- a/tests/ui/macros/macro-lifetime.rs +++ b/tests/ui/macros/macro-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($l:lifetime) => { fn f<$l>(arg: &$l str) -> &$l str { diff --git a/tests/ui/macros/macro-literal.rs b/tests/ui/macros/macro-literal.rs index 3c2e71f9c43f3..a3bdc6a2bf7d0 100644 --- a/tests/ui/macros/macro-literal.rs +++ b/tests/ui/macros/macro-literal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! mtester { ($l:literal) => { diff --git a/tests/ui/macros/macro-meta-items-modern.rs b/tests/ui/macros/macro-meta-items-modern.rs index bc6938d4a6c9a..c519403c9c14d 100644 --- a/tests/ui/macros/macro-meta-items-modern.rs +++ b/tests/ui/macros/macro-meta-items-modern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! check { ($meta:meta) => () } diff --git a/tests/ui/macros/macro-meta-items.rs b/tests/ui/macros/macro-meta-items.rs index 4cbc252aebfe0..10c57fba24483 100644 --- a/tests/ui/macros/macro-meta-items.rs +++ b/tests/ui/macros/macro-meta-items.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo macro_rules! compiles_fine { ($at:meta) => { diff --git a/tests/ui/macros/macro-method-issue-4621.rs b/tests/ui/macros/macro-method-issue-4621.rs index 342fad5f62e88..a35eeb257dfbc 100644 --- a/tests/ui/macros/macro-method-issue-4621.rs +++ b/tests/ui/macros/macro-method-issue-4621.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; diff --git a/tests/ui/macros/macro-missing-fragment-deduplication.rs b/tests/ui/macros/macro-missing-fragment-deduplication.rs index c1e6ba7464772..b77c51e055bff 100644 --- a/tests/ui/macros/macro-missing-fragment-deduplication.rs +++ b/tests/ui/macros/macro-missing-fragment-deduplication.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes macro_rules! m { ($name) => {} diff --git a/tests/ui/macros/macro-multiple-items.rs b/tests/ui/macros/macro-multiple-items.rs index 3b6dfd9bc5e09..c746d1bc51881 100644 --- a/tests/ui/macros/macro-multiple-items.rs +++ b/tests/ui/macros/macro-multiple-items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! make_foo { () => ( struct Foo; diff --git a/tests/ui/macros/macro-named-default.rs b/tests/ui/macros/macro-named-default.rs index 9b6cd191640ae..bca0e005083d2 100644 --- a/tests/ui/macros/macro-named-default.rs +++ b/tests/ui/macros/macro-named-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! default { ($($x:tt)*) => { $($x)* } } diff --git a/tests/ui/macros/macro-nested_definition_issue-31946.rs b/tests/ui/macros/macro-nested_definition_issue-31946.rs index a83c5b2e44fe3..27e803ed61b1f 100644 --- a/tests/ui/macros/macro-nested_definition_issue-31946.rs +++ b/tests/ui/macros/macro-nested_definition_issue-31946.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", { macro_rules! foo { diff --git a/tests/ui/macros/macro-nested_expr.rs b/tests/ui/macros/macro-nested_expr.rs index f1433cbf4f910..291ae58c243a5 100644 --- a/tests/ui/macros/macro-nested_expr.rs +++ b/tests/ui/macros/macro-nested_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #42164 #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-nested_stmt_macros.rs b/tests/ui/macros/macro-nested_stmt_macros.rs index 5d4758a0c7bed..054aa3cb29306 100644 --- a/tests/ui/macros/macro-nested_stmt_macros.rs +++ b/tests/ui/macros/macro-nested_stmt_macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { () => { struct Bar; diff --git a/tests/ui/macros/macro-nt-list.rs b/tests/ui/macros/macro-nt-list.rs index 36aa74f082530..7a6bc6a8d73df 100644 --- a/tests/ui/macros/macro-nt-list.rs +++ b/tests/ui/macros/macro-nt-list.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 macro_rules! list { ( ($($id:ident),*) ) => (()); diff --git a/tests/ui/macros/macro-of-higher-order.rs b/tests/ui/macros/macro-of-higher-order.rs index ec551d6cdbcd6..4b96b5b776534 100644 --- a/tests/ui/macros/macro-of-higher-order.rs +++ b/tests/ui/macros/macro-of-higher-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! higher_order { (subst $lhs:tt => $rhs:tt) => ({ diff --git a/tests/ui/macros/macro-or-patterns-back-compat.fixed b/tests/ui/macros/macro-or-patterns-back-compat.fixed index b0d56e9bb1ef0..c16190c399aef 100644 --- a/tests/ui/macros/macro-or-patterns-back-compat.fixed +++ b/tests/ui/macros/macro-or-patterns-back-compat.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:or-pattern.rs +//@ run-rustfix +//@ aux-build:or-pattern.rs #![deny(rust_2021_incompatible_or_patterns)] #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-or-patterns-back-compat.rs b/tests/ui/macros/macro-or-patterns-back-compat.rs index 9e24b5106b8bf..ef0ffb99c1a62 100644 --- a/tests/ui/macros/macro-or-patterns-back-compat.rs +++ b/tests/ui/macros/macro-or-patterns-back-compat.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:or-pattern.rs +//@ run-rustfix +//@ aux-build:or-pattern.rs #![deny(rust_2021_incompatible_or_patterns)] #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-pat-follow-2018.rs b/tests/ui/macros/macro-pat-follow-2018.rs index ce2911de986dc..6dcb841fec15f 100644 --- a/tests/ui/macros/macro-pat-follow-2018.rs +++ b/tests/ui/macros/macro-pat-follow-2018.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 macro_rules! pat_bar { ($p:pat | $p2:pat) => {{ diff --git a/tests/ui/macros/macro-pat-follow.rs b/tests/ui/macros/macro-pat-follow.rs index 8e02789fdd8da..830cc7c0860d1 100644 --- a/tests/ui/macros/macro-pat-follow.rs +++ b/tests/ui/macros/macro-pat-follow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! pat_in { ($p:pat in $e:expr) => {{ let mut iter = $e.into_iter(); diff --git a/tests/ui/macros/macro-pat-neg-lit.rs b/tests/ui/macros/macro-pat-neg-lit.rs index 79c68fd254137..072d079fecbab 100644 --- a/tests/ui/macros/macro-pat-neg-lit.rs +++ b/tests/ui/macros/macro-pat-neg-lit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! enum_number { ($name:ident { $($variant:ident = $value:expr, )* }) => { enum $name { diff --git a/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs b/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs index f5a97eca21bdb..154d6e339a7f9 100644 --- a/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs +++ b/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments diff --git a/tests/ui/macros/macro-pat-pattern-followed-by-or.rs b/tests/ui/macros/macro-pat-pattern-followed-by-or.rs index 54bd13d7ebce8..d584e919a2a00 100644 --- a/tests/ui/macros/macro-pat-pattern-followed-by-or.rs +++ b/tests/ui/macros/macro-pat-pattern-followed-by-or.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } // should be ok macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } // should be ok diff --git a/tests/ui/macros/macro-pat.rs b/tests/ui/macros/macro-pat.rs index baf816e53ea62..5c826f84be64c 100644 --- a/tests/ui/macros/macro-pat.rs +++ b/tests/ui/macros/macro-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! mypat { () => ( diff --git a/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs b/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs index b4be03aaddd58..c7dc5d53a9862 100644 --- a/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs +++ b/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments diff --git a/tests/ui/macros/macro-path-prelude-pass.rs b/tests/ui/macros/macro-path-prelude-pass.rs index 7cf346286eadf..3499a80e956d8 100644 --- a/tests/ui/macros/macro-path-prelude-pass.rs +++ b/tests/ui/macros/macro-path-prelude-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod m { fn check() { diff --git a/tests/ui/macros/macro-path-prelude-shadowing.rs b/tests/ui/macros/macro-path-prelude-shadowing.rs index d7181200085c4..f18d4db3ad4b1 100644 --- a/tests/ui/macros/macro-path-prelude-shadowing.rs +++ b/tests/ui/macros/macro-path-prelude-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:macro-in-other-crate.rs +//@ aux-build:macro-in-other-crate.rs #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-path.rs b/tests/ui/macros/macro-path.rs index 6c011c897da50..f8c45439d11e5 100644 --- a/tests/ui/macros/macro-path.rs +++ b/tests/ui/macros/macro-path.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/macros/macro-pub-matcher.rs b/tests/ui/macros/macro-pub-matcher.rs index 7b02a70be0942..538f55cc98d2c 100644 --- a/tests/ui/macros/macro-pub-matcher.rs +++ b/tests/ui/macros/macro-pub-matcher.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_imports, unused_macro_rules)] /** diff --git a/tests/ui/macros/macro-quote-test.rs b/tests/ui/macros/macro-quote-test.rs index 2ba61acadcb85..dd7b10f6322ac 100644 --- a/tests/ui/macros/macro-quote-test.rs +++ b/tests/ui/macros/macro-quote-test.rs @@ -1,7 +1,7 @@ // Test that a macro can emit delimiters with nothing inside - `()`, `{}` -// run-pass -// aux-build:hello_macro.rs +//@ run-pass +//@ aux-build:hello_macro.rs extern crate hello_macro; diff --git a/tests/ui/macros/macro-reexport-removed.rs b/tests/ui/macros/macro-reexport-removed.rs index 874c94d08e06a..4a054686d7767 100644 --- a/tests/ui/macros/macro-reexport-removed.rs +++ b/tests/ui/macros/macro-reexport-removed.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #![feature(macro_reexport)] //~ ERROR feature has been removed diff --git a/tests/ui/macros/macro-seq-followed-by-seq.rs b/tests/ui/macros/macro-seq-followed-by-seq.rs index 8f0f4fd4a0d44..3661744284eef 100644 --- a/tests/ui/macros/macro-seq-followed-by-seq.rs +++ b/tests/ui/macros/macro-seq-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test of allowing two sequences repetitions in a row, // functionality added as byproduct of RFC amendment #1384 // https://github.com/rust-lang/rfcs/pull/1384 diff --git a/tests/ui/macros/macro-shadowing-relaxed.rs b/tests/ui/macros/macro-shadowing-relaxed.rs index b2a639218b994..bbb1054421dc1 100644 --- a/tests/ui/macros/macro-shadowing-relaxed.rs +++ b/tests/ui/macros/macro-shadowing-relaxed.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:macro-in-other-crate.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:macro-in-other-crate.rs #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-shadowing.rs b/tests/ui/macros/macro-shadowing.rs index 7f956dd7d10f8..710e83dfb3b99 100644 --- a/tests/ui/macros/macro-shadowing.rs +++ b/tests/ui/macros/macro-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-stability-rpass.rs b/tests/ui/macros/macro-stability-rpass.rs index 2d02b95288df4..25a69a5fc4cfa 100644 --- a/tests/ui/macros/macro-stability-rpass.rs +++ b/tests/ui/macros/macro-stability-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:unstable-macros.rs +//@ run-pass +//@ aux-build:unstable-macros.rs #![unstable(feature = "one_two_three_testing", issue = "none")] #![feature(staged_api, unstable_macros, local_unstable)] diff --git a/tests/ui/macros/macro-stability.rs b/tests/ui/macros/macro-stability.rs index ed7618a672be8..a909b14f47b1b 100644 --- a/tests/ui/macros/macro-stability.rs +++ b/tests/ui/macros/macro-stability.rs @@ -1,4 +1,4 @@ -// aux-build:unstable-macros.rs +//@ aux-build:unstable-macros.rs #![feature(decl_macro)] #![feature(staged_api)] diff --git a/tests/ui/macros/macro-stmt-matchers.rs b/tests/ui/macros/macro-stmt-matchers.rs index a643e50e99557..2fa20972f2a94 100644 --- a/tests/ui/macros/macro-stmt-matchers.rs +++ b/tests/ui/macros/macro-stmt-matchers.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/tests/ui/macros/macro-stmt.rs b/tests/ui/macros/macro-stmt.rs index c9a0b879a0ffc..fcbd50687a78c 100644 --- a/tests/ui/macros/macro-stmt.rs +++ b/tests/ui/macros/macro-stmt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! myfn { ( $f:ident, ( $( $x:ident ),* ), $body:block ) => ( fn $f( $( $x : isize),* ) -> isize $body diff --git a/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs b/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs index 528d0b28bf6d7..8b634b4aa5401 100644 --- a/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs +++ b/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-tt-followed-by-seq.rs b/tests/ui/macros/macro-tt-followed-by-seq.rs index 67238df85245a..b4ab486b23691 100644 --- a/tests/ui/macros/macro-tt-followed-by-seq.rs +++ b/tests/ui/macros/macro-tt-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #25436: permit token-trees to be followed // by sequences, enabling more general parsing. diff --git a/tests/ui/macros/macro-tt-matchers.rs b/tests/ui/macros/macro-tt-matchers.rs index 2ee41b0880e18..004be966cb492 100644 --- a/tests/ui/macros/macro-tt-matchers.rs +++ b/tests/ui/macros/macro-tt-matchers.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] macro_rules! foo { diff --git a/tests/ui/macros/macro-use-all-and-none.rs b/tests/ui/macros/macro-use-all-and-none.rs index c8bd44008b081..f1acff4840382 100644 --- a/tests/ui/macros/macro-use-all-and-none.rs +++ b/tests/ui/macros/macro-use-all-and-none.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros-rpass.rs +//@ run-pass +//@ aux-build:two_macros-rpass.rs #![warn(unused_attributes)] diff --git a/tests/ui/macros/macro-use-all.rs b/tests/ui/macros/macro-use-all.rs index 48c7b77e57936..a7fd3dfa5ce60 100644 --- a/tests/ui/macros/macro-use-all.rs +++ b/tests/ui/macros/macro-use-all.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-both.rs b/tests/ui/macros/macro-use-both.rs index ed5d1312f966f..e49f346c8e3e8 100644 --- a/tests/ui/macros/macro-use-both.rs +++ b/tests/ui/macros/macro-use-both.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_one, macro_two)] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-one.rs b/tests/ui/macros/macro-use-one.rs index f74795e68dc1c..2b048651ccccf 100644 --- a/tests/ui/macros/macro-use-one.rs +++ b/tests/ui/macros/macro-use-one.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_two)] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-scope.rs b/tests/ui/macros/macro-use-scope.rs index 5e58fc9c1ede8..d078caa7fd1f5 100644 --- a/tests/ui/macros/macro-use-scope.rs +++ b/tests/ui/macros/macro-use-scope.rs @@ -1,6 +1,6 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] fn f() { diff --git a/tests/ui/macros/macro-use-undef.rs b/tests/ui/macros/macro-use-undef.rs index ae3054e7b8290..8e903927565c4 100644 --- a/tests/ui/macros/macro-use-undef.rs +++ b/tests/ui/macros/macro-use-undef.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use(macro_two, no_way)] //~ ERROR imported macro not found extern crate two_macros; diff --git a/tests/ui/macros/macro-use-wrong-name.rs b/tests/ui/macros/macro-use-wrong-name.rs index d142b5800034b..b3c11e77d3b1d 100644 --- a/tests/ui/macros/macro-use-wrong-name.rs +++ b/tests/ui/macros/macro-use-wrong-name.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use(macro_one)] extern crate two_macros; diff --git a/tests/ui/macros/macro-with-attrs1.rs b/tests/ui/macros/macro-with-attrs1.rs index 4e943b224cd8b..cfd5691fe94bd 100644 --- a/tests/ui/macros/macro-with-attrs1.rs +++ b/tests/ui/macros/macro-with-attrs1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo +//@ run-pass +//@ compile-flags: --cfg foo #[cfg(foo)] diff --git a/tests/ui/macros/macro-with-attrs2.rs b/tests/ui/macros/macro-with-attrs2.rs index 78c4081020706..3ff2602520638 100644 --- a/tests/ui/macros/macro-with-attrs2.rs +++ b/tests/ui/macros/macro-with-attrs2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(foo)] macro_rules! foo { () => (1) } diff --git a/tests/ui/macros/macro-with-braces-in-expr-position.rs b/tests/ui/macros/macro-with-braces-in-expr-position.rs index f7d87434dedd0..febfa7241f214 100644 --- a/tests/ui/macros/macro-with-braces-in-expr-position.rs +++ b/tests/ui/macros/macro-with-braces-in-expr-position.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/macros/macro_with_super_2.rs b/tests/ui/macros/macro_with_super_2.rs index 2901a74f612b4..5353405ca578e 100644 --- a/tests/ui/macros/macro_with_super_2.rs +++ b/tests/ui/macros/macro_with_super_2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:macro_with_super_1.rs +//@ run-pass +//@ aux-build:macro_with_super_1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[macro_use] extern crate macro_with_super_1; diff --git a/tests/ui/macros/macros-in-extern.rs b/tests/ui/macros/macros-in-extern.rs index 568ae3a8539a9..363ff5df64a8d 100644 --- a/tests/ui/macros/macros-in-extern.rs +++ b/tests/ui/macros/macros-in-extern.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32 +//@ run-pass +//@ ignore-wasm32 #![feature(decl_macro)] diff --git a/tests/ui/macros/macros-nonfatal-errors.rs b/tests/ui/macros/macros-nonfatal-errors.rs index ab14c35893d0a..20e6d70500358 100644 --- a/tests/ui/macros/macros-nonfatal-errors.rs +++ b/tests/ui/macros/macros-nonfatal-errors.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG (" // test that errors in a (selection) of macros don't kill compilation // immediately, so that we get more errors listed at a time. diff --git a/tests/ui/macros/meta-variable-misuse.rs b/tests/ui/macros/meta-variable-misuse.rs index 99a2f940176bd..da733e7b74cba 100644 --- a/tests/ui/macros/meta-variable-misuse.rs +++ b/tests/ui/macros/meta-variable-misuse.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(meta_variable_misuse)] macro_rules! foo { diff --git a/tests/ui/macros/missing-bang-in-decl.fixed b/tests/ui/macros/missing-bang-in-decl.fixed index b1aa3298bfa56..b7e4924445090 100644 --- a/tests/ui/macros/missing-bang-in-decl.fixed +++ b/tests/ui/macros/missing-bang-in-decl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/macros/missing-bang-in-decl.rs b/tests/ui/macros/missing-bang-in-decl.rs index 8393f15fc52f4..452363997e73e 100644 --- a/tests/ui/macros/missing-bang-in-decl.rs +++ b/tests/ui/macros/missing-bang-in-decl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/macros/must-use-in-macro-55516.rs b/tests/ui/macros/must-use-in-macro-55516.rs index e7c3462867b59..21f417d0e633b 100644 --- a/tests/ui/macros/must-use-in-macro-55516.rs +++ b/tests/ui/macros/must-use-in-macro-55516.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Wunused +//@ check-pass +//@ compile-flags: -Wunused // make sure write!() can't hide its unused Result diff --git a/tests/ui/macros/nested-use-as.rs b/tests/ui/macros/nested-use-as.rs index 21aa81e80926e..b4ce5328e62c1 100644 --- a/tests/ui/macros/nested-use-as.rs +++ b/tests/ui/macros/nested-use-as.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // issue: https://github.com/rust-lang/rust/issues/97534 macro_rules! m { diff --git a/tests/ui/macros/no-std-macros.rs b/tests/ui/macros/no-std-macros.rs index ada643c7ac041..be0f5921598a7 100644 --- a/tests/ui/macros/no-std-macros.rs +++ b/tests/ui/macros/no-std-macros.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass // issue #55482 #![no_std] diff --git a/tests/ui/macros/none-delim-lookahead.rs b/tests/ui/macros/none-delim-lookahead.rs index bf4fddea14ba2..b604339be9b37 100644 --- a/tests/ui/macros/none-delim-lookahead.rs +++ b/tests/ui/macros/none-delim-lookahead.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! make_struct { ($name:ident) => { diff --git a/tests/ui/macros/not-utf8.rs b/tests/ui/macros/not-utf8.rs index 1cb1fdcb8c96d..3c433a4e27c97 100644 --- a/tests/ui/macros/not-utf8.rs +++ b/tests/ui/macros/not-utf8.rs @@ -1,4 +1,4 @@ -// error-pattern: did not contain valid UTF-8 +//@ error-pattern: did not contain valid UTF-8 fn foo() { include!("not-utf8.bin") diff --git a/tests/ui/macros/out-of-order-shadowing.rs b/tests/ui/macros/out-of-order-shadowing.rs index a0d1a973764ad..3d26d4f2c911b 100644 --- a/tests/ui/macros/out-of-order-shadowing.rs +++ b/tests/ui/macros/out-of-order-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:define-macro.rs +//@ aux-build:define-macro.rs macro_rules! bar { () => {} } define_macro!(bar); diff --git a/tests/ui/macros/panic-temporaries-2018.rs b/tests/ui/macros/panic-temporaries-2018.rs index d914df3806299..aa7a7453aa76e 100644 --- a/tests/ui/macros/panic-temporaries-2018.rs +++ b/tests/ui/macros/panic-temporaries-2018.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_fmt_panics, unreachable_code)] diff --git a/tests/ui/macros/panic-temporaries.rs b/tests/ui/macros/panic-temporaries.rs index db65601fb73ee..6a0d71c9797e6 100644 --- a/tests/ui/macros/panic-temporaries.rs +++ b/tests/ui/macros/panic-temporaries.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(unreachable_code)] diff --git a/tests/ui/macros/parse-complex-macro-invoc-op.rs b/tests/ui/macros/parse-complex-macro-invoc-op.rs index 10810388d2033..bbb9b0270f260 100644 --- a/tests/ui/macros/parse-complex-macro-invoc-op.rs +++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_assignments)] @@ -8,7 +8,7 @@ // Test parsing binary operators after macro invocations. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(macro_rules)] diff --git a/tests/ui/macros/paths-in-macro-invocations.rs b/tests/ui/macros/paths-in-macro-invocations.rs index 622818a926f41..c1b7789d6de5e 100644 --- a/tests/ui/macros/paths-in-macro-invocations.rs +++ b/tests/ui/macros/paths-in-macro-invocations.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:two_macros-rpass.rs +//@ aux-build:two_macros-rpass.rs extern crate two_macros_rpass as two_macros; diff --git a/tests/ui/macros/proc_macro.rs b/tests/ui/macros/proc_macro.rs index 66f9cdc5567ca..ce2b041c26eba 100644 --- a/tests/ui/macros/proc_macro.rs +++ b/tests/ui/macros/proc_macro.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:proc_macro_def.rs -// ignore-cross-compile +//@ run-pass +//@ aux-build:proc_macro_def.rs +//@ ignore-cross-compile extern crate proc_macro_def; diff --git a/tests/ui/macros/pub-item-inside-macro.rs b/tests/ui/macros/pub-item-inside-macro.rs index d07681453a23a..b05d8539d5849 100644 --- a/tests/ui/macros/pub-item-inside-macro.rs +++ b/tests/ui/macros/pub-item-inside-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #14660 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod bleh { macro_rules! foo { diff --git a/tests/ui/macros/pub-method-inside-macro.rs b/tests/ui/macros/pub-method-inside-macro.rs index bc918c7a4dc22..c4f9acc637d3c 100644 --- a/tests/ui/macros/pub-method-inside-macro.rs +++ b/tests/ui/macros/pub-method-inside-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #17436 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod bleh { macro_rules! foo { diff --git a/tests/ui/macros/recovery-forbidden.rs b/tests/ui/macros/recovery-forbidden.rs index 5dd2619330c4a..dc50d8b9dd86f 100644 --- a/tests/ui/macros/recovery-forbidden.rs +++ b/tests/ui/macros/recovery-forbidden.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! dont_recover_here { ($e:expr) => { diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs index b1db05afd080b..de7dbb9052edb 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs @@ -1,8 +1,8 @@ -// edition:2021 +//@ edition:2021 // ignore-tidy-linelength -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![allow(path_statements, unused_allocation)] #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs index fcf4f367d0428..1600fd0af3f30 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs @@ -1,8 +1,8 @@ -// aux-build:common.rs +//@ aux-build:common.rs // ignore-tidy-linelength -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs index c8408d16fbb0d..37d94830db2cf 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-pass +//@ compile-flags: --test +//@ run-pass #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs index 0e3c14a5770ea..6e5f8d6cd12d4 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs @@ -1,7 +1,7 @@ -// aux-build:common.rs -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ aux-build:common.rs +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs index 0d2518dc25317..86cc7adb90de6 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs @@ -1,6 +1,6 @@ -// compile-flags: --test +//@ compile-flags: --test // ignore-tidy-linelength -// run-pass +//@ run-pass #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs index 57b79a56b7bfb..cf47a1e67aed8 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout index 66321bc35f01c..8065d0dff8fc1 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout @@ -1,7 +1,7 @@ #![feature(prelude_import)] #![no_std] -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(core_intrinsics, generic_assert)] #[prelude_import] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs index 1b8ce10ccce7d..3a14e0c64fd1d 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs b/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs index ed94c27cf05ca..9b8e3216a686b 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs index 950e70153ba9c..6464fd6f2fd2f 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs index 04924f0efa6f9..787b927c449b3 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/same-sequence-span.rs b/tests/ui/macros/same-sequence-span.rs index e0bb4d98525b9..67f6b6ad1cda0 100644 --- a/tests/ui/macros/same-sequence-span.rs +++ b/tests/ui/macros/same-sequence-span.rs @@ -1,4 +1,4 @@ -// aux-build:proc_macro_sequence.rs +//@ aux-build:proc_macro_sequence.rs // Regression test for issue #62831: Check that multiple sequences with the same span in the // left-hand side of a macro definition behave as if they had unique spans, and in particular that diff --git a/tests/ui/macros/semi-after-macro-ty.rs b/tests/ui/macros/semi-after-macro-ty.rs index f83ace8fadae7..60afc3b445061 100644 --- a/tests/ui/macros/semi-after-macro-ty.rs +++ b/tests/ui/macros/semi-after-macro-ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($t:ty; $p:path;) => {} } diff --git a/tests/ui/macros/stmt_expr_attr_macro_parse.rs b/tests/ui/macros/stmt_expr_attr_macro_parse.rs index 570191d2c90ae..82e05a7e0e2ab 100644 --- a/tests/ui/macros/stmt_expr_attr_macro_parse.rs +++ b/tests/ui/macros/stmt_expr_attr_macro_parse.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] macro_rules! m { diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs index 8cef833f48d26..492bd2450b1bf 100644 --- a/tests/ui/macros/stringify.rs +++ b/tests/ui/macros/stringify.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// compile-flags: --test +//@ run-pass +//@ edition:2021 +//@ compile-flags: --test #![allow(incomplete_features)] #![feature(async_closure)] diff --git a/tests/ui/macros/syntax-extension-cfg.rs b/tests/ui/macros/syntax-extension-cfg.rs index 2e929fc1dfa89..56d869f3dc121 100644 --- a/tests/ui/macros/syntax-extension-cfg.rs +++ b/tests/ui/macros/syntax-extension-cfg.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo --cfg qux="foo" +//@ run-pass +//@ compile-flags: --cfg foo --cfg qux="foo" pub fn main() { diff --git a/tests/ui/macros/syntax-extension-source-utils.rs b/tests/ui/macros/syntax-extension-source-utils.rs index aa894c83910cd..a16ebdc750424 100644 --- a/tests/ui/macros/syntax-extension-source-utils.rs +++ b/tests/ui/macros/syntax-extension-source-utils.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] diff --git a/tests/ui/macros/trace-macro.rs b/tests/ui/macros/trace-macro.rs index 576120811dbc6..ecc6aabe8caf9 100644 --- a/tests/ui/macros/trace-macro.rs +++ b/tests/ui/macros/trace-macro.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z trace-macros -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: -Z trace-macros +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { println!("Hello, World!"); diff --git a/tests/ui/macros/trace_faulty_macros.rs b/tests/ui/macros/trace_faulty_macros.rs index 00eb7593799e2..ec1ce1a1f9259 100644 --- a/tests/ui/macros/trace_faulty_macros.rs +++ b/tests/ui/macros/trace_faulty_macros.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "4"] diff --git a/tests/ui/macros/try-macro.rs b/tests/ui/macros/try-macro.rs index 824c77d9de528..b579143583eb7 100644 --- a/tests/ui/macros/try-macro.rs +++ b/tests/ui/macros/try-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] // for deprecated `try!()` macro use std::num::{ParseFloatError, ParseIntError}; diff --git a/tests/ui/macros/two-macro-use.rs b/tests/ui/macros/two-macro-use.rs index 07022bb01e3f6..8bb3c9da30512 100644 --- a/tests/ui/macros/two-macro-use.rs +++ b/tests/ui/macros/two-macro-use.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_one)] #[macro_use(macro_two)] diff --git a/tests/ui/macros/type-macros-hlist.rs b/tests/ui/macros/type-macros-hlist.rs index 946b5bd5d9334..b36aca1576f50 100644 --- a/tests/ui/macros/type-macros-hlist.rs +++ b/tests/ui/macros/type-macros-hlist.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] use std::ops::*; diff --git a/tests/ui/macros/type-macros-simple.rs b/tests/ui/macros/type-macros-simple.rs index dd3ad2ef0ac0f..4d1001baf59fd 100644 --- a/tests/ui/macros/type-macros-simple.rs +++ b/tests/ui/macros/type-macros-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] macro_rules! Tuple { diff --git a/tests/ui/macros/typeck-macro-interaction-issue-8852.rs b/tests/ui/macros/typeck-macro-interaction-issue-8852.rs index f2b089b74b50b..bdd4b058381c8 100644 --- a/tests/ui/macros/typeck-macro-interaction-issue-8852.rs +++ b/tests/ui/macros/typeck-macro-interaction-issue-8852.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum T { diff --git a/tests/ui/macros/unimplemented-macro-panic.rs b/tests/ui/macros/unimplemented-macro-panic.rs index e7169903f8ea5..d3bff8ca10ba0 100644 --- a/tests/ui/macros/unimplemented-macro-panic.rs +++ b/tests/ui/macros/unimplemented-macro-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:not implemented -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:not implemented +//@ ignore-emscripten no processes fn main() { unimplemented!() diff --git a/tests/ui/macros/unknown-builtin.rs b/tests/ui/macros/unknown-builtin.rs index 16f9139e6479e..048f5d68d3421 100644 --- a/tests/ui/macros/unknown-builtin.rs +++ b/tests/ui/macros/unknown-builtin.rs @@ -1,4 +1,4 @@ -// error-pattern: attempted to define built-in macro more than once +//@ error-pattern: attempted to define built-in macro more than once #![feature(rustc_attrs)] diff --git a/tests/ui/macros/unreachable-arg.rs b/tests/ui/macros/unreachable-arg.rs index 4024bd20b7914..1f0d00734865b 100644 --- a/tests/ui/macros/unreachable-arg.rs +++ b/tests/ui/macros/unreachable-arg.rs @@ -1,12 +1,12 @@ -// ignore-emscripten no processes +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]run-fail -// [edition_2021]check-fail -// [edition_2015]error-pattern:internal error: entered unreachable code: hello -// [edition_2021]error-pattern:format argument must be a string literal +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]run-fail +//@ [edition_2021]check-fail +//@ [edition_2015]error-pattern:internal error: entered unreachable code: hello +//@ [edition_2021]error-pattern:format argument must be a string literal #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/unreachable-fmt-msg.rs b/tests/ui/macros/unreachable-fmt-msg.rs index eb17ed92711c9..b16394a1920eb 100644 --- a/tests/ui/macros/unreachable-fmt-msg.rs +++ b/tests/ui/macros/unreachable-fmt-msg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code: 6 is not prime -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code: 6 is not prime +//@ ignore-emscripten no processes fn main() { unreachable!("{} is not {}", 6u32, "prime"); diff --git a/tests/ui/macros/unreachable-format-arg.rs b/tests/ui/macros/unreachable-format-arg.rs index ff059ad9e15ad..449c6bca16bce 100644 --- a/tests/ui/macros/unreachable-format-arg.rs +++ b/tests/ui/macros/unreachable-format-arg.rs @@ -1,11 +1,11 @@ -// run-fail -// ignore-emscripten no processes +//@ run-fail +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]error-pattern:internal error: entered unreachable code: x is {x} -// [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]error-pattern:internal error: entered unreachable code: x is {x} +//@ [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/unreachable-format-args.rs b/tests/ui/macros/unreachable-format-args.rs index 04a31fc1ba370..5f8a0e9cdffa1 100644 --- a/tests/ui/macros/unreachable-format-args.rs +++ b/tests/ui/macros/unreachable-format-args.rs @@ -1,12 +1,12 @@ -// ignore-emscripten no processes +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]check-fail -// [edition_2021]run-fail -// [edition_2015]error-pattern:there is no argument named `x` -// [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0 +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]check-fail +//@ [edition_2021]run-fail +//@ [edition_2015]error-pattern:there is no argument named `x` +//@ [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0 fn main() { let x = 5; diff --git a/tests/ui/macros/unreachable-macro-panic.rs b/tests/ui/macros/unreachable-macro-panic.rs index 55e2102e2cc6f..7909bcb76242d 100644 --- a/tests/ui/macros/unreachable-macro-panic.rs +++ b/tests/ui/macros/unreachable-macro-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code +//@ ignore-emscripten no processes fn main() { unreachable!() diff --git a/tests/ui/macros/unreachable-static-msg.rs b/tests/ui/macros/unreachable-static-msg.rs index 55edf3af7d9e5..3e917897da458 100644 --- a/tests/ui/macros/unreachable-static-msg.rs +++ b/tests/ui/macros/unreachable-static-msg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code: uhoh -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code: uhoh +//@ ignore-emscripten no processes fn main() { unreachable!("uhoh") diff --git a/tests/ui/macros/unreachable.rs b/tests/ui/macros/unreachable.rs index 55e2102e2cc6f..7909bcb76242d 100644 --- a/tests/ui/macros/unreachable.rs +++ b/tests/ui/macros/unreachable.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code +//@ ignore-emscripten no processes fn main() { unreachable!() diff --git a/tests/ui/macros/use-macro-self.rs b/tests/ui/macros/use-macro-self.rs index 06464ab0bc947..1d15b8386af96 100644 --- a/tests/ui/macros/use-macro-self.rs +++ b/tests/ui/macros/use-macro-self.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:use-macro-self.rs +//@ aux-build:use-macro-self.rs #[macro_use] extern crate use_macro_self; diff --git a/tests/ui/macros/user-defined-macro-rules.rs b/tests/ui/macros/user-defined-macro-rules.rs index 09e071ec45420..baabe0e90c450 100644 --- a/tests/ui/macros/user-defined-macro-rules.rs +++ b/tests/ui/macros/user-defined-macro-rules.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! macro_rules { () => { struct S; } } // OK diff --git a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs index 4003ee37ca1ea..da56fe03184a9 100644 --- a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs +++ b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs @@ -1,7 +1,7 @@ // check that we don't generate a span that points beyond EOF -// error-pattern: unclosed delimiter -// error-pattern: unclosed delimiter -// error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter fn a(){{{ diff --git a/tests/ui/manual/manual-link-bad-form.rs b/tests/ui/manual/manual-link-bad-form.rs index bc9b6be029429..0f5723adec980 100644 --- a/tests/ui/manual/manual-link-bad-form.rs +++ b/tests/ui/manual/manual-link-bad-form.rs @@ -1,5 +1,5 @@ -// compile-flags:-l static= -// error-pattern: library name must not be empty +//@ compile-flags:-l static= +//@ error-pattern: library name must not be empty fn main() { } diff --git a/tests/ui/manual/manual-link-bad-kind.rs b/tests/ui/manual/manual-link-bad-kind.rs index c50a6c034b593..d070faa657450 100644 --- a/tests/ui/manual/manual-link-bad-kind.rs +++ b/tests/ui/manual/manual-link-bad-kind.rs @@ -1,5 +1,5 @@ -// compile-flags:-l bar=foo -// error-pattern: unknown library kind `bar`, expected one of: static, dylib, framework, link-arg +//@ compile-flags:-l bar=foo +//@ error-pattern: unknown library kind `bar`, expected one of: static, dylib, framework, link-arg fn main() { } diff --git a/tests/ui/manual/manual-link-bad-search-path.rs b/tests/ui/manual/manual-link-bad-search-path.rs index 0fe23b02aa9e9..c9ced4734fc08 100644 --- a/tests/ui/manual/manual-link-bad-search-path.rs +++ b/tests/ui/manual/manual-link-bad-search-path.rs @@ -1,5 +1,5 @@ -// compile-flags:-L native= -// error-pattern: empty search path given via `-L` +//@ compile-flags:-L native= +//@ error-pattern: empty search path given via `-L` fn main() { } diff --git a/tests/ui/manual/manual-link-framework.rs b/tests/ui/manual/manual-link-framework.rs index 57c5966e96048..06fd76f68df14 100644 --- a/tests/ui/manual/manual-link-framework.rs +++ b/tests/ui/manual/manual-link-framework.rs @@ -1,7 +1,7 @@ -// ignore-macos -// ignore-ios -// compile-flags:-l framework=foo -// error-pattern: library kind `framework` is only supported on Apple targets +//@ ignore-macos +//@ ignore-ios +//@ compile-flags:-l framework=foo +//@ error-pattern: library kind `framework` is only supported on Apple targets fn main() { } diff --git a/tests/ui/manual/manual-link-unsupported-kind.rs b/tests/ui/manual/manual-link-unsupported-kind.rs index b8ec575a455ff..b5b9e3e65777c 100644 --- a/tests/ui/manual/manual-link-unsupported-kind.rs +++ b/tests/ui/manual/manual-link-unsupported-kind.rs @@ -1,5 +1,5 @@ -// compile-flags:-l raw-dylib=foo -// error-pattern: unknown library kind `raw-dylib`, expected one of: static, dylib, framework, link-arg +//@ compile-flags:-l raw-dylib=foo +//@ error-pattern: unknown library kind `raw-dylib`, expected one of: static, dylib, framework, link-arg fn main() { } diff --git a/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs b/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs index 0af706615e31f..2846f540b2401 100644 --- a/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs +++ b/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #61651 // Verifies that we don't try to constrain inference // variables due to the presence of multiple applicable diff --git a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs index 1e413120a3717..a9f0cdae1f6c1 100644 --- a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs +++ b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(marker_trait_attr)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs b/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs index b9f1de7ec13a5..84297de364bb7 100644 --- a/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs +++ b/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs @@ -1,4 +1,4 @@ -// known-bug: #89515 +//@ known-bug: #89515 // // The trait solver cannot deal with ambiguous marker trait impls // if there are lifetimes involved. As we must not special-case any diff --git a/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs b/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs index f7654458feb01..467f002699bc5 100644 --- a/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs +++ b/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for RFC 1268: we allow overlapping impls of marker traits, // that is, traits with #[marker]. In this case, a type `T` is // `MyMarker` if it is either `Debug` or `Display`. diff --git a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs index 97a814f51eec5..b69b893ecc4f1 100644 --- a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs +++ b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs @@ -1,4 +1,4 @@ -// known-bug: #109481 +//@ known-bug: #109481 // // While the `T: Copy` is always applicable when checking // that the impl `impl F for T {}` is well formed, diff --git a/tests/ui/match/const_non_normal_zst_ref_pattern.rs b/tests/ui/match/const_non_normal_zst_ref_pattern.rs index a114fafb64730..834b2fefaa80a 100644 --- a/tests/ui/match/const_non_normal_zst_ref_pattern.rs +++ b/tests/ui/match/const_non_normal_zst_ref_pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: isize = 10; const ZST: &() = unsafe { std::mem::transmute(FOO) }; diff --git a/tests/ui/match/expr-match-panic-fn.rs b/tests/ui/match/expr-match-panic-fn.rs index ea471717e883a..82991d20df88d 100644 --- a/tests/ui/match/expr-match-panic-fn.rs +++ b/tests/ui/match/expr-match-panic-fn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/match/expr-match-panic.rs b/tests/ui/match/expr-match-panic.rs index 53f8a8bd30ddb..e332ba83b914f 100644 --- a/tests/ui/match/expr-match-panic.rs +++ b/tests/ui/match/expr-match-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let _x = match true { diff --git a/tests/ui/match/guards-parenthesized-and.rs b/tests/ui/match/guards-parenthesized-and.rs index 3a1c341f3ee5a..7e3b930d6e855 100644 --- a/tests/ui/match/guards-parenthesized-and.rs +++ b/tests/ui/match/guards-parenthesized-and.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let c = 1; diff --git a/tests/ui/match/guards.rs b/tests/ui/match/guards.rs index 10a4bb6738781..13efdf4ef5bd2 100644 --- a/tests/ui/match/guards.rs +++ b/tests/ui/match/guards.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/match/issue-112438.rs b/tests/ui/match/issue-112438.rs index 46c69d5ba9c77..b2febe2921054 100644 --- a/tests/ui/match/issue-112438.rs +++ b/tests/ui/match/issue-112438.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const_pat)] #![allow(dead_code)] fn foo() { diff --git a/tests/ui/match/issue-113012.rs b/tests/ui/match/issue-113012.rs index da7a8b65b97ba..2b139829510b8 100644 --- a/tests/ui/match/issue-113012.rs +++ b/tests/ui/match/issue-113012.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo(()); diff --git a/tests/ui/match/issue-114691.rs b/tests/ui/match/issue-114691.rs index cc17d9ecf05c6..475f473b1c591 100644 --- a/tests/ui/match/issue-114691.rs +++ b/tests/ui/match/issue-114691.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test used to be miscompiled by LLVM 17. #![allow(dead_code)] diff --git a/tests/ui/match/issue-115681.rs b/tests/ui/match/issue-115681.rs index c41e808e170c3..4c913d4ba3cf5 100644 --- a/tests/ui/match/issue-115681.rs +++ b/tests/ui/match/issue-115681.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C opt-level=1 +//@ run-pass +//@ compile-flags: -C opt-level=1 // Make sure LLVM does not miscompile this match. fn main() { diff --git a/tests/ui/match/issue-11940.rs b/tests/ui/match/issue-11940.rs index 6815c87edd83a..8dba1a6c60016 100644 --- a/tests/ui/match/issue-11940.rs +++ b/tests/ui/match/issue-11940.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const TEST_STR: &'static str = "abcd"; diff --git a/tests/ui/match/issue-18060.rs b/tests/ui/match/issue-18060.rs index b5f3d0f74bc9a..daba393a3fa3d 100644 --- a/tests/ui/match/issue-18060.rs +++ b/tests/ui/match/issue-18060.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #18060: match arms were matching in the wrong order. fn main() { diff --git a/tests/ui/match/issue-26251.rs b/tests/ui/match/issue-26251.rs index a3e26a41232c7..b1a81fcf20920 100644 --- a/tests/ui/match/issue-26251.rs +++ b/tests/ui/match/issue-26251.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overlapping_range_endpoints)] fn main() { diff --git a/tests/ui/match/issue-26996.rs b/tests/ui/match/issue-26996.rs index 9ea4545268b4d..c4dfffa1c9ee7 100644 --- a/tests/ui/match/issue-26996.rs +++ b/tests/ui/match/issue-26996.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // This test is bogus (i.e., should be check-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // This test is checking that the write to `c.0` (which has been moved out of) // won't overwrite the state in `c2`. diff --git a/tests/ui/match/issue-27021.rs b/tests/ui/match/issue-27021.rs index 9630e9a03270e..b0b9000d92b94 100644 --- a/tests/ui/match/issue-27021.rs +++ b/tests/ui/match/issue-27021.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // This test is bogus (i.e., should be check-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // These are variants of issue-26996.rs. In all cases we are writing // into a record field that has been moved out of, and ensuring that diff --git a/tests/ui/match/issue-33498.rs b/tests/ui/match/issue-33498.rs index 9c8a97e7e6b2b..8d741927a41b6 100644 --- a/tests/ui/match/issue-33498.rs +++ b/tests/ui/match/issue-33498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub fn main() { let x = (0, 2); diff --git a/tests/ui/match/issue-42679.rs b/tests/ui/match/issue-42679.rs index 46a0bd35d6ada..d41ed43a65f17 100644 --- a/tests/ui/match/issue-42679.rs +++ b/tests/ui/match/issue-42679.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] #[derive(Debug, PartialEq)] diff --git a/tests/ui/match/issue-46920-byte-array-patterns.rs b/tests/ui/match/issue-46920-byte-array-patterns.rs index 2a8b4bb492276..4809bda858104 100644 --- a/tests/ui/match/issue-46920-byte-array-patterns.rs +++ b/tests/ui/match/issue-46920-byte-array-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const CURSOR_PARTITION_LABEL: &'static [u8] = b"partition"; const CURSOR_EVENT_TYPE_LABEL: &'static [u8] = b"event_type"; const BYTE_PATTERN: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/match/issue-5530.rs b/tests/ui/match/issue-5530.rs index 72731cbb177db..135955cecfbf0 100644 --- a/tests/ui/match/issue-5530.rs +++ b/tests/ui/match/issue-5530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Enum { diff --git a/tests/ui/match/issue-72680.rs b/tests/ui/match/issue-72680.rs index c13cace760086..5bae1d7f26674 100644 --- a/tests/ui/match/issue-72680.rs +++ b/tests/ui/match/issue-72680.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert!(f("", 0)); diff --git a/tests/ui/match/issue-72896-non-partial-eq-const.rs b/tests/ui/match/issue-72896-non-partial-eq-const.rs index a3095f0be83c1..d497271460849 100644 --- a/tests/ui/match/issue-72896-non-partial-eq-const.rs +++ b/tests/ui/match/issue-72896-non-partial-eq-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait EnumSetType { type Repr; } diff --git a/tests/ui/match/issue-82392.rs b/tests/ui/match/issue-82392.rs index d26d883040b48..6f9527fb337ba 100644 --- a/tests/ui/match/issue-82392.rs +++ b/tests/ui/match/issue-82392.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/82329 -// compile-flags: -Zunpretty=hir,typed -// check-pass +//@ compile-flags: -Zunpretty=hir,typed +//@ check-pass pub fn main() { if true { diff --git a/tests/ui/match/issue-82392.stdout b/tests/ui/match/issue-82392.stdout index ffe730743241d..8a23d906757d7 100644 --- a/tests/ui/match/issue-82392.stdout +++ b/tests/ui/match/issue-82392.stdout @@ -3,8 +3,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; // https://github.com/rust-lang/rust/issues/82329 -// compile-flags: -Zunpretty=hir,typed -// check-pass +//@ compile-flags: -Zunpretty=hir,typed +//@ check-pass fn main() ({ (if (true as bool) diff --git a/tests/ui/match/issue-84434.rs b/tests/ui/match/issue-84434.rs index 423481fd5f02d..785307df61380 100644 --- a/tests/ui/match/issue-84434.rs +++ b/tests/ui/match/issue-84434.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/84434 -// check-pass +//@ check-pass use std::path::Path; struct A { diff --git a/tests/ui/match/match-bot-panic.rs b/tests/ui/match/match-bot-panic.rs index e4a6f6d6fe44a..a155b5fb3f27e 100644 --- a/tests/ui/match/match-bot-panic.rs +++ b/tests/ui/match/match-bot-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/match/match-disc-bot.rs b/tests/ui/match/match-disc-bot.rs index 18cfd5e23950b..fdb98a0accb8f 100644 --- a/tests/ui/match/match-disc-bot.rs +++ b/tests/ui/match/match-disc-bot.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn f() -> ! { panic!("quux") diff --git a/tests/ui/match/match-float.rs b/tests/ui/match/match-float.rs index 8da6a9ed2049c..f8514568d157c 100644 --- a/tests/ui/match/match-float.rs +++ b/tests/ui/match/match-float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Makes sure we use `==` (not bitwise) semantics for float comparison. fn main() { diff --git a/tests/ui/match/match-on-negative-integer-ranges.rs b/tests/ui/match/match-on-negative-integer-ranges.rs index 53e9ea9a5775b..855686f55c326 100644 --- a/tests/ui/match/match-on-negative-integer-ranges.rs +++ b/tests/ui/match/match-on-negative-integer-ranges.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(false, match -50_i8 { -128i8..=-101i8 => true, _ => false, }); diff --git a/tests/ui/match/match-ref-mut-stability.rs b/tests/ui/match/match-ref-mut-stability.rs index 52120360be71e..90784a4f4b652 100644 --- a/tests/ui/match/match-ref-mut-stability.rs +++ b/tests/ui/match/match-ref-mut-stability.rs @@ -1,7 +1,7 @@ // Check that `ref mut` variables don't change address between the match guard // and the arm expression. -// run-pass +//@ run-pass // Test that z always point to the same temporary. fn referent_stability() { diff --git a/tests/ui/match/match-wildcards.rs b/tests/ui/match/match-wildcards.rs index 43f6e4913ac76..4fddee6666eac 100644 --- a/tests/ui/match/match-wildcards.rs +++ b/tests/ui/match/match-wildcards.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:squirrelcupcake -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:squirrelcupcake +//@ ignore-emscripten no processes fn cmp() -> isize { match (Some('a'), None::) { diff --git a/tests/ui/match/match_non_exhaustive.rs b/tests/ui/match/match_non_exhaustive.rs index f162dd60f5033..25ff0942833fe 100644 --- a/tests/ui/match/match_non_exhaustive.rs +++ b/tests/ui/match/match_non_exhaustive.rs @@ -1,4 +1,4 @@ -// aux-build:match_non_exhaustive_lib.rs +//@ aux-build:match_non_exhaustive_lib.rs /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/match/pattern-deref-miscompile.rs b/tests/ui/match/pattern-deref-miscompile.rs index caa6d184a92dd..dbd952252ceeb 100644 --- a/tests/ui/match/pattern-deref-miscompile.rs +++ b/tests/ui/match/pattern-deref-miscompile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { match b"." as &[u8] { diff --git a/tests/ui/max-min-classes.rs b/tests/ui/max-min-classes.rs index f9a39e486da2e..338a3156a9a93 100644 --- a/tests/ui/max-min-classes.rs +++ b/tests/ui/max-min-classes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] trait Product { diff --git a/tests/ui/maximal_mir_to_hir_coverage.rs b/tests/ui/maximal_mir_to_hir_coverage.rs index 5ca54633f219a..e57c83d007e07 100644 --- a/tests/ui/maximal_mir_to_hir_coverage.rs +++ b/tests/ui/maximal_mir_to_hir_coverage.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmaximal-hir-to-mir-coverage -// run-pass +//@ compile-flags: -Zmaximal-hir-to-mir-coverage +//@ run-pass // Just making sure this flag is accepted and doesn't crash the compiler diff --git a/tests/ui/meta/auxiliary/env.rs b/tests/ui/meta/auxiliary/env.rs index b3644d8d5943f..882ed43c36999 100644 --- a/tests/ui/meta/auxiliary/env.rs +++ b/tests/ui/meta/auxiliary/env.rs @@ -1,7 +1,7 @@ // Check that aux builds can also use rustc-env, but environment is configured // separately from the main test case. // -// rustc-env:COMPILETEST_BAR=bar +//@ rustc-env:COMPILETEST_BAR=bar pub fn test() { assert_eq!(option_env!("COMPILETEST_FOO"), None); diff --git a/tests/ui/meta/expected-error-correct-rev.rs b/tests/ui/meta/expected-error-correct-rev.rs index 26798c3dfc29f..33837337c151a 100644 --- a/tests/ui/meta/expected-error-correct-rev.rs +++ b/tests/ui/meta/expected-error-correct-rev.rs @@ -1,4 +1,4 @@ -// revisions: a +//@ revisions: a // Counterpart to `expected-error-wrong-rev.rs` diff --git a/tests/ui/meta/meta-expected-error-wrong-rev.rs b/tests/ui/meta/meta-expected-error-wrong-rev.rs index c30d4fe0a13c5..de27629948290 100644 --- a/tests/ui/meta/meta-expected-error-wrong-rev.rs +++ b/tests/ui/meta/meta-expected-error-wrong-rev.rs @@ -1,7 +1,7 @@ -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius -// revisions: a -// should-fail +//@ revisions: a +//@ should-fail // This is a "meta-test" of the compilertest framework itself. In // particular, it includes the right error message, but the message diff --git a/tests/ui/meta/no_std-extern-libc.rs b/tests/ui/meta/no_std-extern-libc.rs index 763ea740a2740..919caf9428f71 100644 --- a/tests/ui/meta/no_std-extern-libc.rs +++ b/tests/ui/meta/no_std-extern-libc.rs @@ -1,5 +1,5 @@ // Test that `download-rustc` doesn't put duplicate copies of libc in the sysroot. -// check-pass +//@ check-pass #![crate_type = "lib"] #![no_std] #![feature(rustc_private)] diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/meta/revision-bad.rs index 37ddbe99a9f03..c5193b19d9e4a 100644 --- a/tests/ui/meta/revision-bad.rs +++ b/tests/ui/meta/revision-bad.rs @@ -1,12 +1,12 @@ // Meta test for compiletest: check that when we give the wrong error // patterns, the test fails. -// run-fail -// revisions: foo bar -// should-fail -// needs-run-enabled -//[foo] error-pattern:bar -//[bar] error-pattern:foo +//@ run-fail +//@ revisions: foo bar +//@ should-fail +//@ needs-run-enabled +//@[foo] error-pattern:bar +//@[bar] error-pattern:foo #[cfg(foo)] fn die() { diff --git a/tests/ui/meta/revision-ok.rs b/tests/ui/meta/revision-ok.rs index bbeae41b8bb95..c1387f7d18e08 100644 --- a/tests/ui/meta/revision-ok.rs +++ b/tests/ui/meta/revision-ok.rs @@ -1,11 +1,11 @@ // Meta test for compiletest: check that when we give the right error // patterns, the test passes. See all `revision-bad.rs`. -// run-fail -// revisions: foo bar -//[foo] error-pattern:foo -//[bar] error-pattern:bar -// ignore-emscripten no processes +//@ run-fail +//@ revisions: foo bar +//@[foo] error-pattern:foo +//@[bar] error-pattern:bar +//@ ignore-emscripten no processes #[cfg(foo)] fn die() { diff --git a/tests/ui/meta/rustc-env.rs b/tests/ui/meta/rustc-env.rs index 7d4e005be10cf..971f29116bc16 100644 --- a/tests/ui/meta/rustc-env.rs +++ b/tests/ui/meta/rustc-env.rs @@ -1,12 +1,12 @@ // Compiletest meta test checking that rustc-env and unset-rustc-env directives // can be used to configure environment for rustc. // -// run-pass -// aux-build:env.rs -// rustc-env:COMPILETEST_FOO=foo +//@ run-pass +//@ aux-build:env.rs +//@ rustc-env:COMPILETEST_FOO=foo // // An environment variable that is likely to be set, but should be safe to unset. -// unset-rustc-env:PWD +//@ unset-rustc-env:PWD extern crate env; diff --git a/tests/ui/methods/call_method_unknown_pointee.rs b/tests/ui/methods/call_method_unknown_pointee.rs index fe4275f5367a9..1643b6bfa1813 100644 --- a/tests/ui/methods/call_method_unknown_pointee.rs +++ b/tests/ui/methods/call_method_unknown_pointee.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 // tests that the pointee type of a raw pointer must be known to call methods on it // see also: `tests/ui/editions/edition-raw-pointer-method-2018.rs` diff --git a/tests/ui/methods/inherent-bound-in-probe.rs b/tests/ui/methods/inherent-bound-in-probe.rs index 81a99ca010e5d..265ef93425a2f 100644 --- a/tests/ui/methods/inherent-bound-in-probe.rs +++ b/tests/ui/methods/inherent-bound-in-probe.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // Fixes #110131 // diff --git a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs index 006e315b02c68..d058c2da6f28b 100644 --- a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs +++ b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs @@ -1,7 +1,7 @@ // Test an ambiguity scenario where one copy of the method is available // from a trait imported from another crate. -// aux-build:ambig_impl_2_lib.rs +//@ aux-build:ambig_impl_2_lib.rs extern crate ambig_impl_2_lib; use ambig_impl_2_lib::Me; trait Me2 { diff --git a/tests/ui/methods/method-argument-inference-associated-type.rs b/tests/ui/methods/method-argument-inference-associated-type.rs index 852747d06b550..a9d2bb6df8e7c 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 +//@ run-pass pub struct ClientMap; pub struct ClientMap2; diff --git a/tests/ui/methods/method-call-lifetime-args-subst-index.rs b/tests/ui/methods/method-call-lifetime-args-subst-index.rs index 8df58a3486eb0..9f323a8f77d2e 100644 --- a/tests/ui/methods/method-call-lifetime-args-subst-index.rs +++ b/tests/ui/methods/method-call-lifetime-args-subst-index.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] struct S; 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 f2ace32c6b636..8721dd85ac785 100644 --- a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs +++ b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that we successfully handle methods where the `self` type has // an early-bound lifetime. Issue #18208. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/methods/method-lookup-order.rs b/tests/ui/methods/method-lookup-order.rs index 5a46cf35dec0e..08ad6483d089e 100644 --- a/tests/ui/methods/method-lookup-order.rs +++ b/tests/ui/methods/method-lookup-order.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength -// run-pass +//@ run-pass #![allow(dead_code)] // There are five cfg's below. I explored the set of all non-empty combinations @@ -16,39 +16,39 @@ // {bar_for_foo, valbar_for_et_foo}: these are higher precedent than the `&mut self` method on `Foo`, and so no case matching bx1x1x is included. // {mutbar_for_foo, valbar_for_etmut_foo} (which are lower precedent than the inherent `&mut self` method on `Foo`; e.g. b10101 *is* included. -// revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 - -//[b00001]compile-flags: --cfg inherent_mut -//[b00010]compile-flags: --cfg bar_for_foo -//[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo -//[b00100]compile-flags: --cfg mutbar_for_foo -//[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo -//[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo -//[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo -//[b01000]compile-flags: --cfg valbar_for_et_foo -//[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo -//[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b10000]compile-flags: --cfg valbar_for_etmut_foo -//[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo -//[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@ revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 + +//@[b00001]compile-flags: --cfg inherent_mut +//@[b00010]compile-flags: --cfg bar_for_foo +//@[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo +//@[b00100]compile-flags: --cfg mutbar_for_foo +//@[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo +//@[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo +//@[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo +//@[b01000]compile-flags: --cfg valbar_for_et_foo +//@[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo +//@[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b10000]compile-flags: --cfg valbar_for_etmut_foo +//@[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo +//@[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo struct Foo {} diff --git a/tests/ui/methods/method-macro-backtrace.rs b/tests/ui/methods/method-macro-backtrace.rs index 00fe32b7c152a..10d7c8cfda062 100644 --- a/tests/ui/methods/method-macro-backtrace.rs +++ b/tests/ui/methods/method-macro-backtrace.rs @@ -1,4 +1,4 @@ -// forbid-output: in this expansion of +//@ forbid-output: in this expansion of macro_rules! make_method { ($name:ident) => ( fn $name(&self) { } ) diff --git a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs index daff037b27bda..c3454b38b45f1 100644 --- a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that an `&mut self` method, when invoked on a place whose // type is `&mut [u8]`, passes in a pointer to the place and not a // temporary. Issue #19147. diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs index 9c0b952849eab..b3979e75b6120 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] @@ -9,7 +9,7 @@ // winnowing stage of method resolution failed to handle an associated // type projection. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(associated_types)] diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.rs b/tests/ui/methods/method-on-ambiguous-numeric-type.rs index f42b72e9f9c13..4d7d86bd354f9 100644 --- a/tests/ui/methods/method-on-ambiguous-numeric-type.rs +++ b/tests/ui/methods/method-on-ambiguous-numeric-type.rs @@ -1,4 +1,4 @@ -// aux-build:macro-in-other-crate.rs +//@ aux-build:macro-in-other-crate.rs #[macro_use] extern crate macro_in_other_crate; diff --git a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs index 787191a26fbe7..b2765c4764a04 100644 --- a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs +++ b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that method matching does not make "guesses" depending on // Deref impls that don't eventually end up being picked. diff --git a/tests/ui/methods/method-projection.rs b/tests/ui/methods/method-projection.rs index 21d983f192ab6..1e1090d695539 100644 --- a/tests/ui/methods/method-projection.rs +++ b/tests/ui/methods/method-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // projection bound from a trait. Issue #20469. diff --git a/tests/ui/methods/method-recursive-blanket-impl.rs b/tests/ui/methods/method-recursive-blanket-impl.rs index e7e83cbec7756..09bbfffcd5533 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 +//@ run-pass #![allow(unused_variables)] #![allow(unused_imports)] // Test that we don't trigger on the blanket impl for all `&'a T` but @@ -6,7 +6,7 @@ // know not to stop at the blanket, we have to recursively evaluate // the `T:Foo` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::Sized; diff --git a/tests/ui/methods/method-self-arg-aux1.rs b/tests/ui/methods/method-self-arg-aux1.rs index 79b70a17ca187..a0c0a4e054103 100644 --- a/tests/ui/methods/method-self-arg-aux1.rs +++ b/tests/ui/methods/method-self-arg-aux1.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg1.rs +//@ aux-build:method_self_arg1.rs extern crate method_self_arg1; use method_self_arg1::Foo; diff --git a/tests/ui/methods/method-self-arg-aux2.rs b/tests/ui/methods/method-self-arg-aux2.rs index 16487b54f174f..d8b0d847d74a3 100644 --- a/tests/ui/methods/method-self-arg-aux2.rs +++ b/tests/ui/methods/method-self-arg-aux2.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg2.rs +//@ aux-build:method_self_arg2.rs extern crate method_self_arg2; use method_self_arg2::{Foo, Bar}; diff --git a/tests/ui/methods/method-self-arg-trait.rs b/tests/ui/methods/method-self-arg-trait.rs index ffa7a552b25a3..63594380753ea 100644 --- a/tests/ui/methods/method-self-arg-trait.rs +++ b/tests/ui/methods/method-self-arg-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: u64 = 1; diff --git a/tests/ui/methods/method-self-arg.rs b/tests/ui/methods/method-self-arg.rs index f738fa19c852a..d26b9663fd027 100644 --- a/tests/ui/methods/method-self-arg.rs +++ b/tests/ui/methods/method-self-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: usize = 1; diff --git a/tests/ui/methods/method-trait-object-with-hrtb.rs b/tests/ui/methods/method-trait-object-with-hrtb.rs index d1bee676c2f5c..f22e93ec245cc 100644 --- a/tests/ui/methods/method-trait-object-with-hrtb.rs +++ b/tests/ui/methods/method-trait-object-with-hrtb.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Check that method probing ObjectCandidate works in the presence of // auto traits and/or HRTBs. diff --git a/tests/ui/methods/method-two-trait-defer-resolution-1.rs b/tests/ui/methods/method-two-trait-defer-resolution-1.rs index b768620cd3a57..9130caccdf721 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-1.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Test that we pick which version of `foo` to run based on the diff --git a/tests/ui/methods/method-two-trait-defer-resolution-2.rs b/tests/ui/methods/method-two-trait-defer-resolution-2.rs index d6076126732bc..a022fae922e9e 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-2.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that when we write `x.foo()`, we do not have to know the // complete type of `x` in order to type-check the method call. In // this case, we know that `x: Vec<_1>`, but we don't know what type 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 2fd6c3bfab868..373439d255957 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,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { //~ WARN trait `A` is never used fn foo(self); diff --git a/tests/ui/methods/method-where-clause.rs b/tests/ui/methods/method-where-clause.rs index 01692abf9b6f2..c9855b63d1abb 100644 --- a/tests/ui/methods/method-where-clause.rs +++ b/tests/ui/methods/method-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // where clause type, and not only type parameters. diff --git a/tests/ui/minus-string.rs b/tests/ui/minus-string.rs index 018f0ef9ac56c..8d9b8d8bbf49e 100644 --- a/tests/ui/minus-string.rs +++ b/tests/ui/minus-string.rs @@ -1,3 +1,3 @@ -// error-pattern:cannot apply unary operator `-` to type `String` +//@ error-pattern:cannot apply unary operator `-` to type `String` fn main() { -"foo".to_string(); } diff --git a/tests/ui/mir/alignment/addrof_alignment.rs b/tests/ui/mir/alignment/addrof_alignment.rs index f3423e97a8a03..ed6638ed82ba0 100644 --- a/tests/ui/mir/alignment/addrof_alignment.rs +++ b/tests/ui/mir/alignment/addrof_alignment.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions struct Misalignment { a: u32, diff --git a/tests/ui/mir/alignment/i686-pc-windows-msvc.rs b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs index 74ba1fde6499e..379f61ae818f2 100644 --- a/tests/ui/mir/alignment/i686-pc-windows-msvc.rs +++ b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs @@ -1,6 +1,6 @@ -// run-pass -// only-i686-pc-windows-msvc -// compile-flags: -Copt-level=0 -Cdebug-assertions=yes +//@ run-pass +//@ only-i686-pc-windows-msvc +//@ compile-flags: -Copt-level=0 -Cdebug-assertions=yes // MSVC isn't sure if on 32-bit Windows its u64 type is 8-byte-aligned or 4-byte-aligned. // So this test ensures that on i686-pc-windows-msvc, we do not insert a runtime check diff --git a/tests/ui/mir/alignment/misaligned_lhs.rs b/tests/ui/mir/alignment/misaligned_lhs.rs index 97644ba8e0949..5f484b8b3be3f 100644 --- a/tests/ui/mir/alignment/misaligned_lhs.rs +++ b/tests/ui/mir/alignment/misaligned_lhs.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let mut x = [0u32; 2]; diff --git a/tests/ui/mir/alignment/misaligned_rhs.rs b/tests/ui/mir/alignment/misaligned_rhs.rs index 8534bc71a3a29..ca63a4711cda6 100644 --- a/tests/ui/mir/alignment/misaligned_rhs.rs +++ b/tests/ui/mir/alignment/misaligned_rhs.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let mut x = [0u32; 2]; diff --git a/tests/ui/mir/alignment/packed.rs b/tests/ui/mir/alignment/packed.rs index 754698591e33b..fe8ecc668b868 100644 --- a/tests/ui/mir/alignment/packed.rs +++ b/tests/ui/mir/alignment/packed.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions #![feature(strict_provenance, pointer_is_aligned)] diff --git a/tests/ui/mir/alignment/place_computation.rs b/tests/ui/mir/alignment/place_computation.rs index fdd4864250ac1..d3717db77c78d 100644 --- a/tests/ui/mir/alignment/place_computation.rs +++ b/tests/ui/mir/alignment/place_computation.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions #[repr(align(8))] struct Misalignment { diff --git a/tests/ui/mir/alignment/place_without_read.rs b/tests/ui/mir/alignment/place_without_read.rs index b4be7a50f61de..792666b54b11c 100644 --- a/tests/ui/mir/alignment/place_without_read.rs +++ b/tests/ui/mir/alignment/place_without_read.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions fn main() { let ptr = 1 as *const u16; diff --git a/tests/ui/mir/alignment/two_pointers.rs b/tests/ui/mir/alignment/two_pointers.rs index 29af21dffc194..68bf45c6e70f3 100644 --- a/tests/ui/mir/alignment/two_pointers.rs +++ b/tests/ui/mir/alignment/two_pointers.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let x = [0u32; 2]; diff --git a/tests/ui/mir/auxiliary/issue_76375_aux.rs b/tests/ui/mir/auxiliary/issue_76375_aux.rs index 90f4df739f12a..74bab91f6dcff 100644 --- a/tests/ui/mir/auxiliary/issue_76375_aux.rs +++ b/tests/ui/mir/auxiliary/issue_76375_aux.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: -Z mir-opt-level=3 +//@ edition:2018 +//@ compile-flags: -Z mir-opt-level=3 #[inline(always)] pub fn copy_prop(s: bool) -> String { diff --git a/tests/ui/mir/build-async-error-body-correctly.rs b/tests/ui/mir/build-async-error-body-correctly.rs index 1787f80c07e5e..8f1a3ec8fb59a 100644 --- a/tests/ui/mir/build-async-error-body-correctly.rs +++ b/tests/ui/mir/build-async-error-body-correctly.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn asyncfn() { let binding = match true {}; diff --git a/tests/ui/mir/checks_without_panic_impl.rs b/tests/ui/mir/checks_without_panic_impl.rs index 04f410b77a3b0..0dba5784daa55 100644 --- a/tests/ui/mir/checks_without_panic_impl.rs +++ b/tests/ui/mir/checks_without_panic_impl.rs @@ -2,8 +2,8 @@ // does not prevent crates without a panic_impl from compiling. // See rust-lang/rust#109996 -// build-pass -// compile-flags: -Cdebug-assertions=yes +//@ build-pass +//@ compile-flags: -Cdebug-assertions=yes #![crate_type = "lib"] diff --git a/tests/ui/mir/debug-ref-undef.rs b/tests/ui/mir/debug-ref-undef.rs index 37fd22a9dd2d0..b2287d94add32 100644 --- a/tests/ui/mir/debug-ref-undef.rs +++ b/tests/ui/mir/debug-ref-undef.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g -O -Zmir-opt-level=0 -Zinline-mir=y -Zmir-enable-passes=+ReferencePropagation +//@ run-pass +//@ compile-flags: -g -O -Zmir-opt-level=0 -Zinline-mir=y -Zmir-enable-passes=+ReferencePropagation #![allow(dead_code)] diff --git a/tests/ui/mir/field-projection-invariant.rs b/tests/ui/mir/field-projection-invariant.rs index b5d6add043cb9..16b8c8354b0d2 100644 --- a/tests/ui/mir/field-projection-invariant.rs +++ b/tests/ui/mir/field-projection-invariant.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass struct Inv<'a>(&'a mut &'a ()); enum Foo { Bar, diff --git a/tests/ui/mir/field-ty-ascription-enums.rs b/tests/ui/mir/field-ty-ascription-enums.rs index 179af61709063..cd25a576a50c4 100644 --- a/tests/ui/mir/field-ty-ascription-enums.rs +++ b/tests/ui/mir/field-ty-ascription-enums.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass enum Foo { Var(T), diff --git a/tests/ui/mir/field-ty-ascription.rs b/tests/ui/mir/field-ty-ascription.rs index 178c7916bc59f..c5dbc4ebeb895 100644 --- a/tests/ui/mir/field-ty-ascription.rs +++ b/tests/ui/mir/field-ty-ascription.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass struct Foo(T); // `T` is covariant. diff --git a/tests/ui/mir/important-higher-ranked-regions.rs b/tests/ui/mir/important-higher-ranked-regions.rs index cadfb3b66f297..beb7a7928c69a 100644 --- a/tests/ui/mir/important-higher-ranked-regions.rs +++ b/tests/ui/mir/important-higher-ranked-regions.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir // This test checks that bivariant parameters are handled correctly // in the mir. diff --git a/tests/ui/mir/inline-wrong-abi.rs b/tests/ui/mir/inline-wrong-abi.rs index 1f61a5dcfbe6d..8ef0b86a26b4a 100644 --- a/tests/ui/mir/inline-wrong-abi.rs +++ b/tests/ui/mir/inline-wrong-abi.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zpolymorphize=on -Zinline-mir=yes -Zmir-opt-level=0 +//@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes -Zmir-opt-level=0 #![feature(fn_traits, unboxed_closures)] struct Foo(T); diff --git a/tests/ui/mir/issue-101844.rs b/tests/ui/mir/issue-101844.rs index 72ceefa4f4a40..d66d5c5ba5064 100644 --- a/tests/ui/mir/issue-101844.rs +++ b/tests/ui/mir/issue-101844.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait FirstTrait { type Item; diff --git a/tests/ui/mir/issue-105809.rs b/tests/ui/mir/issue-105809.rs index 57828feef2d6a..e7a8fb6526896 100644 --- a/tests/ui/mir/issue-105809.rs +++ b/tests/ui/mir/issue-105809.rs @@ -1,7 +1,7 @@ // Non-regression test ICE from issue #105809 and duplicates. -// build-pass: the ICE is during codegen -// compile-flags: --edition 2018 -Zmir-opt-level=1 +//@ build-pass: the ICE is during codegen +//@ compile-flags: --edition 2018 -Zmir-opt-level=1 use std::{future::Future, pin::Pin}; diff --git a/tests/ui/mir/issue-106062.rs b/tests/ui/mir/issue-106062.rs index 621ba566ee38a..c088d0178d008 100644 --- a/tests/ui/mir/issue-106062.rs +++ b/tests/ui/mir/issue-106062.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{future::Future, marker::PhantomData}; diff --git a/tests/ui/mir/issue-107678-projection-with-lifetime.rs b/tests/ui/mir/issue-107678-projection-with-lifetime.rs index 14a45687875f8..4d0d2801ee98e 100644 --- a/tests/ui/mir/issue-107678-projection-with-lifetime.rs +++ b/tests/ui/mir/issue-107678-projection-with-lifetime.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-107691.rs b/tests/ui/mir/issue-107691.rs index 517a172089fe9..0dc6e5afb5590 100644 --- a/tests/ui/mir/issue-107691.rs +++ b/tests/ui/mir/issue-107691.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -C opt-level=3 +//@ build-pass +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-109004-drop-large-array.rs b/tests/ui/mir/issue-109004-drop-large-array.rs index 5e3361cef6e36..b1778954f74da 100644 --- a/tests/ui/mir/issue-109004-drop-large-array.rs +++ b/tests/ui/mir/issue-109004-drop-large-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const SZ: usize = 64_000_000; type BigDrop = [String; SZ]; diff --git a/tests/ui/mir/issue-109743.rs b/tests/ui/mir/issue-109743.rs index 73f3405e3ad76..7dda1771b3952 100644 --- a/tests/ui/mir/issue-109743.rs +++ b/tests/ui/mir/issue-109743.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib use std::marker::PhantomData; diff --git a/tests/ui/mir/issue-29227.rs b/tests/ui/mir/issue-29227.rs index e9dfc2840e599..4e4fbf50ceb1a 100644 --- a/tests/ui/mir/issue-29227.rs +++ b/tests/ui/mir/issue-29227.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Regression test for #29227. The problem here was that MIR diff --git a/tests/ui/mir/issue-46845.rs b/tests/ui/mir/issue-46845.rs index fc85b25519ab6..34b9f9791f392 100644 --- a/tests/ui/mir/issue-46845.rs +++ b/tests/ui/mir/issue-46845.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // To work around #46855 -// compile-flags: -Z mir-opt-level=0 +//@ compile-flags: -Z mir-opt-level=0 // Regression test for the inhabitedness of unions with uninhabited variants, issue #46845 use std::mem; diff --git a/tests/ui/mir/issue-60390.rs b/tests/ui/mir/issue-60390.rs index fd9d6b46dd444..681d23ced7082 100644 --- a/tests/ui/mir/issue-60390.rs +++ b/tests/ui/mir/issue-60390.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for #60390, this ICE requires `--emit=mir` flag. fn main() { diff --git a/tests/ui/mir/issue-66851.rs b/tests/ui/mir/issue-66851.rs index 878ad4e475a1e..cc92e75c6a80a 100644 --- a/tests/ui/mir/issue-66851.rs +++ b/tests/ui/mir/issue-66851.rs @@ -1,8 +1,8 @@ // This used to mis-compile because the mir-opt `SimplifyArmIdentity` // did not check that the types matched up in the `Ok(r)` branch. // -// run-pass -// compile-flags: -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=3 #[derive(Debug, PartialEq, Eq)] enum SpecialsRes { Res(u64) } diff --git a/tests/ui/mir/issue-66930.rs b/tests/ui/mir/issue-66930.rs index 5f9eb2bf437fd..411b978aec662 100644 --- a/tests/ui/mir/issue-66930.rs +++ b/tests/ui/mir/issue-66930.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for #66930, this ICE requires `--emit=mir` flag. static UTF8_CHAR_WIDTH: [u8; 0] = []; diff --git a/tests/ui/mir/issue-67639-normalization-ice.rs b/tests/ui/mir/issue-67639-normalization-ice.rs index 71150a80bc0a1..94b7747583410 100644 --- a/tests/ui/mir/issue-67639-normalization-ice.rs +++ b/tests/ui/mir/issue-67639-normalization-ice.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=4 -// build-pass +//@ compile-flags: -Z mir-opt-level=4 +//@ build-pass // This used to ICE in const-prop due // to an empty ParamEnv being used during normalization diff --git a/tests/ui/mir/issue-67710-inline-projection.rs b/tests/ui/mir/issue-67710-inline-projection.rs index 1ff6b4d628c8b..0aeb9edb292e9 100644 --- a/tests/ui/mir/issue-67710-inline-projection.rs +++ b/tests/ui/mir/issue-67710-inline-projection.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass // This used to ICE due to the inling pass not examining projections // for references to locals diff --git a/tests/ui/mir/issue-68841.rs b/tests/ui/mir/issue-68841.rs index 550bd452a8093..5638449b684bc 100644 --- a/tests/ui/mir/issue-68841.rs +++ b/tests/ui/mir/issue-68841.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z mir-opt-level=3 -// edition:2018 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ edition:2018 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/mir/issue-71793-inline-args-storage.rs b/tests/ui/mir/issue-71793-inline-args-storage.rs index 3749d5ebf81bd..0ed4d4723731e 100644 --- a/tests/ui/mir/issue-71793-inline-args-storage.rs +++ b/tests/ui/mir/issue-71793-inline-args-storage.rs @@ -2,8 +2,8 @@ // temporaries for arguments, so that they don't become part of the coroutine. // Regression test for #71793. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // compile-args: -Zmir-opt-level=3 #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-73914.rs b/tests/ui/mir/issue-73914.rs index 1e99faaded4ef..610622f0c31a7 100644 --- a/tests/ui/mir/issue-73914.rs +++ b/tests/ui/mir/issue-73914.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags:-Copt-level=0 -// edition:2018 +//@ build-pass +//@ compile-flags:-Copt-level=0 +//@ edition:2018 struct S(std::marker::PhantomData); diff --git a/tests/ui/mir/issue-74739.rs b/tests/ui/mir/issue-74739.rs index 03622358ae1cd..06d210e01033a 100644 --- a/tests/ui/mir/issue-74739.rs +++ b/tests/ui/mir/issue-74739.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass struct Foo { x: i32, diff --git a/tests/ui/mir/issue-75053.rs b/tests/ui/mir/issue-75053.rs index cb56eaa0b13d9..e2ec4076b4996 100644 --- a/tests/ui/mir/issue-75053.rs +++ b/tests/ui/mir/issue-75053.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z mir-opt-level=3 +//@ compile-flags: -Z mir-opt-level=3 #![feature(type_alias_impl_trait, rustc_attrs)] diff --git a/tests/ui/mir/issue-75419-validation-impl-trait.rs b/tests/ui/mir/issue-75419-validation-impl-trait.rs index a8741befb0cfe..2bbd091613003 100644 --- a/tests/ui/mir/issue-75419-validation-impl-trait.rs +++ b/tests/ui/mir/issue-75419-validation-impl-trait.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // This used to fail MIR validation due to the types on both sides of // an assignment not being equal. diff --git a/tests/ui/mir/issue-76248.rs b/tests/ui/mir/issue-76248.rs index 18473e79e86a5..d8a42e8fe0289 100644 --- a/tests/ui/mir/issue-76248.rs +++ b/tests/ui/mir/issue-76248.rs @@ -2,8 +2,8 @@ // The root cause was a missing fold of length constant in Rvalue::Repeat. // Regression test for #76248. // -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 const N: usize = 1; diff --git a/tests/ui/mir/issue-76375.rs b/tests/ui/mir/issue-76375.rs index e635caca9fdf4..15b1f7fa6b75d 100644 --- a/tests/ui/mir/issue-76375.rs +++ b/tests/ui/mir/issue-76375.rs @@ -1,9 +1,9 @@ // Regression test for issue #76375. // -// edition:2018 -// build-pass -// compile-flags: -Z mir-opt-level=3 -// aux-build:issue_76375_aux.rs +//@ edition:2018 +//@ build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ aux-build:issue_76375_aux.rs #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-76740-copy-propagation.rs b/tests/ui/mir/issue-76740-copy-propagation.rs index 1d4ec11762afd..df315b17200db 100644 --- a/tests/ui/mir/issue-76740-copy-propagation.rs +++ b/tests/ui/mir/issue-76740-copy-propagation.rs @@ -1,6 +1,6 @@ // Regression test for issue #76740. -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #[derive(Copy, Clone)] pub struct V([usize; 4]); diff --git a/tests/ui/mir/issue-76803-branches-not-same.rs b/tests/ui/mir/issue-76803-branches-not-same.rs index a6a5762200548..ef8e3c80db817 100644 --- a/tests/ui/mir/issue-76803-branches-not-same.rs +++ b/tests/ui/mir/issue-76803-branches-not-same.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] pub enum Type { diff --git a/tests/ui/mir/issue-77002.rs b/tests/ui/mir/issue-77002.rs index 0c37346eaf803..bbda9976c1575 100644 --- a/tests/ui/mir/issue-77002.rs +++ b/tests/ui/mir/issue-77002.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=3 -Copt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=3 -Copt-level=0 +//@ run-pass type M = [i64; 2]; diff --git a/tests/ui/mir/issue-77359-simplify-arm-identity.rs b/tests/ui/mir/issue-77359-simplify-arm-identity.rs index e58ba50a9e585..31dd23ffa8356 100644 --- a/tests/ui/mir/issue-77359-simplify-arm-identity.rs +++ b/tests/ui/mir/issue-77359-simplify-arm-identity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/mir/issue-77911.rs b/tests/ui/mir/issue-77911.rs index acf4c20542d72..4a5fdc653301d 100644 --- a/tests/ui/mir/issue-77911.rs +++ b/tests/ui/mir/issue-77911.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass use std::fs::File; use std::io::{BufRead, BufReader}; diff --git a/tests/ui/mir/issue-78496.rs b/tests/ui/mir/issue-78496.rs index a0d1f5a780e0e..74c980002cd9f 100644 --- a/tests/ui/mir/issue-78496.rs +++ b/tests/ui/mir/issue-78496.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=3 -C opt-level=0 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=3 -C opt-level=0 // example from #78496 pub enum E<'a> { diff --git a/tests/ui/mir/issue-80949.rs b/tests/ui/mir/issue-80949.rs index 96b63e93a9ab8..05e8bdc84724a 100644 --- a/tests/ui/mir/issue-80949.rs +++ b/tests/ui/mir/issue-80949.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Trait { type Item; } diff --git a/tests/ui/mir/issue-89485.rs b/tests/ui/mir/issue-89485.rs index cb507eefebbe5..afd05f477e598 100644 --- a/tests/ui/mir/issue-89485.rs +++ b/tests/ui/mir/issue-89485.rs @@ -1,6 +1,6 @@ // Regression test for issue #89485. -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] pub enum Type { diff --git a/tests/ui/mir/issue-91745.rs b/tests/ui/mir/issue-91745.rs index ca3d66b1c8eb7..654c0f6e4b54a 100644 --- a/tests/ui/mir/issue-91745.rs +++ b/tests/ui/mir/issue-91745.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/mir/issue-99852.rs b/tests/ui/mir/issue-99852.rs index 1c675788ee933..59459c672281e 100644 --- a/tests/ui/mir/issue-99852.rs +++ b/tests/ui/mir/issue-99852.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] fn lambda() -> U diff --git a/tests/ui/mir/issue-99866.rs b/tests/ui/mir/issue-99866.rs index d39ae6ebf1da2..ff305ff4962a0 100644 --- a/tests/ui/mir/issue-99866.rs +++ b/tests/ui/mir/issue-99866.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Backend { type DescriptorSetLayout; } diff --git a/tests/ui/mir/issue66339.rs b/tests/ui/mir/issue66339.rs index f25afd5602d34..04c98ae4d7ed6 100644 --- a/tests/ui/mir/issue66339.rs +++ b/tests/ui/mir/issue66339.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass // This used to ICE in const-prop diff --git a/tests/ui/mir/lint/assignment-overlap.rs b/tests/ui/mir/lint/assignment-overlap.rs index 0e4a11467dc8a..806d09cda8510 100644 --- a/tests/ui/mir/lint/assignment-overlap.rs +++ b/tests/ui/mir/lint/assignment-overlap.rs @@ -1,8 +1,8 @@ -// compile-flags: --crate-type=lib -Zlint-mir -Ztreat-err-as-bug -// build-fail -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered `Assign` statement with overlapping memory +//@ compile-flags: --crate-type=lib -Zlint-mir -Ztreat-err-as-bug +//@ build-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered `Assign` statement with overlapping memory #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/call-overlap.rs b/tests/ui/mir/lint/call-overlap.rs index df38e901e7328..eb806378fe544 100644 --- a/tests/ui/mir/lint/call-overlap.rs +++ b/tests/ui/mir/lint/call-overlap.rs @@ -1,8 +1,8 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -// build-fail -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered overlapping memory in `Move` arguments to `Call` +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug +//@ build-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered overlapping memory in `Move` arguments to `Call` #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/no-storage.rs b/tests/ui/mir/lint/no-storage.rs index 246a0b34e5db8..42dd1b963dc17 100644 --- a/tests/ui/mir/lint/no-storage.rs +++ b/tests/ui/mir/lint/no-storage.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zlint-mir --crate-type=lib -Ztreat-err-as-bug -// failure-status: 101 -// dont-check-compiler-stderr -// regex-error-pattern: use of local .*, which has no storage here +//@ compile-flags: -Zlint-mir --crate-type=lib -Ztreat-err-as-bug +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ regex-error-pattern: use of local .*, which has no storage here #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/storage-live.rs b/tests/ui/mir/lint/storage-live.rs index f34a2c7de37f8..5dea1cb3567e2 100644 --- a/tests/ui/mir/lint/storage-live.rs +++ b/tests/ui/mir/lint/storage-live.rs @@ -1,11 +1,11 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -// failure-status: 101 -// error-pattern: broken MIR in -// error-pattern: StorageLive(_1) which already has storage here -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug +//@ failure-status: 101 +//@ error-pattern: broken MIR in +//@ error-pattern: StorageLive(_1) which already has storage here +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(custom_mir, core_intrinsics)] diff --git a/tests/ui/mir/lint/storage-return.rs b/tests/ui/mir/lint/storage-return.rs index 7f5700fc897a8..b6281d4b2a8e6 100644 --- a/tests/ui/mir/lint/storage-return.rs +++ b/tests/ui/mir/lint/storage-return.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: has storage when returning +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: has storage when returning #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/mir-inlining/always-encode-mirs.rs b/tests/ui/mir/mir-inlining/always-encode-mirs.rs index f3731996cf29b..9029ff6499b07 100644 --- a/tests/ui/mir/mir-inlining/always-encode-mirs.rs +++ b/tests/ui/mir/mir-inlining/always-encode-mirs.rs @@ -2,9 +2,9 @@ // Previously we inlined function not eligible for inlining which lead to linking error: // undefined reference to `internal::S' // -// aux-build:internal.rs -// build-pass -// compile-flags: -O +//@ aux-build:internal.rs +//@ build-pass +//@ compile-flags: -O extern crate internal; fn main() { diff --git a/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs b/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs index e36e8bd746d90..60f13b96ee2b8 100644 --- a/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs +++ b/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs @@ -1,8 +1,8 @@ // Checks that we can build a clone shim for array with generic size. // Regression test for issue #79269. // -// build-pass -// compile-flags: -Zmir-opt-level=3 -Zvalidate-mir +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 -Zvalidate-mir #[derive(Clone)] struct Array([T; N]); diff --git a/tests/ui/mir/mir-inlining/auxiliary/internal.rs b/tests/ui/mir/mir-inlining/auxiliary/internal.rs index fa0f9c2da4130..580accabef427 100644 --- a/tests/ui/mir/mir-inlining/auxiliary/internal.rs +++ b/tests/ui/mir/mir-inlining/auxiliary/internal.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zalways-encode-mir +//@ compile-flags: -Zalways-encode-mir static S: usize = 42; diff --git a/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs b/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs index f67b073548167..8d283e27dca2a 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs @@ -1,8 +1,8 @@ // This test verifies that we do not ICE due to MIR inlining in case of normalization failure // in a projection. // -// compile-flags: --crate-type lib -C opt-level=3 -// build-pass +//@ compile-flags: --crate-type lib -C opt-level=3 +//@ build-pass pub trait Trait { type Associated; diff --git a/tests/ui/mir/mir-inlining/ice-issue-45493.rs b/tests/ui/mir/mir-inlining/ice-issue-45493.rs index 04a23212e7b9f..5c7cd834c2bfc 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-45493.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-45493.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 trait Array { type Item; diff --git a/tests/ui/mir/mir-inlining/ice-issue-45885.rs b/tests/ui/mir/mir-inlining/ice-issue-45885.rs index 09b1279ef34e1..7ccafde76b88f 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-45885.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-45885.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub enum Enum { A, diff --git a/tests/ui/mir/mir-inlining/ice-issue-68347.rs b/tests/ui/mir/mir-inlining/ice-issue-68347.rs index 7c135250940dc..7e2c0a9df6f1c 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-68347.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-68347.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub fn main() { let _x: fn() = handle_debug_column; } diff --git a/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs b/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs index ef05ff9ce03b9..e47fe482b3cbe 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 // Previously ICEd because we did not normalize during inlining, // see https://github.com/rust-lang/rust/pull/77306 for more discussion. diff --git a/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs b/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs index cb208401313e9..0b9e37740eaab 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 struct Cursor {} struct TokenTree {} diff --git a/tests/ui/mir/mir-inlining/ice-issue-77564.rs b/tests/ui/mir/mir-inlining/ice-issue-77564.rs index 0d3fbfe5d1a06..fce6d1d174f66 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77564.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77564.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 use std::mem::MaybeUninit; const N: usize = 2; diff --git a/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs b/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs index 8b3cb703dc0de..d8b05950c55de 100644 --- a/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs +++ b/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub trait Foo { fn bar(&self) -> usize { 2 } } diff --git a/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs b/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs index e2620682679b2..2f916701d4631 100644 --- a/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs +++ b/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2 #[inline(never)] pub fn foo(bar: usize) -> usize { diff --git a/tests/ui/mir/mir-typeck-normalize-fn-sig.rs b/tests/ui/mir/mir-typeck-normalize-fn-sig.rs index bdd9321afd7e6..8895ab126bb1c 100644 --- a/tests/ui/mir/mir-typeck-normalize-fn-sig.rs +++ b/tests/ui/mir/mir-typeck-normalize-fn-sig.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // This code was creating an ICE in the MIR type checker. The reason // is that we are reifying a reference to a function (`foo::<'x>`), diff --git a/tests/ui/mir/mir_adt_construction.rs b/tests/ui/mir/mir_adt_construction.rs index 9fb5896de6b20..87b471806af59 100644 --- a/tests/ui/mir/mir_adt_construction.rs +++ b/tests/ui/mir/mir_adt_construction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; #[repr(C)] diff --git a/tests/ui/mir/mir_ascription_coercion.rs b/tests/ui/mir/mir_ascription_coercion.rs index 9e04d60198721..b36a2c385d0f6 100644 --- a/tests/ui/mir/mir_ascription_coercion.rs +++ b/tests/ui/mir/mir_ascription_coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the result of type ascription has adjustments applied #![feature(type_ascription)] diff --git a/tests/ui/mir/mir_assign_eval_order.rs b/tests/ui/mir/mir_assign_eval_order.rs index 799bf7f3a12a8..16572daccde89 100644 --- a/tests/ui/mir/mir_assign_eval_order.rs +++ b/tests/ui/mir/mir_assign_eval_order.rs @@ -1,6 +1,6 @@ // Test evaluation order of assignment expressions is right to left. -// run-pass +//@ run-pass // We would previously not finish evaluating borrow and FRU expressions before // starting on the LHS diff --git a/tests/ui/mir/mir_augmented_assignments.rs b/tests/ui/mir/mir_augmented_assignments.rs index 44454f8f41700..2b7893b318d01 100644 --- a/tests/ui/mir/mir_augmented_assignments.rs +++ b/tests/ui/mir/mir_augmented_assignments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; use std::ops::{ AddAssign, BitAndAssign, BitOrAssign, BitXorAssign, DivAssign, MulAssign, RemAssign, diff --git a/tests/ui/mir/mir_autoderef.rs b/tests/ui/mir/mir_autoderef.rs index a0e615a7387f7..95800c68ec243 100644 --- a/tests/ui/mir/mir_autoderef.rs +++ b/tests/ui/mir/mir_autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Deref, DerefMut}; pub struct MyRef(u32); diff --git a/tests/ui/mir/mir_build_match_comparisons.rs b/tests/ui/mir/mir_build_match_comparisons.rs index 04570055763a9..a06b9efa4fcf7 100644 --- a/tests/ui/mir/mir_build_match_comparisons.rs +++ b/tests/ui/mir/mir_build_match_comparisons.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn test1(x: i8) -> i32 { match x { diff --git a/tests/ui/mir/mir_call_with_associated_type.rs b/tests/ui/mir/mir_call_with_associated_type.rs index 7103533e1da90..d88f4d504b72a 100644 --- a/tests/ui/mir/mir_call_with_associated_type.rs +++ b/tests/ui/mir/mir_call_with_associated_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { type Type; } diff --git a/tests/ui/mir/mir_calls_to_shims.rs b/tests/ui/mir/mir_calls_to_shims.rs index 9dc0acfbfda48..7a5b2182e26d8 100644 --- a/tests/ui/mir/mir_calls_to_shims.rs +++ b/tests/ui/mir/mir_calls_to_shims.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(fn_traits)] #![feature(never_type)] diff --git a/tests/ui/mir/mir_cast_fn_ret.rs b/tests/ui/mir/mir_cast_fn_ret.rs index 4574dbd8529aa..eebc6c03f4481 100644 --- a/tests/ui/mir/mir_cast_fn_ret.rs +++ b/tests/ui/mir/mir_cast_fn_ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(improper_ctypes_definitions)] pub extern "C" fn tuple2() -> (u16, u8) { (1, 2) diff --git a/tests/ui/mir/mir_codegen_array.rs b/tests/ui/mir/mir_codegen_array.rs index 38e443d8e39f3..a6a56810e4508 100644 --- a/tests/ui/mir/mir_codegen_array.rs +++ b/tests/ui/mir/mir_codegen_array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] fn into_inner() -> [u64; 1024] { let mut x = 10 + 20; diff --git a/tests/ui/mir/mir_codegen_array_2.rs b/tests/ui/mir/mir_codegen_array_2.rs index 03d3aa5ade631..7385029ba45f7 100644 --- a/tests/ui/mir/mir_codegen_array_2.rs +++ b/tests/ui/mir/mir_codegen_array_2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn into_inner(x: u64) -> [u64; 1024] { [x; 2*4*8*16] } diff --git a/tests/ui/mir/mir_codegen_call_converging.rs b/tests/ui/mir/mir_codegen_call_converging.rs index 9c340e4e03668..07d3b86e4a530 100644 --- a/tests/ui/mir/mir_codegen_call_converging.rs +++ b/tests/ui/mir/mir_codegen_call_converging.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn converging_fn() -> u64 { 43 } diff --git a/tests/ui/mir/mir_codegen_calls.rs b/tests/ui/mir/mir_codegen_calls.rs index 6a5a4dace6492..b0749f565da08 100644 --- a/tests/ui/mir/mir_codegen_calls.rs +++ b/tests/ui/mir/mir_codegen_calls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, test)] extern crate test; diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops.rs b/tests/ui/mir/mir_codegen_calls_converging_drops.rs index b562f93081419..5c3c8b999b2de 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:converging_fn called -// error-pattern:0 dropped -// error-pattern:exit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:converging_fn called +//@ error-pattern:0 dropped +//@ error-pattern:exit +//@ ignore-emscripten no processes struct Droppable(u8); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs index e9446da9e3911..e3cb9a96de0da 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:complex called -// error-pattern:dropped -// error-pattern:exit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:complex called +//@ error-pattern:dropped +//@ error-pattern:exit +//@ ignore-emscripten no processes struct Droppable; impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_diverging.rs b/tests/ui/mir/mir_codegen_calls_diverging.rs index 736d580e2da18..c62527f01d38c 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:diverging_fn called -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:diverging_fn called +//@ ignore-emscripten no processes fn diverging_fn() -> ! { panic!("diverging_fn called") diff --git a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs index 19dba497001cc..b0675a6a5a0c4 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:diverging_fn called -// error-pattern:0 dropped -// needs-unwind this test checks that a destructor is called after panicking +//@ run-fail +//@ error-pattern:diverging_fn called +//@ error-pattern:0 dropped +//@ needs-unwind this test checks that a destructor is called after panicking struct Droppable(u8); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_critical_edge.rs b/tests/ui/mir/mir_codegen_critical_edge.rs index 5c1f1c3b70135..23421545c0e68 100644 --- a/tests/ui/mir/mir_codegen_critical_edge.rs +++ b/tests/ui/mir/mir_codegen_critical_edge.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This code produces a CFG with critical edges that, if we don't // handle properly, will cause invalid codegen. diff --git a/tests/ui/mir/mir_codegen_spike1.rs b/tests/ui/mir/mir_codegen_spike1.rs index 90bdd6b4bd71c..122397766b657 100644 --- a/tests/ui/mir/mir_codegen_spike1.rs +++ b/tests/ui/mir/mir_codegen_spike1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A simple spike test for MIR version of codegen. fn sum(x: i32, y: i32) -> i32 { diff --git a/tests/ui/mir/mir_codegen_ssa.rs b/tests/ui/mir/mir_codegen_ssa.rs index 5e2f10cefe92b..bf01edcbaa844 100644 --- a/tests/ui/mir/mir_codegen_ssa.rs +++ b/tests/ui/mir/mir_codegen_ssa.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![feature(custom_mir, core_intrinsics)] use std::intrinsics::mir::*; diff --git a/tests/ui/mir/mir_codegen_switch.rs b/tests/ui/mir/mir_codegen_switch.rs index afdcd36f4bc3e..90312268f2683 100644 --- a/tests/ui/mir/mir_codegen_switch.rs +++ b/tests/ui/mir/mir_codegen_switch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Abc { A(#[allow(dead_code)] u8), B(#[allow(dead_code)] i8), diff --git a/tests/ui/mir/mir_codegen_switchint.rs b/tests/ui/mir/mir_codegen_switchint.rs index c092a6c31b2d1..db0d05f637132 100644 --- a/tests/ui/mir/mir_codegen_switchint.rs +++ b/tests/ui/mir/mir_codegen_switchint.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn foo(x: i8) -> i32 { match x { 1 => 0, diff --git a/tests/ui/mir/mir_coercion_casts.rs b/tests/ui/mir/mir_coercion_casts.rs index 7d761181d8080..bfb47d9cfa365 100644 --- a/tests/ui/mir/mir_coercion_casts.rs +++ b/tests/ui/mir/mir_coercion_casts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests the coercion casts are handled properly fn main() { diff --git a/tests/ui/mir/mir_coercions.rs b/tests/ui/mir/mir_coercions.rs index f3dcc6b85fd98..11230c3fbb7ee 100644 --- a/tests/ui/mir/mir_coercions.rs +++ b/tests/ui/mir/mir_coercions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coerce_unsized, unsize)] use std::ops::CoerceUnsized; diff --git a/tests/ui/mir/mir_const_prop_identity.rs b/tests/ui/mir/mir_const_prop_identity.rs index 25d2202b909d9..acc09caa4f7a9 100644 --- a/tests/ui/mir/mir_const_prop_identity.rs +++ b/tests/ui/mir/mir_const_prop_identity.rs @@ -1,7 +1,7 @@ // Regression test for issue #91725. // -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 fn main() { let a = true; diff --git a/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs b/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs index b66a85d07d3b9..4a22b3cfd23b6 100644 --- a/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs +++ b/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass #![crate_type="lib"] // This used to ICE: const-prop did not account for field reordering of scalar pairs, diff --git a/tests/ui/mir/mir_constval_adts.rs b/tests/ui/mir/mir_constval_adts.rs index ee9d73451f45f..4c7d72d319dab 100644 --- a/tests/ui/mir/mir_constval_adts.rs +++ b/tests/ui/mir/mir_constval_adts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { _x: i32, diff --git a/tests/ui/mir/mir_detects_invalid_ops.rs b/tests/ui/mir/mir_detects_invalid_ops.rs index 136c03cd9f1bc..fd156562b49c6 100644 --- a/tests/ui/mir/mir_detects_invalid_ops.rs +++ b/tests/ui/mir/mir_detects_invalid_ops.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { divide_by_zero(); diff --git a/tests/ui/mir/mir_drop_order.rs b/tests/ui/mir/mir_drop_order.rs index 75f5b171af352..21d1054c4222d 100644 --- a/tests/ui/mir/mir_drop_order.rs +++ b/tests/ui/mir/mir_drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::cell::RefCell; use std::panic; diff --git a/tests/ui/mir/mir_drop_panics.rs b/tests/ui/mir/mir_drop_panics.rs index 0d00426d6d2d5..ec846fc241b2a 100644 --- a/tests/ui/mir/mir_drop_panics.rs +++ b/tests/ui/mir/mir_drop_panics.rs @@ -1,7 +1,7 @@ -// run-fail -// needs-unwind -// error-pattern:panic 1 -// error-pattern:drop 2 +//@ run-fail +//@ needs-unwind +//@ error-pattern:panic 1 +//@ error-pattern:drop 2 struct Droppable(u32); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_dynamic_drops_1.rs b/tests/ui/mir/mir_dynamic_drops_1.rs index 2b33b616600be..ffb8cc26100e8 100644 --- a/tests/ui/mir/mir_dynamic_drops_1.rs +++ b/tests/ui/mir/mir_dynamic_drops_1.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:drop 1 -// error-pattern:drop 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:drop 1 +//@ error-pattern:drop 2 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_2.rs b/tests/ui/mir/mir_dynamic_drops_2.rs index c883efdabc3f6..dc71f414673de 100644 --- a/tests/ui/mir/mir_dynamic_drops_2.rs +++ b/tests/ui/mir/mir_dynamic_drops_2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:drop 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:drop 1 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_3.rs b/tests/ui/mir/mir_dynamic_drops_3.rs index 2bcd9fac55cd5..fe84502ef1dc1 100644 --- a/tests/ui/mir/mir_dynamic_drops_3.rs +++ b/tests/ui/mir/mir_dynamic_drops_3.rs @@ -1,10 +1,10 @@ -// run-fail -// needs-unwind -// error-pattern:unwind happens -// error-pattern:drop 3 -// error-pattern:drop 2 -// error-pattern:drop 1 -// ignore-emscripten no processes +//@ run-fail +//@ needs-unwind +//@ error-pattern:unwind happens +//@ error-pattern:drop 3 +//@ error-pattern:drop 2 +//@ error-pattern:drop 1 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_early_return_scope.rs b/tests/ui/mir/mir_early_return_scope.rs index a696471c36150..6dc3f8bc39bbe 100644 --- a/tests/ui/mir/mir_early_return_scope.rs +++ b/tests/ui/mir/mir_early_return_scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] static mut DROP: bool = false; diff --git a/tests/ui/mir/mir_fat_ptr.rs b/tests/ui/mir/mir_fat_ptr.rs index 0c07fba6e945b..f2dd9e6fe4064 100644 --- a/tests/ui/mir/mir_fat_ptr.rs +++ b/tests/ui/mir/mir_fat_ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test that ordinary fat pointer operations work. struct Wrapper(#[allow(dead_code)] u32, T); diff --git a/tests/ui/mir/mir_fat_ptr_drop.rs b/tests/ui/mir/mir_fat_ptr_drop.rs index d865c3499b270..ff6a0d70881f3 100644 --- a/tests/ui/mir/mir_fat_ptr_drop.rs +++ b/tests/ui/mir/mir_fat_ptr_drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/mir/mir_heavy_promoted.rs b/tests/ui/mir/mir_heavy_promoted.rs index 092299880e2dc..dd65f4f62a016 100644 --- a/tests/ui/mir/mir_heavy_promoted.rs +++ b/tests/ui/mir/mir_heavy_promoted.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten apparently only works in optimized mode +//@ run-pass +//@ ignore-emscripten apparently only works in optimized mode const TEST_DATA: [u8; 32 * 1024 * 1024] = [42; 32 * 1024 * 1024]; diff --git a/tests/ui/mir/mir_indexing_oob_1.rs b/tests/ui/mir/mir_indexing_oob_1.rs index 6d769b6b23a84..3afc2f0b32e62 100644 --- a/tests/ui/mir/mir_indexing_oob_1.rs +++ b/tests/ui/mir/mir_indexing_oob_1.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: [u32; 5] = [0; 5]; diff --git a/tests/ui/mir/mir_indexing_oob_2.rs b/tests/ui/mir/mir_indexing_oob_2.rs index a9e8505701536..6e7c1c83536f4 100644 --- a/tests/ui/mir/mir_indexing_oob_2.rs +++ b/tests/ui/mir/mir_indexing_oob_2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_indexing_oob_3.rs b/tests/ui/mir/mir_indexing_oob_3.rs index 4f5cab59bfc67..4012864c6ce63 100644 --- a/tests/ui/mir/mir_indexing_oob_3.rs +++ b/tests/ui/mir/mir_indexing_oob_3.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_let_chains_drop_order.rs b/tests/ui/mir/mir_let_chains_drop_order.rs index 6471553e93fd1..5cbfdf2e35a74 100644 --- a/tests/ui/mir/mir_let_chains_drop_order.rs +++ b/tests/ui/mir/mir_let_chains_drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // See `mir_drop_order.rs` for more information diff --git a/tests/ui/mir/mir_match_arm_guard.rs b/tests/ui/mir/mir_match_arm_guard.rs index 65e4ed041bb42..76531f0ee216a 100644 --- a/tests/ui/mir/mir_match_arm_guard.rs +++ b/tests/ui/mir/mir_match_arm_guard.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #30527 - We were not generating arms with guards in certain cases. fn match_with_guard(x: Option) -> i8 { diff --git a/tests/ui/mir/mir_match_test.rs b/tests/ui/mir/mir_match_test.rs index d41a7f4a1db4a..925e1e6ab3d47 100644 --- a/tests/ui/mir/mir_match_test.rs +++ b/tests/ui/mir/mir_match_test.rs @@ -1,7 +1,7 @@ #![feature(exclusive_range_pattern)] #![allow(overlapping_range_endpoints)] -// run-pass +//@ run-pass fn main() { let incl_range = |x, b| { diff --git a/tests/ui/mir/mir_misc_casts.rs b/tests/ui/mir/mir_misc_casts.rs index 2e7fbeee5da65..35f217fceba6d 100644 --- a/tests/ui/mir/mir_misc_casts.rs +++ b/tests/ui/mir/mir_misc_casts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn func(){} const STR: &'static str = "hello"; diff --git a/tests/ui/mir/mir_overflow_off.rs b/tests/ui/mir/mir_overflow_off.rs index 0098584dd261c..8210dd0246297 100644 --- a/tests/ui/mir/mir_overflow_off.rs +++ b/tests/ui/mir/mir_overflow_off.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow-checks=off +//@ run-pass +//@ compile-flags: -C overflow-checks=off // Test that with MIR codegen, overflow checks can be // turned off, even when they're from core::ops::*. diff --git a/tests/ui/mir/mir_query_cycle.rs b/tests/ui/mir/mir_query_cycle.rs index 22d1ccb6c6e06..2ad4e6a39a23b 100644 --- a/tests/ui/mir/mir_query_cycle.rs +++ b/tests/ui/mir/mir_query_cycle.rs @@ -1,7 +1,7 @@ // Regression test for #121094. -// build-pass -// compile-flags: -O --crate-type=lib -// edition: 2021 +//@ build-pass +//@ compile-flags: -O --crate-type=lib +//@ edition: 2021 use std::{future::Future, pin::Pin}; pub async fn foo(count: u32) { diff --git a/tests/ui/mir/mir_raw_fat_ptr.rs b/tests/ui/mir/mir_raw_fat_ptr.rs index e141aa03aa985..a5a48587e3bbe 100644 --- a/tests/ui/mir/mir_raw_fat_ptr.rs +++ b/tests/ui/mir/mir_raw_fat_ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check raw fat pointer ops in mir // FIXME: please improve this when we get monomorphization support diff --git a/tests/ui/mir/mir_refs_correct.rs b/tests/ui/mir/mir_refs_correct.rs index c5b57f52743af..fc23c8c3631eb 100644 --- a/tests/ui/mir/mir_refs_correct.rs +++ b/tests/ui/mir/mir_refs_correct.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:mir_external_refs.rs +//@ run-pass +//@ aux-build:mir_external_refs.rs extern crate mir_external_refs as ext; diff --git a/tests/ui/mir/mir_small_agg_arg.rs b/tests/ui/mir/mir_small_agg_arg.rs index 5a22a0420c511..a21c2076e174e 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 +//@ run-pass #![allow(unused_variables)] fn foo((x, y): (i8, i8)) { } diff --git a/tests/ui/mir/mir_static_subtype.rs b/tests/ui/mir/mir_static_subtype.rs index d471b8f149d8a..ddddd65ee6b60 100644 --- a/tests/ui/mir/mir_static_subtype.rs +++ b/tests/ui/mir/mir_static_subtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that subtyping the body of a static doesn't cause an ICE. fn foo(_ : &()) {} diff --git a/tests/ui/mir/mir_struct_with_assoc_ty.rs b/tests/ui/mir/mir_struct_with_assoc_ty.rs index 26d026bdfdd60..54c31f1efc503 100644 --- a/tests/ui/mir/mir_struct_with_assoc_ty.rs +++ b/tests/ui/mir/mir_struct_with_assoc_ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; pub trait DataBind { diff --git a/tests/ui/mir/mir_temp_promotions.rs b/tests/ui/mir/mir_temp_promotions.rs index 845dc4c0444f1..cf13d70216a5b 100644 --- a/tests/ui/mir/mir_temp_promotions.rs +++ b/tests/ui/mir/mir_temp_promotions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1(f: f32) -> bool { // test that we properly promote temporaries to allocas when a temporary is assigned to // multiple times (assignment is still happening once ∀ possible dataflows). diff --git a/tests/ui/mir/mir_void_return.rs b/tests/ui/mir/mir_void_return.rs index d257affc26815..5f53803d4464e 100644 --- a/tests/ui/mir/mir_void_return.rs +++ b/tests/ui/mir/mir_void_return.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mir() -> (){ let x = 1; let mut y = 0; diff --git a/tests/ui/mir/mir_void_return_2.rs b/tests/ui/mir/mir_void_return_2.rs index a1fb0a7db17d9..1e4092070f305 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 +//@ run-pass fn nil() {} fn mir(){ diff --git a/tests/ui/mir/remove-zsts-query-cycle.rs b/tests/ui/mir/remove-zsts-query-cycle.rs index bcaf8468857fc..a04e5001f3cd6 100644 --- a/tests/ui/mir/remove-zsts-query-cycle.rs +++ b/tests/ui/mir/remove-zsts-query-cycle.rs @@ -1,9 +1,9 @@ // Regression test for #88972. Used to cause a query cycle: // optimized mir -> remove zsts -> layout of a coroutine -> optimized mir. // -// edition:2018 -// compile-flags: --crate-type=lib -Zinline-mir=yes -// build-pass +//@ edition:2018 +//@ compile-flags: --crate-type=lib -Zinline-mir=yes +//@ build-pass pub async fn listen() -> Result<(), std::io::Error> { let f = do_async(); diff --git a/tests/ui/mir/simplify-branch-same.rs b/tests/ui/mir/simplify-branch-same.rs index d631c33d61f84..d30f4775c72cc 100644 --- a/tests/ui/mir/simplify-branch-same.rs +++ b/tests/ui/mir/simplify-branch-same.rs @@ -1,5 +1,5 @@ // Regression test for SimplifyBranchSame miscompilation. -// run-pass +//@ run-pass macro_rules! m { ($a:expr, $b:expr, $c:block) => { diff --git a/tests/ui/mir/ssa-analysis-regression-50041.rs b/tests/ui/mir/ssa-analysis-regression-50041.rs index 534f1c465bb87..82654c8c0b55c 100644 --- a/tests/ui/mir/ssa-analysis-regression-50041.rs +++ b/tests/ui/mir/ssa-analysis-regression-50041.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Z mir-opt-level=4 +//@ build-pass +//@ compile-flags: -Z mir-opt-level=4 #![crate_type = "lib"] #![feature(lang_items)] diff --git a/tests/ui/mir/ssa_call_ret.rs b/tests/ui/mir/ssa_call_ret.rs index f8a83249225c2..9b2c78c737f1a 100644 --- a/tests/ui/mir/ssa_call_ret.rs +++ b/tests/ui/mir/ssa_call_ret.rs @@ -1,10 +1,10 @@ // Regression test for issue #117331, where variable `a` was misidentified as // being in SSA form (the definition occurs on the return edge only). // -// edition:2021 -// compile-flags: --crate-type=lib -// build-pass -// needs-unwind +//@ edition:2021 +//@ compile-flags: --crate-type=lib +//@ build-pass +//@ needs-unwind #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/ui/mir/thir-constparam-temp.rs b/tests/ui/mir/thir-constparam-temp.rs index 7eedc325d60f6..4ef73f35f8768 100644 --- a/tests/ui/mir/thir-constparam-temp.rs +++ b/tests/ui/mir/thir-constparam-temp.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/mir/unsize-trait.rs b/tests/ui/mir/unsize-trait.rs index 45b5308c0938f..7d4d7103a46dc 100644 --- a/tests/ui/mir/unsize-trait.rs +++ b/tests/ui/mir/unsize-trait.rs @@ -1,6 +1,6 @@ // Check that the interpreter does not ICE when trying to unsize `B` to `[u8]`. // This is a `build` test to ensure that const-prop-lint runs. -// build-pass +//@ build-pass #![feature(unsize)] diff --git a/tests/ui/mir/validate/critical-edge.rs b/tests/ui/mir/validate/critical-edge.rs index 3bb732ad3f776..0a548ae8e5841 100644 --- a/tests/ui/mir/validate/critical-edge.rs +++ b/tests/ui/mir/validate/critical-edge.rs @@ -1,11 +1,11 @@ // Optimized MIR shouldn't have critical call edges // -// build-fail -// edition: 2021 -// compile-flags: --crate-type=lib -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered critical edge in `Call` terminator +//@ build-fail +//@ edition: 2021 +//@ compile-flags: --crate-type=lib +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered critical edge in `Call` terminator #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/error-body.rs b/tests/ui/mir/validate/error-body.rs index 5b2fbb0b04699..e77867ddfd421 100644 --- a/tests/ui/mir/validate/error-body.rs +++ b/tests/ui/mir/validate/error-body.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zvalidate-mir +//@ compile-flags: -Zvalidate-mir fn _test() { let x = || 45; diff --git a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs index cd6c5bf271935..44b7fae351cd2 100644 --- a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs +++ b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir fn foo(_a: &str) {} diff --git a/tests/ui/mir/validate/needs-reveal-all.rs b/tests/ui/mir/validate/needs-reveal-all.rs index 3852daf245eb0..be2f5dd322fb6 100644 --- a/tests/ui/mir/validate/needs-reveal-all.rs +++ b/tests/ui/mir/validate/needs-reveal-all.rs @@ -5,8 +5,8 @@ // We're using these flags to run the `RevealAll` pass while making it less likely to // accidentally removing the assignment from `Foo` to `Foo`. -// compile-flags: -Zinline_mir=yes -Zmir-opt-level=0 -Zvalidate-mir -// run-pass +//@ compile-flags: -Zinline_mir=yes -Zmir-opt-level=0 -Zvalidate-mir +//@ run-pass use std::hint::black_box; diff --git a/tests/ui/mir/validate/noncleanup-cleanup.rs b/tests/ui/mir/validate/noncleanup-cleanup.rs index a14ab44257fa1..744e71e99b104 100644 --- a/tests/ui/mir/validate/noncleanup-cleanup.rs +++ b/tests/ui/mir/validate/noncleanup-cleanup.rs @@ -1,8 +1,8 @@ // Check that validation rejects cleanup edge to a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: cleanuppad mismatch +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: cleanuppad mismatch #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/noncleanup-resume.rs b/tests/ui/mir/validate/noncleanup-resume.rs index e80d09bc90a59..5bf6b03c9e94a 100644 --- a/tests/ui/mir/validate/noncleanup-resume.rs +++ b/tests/ui/mir/validate/noncleanup-resume.rs @@ -1,8 +1,8 @@ // Check that validation rejects resume terminator in a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: resume on non-cleanup block +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: resume on non-cleanup block #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/noncleanup-terminate.rs b/tests/ui/mir/validate/noncleanup-terminate.rs index 2a74668370d4c..b5bf2604cce6b 100644 --- a/tests/ui/mir/validate/noncleanup-terminate.rs +++ b/tests/ui/mir/validate/noncleanup-terminate.rs @@ -1,8 +1,8 @@ // Check that validation rejects terminate terminator in a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: terminate on non-cleanup block +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: terminate on non-cleanup block #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/transmute_cast_sized.rs b/tests/ui/mir/validate/transmute_cast_sized.rs index eaaf7eb3ecd09..23031bdc5d26a 100644 --- a/tests/ui/mir/validate/transmute_cast_sized.rs +++ b/tests/ui/mir/validate/transmute_cast_sized.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -Zvalidate-mir -// edition: 2021 +//@ build-pass +//@ compile-flags: -Zvalidate-mir +//@ edition: 2021 #![crate_type = "lib"] diff --git a/tests/ui/mismatched_types/async-unwrap-suggestion.rs b/tests/ui/mismatched_types/async-unwrap-suggestion.rs index 9698cc29ffd4a..67d431a5ca235 100644 --- a/tests/ui/mismatched_types/async-unwrap-suggestion.rs +++ b/tests/ui/mismatched_types/async-unwrap-suggestion.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn dont_suggest() -> i32 { if false { diff --git a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed index efba0543b483e..7d11fab85b3f5 100644 --- a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed @@ -5,7 +5,7 @@ // saying that the type of `b` must be known, which was not very // helpful. -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs index 3ddb93d12f7d8..2f81f0a2851d0 100644 --- a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs @@ -5,7 +5,7 @@ // saying that the type of `b` must be known, which was not very // helpful. -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed index 6315fcca2b8b0..e6e3e1551e959 100644 --- a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs index c12c5362efcfe..64e815606d427 100644 --- a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = (-10..=10).find(|x: i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments diff --git a/tests/ui/mismatched_types/closure-ref-114180.rs b/tests/ui/mismatched_types/closure-ref-114180.rs index d84bdbedaf650..cdbbdd1bf441a 100644 --- a/tests/ui/mismatched_types/closure-ref-114180.rs +++ b/tests/ui/mismatched_types/closure-ref-114180.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { let mut v = vec![(1,)]; diff --git a/tests/ui/mismatched_types/dont-point-return-on-E0308.rs b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs index f2ba610e2d1f6..dca917e3ba1e8 100644 --- a/tests/ui/mismatched_types/dont-point-return-on-E0308.rs +++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn f(_: &()) {} //~^ NOTE function defined here diff --git a/tests/ui/mismatched_types/issue-106182.fixed b/tests/ui/mismatched_types/issue-106182.fixed index b8ddebf6fb639..8316ab28b8b76 100644 --- a/tests/ui/mismatched_types/issue-106182.fixed +++ b/tests/ui/mismatched_types/issue-106182.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct _S(u32, Vec); diff --git a/tests/ui/mismatched_types/issue-106182.rs b/tests/ui/mismatched_types/issue-106182.rs index 6eb6df13a028c..30cce11a5c81c 100644 --- a/tests/ui/mismatched_types/issue-106182.rs +++ b/tests/ui/mismatched_types/issue-106182.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct _S(u32, Vec); diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed index 15d4e393874eb..07caf832b252f 100644 --- a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed +++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] #[derive(Clone, Copy)] diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs index 8e811caa3bdce..6a8729e93c715 100644 --- a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs +++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] #[derive(Clone, Copy)] diff --git a/tests/ui/mismatched_types/issue-38371.fixed b/tests/ui/mismatched_types/issue-38371.fixed index 0e20835bef05f..0bc04b4bb8128 100644 --- a/tests/ui/mismatched_types/issue-38371.fixed +++ b/tests/ui/mismatched_types/issue-38371.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // see also issue-38371-unfixable.rs #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/issue-38371.rs b/tests/ui/mismatched_types/issue-38371.rs index fb9e4c173e7a8..cd320fd61f262 100644 --- a/tests/ui/mismatched_types/issue-38371.rs +++ b/tests/ui/mismatched_types/issue-38371.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // see also issue-38371-unfixable.rs #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed index e1f929e61703c..52b59cef9f030 100644 --- a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed +++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code)] #![allow(unused_variables)] use std::future::Future; diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs index 956936c925ba0..62b2eefa46aff 100644 --- a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs +++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code)] #![allow(unused_variables)] use std::future::Future; diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed index f3f560fe530ab..51f73551d187e 100644 --- a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed +++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] fn func() -> Option { diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs index 14020e872ff02..1810dc2f86f1b 100644 --- a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs +++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] fn func() -> Option { diff --git a/tests/ui/mismatched_types/ref-pat-suggestions.fixed b/tests/ui/mismatched_types/ref-pat-suggestions.fixed index d50acd1ac62d2..fea048eb3885c 100644 --- a/tests/ui/mismatched_types/ref-pat-suggestions.fixed +++ b/tests/ui/mismatched_types/ref-pat-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn _f0(_a: &u32) {} //~ ERROR mismatched types fn _f1(_a: &mut u32) {} //~ ERROR mismatched types diff --git a/tests/ui/mismatched_types/ref-pat-suggestions.rs b/tests/ui/mismatched_types/ref-pat-suggestions.rs index 1a77f68769224..4195bad342772 100644 --- a/tests/ui/mismatched_types/ref-pat-suggestions.rs +++ b/tests/ui/mismatched_types/ref-pat-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn _f0(&_a: u32) {} //~ ERROR mismatched types fn _f1(&mut _a: u32) {} //~ ERROR mismatched types diff --git a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed index 56f93cfbfdcbe..cf923362ad818 100644 --- a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] fn main() { diff --git a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs index 0c33f99a42e8b..dc556f6576aea 100644 --- a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] fn main() { diff --git a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed index f30feaed05574..e157826590973 100644 --- a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs index 2bd8146e289d9..fb920f3f94439 100644 --- a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed index b8eeb3d5cae00..2a69461d37880 100644 --- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! my_wrapper { ($expr:expr) => { MyWrapper($expr) } diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs index 54a13c67350dd..7af59f530e4bd 100644 --- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! my_wrapper { ($expr:expr) => { MyWrapper($expr) } diff --git a/tests/ui/missing-trait-bounds/issue-35677.fixed b/tests/ui/missing-trait-bounds/issue-35677.fixed index 08174d8d8d53a..6be68bb26df15 100644 --- a/tests/ui/missing-trait-bounds/issue-35677.fixed +++ b/tests/ui/missing-trait-bounds/issue-35677.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::collections::HashSet; use std::hash::Hash; diff --git a/tests/ui/missing-trait-bounds/issue-35677.rs b/tests/ui/missing-trait-bounds/issue-35677.rs index 2cb394386b8aa..e2d13bbe2f6fb 100644 --- a/tests/ui/missing-trait-bounds/issue-35677.rs +++ b/tests/ui/missing-trait-bounds/issue-35677.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::collections::HashSet; use std::hash::Hash; diff --git a/tests/ui/missing-trait-bounds/issue-69725.fixed b/tests/ui/missing-trait-bounds/issue-69725.fixed index d57badcfd8cf8..f23468abcb0a4 100644 --- a/tests/ui/missing-trait-bounds/issue-69725.fixed +++ b/tests/ui/missing-trait-bounds/issue-69725.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:issue-69725.rs +//@ run-rustfix +//@ aux-build:issue-69725.rs #![allow(dead_code)] extern crate issue_69725; diff --git a/tests/ui/missing-trait-bounds/issue-69725.rs b/tests/ui/missing-trait-bounds/issue-69725.rs index 9c88969c5cff8..a51d2540b4ccc 100644 --- a/tests/ui/missing-trait-bounds/issue-69725.rs +++ b/tests/ui/missing-trait-bounds/issue-69725.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:issue-69725.rs +//@ run-rustfix +//@ aux-build:issue-69725.rs #![allow(dead_code)] extern crate issue_69725; diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed index 6b24375e41503..c6c22a4db8b69 100644 --- a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed +++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(s: &[T], t: &[T]) { let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs index df47be070c9ea..06d60cbeae65f 100644 --- a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs +++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(s: &[T], t: &[T]) { let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` diff --git a/tests/ui/missing/missing-allocator.rs b/tests/ui/missing/missing-allocator.rs index 2dc509f2c632d..3a65e657d0bc4 100644 --- a/tests/ui/missing/missing-allocator.rs +++ b/tests/ui/missing/missing-allocator.rs @@ -1,5 +1,5 @@ -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #![no_std] #![crate_type = "staticlib"] diff --git a/tests/ui/missing/missing-comma-in-match.fixed b/tests/ui/missing/missing-comma-in-match.fixed index f091082f35f76..fe8539d3a5ae7 100644 --- a/tests/ui/missing/missing-comma-in-match.fixed +++ b/tests/ui/missing/missing-comma-in-match.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match &Some(3) { diff --git a/tests/ui/missing/missing-comma-in-match.rs b/tests/ui/missing/missing-comma-in-match.rs index 54dab4e9750d6..e14e22d51609b 100644 --- a/tests/ui/missing/missing-comma-in-match.rs +++ b/tests/ui/missing/missing-comma-in-match.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match &Some(3) { diff --git a/tests/ui/missing/missing-items/m2.rs b/tests/ui/missing/missing-items/m2.rs index c2a6914abc9ec..2f43e97800600 100644 --- a/tests/ui/missing/missing-items/m2.rs +++ b/tests/ui/missing/missing-items/m2.rs @@ -1,4 +1,4 @@ -// aux-build:m1.rs +//@ aux-build:m1.rs extern crate m1; diff --git a/tests/ui/missing/missing-macro-use.rs b/tests/ui/missing/missing-macro-use.rs index d494c4471a31c..a761c9a5ffd27 100644 --- a/tests/ui/missing/missing-macro-use.rs +++ b/tests/ui/missing/missing-macro-use.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/missing/missing-main.rs b/tests/ui/missing/missing-main.rs index 6ad54453309e0..3cafca09afb38 100644 --- a/tests/ui/missing/missing-main.rs +++ b/tests/ui/missing/missing-main.rs @@ -1,2 +1,2 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found fn mian() { } diff --git a/tests/ui/missing/missing-return.rs b/tests/ui/missing/missing-return.rs index 6a171753d9e2f..defd8a3bb78aa 100644 --- a/tests/ui/missing/missing-return.rs +++ b/tests/ui/missing/missing-return.rs @@ -1,4 +1,4 @@ -// error-pattern: return +//@ error-pattern: return fn f() -> isize { } diff --git a/tests/ui/missing_debug_impls.rs b/tests/ui/missing_debug_impls.rs index ccad861c03719..3abc0706887b7 100644 --- a/tests/ui/missing_debug_impls.rs +++ b/tests/ui/missing_debug_impls.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![deny(missing_debug_implementations)] #![allow(unused)] diff --git a/tests/ui/missing_non_modrs_mod/foo.rs b/tests/ui/missing_non_modrs_mod/foo.rs index 4f41316c8f783..dd3e970b8c6e9 100644 --- a/tests/ui/missing_non_modrs_mod/foo.rs +++ b/tests/ui/missing_non_modrs_mod/foo.rs @@ -1,4 +1,4 @@ // -// ignore-test this is just a helper for the real test in this dir +//@ ignore-test this is just a helper for the real test in this dir mod missing; diff --git a/tests/ui/missing_non_modrs_mod/foo_inline.rs b/tests/ui/missing_non_modrs_mod/foo_inline.rs index df60629eca161..9d46e9bdd0c36 100644 --- a/tests/ui/missing_non_modrs_mod/foo_inline.rs +++ b/tests/ui/missing_non_modrs_mod/foo_inline.rs @@ -1,4 +1,4 @@ -// ignore-test this is just a helper for the real test in this dir +//@ ignore-test this is just a helper for the real test in this dir mod inline { mod missing; diff --git a/tests/ui/modules/issue-107649.rs b/tests/ui/modules/issue-107649.rs index 71b84cd30d6ff..af5758d798588 100644 --- a/tests/ui/modules/issue-107649.rs +++ b/tests/ui/modules/issue-107649.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no #[path = "auxiliary/dummy_lib.rs"] mod lib; diff --git a/tests/ui/modules/issue-56411-aux.rs b/tests/ui/modules/issue-56411-aux.rs index c8e5a059810a3..60ffc479ada4b 100644 --- a/tests/ui/modules/issue-56411-aux.rs +++ b/tests/ui/modules/issue-56411-aux.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct T {} diff --git a/tests/ui/modules/mod-inside-fn.rs b/tests/ui/modules/mod-inside-fn.rs index 93050c8919a91..645d47cee64a7 100644 --- a/tests/ui/modules/mod-inside-fn.rs +++ b/tests/ui/modules/mod-inside-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { mod m { diff --git a/tests/ui/modules/mod-view-items.rs b/tests/ui/modules/mod-view-items.rs index db2b303668b7e..462071b7b126e 100644 --- a/tests/ui/modules/mod-view-items.rs +++ b/tests/ui/modules/mod-view-items.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test view items inside non-file-level mods // This is a regression test for an issue where we were failing to // pretty-print such view items. If that happens again, this should // begin failing. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m { pub fn f() -> Vec { Vec::new() } diff --git a/tests/ui/modules/mod_dir_implicit.rs b/tests/ui/modules/mod_dir_implicit.rs index 7eac90f4d9b63..b99d7bcc755bf 100644 --- a/tests/ui/modules/mod_dir_implicit.rs +++ b/tests/ui/modules/mod_dir_implicit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod mod_dir_implicit_aux; diff --git a/tests/ui/modules/mod_dir_implicit_aux/mod.rs b/tests/ui/modules/mod_dir_implicit_aux/mod.rs index 4f1eb85e4cc44..035cbfa282279 100644 --- a/tests/ui/modules/mod_dir_implicit_aux/mod.rs +++ b/tests/ui/modules/mod_dir_implicit_aux/mod.rs @@ -1,2 +1,2 @@ -// run-pass +//@ run-pass pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_dir_path.rs b/tests/ui/modules/mod_dir_path.rs index 72db8e44be31d..1704d8e4a17b6 100644 --- a/tests/ui/modules/mod_dir_path.rs +++ b/tests/ui/modules/mod_dir_path.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] mod mod_dir_simple { diff --git a/tests/ui/modules/mod_dir_path2.rs b/tests/ui/modules/mod_dir_path2.rs index b4f8f1c84547c..6bfef3d54a15a 100644 --- a/tests/ui/modules/mod_dir_path2.rs +++ b/tests/ui/modules/mod_dir_path2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod pancakes { diff --git a/tests/ui/modules/mod_dir_path3.rs b/tests/ui/modules/mod_dir_path3.rs index 56980c01049b3..2f4fb8afa666c 100644 --- a/tests/ui/modules/mod_dir_path3.rs +++ b/tests/ui/modules/mod_dir_path3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod pancakes { diff --git a/tests/ui/modules/mod_dir_path_multi.rs b/tests/ui/modules/mod_dir_path_multi.rs index 1c111294a337e..eda94c8725b65 100644 --- a/tests/ui/modules/mod_dir_path_multi.rs +++ b/tests/ui/modules/mod_dir_path_multi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod biscuits { diff --git a/tests/ui/modules/mod_dir_recursive.rs b/tests/ui/modules/mod_dir_recursive.rs index 56f26139828f5..a5894e2196a0c 100644 --- a/tests/ui/modules/mod_dir_recursive.rs +++ b/tests/ui/modules/mod_dir_recursive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that the parser for each file tracks its modules // and paths independently. The load_another_mod module should diff --git a/tests/ui/modules/mod_dir_simple.rs b/tests/ui/modules/mod_dir_simple.rs index 56f15b1d6105a..edc76355f0cc9 100644 --- a/tests/ui/modules/mod_dir_simple.rs +++ b/tests/ui/modules/mod_dir_simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod mod_dir_simple { pub mod test; diff --git a/tests/ui/modules/mod_dir_simple/load_another_mod.rs b/tests/ui/modules/mod_dir_simple/load_another_mod.rs index f96b546aa2f7d..84728a7ed757d 100644 --- a/tests/ui/modules/mod_dir_simple/load_another_mod.rs +++ b/tests/ui/modules/mod_dir_simple/load_another_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass #[path = "test.rs"] pub mod test; diff --git a/tests/ui/modules/mod_dir_simple/test.rs b/tests/ui/modules/mod_dir_simple/test.rs index 4f1eb85e4cc44..035cbfa282279 100644 --- a/tests/ui/modules/mod_dir_simple/test.rs +++ b/tests/ui/modules/mod_dir_simple/test.rs @@ -1,2 +1,2 @@ -// run-pass +//@ run-pass pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_file.rs b/tests/ui/modules/mod_file.rs index 7b56b99eb3ace..421b7b0659d2f 100644 --- a/tests/ui/modules/mod_file.rs +++ b/tests/ui/modules/mod_file.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that a plain .rs file can load modules from other source files diff --git a/tests/ui/modules/mod_file_aux.rs b/tests/ui/modules/mod_file_aux.rs index 6d052272eb3bf..f37296b3af0be 100644 --- a/tests/ui/modules/mod_file_aux.rs +++ b/tests/ui/modules/mod_file_aux.rs @@ -1,4 +1,4 @@ -// run-pass -// ignore-test Not a test. Used by other tests +//@ run-pass +//@ ignore-test Not a test. Used by other tests pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_file_with_path_attr.rs b/tests/ui/modules/mod_file_with_path_attr.rs index e739366954eb6..4a7e96fa40547 100644 --- a/tests/ui/modules/mod_file_with_path_attr.rs +++ b/tests/ui/modules/mod_file_with_path_attr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that a plain .rs file can load modules from other source files diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs index 49d2b3d4b851d..29ca2d29c4a4e 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = f32; diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs index e2aad480e3dbf..c5bb68f4fdf4d 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = f64; diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs index 5828718cddcee..d9bcfffca4684 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = float; diff --git a/tests/ui/modules/path-no-file-name.rs b/tests/ui/modules/path-no-file-name.rs index f62cd2a9eb4e4..c36043686fcf2 100644 --- a/tests/ui/modules/path-no-file-name.rs +++ b/tests/ui/modules/path-no-file-name.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "\.:.*\(" -> ".: $$ACCESS_DENIED_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" +//@ normalize-stderr-test: "\.:.*\(" -> ".: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "."] mod m; //~ ERROR couldn't read diff --git a/tests/ui/modules/special_module_name_ignore.rs b/tests/ui/modules/special_module_name_ignore.rs index 07cea9b2b05a1..a602b81b319b6 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 +//@ run-pass #[path = "auxiliary/dummy_lib.rs"] mod lib; diff --git a/tests/ui/modules_and_files_visibility/mod_file_aux.rs b/tests/ui/modules_and_files_visibility/mod_file_aux.rs index 98f42c5cdb129..77390da75f8f3 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_aux.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_aux.rs @@ -1,3 +1,3 @@ -// ignore-test Not a test. Used by other tests +//@ ignore-test Not a test. Used by other tests pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs index 3bf9609f4edc1..e00b5629c0833 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs @@ -1 +1 @@ -// ignore-test not a test. aux file +//@ ignore-test not a test. aux file diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs index 3bf9609f4edc1..e00b5629c0833 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs @@ -1 +1 @@ -// ignore-test not a test. aux file +//@ ignore-test not a test. aux file diff --git a/tests/ui/monomorphize-abi-alignment.rs b/tests/ui/monomorphize-abi-alignment.rs index a8d8bd1d5fd00..62df1aca357d7 100644 --- a/tests/ui/monomorphize-abi-alignment.rs +++ b/tests/ui/monomorphize-abi-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed index e88ca6079ece3..85b1853c23b82 100644 --- a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed +++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] use std::collections::BTreeMap; use std::collections::HashSet; diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs index ba277c4a9c490..740cda470d913 100644 --- a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs +++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] use std::collections::BTreeMap; use std::collections::HashSet; diff --git a/tests/ui/moves/issue-22536-copy-mustnt-zero.rs b/tests/ui/moves/issue-22536-copy-mustnt-zero.rs index b3fc1a56f882f..5032b46c2906c 100644 --- a/tests/ui/moves/issue-22536-copy-mustnt-zero.rs +++ b/tests/ui/moves/issue-22536-copy-mustnt-zero.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #22536: If a type implements Copy, then // moving it must not zero the original memory. diff --git a/tests/ui/moves/issue-34721.fixed b/tests/ui/moves/issue-34721.fixed index f135ad3836ea1..995fd920da796 100644 --- a/tests/ui/moves/issue-34721.fixed +++ b/tests/ui/moves/issue-34721.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Foo { fn zero(self) -> Self; diff --git a/tests/ui/moves/issue-34721.rs b/tests/ui/moves/issue-34721.rs index 14dd01766aa44..747b15b4e02e3 100644 --- a/tests/ui/moves/issue-34721.rs +++ b/tests/ui/moves/issue-34721.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Foo { fn zero(self) -> Self; diff --git a/tests/ui/moves/move-1-unique.rs b/tests/ui/moves/move-1-unique.rs index f98d075d18bba..c97bfaaaf1a5a 100644 --- a/tests/ui/moves/move-1-unique.rs +++ b/tests/ui/moves/move-1-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/moves/move-2-unique.rs b/tests/ui/moves/move-2-unique.rs index 8fda3c1c86c60..2204ea95741db 100644 --- a/tests/ui/moves/move-2-unique.rs +++ b/tests/ui/moves/move-2-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct X { x: isize, y: isize, z: isize } diff --git a/tests/ui/moves/move-2.rs b/tests/ui/moves/move-2.rs index 5e010087465d9..05abf5002b779 100644 --- a/tests/ui/moves/move-2.rs +++ b/tests/ui/moves/move-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct X { x: isize, y: isize, z: isize } diff --git a/tests/ui/moves/move-3-unique.rs b/tests/ui/moves/move-3-unique.rs index 8e5df2c3ff9fd..e806be8d8f2c7 100644 --- a/tests/ui/moves/move-3-unique.rs +++ b/tests/ui/moves/move-3-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/moves/move-4-unique.rs b/tests/ui/moves/move-4-unique.rs index 24aec7ea62c8b..09e0f11a8b442 100644 --- a/tests/ui/moves/move-4-unique.rs +++ b/tests/ui/moves/move-4-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple {a: isize, b: isize, c: isize} diff --git a/tests/ui/moves/move-4.rs b/tests/ui/moves/move-4.rs index 63aa031a66e60..dead612358d03 100644 --- a/tests/ui/moves/move-4.rs +++ b/tests/ui/moves/move-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple { a: isize, b: isize, c: isize } diff --git a/tests/ui/moves/move-arg-2-unique.rs b/tests/ui/moves/move-arg-2-unique.rs index 9622c83750d3e..d9a03be0ed2dc 100644 --- a/tests/ui/moves/move-arg-2-unique.rs +++ b/tests/ui/moves/move-arg-2-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: Box> ) { assert_eq!((*foo)[0], 10); } diff --git a/tests/ui/moves/move-arg-2.rs b/tests/ui/moves/move-arg-2.rs index 77ee06e192e73..77839c11c074e 100644 --- a/tests/ui/moves/move-arg-2.rs +++ b/tests/ui/moves/move-arg-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: Box>) { assert_eq!((*foo)[0], 10); } diff --git a/tests/ui/moves/move-arg.rs b/tests/ui/moves/move-arg.rs index 5942cd89fd9eb..3a7cbb4c0f6df 100644 --- a/tests/ui/moves/move-arg.rs +++ b/tests/ui/moves/move-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: isize) { assert_eq!(foo, 10); } diff --git a/tests/ui/moves/move-nullary-fn.rs b/tests/ui/moves/move-nullary-fn.rs index 14c9262c74d18..8c7bcf395e7ac 100644 --- a/tests/ui/moves/move-nullary-fn.rs +++ b/tests/ui/moves/move-nullary-fn.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // Issue #922 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f2(_thing: F) where F: FnOnce() { } diff --git a/tests/ui/moves/move-out-of-field.rs b/tests/ui/moves/move-out-of-field.rs index 4166d8dc8e91b..f4a0693daafb3 100644 --- a/tests/ui/moves/move-out-of-field.rs +++ b/tests/ui/moves/move-out-of-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct StringBuffer { s: String, diff --git a/tests/ui/moves/move-scalar.rs b/tests/ui/moves/move-scalar.rs index 98bfeb1bc054d..e8cf5632b322a 100644 --- a/tests/ui/moves/move-scalar.rs +++ b/tests/ui/moves/move-scalar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/moves/moves-based-on-type-capture-clause.rs b/tests/ui/moves/moves-based-on-type-capture-clause.rs index 4a6a4ed281d42..baf52ffb5154c 100644 --- a/tests/ui/moves/moves-based-on-type-capture-clause.rs +++ b/tests/ui/moves/moves-based-on-type-capture-clause.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/moves/needs-clone-through-deref.fixed b/tests/ui/moves/needs-clone-through-deref.fixed index 419718175e98c..43ea15d1b63fc 100644 --- a/tests/ui/moves/needs-clone-through-deref.fixed +++ b/tests/ui/moves/needs-clone-through-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, noop_method_call)] use std::ops::Deref; struct S(Vec); diff --git a/tests/ui/moves/needs-clone-through-deref.rs b/tests/ui/moves/needs-clone-through-deref.rs index 8116008ffe3cb..ca57478ba98e3 100644 --- a/tests/ui/moves/needs-clone-through-deref.rs +++ b/tests/ui/moves/needs-clone-through-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, noop_method_call)] use std::ops::Deref; struct S(Vec); diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed index 0b9a3bae9619c..82b1ae57d99d7 100644 --- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed +++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; fn foo(_: &mut ()) {} diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs index 0e952b06ee118..df75a8b89d5c3 100644 --- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs +++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; fn foo(_: &mut ()) {} diff --git a/tests/ui/moves/pin-mut-reborrow.fixed b/tests/ui/moves/pin-mut-reborrow.fixed index e808186d7d445..f703cedd6c10c 100644 --- a/tests/ui/moves/pin-mut-reborrow.fixed +++ b/tests/ui/moves/pin-mut-reborrow.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct Foo; diff --git a/tests/ui/moves/pin-mut-reborrow.rs b/tests/ui/moves/pin-mut-reborrow.rs index fee6236ebb4db..fcb9a9b95e64f 100644 --- a/tests/ui/moves/pin-mut-reborrow.rs +++ b/tests/ui/moves/pin-mut-reborrow.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct Foo; diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed index a4e219e1c9bf0..b3eae0b22b64b 100644 --- a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed +++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #109429 use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs index efe035ebae049..2ae037d4d81eb 100644 --- a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs +++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #109429 use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; diff --git a/tests/ui/moves/suggest-clone.fixed b/tests/ui/moves/suggest-clone.fixed index 0c4a94d77e4be..59276a7b96d4c 100644 --- a/tests/ui/moves/suggest-clone.fixed +++ b/tests/ui/moves/suggest-clone.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/moves/suggest-clone.rs b/tests/ui/moves/suggest-clone.rs index 25dd9f006f9ea..0b3c5e283d2ca 100644 --- a/tests/ui/moves/suggest-clone.rs +++ b/tests/ui/moves/suggest-clone.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed b/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed index 45acf5beb1217..e726c8145c3ba 100644 --- a/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed +++ b/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn duplicate_t(t: T) -> (T, T) { diff --git a/tests/ui/moves/use_of_moved_value_copy_suggestions.rs b/tests/ui/moves/use_of_moved_value_copy_suggestions.rs index 0a43dd1a9a387..ee08ce0fa5ba4 100644 --- a/tests/ui/moves/use_of_moved_value_copy_suggestions.rs +++ b/tests/ui/moves/use_of_moved_value_copy_suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn duplicate_t(t: T) -> (T, T) { diff --git a/tests/ui/msvc-data-only.rs b/tests/ui/msvc-data-only.rs index f668b0b06824e..15d799085fecc 100644 --- a/tests/ui/msvc-data-only.rs +++ b/tests/ui/msvc-data-only.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:msvc-data-only-lib.rs +//@ run-pass +//@ aux-build:msvc-data-only-lib.rs extern crate msvc_data_only_lib; diff --git a/tests/ui/multibyte.rs b/tests/ui/multibyte.rs index 7e3a577f9f2c8..d585a791fb9c1 100644 --- a/tests/ui/multibyte.rs +++ b/tests/ui/multibyte.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // Test that multibyte characters don't crash the compiler diff --git a/tests/ui/multiline-comment.rs b/tests/ui/multiline-comment.rs index 01aaac2823258..bf86250c1f897 100644 --- a/tests/ui/multiline-comment.rs +++ b/tests/ui/multiline-comment.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* * This is a multi-line oldcomment. diff --git a/tests/ui/mut-function-arguments.rs b/tests/ui/mut-function-arguments.rs index 1e682fc4b66c4..01c264fce0389 100644 --- a/tests/ui/mut-function-arguments.rs +++ b/tests/ui/mut-function-arguments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(mut y: Box) { *y = 5; diff --git a/tests/ui/mut/no-mut-lint-for-desugared-mut.rs b/tests/ui/mut/no-mut-lint-for-desugared-mut.rs index 419d580419f42..bd570a74e0e35 100644 --- a/tests/ui/mut/no-mut-lint-for-desugared-mut.rs +++ b/tests/ui/mut/no-mut-lint-for-desugared-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_mut)] #![allow(unreachable_code)] diff --git a/tests/ui/mutual-recursion-group.rs b/tests/ui/mutual-recursion-group.rs index 86b0f1d840efa..dc6d216f8d9ba 100644 --- a/tests/ui/mutual-recursion-group.rs +++ b/tests/ui/mutual-recursion-group.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum colour { red, green, blue, } diff --git a/tests/ui/myriad-closures.rs b/tests/ui/myriad-closures.rs index 310351f50cbc5..541d27d5de407 100644 --- a/tests/ui/myriad-closures.rs +++ b/tests/ui/myriad-closures.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // This test case tests whether we can handle code bases that contain a high // number of closures, something that needs special handling in the MingGW // toolchain. // See https://github.com/rust-lang/rust/issues/34793 for more information. // Make sure we don't optimize anything away: -// compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals +//@ compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals // Expand something exponentially macro_rules! go_bacterial { diff --git a/tests/ui/namespace/namespace-mix.rs b/tests/ui/namespace/namespace-mix.rs index c5b30f148bd5b..44790b83d6e82 100644 --- a/tests/ui/namespace/namespace-mix.rs +++ b/tests/ui/namespace/namespace-mix.rs @@ -1,4 +1,4 @@ -// aux-build:namespace-mix.rs +//@ aux-build:namespace-mix.rs extern crate namespace_mix; use namespace_mix::*; diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs index feb94b681849f..6b92f4101948a 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs @@ -1,4 +1,4 @@ -// aux-build:namespaced_enums.rs +//@ aux-build:namespaced_enums.rs extern crate namespaced_enums; mod m { diff --git a/tests/ui/native-library-link-flags/empty-kind-1.rs b/tests/ui/native-library-link-flags/empty-kind-1.rs index 18937856d20d3..d9b8d8a7f7d6a 100644 --- a/tests/ui/native-library-link-flags/empty-kind-1.rs +++ b/tests/ui/native-library-link-flags/empty-kind-1.rs @@ -1,6 +1,6 @@ // Unspecified kind should fail with an error -// compile-flags: -l =mylib -// error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg +//@ compile-flags: -l =mylib +//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg fn main() {} diff --git a/tests/ui/native-library-link-flags/empty-kind-2.rs b/tests/ui/native-library-link-flags/empty-kind-2.rs index 851eb63fcd8b8..16cb3b917e4bf 100644 --- a/tests/ui/native-library-link-flags/empty-kind-2.rs +++ b/tests/ui/native-library-link-flags/empty-kind-2.rs @@ -1,6 +1,6 @@ // Unspecified kind should fail with an error -// compile-flags: -l :+bundle=mylib -// error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg +//@ compile-flags: -l :+bundle=mylib +//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg fn main() {} diff --git a/tests/ui/native-library-link-flags/link-arg-error.rs b/tests/ui/native-library-link-flags/link-arg-error.rs index e041650d024f4..4defb108178b7 100644 --- a/tests/ui/native-library-link-flags/link-arg-error.rs +++ b/tests/ui/native-library-link-flags/link-arg-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -l link-arg:+bundle=arg -Z unstable-options -// error-pattern: linking modifier `bundle` is only compatible with `static` linking kind +//@ compile-flags: -l link-arg:+bundle=arg -Z unstable-options +//@ error-pattern: linking modifier `bundle` is only compatible with `static` linking kind fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.rs b/tests/ui/native-library-link-flags/modifiers-override-2.rs index 333f6786b0fba..a462a741ac611 100644 --- a/tests/ui/native-library-link-flags/modifiers-override-2.rs +++ b/tests/ui/native-library-link-flags/modifiers-override-2.rs @@ -1,3 +1,3 @@ -// compile-flags:-lstatic:+whole-archive,-whole-archive=foo +//@ compile-flags:-lstatic:+whole-archive,-whole-archive=foo fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.rs b/tests/ui/native-library-link-flags/modifiers-override-3.rs index b28c53c6b0a50..d05735ad61626 100644 --- a/tests/ui/native-library-link-flags/modifiers-override-3.rs +++ b/tests/ui/native-library-link-flags/modifiers-override-3.rs @@ -1,7 +1,7 @@ // Regression test for issue #97299, one command line library with modifiers // overrides another command line library with modifiers. -// compile-flags:-lstatic:+whole-archive=foo -lstatic:+whole-archive=foo -// error-pattern: overriding linking modifiers from command line is not supported +//@ compile-flags:-lstatic:+whole-archive=foo -lstatic:+whole-archive=foo +//@ error-pattern: overriding linking modifiers from command line is not supported fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override.rs b/tests/ui/native-library-link-flags/modifiers-override.rs index 42cdb5004adcb..cd2d003664ac2 100644 --- a/tests/ui/native-library-link-flags/modifiers-override.rs +++ b/tests/ui/native-library-link-flags/modifiers-override.rs @@ -1,4 +1,4 @@ -// compile-flags:-ldylib:+as-needed=foo -lstatic=bar -Zunstable-options +//@ compile-flags:-ldylib:+as-needed=foo -lstatic=bar -Zunstable-options #[link(name = "foo")] #[link( diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs index 19b9a17705b93..776e3bf12ad26 100644 --- a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs +++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-C link-arg=⦺ⅈ⽯⭏⽽◃⡽⚞ -// only-msvc -// normalize-stderr-test "(?:.|\n)*(⦺ⅈ⽯⭏⽽◃⡽⚞)(?:.|\n)*" -> "$1" +//@ build-fail +//@ compile-flags:-C link-arg=⦺ⅈ⽯⭏⽽◃⡽⚞ +//@ only-msvc +//@ normalize-stderr-test "(?:.|\n)*(⦺ⅈ⽯⭏⽽◃⡽⚞)(?:.|\n)*" -> "$1" pub fn main() {} diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs b/tests/ui/native-library-link-flags/suggest-libname-only-1.rs index abf988a7c1ed3..328181fb5cbf8 100644 --- a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs +++ b/tests/ui/native-library-link-flags/suggest-libname-only-1.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: --crate-type rlib -// error-pattern: could not find native static library `libfoo.a` -// error-pattern: only provide the library name `foo`, not the full filename +//@ build-fail +//@ compile-flags: --crate-type rlib +//@ error-pattern: could not find native static library `libfoo.a` +//@ error-pattern: only provide the library name `foo`, not the full filename #[link(name = "libfoo.a", kind = "static")] extern { } diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs b/tests/ui/native-library-link-flags/suggest-libname-only-2.rs index dfa70e56db73c..7ed106e4ab431 100644 --- a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs +++ b/tests/ui/native-library-link-flags/suggest-libname-only-2.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: --crate-type rlib -// error-pattern: could not find native static library `bar.lib` -// error-pattern: only provide the library name `bar`, not the full filename +//@ build-fail +//@ compile-flags: --crate-type rlib +//@ error-pattern: could not find native static library `bar.lib` +//@ error-pattern: only provide the library name `bar`, not the full filename #[link(name = "bar.lib", kind = "static")] extern { } diff --git a/tests/ui/nested-block-comment.rs b/tests/ui/nested-block-comment.rs index f8dfb5fa8ca77..07414345c38ec 100644 --- a/tests/ui/nested-block-comment.rs +++ b/tests/ui/nested-block-comment.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* This test checks that nested comments are supported diff --git a/tests/ui/nested-class.rs b/tests/ui/nested-class.rs index 303273618e18d..f84ab40dd1d41 100644 --- a/tests/ui/nested-class.rs +++ b/tests/ui/nested-class.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/nested-ty-params.rs b/tests/ui/nested-ty-params.rs index 25bac1ba24bd1..b7cedf97c9100 100644 --- a/tests/ui/nested-ty-params.rs +++ b/tests/ui/nested-ty-params.rs @@ -1,4 +1,4 @@ -// error-pattern:can't use generic parameters from outer item +//@ error-pattern:can't use generic parameters from outer item fn hd(v: Vec ) -> U { fn hd1(w: [U]) -> U { return w[0]; } diff --git a/tests/ui/never_type/adjust_never.rs b/tests/ui/never_type/adjust_never.rs index 0d7d2c0ed3fa9..aa7ee9ef7ab17 100644 --- a/tests/ui/never_type/adjust_never.rs +++ b/tests/ui/never_type/adjust_never.rs @@ -1,6 +1,6 @@ // Test that a variable of type ! can coerce to another type. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/auto-traits.rs b/tests/ui/never_type/auto-traits.rs index 42ede708e66df..8a2b9a1458665 100644 --- a/tests/ui/never_type/auto-traits.rs +++ b/tests/ui/never_type/auto-traits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/never_type/call-fn-never-arg.rs b/tests/ui/never_type/call-fn-never-arg.rs index 9d355817ee80d..d37f0888b2f0c 100644 --- a/tests/ui/never_type/call-fn-never-arg.rs +++ b/tests/ui/never_type/call-fn-never-arg.rs @@ -1,6 +1,6 @@ // Test that we can use a ! for an argument of type ! -// check-pass +//@ check-pass #![feature(never_type)] #![allow(unreachable_code)] diff --git a/tests/ui/never_type/cast-never.rs b/tests/ui/never_type/cast-never.rs index 0139ebe4640be..34314fcebab05 100644 --- a/tests/ui/never_type/cast-never.rs +++ b/tests/ui/never_type/cast-never.rs @@ -1,6 +1,6 @@ // Test that we can explicitly cast ! to another type -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/defaulted-never-note.rs b/tests/ui/never_type/defaulted-never-note.rs index d30ffcd3846e7..f4e5273b33a76 100644 --- a/tests/ui/never_type/defaulted-never-note.rs +++ b/tests/ui/never_type/defaulted-never-note.rs @@ -1,6 +1,6 @@ -// revisions: nofallback fallback -//[nofallback] run-pass -//[fallback] check-fail +//@ revisions: nofallback fallback +//@[nofallback] run-pass +//@[fallback] check-fail // We need to opt into the `never_type_fallback` feature // to trigger the requirement that this is testing. diff --git a/tests/ui/never_type/dispatch_from_dyn_zst.rs b/tests/ui/never_type/dispatch_from_dyn_zst.rs index 764f58ce9e805..d3c32b57519fb 100644 --- a/tests/ui/never_type/dispatch_from_dyn_zst.rs +++ b/tests/ui/never_type/dispatch_from_dyn_zst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsize, dispatch_from_dyn, never_type)] diff --git a/tests/ui/never_type/diverging-fallback-control-flow.rs b/tests/ui/never_type/diverging-fallback-control-flow.rs index 9f6cfc7999a6a..e209a9908850a 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.rs +++ b/tests/ui/never_type/diverging-fallback-control-flow.rs @@ -1,5 +1,5 @@ -// revisions: nofallback fallback -// run-pass +//@ revisions: nofallback fallback +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/never_type/diverging-fallback-no-leak.rs b/tests/ui/never_type/diverging-fallback-no-leak.rs index 03478e19ddcdd..425437da2077b 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.rs +++ b/tests/ui/never_type/diverging-fallback-no-leak.rs @@ -1,5 +1,5 @@ -// revisions: nofallback fallback -//[nofallback] check-pass +//@ revisions: nofallback fallback +//@[nofallback] check-pass #![cfg_attr(fallback, feature(never_type, never_type_fallback))] diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs index 26c8175be638f..aeb6ee6e26efd 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs @@ -4,9 +4,9 @@ // in the objc crate, where changing the fallback from `!` to `()` // resulted in unsoundness. // -// check-pass +//@ check-pass -// revisions: nofallback fallback +//@ revisions: nofallback fallback #![cfg_attr(fallback, feature(never_type, never_type_fallback))] #![allow(unit_bindings)] diff --git a/tests/ui/never_type/exhaustive_patterns.rs b/tests/ui/never_type/exhaustive_patterns.rs index 2e23fa1828091..3c53ac319b4a4 100644 --- a/tests/ui/never_type/exhaustive_patterns.rs +++ b/tests/ui/never_type/exhaustive_patterns.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #104034 +//@ check-fail +//@ known-bug: #104034 #![feature(exhaustive_patterns, never_type)] diff --git a/tests/ui/never_type/expr-empty-ret.rs b/tests/ui/never_type/expr-empty-ret.rs index ce8ffaf94d063..5d315934e0049 100644 --- a/tests/ui/never_type/expr-empty-ret.rs +++ b/tests/ui/never_type/expr-empty-ret.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #521 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() { let _x = match true { diff --git a/tests/ui/never_type/fallback-closure-ret.rs b/tests/ui/never_type/fallback-closure-ret.rs index 5c8ce48cbb0b6..dcf38e03a137e 100644 --- a/tests/ui/never_type/fallback-closure-ret.rs +++ b/tests/ui/never_type/fallback-closure-ret.rs @@ -7,8 +7,8 @@ // encountering a set of obligations like `?T: Foo` and `Trait::Projection = // ?T`. In the code below, these are `R: Bar` and `Fn::Output = R`. // -// revisions: nofallback fallback -// check-pass +//@ revisions: nofallback fallback +//@ check-pass #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/never_type/fallback-closure-wrap.rs b/tests/ui/never_type/fallback-closure-wrap.rs index f88355bb285f3..27020289c683c 100644 --- a/tests/ui/never_type/fallback-closure-wrap.rs +++ b/tests/ui/never_type/fallback-closure-wrap.rs @@ -6,9 +6,9 @@ // Crater did not find many cases of this occurring, but it is included for // awareness. // -// revisions: nofallback fallback -//[nofallback] check-pass -//[fallback] check-fail +//@ revisions: nofallback fallback +//@[nofallback] check-pass +//@[fallback] check-fail #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/never_type/impl-for-never.rs b/tests/ui/never_type/impl-for-never.rs index 9423f08858b9b..0da79a712d2bb 100644 --- a/tests/ui/never_type/impl-for-never.rs +++ b/tests/ui/never_type/impl-for-never.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type)] diff --git a/tests/ui/never_type/impl_trait_fallback.rs b/tests/ui/never_type/impl_trait_fallback.rs index cc9520c1b24c8..ce06f8f7817ff 100644 --- a/tests/ui/never_type/impl_trait_fallback.rs +++ b/tests/ui/never_type/impl_trait_fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/never_type/issue-44402.rs b/tests/ui/never_type/issue-44402.rs index 699e480dfe7e5..820d1af37bf6a 100644 --- a/tests/ui/never_type/issue-44402.rs +++ b/tests/ui/never_type/issue-44402.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![feature(never_type)] diff --git a/tests/ui/never_type/issue-5500-1.rs b/tests/ui/never_type/issue-5500-1.rs index 98d6e1a14cb32..65617e36c6d6d 100644 --- a/tests/ui/never_type/issue-5500-1.rs +++ b/tests/ui/never_type/issue-5500-1.rs @@ -2,7 +2,7 @@ // is OK because the test is here to check that the compiler doesn't ICE (cf. // #5500). -// check-pass +//@ check-pass struct TrieMapIterator<'a> { node: &'a usize diff --git a/tests/ui/never_type/never-assign-dead-code.rs b/tests/ui/never_type/never-assign-dead-code.rs index 39df7de5a7fbb..2c99d3086fbad 100644 --- a/tests/ui/never_type/never-assign-dead-code.rs +++ b/tests/ui/never_type/never-assign-dead-code.rs @@ -1,6 +1,6 @@ // Test that an assignment of type ! makes the rest of the block dead code. -// check-pass +//@ check-pass #![feature(never_type)] #![allow(dropping_copy_types)] diff --git a/tests/ui/never_type/never-associated-type.rs b/tests/ui/never_type/never-associated-type.rs index 3bb917c931635..f7b88f604f26f 100644 --- a/tests/ui/never_type/never-associated-type.rs +++ b/tests/ui/never_type/never-associated-type.rs @@ -1,6 +1,6 @@ // Test that we can use ! as an associated type. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/never-from-impl-is-reserved.rs b/tests/ui/never_type/never-from-impl-is-reserved.rs index 97fac59149b98..26d194144f6b6 100644 --- a/tests/ui/never_type/never-from-impl-is-reserved.rs +++ b/tests/ui/never_type/never-from-impl-is-reserved.rs @@ -1,7 +1,7 @@ // check that the `for T: From` impl is reserved -// revisions: current next -//[next] compile-flags: -Znext-solver=coherence +//@ revisions: current next +//@[next] compile-flags: -Znext-solver=coherence #![feature(never_type)] diff --git a/tests/ui/never_type/never-result.rs b/tests/ui/never_type/never-result.rs index 35af37910ef3e..bdd06ec5bd13f 100644 --- a/tests/ui/never_type/never-result.rs +++ b/tests/ui/never_type/never-result.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unreachable_code)] diff --git a/tests/ui/never_type/never-type-arg.rs b/tests/ui/never_type/never-type-arg.rs index 13cd59e6aa9f1..10023cf41999e 100644 --- a/tests/ui/never_type/never-type-arg.rs +++ b/tests/ui/never_type/never-type-arg.rs @@ -1,6 +1,6 @@ // Test that we can use ! as an argument to a trait impl. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/never-type-in-nested-fn-decl.rs b/tests/ui/never_type/never-type-in-nested-fn-decl.rs index df546c4717eb6..094d8919c2a1b 100644 --- a/tests/ui/never_type/never-type-in-nested-fn-decl.rs +++ b/tests/ui/never_type/never-type-in-nested-fn-decl.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait X {} diff --git a/tests/ui/never_type/never-type-rvalues.rs b/tests/ui/never_type/never-type-rvalues.rs index 9ccc73dbf92d4..d3f6f628e1a7b 100644 --- a/tests/ui/never_type/never-type-rvalues.rs +++ b/tests/ui/never_type/never-type-rvalues.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type)] #![allow(dead_code)] diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.rs b/tests/ui/never_type/never-value-fallback-issue-66757.rs index fc6fe6eb5cc02..636757c70ec51 100644 --- a/tests/ui/never_type/never-value-fallback-issue-66757.rs +++ b/tests/ui/never_type/never-value-fallback-issue-66757.rs @@ -4,9 +4,9 @@ // never) and an uninferred variable (here the argument to `From`) it // doesn't fallback to `()` but rather `!`. // -// revisions: nofallback fallback -//[fallback] run-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@[fallback] run-pass +//@[nofallback] check-fail #![feature(never_type)] diff --git a/tests/ui/never_type/never_coercions.rs b/tests/ui/never_type/never_coercions.rs index 105c38635331f..e07b0c13eb8ba 100644 --- a/tests/ui/never_type/never_coercions.rs +++ b/tests/ui/never_type/never_coercions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that having something of type ! doesn't screw up type-checking and that it coerces to the // LUB type of the other match arms. diff --git a/tests/ui/never_type/never_transmute_never.rs b/tests/ui/never_type/never_transmute_never.rs index fce3ced9aac7f..b1fcffcb3b7e4 100644 --- a/tests/ui/never_type/never_transmute_never.rs +++ b/tests/ui/never_type/never_transmute_never.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type="lib"] diff --git a/tests/ui/never_type/return-never-coerce.rs b/tests/ui/never_type/return-never-coerce.rs index d615940eff1f0..559b7d0e985e4 100644 --- a/tests/ui/never_type/return-never-coerce.rs +++ b/tests/ui/never_type/return-never-coerce.rs @@ -1,8 +1,8 @@ // Test that ! coerces to other types. -// run-fail -// error-pattern:aah! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:aah! +//@ ignore-emscripten no processes fn call_another_fn T>(f: F) -> T { f() diff --git a/tests/ui/never_type/try_from.rs b/tests/ui/never_type/try_from.rs index 50451576f9c97..acde524e98f5b 100644 --- a/tests/ui/never_type/try_from.rs +++ b/tests/ui/never_type/try_from.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test relies on `TryFrom` being blanket impl for all `T: Into` // and `TryInto` being blanket impl for all `U: TryFrom` diff --git a/tests/ui/new-impl-syntax.rs b/tests/ui/new-impl-syntax.rs index e1f2bea9afabd..124d604e6a87a 100644 --- a/tests/ui/new-impl-syntax.rs +++ b/tests/ui/new-impl-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/new-import-syntax.rs b/tests/ui/new-import-syntax.rs index f132ed57ce933..547900fab6128 100644 --- a/tests/ui/new-import-syntax.rs +++ b/tests/ui/new-import-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { println!("Hello world!"); diff --git a/tests/ui/new-style-constants.rs b/tests/ui/new-style-constants.rs index 82ed7b55740f6..e33a2da38785e 100644 --- a/tests/ui/new-style-constants.rs +++ b/tests/ui/new-style-constants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: isize = 3; diff --git a/tests/ui/new-unicode-escapes.rs b/tests/ui/new-unicode-escapes.rs index 850b0de44b7ed..867a50da081c7 100644 --- a/tests/ui/new-unicode-escapes.rs +++ b/tests/ui/new-unicode-escapes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let s = "\u{2603}"; diff --git a/tests/ui/newlambdas.rs b/tests/ui/newlambdas.rs index 90de53856c0d8..75e851fb73a28 100644 --- a/tests/ui/newlambdas.rs +++ b/tests/ui/newlambdas.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for the new |args| expr lambda syntax diff --git a/tests/ui/newtype-polymorphic.rs b/tests/ui/newtype-polymorphic.rs index a6a725211ade1..146d49fdf6819 100644 --- a/tests/ui/newtype-polymorphic.rs +++ b/tests/ui/newtype-polymorphic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/newtype.rs b/tests/ui/newtype.rs index f02b66f450f34..8a07c67eb4f9c 100644 --- a/tests/ui/newtype.rs +++ b/tests/ui/newtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #[derive(Copy, Clone)] diff --git a/tests/ui/nll/assign-while-to-immutable.rs b/tests/ui/nll/assign-while-to-immutable.rs index 24eaa8a23883d..991f9c3e45cea 100644 --- a/tests/ui/nll/assign-while-to-immutable.rs +++ b/tests/ui/nll/assign-while-to-immutable.rs @@ -1,7 +1,7 @@ // We used to incorrectly assign to `x` twice when generating MIR for this // function, preventing this from compiling. -// check-pass +//@ check-pass fn main() { let x: () = while false { diff --git a/tests/ui/nll/borrow-use-issue-46875.rs b/tests/ui/nll/borrow-use-issue-46875.rs index 42e28b9674b30..9917fc2c86e56 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 +//@ run-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 8eb544e8ab9d2..fd49b2322657a 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 +//@ run-pass // // FIXME(#54366) - We probably shouldn't allow #[thread_local] static mut to get a 'static lifetime. diff --git a/tests/ui/nll/capture-mut-ref.fixed b/tests/ui/nll/capture-mut-ref.fixed index 2dacb26b6eba5..53e26633dce43 100644 --- a/tests/ui/nll/capture-mut-ref.fixed +++ b/tests/ui/nll/capture-mut-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that capturing a mutable reference by move and assigning to its // referent doesn't make the unused mut lint think that it is mutable. diff --git a/tests/ui/nll/capture-mut-ref.rs b/tests/ui/nll/capture-mut-ref.rs index 56e01f7b7764b..a9cf3777a27d1 100644 --- a/tests/ui/nll/capture-mut-ref.rs +++ b/tests/ui/nll/capture-mut-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that capturing a mutable reference by move and assigning to its // referent doesn't make the unused mut lint think that it is mutable. diff --git a/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs index 260c16c17d4a2..96b5c521b1beb 100644 --- a/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs +++ b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs @@ -4,7 +4,7 @@ // input types. Previously this was an ICE in the error path because we didn't register enough // diagnostic information to render the higher-ranked subtyping error. -// check-fail +//@ check-fail trait Trait { type Ty; diff --git a/tests/ui/nll/closure-requirements/escape-argument-callee.rs b/tests/ui/nll/closure-requirements/escape-argument-callee.rs index d643a1b2a0d75..e44ea5b6209de 100644 --- a/tests/ui/nll/closure-requirements/escape-argument-callee.rs +++ b/tests/ui/nll/closure-requirements/escape-argument-callee.rs @@ -12,7 +12,7 @@ // that appear free in its type (hence, we see it before the closure's // "external requirements" report). -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-argument.rs b/tests/ui/nll/closure-requirements/escape-argument.rs index 7b1e6e9c820a4..e90bffd2fd6fb 100644 --- a/tests/ui/nll/closure-requirements/escape-argument.rs +++ b/tests/ui/nll/closure-requirements/escape-argument.rs @@ -12,7 +12,7 @@ // basically checking that the MIR type checker correctly enforces the // closure signature. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs index b104bc2479e8d..8f0f129db017f 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs @@ -5,7 +5,7 @@ // // except that the closure does so via a second closure. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs index 97c2d7dc291fb..05b1121b2912a 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs @@ -9,7 +9,7 @@ // `'b`. This relationship is propagated to the closure creator, // which reports an error. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs index a83ebc21f5f86..02fae7639a6df 100644 --- a/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs +++ b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we propagate region relations from closures precisely when there is // more than one non-local lower bound. diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs index 31f537d19d295..5d21fa100a432 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs @@ -1,7 +1,7 @@ // Test where we fail to approximate due to demanding a postdom // relationship between our upper bounds. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs index 295b9cb77551d..1c27e38f83214 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs @@ -12,7 +12,7 @@ // Note: the use of `Cell` here is to introduce invariance. One less // variable. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index e27a7d591e789..50eb60ecef353 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -2,7 +2,7 @@ // where `'x` is bound in closure type but `'a` is free. This forces // us to approximate `'x` one way or the other. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs index f11dc769a03dc..25e212a722568 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs @@ -3,7 +3,7 @@ // because `'y` is higher-ranked but we know of no relations to other // regions. Note that `'static` shows up in the stderr output as `'0`. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs index 5e5aa3a3cce74..cda7b22362f3e 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs @@ -4,7 +4,7 @@ // relations to other regions. Note that `'static` shows up in the // stderr output as `'0`. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs index 83cb37516deb4..e7e2f157604be 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs @@ -5,7 +5,7 @@ // relationships. In the 'main' variant, there are a number of // anonymous regions as well. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs index 5a25e29816d74..4422c6311ee5a 100644 --- a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs +++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs @@ -3,8 +3,8 @@ // need to propagate; but in fact we do because identity of free // regions is erased. -// compile-flags:-Zverbose-internals -// check-pass +//@ compile-flags:-Zverbose-internals +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs index 0fb57d47d2d1c..4ac5076d3f9bf 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs @@ -7,7 +7,7 @@ // as it knows of no relationships between `'x` and any // non-higher-ranked regions. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs index 3bdd923543efc..2cb6ceb0c3b95 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs @@ -7,7 +7,7 @@ // as it only knows of regions that `'x` is outlived by, and none that // `'x` outlives. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs index 5fe2f46ee79e9..2fffc17904a7d 100644 --- a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs +++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs @@ -4,7 +4,7 @@ // the same `'a` for which it implements `Trait`, which can only be the `'a` // from the function definition. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs index 6e7db4578a079..35f2a06198443 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo(x: &u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs index c1b9e249c09c4..559771241a50c 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo<'a>(x: &'a u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs index 1d31c9cb5a5d4..19a76b4d743da 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs index 4e57fef167a95..f0a0139ef0cdc 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs @@ -1,8 +1,8 @@ // Basic test for free regions in the NLL code. This test does not // report an error because of the (implied) bound that `'b: 'a`. -// check-pass -// compile-flags:-Zverbose-internals +//@ check-pass +//@ compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 { &**x diff --git a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs index 0277715b59073..7e88dc656c572 100644 --- a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs +++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs @@ -2,7 +2,7 @@ // the first, but actually returns the second. This should fail within // the closure. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs b/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs index d8772e86894df..52a58ae44fd7f 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs @@ -1,5 +1,5 @@ // See #108639 for description. -// check-pass +//@ check-pass trait Trait { type Item<'a>: 'a; diff --git a/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs b/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs index fce6f2fee7fda..a760de48a217c 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs @@ -1,5 +1,5 @@ // Regression test for #107426. -// check-pass +//@ check-pass use std::marker::PhantomData; #[derive(Clone, Copy)] diff --git a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs index 55905850f0c97..788d3b229e5e3 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs @@ -1,5 +1,5 @@ // Resgression test for #107516. -// check-pass +//@ check-pass fn iter1<'a: 'a>() -> impl Iterator { None.into_iter() diff --git a/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs b/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs index b5a95c170099d..256951d00c132 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs @@ -1,5 +1,5 @@ // See #108635 for description. -// check-pass +//@ check-pass trait Trait { type Item<'a>: 'a; diff --git a/tests/ui/nll/constant.rs b/tests/ui/nll/constant.rs index 47f0eadf99c4d..9791ec7a92b94 100644 --- a/tests/ui/nll/constant.rs +++ b/tests/ui/nll/constant.rs @@ -1,7 +1,7 @@ // Test that MIR borrowck and NLL analysis can handle constants of // arbitrary types without ICEs. -// check-pass +//@ check-pass const HI: &str = "hi"; diff --git a/tests/ui/nll/coroutine-distinct-lifetime.rs b/tests/ui/nll/coroutine-distinct-lifetime.rs index 0483b8858bac8..ff94a3d54b76b 100644 --- a/tests/ui/nll/coroutine-distinct-lifetime.rs +++ b/tests/ui/nll/coroutine-distinct-lifetime.rs @@ -6,7 +6,7 @@ // over a yield -- because the data that is borrowed (`*x`) is not // stored on the stack. -// check-pass +//@ check-pass fn foo(x: &mut u32) { move || { diff --git a/tests/ui/nll/drop-may-dangle.rs b/tests/ui/nll/drop-may-dangle.rs index b5531c29b989b..2c5e393c3b9cb 100644 --- a/tests/ui/nll/drop-may-dangle.rs +++ b/tests/ui/nll/drop-may-dangle.rs @@ -2,7 +2,7 @@ // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. -// check-pass +//@ check-pass #![allow(warnings)] #![feature(dropck_eyepatch)] diff --git a/tests/ui/nll/empty-type-predicate-2.rs b/tests/ui/nll/empty-type-predicate-2.rs index 20d6e47f75300..93f1226965fe7 100644 --- a/tests/ui/nll/empty-type-predicate-2.rs +++ b/tests/ui/nll/empty-type-predicate-2.rs @@ -3,7 +3,7 @@ // `D::Error:` is lowered to `D::Error: ReEmpty` - check that we don't ICE in // NLL for the unexpected region. -// check-pass +//@ check-pass trait Deserializer { type Error; diff --git a/tests/ui/nll/empty-type-predicate.rs b/tests/ui/nll/empty-type-predicate.rs index d126a455daeb2..ad18375f047a4 100644 --- a/tests/ui/nll/empty-type-predicate.rs +++ b/tests/ui/nll/empty-type-predicate.rs @@ -3,7 +3,7 @@ // `dyn T:` is lowered to `dyn T: ReEmpty` - check that we don't ICE in NLL for // the unexpected region. -// check-pass +//@ check-pass trait T {} fn f() where dyn T: {} diff --git a/tests/ui/nll/extra-unused-mut.rs b/tests/ui/nll/extra-unused-mut.rs index b04e395424927..786ba98508fb6 100644 --- a/tests/ui/nll/extra-unused-mut.rs +++ b/tests/ui/nll/extra-unused-mut.rs @@ -1,6 +1,6 @@ // extra unused mut lint tests for #51918 -// check-pass +//@ check-pass #![feature(coroutines)] #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-112604-closure-output-normalize.rs b/tests/ui/nll/issue-112604-closure-output-normalize.rs index e4c954eeb33d2..117e1d91e3413 100644 --- a/tests/ui/nll/issue-112604-closure-output-normalize.rs +++ b/tests/ui/nll/issue-112604-closure-output-normalize.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass use higher_kinded_types::*; mod higher_kinded_types { diff --git a/tests/ui/nll/issue-16223.rs b/tests/ui/nll/issue-16223.rs index 0ae0ed3d87fc5..7a510c5ad9d8a 100644 --- a/tests/ui/nll/issue-16223.rs +++ b/tests/ui/nll/issue-16223.rs @@ -13,7 +13,7 @@ // | // = note: move occurs because the value has type `A`, which does not implement the `Copy` trait -// check-pass +//@ check-pass #![feature(box_patterns)] diff --git a/tests/ui/nll/issue-21114-ebfull.rs b/tests/ui/nll/issue-21114-ebfull.rs index fc4a6845a4fa8..80478db215a84 100644 --- a/tests/ui/nll/issue-21114-ebfull.rs +++ b/tests/ui/nll/issue-21114-ebfull.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::collections::HashMap; use std::sync::Mutex; diff --git a/tests/ui/nll/issue-21114-kixunil.rs b/tests/ui/nll/issue-21114-kixunil.rs index 666f89f356d04..ce6f9b5f296d1 100644 --- a/tests/ui/nll/issue-21114-kixunil.rs +++ b/tests/ui/nll/issue-21114-kixunil.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn from_stdin(min: u64) -> Vec { use std::io::BufRead; diff --git a/tests/ui/nll/issue-22323-temp-destruction.rs b/tests/ui/nll/issue-22323-temp-destruction.rs index 3f2ece1cf6c91..b7242290e99eb 100644 --- a/tests/ui/nll/issue-22323-temp-destruction.rs +++ b/tests/ui/nll/issue-22323-temp-destruction.rs @@ -1,7 +1,7 @@ // rust-lang/rust#22323: regression test demonstrating that NLL // precisely tracks temporary destruction order. -// check-pass +//@ check-pass fn main() { let _s = construct().borrow().consume_borrowed(); diff --git a/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs index ccfc8937fd72e..4e4278820f1af 100644 --- a/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs +++ b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test illustrates that under NLL, we can remove our overly // conservative approach for disallowing mutations of match inputs. diff --git a/tests/ui/nll/issue-27583.rs b/tests/ui/nll/issue-27583.rs index 84c94c7c90580..cdf0bd3647d9e 100644 --- a/tests/ui/nll/issue-27583.rs +++ b/tests/ui/nll/issue-27583.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #27583. Unclear how useful this will be // going forward, since the issue in question was EXTREMELY sensitive // to compiler internals (like the precise numbering of nodes), but diff --git a/tests/ui/nll/issue-30104.rs b/tests/ui/nll/issue-30104.rs index 38850cd3fdf1f..5c643a221e8d6 100644 --- a/tests/ui/nll/issue-30104.rs +++ b/tests/ui/nll/issue-30104.rs @@ -1,6 +1,6 @@ // Regression test for #30104 -// check-pass +//@ check-pass use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs index a8a8e69302675..9298ff9658c47 100644 --- a/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs +++ b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#32382: Borrow checker used to complain about // `foobar_3` in the `impl` below, presumably due to some interaction diff --git a/tests/ui/nll/issue-43058.rs b/tests/ui/nll/issue-43058.rs index 227888d17d323..32f801a74f7d0 100644 --- a/tests/ui/nll/issue-43058.rs +++ b/tests/ui/nll/issue-43058.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Cow; diff --git a/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs index b3f655628ba94..68f8749d0b937 100644 --- a/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs +++ b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs @@ -1,7 +1,7 @@ // rust-lang/rust#45696: This test is checking that we can return // mutable borrows owned by boxes even when the boxes are dropped. -// run-pass +//@ run-pass // This function shows quite directly what is going on: We have a // reborrow of contents within the box. 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 39f1607a36b8e..5ede76ef87bb3 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 +//@ run-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-45696-scribble-on-boxed-borrow.rs b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs index 637cf278f8408..9d9fecbb9f85c 100644 --- a/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs +++ b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs @@ -2,7 +2,7 @@ // mutable borrows that would be scribbled over by destructors before // the return occurs. -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius struct Scribble<'a>(&'a mut u32); diff --git a/tests/ui/nll/issue-46589.rs b/tests/ui/nll/issue-46589.rs index 0a4c20d15159f..417d9cab657a1 100644 --- a/tests/ui/nll/issue-46589.rs +++ b/tests/ui/nll/issue-46589.rs @@ -2,7 +2,7 @@ // We will manually check it passes in Polonius tests, as we can't have a test here // which conditionally passes depending on a test revision/compile-flags. -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius struct Foo; diff --git a/tests/ui/nll/issue-47022.rs b/tests/ui/nll/issue-47022.rs index 521643c664de9..20be566e47604 100644 --- a/tests/ui/nll/issue-47022.rs +++ b/tests/ui/nll/issue-47022.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct LoadedObject { bodies: Vec, diff --git a/tests/ui/nll/issue-47153-generic-const.rs b/tests/ui/nll/issue-47153-generic-const.rs index 9f4d57111bbe9..b8a435f37ed1a 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 +//@ run-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 280bf081138cc..5d7500407a887 100644 --- a/tests/ui/nll/issue-47589.rs +++ b/tests/ui/nll/issue-47589.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 a9fe3521d5acb..263fdce60982d 100644 --- a/tests/ui/nll/issue-48070.rs +++ b/tests/ui/nll/issue-48070.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: u32 diff --git a/tests/ui/nll/issue-48179.rs b/tests/ui/nll/issue-48179.rs index f81203dc41299..c8f775ed20b87 100644 --- a/tests/ui/nll/issue-48179.rs +++ b/tests/ui/nll/issue-48179.rs @@ -1,7 +1,7 @@ // Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. -// check-pass +//@ check-pass pub struct Container { value: Option, diff --git a/tests/ui/nll/issue-48623-closure.rs b/tests/ui/nll/issue-48623-closure.rs index 3f8587eed41b9..e781cfb13921c 100644 --- a/tests/ui/nll/issue-48623-closure.rs +++ b/tests/ui/nll/issue-48623-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 bd11aaf142977..3a4a27855d99d 100644 --- a/tests/ui/nll/issue-48623-coroutine.rs +++ b/tests/ui/nll/issue-48623-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-50343.rs b/tests/ui/nll/issue-50343.rs index dd0afbbdfc6fa..d238aa8b9eb2d 100644 --- a/tests/ui/nll/issue-50343.rs +++ b/tests/ui/nll/issue-50343.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 2458b171e6458..59103afa22617 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 +//@ run-pass #![deny(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-50716-1.rs b/tests/ui/nll/issue-50716-1.rs index 9c3e24de46eff..b8ef3ab1475b1 100644 --- a/tests/ui/nll/issue-50716-1.rs +++ b/tests/ui/nll/issue-50716-1.rs @@ -3,7 +3,7 @@ // bounds derived from `Sized` requirements” that checks that the fixed compiler // accepts this code fragment with both AST and MIR borrow checkers. // -// check-pass +//@ check-pass struct Qey(Q); diff --git a/tests/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs index 77a944a7b7e27..f2501fdbab405 100644 --- a/tests/ui/nll/issue-51345-2.rs +++ b/tests/ui/nll/issue-51345-2.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let mut vec = vec![]; diff --git a/tests/ui/nll/issue-51351.rs b/tests/ui/nll/issue-51351.rs index 591d49584ee99..8b9fc9d679868 100644 --- a/tests/ui/nll/issue-51351.rs +++ b/tests/ui/nll/issue-51351.rs @@ -6,7 +6,7 @@ // of the closure, as they were not present in the closure's generic // declarations otherwise. // -// check-pass +//@ check-pass fn creash<'a>() { let x: &'a () = &(); diff --git a/tests/ui/nll/issue-51770.rs b/tests/ui/nll/issue-51770.rs index 3d6bc82f115a0..16772516a1e4f 100644 --- a/tests/ui/nll/issue-51770.rs +++ b/tests/ui/nll/issue-51770.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/nll/issue-52057.rs b/tests/ui/nll/issue-52057.rs index 5991c1104c8a2..fabee5b0d9721 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 +//@ run-pass pub trait Parser { type Input; diff --git a/tests/ui/nll/issue-52078.rs b/tests/ui/nll/issue-52078.rs index a2bcb91acf295..3ee2d358d6041 100644 --- a/tests/ui/nll/issue-52078.rs +++ b/tests/ui/nll/issue-52078.rs @@ -2,7 +2,7 @@ // between `'a` and `'b` below due to inference variables introduced // during the normalization process. // -// check-pass +//@ check-pass struct Drain<'a, T: 'a> { _marker: ::std::marker::PhantomData<&'a T>, diff --git a/tests/ui/nll/issue-52992.rs b/tests/ui/nll/issue-52992.rs index 530d1a61b3176..c5f466a306dbd 100644 --- a/tests/ui/nll/issue-52992.rs +++ b/tests/ui/nll/issue-52992.rs @@ -2,7 +2,7 @@ // implied bounds was causing outlives relations that were not // properly handled. // -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/nll/issue-53119.rs b/tests/ui/nll/issue-53119.rs index d19a9a0327cf6..e7c97c854af4a 100644 --- a/tests/ui/nll/issue-53119.rs +++ b/tests/ui/nll/issue-53119.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::ops::Deref; diff --git a/tests/ui/nll/issue-53123-raw-pointer-cast.rs b/tests/ui/nll/issue-53123-raw-pointer-cast.rs index 941c9eeb411d9..e954a2c5ff535 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 +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/nll/issue-53570.rs b/tests/ui/nll/issue-53570.rs index 35860ba9c21b5..882ce9e1c3130 100644 --- a/tests/ui/nll/issue-53570.rs +++ b/tests/ui/nll/issue-53570.rs @@ -6,7 +6,7 @@ // parameter `x` -- since `'b` cannot be expressed in the caller's // space, that got promoted th `'static`. // -// check-pass +//@ check-pass use std::cell::{RefCell, Ref}; diff --git a/tests/ui/nll/issue-54943-3.rs b/tests/ui/nll/issue-54943-3.rs index 348b48dbabb5b..4286273a76d49 100644 --- a/tests/ui/nll/issue-54943-3.rs +++ b/tests/ui/nll/issue-54943-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(#54943) This test targets the scenario where proving the WF requirements requires // knowing the value of the `_` type present in the user type annotation - unfortunately, figuring // out the value of that `_` requires type-checking the surrounding code, but that code is dead, diff --git a/tests/ui/nll/issue-55288.rs b/tests/ui/nll/issue-55288.rs index aab2dc267d594..3fe6db97e0b23 100644 --- a/tests/ui/nll/issue-55288.rs +++ b/tests/ui/nll/issue-55288.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Slice(&'static [&'static [u8]]); diff --git a/tests/ui/nll/issue-55344.rs b/tests/ui/nll/issue-55344.rs index 20f18dc465d32..413ff8978771e 100644 --- a/tests/ui/nll/issue-55344.rs +++ b/tests/ui/nll/issue-55344.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-55651.rs b/tests/ui/nll/issue-55651.rs index 75ba482717460..3ecd0b2e93db8 100644 --- a/tests/ui/nll/issue-55651.rs +++ b/tests/ui/nll/issue-55651.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::mem::ManuallyDrop; diff --git a/tests/ui/nll/issue-55825-const-fn.rs b/tests/ui/nll/issue-55825-const-fn.rs index 8aaa198136087..35e51073d0d0e 100644 --- a/tests/ui/nll/issue-55825-const-fn.rs +++ b/tests/ui/nll/issue-55825-const-fn.rs @@ -1,7 +1,7 @@ // Regression test for issue #55825 // Tests that we don't emit a spurious warning in NLL mode -// check-pass +//@ check-pass const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } diff --git a/tests/ui/nll/issue-57280-1.rs b/tests/ui/nll/issue-57280-1.rs index b8979624e50e3..23b7f0f41c355 100644 --- a/tests/ui/nll/issue-57280-1.rs +++ b/tests/ui/nll/issue-57280-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { const C: &'a u32; diff --git a/tests/ui/nll/issue-57280.rs b/tests/ui/nll/issue-57280.rs index b9d336ec395a2..6aa60b4650535 100644 --- a/tests/ui/nll/issue-57280.rs +++ b/tests/ui/nll/issue-57280.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { const BLAH: &'static str; diff --git a/tests/ui/nll/issue-57960.rs b/tests/ui/nll/issue-57960.rs index 32e45184a9195..f91427a8945e5 100644 --- a/tests/ui/nll/issue-57960.rs +++ b/tests/ui/nll/issue-57960.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/nll/issue-61311-normalize.rs b/tests/ui/nll/issue-61311-normalize.rs index 77d67b07a40b3..862be8c120dcc 100644 --- a/tests/ui/nll/issue-61311-normalize.rs +++ b/tests/ui/nll/issue-61311-normalize.rs @@ -1,7 +1,7 @@ // Regression test for #61311 // We would ICE after failing to normalize `Self::Proj` in the `impl` below. -// check-pass +//@ check-pass pub struct Unit; trait Obj {} diff --git a/tests/ui/nll/issue-61320-normalize.rs b/tests/ui/nll/issue-61320-normalize.rs index 095bef03f7cb9..e5fc1d1546402 100644 --- a/tests/ui/nll/issue-61320-normalize.rs +++ b/tests/ui/nll/issue-61320-normalize.rs @@ -1,7 +1,7 @@ // Regression test for #61320 // This is the same issue as #61311, just a larger test case. -// check-pass +//@ check-pass pub struct AndThen where diff --git a/tests/ui/nll/issue-61424.fixed b/tests/ui/nll/issue-61424.fixed index 63e00c1722e45..5ea9d531e2434 100644 --- a/tests/ui/nll/issue-61424.fixed +++ b/tests/ui/nll/issue-61424.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-61424.rs b/tests/ui/nll/issue-61424.rs index 3b64996c27b07..9c09bd6f1d18e 100644 --- a/tests/ui/nll/issue-61424.rs +++ b/tests/ui/nll/issue-61424.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-63154-normalize.rs b/tests/ui/nll/issue-63154-normalize.rs index 484c12879d33a..80546cde2e95c 100644 --- a/tests/ui/nll/issue-63154-normalize.rs +++ b/tests/ui/nll/issue-63154-normalize.rs @@ -4,7 +4,7 @@ // when checking call destinations and also when checking MIR // assignment statements. -// check-pass +//@ check-pass trait HasAssocType { type Inner; diff --git a/tests/ui/nll/issue-78561.rs b/tests/ui/nll/issue-78561.rs index 1a2a3ca56c8d4..0c7366643c93c 100644 --- a/tests/ui/nll/issue-78561.rs +++ b/tests/ui/nll/issue-78561.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] pub trait Trait { diff --git a/tests/ui/nll/issue-98589-closures-relate-named-regions.rs b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs index 6cc4340bbd733..d058abd0772fe 100644 --- a/tests/ui/nll/issue-98589-closures-relate-named-regions.rs +++ b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs @@ -3,7 +3,7 @@ // that appears in the parent function iff `'a` is early-bound. // This made the following tests pass borrowck. -// check-fail +//@ check-fail // The bound `'a: 'a` ensures that `'a` is early-bound. fn test_early_early<'a: 'a, 'b: 'b>() { diff --git a/tests/ui/nll/lint-no-err.rs b/tests/ui/nll/lint-no-err.rs index 2d1d5cb26d32c..8fc17a470ad22 100644 --- a/tests/ui/nll/lint-no-err.rs +++ b/tests/ui/nll/lint-no-err.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // mir borrowck previously incorrectly set `tainted_by_errors` // when buffering lints, which resulted in ICE later on, diff --git a/tests/ui/nll/maybe-initialized-drop-uninitialized.rs b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs index 32e07cd148f5b..fcbe1eb8150df 100644 --- a/tests/ui/nll/maybe-initialized-drop-uninitialized.rs +++ b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs b/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs index 52ea0f28d69f3..09138095523ca 100644 --- a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs +++ b/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs @@ -1,6 +1,6 @@ // ... continued from ./min-choice.rs -// check-fail +//@ check-fail trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/min-choice.rs b/tests/ui/nll/member-constraints/min-choice.rs index f4aca69e19fd9..4fbffeb4b2ae7 100644 --- a/tests/ui/nll/member-constraints/min-choice.rs +++ b/tests/ui/nll/member-constraints/min-choice.rs @@ -5,7 +5,7 @@ // We will have to exclude `['b, 'c]` because they're incomparable, // and then we should pick `'a` because we know `'static: 'a`. -// check-pass +//@ check-pass trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs b/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs index ceb417f84f3df..d676c967f30f5 100644 --- a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs +++ b/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs @@ -1,6 +1,6 @@ // Nested impl-traits can impose different member constraints on the same region variable. -// check-fail +//@ check-fail trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs b/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs index 4be0f02acf2a2..4633ad6823024 100644 --- a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs +++ b/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs @@ -1,6 +1,6 @@ // Nested impl-traits can impose different member constraints on the same region variable. -// check-pass +//@ check-pass trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/missing-universe-cause-issue-114907.rs b/tests/ui/nll/missing-universe-cause-issue-114907.rs index 94acdccfcf254..9c69c6bdc3670 100644 --- a/tests/ui/nll/missing-universe-cause-issue-114907.rs +++ b/tests/ui/nll/missing-universe-cause-issue-114907.rs @@ -6,7 +6,7 @@ // - a custom `Drop` is needed somewhere in the type that `accept` returns, to create universes // during liveness and dropck outlives computation -// check-fail +//@ check-fail trait Role { type Inner; diff --git a/tests/ui/nll/mutating_references.rs b/tests/ui/nll/mutating_references.rs index eb46b30b6b94a..262adaeaa26c1 100644 --- a/tests/ui/nll/mutating_references.rs +++ b/tests/ui/nll/mutating_references.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct List { value: T, diff --git a/tests/ui/nll/normalization-bounds.rs b/tests/ui/nll/normalization-bounds.rs index bb6d981e0133f..f7636f3ad099c 100644 --- a/tests/ui/nll/normalization-bounds.rs +++ b/tests/ui/nll/normalization-bounds.rs @@ -1,6 +1,6 @@ // Check that lifetime bounds get checked the right way around with NLL enabled. -// check-pass +//@ check-pass trait Visitor<'d> { type Value; diff --git a/tests/ui/nll/polonius/assignment-kills-loans.rs b/tests/ui/nll/polonius/assignment-kills-loans.rs index 696bf61cefde0..182262e5c4b9b 100644 --- a/tests/ui/nll/polonius/assignment-kills-loans.rs +++ b/tests/ui/nll/polonius/assignment-kills-loans.rs @@ -4,8 +4,8 @@ // facts only on simple assignments, but not projections, incorrectly causing errors to be emitted // for code accepted by NLL. They are all variations from example code in the NLL RFC. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct List { value: T, diff --git a/tests/ui/nll/polonius/assignment-to-differing-field.rs b/tests/ui/nll/polonius/assignment-to-differing-field.rs index 7ec3b9049fd58..fb6c956952543 100644 --- a/tests/ui/nll/polonius/assignment-to-differing-field.rs +++ b/tests/ui/nll/polonius/assignment-to-differing-field.rs @@ -4,7 +4,7 @@ // that we do not kill too many borrows. Assignments to the `.1` // field projections should leave the borrows on `.0` intact. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius struct List { value: T, diff --git a/tests/ui/nll/polonius/call-kills-loans.rs b/tests/ui/nll/polonius/call-kills-loans.rs index f430e9211e764..c02293c9a78aa 100644 --- a/tests/ui/nll/polonius/call-kills-loans.rs +++ b/tests/ui/nll/polonius/call-kills-loans.rs @@ -4,8 +4,8 @@ // by NLL but was incorrectly rejected by Polonius because of these // missing `killed` facts. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct Thing; diff --git a/tests/ui/nll/polonius/issue-46589.rs b/tests/ui/nll/polonius/issue-46589.rs index 648280a1dcdf0..af791f7e24ddd 100644 --- a/tests/ui/nll/polonius/issue-46589.rs +++ b/tests/ui/nll/polonius/issue-46589.rs @@ -2,8 +2,8 @@ // As we can't have a test here which conditionally passes depending on a test // revision/compile-flags. We ensure here that it passes in Polonius mode. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct Foo; diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs index ec17e0b093b38..73626271b290a 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs @@ -1,8 +1,8 @@ // This is a non-regression test for issue #116657, where NLL and `-Zpolonius=next` computed // different loan scopes when a member constraint was not ultimately applied. -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs index c165e7a1d1a53..c828a37521e0e 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs @@ -2,8 +2,8 @@ // different loan scopes when a region flowed into an SCC whose representative was an existential // region. -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next fn main() { let a = (); diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs index 5fabf31cecd36..cb56c8f6deb4c 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs @@ -5,9 +5,9 @@ // than `liveness::trace`, on some specific CFGs shapes: a variable was dead during tracing but its // regions were marked live later, and live loans were not recomputed at this point. -// check-pass -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ check-pass +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next // minimized from wavefc-cli-3.0.0 fn repro1() { diff --git a/tests/ui/nll/polonius/polonius-smoke-test.rs b/tests/ui/nll/polonius/polonius-smoke-test.rs index c4344af7175ac..ea5cdb263f5dd 100644 --- a/tests/ui/nll/polonius/polonius-smoke-test.rs +++ b/tests/ui/nll/polonius/polonius-smoke-test.rs @@ -1,5 +1,5 @@ // Check that Polonius borrow check works for simple cases. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius pub fn return_ref_to_local() -> &'static i32 { let x = 0; diff --git a/tests/ui/nll/polonius/storagedead-kills-loans.rs b/tests/ui/nll/polonius/storagedead-kills-loans.rs index 669e077dea417..89cf919bb48e0 100644 --- a/tests/ui/nll/polonius/storagedead-kills-loans.rs +++ b/tests/ui/nll/polonius/storagedead-kills-loans.rs @@ -3,8 +3,8 @@ // is correctly accepted by NLL but was incorrectly rejected by // Polonius because of these missing `killed` facts. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius use std::{io, mem}; use std::io::Read; diff --git a/tests/ui/nll/polonius/subset-relations.rs b/tests/ui/nll/polonius/subset-relations.rs index f223ab177b544..3c1af1983cfd0 100644 --- a/tests/ui/nll/polonius/subset-relations.rs +++ b/tests/ui/nll/polonius/subset-relations.rs @@ -3,7 +3,7 @@ // two free regions outlive each other, without any evidence that this // relation holds. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius // returning `y` requires that `'b: 'a`, but it's not known to be true fn missing_subset<'a, 'b>(x: &'a u32, y: &'b u32) -> &'a u32 { diff --git a/tests/ui/nll/process_or_insert_default.rs b/tests/ui/nll/process_or_insert_default.rs index 84ac9bbd0ddc4..f2f1770718e97 100644 --- a/tests/ui/nll/process_or_insert_default.rs +++ b/tests/ui/nll/process_or_insert_default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/nll/projection-return.rs b/tests/ui/nll/projection-return.rs index be141339a3f2e..8ca2a627eccfc 100644 --- a/tests/ui/nll/projection-return.rs +++ b/tests/ui/nll/projection-return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs index 3b06b0db37065..0d210c024c780 100644 --- a/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs +++ b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs @@ -1,7 +1,7 @@ // Check that mutable promoted length zero arrays don't check for conflicting // access -// check-pass +//@ check-pass pub fn main() { let mut x: Vec<&[i32; 0]> = Vec::new(); diff --git a/tests/ui/nll/promoted-liveness.rs b/tests/ui/nll/promoted-liveness.rs index e5a8e1e5c2fcc..dee95f2ef2d81 100644 --- a/tests/ui/nll/promoted-liveness.rs +++ b/tests/ui/nll/promoted-liveness.rs @@ -1,7 +1,7 @@ // Test that promoted that have larger mir bodies than their containing function // don't cause an ICE. -// check-pass +//@ check-pass fn main() { &["0", "1", "2", "3", "4", "5", "6", "7"]; diff --git a/tests/ui/nll/rc-loop.rs b/tests/ui/nll/rc-loop.rs index e59303d1f788f..f2c51b84394bd 100644 --- a/tests/ui/nll/rc-loop.rs +++ b/tests/ui/nll/rc-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A test for something that NLL enables. It sometimes happens that // the `while let` pattern makes some borrows from a variable (in this diff --git a/tests/ui/nll/relate_tys/fn-subtype.rs b/tests/ui/nll/relate_tys/fn-subtype.rs index ba89fa19ca6e4..1926515ce188d 100644 --- a/tests/ui/nll/relate_tys/fn-subtype.rs +++ b/tests/ui/nll/relate_tys/fn-subtype.rs @@ -1,6 +1,6 @@ // Test that NLL produces correct spans for higher-ranked subtyping errors. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn main() { let x: fn(&'static ()) = |_| {}; diff --git a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs index 7891bab092b48..d2672072cd5c4 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs @@ -2,7 +2,7 @@ // function returning either argument CANNOT be upcast to one // that returns always its first argument. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn make_it() -> for<'a> fn(&'a u32, &'a u32) -> &'a u32 { panic!() diff --git a/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs index 92730341c1110..039ca1fb58d4f 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs @@ -6,8 +6,8 @@ // another -- effectively, the single lifetime `'a` is just inferred // to be the intersection of the two distinct lifetimes. // -// check-pass -// compile-flags:-Zno-leak-check +//@ check-pass +//@ compile-flags:-Zno-leak-check use std::cell::Cell; diff --git a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs index 2e9eff59386de..637c2af6183d1 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs @@ -2,8 +2,8 @@ // function returning always its first argument can be upcast to one // that returns either first or second argument. // -// check-pass -// compile-flags:-Zno-leak-check +//@ check-pass +//@ compile-flags:-Zno-leak-check #![allow(dropping_copy_types)] diff --git a/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs index 05e2ea047f65a..1b2c359afc90b 100644 --- a/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs +++ b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs @@ -11,7 +11,7 @@ // // c.f. Issue #57642. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check trait Y { type F; diff --git a/tests/ui/nll/relate_tys/issue-48071.rs b/tests/ui/nll/relate_tys/issue-48071.rs index 73361a0d31922..9013dc77cc12c 100644 --- a/tests/ui/nll/relate_tys/issue-48071.rs +++ b/tests/ui/nll/relate_tys/issue-48071.rs @@ -4,7 +4,7 @@ // placeholder region, but in NLL land it would fail because we had // rewritten `'static` to a region variable. // -// check-pass +//@ check-pass trait Foo { fn foo(&self) { } diff --git a/tests/ui/nll/relate_tys/trait-hrtb.rs b/tests/ui/nll/relate_tys/trait-hrtb.rs index 7f40e93cd87ac..f7e2a67356ca2 100644 --- a/tests/ui/nll/relate_tys/trait-hrtb.rs +++ b/tests/ui/nll/relate_tys/trait-hrtb.rs @@ -1,6 +1,6 @@ // Test that NLL generates proper error spans for trait HRTB errors // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check trait Foo<'a> {} diff --git a/tests/ui/nll/relate_tys/universe-violation.rs b/tests/ui/nll/relate_tys/universe-violation.rs index c5f9d4406e204..a4e6b2d18a3b9 100644 --- a/tests/ui/nll/relate_tys/universe-violation.rs +++ b/tests/ui/nll/relate_tys/universe-violation.rs @@ -2,7 +2,7 @@ // function returning either argument CANNOT be upcast to one // that returns always its first argument. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn make_it() -> fn(&'static u32) -> &'static u32 { panic!() diff --git a/tests/ui/nll/self-assign-ref-mut.rs b/tests/ui/nll/self-assign-ref-mut.rs index 1ca4cf3a775ca..1ad005e1af333 100644 --- a/tests/ui/nll/self-assign-ref-mut.rs +++ b/tests/ui/nll/self-assign-ref-mut.rs @@ -1,6 +1,6 @@ // Check that `*y` isn't borrowed after `y = y`. -// check-pass +//@ check-pass fn main() { let mut x = 1; diff --git a/tests/ui/nll/ty-outlives/impl-trait-captures.rs b/tests/ui/nll/ty-outlives/impl-trait-captures.rs index faab2cf8bcbea..57e2eb24cc179 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-captures.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-captures.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs index 2c2eb703a153a..49c4e34c43a20 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/issue-53789-1.rs b/tests/ui/nll/ty-outlives/issue-53789-1.rs index a5201d4bbe83e..7672ef80a1761 100644 --- a/tests/ui/nll/ty-outlives/issue-53789-1.rs +++ b/tests/ui/nll/ty-outlives/issue-53789-1.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// check-pass +//@ check-pass use std::collections::BTreeMap; diff --git a/tests/ui/nll/ty-outlives/issue-53789-2.rs b/tests/ui/nll/ty-outlives/issue-53789-2.rs index 5109a0e4a683d..5a5c9cf1c7666 100644 --- a/tests/ui/nll/ty-outlives/issue-53789-2.rs +++ b/tests/ui/nll/ty-outlives/issue-53789-2.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// check-pass +//@ check-pass use std::cmp::Ord; use std::collections::BTreeMap; diff --git a/tests/ui/nll/ty-outlives/issue-55756.rs b/tests/ui/nll/ty-outlives/issue-55756.rs index e1a3bc3c4ebc8..5f96b86c464dc 100644 --- a/tests/ui/nll/ty-outlives/issue-55756.rs +++ b/tests/ui/nll/ty-outlives/issue-55756.rs @@ -16,7 +16,7 @@ // Fixed by tweaking the solver to recognize that the constraint from // the environment duplicates one from the trait. // -// check-pass +//@ check-pass #![crate_type="lib"] diff --git a/tests/ui/nll/ty-outlives/projection-body.rs b/tests/ui/nll/ty-outlives/projection-body.rs index 722d6747102fc..74c80c04a993d 100644 --- a/tests/ui/nll/ty-outlives/projection-body.rs +++ b/tests/ui/nll/ty-outlives/projection-body.rs @@ -1,7 +1,7 @@ // Test that when we infer the lifetime to a subset of the fn body, it // works out. // -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs index 59854fe6d8af2..7d983adfe8899 100644 --- a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs @@ -1,7 +1,7 @@ // Test that we can deduce when projections like `T::Item` outlive the // function body. Test that this does not imply that `T: 'a` holds. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals use std::cell::Cell; diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs index f908381d4ac07..16efe1a4a9a92 100644 --- a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals // Tests closures that propagate an outlives relationship to their // creator where the subject is a projection with no regions (` { type Output; diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs index 1a40d3b4c2f28..ad8cdd37baf13 100644 --- a/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs +++ b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs @@ -2,7 +2,7 @@ // MyTrait<'a>>::Output: 'a` outlives `'a` (because the trait says // so). // -// check-pass +//@ check-pass trait MyTrait<'a> { type Output: 'a; diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs index 56485593c9231..0583fc72eaf8b 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs index 9695400c4009c..9c0785cc96403 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs index 9e69792d724e5..8f415a5fd7b5b 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs @@ -2,7 +2,7 @@ // `correct_region` for an explanation of how this test is setup; it's // somewhat intricate. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs index 145ae0d735b6c..520be5b91ec27 100644 --- a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zverbose-internals -// check-pass +//@ compile-flags:-Zverbose-internals +//@ check-pass // Test that we assume that universal types like `T` outlive the // function body. diff --git a/tests/ui/nll/unused-mut-issue-50343.fixed b/tests/ui/nll/unused-mut-issue-50343.fixed index 5632de1cd34de..827a90d646fb7 100644 --- a/tests/ui/nll/unused-mut-issue-50343.fixed +++ b/tests/ui/nll/unused-mut-issue-50343.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] #![allow(unused_variables)] // for rustfix diff --git a/tests/ui/nll/unused-mut-issue-50343.rs b/tests/ui/nll/unused-mut-issue-50343.rs index c849ac8c79e43..d63823ae1f74f 100644 --- a/tests/ui/nll/unused-mut-issue-50343.rs +++ b/tests/ui/nll/unused-mut-issue-50343.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] #![allow(unused_variables)] // for rustfix diff --git a/tests/ui/nll/user-annotations/ascribed-type-wf.rs b/tests/ui/nll/user-annotations/ascribed-type-wf.rs index 5db02c46ec369..ba79085ae8667 100644 --- a/tests/ui/nll/user-annotations/ascribed-type-wf.rs +++ b/tests/ui/nll/user-annotations/ascribed-type-wf.rs @@ -1,5 +1,5 @@ // Regression test for #101350. -// check-fail +//@ check-fail trait Trait { type Ty; diff --git a/tests/ui/nll/user-annotations/closure-sig.rs b/tests/ui/nll/user-annotations/closure-sig.rs index 4dbd3fd8d81e2..ef2300b99b0c9 100644 --- a/tests/ui/nll/user-annotations/closure-sig.rs +++ b/tests/ui/nll/user-annotations/closure-sig.rs @@ -1,6 +1,6 @@ // This test fails if #104478 is fixed before #104477. -// check-pass +//@ check-pass struct Printer<'a, 'b>(&'a (), &'b ()); diff --git a/tests/ui/nll/user-annotations/downcast-infer.rs b/tests/ui/nll/user-annotations/downcast-infer.rs index b27429f4d190f..0c6e0140d7a6e 100644 --- a/tests/ui/nll/user-annotations/downcast-infer.rs +++ b/tests/ui/nll/user-annotations/downcast-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that we don't try to downcast `_` when type-checking the annotation. fn main() { diff --git a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs index 36a16c8dcc680..9a6587a9a74ae 100644 --- a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs +++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/user-annotations/dump-fn-method.rs b/tests/ui/nll/user-annotations/dump-fn-method.rs index 086b2d2f6fcfc..40e705ac5384f 100644 --- a/tests/ui/nll/user-annotations/dump-fn-method.rs +++ b/tests/ui/nll/user-annotations/dump-fn-method.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs index ff5b2244e4833..433fa51fe0920 100644 --- a/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs +++ b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test is reduced from a scenario pnkfelix encountered while // bootstrapping the compiler. diff --git a/tests/ui/nll/user-annotations/issue-55219.rs b/tests/ui/nll/user-annotations/issue-55219.rs index 147413663897d..70ffb474041b8 100644 --- a/tests/ui/nll/user-annotations/issue-55219.rs +++ b/tests/ui/nll/user-annotations/issue-55219.rs @@ -3,7 +3,7 @@ // The `Self::HASH_LEN` here expands to a "self-type" where `T` is not // known. This unbound inference variable was causing an ICE. // -// check-pass +//@ check-pass pub struct Foo(T); diff --git a/tests/ui/nll/user-annotations/issue-55241.rs b/tests/ui/nll/user-annotations/issue-55241.rs index 29969c7b4c6c8..094f8da2452ac 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 +//@ run-pass pub trait Hasher { type Out: Eq; diff --git a/tests/ui/nll/user-annotations/normalization-2.rs b/tests/ui/nll/user-annotations/normalization-2.rs index be23c3b747858..dddba2265c613 100644 --- a/tests/ui/nll/user-annotations/normalization-2.rs +++ b/tests/ui/nll/user-annotations/normalization-2.rs @@ -1,6 +1,6 @@ // Make sure we honor region constraints when normalizing type annotations. -// check-fail +//@ check-fail #![feature(more_qualified_paths)] diff --git a/tests/ui/nll/user-annotations/normalization-default.rs b/tests/ui/nll/user-annotations/normalization-default.rs index fa52e6d857f6f..716211e437181 100644 --- a/tests/ui/nll/user-annotations/normalization-default.rs +++ b/tests/ui/nll/user-annotations/normalization-default.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Assoc; } impl<'a> Trait for &'a () { type Assoc = &'a (); } diff --git a/tests/ui/nll/user-annotations/normalization-infer.rs b/tests/ui/nll/user-annotations/normalization-infer.rs index 8bfc272d4ba09..574ae5650ff24 100644 --- a/tests/ui/nll/user-annotations/normalization-infer.rs +++ b/tests/ui/nll/user-annotations/normalization-infer.rs @@ -1,7 +1,7 @@ // Annnotations may contain projection types with inference variables as input. // Make sure we don't get ambiguities when normalizing them. -// check-fail +//@ check-fail // Single impl. fn test1(a: A, b: B, c: C) { diff --git a/tests/ui/nll/user-annotations/normalization-self.rs b/tests/ui/nll/user-annotations/normalization-self.rs index c18760b53cffb..ebe12b248e85c 100644 --- a/tests/ui/nll/user-annotations/normalization-self.rs +++ b/tests/ui/nll/user-annotations/normalization-self.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Assoc; } impl<'a> Trait for &'a () { type Assoc = &'a (); } diff --git a/tests/ui/nll/user-annotations/normalize-self-ty.rs b/tests/ui/nll/user-annotations/normalize-self-ty.rs index df905c8786a18..4ce68902d5dc6 100644 --- a/tests/ui/nll/user-annotations/normalize-self-ty.rs +++ b/tests/ui/nll/user-annotations/normalize-self-ty.rs @@ -2,7 +2,7 @@ // the inherent impl requires normalization to be equal to the // user-provided type. // -// check-pass +//@ check-pass trait Mirror { type Me; diff --git a/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs index 1f7c060386bd0..9e4234a701d7e 100644 --- a/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs +++ b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs @@ -1,6 +1,6 @@ // Regression test for issue #69490 -// check-pass +//@ check-pass pub trait Trait { const S: &'static str; diff --git a/tests/ui/nll/vimwiki-core-regression.rs b/tests/ui/nll/vimwiki-core-regression.rs index 0a4ed7e0a4021..f06b40a9a96fc 100644 --- a/tests/ui/nll/vimwiki-core-regression.rs +++ b/tests/ui/nll/vimwiki-core-regression.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test from crater run for // . diff --git a/tests/ui/no-capture-arc.rs b/tests/ui/no-capture-arc.rs index 3f0b075778bd9..aafb170c7e1a8 100644 --- a/tests/ui/no-capture-arc.rs +++ b/tests/ui/no-capture-arc.rs @@ -1,4 +1,4 @@ -// error-pattern: borrow of moved value +//@ error-pattern: borrow of moved value use std::sync::Arc; use std::thread; diff --git a/tests/ui/no-core-1.rs b/tests/ui/no-core-1.rs index 9374f546ac903..d6d2ba6044585 100644 --- a/tests/ui/no-core-1.rs +++ b/tests/ui/no-core-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(no_core, core)] diff --git a/tests/ui/no-core-2.rs b/tests/ui/no-core-2.rs index b08e63dc7cfeb..2f55365bdd0f3 100644 --- a/tests/ui/no-core-2.rs +++ b/tests/ui/no-core-2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_imports)] #![feature(no_core)] #![no_core] -// edition:2018 +//@ edition:2018 extern crate std; extern crate core; diff --git a/tests/ui/no-warn-on-field-replace-issue-34101.rs b/tests/ui/no-warn-on-field-replace-issue-34101.rs index 15df6d25c5da6..e1d5e9c5268b8 100644 --- a/tests/ui/no-warn-on-field-replace-issue-34101.rs +++ b/tests/ui/no-warn-on-field-replace-issue-34101.rs @@ -18,7 +18,7 @@ -// check-pass +//@ check-pass struct Foo(String); diff --git a/tests/ui/no_std/no-std-no-start-binary.rs b/tests/ui/no_std/no-std-no-start-binary.rs index ce1c871f6a691..5c8a0e6c0b8d9 100644 --- a/tests/ui/no_std/no-std-no-start-binary.rs +++ b/tests/ui/no_std/no-std-no-start-binary.rs @@ -1,5 +1,5 @@ -// compile-flags: -Cpanic=abort --emit link -// error-pattern:using `fn main` requires the standard library +//@ compile-flags: -Cpanic=abort --emit link +//@ error-pattern:using `fn main` requires the standard library // Make sure that we don't emit an error message mentioning internal lang items. diff --git a/tests/ui/no_std/no-std-unwind-binary.rs b/tests/ui/no_std/no-std-unwind-binary.rs index 7a9dfd7a48d93..74c80d75c3e1f 100644 --- a/tests/ui/no_std/no-std-unwind-binary.rs +++ b/tests/ui/no_std/no-std-unwind-binary.rs @@ -1,6 +1,6 @@ -// error-pattern:unwinding panics are not supported without std -// needs-unwind -// compile-flags: -Cpanic=unwind +//@ error-pattern:unwinding panics are not supported without std +//@ needs-unwind +//@ compile-flags: -Cpanic=unwind // Make sure that we don't emit an error message mentioning internal lang items. diff --git a/tests/ui/noexporttypeexe.rs b/tests/ui/noexporttypeexe.rs index d473ad6c9c93e..6b4402a81f00d 100644 --- a/tests/ui/noexporttypeexe.rs +++ b/tests/ui/noexporttypeexe.rs @@ -1,4 +1,4 @@ -// aux-build:noexporttypelib.rs +//@ aux-build:noexporttypelib.rs extern crate noexporttypelib; diff --git a/tests/ui/non-copyable-void.rs b/tests/ui/non-copyable-void.rs index ddaaee436ae23..8089f5e2218a0 100644 --- a/tests/ui/non-copyable-void.rs +++ b/tests/ui/non-copyable-void.rs @@ -1,4 +1,4 @@ -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/non-fmt-panic.fixed b/tests/ui/non-fmt-panic.fixed index 5191f1877a9ee..fa9a1ad89bdd8 100644 --- a/tests/ui/non-fmt-panic.fixed +++ b/tests/ui/non-fmt-panic.fixed @@ -1,7 +1,7 @@ -// run-rustfix -// rustfix-only-machine-applicable -// build-pass (FIXME(62277): should be check-pass) -// aux-build:fancy-panic.rs +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ build-pass (FIXME(62277): should be check-pass) +//@ aux-build:fancy-panic.rs extern crate fancy_panic; diff --git a/tests/ui/non-fmt-panic.rs b/tests/ui/non-fmt-panic.rs index d0d06b7977594..451a0c76018ca 100644 --- a/tests/ui/non-fmt-panic.rs +++ b/tests/ui/non-fmt-panic.rs @@ -1,7 +1,7 @@ -// run-rustfix -// rustfix-only-machine-applicable -// build-pass (FIXME(62277): should be check-pass) -// aux-build:fancy-panic.rs +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ build-pass (FIXME(62277): should be check-pass) +//@ aux-build:fancy-panic.rs extern crate fancy_panic; diff --git a/tests/ui/non_modrs_mods/foors_mod.rs b/tests/ui/non_modrs_mods/foors_mod.rs index 5bf35fbf7fb03..b215e5f09e93e 100644 --- a/tests/ui/non_modrs_mods/foors_mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // -// ignore-test: not a test, used by non_modrs_mods.rs +//@ ignore-test: not a test, used by non_modrs_mods.rs pub mod inner_modrs_mod; pub mod inner_foors_mod; diff --git a/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs b/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs index 4d8eb350bd203..cc6a1edafb406 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs index 4d8eb350bd203..cc6a1edafb406 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs b/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs index 4d8eb350bd203..cc6a1edafb406 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs index 4d8eb350bd203..cc6a1edafb406 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/mod.rs b/tests/ui/non_modrs_mods/modrs_mod/mod.rs index c8efa66d6657b..9ba6566688d67 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub mod inner_modrs_mod; pub mod inner_foors_mod; diff --git a/tests/ui/non_modrs_mods/non_modrs_mods.rs b/tests/ui/non_modrs_mods/non_modrs_mods.rs index b3fa390087f5c..acc326dd0e0f4 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 +//@ run-pass // pub mod modrs_mod; pub mod foors_mod; diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs index 7d5d5b9e5ca94..6ac58eae5e170 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod inner_modrs_mod; diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs index 04585f918fd14..89f86a58e4adc 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs index 4d8eb350bd203..cc6a1edafb406 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs b/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs index af6585aadae66..047a2e23e07e2 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) mod x; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/x.rs b/tests/ui/non_modrs_mods_and_inline_mods/x.rs index a39a7c6d9b3ee..c4548d39fad88 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/x.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/x.rs @@ -1,4 +1,4 @@ -// ignore-test: not a test +//@ ignore-test: not a test pub mod y { pub mod z; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs index e8442a47f2c77..ec7b7de78d8b7 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs @@ -1 +1 @@ -// ignore-test: not a test +//@ ignore-test: not a test diff --git a/tests/ui/nonscalar-cast.fixed b/tests/ui/nonscalar-cast.fixed index 0a4b98469b2b6..f6154222ca22f 100644 --- a/tests/ui/nonscalar-cast.fixed +++ b/tests/ui/nonscalar-cast.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/nonscalar-cast.rs b/tests/ui/nonscalar-cast.rs index 59fcf09666b24..71e7c43a1db09 100644 --- a/tests/ui/nonscalar-cast.rs +++ b/tests/ui/nonscalar-cast.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/nul-characters.rs b/tests/ui/nul-characters.rs index 11b6e9fe37646..eb83f440d3e03 100644 --- a/tests/ui/nul-characters.rs +++ b/tests/ui/nul-characters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/nullable-pointer-iotareduction.rs b/tests/ui/nullable-pointer-iotareduction.rs index 3f3a962664e44..fa837dab51b6c 100644 --- a/tests/ui/nullable-pointer-iotareduction.rs +++ b/tests/ui/nullable-pointer-iotareduction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Iota-reduction is a rule in the Calculus of (Co-)Inductive Constructions, // which "says that a destructor applied to an object built from a constructor diff --git a/tests/ui/nullable-pointer-size.rs b/tests/ui/nullable-pointer-size.rs index 0384553b6993f..aabdfa140dff6 100644 --- a/tests/ui/nullable-pointer-size.rs +++ b/tests/ui/nullable-pointer-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs index 64ff1f8b1d2df..50e8974fd7c3b 100644 --- a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs +++ b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results // regression test for issue #109567 fn f() -> f64 { diff --git a/tests/ui/numbers-arithmetic/arith-unsigned.rs b/tests/ui/numbers-arithmetic/arith-unsigned.rs index ad57d9f86453e..5a285ceca32db 100644 --- a/tests/ui/numbers-arithmetic/arith-unsigned.rs +++ b/tests/ui/numbers-arithmetic/arith-unsigned.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_comparisons)] // Unsigned integer operations diff --git a/tests/ui/numbers-arithmetic/div-mod.rs b/tests/ui/numbers-arithmetic/div-mod.rs index acb92a7df73ba..ee654e00463a0 100644 --- a/tests/ui/numbers-arithmetic/div-mod.rs +++ b/tests/ui/numbers-arithmetic/div-mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.rs b/tests/ui/numbers-arithmetic/divide-by-zero.rs index 30e0e6c1bdd4c..626daf9771ded 100644 --- a/tests/ui/numbers-arithmetic/divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to divide by zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to divide by zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { 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 260281d75a443..b61ca05495432 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 +//@ run-pass // Forces evaluation of constants, triggering hard error fn force(_: T) {} diff --git a/tests/ui/numbers-arithmetic/float-literal-inference.rs b/tests/ui/numbers-arithmetic/float-literal-inference.rs index c4645e4f8ff11..a643be3f0c1d0 100644 --- a/tests/ui/numbers-arithmetic/float-literal-inference.rs +++ b/tests/ui/numbers-arithmetic/float-literal-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { z: f64 } diff --git a/tests/ui/numbers-arithmetic/float-nan.rs b/tests/ui/numbers-arithmetic/float-nan.rs index 0cc6473e5c48c..7d1af0155da53 100644 --- a/tests/ui/numbers-arithmetic/float-nan.rs +++ b/tests/ui/numbers-arithmetic/float-nan.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let nan: f64 = f64::NAN; diff --git a/tests/ui/numbers-arithmetic/float-signature.rs b/tests/ui/numbers-arithmetic/float-signature.rs index d47280ea2e7cd..a68a1d6e6f377 100644 --- a/tests/ui/numbers-arithmetic/float-signature.rs +++ b/tests/ui/numbers-arithmetic/float-signature.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/numbers-arithmetic/float.rs b/tests/ui/numbers-arithmetic/float.rs index d55c05857b6f8..0b33a0e9f6c02 100644 --- a/tests/ui/numbers-arithmetic/float.rs +++ b/tests/ui/numbers-arithmetic/float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let pi = 3.1415927f64; println!("{}", -pi * (pi + 2.0 / pi) - pi * 5.0); diff --git a/tests/ui/numbers-arithmetic/float2.rs b/tests/ui/numbers-arithmetic/float2.rs index b1bcf8da5a324..1b7add01cc631 100644 --- a/tests/ui/numbers-arithmetic/float2.rs +++ b/tests/ui/numbers-arithmetic/float2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/float_math.rs b/tests/ui/numbers-arithmetic/float_math.rs index a2902ee56087b..2c7d8ab255a8d 100644 --- a/tests/ui/numbers-arithmetic/float_math.rs +++ b/tests/ui/numbers-arithmetic/float_math.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::{fadd_fast, fsub_fast, fmul_fast, fdiv_fast, frem_fast}; diff --git a/tests/ui/numbers-arithmetic/floatlits.rs b/tests/ui/numbers-arithmetic/floatlits.rs index 07049af315b0a..21f19b69c49e7 100644 --- a/tests/ui/numbers-arithmetic/floatlits.rs +++ b/tests/ui/numbers-arithmetic/floatlits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i128.rs b/tests/ui/numbers-arithmetic/i128.rs index d61a1ab03b6b3..890701fdd3189 100644 --- a/tests/ui/numbers-arithmetic/i128.rs +++ b/tests/ui/numbers-arithmetic/i128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/i32-sub.rs b/tests/ui/numbers-arithmetic/i32-sub.rs index 56df772b4e18a..c2aed62c96614 100644 --- a/tests/ui/numbers-arithmetic/i32-sub.rs +++ b/tests/ui/numbers-arithmetic/i32-sub.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i8-incr.rs b/tests/ui/numbers-arithmetic/i8-incr.rs index 718d259f735f4..a0f1becce2ea1 100644 --- a/tests/ui/numbers-arithmetic/i8-incr.rs +++ b/tests/ui/numbers-arithmetic/i8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs index d63ba8cb03e9a..e91141380482d 100644 --- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs +++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C overflow-checks=on -// ignore-emscripten no threads support -// needs-unwind +//@ run-pass +//@ compile-flags: -C overflow-checks=on +//@ ignore-emscripten no threads support +//@ needs-unwind use std::thread; diff --git a/tests/ui/numbers-arithmetic/int.rs b/tests/ui/numbers-arithmetic/int.rs index b496a70a6feae..edc7f72944405 100644 --- a/tests/ui/numbers-arithmetic/int.rs +++ b/tests/ui/numbers-arithmetic/int.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: isize = 10; } diff --git a/tests/ui/numbers-arithmetic/integer-literal-radix.rs b/tests/ui/numbers-arithmetic/integer-literal-radix.rs index 8f61ea17a12ac..ebccb023e600f 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-radix.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-radix.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 0xBEEF_isize; 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 80248dc223dcc..406ed4704581b 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(_: *const ()) {} diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs index bec718a3c6ae9..8d49b21861f0d 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", std::mem::size_of_val(&1)); } diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs index d177ced1a6966..97c10bc3c560b 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { fn id_i8(n: i8) -> i8 { n } diff --git a/tests/ui/numbers-arithmetic/issue-105626.rs b/tests/ui/numbers-arithmetic/issue-105626.rs index 5466f8e18d472..f942cf1283d0d 100644 --- a/tests/ui/numbers-arithmetic/issue-105626.rs +++ b/tests/ui/numbers-arithmetic/issue-105626.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86 -// compile-flags: -Ctarget-feature=+sse2 +//@ run-pass +//@ only-x86 +//@ compile-flags: -Ctarget-feature=+sse2 use std::hint::black_box; diff --git a/tests/ui/numbers-arithmetic/issue-8460-const.rs b/tests/ui/numbers-arithmetic/issue-8460-const.rs index 02e7567dafabb..223c05d72d60f 100644 --- a/tests/ui/numbers-arithmetic/issue-8460-const.rs +++ b/tests/ui/numbers-arithmetic/issue-8460-const.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-fail +//@ build-fail use std::thread; diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs index 77368b87e961c..9d3044a7ca022 100644 --- a/tests/ui/numbers-arithmetic/issue-8460.rs +++ b/tests/ui/numbers-arithmetic/issue-8460.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// needs-unwind +//@ ignore-emscripten no threads support +//@ needs-unwind #![feature(rustc_attrs)] use std::thread; diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs index 2c4bdad3e919f..654e54a159159 100644 --- a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs index 085623c9bf764..65452e2c2c294 100644 --- a/tests/ui/numbers-arithmetic/location-add-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-overflow.rs fn main() { let _: u8 = 255 + &1; diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs index 21b5e7a8110bf..8bce8ded5da61 100644 --- a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs index 7d045fc560270..180f72eb6f46c 100644 --- a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-by-zero.rs // https://github.com/rust-lang/rust/issues/114814 diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs index 88d602e4b6d97..bc4377eb67983 100644 --- a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs index 4397adb75d1f0..2f176013db2f6 100644 --- a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-by-zero.rs fn main() { let _ = 1 % &0; diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs index b042751ded9a2..33de927b03421 100644 --- a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs index 6dd58874874b3..8d93406ba5092 100644 --- a/tests/ui/numbers-arithmetic/location-mul-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-overflow.rs fn main() { let _: u8 = 255 * &2; diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs index 5b92ada2e0b0d..1bc1a9b2d66c8 100644 --- a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-assign-overflow.rs fn main() { let mut a: u8 = 0; diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs index 2d77cb8f55ea4..911b2815a00a3 100644 --- a/tests/ui/numbers-arithmetic/location-sub-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-overflow.rs fn main() { let _: u8 = 0 - &1; diff --git a/tests/ui/numbers-arithmetic/mod-zero.rs b/tests/ui/numbers-arithmetic/mod-zero.rs index 083716394124a..f3cc7c9fc88f0 100644 --- a/tests/ui/numbers-arithmetic/mod-zero.rs +++ b/tests/ui/numbers-arithmetic/mod-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to calculate the remainder with a divisor of zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to calculate the remainder with a divisor of zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs index 0e487a700b802..ef5db4995fb5f 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C debug_assertions=true -// needs-unwind -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=true +//@ needs-unwind +//@ ignore-emscripten dies with an LLVM error use std::panic; diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs index 982cd97c50ab6..f4cd8d0d63df0 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C debug_assertions=no -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=no +//@ ignore-emscripten dies with an LLVM error fn main() { for i in 129..256 { diff --git a/tests/ui/numbers-arithmetic/num-wrapping.rs b/tests/ui/numbers-arithmetic/num-wrapping.rs index 43b1059f944ee..0e649fd2d70ac 100644 --- a/tests/ui/numbers-arithmetic/num-wrapping.rs +++ b/tests/ui/numbers-arithmetic/num-wrapping.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions // // Test std::num::Wrapping for {uN, iN, usize, isize} diff --git a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs index 5798c2591a0f4..780814941db91 100644 --- a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs +++ b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file is intended to test only that methods are automatically // reachable for each numeric type, for each exported impl, with no imports // necessary. Testing the methods of the impls is done within the source diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs index 318be2a6401bc..fae5c689031b0 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=true +//@ run-pass +//@ compile-flags: -C overflow_checks=true #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs index 0367d980a64c5..0af3868929a8e 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=false +//@ run-pass +//@ compile-flags: -C overflow_checks=false #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs index c45b44966edb4..16583f6eb749f 100644 --- a/tests/ui/numbers-arithmetic/overflowing-add.rs +++ b/tests/ui/numbers-arithmetic/overflowing-add.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to add with overflow -// compile-flags: -C debug-assertions -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to add with overflow +//@ compile-flags: -C debug-assertions +//@ ignore-emscripten no processes #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs index 7f8b0c877600f..0d300709be21f 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs index 76718ecd1fa7a..6d7be30d3027d 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs index b2bdd09bffb91..65f536f627d49 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs index 1042bfcb34d3d..f1943c0f439b6 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our automatic truncation does not // sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs index ec5279d321cdb..59575d2e86e07 100644 --- a/tests/ui/numbers-arithmetic/overflowing-mul.rs +++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs index dabb0d50cbb5a..dc3b6c280f340 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg.rs b/tests/ui/numbers-arithmetic/overflowing-neg.rs index 530243753934f..ab49662b98f9f 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs index c2c8cad5f0b78..69e22c2262a3a 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2i32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index 4a0f9abd982ea..f980033c480e1 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2u32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs index 80593c8656f51..20971e4807e15 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs index 917352bfce417..c9829ad27938e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs index 1e052990a7630..e2de731e9abd7 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs index be918becd3a3a..9efa1164012cb 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our (type-based) automatic // truncation does not sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs index f75e779ed158c..8088ee58ea822 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs index 119d80748027b..44aadf6b3e70e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-sub.rs +++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to subtract with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to subtract with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.rs b/tests/ui/numbers-arithmetic/promoted_overflow.rs index ba168f773d856..96c5f3b87e18c 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow.rs @@ -1,12 +1,12 @@ #![allow(arithmetic_overflow)] -// run-fail -// error-pattern: overflow -// compile-flags: -C overflow-checks=yes +//@ run-fail +//@ error-pattern: overflow +//@ compile-flags: -C overflow-checks=yes // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it -// compile-flags:-Cstrip=none +//@ compile-flags:-Cstrip=none fn main() { let x: &'static u32 = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs index 76279e91308e8..7004c9a366509 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// compile-flags: -O +//@ compile-flags: -O fn main() { let x = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs index 088b2fcdd144d..4b176ef5caa60 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) // Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction. // diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs index cad05917391be..8f1fe59ddc59b 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs @@ -1,6 +1,6 @@ -// run-pass -// only-wasm32 -// compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint +//@ run-pass +//@ only-wasm32 +//@ compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts.rs b/tests/ui/numbers-arithmetic/saturating-float-casts.rs index cc248a9bea087..3a1af09d2d423 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=0 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=0 #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/shift-near-oflo.rs b/tests/ui/numbers-arithmetic/shift-near-oflo.rs index 55006a1134297..5cca31af0e38e 100644 --- a/tests/ui/numbers-arithmetic/shift-near-oflo.rs +++ b/tests/ui/numbers-arithmetic/shift-near-oflo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions // Check that we do *not* overflow on a number of edge cases. // (compare with test/run-fail/overflowing-{lsh,rsh}*.rs) diff --git a/tests/ui/numbers-arithmetic/shift-various-types.rs b/tests/ui/numbers-arithmetic/shift-various-types.rs index 473bda3d76e07..f046820ad9008 100644 --- a/tests/ui/numbers-arithmetic/shift-various-types.rs +++ b/tests/ui/numbers-arithmetic/shift-various-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can do shifts by any integral type. diff --git a/tests/ui/numbers-arithmetic/shift.rs b/tests/ui/numbers-arithmetic/shift.rs index 2fc77928ef17d..beb4f29381159 100644 --- a/tests/ui/numbers-arithmetic/shift.rs +++ b/tests/ui/numbers-arithmetic/shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs index 6d0462b460e43..dda54e2a579b5 100644 --- a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs +++ b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed index 9278262a6ffee..da5f396a72c0f 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.rs b/tests/ui/numbers-arithmetic/suggest-float-literal.rs index 59e67f8d33e00..4e95ca4b51ede 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.rs +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/u128-as-f32.rs b/tests/ui/numbers-arithmetic/u128-as-f32.rs index 839ce932d9e76..88579f507eb75 100644 --- a/tests/ui/numbers-arithmetic/u128-as-f32.rs +++ b/tests/ui/numbers-arithmetic/u128-as-f32.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/u128.rs b/tests/ui/numbers-arithmetic/u128.rs index d7e28055b2154..81451df6a726e 100644 --- a/tests/ui/numbers-arithmetic/u128.rs +++ b/tests/ui/numbers-arithmetic/u128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/u32-decr.rs b/tests/ui/numbers-arithmetic/u32-decr.rs index d9e097818771d..2f68cf6f96160 100644 --- a/tests/ui/numbers-arithmetic/u32-decr.rs +++ b/tests/ui/numbers-arithmetic/u32-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr-decr.rs b/tests/ui/numbers-arithmetic/u8-incr-decr.rs index b16ec011d06b3..a3b86c531f3e0 100644 --- a/tests/ui/numbers-arithmetic/u8-incr-decr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr.rs b/tests/ui/numbers-arithmetic/u8-incr.rs index 5242acf5b98c4..dd5d1680fac5b 100644 --- a/tests/ui/numbers-arithmetic/u8-incr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/uint.rs b/tests/ui/numbers-arithmetic/uint.rs index d219eae8f333e..c64361c2726c7 100644 --- a/tests/ui/numbers-arithmetic/uint.rs +++ b/tests/ui/numbers-arithmetic/uint.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: usize = 10 as usize; } diff --git a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs index a4d0a849484ec..5e753fd257f39 100644 --- a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 1; diff --git a/tests/ui/numeric/numeric-cast-binop.fixed b/tests/ui/numeric/numeric-cast-binop.fixed index edb085e71d324..ca776d1b13dff 100644 --- a/tests/ui/numeric/numeric-cast-binop.fixed +++ b/tests/ui/numeric/numeric-cast-binop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast-binop.rs b/tests/ui/numeric/numeric-cast-binop.rs index c1ed8de8ad8c3..498d486eb6f90 100644 --- a/tests/ui/numeric/numeric-cast-binop.rs +++ b/tests/ui/numeric/numeric-cast-binop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast.fixed b/tests/ui/numeric/numeric-cast.fixed index cf0560a107772..d5d25bbb57c16 100644 --- a/tests/ui/numeric/numeric-cast.fixed +++ b/tests/ui/numeric/numeric-cast.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast.rs b/tests/ui/numeric/numeric-cast.rs index 7bddfc5090535..5a799f617e4a1 100644 --- a/tests/ui/numeric/numeric-cast.rs +++ b/tests/ui/numeric/numeric-cast.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed index 6e8c54df4b607..e3b613cc3f641 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs index b47b0ed02e7c8..3b384e763107f 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed index 03821cd447057..0fcda6c1f8067 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs index 629fe7e742c3e..9c912bc38dad9 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed index faed65ca410ed..23e7cf780e9a3 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs index df0b4cb620435..5d6fd4d932ac4 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed index 5955829e72c2c..2dd7d9aabdb57 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs index 5c303036a79b8..46bbb03318540 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed index 4623c211c1c0b..2dea195f09810 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs index 3e9995c7496ac..6fca089b07d49 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed index 6cb5243ca84dc..63422c305d357 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs index a2304ba26c68a..4d20e4fc8431d 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed index 69934db217b62..270afb639575d 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs index dabf43f82046f..05be58e335bca 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/uppercase-base-prefix.fixed b/tests/ui/numeric/uppercase-base-prefix.fixed index 1b1c837ec5040..8ddf01f73b4dc 100644 --- a/tests/ui/numeric/uppercase-base-prefix.fixed +++ b/tests/ui/numeric/uppercase-base-prefix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Checks that integers with an uppercase base prefix (0B, 0X, 0O) have a nice error #![allow(unused_variables)] diff --git a/tests/ui/numeric/uppercase-base-prefix.rs b/tests/ui/numeric/uppercase-base-prefix.rs index 233d553da6585..ae423eec5934e 100644 --- a/tests/ui/numeric/uppercase-base-prefix.rs +++ b/tests/ui/numeric/uppercase-base-prefix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Checks that integers with an uppercase base prefix (0B, 0X, 0O) have a nice error #![allow(unused_variables)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs index 467767ae59d76..edbd9f35d4dfa 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that `Box` is equivalent to `Box`, both in // fields and fn arguments. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs index 339f3356bd71e..8defe20f5f414 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs @@ -1,7 +1,7 @@ // Test that `dyn Bar` uses `'static` as the default object // lifetime bound for the type `XX`. // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs index e1a865fa50399..986fc83679934 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] 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 b61083078ccdb..3c88f2b9f3765 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,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `Box` struct. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs index a09fc03ab9b44..412695f708670 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] 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 d3e92e1624696..591f843a284a2 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,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `MyBox` struct. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs index 5093b1c27d0ea..bc47b8d46a11e 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs index 8a1156b8fc8ad..53b9c4886450e 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that even with prior inferred parameters, object lifetimes of objects after are still // valid. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![feature(generic_arg_infer)] diff --git a/tests/ui/object-safety/assoc_const_bounds.rs b/tests/ui/object-safety/assoc_const_bounds.rs index bfa21fd9aeacb..32c4de1981b2d 100644 --- a/tests/ui/object-safety/assoc_const_bounds.rs +++ b/tests/ui/object-safety/assoc_const_bounds.rs @@ -1,7 +1,7 @@ #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] -// check-pass +//@ check-pass trait Foo { const BAR: bool diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.rs b/tests/ui/object-safety/assoc_const_bounds_sized.rs index 87d1f06f0363b..1272a735e83de 100644 --- a/tests/ui/object-safety/assoc_const_bounds_sized.rs +++ b/tests/ui/object-safety/assoc_const_bounds_sized.rs @@ -1,7 +1,7 @@ #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] -// check-pass +//@ check-pass trait Foo { const BAR: bool diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed index 52046a8ab693d..88697bad4d752 100644 --- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed +++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait TraitWithAType { type Item: ?Sized; diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs index 96620c0abda34..944b296aa4d38 100644 --- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs +++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait TraitWithAType { type Item; diff --git a/tests/ui/object-safety/assoc_type_bounds_sized.rs b/tests/ui/object-safety/assoc_type_bounds_sized.rs index 6d10ceeb1b4c3..7535871afe51a 100644 --- a/tests/ui/object-safety/assoc_type_bounds_sized.rs +++ b/tests/ui/object-safety/assoc_type_bounds_sized.rs @@ -1,7 +1,7 @@ //! This test checks that associated types only need to be //! mentioned in trait objects, if they don't require `Self: Sized`. -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs index 34daa81e48ea5..711bed808cc87 100644 --- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs +++ b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.rs b/tests/ui/object-safety/avoid-ice-on-warning-2.rs index eabfd31dda66b..db2f4aea05b58 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-2.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning-2.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 fn id(f: Copy) -> usize { //~^ ERROR the trait `Copy` cannot be made into an object //~| ERROR: the size for values of type `(dyn Copy + 'static)` diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.rs b/tests/ui/object-safety/avoid-ice-on-warning-3.rs index 40563e233dec6..38bee8142bb9a 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-3.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning-3.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 trait B { fn f(a: A) -> A; } //~^ ERROR the trait `A` cannot be made into an object //[old]~| WARN trait objects without an explicit `dyn` are deprecated diff --git a/tests/ui/object-safety/avoid-ice-on-warning.rs b/tests/ui/object-safety/avoid-ice-on-warning.rs index 5192da94216e1..b90d8911d500b 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 fn call_this(f: F) : Fn(&str) + call_that {} //~^ ERROR return types are denoted using `->` //~| ERROR cannot find trait `call_that` in this scope diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed index 301c36c619139..aee05f5e51211 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed @@ -1,7 +1,7 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 -//[new] run-rustfix +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 +//@[new] run-rustfix // FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` #![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs index 64586b77b8c2b..e927b510b9da8 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs @@ -1,7 +1,7 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 -//[new] run-rustfix +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 +//@[new] run-rustfix // FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` #![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] diff --git a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs index 21dda7b8c9bd8..b84458491698c 100644 --- a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs +++ b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver trait Foo { type Bar<'a> diff --git a/tests/ui/object-safety/issue-102762.rs b/tests/ui/object-safety/issue-102762.rs index ed0bee5d37e77..576f73e08bcf9 100644 --- a/tests/ui/object-safety/issue-102762.rs +++ b/tests/ui/object-safety/issue-102762.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // This test checks that the `where_clauses_object_safety` lint does not cause // other object safety *hard errors* to be suppressed, because we currently // only emit one object safety error per trait... diff --git a/tests/ui/object-safety/issue-102933.rs b/tests/ui/object-safety/issue-102933.rs index 843391cffb273..aa678fea17620 100644 --- a/tests/ui/object-safety/issue-102933.rs +++ b/tests/ui/object-safety/issue-102933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::future::Future; diff --git a/tests/ui/object-safety/issue-106247.rs b/tests/ui/object-safety/issue-106247.rs index 64bf59e5d3aa5..78bae56816199 100644 --- a/tests/ui/object-safety/issue-106247.rs +++ b/tests/ui/object-safety/issue-106247.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(where_clauses_object_safety)] diff --git a/tests/ui/object-safety/object-safety-associated-consts.rs b/tests/ui/object-safety/object-safety-associated-consts.rs index 622f3a0f92e7c..a090214bbb404 100644 --- a/tests/ui/object-safety/object-safety-associated-consts.rs +++ b/tests/ui/object-safety/object-safety-associated-consts.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with associated consts. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-by-value-self.rs b/tests/ui/object-safety/object-safety-by-value-self.rs index c74a4d1cbbbfc..0d20032327cae 100644 --- a/tests/ui/object-safety/object-safety-by-value-self.rs +++ b/tests/ui/object-safety/object-safety-by-value-self.rs @@ -1,6 +1,6 @@ // Check that a trait with by-value self is considered object-safe. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(trivial_casts)] diff --git a/tests/ui/object-safety/object-safety-generics.rs b/tests/ui/object-safety/object-safety-generics.rs index 4528b4ea6e0d4..f005a689ac45c 100644 --- a/tests/ui/object-safety/object-safety-generics.rs +++ b/tests/ui/object-safety/object-safety-generics.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with generic methods, unless `where Self : Sized` is // present. -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-mentions-Self.rs b/tests/ui/object-safety/object-safety-mentions-Self.rs index 91582aa6a048e..1311faf97bc36 100644 --- a/tests/ui/object-safety/object-safety-mentions-Self.rs +++ b/tests/ui/object-safety/object-safety-mentions-Self.rs @@ -2,7 +2,7 @@ // form traits that make use of `Self` in an argument or return // position, unless `where Self : Sized` is present.. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-no-static.rs b/tests/ui/object-safety/object-safety-no-static.rs index abfaa11c9e47f..4f4e03d734e8e 100644 --- a/tests/ui/object-safety/object-safety-no-static.rs +++ b/tests/ui/object-safety/object-safety-no-static.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with static methods. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-phantom-fn.rs b/tests/ui/object-safety/object-safety-phantom-fn.rs index 3ffeb81c1cbe3..1019c24859fba 100644 --- a/tests/ui/object-safety/object-safety-phantom-fn.rs +++ b/tests/ui/object-safety/object-safety-phantom-fn.rs @@ -1,6 +1,6 @@ // Check that `Self` appearing in a phantom fn does not make a trait not object safe. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Baz { diff --git a/tests/ui/object-safety/object-safety-sized-2.rs b/tests/ui/object-safety/object-safety-sized-2.rs index 607b7c68f7f38..cfb5d588d70df 100644 --- a/tests/ui/object-safety/object-safety-sized-2.rs +++ b/tests/ui/object-safety/object-safety-sized-2.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits where `Self : Sized`. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-sized.rs b/tests/ui/object-safety/object-safety-sized.rs index ab7aa57611d68..f4d6c945b33d5 100644 --- a/tests/ui/object-safety/object-safety-sized.rs +++ b/tests/ui/object-safety/object-safety-sized.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits where `Self : Sized`. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/objects-coerce-freeze-borrored.rs b/tests/ui/objects-coerce-freeze-borrored.rs index 704d77480b852..e122bb9938061 100644 --- a/tests/ui/objects-coerce-freeze-borrored.rs +++ b/tests/ui/objects-coerce-freeze-borrored.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can coerce an `@Object` to an `&Object` diff --git a/tests/ui/offset-of/offset-of-must-use.rs b/tests/ui/offset-of/offset-of-must-use.rs index e4b092fcedf3b..f0c242891d8f9 100644 --- a/tests/ui/offset-of/offset-of-must-use.rs +++ b/tests/ui/offset-of/offset-of-must-use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/offset-of/offset-of-tuple-nested.rs b/tests/ui/offset-of/offset-of-tuple-nested.rs index 212176b24271a..4a58b7167cb7c 100644 --- a/tests/ui/offset-of/offset-of-tuple-nested.rs +++ b/tests/ui/offset-of/offset-of-tuple-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for issue #112204 -- make sure this goes through the entire compilation pipeline, // similar to why `offset-of-unsized.rs` is also build-pass diff --git a/tests/ui/offset-of/offset-of-unsized.rs b/tests/ui/offset-of/offset-of-unsized.rs index b70529ed7b85e..5a84adcb9e511 100644 --- a/tests/ui/offset-of/offset-of-unsized.rs +++ b/tests/ui/offset-of/offset-of-unsized.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // regression test for #112051, not in `offset-of-dst` as the issue is in codegen, // and isn't triggered in the presence of typeck errors diff --git a/tests/ui/offset-of/offset-of-unstable-with-feature.rs b/tests/ui/offset-of/offset-of-unstable-with-feature.rs index be275564a0a4f..c9d4f30e99a20 100644 --- a/tests/ui/offset-of/offset-of-unstable-with-feature.rs +++ b/tests/ui/offset-of/offset-of-unstable-with-feature.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:offset-of-staged-api.rs +//@ check-pass +//@ aux-build:offset-of-staged-api.rs #![feature(offset_of_nested, unstable_test_feature)] diff --git a/tests/ui/offset-of/offset-of-unstable.rs b/tests/ui/offset-of/offset-of-unstable.rs index da0882abd2286..ab6f89ce52a53 100644 --- a/tests/ui/offset-of/offset-of-unstable.rs +++ b/tests/ui/offset-of/offset-of-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:offset-of-staged-api.rs +//@ aux-build:offset-of-staged-api.rs #![feature(offset_of_nested)] diff --git a/tests/ui/on-unimplemented/no-debug.rs b/tests/ui/on-unimplemented/no-debug.rs index bdc80c5b357e4..65a6a8e44b4bc 100644 --- a/tests/ui/on-unimplemented/no-debug.rs +++ b/tests/ui/on-unimplemented/no-debug.rs @@ -1,4 +1,4 @@ -// aux-build:no_debug.rs +//@ aux-build:no_debug.rs extern crate no_debug; diff --git a/tests/ui/oom_unwind.rs b/tests/ui/oom_unwind.rs index 21a8fb2b22bee..be5e63d430b70 100644 --- a/tests/ui/oom_unwind.rs +++ b/tests/ui/oom_unwind.rs @@ -1,8 +1,8 @@ -// compile-flags: -Z oom=panic -// run-pass -// no-prefer-dynamic -// needs-unwind -// only-linux +//@ compile-flags: -Z oom=panic +//@ run-pass +//@ no-prefer-dynamic +//@ needs-unwind +//@ only-linux use std::hint::black_box; use std::mem::forget; diff --git a/tests/ui/op-assign-builtins-by-ref.rs b/tests/ui/op-assign-builtins-by-ref.rs index 96853854d6cc9..73788da92321c 100644 --- a/tests/ui/op-assign-builtins-by-ref.rs +++ b/tests/ui/op-assign-builtins-by-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // test compound assignment operators with ref as right-hand side, diff --git a/tests/ui/opeq.rs b/tests/ui/opeq.rs index 9737be97fa372..956ea0684fa70 100644 --- a/tests/ui/opeq.rs +++ b/tests/ui/opeq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x: isize = 1; diff --git a/tests/ui/optimization-fuel-0.rs b/tests/ui/optimization-fuel-0.rs index 77c727ad0f7be..cbcb1d329a3c9 100644 --- a/tests/ui/optimization-fuel-0.rs +++ b/tests/ui/optimization-fuel-0.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![crate_name="foo"] use std::mem::size_of; -// compile-flags: -Z fuel=foo=0 +//@ compile-flags: -Z fuel=foo=0 #[allow(dead_code)] struct S1(u8, u16, u8); diff --git a/tests/ui/optimization-fuel-1.rs b/tests/ui/optimization-fuel-1.rs index 8b3d139201eeb..97edb0bd25959 100644 --- a/tests/ui/optimization-fuel-1.rs +++ b/tests/ui/optimization-fuel-1.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![crate_name="foo"] use std::mem::size_of; -// compile-flags: -Z fuel=foo=1 +//@ compile-flags: -Z fuel=foo=1 #[allow(dead_code)] struct S1(u8, u16, u8); diff --git a/tests/ui/optimization-remark.rs b/tests/ui/optimization-remark.rs index 8fd30466f43c9..ebcf3b40ab250 100644 --- a/tests/ui/optimization-remark.rs +++ b/tests/ui/optimization-remark.rs @@ -1,20 +1,20 @@ -// build-pass -// ignore-pass -// revisions: all inline merge1 merge2 -// compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2 +//@ build-pass +//@ ignore-pass +//@ revisions: all inline merge1 merge2 +//@ compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2 // // Check that remarks can be enabled individually or with "all": // -// [all] compile-flags: -Cremark=all -// [inline] compile-flags: -Cremark=inline +//@ [all] compile-flags: -Cremark=all +//@ [inline] compile-flags: -Cremark=inline // // Check that values of -Cremark flag are accumulated: // -// [merge1] compile-flags: -Cremark=all -Cremark=giraffe -// [merge2] compile-flags: -Cremark=inline -Cremark=giraffe +//@ [merge1] compile-flags: -Cremark=all -Cremark=giraffe +//@ [merge2] compile-flags: -Cremark=inline -Cremark=giraffe // -// error-pattern: inline (missed): 'f' not inlined into 'g' -// dont-check-compiler-stderr +//@ error-pattern: inline (missed): 'f' not inlined into 'g' +//@ dont-check-compiler-stderr #[no_mangle] #[inline(never)] diff --git a/tests/ui/or-patterns/basic-switch.rs b/tests/ui/or-patterns/basic-switch.rs index 674fbc3cc99fc..479cddbe142c5 100644 --- a/tests/ui/or-patterns/basic-switch.rs +++ b/tests/ui/or-patterns/basic-switch.rs @@ -1,7 +1,7 @@ // Test basic or-patterns when the target pattern type will be lowered to a // `Switch` (an `enum`). -// run-pass +//@ run-pass #[derive(Debug)] enum Test { diff --git a/tests/ui/or-patterns/basic-switchint.rs b/tests/ui/or-patterns/basic-switchint.rs index adb902caf011d..e4efef597300c 100644 --- a/tests/ui/or-patterns/basic-switchint.rs +++ b/tests/ui/or-patterns/basic-switchint.rs @@ -1,7 +1,7 @@ // Test basic or-patterns when the target pattern type will be lowered to // a `SwitchInt`. This will happen when the target type is an integer. -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] enum MatchArm { diff --git a/tests/ui/or-patterns/bindings-runpass-1.rs b/tests/ui/or-patterns/bindings-runpass-1.rs index 3406d5197c497..7bb34f72eccaa 100644 --- a/tests/ui/or-patterns/bindings-runpass-1.rs +++ b/tests/ui/or-patterns/bindings-runpass-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn two_bindings(x: &((bool, bool), u8)) -> u8 { match x { diff --git a/tests/ui/or-patterns/bindings-runpass-2.rs b/tests/ui/or-patterns/bindings-runpass-2.rs index 5b9bb748c7cee..657d7f1ed189f 100644 --- a/tests/ui/or-patterns/bindings-runpass-2.rs +++ b/tests/ui/or-patterns/bindings-runpass-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn or_at(x: Result) -> u32 { match x { diff --git a/tests/ui/or-patterns/box-patterns.rs b/tests/ui/or-patterns/box-patterns.rs index 73051401c181e..6a3d048f8a6cc 100644 --- a/tests/ui/or-patterns/box-patterns.rs +++ b/tests/ui/or-patterns/box-patterns.rs @@ -1,6 +1,6 @@ // Test or-patterns with box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/or-patterns/consistent-bindings.rs b/tests/ui/or-patterns/consistent-bindings.rs index ecae1d8a2732a..75cc24e33361f 100644 --- a/tests/ui/or-patterns/consistent-bindings.rs +++ b/tests/ui/or-patterns/consistent-bindings.rs @@ -1,8 +1,8 @@ // Check that or-patterns with consistent bindings across arms are allowed. -// edition:2018 +//@ edition:2018 -// check-pass +//@ check-pass fn main() { // One level: diff --git a/tests/ui/or-patterns/const-fn.rs b/tests/ui/or-patterns/const-fn.rs index ca512ac711905..92894aa4d1718 100644 --- a/tests/ui/or-patterns/const-fn.rs +++ b/tests/ui/or-patterns/const-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn foo((Ok(a) | Err(a)): Result) { let x = Ok(3); diff --git a/tests/ui/or-patterns/exhaustiveness-pass.rs b/tests/ui/or-patterns/exhaustiveness-pass.rs index a52e08c507d8a..a80c6bdec20b3 100644 --- a/tests/ui/or-patterns/exhaustiveness-pass.rs +++ b/tests/ui/or-patterns/exhaustiveness-pass.rs @@ -1,6 +1,6 @@ #![deny(unreachable_patterns)] -// check-pass +//@ check-pass // We wrap patterns in a tuple because top-level or-patterns were special-cased. fn main() { diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.fixed b/tests/ui/or-patterns/fn-param-wrap-parens.fixed index b9490aaf9de05..7b0bbd04d9784 100644 --- a/tests/ui/or-patterns/fn-param-wrap-parens.fixed +++ b/tests/ui/or-patterns/fn-param-wrap-parens.fixed @@ -1,6 +1,6 @@ // Test the suggestion to wrap an or-pattern as a function parameter in parens. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.rs b/tests/ui/or-patterns/fn-param-wrap-parens.rs index 8e703d274c785..dadbb8a906a7b 100644 --- a/tests/ui/or-patterns/fn-param-wrap-parens.rs +++ b/tests/ui/or-patterns/fn-param-wrap-parens.rs @@ -1,6 +1,6 @@ // Test the suggestion to wrap an or-pattern as a function parameter in parens. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/for-loop.rs b/tests/ui/or-patterns/for-loop.rs index 11b61cb69f1d2..4fa8b766521fc 100644 --- a/tests/ui/or-patterns/for-loop.rs +++ b/tests/ui/or-patterns/for-loop.rs @@ -1,5 +1,5 @@ // Check that or patterns are lowered correctly in `for` loops. -// run-pass +//@ run-pass fn main() { let v = vec![Ok(2), Err(3), Ok(5)]; diff --git a/tests/ui/or-patterns/if-let-while-let.rs b/tests/ui/or-patterns/if-let-while-let.rs index 92a1bb256668b..609c59f4a3e09 100644 --- a/tests/ui/or-patterns/if-let-while-let.rs +++ b/tests/ui/or-patterns/if-let-while-let.rs @@ -1,5 +1,5 @@ // Check that or patterns are lowered correctly in `if let` and `while let` expressions. -// run-pass +//@ run-pass fn main() { let mut opt = Some(3); diff --git a/tests/ui/or-patterns/inner-or-pat.rs b/tests/ui/or-patterns/inner-or-pat.rs index f4cf4b0c18890..ceb0a8b3f7969 100644 --- a/tests/ui/or-patterns/inner-or-pat.rs +++ b/tests/ui/or-patterns/inner-or-pat.rs @@ -1,7 +1,7 @@ -// revisions: or1 or2 or3 or4 or5 -// [or1] run-pass -// [or2] run-pass -// [or5] run-pass +//@ revisions: or1 or2 or3 or4 or5 +//@ [or1] run-pass +//@ [or2] run-pass +//@ [or5] run-pass #![allow(unreachable_patterns)] #![allow(unused_variables)] diff --git a/tests/ui/or-patterns/issue-67514-irrefutable-param.rs b/tests/ui/or-patterns/issue-67514-irrefutable-param.rs index 73931def89584..256366e97a834 100644 --- a/tests/ui/or-patterns/issue-67514-irrefutable-param.rs +++ b/tests/ui/or-patterns/issue-67514-irrefutable-param.rs @@ -1,6 +1,6 @@ // Check that we don't ICE for irrefutable or-patterns in function parameters -// check-pass +//@ check-pass fn foo((Some(_) | None): Option) {} diff --git a/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs b/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs index 7339a7e23f9e2..54970e5c34c5d 100644 --- a/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs +++ b/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum MyEnum { FirstCase(u8), diff --git a/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs b/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs index 408ac24f39a49..fc6f9abc4ac85 100644 --- a/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs +++ b/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let (0 | (1 | _)) = 0; diff --git a/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs b/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs index 8a3c640b10dee..7d62364a6aeec 100644 --- a/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs +++ b/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] diff --git a/tests/ui/or-patterns/let-pattern.rs b/tests/ui/or-patterns/let-pattern.rs index 97207e83e2e65..f6ec0363311c4 100644 --- a/tests/ui/or-patterns/let-pattern.rs +++ b/tests/ui/or-patterns/let-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn or_pat_let(x: Result) -> u32 { let (Ok(y) | Err(y)) = x; diff --git a/tests/ui/or-patterns/macro-pat.rs b/tests/ui/or-patterns/macro-pat.rs index 20d8f84c24743..f5988e0b00d94 100644 --- a/tests/ui/or-patterns/macro-pat.rs +++ b/tests/ui/or-patterns/macro-pat.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 use Foo::*; diff --git a/tests/ui/or-patterns/mismatched-bindings-async-fn.rs b/tests/ui/or-patterns/mismatched-bindings-async-fn.rs index d1cb73aafa0c0..1751a9e7be89d 100644 --- a/tests/ui/or-patterns/mismatched-bindings-async-fn.rs +++ b/tests/ui/or-patterns/mismatched-bindings-async-fn.rs @@ -1,5 +1,5 @@ // Regression test for #71297 -// edition:2018 +//@ edition:2018 async fn a((x | s): String) {} //~^ ERROR variable `x` is not bound in all patterns diff --git a/tests/ui/or-patterns/missing-bindings.rs b/tests/ui/or-patterns/missing-bindings.rs index 20844c17ec1a3..8d1aef5d1fcc4 100644 --- a/tests/ui/or-patterns/missing-bindings.rs +++ b/tests/ui/or-patterns/missing-bindings.rs @@ -1,6 +1,6 @@ // This test ensures that or patterns do not allow missing bindings in any of the arms. -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/or-patterns/mix-with-wild.rs b/tests/ui/or-patterns/mix-with-wild.rs index d9911cda1b685..4577cba7a7d6c 100644 --- a/tests/ui/or-patterns/mix-with-wild.rs +++ b/tests/ui/or-patterns/mix-with-wild.rs @@ -3,7 +3,7 @@ // 1) The Wild pattern should cause the pattern to always succeed. // 2) or-patterns should work with simplifyable patterns. -// run-pass +//@ run-pass pub fn test(x: Option) -> bool { match x { diff --git a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs index df6aab0e6a885..3ca4d50be313b 100644 --- a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs +++ b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs @@ -1,6 +1,6 @@ // Test that or-patterns are pass-through with respect to default binding modes. -// check-pass +//@ check-pass #![allow(irrefutable_let_patterns)] #![allow(dropping_copy_types)] diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs b/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs index a624cbc899ffc..7a94c96b79d89 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs @@ -1,6 +1,6 @@ // Test that :pat doesn't accept top-level or-patterns in edition 2018. -// edition:2018 +//@ edition:2018 fn main() {} 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 c0d148d92042f..040f03c08b4fb 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs @@ -1,7 +1,7 @@ // Tests that :pat in macros in edition 2021 allows top-level or-patterns. -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 macro_rules! accept_pat { ($p:pat) => {}; diff --git a/tests/ui/or-patterns/or-patterns-syntactic-pass.rs b/tests/ui/or-patterns/or-patterns-syntactic-pass.rs index 92750bec8b20c..6a8d0a5adb490 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass.rs @@ -1,7 +1,7 @@ // Here we test all the places `|` is *syntactically* allowed. // This is not a semantic test. We only test parsing. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/or-patterns/remove-leading-vert.fixed b/tests/ui/or-patterns/remove-leading-vert.fixed index b1cd0a94437f6..8f7aab6a4991b 100644 --- a/tests/ui/or-patterns/remove-leading-vert.fixed +++ b/tests/ui/or-patterns/remove-leading-vert.fixed @@ -1,6 +1,6 @@ // Test the suggestion to remove a leading, or trailing `|`. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/remove-leading-vert.rs b/tests/ui/or-patterns/remove-leading-vert.rs index dc12382aa3a23..2aeeb0e979f6d 100644 --- a/tests/ui/or-patterns/remove-leading-vert.rs +++ b/tests/ui/or-patterns/remove-leading-vert.rs @@ -1,6 +1,6 @@ // Test the suggestion to remove a leading, or trailing `|`. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/search-via-bindings.rs b/tests/ui/or-patterns/search-via-bindings.rs index d98606deda570..a760112f1d421 100644 --- a/tests/ui/or-patterns/search-via-bindings.rs +++ b/tests/ui/or-patterns/search-via-bindings.rs @@ -1,6 +1,6 @@ // Check that we expand multiple or-patterns from left to right. -// run-pass +//@ run-pass fn search(target: (bool, bool, bool)) -> u32 { let x = ((false, true), (false, true), (false, true)); diff --git a/tests/ui/or-patterns/slice-patterns.rs b/tests/ui/or-patterns/slice-patterns.rs index ed5eace0b7e6c..464d0b2ddda93 100644 --- a/tests/ui/or-patterns/slice-patterns.rs +++ b/tests/ui/or-patterns/slice-patterns.rs @@ -1,6 +1,6 @@ // Test or-patterns with slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] enum MatchArm { diff --git a/tests/ui/or-patterns/struct-like.rs b/tests/ui/or-patterns/struct-like.rs index 7de690d2d816a..13a3c0ee0e3f4 100644 --- a/tests/ui/or-patterns/struct-like.rs +++ b/tests/ui/or-patterns/struct-like.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] enum Other { diff --git a/tests/ui/orphan-check-diagnostics.rs b/tests/ui/orphan-check-diagnostics.rs index c8803b9ae5d82..4b6557fc9c8e9 100644 --- a/tests/ui/orphan-check-diagnostics.rs +++ b/tests/ui/orphan-check-diagnostics.rs @@ -1,4 +1,4 @@ -// aux-build:orphan-check-diagnostics.rs +//@ aux-build:orphan-check-diagnostics.rs // See issue #22388. diff --git a/tests/ui/osx-frameworks.rs b/tests/ui/osx-frameworks.rs index 958183ec0d73e..b0d7a3a9c07af 100644 --- a/tests/ui/osx-frameworks.rs +++ b/tests/ui/osx-frameworks.rs @@ -1,4 +1,4 @@ -// ignore-macos this is supposed to succeed on osx +//@ ignore-macos this is supposed to succeed on osx #[link(name = "foo", kind = "framework")] extern "C" {} diff --git a/tests/ui/out-pointer-aliasing.rs b/tests/ui/out-pointer-aliasing.rs index b28a091017976..0dfaa19fadb0f 100644 --- a/tests/ui/out-pointer-aliasing.rs +++ b/tests/ui/out-pointer-aliasing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] pub struct Foo { diff --git a/tests/ui/output-slot-variants.rs b/tests/ui/output-slot-variants.rs index 7c20a2b2f94e8..c545b2504cb8f 100644 --- a/tests/ui/output-slot-variants.rs +++ b/tests/ui/output-slot-variants.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unknown_lints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_assignment)] #![allow(unused_variables)] diff --git a/tests/ui/over-constrained-vregs.rs b/tests/ui/over-constrained-vregs.rs index cc808147600b7..016a667e93785 100644 --- a/tests/ui/over-constrained-vregs.rs +++ b/tests/ui/over-constrained-vregs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Regression test for issue #152. diff --git a/tests/ui/overloaded/fixup-deref-mut.rs b/tests/ui/overloaded/fixup-deref-mut.rs index 6b2fd72b89553..2879554bb94be 100644 --- a/tests/ui/overloaded/fixup-deref-mut.rs +++ b/tests/ui/overloaded/fixup-deref-mut.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/issue-14958.rs b/tests/ui/overloaded/issue-14958.rs index 80abf5e4e7689..3df4732d9ada9 100644 --- a/tests/ui/overloaded/issue-14958.rs +++ b/tests/ui/overloaded/issue-14958.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/overloaded/overloaded-autoderef-count.rs b/tests/ui/overloaded/overloaded-autoderef-count.rs index d58deda09f70c..495ea08f07722 100644 --- a/tests/ui/overloaded/overloaded-autoderef-count.rs +++ b/tests/ui/overloaded/overloaded-autoderef-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/overloaded-autoderef-indexing.rs b/tests/ui/overloaded/overloaded-autoderef-indexing.rs index 1c8c7cca93cda..0c93d19dca4ff 100644 --- a/tests/ui/overloaded/overloaded-autoderef-indexing.rs +++ b/tests/ui/overloaded/overloaded-autoderef-indexing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/overloaded/overloaded-autoderef-order.rs b/tests/ui/overloaded/overloaded-autoderef-order.rs index f48bae55f5f1e..2ab016a1f56c1 100644 --- a/tests/ui/overloaded/overloaded-autoderef-order.rs +++ b/tests/ui/overloaded/overloaded-autoderef-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/overloaded/overloaded-autoderef-vtable.rs b/tests/ui/overloaded/overloaded-autoderef-vtable.rs index f8e6d12088f98..198993e6d7544 100644 --- a/tests/ui/overloaded/overloaded-autoderef-vtable.rs +++ b/tests/ui/overloaded/overloaded-autoderef-vtable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::ops::Deref; diff --git a/tests/ui/overloaded/overloaded-autoderef-xcrate.rs b/tests/ui/overloaded/overloaded-autoderef-xcrate.rs index d065e825cc384..82e1c07718a51 100644 --- a/tests/ui/overloaded/overloaded-autoderef-xcrate.rs +++ b/tests/ui/overloaded/overloaded-autoderef-xcrate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:overloaded_autoderef_xc.rs +//@ run-pass +//@ aux-build:overloaded_autoderef_xc.rs extern crate overloaded_autoderef_xc; diff --git a/tests/ui/overloaded/overloaded-autoderef.rs b/tests/ui/overloaded/overloaded-autoderef.rs index cae3ec906211e..a7a07449ca890 100644 --- a/tests/ui/overloaded/overloaded-autoderef.rs +++ b/tests/ui/overloaded/overloaded-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/overloaded/overloaded-calls-object-one-arg.rs b/tests/ui/overloaded/overloaded-calls-object-one-arg.rs index 1afab9a1ffbe7..0685adb4f8356 100644 --- a/tests/ui/overloaded/overloaded-calls-object-one-arg.rs +++ b/tests/ui/overloaded/overloaded-calls-object-one-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 1 argument. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-object-two-args.rs b/tests/ui/overloaded/overloaded-calls-object-two-args.rs index 38087bc8710fc..6a3f7d2da550c 100644 --- a/tests/ui/overloaded/overloaded-calls-object-two-args.rs +++ b/tests/ui/overloaded/overloaded-calls-object-two-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 2 arguments. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-object-zero-args.rs b/tests/ui/overloaded/overloaded-calls-object-zero-args.rs index 9a7bfaa9bf4f0..e5f1895b49dca 100644 --- a/tests/ui/overloaded/overloaded-calls-object-zero-args.rs +++ b/tests/ui/overloaded/overloaded-calls-object-zero-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 0 arguments. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-param-vtables.rs b/tests/ui/overloaded/overloaded-calls-param-vtables.rs index 74ee1c17614e9..7b89b45eb9b95 100644 --- a/tests/ui/overloaded/overloaded-calls-param-vtables.rs +++ b/tests/ui/overloaded/overloaded-calls-param-vtables.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Tests that nested vtables work with overloaded calls. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-calls-simple.rs b/tests/ui/overloaded/overloaded-calls-simple.rs index 8fed18b8e29c3..34b674357d89c 100644 --- a/tests/ui/overloaded/overloaded-calls-simple.rs +++ b/tests/ui/overloaded/overloaded-calls-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items, unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-calls-zero-args.rs b/tests/ui/overloaded/overloaded-calls-zero-args.rs index b123730679008..79391125a4fba 100644 --- a/tests/ui/overloaded/overloaded-calls-zero-args.rs +++ b/tests/ui/overloaded/overloaded-calls-zero-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-deref-count.rs b/tests/ui/overloaded/overloaded-deref-count.rs index d2482b1250059..a51de1bccbd1a 100644 --- a/tests/ui/overloaded/overloaded-deref-count.rs +++ b/tests/ui/overloaded/overloaded-deref-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/overloaded-deref.rs b/tests/ui/overloaded/overloaded-deref.rs index b08d8f3f767fa..f1ff16f328f27 100644 --- a/tests/ui/overloaded/overloaded-deref.rs +++ b/tests/ui/overloaded/overloaded-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/overloaded/overloaded-index-assoc-list.rs b/tests/ui/overloaded/overloaded-index-assoc-list.rs index eb027afeacde9..986acb54e3c70 100644 --- a/tests/ui/overloaded/overloaded-index-assoc-list.rs +++ b/tests/ui/overloaded/overloaded-index-assoc-list.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test overloading of the `[]` operator. In particular test that it // takes its argument *by reference*. diff --git a/tests/ui/overloaded/overloaded-index-autoderef.rs b/tests/ui/overloaded/overloaded-index-autoderef.rs index 41f9efa8c1619..ab49826e9dfc9 100644 --- a/tests/ui/overloaded/overloaded-index-autoderef.rs +++ b/tests/ui/overloaded/overloaded-index-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // Test overloaded indexing combined with autoderef. diff --git a/tests/ui/overloaded/overloaded-index-in-field.rs b/tests/ui/overloaded/overloaded-index-in-field.rs index 0dc45ea8ca2b8..825e964b88074 100644 --- a/tests/ui/overloaded/overloaded-index-in-field.rs +++ b/tests/ui/overloaded/overloaded-index-in-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. diff --git a/tests/ui/overloaded/overloaded-index.rs b/tests/ui/overloaded/overloaded-index.rs index 5ad6d2e70040c..98025e60dd7d9 100644 --- a/tests/ui/overloaded/overloaded-index.rs +++ b/tests/ui/overloaded/overloaded-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Index, IndexMut}; struct Foo { diff --git a/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs b/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs index c87ba6a023b78..c564165141cd8 100644 --- a/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs +++ b/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] // Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609). 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 61edd2ace3a13..143a9ec04476b 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 +//@ run-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/dyn-trait.rs b/tests/ui/packed/dyn-trait.rs index bb73c26c18a0d..0c946ca47945f 100644 --- a/tests/ui/packed/dyn-trait.rs +++ b/tests/ui/packed/dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr::addr_of; // When the unsized tail is a `dyn Trait`, its alignments is only dynamically known. This means the diff --git a/tests/ui/packed/issue-118537-field-offset-ice.rs b/tests/ui/packed/issue-118537-field-offset-ice.rs index 679d9d754e337..83bace96aac2f 100644 --- a/tests/ui/packed/issue-118537-field-offset-ice.rs +++ b/tests/ui/packed/issue-118537-field-offset-ice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(layout_for_ptr)] use std::mem; diff --git a/tests/ui/packed/issue-118537-field-offset.rs b/tests/ui/packed/issue-118537-field-offset.rs index cd17f7679470e..906b3a9f976ec 100644 --- a/tests/ui/packed/issue-118537-field-offset.rs +++ b/tests/ui/packed/issue-118537-field-offset.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(layout_for_ptr)] use std::mem; diff --git a/tests/ui/packed/issue-46152.rs b/tests/ui/packed/issue-46152.rs index fb1c9fb78f361..e38b445107baf 100644 --- a/tests/ui/packed/issue-46152.rs +++ b/tests/ui/packed/issue-46152.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![feature(unsize, coerce_unsized)] diff --git a/tests/ui/packed/packed-struct-address-of-element.rs b/tests/ui/packed/packed-struct-address-of-element.rs index d86698cbf3848..3fc27d4a96a76 100644 --- a/tests/ui/packed/packed-struct-address-of-element.rs +++ b/tests/ui/packed/packed-struct-address-of-element.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(raw_ref_op)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.rs b/tests/ui/packed/packed-struct-borrow-element-64bit.rs index 63315ea66737a..81eac07eaa894 100644 --- a/tests/ui/packed/packed-struct-borrow-element-64bit.rs +++ b/tests/ui/packed/packed-struct-borrow-element-64bit.rs @@ -1,6 +1,6 @@ -// ignore-32bit (needs `usize` to be 8-aligned to reproduce all the errors below) +//@ ignore-32bit (needs `usize` to be 8-aligned to reproduce all the errors below) #![allow(dead_code)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(C, packed(4))] struct Foo4C { diff --git a/tests/ui/packed/packed-struct-borrow-element.rs b/tests/ui/packed/packed-struct-borrow-element.rs index 6cbeca44bbcbf..24dadbcec7ca6 100644 --- a/tests/ui/packed/packed-struct-borrow-element.rs +++ b/tests/ui/packed/packed-struct-borrow-element.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-drop-aligned.rs b/tests/ui/packed/packed-struct-drop-aligned.rs index ddfc86f74d3c7..037b8cb78b721 100644 --- a/tests/ui/packed/packed-struct-drop-aligned.rs +++ b/tests/ui/packed/packed-struct-drop-aligned.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] #![feature(coroutine_trait)] use std::cell::Cell; diff --git a/tests/ui/packed/packed-struct-generic-layout.rs b/tests/ui/packed/packed-struct-generic-layout.rs index e064eede4cede..c420d06850685 100644 --- a/tests/ui/packed/packed-struct-generic-layout.rs +++ b/tests/ui/packed/packed-struct-generic-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(overflowing_literals)] diff --git a/tests/ui/packed/packed-struct-generic-size.rs b/tests/ui/packed/packed-struct-generic-size.rs index 7c93e46c30c23..c1cdbd1a5ce37 100644 --- a/tests/ui/packed/packed-struct-generic-size.rs +++ b/tests/ui/packed/packed-struct-generic-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_comparisons)] diff --git a/tests/ui/packed/packed-struct-generic-transmute.rs b/tests/ui/packed/packed-struct-generic-transmute.rs index c6264b6d2b32e..ed655a1d483d4 100644 --- a/tests/ui/packed/packed-struct-generic-transmute.rs +++ b/tests/ui/packed/packed-struct-generic-transmute.rs @@ -3,7 +3,7 @@ // the error points to the start of the file, not the line with the // transmute -// error-pattern: cannot transmute between types of different sizes, or dependently-sized types +//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types use std::mem; diff --git a/tests/ui/packed/packed-struct-layout.rs b/tests/ui/packed/packed-struct-layout.rs index d49c222e64834..8b14351c08af3 100644 --- a/tests/ui/packed/packed-struct-layout.rs +++ b/tests/ui/packed/packed-struct-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/packed/packed-struct-match.rs b/tests/ui/packed/packed-struct-match.rs index 9a572ced717f5..5a6f7da3cb726 100644 --- a/tests/ui/packed/packed-struct-match.rs +++ b/tests/ui/packed/packed-struct-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-optimized-enum.rs b/tests/ui/packed/packed-struct-optimized-enum.rs index c3540f7619b15..e76620c630d74 100644 --- a/tests/ui/packed/packed-struct-optimized-enum.rs +++ b/tests/ui/packed/packed-struct-optimized-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(packed)] struct Packed(#[allow(dead_code)] T); diff --git a/tests/ui/packed/packed-struct-size-xc.rs b/tests/ui/packed/packed-struct-size-xc.rs index 46112d51d8398..a9c95d73d561f 100644 --- a/tests/ui/packed/packed-struct-size-xc.rs +++ b/tests/ui/packed/packed-struct-size-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:packed.rs +//@ run-pass +//@ aux-build:packed.rs extern crate packed; diff --git a/tests/ui/packed/packed-struct-size.rs b/tests/ui/packed/packed-struct-size.rs index c832c7cfad5cd..98167fc33fada 100644 --- a/tests/ui/packed/packed-struct-size.rs +++ b/tests/ui/packed/packed-struct-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/packed/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs index a7d284025d7a0..cf7c1f2b7cd55 100644 --- a/tests/ui/packed/packed-struct-transmute.rs +++ b/tests/ui/packed/packed-struct-transmute.rs @@ -3,8 +3,8 @@ // the error points to the start of the file, not the line with the // transmute -// normalize-stderr-test "\d+ bits" -> "N bits" -// error-pattern: cannot transmute between types of different sizes, or dependently-sized types +//@ normalize-stderr-test "\d+ bits" -> "N bits" +//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types use std::mem; diff --git a/tests/ui/packed/packed-struct-vec.rs b/tests/ui/packed/packed-struct-vec.rs index 18676cfc22e2b..cc0c3b9899968 100644 --- a/tests/ui/packed/packed-struct-vec.rs +++ b/tests/ui/packed/packed-struct-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; use std::mem; diff --git a/tests/ui/packed/packed-tuple-struct-layout.rs b/tests/ui/packed/packed-tuple-struct-layout.rs index 879553142da3d..447639b387264 100644 --- a/tests/ui/packed/packed-tuple-struct-layout.rs +++ b/tests/ui/packed/packed-tuple-struct-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; #[repr(packed)] diff --git a/tests/ui/packed/packed-tuple-struct-size.rs b/tests/ui/packed/packed-tuple-struct-size.rs index f7a3c903fca29..48358513586b3 100644 --- a/tests/ui/packed/packed-tuple-struct-size.rs +++ b/tests/ui/packed/packed-tuple-struct-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/packed/packed-with-inference-vars-issue-61402.rs b/tests/ui/packed/packed-with-inference-vars-issue-61402.rs index 659864c1d9b51..e726734d04a08 100644 --- a/tests/ui/packed/packed-with-inference-vars-issue-61402.rs +++ b/tests/ui/packed/packed-with-inference-vars-issue-61402.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // If a struct is packed and its last field has drop glue, then that // field needs to be Sized (to allow it to be destroyed out-of-place). // diff --git a/tests/ui/panic-handler/auxiliary/some-panic-impl.rs b/tests/ui/panic-handler/auxiliary/some-panic-impl.rs index 0348b3a2d760b..8dacc87b08d55 100644 --- a/tests/ui/panic-handler/auxiliary/some-panic-impl.rs +++ b/tests/ui/panic-handler/auxiliary/some-panic-impl.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-handler/auxiliary/weak-lang-items.rs b/tests/ui/panic-handler/auxiliary/weak-lang-items.rs index 7a698cf76ae51..d457e0681c151 100644 --- a/tests/ui/panic-handler/auxiliary/weak-lang-items.rs +++ b/tests/ui/panic-handler/auxiliary/weak-lang-items.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic // This aux-file will require the eh_personality function to be codegen'd, but // it hasn't been defined just yet. Make sure we don't explode. diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-1.rs b/tests/ui/panic-handler/panic-handler-bad-signature-1.rs index ae27db7a83524..8f42f3a8897fc 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-1.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-2.rs b/tests/ui/panic-handler/panic-handler-bad-signature-2.rs index 3c3f1513f6fe8..79ad4598e10c6 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-2.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-3.rs b/tests/ui/panic-handler/panic-handler-bad-signature-3.rs index 9e17e32fbb4cb..1c6e2e2ff492c 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-3.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-4.rs b/tests/ui/panic-handler/panic-handler-bad-signature-4.rs index 8240ab0832627..8fc5b3240140f 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-4.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-4.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-5.rs b/tests/ui/panic-handler/panic-handler-bad-signature-5.rs index 97307d1b2a462..d7ee8f25b1141 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-5.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-5.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-duplicate.rs b/tests/ui/panic-handler/panic-handler-duplicate.rs index bd99af999c797..c0a7d6aa6d723 100644 --- a/tests/ui/panic-handler/panic-handler-duplicate.rs +++ b/tests/ui/panic-handler/panic-handler-duplicate.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(lang_items)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-missing.rs b/tests/ui/panic-handler/panic-handler-missing.rs index 6bb062ba657a1..09fbd9a69cfd0 100644 --- a/tests/ui/panic-handler/panic-handler-missing.rs +++ b/tests/ui/panic-handler/panic-handler-missing.rs @@ -1,5 +1,5 @@ -// dont-check-compiler-stderr -// error-pattern: `#[panic_handler]` function required, but not found +//@ dont-check-compiler-stderr +//@ error-pattern: `#[panic_handler]` function required, but not found #![feature(lang_items)] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-requires-panic-info.rs b/tests/ui/panic-handler/panic-handler-requires-panic-info.rs index b59023b50e1e0..0b8308ba753aa 100644 --- a/tests/ui/panic-handler/panic-handler-requires-panic-info.rs +++ b/tests/ui/panic-handler/panic-handler-requires-panic-info.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(lang_items)] #![feature(no_core)] diff --git a/tests/ui/panic-handler/panic-handler-std.rs b/tests/ui/panic-handler/panic-handler-std.rs index 6183c886cfac7..91b3997819ce4 100644 --- a/tests/ui/panic-handler/panic-handler-std.rs +++ b/tests/ui/panic-handler/panic-handler-std.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" -// error-pattern: found duplicate lang item `panic_impl` +//@ normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" +//@ error-pattern: found duplicate lang item `panic_impl` use std::panic::PanicInfo; diff --git a/tests/ui/panic-handler/panic-handler-twice.rs b/tests/ui/panic-handler/panic-handler-twice.rs index 05bef66d849a6..2d95a5028bf6b 100644 --- a/tests/ui/panic-handler/panic-handler-twice.rs +++ b/tests/ui/panic-handler/panic-handler-twice.rs @@ -1,5 +1,5 @@ -// dont-check-compiler-stderr -// aux-build:some-panic-impl.rs +//@ dont-check-compiler-stderr +//@ aux-build:some-panic-impl.rs #![feature(lang_items)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-with-target-feature.rs b/tests/ui/panic-handler/panic-handler-with-target-feature.rs index 8ea0275d7e99a..3dfdd2847bf48 100644 --- a/tests/ui/panic-handler/panic-handler-with-target-feature.rs +++ b/tests/ui/panic-handler/panic-handler-with-target-feature.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// only-x86_64 +//@ compile-flags:-C panic=abort +//@ only-x86_64 #![feature(target_feature_11)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-wrong-location.rs b/tests/ui/panic-handler/panic-handler-wrong-location.rs index dca5910180562..fc3ef401e3db2 100644 --- a/tests/ui/panic-handler/panic-handler-wrong-location.rs +++ b/tests/ui/panic-handler/panic-handler-wrong-location.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/weak-lang-item-2.rs b/tests/ui/panic-handler/weak-lang-item-2.rs index 2cc5f23b45eb1..2acaff3ab7127 100644 --- a/tests/ui/panic-handler/weak-lang-item-2.rs +++ b/tests/ui/panic-handler/weak-lang-item-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:weak-lang-items.rs +//@ run-pass +//@ aux-build:weak-lang-items.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate weak_lang_items as other; diff --git a/tests/ui/panic-handler/weak-lang-item.rs b/tests/ui/panic-handler/weak-lang-item.rs index 296a2c1514f13..605e1bdd94b7f 100644 --- a/tests/ui/panic-handler/weak-lang-item.rs +++ b/tests/ui/panic-handler/weak-lang-item.rs @@ -1,8 +1,8 @@ -// aux-build:weak-lang-items.rs -// error-pattern: `#[panic_handler]` function required, but not found -// error-pattern: unwinding panics are not supported without std -// needs-unwind since it affects the error output -// ignore-emscripten missing eh_catch_typeinfo lang item +//@ aux-build:weak-lang-items.rs +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ error-pattern: unwinding panics are not supported without std +//@ needs-unwind since it affects the error output +//@ ignore-emscripten missing eh_catch_typeinfo lang item #![no_std] diff --git a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs index 58a90a592c4c0..2939835b0f41e 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs @@ -1,10 +1,10 @@ -// build-fail -// compile-flags:-C panic=abort -C prefer-dynamic -// needs-unwind -// ignore-musl - no dylibs here -// ignore-emscripten -// ignore-sgx no dynamic lib support -// error-pattern:`panic_unwind` is not compiled with this crate's panic strategy +//@ build-fail +//@ compile-flags:-C panic=abort -C prefer-dynamic +//@ needs-unwind +//@ ignore-musl - no dylibs here +//@ ignore-emscripten +//@ ignore-sgx no dynamic lib support +//@ error-pattern:`panic_unwind` is not compiled with this crate's panic strategy // This is a test where the local crate, compiled with `panic=abort`, links to // the standard library **dynamically** which is already linked against diff --git a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs index 566626513ef2d..4f8efd6d68855 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C panic=abort -// aux-build:exit-success-if-unwind.rs -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-macos +//@ compile-flags:-C panic=abort +//@ aux-build:exit-success-if-unwind.rs +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-macos extern crate exit_success_if_unwind; diff --git a/tests/ui/panic-runtime/abort.rs b/tests/ui/panic-runtime/abort.rs index dcc4061fde7a9..810e13c976288 100644 --- a/tests/ui/panic-runtime/abort.rs +++ b/tests/ui/panic-runtime/abort.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-macos +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-macos use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/auxiliary/depends.rs b/tests/ui/panic-runtime/auxiliary/depends.rs index e9bc2f4893e3d..7a35619b68133 100644 --- a/tests/ui/panic-runtime/auxiliary/depends.rs +++ b/tests/ui/panic-runtime/auxiliary/depends.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs b/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs index c0e05740542df..1648d10e5aa2c 100644 --- a/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/needs-abort.rs b/tests/ui/panic-runtime/auxiliary/needs-abort.rs index 8fad49b5e9d32..21f862e4b431c 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs index 3f030c169f641..fbafee0c24177 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(needs_panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs index ba917b52d9a98..d0d20b267d4b3 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs index c92015eeebcc2..36db32f281a4f 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs index b9ef2f329414e..938f6bcb906b6 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs index 2f7aed9248a06..aea42d1f103fb 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs index 2f7aed9248a06..aea42d1f103fb 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs index 3c0d2d6588ec9..cfefb05028008 100644 --- a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs index d5f0102196f48..bae2740d306de 100644 --- a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/bad-panic-flag1.rs b/tests/ui/panic-runtime/bad-panic-flag1.rs index 1ac6a3423ff8d..82b7c2f723b4f 100644 --- a/tests/ui/panic-runtime/bad-panic-flag1.rs +++ b/tests/ui/panic-runtime/bad-panic-flag1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=foo -// error-pattern:either `unwind` or `abort` was expected +//@ compile-flags:-C panic=foo +//@ error-pattern:either `unwind` or `abort` was expected fn main() {} diff --git a/tests/ui/panic-runtime/bad-panic-flag2.rs b/tests/ui/panic-runtime/bad-panic-flag2.rs index c79701c83f3ff..3875325deae28 100644 --- a/tests/ui/panic-runtime/bad-panic-flag2.rs +++ b/tests/ui/panic-runtime/bad-panic-flag2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic -// error-pattern:requires either `unwind` or `abort` +//@ compile-flags:-C panic +//@ error-pattern:requires either `unwind` or `abort` fn main() {} diff --git a/tests/ui/panic-runtime/incompatible-type.rs b/tests/ui/panic-runtime/incompatible-type.rs index 026364a2058fa..4cbcfec11c96c 100644 --- a/tests/ui/panic-runtime/incompatible-type.rs +++ b/tests/ui/panic-runtime/incompatible-type.rs @@ -3,8 +3,8 @@ // // Assertion `isa(Val) && "cast() argument of incompatible type!"' failed. // -// build-pass -// compile-flags: --crate-type=lib -Ccodegen-units=1 +//@ build-pass +//@ compile-flags: --crate-type=lib -Ccodegen-units=1 #![no_std] #![panic_runtime] #![feature(panic_runtime)] diff --git a/tests/ui/panic-runtime/link-to-abort.rs b/tests/ui/panic-runtime/link-to-abort.rs index 422206c574d03..2a7052616f2c7 100644 --- a/tests/ui/panic-runtime/link-to-abort.rs +++ b/tests/ui/panic-runtime/link-to-abort.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-macos +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic +//@ ignore-macos #![feature(panic_abort)] diff --git a/tests/ui/panic-runtime/link-to-unwind.rs b/tests/ui/panic-runtime/link-to-unwind.rs index 59036ca99bd95..848b27e3fcc5a 100644 --- a/tests/ui/panic-runtime/link-to-unwind.rs +++ b/tests/ui/panic-runtime/link-to-unwind.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(panic_unwind)] diff --git a/tests/ui/panic-runtime/lto-abort.rs b/tests/ui/panic-runtime/lto-abort.rs index 5cc4c01323532..1d2aed12b9bd6 100644 --- a/tests/ui/panic-runtime/lto-abort.rs +++ b/tests/ui/panic-runtime/lto-abort.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C lto -C panic=abort -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes +//@ compile-flags:-C lto -C panic=abort +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/lto-unwind.rs b/tests/ui/panic-runtime/lto-unwind.rs index 24048ebe008fa..5eab2bd56ed1f 100644 --- a/tests/ui/panic-runtime/lto-unwind.rs +++ b/tests/ui/panic-runtime/lto-unwind.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C lto -C panic=unwind -// needs-unwind -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes +//@ compile-flags:-C lto -C panic=unwind +//@ needs-unwind +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/need-abort-got-unwind.rs b/tests/ui/panic-runtime/need-abort-got-unwind.rs index e92400931d231..74b7edd968fab 100644 --- a/tests/ui/panic-runtime/need-abort-got-unwind.rs +++ b/tests/ui/panic-runtime/need-abort-got-unwind.rs @@ -1,7 +1,7 @@ -// build-fail -// needs-unwind -// error-pattern:is incompatible with this crate's strategy of `unwind` -// aux-build:needs-abort.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is incompatible with this crate's strategy of `unwind` +//@ aux-build:needs-abort.rs extern crate needs_abort; diff --git a/tests/ui/panic-runtime/need-unwind-got-abort.rs b/tests/ui/panic-runtime/need-unwind-got-abort.rs index 6752ecf90d2f7..6bc41509b6b23 100644 --- a/tests/ui/panic-runtime/need-unwind-got-abort.rs +++ b/tests/ui/panic-runtime/need-unwind-got-abort.rs @@ -1,8 +1,8 @@ -// build-fail -// error-pattern:is incompatible with this crate's strategy of `abort` -// aux-build:needs-unwind.rs -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ build-fail +//@ error-pattern:is incompatible with this crate's strategy of `abort` +//@ aux-build:needs-unwind.rs +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic extern crate needs_unwind; diff --git a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs index d57f1643e98a3..d0a82bd8507d4 100644 --- a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs +++ b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs @@ -1,7 +1,7 @@ -// dont-check-compiler-stderr -// aux-build:needs-panic-runtime.rs -// aux-build:depends.rs -// error-pattern:cannot depend on a crate that needs a panic runtime +//@ dont-check-compiler-stderr +//@ aux-build:needs-panic-runtime.rs +//@ aux-build:depends.rs +//@ error-pattern:cannot depend on a crate that needs a panic runtime extern crate depends; diff --git a/tests/ui/panic-runtime/transitive-link-a-bunch.rs b/tests/ui/panic-runtime/transitive-link-a-bunch.rs index 0e74e300f00f0..15557d35bc5cc 100644 --- a/tests/ui/panic-runtime/transitive-link-a-bunch.rs +++ b/tests/ui/panic-runtime/transitive-link-a-bunch.rs @@ -1,11 +1,11 @@ -// build-fail -// needs-unwind -// aux-build:panic-runtime-unwind.rs -// aux-build:panic-runtime-abort.rs -// aux-build:wants-panic-runtime-unwind.rs -// aux-build:wants-panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs -// error-pattern: is not compiled with this crate's panic strategy `unwind` +//@ build-fail +//@ needs-unwind +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:wants-panic-runtime-unwind.rs +//@ aux-build:wants-panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs +//@ error-pattern: is not compiled with this crate's panic strategy `unwind` #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs index 7ec658ebcf2e9..3608dca2124c1 100644 --- a/tests/ui/panic-runtime/two-panic-runtimes.rs +++ b/tests/ui/panic-runtime/two-panic-runtimes.rs @@ -1,9 +1,9 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2 -// aux-build:panic-runtime-unwind.rs -// aux-build:panic-runtime-unwind2.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2 +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:panic-runtime-unwind2.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/unwind-interleaved.rs b/tests/ui/panic-runtime/unwind-interleaved.rs index a8b3f3493097c..e5505cd893a11 100644 --- a/tests/ui/panic-runtime/unwind-interleaved.rs +++ b/tests/ui/panic-runtime/unwind-interleaved.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn a() {} diff --git a/tests/ui/panic-runtime/unwind-rec.rs b/tests/ui/panic-runtime/unwind-rec.rs index a9b7ee8ec7d4a..d4b53c8876813 100644 --- a/tests/ui/panic-runtime/unwind-rec.rs +++ b/tests/ui/panic-runtime/unwind-rec.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn build() -> Vec { panic!(); diff --git a/tests/ui/panic-runtime/unwind-rec2.rs b/tests/ui/panic-runtime/unwind-rec2.rs index a130f9e879f2d..6ac9a5a580547 100644 --- a/tests/ui/panic-runtime/unwind-rec2.rs +++ b/tests/ui/panic-runtime/unwind-rec2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn build1() -> Vec { vec![0, 0, 0, 0, 0, 0, 0] diff --git a/tests/ui/panic-runtime/unwind-tables-target-required.rs b/tests/ui/panic-runtime/unwind-tables-target-required.rs index 5a90b314a6ed1..5c6ec19c16d02 100644 --- a/tests/ui/panic-runtime/unwind-tables-target-required.rs +++ b/tests/ui/panic-runtime/unwind-tables-target-required.rs @@ -1,11 +1,11 @@ // Tests that the compiler errors if the user tries to turn off unwind tables // when they are required. // -// only-x86_64-pc-windows-msvc -// compile-flags: -C force-unwind-tables=no +//@ only-x86_64-pc-windows-msvc +//@ compile-flags: -C force-unwind-tables=no // -// dont-check-compiler-stderr -// error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no` +//@ dont-check-compiler-stderr +//@ error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no` pub fn main() { } diff --git a/tests/ui/panic-runtime/unwind-unique.rs b/tests/ui/panic-runtime/unwind-unique.rs index d66e39110eaca..a6cd59690ca92 100644 --- a/tests/ui/panic-runtime/unwind-unique.rs +++ b/tests/ui/panic-runtime/unwind-unique.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn failfn() { panic!(); diff --git a/tests/ui/panic-runtime/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs index e33c3bcc3f024..ad9fa52f3d44d 100644 --- a/tests/ui/panic-runtime/want-abort-got-unwind.rs +++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs @@ -1,8 +1,8 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:is not compiled with this crate's panic strategy `abort` -// aux-build:panic-runtime-unwind.rs -// compile-flags:-C panic=abort +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:is not compiled with this crate's panic strategy `abort` +//@ aux-build:panic-runtime-unwind.rs +//@ compile-flags:-C panic=abort extern crate panic_runtime_unwind; diff --git a/tests/ui/panic-runtime/want-abort-got-unwind2.rs b/tests/ui/panic-runtime/want-abort-got-unwind2.rs index 438f1d85a2811..d63161db55cb0 100644 --- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs +++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs @@ -1,9 +1,9 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:is not compiled with this crate's panic strategy `abort` -// aux-build:panic-runtime-unwind.rs -// aux-build:wants-panic-runtime-unwind.rs -// compile-flags:-C panic=abort +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:is not compiled with this crate's panic strategy `abort` +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:wants-panic-runtime-unwind.rs +//@ compile-flags:-C panic=abort extern crate wants_panic_runtime_unwind; diff --git a/tests/ui/panic-runtime/want-unwind-got-abort.rs b/tests/ui/panic-runtime/want-unwind-got-abort.rs index b6174dc4efee8..93342a09182bb 100644 --- a/tests/ui/panic-runtime/want-unwind-got-abort.rs +++ b/tests/ui/panic-runtime/want-unwind-got-abort.rs @@ -1,8 +1,8 @@ -// build-fail -// needs-unwind -// error-pattern:is not compiled with this crate's panic strategy `unwind` -// aux-build:panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is not compiled with this crate's panic strategy `unwind` +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/want-unwind-got-abort2.rs b/tests/ui/panic-runtime/want-unwind-got-abort2.rs index b54babbeffa32..ee3f221d09c6b 100644 --- a/tests/ui/panic-runtime/want-unwind-got-abort2.rs +++ b/tests/ui/panic-runtime/want-unwind-got-abort2.rs @@ -1,9 +1,9 @@ -// build-fail -// needs-unwind -// error-pattern:is incompatible with this crate's strategy of `unwind` -// aux-build:panic-runtime-abort.rs -// aux-build:wants-panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is incompatible with this crate's strategy of `unwind` +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:wants-panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-while-printing.rs b/tests/ui/panic-while-printing.rs index 3abedf2a764e2..6505a69fef7cf 100644 --- a/tests/ui/panic-while-printing.rs +++ b/tests/ui/panic-while-printing.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(internal_output_capture)] diff --git a/tests/ui/panic_implementation-closures.rs b/tests/ui/panic_implementation-closures.rs index b96125aa95260..b161859bf9c51 100644 --- a/tests/ui/panic_implementation-closures.rs +++ b/tests/ui/panic_implementation-closures.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs index ff31fc2431740..4929cdab1c2f0 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![allow(unused_must_use)] #![feature(c_unwind)] @@ -8,8 +8,8 @@ // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that // we never unwind through them. -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::io; use std::io::prelude::*; diff --git a/tests/ui/panics/args-panic.rs b/tests/ui/panics/args-panic.rs index 7636025c25b83..091ced9b47917 100644 --- a/tests/ui/panics/args-panic.rs +++ b/tests/ui/panics/args-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:meep -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:meep +//@ ignore-emscripten no processes fn f(_a: isize, _b: isize, _c: Box) { panic!("moop"); diff --git a/tests/ui/panics/default-backtrace-ice.rs b/tests/ui/panics/default-backtrace-ice.rs index b40203c339d05..e0e99a0289579 100644 --- a/tests/ui/panics/default-backtrace-ice.rs +++ b/tests/ui/panics/default-backtrace-ice.rs @@ -1,14 +1,14 @@ -// unset-rustc-env:RUST_BACKTRACE -// compile-flags:-Z treat-err-as-bug=1 -// error-pattern:stack backtrace: -// failure-status:101 -// ignore-msvc -// normalize-stderr-test "note: .*" -> "" -// normalize-stderr-test "thread 'rustc' .*" -> "" -// normalize-stderr-test " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)" -// normalize-stderr-test " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)" -// normalize-stderr-test " +\d+:.*\n" -> "" -// normalize-stderr-test " +at .*\n" -> "" +//@ unset-rustc-env:RUST_BACKTRACE +//@ compile-flags:-Z treat-err-as-bug=1 +//@ error-pattern:stack backtrace: +//@ failure-status:101 +//@ ignore-msvc +//@ normalize-stderr-test "note: .*" -> "" +//@ normalize-stderr-test "thread 'rustc' .*" -> "" +//@ normalize-stderr-test " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)" +//@ normalize-stderr-test " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)" +//@ normalize-stderr-test " +\d+:.*\n" -> "" +//@ normalize-stderr-test " +at .*\n" -> "" // // This test makes sure that full backtraces are used for ICEs when // RUST_BACKTRACE is not set. It does this by checking for the presence of diff --git a/tests/ui/panics/doublepanic.rs b/tests/ui/panics/doublepanic.rs index c1fcc875c3613..51945ea708c2e 100644 --- a/tests/ui/panics/doublepanic.rs +++ b/tests/ui/panics/doublepanic.rs @@ -1,8 +1,8 @@ #![allow(unreachable_code)] -// run-fail -// error-pattern:One -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:One +//@ ignore-emscripten no processes fn main() { panic!("One"); diff --git a/tests/ui/panics/explicit-panic-msg.rs b/tests/ui/panics/explicit-panic-msg.rs index 9d80357873488..ef0c5b39f0990 100644 --- a/tests/ui/panics/explicit-panic-msg.rs +++ b/tests/ui/panics/explicit-panic-msg.rs @@ -2,9 +2,9 @@ #![allow(unused_variables)] #![allow(non_fmt_panics)] -// run-fail -// error-pattern:wooooo -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:wooooo +//@ ignore-emscripten no processes fn main() { let mut a = 1; diff --git a/tests/ui/panics/explicit-panic.rs b/tests/ui/panics/explicit-panic.rs index 27c73d3493cb8..34e952ef68f9b 100644 --- a/tests/ui/panics/explicit-panic.rs +++ b/tests/ui/panics/explicit-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit +//@ ignore-emscripten no processes fn main() { panic!(); diff --git a/tests/ui/panics/fmt-only-once.rs b/tests/ui/panics/fmt-only-once.rs index 6211bf961b3bc..0e922afbee912 100644 --- a/tests/ui/panics/fmt-only-once.rs +++ b/tests/ui/panics/fmt-only-once.rs @@ -1,6 +1,6 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 // Test that we format the panic message only once. // Regression test for https://github.com/rust-lang/rust/issues/110717 diff --git a/tests/ui/panics/fmt-panic.rs b/tests/ui/panics/fmt-panic.rs index 87fb2e6dd54b9..032f65cb2e4b3 100644 --- a/tests/ui/panics/fmt-panic.rs +++ b/tests/ui/panics/fmt-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:meh -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:meh +//@ ignore-emscripten no processes fn main() { let str_var: String = "meh".to_string(); diff --git a/tests/ui/panics/issue-47429-short-backtraces.rs b/tests/ui/panics/issue-47429-short-backtraces.rs index 58d0fa62c34e9..97d2e22574af3 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.rs +++ b/tests/ui/panics/issue-47429-short-backtraces.rs @@ -1,23 +1,23 @@ // Regression test for #47429: short backtraces were not terminating correctly -// compile-flags: -O -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 +//@ compile-flags: -O +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-android FIXME #17520 -// ignore-openbsd no support for libbacktrace without filename -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support -// ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-android FIXME #17520 +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support +//@ ignore-fuchsia Backtraces not symbolized // NOTE(eddyb) output differs between symbol mangling schemes -// revisions: legacy v0 -// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ revisions: legacy v0 +//@ [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 fn main() { panic!() diff --git a/tests/ui/panics/location-detail-panic-no-column.rs b/tests/ui/panics/location-detail-panic-no-column.rs index 7cf1bb09c92f7..3951b28267941 100644 --- a/tests/ui/panics/location-detail-panic-no-column.rs +++ b/tests/ui/panics/location-detail-panic-no-column.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=line,file -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=line,file +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("column-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-file.rs b/tests/ui/panics/location-detail-panic-no-file.rs index 9bcbf01d1c6f6..987aa745c85d0 100644 --- a/tests/ui/panics/location-detail-panic-no-file.rs +++ b/tests/ui/panics/location-detail-panic-no-file.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=line,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=line,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("file-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-line.rs b/tests/ui/panics/location-detail-panic-no-line.rs index 25df092e1fb9c..412517722a8e4 100644 --- a/tests/ui/panics/location-detail-panic-no-line.rs +++ b/tests/ui/panics/location-detail-panic-no-line.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=file,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=file,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("line-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-location-info.rs b/tests/ui/panics/location-detail-panic-no-location-info.rs index 7b609145bad72..0a04f1ee759e7 100644 --- a/tests/ui/panics/location-detail-panic-no-location-info.rs +++ b/tests/ui/panics/location-detail-panic-no-location-info.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=none -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=none +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("no location info"); diff --git a/tests/ui/panics/location-detail-unwrap-no-file.rs b/tests/ui/panics/location-detail-unwrap-no-file.rs index 5955d9a25ae73..4398e5e0b04a5 100644 --- a/tests/ui/panics/location-detail-unwrap-no-file.rs +++ b/tests/ui/panics/location-detail-unwrap-no-file.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Copt-level=0 -Zlocation-detail=line,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Copt-level=0 -Zlocation-detail=line,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { let opt: Option = None; diff --git a/tests/ui/panics/main-panic.rs b/tests/ui/panics/main-panic.rs index 023ab47012596..b69f1656ca491 100644 --- a/tests/ui/panics/main-panic.rs +++ b/tests/ui/panics/main-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:thread 'main' panicked at -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked at +//@ ignore-emscripten no processes fn main() { panic!() diff --git a/tests/ui/panics/nested_panic_caught.rs b/tests/ui/panics/nested_panic_caught.rs index d43886e809579..23e4e5face9a4 100644 --- a/tests/ui/panics/nested_panic_caught.rs +++ b/tests/ui/panics/nested_panic_caught.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Checks that nested panics work correctly. diff --git a/tests/ui/panics/panic-2021.rs b/tests/ui/panics/panic-2021.rs index e606612e10862..399709d5276d3 100644 --- a/tests/ui/panics/panic-2021.rs +++ b/tests/ui/panics/panic-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { panic!(123); //~ ERROR: format argument must be a string literal diff --git a/tests/ui/panics/panic-arg.rs b/tests/ui/panics/panic-arg.rs index f7c2dbb096f29..10be6d5ff6ce1 100644 --- a/tests/ui/panics/panic-arg.rs +++ b/tests/ui/panics/panic-arg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:woe -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:woe +//@ ignore-emscripten no processes fn f(a: isize) { println!("{}", a); diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs index 4dd08ba4ad4e2..1f8fe30cfd8c2 100644 --- a/tests/ui/panics/panic-handler-chain-update-hook.rs +++ b/tests/ui/panics/panic-handler-chain-update-hook.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] #![feature(panic_update_hook)] diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs index 73d6e790dff57..eb23849f3ac83 100644 --- a/tests/ui/panics/panic-handler-chain.rs +++ b/tests/ui/panics/panic-handler-chain.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs index 679dc7de87aba..768c9d4c4c5ec 100644 --- a/tests/ui/panics/panic-handler-flail-wildly.rs +++ b/tests/ui/panics/panic-handler-flail-wildly.rs @@ -1,10 +1,10 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs index 2744530209026..902e48b65414e 100644 --- a/tests/ui/panics/panic-handler-set-twice.rs +++ b/tests/ui/panics/panic-handler-set-twice.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_variables)] #![allow(stable_features)] #![feature(std_panic)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-in-cleanup.rs b/tests/ui/panics/panic-in-cleanup.rs index 84880f1881cac..c3639c7034eb9 100644 --- a/tests/ui/panics/panic-in-cleanup.rs +++ b/tests/ui/panics/panic-in-cleanup.rs @@ -1,13 +1,13 @@ -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// error-pattern: panic in a destructor during cleanup -// normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" -// normalize-stderr-test: "\n +at [^\n]+" -> "" -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// needs-unwind -// ignore-emscripten "RuntimeError" junk in output -// ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ error-pattern: panic in a destructor during cleanup +//@ normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ needs-unwind +//@ ignore-emscripten "RuntimeError" junk in output +//@ ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else struct Bomb; diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs index c0963aa3114dc..4d18dc0e05916 100644 --- a/tests/ui/panics/panic-in-dtor-drops-fields.rs +++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs @@ -1,9 +1,9 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code)] #![allow(non_upper_case_globals)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index d9f1fcee85546..6f54acb3e045d 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -1,12 +1,12 @@ -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// error-pattern: panic in a function that cannot unwind -// normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" -// normalize-stderr-test: "\n +at [^\n]+" -> "" -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// needs-unwind -// ignore-emscripten "RuntimeError" junk in output +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ error-pattern: panic in a function that cannot unwind +//@ normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ needs-unwind +//@ ignore-emscripten "RuntimeError" junk in output #![feature(c_unwind)] extern "C" fn panic_in_ffi() { diff --git a/tests/ui/panics/panic-macro-any-wrapped.rs b/tests/ui/panics/panic-macro-any-wrapped.rs index 1815a0d2c10fc..7c6790e35fd16 100644 --- a/tests/ui/panics/panic-macro-any-wrapped.rs +++ b/tests/ui/panics/panic-macro-any-wrapped.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:Box -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:Box +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any.rs b/tests/ui/panics/panic-macro-any.rs index 1bc3c336c3f3b..75397333fa4a3 100644 --- a/tests/ui/panics/panic-macro-any.rs +++ b/tests/ui/panics/panic-macro-any.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:Box -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:Box +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-explicit.rs b/tests/ui/panics/panic-macro-explicit.rs index b5b6c7675ac35..2c7b84d99fea2 100644 --- a/tests/ui/panics/panic-macro-explicit.rs +++ b/tests/ui/panics/panic-macro-explicit.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { panic!(); diff --git a/tests/ui/panics/panic-macro-fmt.rs b/tests/ui/panics/panic-macro-fmt.rs index 0796d33eae0c2..1a63a06c75ad3 100644 --- a/tests/ui/panics/panic-macro-fmt.rs +++ b/tests/ui/panics/panic-macro-fmt.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-fmt 42 rust -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-fmt 42 rust +//@ ignore-emscripten no processes fn main() { panic!("test-fail-fmt {} {}", 42, "rust"); diff --git a/tests/ui/panics/panic-macro-owned.rs b/tests/ui/panics/panic-macro-owned.rs index 522c87e1c3141..1878f3d52abde 100644 --- a/tests/ui/panics/panic-macro-owned.rs +++ b/tests/ui/panics/panic-macro-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-owned -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-owned +//@ ignore-emscripten no processes fn main() { panic!("test-fail-owned"); diff --git a/tests/ui/panics/panic-macro-static.rs b/tests/ui/panics/panic-macro-static.rs index 06ec5b0ad3076..018166e60cfab 100644 --- a/tests/ui/panics/panic-macro-static.rs +++ b/tests/ui/panics/panic-macro-static.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-static -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-static +//@ ignore-emscripten no processes fn main() { panic!("test-fail-static"); diff --git a/tests/ui/panics/panic-main.rs b/tests/ui/panics/panic-main.rs index 87df7688f0b40..d71fca0754e9e 100644 --- a/tests/ui/panics/panic-main.rs +++ b/tests/ui/panics/panic-main.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:moop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:moop +//@ ignore-emscripten no processes fn main() { panic!("moop"); diff --git a/tests/ui/panics/panic-parens.rs b/tests/ui/panics/panic-parens.rs index 59ab544464967..271d0363cab8a 100644 --- a/tests/ui/panics/panic-parens.rs +++ b/tests/ui/panics/panic-parens.rs @@ -1,9 +1,9 @@ // Fail macros without arguments need to be disambiguated in // certain positions -// run-fail -// error-pattern:oops -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oops +//@ ignore-emscripten no processes fn bigpanic() { while (panic!("oops")) { diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs index e110d94b65614..f8be86be19db6 100644 --- a/tests/ui/panics/panic-recover-propagate.rs +++ b/tests/ui/panics/panic-recover-propagate.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-set-handler.rs b/tests/ui/panics/panic-set-handler.rs index 3c00183e253d7..39286ca865ba5 100644 --- a/tests/ui/panics/panic-set-handler.rs +++ b/tests/ui/panics/panic-set-handler.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:greetings from the panic handler -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:greetings from the panic handler +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs index 91f69f0a69e35..02f1599338b66 100644 --- a/tests/ui/panics/panic-set-unset-handler.rs +++ b/tests/ui/panics/panic-set-unset-handler.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:foobar -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:foobar +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs b/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs index be83eb748433d..70c4a5aaf2b92 100644 --- a/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs +++ b/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs @@ -1,6 +1,6 @@ // This test has been spuriously failing a lot recently (#92000). // Ignore it until the underlying issue is fixed. -// ignore-test (#92000) +//@ ignore-test (#92000) // Regression test for #87481: short backtrace formatting cut off the entire stack trace. @@ -8,19 +8,19 @@ // is not normally limited to 1 CGU. This is important so that the `__rust_begin_short_backtrace` // and `__rust_end_short_backtrace` symbols are not marked internal to the CGU and thus will be // named in the symbol table. -// compile-flags: -O -Ccodegen-units=8 +//@ compile-flags: -O -Ccodegen-units=8 -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 // We need to normalize out frame 5 because without debug info, dbghelp.dll doesn't know where CGU // internal functions like `main` start or end and so it will return whatever symbol happens // to be located near the address. -// normalize-stderr-test: "5: .*" -> "5: some Rust fn" +//@ normalize-stderr-test: "5: .*" -> "5: some Rust fn" // Backtraces are pretty broken in general on i686-pc-windows-msvc (#62897). -// only-x86_64-pc-windows-msvc +//@ only-x86_64-pc-windows-msvc fn main() { a(); diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs index d14a3244e610d..89e1d234df138 100644 --- a/tests/ui/panics/panic-take-handler-nop.rs +++ b/tests/ui/panics/panic-take-handler-nop.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:foobar -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:foobar +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-task-name-none.rs b/tests/ui/panics/panic-task-name-none.rs index 3fb0f3412f6b8..7eb974bde4c55 100644 --- a/tests/ui/panics/panic-task-name-none.rs +++ b/tests/ui/panics/panic-task-name-none.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread '' panicked -// error-pattern:test -// ignore-emscripten Needs threads +//@ run-fail +//@ error-pattern:thread '' panicked +//@ error-pattern:test +//@ ignore-emscripten Needs threads use std::thread; diff --git a/tests/ui/panics/panic-task-name-owned.rs b/tests/ui/panics/panic-task-name-owned.rs index d5274ebbc4b4d..9a680676dc0fe 100644 --- a/tests/ui/panics/panic-task-name-owned.rs +++ b/tests/ui/panics/panic-task-name-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'owned name' panicked -// error-pattern:test -// ignore-emscripten Needs threads. +//@ run-fail +//@ error-pattern:thread 'owned name' panicked +//@ error-pattern:test +//@ ignore-emscripten Needs threads. use std::thread::Builder; diff --git a/tests/ui/panics/panic.rs b/tests/ui/panics/panic.rs index b6227a582ce0b..b9721ac8230f7 100644 --- a/tests/ui/panics/panic.rs +++ b/tests/ui/panics/panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:1 == 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:1 == 2 +//@ ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/tests/ui/panics/result-get-panic.rs b/tests/ui/panics/result-get-panic.rs index 461f30b9134b0..d7f6dfe8406da 100644 --- a/tests/ui/panics/result-get-panic.rs +++ b/tests/ui/panics/result-get-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:called `Result::unwrap()` on an `Err` value -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:called `Result::unwrap()` on an `Err` value +//@ ignore-emscripten no processes use std::result::Result::Err; diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs index 882340e495c15..b0991321ee468 100644 --- a/tests/ui/panics/runtime-switch.rs +++ b/tests/ui/panics/runtime-switch.rs @@ -1,23 +1,23 @@ // Test for std::panic::set_backtrace_style. -// compile-flags: -O -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ compile-flags: -O +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-android FIXME #17520 -// ignore-openbsd no support for libbacktrace without filename -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support -// ignore-fuchsia Backtrace not symbolized +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-android FIXME #17520 +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support +//@ ignore-fuchsia Backtrace not symbolized // NOTE(eddyb) output differs between symbol mangling schemes -// revisions: legacy v0 -// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ revisions: legacy v0 +//@ [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 #![feature(panic_backtrace_config)] diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.rs b/tests/ui/panics/short-ice-remove-middle-frames-2.rs index 751959f55bb6e..15843fa6626f9 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.rs @@ -1,15 +1,15 @@ -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 -// needs-unwind -// ignore-android FIXME #17520 -// ignore-wasm no panic support -// ignore-openbsd no support for libbacktrace without filename -// ignore-emscripten no panic -// ignore-sgx Backtraces not symbolized -// ignore-fuchsia Backtraces not symbolized -// ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 +//@ needs-unwind +//@ ignore-android FIXME #17520 +//@ ignore-wasm no panic support +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-emscripten no panic +//@ ignore-sgx Backtraces not symbolized +//@ ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. /// This test case make sure that we can have multiple pairs of `__rust_{begin,end}_short_backtrace` diff --git a/tests/ui/panics/short-ice-remove-middle-frames.rs b/tests/ui/panics/short-ice-remove-middle-frames.rs index 134e13233da51..204780459b387 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames.rs @@ -1,15 +1,15 @@ -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 -// needs-unwind -// ignore-android FIXME #17520 -// ignore-wasm no panic support -// ignore-openbsd no support for libbacktrace without filename -// ignore-emscripten no panic -// ignore-sgx Backtraces not symbolized -// ignore-fuchsia Backtraces not symbolized -// ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 +//@ needs-unwind +//@ ignore-android FIXME #17520 +//@ ignore-wasm no panic support +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-emscripten no panic +//@ ignore-sgx Backtraces not symbolized +//@ ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. #[inline(never)] diff --git a/tests/ui/panics/test-panic.rs b/tests/ui/panics/test-panic.rs index 85c9279cdf27b..29a3c4e9c9f1a 100644 --- a/tests/ui/panics/test-panic.rs +++ b/tests/ui/panics/test-panic.rs @@ -1,7 +1,7 @@ -// run-fail -// check-stdout -// compile-flags: --test -// ignore-emscripten +//@ run-fail +//@ check-stdout +//@ compile-flags: --test +//@ ignore-emscripten #[test] fn test_foo() { diff --git a/tests/ui/panics/test-should-fail-bad-message.rs b/tests/ui/panics/test-should-fail-bad-message.rs index 701f267764858..9d8084053cc30 100644 --- a/tests/ui/panics/test-should-fail-bad-message.rs +++ b/tests/ui/panics/test-should-fail-bad-message.rs @@ -1,7 +1,7 @@ -// run-fail -// check-stdout -// compile-flags: --test -// ignore-emscripten +//@ run-fail +//@ check-stdout +//@ compile-flags: --test +//@ ignore-emscripten #[test] #[should_panic(expected = "foobar")] diff --git a/tests/ui/panics/test-should-panic-bad-message.rs b/tests/ui/panics/test-should-panic-bad-message.rs index a82c4e1440aae..4f39412af5f99 100644 --- a/tests/ui/panics/test-should-panic-bad-message.rs +++ b/tests/ui/panics/test-should-panic-bad-message.rs @@ -1,7 +1,7 @@ -// run-fail -// compile-flags: --test -// check-stdout -// ignore-emscripten no processes +//@ run-fail +//@ compile-flags: --test +//@ check-stdout +//@ ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/tests/ui/panics/test-should-panic-no-message.rs b/tests/ui/panics/test-should-panic-no-message.rs index 13f67a41cdd53..8bbcbe9fa594e 100644 --- a/tests/ui/panics/test-should-panic-no-message.rs +++ b/tests/ui/panics/test-should-panic-no-message.rs @@ -1,7 +1,7 @@ -// run-fail -// compile-flags: --test -// check-stdout -// ignore-emscripten no processes +//@ run-fail +//@ compile-flags: --test +//@ check-stdout +//@ ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/tests/ui/panics/unique-panic.rs b/tests/ui/panics/unique-panic.rs index ae7911e594389..63ff38b6d1287 100644 --- a/tests/ui/panics/unique-panic.rs +++ b/tests/ui/panics/unique-panic.rs @@ -1,9 +1,9 @@ -// run-fail -// error-pattern: panic +//@ run-fail +//@ error-pattern: panic // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it -// compile-flags:-Cstrip=none +//@ compile-flags:-Cstrip=none fn main() { Box::new(panic!()); diff --git a/tests/ui/panics/while-body-panics.rs b/tests/ui/panics/while-body-panics.rs index 2c05eb389ccfe..bddcd5d50ce4c 100644 --- a/tests/ui/panics/while-body-panics.rs +++ b/tests/ui/panics/while-body-panics.rs @@ -1,8 +1,8 @@ #![allow(while_true)] -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn main() { let _x: isize = { diff --git a/tests/ui/panics/while-panic.rs b/tests/ui/panics/while-panic.rs index 3c6ee8fa3155e..2961e8599c356 100644 --- a/tests/ui/panics/while-panic.rs +++ b/tests/ui/panics/while-panic.rs @@ -1,8 +1,8 @@ #![allow(while_true)] -// run-fail -// error-pattern:giraffe -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:giraffe +//@ ignore-emscripten no processes fn main() { panic!("{}", { diff --git a/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs b/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs index 148a59240f99a..b23cb9ce917be 100644 --- a/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs +++ b/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// build-fail +//@ compile-flags: -Z threads=16 +//@ build-fail #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs index 8240b249018e2..024df72873694 100644 --- a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs +++ b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs @@ -1,6 +1,6 @@ -// compile-flags:-C extra-filename=-1 -Z threads=16 -// no-prefer-dynamic -// build-pass +//@ compile-flags:-C extra-filename=-1 -Z threads=16 +//@ no-prefer-dynamic +//@ build-pass #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs index 691c36cfc9ec4..3ccc1ea5f1063 100644 --- a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs +++ b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// build-pass +//@ compile-flags: -Z threads=16 +//@ build-pass pub static GLOBAL: isize = 3; diff --git a/tests/ui/parallel-rustc/hello_world.rs b/tests/ui/parallel-rustc/hello_world.rs index 53e95c890ef52..56698fe248970 100644 --- a/tests/ui/parallel-rustc/hello_world.rs +++ b/tests/ui/parallel-rustc/hello_world.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=8 -// run-pass +//@ compile-flags: -Z threads=8 +//@ run-pass fn main() { println!("Hello world!"); diff --git a/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs b/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs index 1907348cf09dc..ea8ecb678591a 100644 --- a/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs +++ b/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// run-pass +//@ compile-flags: -Z threads=16 +//@ run-pass #[repr(transparent)] struct Sched { diff --git a/tests/ui/parser/anon-enums-are-ambiguous.rs b/tests/ui/parser/anon-enums-are-ambiguous.rs index b0173cf98e0a6..c6c3a6be1ef7c 100644 --- a/tests/ui/parser/anon-enums-are-ambiguous.rs +++ b/tests/ui/parser/anon-enums-are-ambiguous.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! test_expr { ($expr:expr) => {}; diff --git a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs index 60da408c81153..6c04537919165 100644 --- a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs +++ b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs @@ -1,6 +1,6 @@ // All constant items (associated or otherwise) may syntactically use `_` as a name. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/assoc/assoc-oddities-1.rs b/tests/ui/parser/assoc/assoc-oddities-1.rs index 5914805e5c1c8..246546ac03420 100644 --- a/tests/ui/parser/assoc/assoc-oddities-1.rs +++ b/tests/ui/parser/assoc/assoc-oddities-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // following lines below parse and must not fail diff --git a/tests/ui/parser/assoc/assoc-oddities-2.rs b/tests/ui/parser/assoc/assoc-oddities-2.rs index 3d35aad745589..aee2af41d62a6 100644 --- a/tests/ui/parser/assoc/assoc-oddities-2.rs +++ b/tests/ui/parser/assoc/assoc-oddities-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // see assoc-oddities-1 for explanation diff --git a/tests/ui/parser/async-with-nonterminal-block.rs b/tests/ui/parser/async-with-nonterminal-block.rs index 96015fd5d82de..8604bd383a180 100644 --- a/tests/ui/parser/async-with-nonterminal-block.rs +++ b/tests/ui/parser/async-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 macro_rules! create_async { ($body:block) => { diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.rs b/tests/ui/parser/attribute/attr-dangling-in-fn.rs index c7c45bafb0d1e..d59f90aed5d15 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-fn.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-fn.rs @@ -1,4 +1,4 @@ -// error-pattern:expected statement +//@ error-pattern:expected statement fn f() { #[foo = "bar"] diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.rs b/tests/ui/parser/attribute/attr-dangling-in-mod.rs index 261ed3913afd7..001ac1135f6e4 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-mod.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-mod.rs @@ -1,4 +1,4 @@ -// error-pattern:expected item +//@ error-pattern:expected item fn main() { } diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.fixed b/tests/ui/parser/attribute/attr-unquoted-ident.fixed index 6cdf22f7ec0e7..636508b5615aa 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.fixed +++ b/tests/ui/parser/attribute/attr-unquoted-ident.fixed @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key="foo")] diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.rs b/tests/ui/parser/attribute/attr-unquoted-ident.rs index 75af015c9feee..9b9a9f7840352 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.rs +++ b/tests/ui/parser/attribute/attr-unquoted-ident.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key=foo)] diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.fixed b/tests/ui/parser/bad-fn-ptr-qualifier.fixed index ad8e718cf88a5..558a27cd4562d 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.fixed +++ b/tests/ui/parser/bad-fn-ptr-qualifier.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.rs b/tests/ui/parser/bad-fn-ptr-qualifier.rs index c04813dadff7b..9750f480935f2 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.rs +++ b/tests/ui/parser/bad-fn-ptr-qualifier.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-name.rs b/tests/ui/parser/bad-name.rs index 9b42716924d32..59432a1d9a5b9 100644 --- a/tests/ui/parser/bad-name.rs +++ b/tests/ui/parser/bad-name.rs @@ -1,4 +1,4 @@ -// error-pattern: expected +//@ error-pattern: expected fn main() { let x.y::.z foo; diff --git a/tests/ui/parser/bad-recover-kw-after-impl.rs b/tests/ui/parser/bad-recover-kw-after-impl.rs index 218cd7678594f..23abceaf49376 100644 --- a/tests/ui/parser/bad-recover-kw-after-impl.rs +++ b/tests/ui/parser/bad-recover-kw-after-impl.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// edition:2021 +//@ edition:2021 // for the `impl` + keyword test macro_rules! impl_primitive { diff --git a/tests/ui/parser/bad-recover-ty-after-impl.rs b/tests/ui/parser/bad-recover-ty-after-impl.rs index 510e08ba091a4..7ea0049f8f8c5 100644 --- a/tests/ui/parser/bad-recover-ty-after-impl.rs +++ b/tests/ui/parser/bad-recover-ty-after-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! impl_primitive { ($ty:ty) => { impl_primitive!(impl $ty); }; diff --git a/tests/ui/parser/bastion-of-the-turbofish.rs b/tests/ui/parser/bastion-of-the-turbofish.rs index 7ceea676d3a37..45d4d82344bef 100644 --- a/tests/ui/parser/bastion-of-the-turbofish.rs +++ b/tests/ui/parser/bastion-of-the-turbofish.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Bastion of the Turbofish // ------------------------ diff --git a/tests/ui/parser/block-no-opening-brace.rs b/tests/ui/parser/block-no-opening-brace.rs index 8a6599488b1e7..e90a34104e8f5 100644 --- a/tests/ui/parser/block-no-opening-brace.rs +++ b/tests/ui/parser/block-no-opening-brace.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(try_blocks)] diff --git a/tests/ui/parser/bounds-obj-parens.rs b/tests/ui/parser/bounds-obj-parens.rs index 8c446d27d0a94..eea4bccdc09cb 100644 --- a/tests/ui/parser/bounds-obj-parens.rs +++ b/tests/ui/parser/bounds-obj-parens.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/bounds-type.rs b/tests/ui/parser/bounds-type.rs index bd5f6105f51a2..a1971fa3146d1 100644 --- a/tests/ui/parser/bounds-type.rs +++ b/tests/ui/parser/bounds-type.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only struct S< T: 'a + Tr, // OK diff --git a/tests/ui/parser/break-in-unlabeled-block.fixed b/tests/ui/parser/break-in-unlabeled-block.fixed index 0885623252160..9aeaa2de93fed 100644 --- a/tests/ui/parser/break-in-unlabeled-block.fixed +++ b/tests/ui/parser/break-in-unlabeled-block.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'block: { break 'block (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/break-in-unlabeled-block.rs b/tests/ui/parser/break-in-unlabeled-block.rs index 3e5587e9f9c97..1c952f4b5f4c1 100644 --- a/tests/ui/parser/break-in-unlabeled-block.rs +++ b/tests/ui/parser/break-in-unlabeled-block.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { { break (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/circular_modules_hello.rs b/tests/ui/parser/circular_modules_hello.rs index 6968ca97b8219..eb0284d8b410f 100644 --- a/tests/ui/parser/circular_modules_hello.rs +++ b/tests/ui/parser/circular_modules_hello.rs @@ -1,4 +1,4 @@ -// ignore-test: this is an auxiliary file for circular-modules-main.rs +//@ ignore-test: this is an auxiliary file for circular-modules-main.rs #[path = "circular_modules_main.rs"] mod circular_modules_main; diff --git a/tests/ui/parser/circular_modules_main.rs b/tests/ui/parser/circular_modules_main.rs index d4b47efe68158..d5cdff34a264f 100644 --- a/tests/ui/parser/circular_modules_main.rs +++ b/tests/ui/parser/circular_modules_main.rs @@ -1,4 +1,4 @@ -// error-pattern: circular modules +//@ error-pattern: circular modules #[path = "circular_modules_hello.rs"] mod circular_modules_hello; diff --git a/tests/ui/parser/class-implements-bad-trait.rs b/tests/ui/parser/class-implements-bad-trait.rs index f2f85d0265a8a..152fe09b51c0b 100644 --- a/tests/ui/parser/class-implements-bad-trait.rs +++ b/tests/ui/parser/class-implements-bad-trait.rs @@ -1,4 +1,4 @@ -// error-pattern:nonexistent +//@ error-pattern:nonexistent class cat : nonexistent { let meows: usize; new(in_x : usize) { self.meows = in_x; } diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs index d8346653c25aa..6566d8a11154c 100644 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs +++ b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn syntax() { diff --git a/tests/ui/parser/doc-comment-in-stmt.fixed b/tests/ui/parser/doc-comment-in-stmt.fixed index 4b3ecccf66c35..7deaee3d9d8d4 100644 --- a/tests/ui/parser/doc-comment-in-stmt.fixed +++ b/tests/ui/parser/doc-comment-in-stmt.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/doc-comment-in-stmt.rs b/tests/ui/parser/doc-comment-in-stmt.rs index 73d08f51c669e..5a0ee263871de 100644 --- a/tests/ui/parser/doc-comment-in-stmt.rs +++ b/tests/ui/parser/doc-comment-in-stmt.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/eq-gt-to-gt-eq.fixed b/tests/ui/parser/eq-gt-to-gt-eq.fixed index 44cb464fc0c9c..abb328399be2a 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.fixed +++ b/tests/ui/parser/eq-gt-to-gt-eq.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/eq-gt-to-gt-eq.rs b/tests/ui/parser/eq-gt-to-gt-eq.rs index dca67c89cc033..1f57fa8328198 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.rs +++ b/tests/ui/parser/eq-gt-to-gt-eq.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/expr-as-stmt.fixed b/tests/ui/parser/expr-as-stmt.fixed index b06f62794c4e3..0a4d62a4a0c8e 100644 --- a/tests/ui/parser/expr-as-stmt.fixed +++ b/tests/ui/parser/expr-as-stmt.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/expr-as-stmt.rs b/tests/ui/parser/expr-as-stmt.rs index b39d2b88647c0..99c85e65baa55 100644 --- a/tests/ui/parser/expr-as-stmt.rs +++ b/tests/ui/parser/expr-as-stmt.rs @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs index 8f5d7f4f7f8fd..a4e9134218cea 100644 --- a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs +++ b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs @@ -1,5 +1,5 @@ #![allow(clashing_extern_declarations)] -// check-pass +//@ check-pass // In this test we check that the parser accepts an ABI string when it // comes from a macro `literal` or `expr` fragment as opposed to a hardcoded string. diff --git a/tests/ui/parser/extern-abi-raw-strings.rs b/tests/ui/parser/extern-abi-raw-strings.rs index fad855a21f6b1..cad7943ed625b 100644 --- a/tests/ui/parser/extern-abi-raw-strings.rs +++ b/tests/ui/parser/extern-abi-raw-strings.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will accept raw strings. diff --git a/tests/ui/parser/extern-abi-string-escaping.rs b/tests/ui/parser/extern-abi-string-escaping.rs index 87bd31aabb67d..f7bc71e34dbfe 100644 --- a/tests/ui/parser/extern-abi-string-escaping.rs +++ b/tests/ui/parser/extern-abi-string-escaping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will escapes. diff --git a/tests/ui/parser/extern-abi-syntactic.rs b/tests/ui/parser/extern-abi-syntactic.rs index 7d2bbfe8a0163..d3e2ba0e2d3f6 100644 --- a/tests/ui/parser/extern-abi-syntactic.rs +++ b/tests/ui/parser/extern-abi-syntactic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that from the grammar's point of view, // the specific set of ABIs is not part of it. diff --git a/tests/ui/parser/extern-crate-async.rs b/tests/ui/parser/extern-crate-async.rs index 6a54ac7f4a520..7c7769075b658 100644 --- a/tests/ui/parser/extern-crate-async.rs +++ b/tests/ui/parser/extern-crate-async.rs @@ -1,7 +1,7 @@ // Make sure that we don't parse `extern crate async` // the front matter of a function leading us astray. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/float-literals.rs b/tests/ui/parser/float-literals.rs index 1e9319fd27d48..d8ee59bca82b6 100644 --- a/tests/ui/parser/float-literals.rs +++ b/tests/ui/parser/float-literals.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-linelength // Regression test for #31109 and #31407. diff --git a/tests/ui/parser/fn-body-optional-syntactic-pass.rs b/tests/ui/parser/fn-body-optional-syntactic-pass.rs index f9dbebf0bea18..140471dfc774b 100644 --- a/tests/ui/parser/fn-body-optional-syntactic-pass.rs +++ b/tests/ui/parser/fn-body-optional-syntactic-pass.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms having or lacking a body are syntactically valid. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/fn-defined-using-def.rs b/tests/ui/parser/fn-defined-using-def.rs index 21da34c47c9fd..7a040d5de72cd 100644 --- a/tests/ui/parser/fn-defined-using-def.rs +++ b/tests/ui/parser/fn-defined-using-def.rs @@ -1,5 +1,5 @@ // Check what happens when `def` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-fun.rs b/tests/ui/parser/fn-defined-using-fun.rs index 4f74605043e19..b90452e3c6b46 100644 --- a/tests/ui/parser/fn-defined-using-fun.rs +++ b/tests/ui/parser/fn-defined-using-fun.rs @@ -1,5 +1,5 @@ // Check what happens when `fun` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-func.rs b/tests/ui/parser/fn-defined-using-func.rs index 2dce96fdce078..a7b66c28541c2 100644 --- a/tests/ui/parser/fn-defined-using-func.rs +++ b/tests/ui/parser/fn-defined-using-func.rs @@ -1,5 +1,5 @@ // Check what happens when `func` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-function.rs b/tests/ui/parser/fn-defined-using-function.rs index fd8782728e2b9..6ea12514c47a6 100644 --- a/tests/ui/parser/fn-defined-using-function.rs +++ b/tests/ui/parser/fn-defined-using-function.rs @@ -1,5 +1,5 @@ // Check what happens when `function` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-header-semantic-fail.rs b/tests/ui/parser/fn-header-semantic-fail.rs index f01e1c2277c6f..25d7c3f35fcaa 100644 --- a/tests/ui/parser/fn-header-semantic-fail.rs +++ b/tests/ui/parser/fn-header-semantic-fail.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// edition:2018 +//@ edition:2018 #![feature(const_extern_fn)] diff --git a/tests/ui/parser/fn-header-syntactic-pass.rs b/tests/ui/parser/fn-header-syntactic-pass.rs index 68f1f7901bb78..065ded31b0730 100644 --- a/tests/ui/parser/fn-header-syntactic-pass.rs +++ b/tests/ui/parser/fn-header-syntactic-pass.rs @@ -1,7 +1,7 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn main() {} diff --git a/tests/ui/parser/fn-returns-fn-pointer.rs b/tests/ui/parser/fn-returns-fn-pointer.rs index 15590e324861c..e19108bb2ca9a 100644 --- a/tests/ui/parser/fn-returns-fn-pointer.rs +++ b/tests/ui/parser/fn-returns-fn-pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #78507. fn foo() -> Option Option> { Some(|| Some(true)) diff --git a/tests/ui/parser/foreign-static-syntactic-pass.rs b/tests/ui/parser/foreign-static-syntactic-pass.rs index 599496346173a..a76b9bab49112 100644 --- a/tests/ui/parser/foreign-static-syntactic-pass.rs +++ b/tests/ui/parser/foreign-static-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a foreign static may have a body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/foreign-ty-syntactic-pass.rs b/tests/ui/parser/foreign-ty-syntactic-pass.rs index a746de1f14f4d..50bb68cd83be2 100644 --- a/tests/ui/parser/foreign-ty-syntactic-pass.rs +++ b/tests/ui/parser/foreign-ty-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/generic-param-default-in-binder.rs b/tests/ui/parser/generic-param-default-in-binder.rs index 78dc4186b3a53..740640f43a44a 100644 --- a/tests/ui/parser/generic-param-default-in-binder.rs +++ b/tests/ui/parser/generic-param-default-in-binder.rs @@ -1,7 +1,7 @@ // Check that defaults for generic parameters in `for<...>` binders are // syntactically valid. See also PR #119042. -// check-pass +//@ check-pass macro_rules! a { ($ty:ty) => {} } diff --git a/tests/ui/parser/if-block-unreachable-expr.rs b/tests/ui/parser/if-block-unreachable-expr.rs index 4063a33708402..01d8f62ddfb1e 100644 --- a/tests/ui/parser/if-block-unreachable-expr.rs +++ b/tests/ui/parser/if-block-unreachable-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This regressed from 1.20 -> 1.21 -- the condition is unreachable, // but it's still an expression, and should parse fine. diff --git a/tests/ui/parser/if-in-in.fixed b/tests/ui/parser/if-in-in.fixed index 0bb88c55936f0..566efbdf9f0a3 100644 --- a/tests/ui/parser/if-in-in.fixed +++ b/tests/ui/parser/if-in-in.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/if-in-in.rs b/tests/ui/parser/if-in-in.rs index 6c0986fe1ba5f..048bc03b91a33 100644 --- a/tests/ui/parser/if-in-in.rs +++ b/tests/ui/parser/if-in-in.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/impl-item-const-pass.rs b/tests/ui/parser/impl-item-const-pass.rs index d1124561374a5..8ebdf633b5b97 100644 --- a/tests/ui/parser/impl-item-const-pass.rs +++ b/tests/ui/parser/impl-item-const-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-fn-no-body-pass.rs b/tests/ui/parser/impl-item-fn-no-body-pass.rs index 16b09d64e8c17..5a593fe1d124d 100644 --- a/tests/ui/parser/impl-item-fn-no-body-pass.rs +++ b/tests/ui/parser/impl-item-fn-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-type-no-body-pass.rs b/tests/ui/parser/impl-item-type-no-body-pass.rs index 74a9c6ab7e8a6..039825bcc538c 100644 --- a/tests/ui/parser/impl-item-type-no-body-pass.rs +++ b/tests/ui/parser/impl-item-type-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-qpath.rs b/tests/ui/parser/impl-qpath.rs index d1f0a02041bee..d7c4989b6e4c4 100644 --- a/tests/ui/parser/impl-qpath.rs +++ b/tests/ui/parser/impl-qpath.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only impl <*const u8>::AssocTy {} // OK impl ::AssocTy {} // OK diff --git a/tests/ui/parser/import-from-path.rs b/tests/ui/parser/import-from-path.rs index 3fce08259fca8..54349d4971eff 100644 --- a/tests/ui/parser/import-from-path.rs +++ b/tests/ui/parser/import-from-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar}::baz diff --git a/tests/ui/parser/import-from-rename.rs b/tests/ui/parser/import-from-rename.rs index 27425a3c99a35..f6a4bb55553c2 100644 --- a/tests/ui/parser/import-from-rename.rs +++ b/tests/ui/parser/import-from-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar} as baz; diff --git a/tests/ui/parser/import-glob-path.rs b/tests/ui/parser/import-glob-path.rs index de4c07aa7bb6f..cb854de0cff69 100644 --- a/tests/ui/parser/import-glob-path.rs +++ b/tests/ui/parser/import-glob-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::*::bar diff --git a/tests/ui/parser/import-glob-rename.rs b/tests/ui/parser/import-glob-rename.rs index b9b753dcd70a8..899818b15b6f6 100644 --- a/tests/ui/parser/import-glob-rename.rs +++ b/tests/ui/parser/import-glob-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::* as baz; diff --git a/tests/ui/parser/increment-autofix-2.fixed b/tests/ui/parser/increment-autofix-2.fixed index 580ebaf5dbb13..7d40add9a30dd 100644 --- a/tests/ui/parser/increment-autofix-2.fixed +++ b/tests/ui/parser/increment-autofix-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix-2.rs b/tests/ui/parser/increment-autofix-2.rs index ebe5fa6ca1e76..27cd8fb0b1c32 100644 --- a/tests/ui/parser/increment-autofix-2.rs +++ b/tests/ui/parser/increment-autofix-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix.fixed b/tests/ui/parser/increment-autofix.fixed index 7a426badfc2d3..1d2800574d8a3 100644 --- a/tests/ui/parser/increment-autofix.fixed +++ b/tests/ui/parser/increment-autofix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/increment-autofix.rs b/tests/ui/parser/increment-autofix.rs index d38603697a7a6..4b36e2c546a01 100644 --- a/tests/ui/parser/increment-autofix.rs +++ b/tests/ui/parser/increment-autofix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/inner-attr-in-trait-def.rs b/tests/ui/parser/inner-attr-in-trait-def.rs index 8dba6b362cdfa..0c6f710b1cfb8 100644 --- a/tests/ui/parser/inner-attr-in-trait-def.rs +++ b/tests/ui/parser/inner-attr-in-trait-def.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] diff --git a/tests/ui/parser/intersection-patterns-1.fixed b/tests/ui/parser/intersection-patterns-1.fixed index 44773095b8718..f63d57472cf10 100644 --- a/tests/ui/parser/intersection-patterns-1.fixed +++ b/tests/ui/parser/intersection-patterns-1.fixed @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/intersection-patterns-1.rs b/tests/ui/parser/intersection-patterns-1.rs index 1036b9daf648a..3a457659aac2e 100644 --- a/tests/ui/parser/intersection-patterns-1.rs +++ b/tests/ui/parser/intersection-patterns-1.rs @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs index e5604b816b5e9..44697afcfed6e 100644 --- a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/parser/issues/issue-100197-mut-let.fixed b/tests/ui/parser/issues/issue-100197-mut-let.fixed index 5a89562220005..a7af3cb1500c1 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.fixed +++ b/tests/ui/parser/issues/issue-100197-mut-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _x = 123; diff --git a/tests/ui/parser/issues/issue-100197-mut-let.rs b/tests/ui/parser/issues/issue-100197-mut-let.rs index 71103813a6ed3..38ed287d14d6f 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.rs +++ b/tests/ui/parser/issues/issue-100197-mut-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { mut let _x = 123; diff --git a/tests/ui/parser/issues/issue-101477-enum.fixed b/tests/ui/parser/issues/issue-101477-enum.fixed index 1dfeae22aea2f..92c2b7c470f94 100644 --- a/tests/ui/parser/issues/issue-101477-enum.fixed +++ b/tests/ui/parser/issues/issue-101477-enum.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-enum.rs b/tests/ui/parser/issues/issue-101477-enum.rs index ea7051d69a4c7..21d377384d3f9 100644 --- a/tests/ui/parser/issues/issue-101477-enum.rs +++ b/tests/ui/parser/issues/issue-101477-enum.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-let.fixed b/tests/ui/parser/issues/issue-101477-let.fixed index 9989ad81524e1..cbcbeb171af54 100644 --- a/tests/ui/parser/issues/issue-101477-let.fixed +++ b/tests/ui/parser/issues/issue-101477-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-101477-let.rs b/tests/ui/parser/issues/issue-101477-let.rs index 8b0e8bee1799d..edfcbbf8e8ffb 100644 --- a/tests/ui/parser/issues/issue-101477-let.rs +++ b/tests/ui/parser/issues/issue-101477-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x == 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-103381.fixed b/tests/ui/parser/issues/issue-103381.fixed index 6a9fb991097fb..9b63bf206a06c 100644 --- a/tests/ui/parser/issues/issue-103381.fixed +++ b/tests/ui/parser/issues/issue-103381.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103381.rs b/tests/ui/parser/issues/issue-103381.rs index bf79e10103e13..a44a7410aaf39 100644 --- a/tests/ui/parser/issues/issue-103381.rs +++ b/tests/ui/parser/issues/issue-103381.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103451.rs b/tests/ui/parser/issues/issue-103451.rs index be33213f3cbce..6b0928229e912 100644 --- a/tests/ui/parser/issues/issue-103451.rs +++ b/tests/ui/parser/issues/issue-103451.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter struct R { } struct S { x: [u8; R diff --git a/tests/ui/parser/issues/issue-10392-2.fixed b/tests/ui/parser/issues/issue-10392-2.fixed index 3386fac17dfd7..09f2627f81677 100644 --- a/tests/ui/parser/issues/issue-10392-2.fixed +++ b/tests/ui/parser/issues/issue-10392-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-10392-2.rs b/tests/ui/parser/issues/issue-10392-2.rs index 30628ae31c3bd..7f46c12ccf260 100644 --- a/tests/ui/parser/issues/issue-10392-2.rs +++ b/tests/ui/parser/issues/issue-10392-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-105209.rs b/tests/ui/parser/issues/issue-105209.rs index 6146b795de19a..f4e331523bf42 100644 --- a/tests/ui/parser/issues/issue-105209.rs +++ b/tests/ui/parser/issues/issue-105209.rs @@ -1,3 +1,3 @@ -// compile-flags: -Zunpretty=ast-tree +//@ compile-flags: -Zunpretty=ast-tree #![c={#![c[)x //~ ERROR mismatched closing delimiter //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-105366.fixed b/tests/ui/parser/issues/issue-105366.fixed index ad26643c32794..7157b647524dd 100644 --- a/tests/ui/parser/issues/issue-105366.fixed +++ b/tests/ui/parser/issues/issue-105366.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105366.rs b/tests/ui/parser/issues/issue-105366.rs index 311b6a60f1a27..dc3cb8b343d32 100644 --- a/tests/ui/parser/issues/issue-105366.rs +++ b/tests/ui/parser/issues/issue-105366.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105634.rs b/tests/ui/parser/issues/issue-105634.rs index 579aa6e5bfb1b..477807aed7ce6 100644 --- a/tests/ui/parser/issues/issue-105634.rs +++ b/tests/ui/parser/issues/issue-105634.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _a = ..; diff --git a/tests/ui/parser/issues/issue-10636-2.rs b/tests/ui/parser/issues/issue-10636-2.rs index 80d8ef65a6952..7200ea1f1dd1f 100644 --- a/tests/ui/parser/issues/issue-10636-2.rs +++ b/tests/ui/parser/issues/issue-10636-2.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched closing delimiter: `}` +//@ error-pattern: mismatched closing delimiter: `}` // FIXME(31528) we emit a bunch of silly errors here due to continuing past the // first one. This would be easy-ish to address by better recovery in tokenisation. diff --git a/tests/ui/parser/issues/issue-107705.rs b/tests/ui/parser/issues/issue-107705.rs index b80984fcdb026..b72b02ce3a9bb 100644 --- a/tests/ui/parser/issues/issue-107705.rs +++ b/tests/ui/parser/issues/issue-107705.rs @@ -1,3 +1,3 @@ -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions fn f() {a(b:&, //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed index b819aa810cb77..bddc4719ea326 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing() -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs index 01efe728081f3..32257bb4b5a84 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed index eaae288864a3d..2c776f414e04a 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce() -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs index ea5c71150e83c..c45541e08b237 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-112188.fixed b/tests/ui/parser/issues/issue-112188.fixed index 5e73d8e38de81..a4fdf5567f7a8 100644 --- a/tests/ui/parser/issues/issue-112188.fixed +++ b/tests/ui/parser/issues/issue-112188.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-112188.rs b/tests/ui/parser/issues/issue-112188.rs index 27ca192e52263..70c355b161053 100644 --- a/tests/ui/parser/issues/issue-112188.rs +++ b/tests/ui/parser/issues/issue-112188.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-113203.rs b/tests/ui/parser/issues/issue-113203.rs index 1103251c14038..70e5003c63af8 100644 --- a/tests/ui/parser/issues/issue-113203.rs +++ b/tests/ui/parser/issues/issue-113203.rs @@ -1,6 +1,6 @@ // Checks what happens when we attempt to use the await keyword as a prefix. Span // incorrectly emitted an `.await` in E0277 which does not exist -// edition:2018 +//@ edition:2018 fn main() { await {}() //~^ ERROR incorrect use of `await` diff --git a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs index 3421333b8a076..7edc4ec5aee6e 100644 --- a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs +++ b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs @@ -3,7 +3,7 @@ // if we are inside a macro call since it can be valid input for a subsequent macro rule. // See also #103534. -// check-pass +//@ check-pass macro_rules! mdo { ($p: pat =<< $e: expr ; $( $t: tt )*) => { diff --git a/tests/ui/parser/issues/issue-14303-fncall.rs b/tests/ui/parser/issues/issue-14303-fncall.rs index afc4959f17524..59d4eab06d6ff 100644 --- a/tests/ui/parser/issues/issue-14303-fncall.rs +++ b/tests/ui/parser/issues/issue-14303-fncall.rs @@ -1,4 +1,4 @@ -// revisions: full generic_arg +//@ revisions: full generic_arg // can't run rustfix because it doesn't handle multipart suggestions correctly // we need the above to avoid ast borrowck failure in recovered code #![cfg_attr(generic_arg, feature(generic_arg_infer))] diff --git a/tests/ui/parser/issues/issue-17718-parse-const.rs b/tests/ui/parser/issues/issue-17718-parse-const.rs index d5a5f445d5bdc..e24faeb7d5470 100644 --- a/tests/ui/parser/issues/issue-17718-parse-const.rs +++ b/tests/ui/parser/issues/issue-17718-parse-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: usize = 3; diff --git a/tests/ui/parser/issues/issue-17904.rs b/tests/ui/parser/issues/issue-17904.rs index 020fb41c22738..6f77d4bb086fb 100644 --- a/tests/ui/parser/issues/issue-17904.rs +++ b/tests/ui/parser/issues/issue-17904.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zparse-only +//@ compile-flags: -Zparse-only struct Baz where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax. struct Baz where U: Eq(U) -> R; // Notice this parses as well. diff --git a/tests/ui/parser/issues/issue-21146.rs b/tests/ui/parser/issues/issue-21146.rs index 19eaffc3edd4a..81112808b21e3 100644 --- a/tests/ui/parser/issues/issue-21146.rs +++ b/tests/ui/parser/issues/issue-21146.rs @@ -1,3 +1,3 @@ -// error-pattern: expected one of `!` or `::`, found `` +//@ error-pattern: expected one of `!` or `::`, found `` include!("auxiliary/issue-21146-inc.rs"); fn main() {} diff --git a/tests/ui/parser/issues/issue-21475.rs b/tests/ui/parser/issues/issue-21475.rs index b028fcae0775b..27248179ef4a0 100644 --- a/tests/ui/parser/issues/issue-21475.rs +++ b/tests/ui/parser/issues/issue-21475.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports, overlapping_range_endpoints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use m::{START, END}; diff --git a/tests/ui/parser/issues/issue-30318.fixed b/tests/ui/parser/issues/issue-30318.fixed index 71fc82172a54d..d1661be519393 100644 --- a/tests/ui/parser/issues/issue-30318.fixed +++ b/tests/ui/parser/issues/issue-30318.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-30318.rs b/tests/ui/parser/issues/issue-30318.rs index 465dca2ff8224..6f055cd4f7e95 100644 --- a/tests/ui/parser/issues/issue-30318.rs +++ b/tests/ui/parser/issues/issue-30318.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-3036.fixed b/tests/ui/parser/issues/issue-3036.fixed index e5d5622e6fc00..14f8a401647ec 100644 --- a/tests/ui/parser/issues/issue-3036.fixed +++ b/tests/ui/parser/issues/issue-3036.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-3036.rs b/tests/ui/parser/issues/issue-3036.rs index 2f76fb99b2206..f6ce6222d4a39 100644 --- a/tests/ui/parser/issues/issue-3036.rs +++ b/tests/ui/parser/issues/issue-3036.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs index c1c847d92d04b..316c612940c9f 100644 --- a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs +++ b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![crate_type = "lib"] #![feature(type_ascription)] use std::future::Future; diff --git a/tests/ui/parser/issues/issue-46186.fixed b/tests/ui/parser/issues/issue-46186.fixed index 2cb5a4996ee25..0165f66a4eac3 100644 --- a/tests/ui/parser/issues/issue-46186.fixed +++ b/tests/ui/parser/issues/issue-46186.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-46186.rs b/tests/ui/parser/issues/issue-46186.rs index 84cad38c5ecb9..eec478ce164d2 100644 --- a/tests/ui/parser/issues/issue-46186.rs +++ b/tests/ui/parser/issues/issue-46186.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs index 8592f8a728715..27099f543cca5 100644 --- a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs +++ b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/issues/issue-48508-aux.rs b/tests/ui/parser/issues/issue-48508-aux.rs index ebdc70a04df90..0f2b4427383fd 100644 --- a/tests/ui/parser/issues/issue-48508-aux.rs +++ b/tests/ui/parser/issues/issue-48508-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-test Not a test. Used by issue-48508.rs +//@ run-pass +//@ ignore-test Not a test. Used by issue-48508.rs pub fn other() -> f64 { let µ = 1.0; diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs index b66e09620f4eb..54adfce93a4bb 100644 --- a/tests/ui/parser/issues/issue-48508.rs +++ b/tests/ui/parser/issues/issue-48508.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #48508: // // Confusion between global and local file offsets caused incorrect handling of multibyte character @@ -6,7 +6,7 @@ // when a multibyte character is at the end of a scope. The problematic code is actually in // issue-48508-aux.rs -// compile-flags:-g +//@ compile-flags:-g #![allow(uncommon_codepoints)] diff --git a/tests/ui/parser/issues/issue-48636.fixed b/tests/ui/parser/issues/issue-48636.fixed index 87c19a32d4c01..921eb4ef685b6 100644 --- a/tests/ui/parser/issues/issue-48636.fixed +++ b/tests/ui/parser/issues/issue-48636.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-48636.rs b/tests/ui/parser/issues/issue-48636.rs index 8610dc2f72ecf..269f11fa4a84e 100644 --- a/tests/ui/parser/issues/issue-48636.rs +++ b/tests/ui/parser/issues/issue-48636.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-54521-1.rs b/tests/ui/parser/issues/issue-54521-1.rs index 8a682ef0a1162..e80cb55eaeb7c 100644 --- a/tests/ui/parser/issues/issue-54521-1.rs +++ b/tests/ui/parser/issues/issue-54521-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that the `remove extra angle brackets` error doesn't happen for some // potential edge-cases.. diff --git a/tests/ui/parser/issues/issue-54521-2.fixed b/tests/ui/parser/issues/issue-54521-2.fixed index a91c4fe43ea46..63ca4c651920f 100644 --- a/tests/ui/parser/issues/issue-54521-2.fixed +++ b/tests/ui/parser/issues/issue-54521-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-2.rs b/tests/ui/parser/issues/issue-54521-2.rs index 3639aac87ee7f..0f3d9232ca1ec 100644 --- a/tests/ui/parser/issues/issue-54521-2.rs +++ b/tests/ui/parser/issues/issue-54521-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.fixed b/tests/ui/parser/issues/issue-54521-3.fixed index 84ab6866cf133..47ae6b9ebc5f0 100644 --- a/tests/ui/parser/issues/issue-54521-3.fixed +++ b/tests/ui/parser/issues/issue-54521-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.rs b/tests/ui/parser/issues/issue-54521-3.rs index f1d6850417880..94037c82e4ecd 100644 --- a/tests/ui/parser/issues/issue-54521-3.rs +++ b/tests/ui/parser/issues/issue-54521-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-57684.fixed b/tests/ui/parser/issues/issue-57684.fixed index 4a432206d51e1..a6a6493b43a76 100644 --- a/tests/ui/parser/issues/issue-57684.fixed +++ b/tests/ui/parser/issues/issue-57684.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57684.rs b/tests/ui/parser/issues/issue-57684.rs index 7a62785e32f1c..0ed52c576fe7f 100644 --- a/tests/ui/parser/issues/issue-57684.rs +++ b/tests/ui/parser/issues/issue-57684.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.fixed b/tests/ui/parser/issues/issue-57819.fixed index 3fab21db2d06e..0321a32ee39f8 100644 --- a/tests/ui/parser/issues/issue-57819.fixed +++ b/tests/ui/parser/issues/issue-57819.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.rs b/tests/ui/parser/issues/issue-57819.rs index 5cafbf439be2d..459e82dd2aa1e 100644 --- a/tests/ui/parser/issues/issue-57819.rs +++ b/tests/ui/parser/issues/issue-57819.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-5806.rs b/tests/ui/parser/issues/issue-5806.rs index b694642a9c5d6..3f1b7cda9316b 100644 --- a/tests/ui/parser/issues/issue-5806.rs +++ b/tests/ui/parser/issues/issue-5806.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" +//@ normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "../parser"] mod foo; //~ ERROR couldn't read diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs index a2ea8ad368baa..7952d29c26024 100644 --- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs +++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs @@ -1,5 +1,5 @@ // Fixed in #66054. // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error #[Ѕ \ No newline at end of file diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs index dd86fc9a7f851..a219f662cf78c 100644 --- a/tests/ui/parser/issues/issue-62524.rs +++ b/tests/ui/parser/issues/issue-62524.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 1 previous error +//@ error-pattern: aborting due to 1 previous error #![allow(uncommon_codepoints)] y![ diff --git a/tests/ui/parser/issues/issue-62554.rs b/tests/ui/parser/issues/issue-62554.rs index 4b463a17333a1..9f196e4b0d614 100644 --- a/tests/ui/parser/issues/issue-62554.rs +++ b/tests/ui/parser/issues/issue-62554.rs @@ -1,4 +1,4 @@ -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-62894.rs b/tests/ui/parser/issues/issue-62894.rs index 4dfa406ea2d82..5b1627a255372 100644 --- a/tests/ui/parser/issues/issue-62894.rs +++ b/tests/ui/parser/issues/issue-62894.rs @@ -1,5 +1,5 @@ // Regression test for #62894, shouldn't crash. -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f() { assert_eq!(f(), (), assert_eq!(assert_eq! diff --git a/tests/ui/parser/issues/issue-62973.rs b/tests/ui/parser/issues/issue-62973.rs index 22d7545770223..5c666d802fe44 100644 --- a/tests/ui/parser/issues/issue-62973.rs +++ b/tests/ui/parser/issues/issue-62973.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 3 previous errors +//@ error-pattern: aborting due to 3 previous errors fn main() {} diff --git a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs index b6e5091b6217e..d1a5f32b95464 100644 --- a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs +++ b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exclusive_range_pattern)] diff --git a/tests/ui/parser/issues/issue-63116.rs b/tests/ui/parser/issues/issue-63116.rs index 6b9d9cdbeb1fb..3be9606b4edbc 100644 --- a/tests/ui/parser/issues/issue-63116.rs +++ b/tests/ui/parser/issues/issue-63116.rs @@ -1,3 +1,3 @@ // fixed by #66361 -// error-pattern: aborting due to 2 previous errors +//@ error-pattern: aborting due to 2 previous errors impl W { diff --git a/tests/ui/parser/issues/issue-70388-without-witness.fixed b/tests/ui/parser/issues/issue-70388-without-witness.fixed index 58721495dcd12..46d42fcaa4b28 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.fixed +++ b/tests/ui/parser/issues/issue-70388-without-witness.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-70388-without-witness.rs b/tests/ui/parser/issues/issue-70388-without-witness.rs index 2e679db546476..b7eb76a414755 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.rs +++ b/tests/ui/parser/issues/issue-70388-without-witness.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-7222.rs b/tests/ui/parser/issues/issue-7222.rs index fb18f4cd62eca..6f6b34f4f4867 100644 --- a/tests/ui/parser/issues/issue-7222.rs +++ b/tests/ui/parser/issues/issue-7222.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { const FOO: f64 = 10.0; diff --git a/tests/ui/parser/issues/issue-75599.rs b/tests/ui/parser/issues/issue-75599.rs index 0857676e4ed58..d36285324e001 100644 --- a/tests/ui/parser/issues/issue-75599.rs +++ b/tests/ui/parser/issues/issue-75599.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] const or: usize = 1; diff --git a/tests/ui/parser/issues/issue-76437-async.rs b/tests/ui/parser/issues/issue-76437-async.rs index 84ee3dd21123c..497e269d634e5 100644 --- a/tests/ui/parser/issues/issue-76437-async.rs +++ b/tests/ui/parser/issues/issue-76437-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs index f1e06e4ad89e7..27594a85312eb 100644 --- a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async.rs b/tests/ui/parser/issues/issue-76437-const-async.rs index 3c789fdcd0228..45d53c6393321 100644 --- a/tests/ui/parser/issues/issue-76437-const-async.rs +++ b/tests/ui/parser/issues/issue-76437-const-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const.rs b/tests/ui/parser/issues/issue-76437-const.rs index d3815a52346ee..c3431e3567bf3 100644 --- a/tests/ui/parser/issues/issue-76437-const.rs +++ b/tests/ui/parser/issues/issue-76437-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs index daa1d120795fd..6e3039c222896 100644 --- a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub(crate) fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-unsafe.rs b/tests/ui/parser/issues/issue-76437-unsafe.rs index 785a79a79a2e0..206cc3e6660bb 100644 --- a/tests/ui/parser/issues/issue-76437-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76597.fixed b/tests/ui/parser/issues/issue-76597.fixed index 2d7a30b8361ad..779b4042cf49b 100644 --- a/tests/ui/parser/issues/issue-76597.fixed +++ b/tests/ui/parser/issues/issue-76597.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-76597.rs b/tests/ui/parser/issues/issue-76597.rs index 521b9c64b1c57..d78761df18eb4 100644 --- a/tests/ui/parser/issues/issue-76597.rs +++ b/tests/ui/parser/issues/issue-76597.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-81804.rs b/tests/ui/parser/issues/issue-81804.rs index ebc4752a14291..7c9e6e905825b 100644 --- a/tests/ui/parser/issues/issue-81804.rs +++ b/tests/ui/parser/issues/issue-81804.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-81827.rs b/tests/ui/parser/issues/issue-81827.rs index 91defd12a5783..a2bd345fc050e 100644 --- a/tests/ui/parser/issues/issue-81827.rs +++ b/tests/ui/parser/issues/issue-81827.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: mismatched closing delimiter: `]` +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: mismatched closing delimiter: `]` #![crate_name="0"] diff --git a/tests/ui/parser/issues/issue-83639.rs b/tests/ui/parser/issues/issue-83639.rs index 6ddbedfa0bc03..d22ef9b09e610 100644 --- a/tests/ui/parser/issues/issue-83639.rs +++ b/tests/ui/parser/issues/issue-83639.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // ignore-tidy-tab fn main() { diff --git a/tests/ui/parser/issues/issue-84104.rs b/tests/ui/parser/issues/issue-84104.rs index 962eb69bd83f1..bced05e684a7f 100644 --- a/tests/ui/parser/issues/issue-84104.rs +++ b/tests/ui/parser/issues/issue-84104.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter #[i=i::<ښܖ< diff --git a/tests/ui/parser/issues/issue-84148-2.rs b/tests/ui/parser/issues/issue-84148-2.rs index e677abde5f632..560475bd32c3f 100644 --- a/tests/ui/parser/issues/issue-84148-2.rs +++ b/tests/ui/parser/issues/issue-84148-2.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f(t:for<>t? diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed index 53f071db7819a..63c4515985da4 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs index db0edf4529c77..9a743b188c3f4 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs index 099178a7d50f8..694729376ba88 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that even when `const` is already present, the proposed fix is to remove the second `const` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs index 479426626858b..40f993eafbb1e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs index 867f71c12040e..c260c7213467e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs index 9a7f28210f930..bdfe248693ecc 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs index 8305ff4f62387..34b687a0f5261 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.fixed b/tests/ui/parser/issues/issue-88276-unary-plus.fixed index 25b7c340f600d..d991d46c0976c 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.fixed +++ b/tests/ui/parser/issues/issue-88276-unary-plus.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = 1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.rs b/tests/ui/parser/issues/issue-88276-unary-plus.rs index 11b2e9d601653..bcdf28cdb1a04 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.rs +++ b/tests/ui/parser/issues/issue-88276-unary-plus.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = +1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88583-union-as-ident.rs b/tests/ui/parser/issues/issue-88583-union-as-ident.rs index b3d66d46b1d4b..a18bd0aeee68f 100644 --- a/tests/ui/parser/issues/issue-88583-union-as-ident.rs +++ b/tests/ui/parser/issues/issue-88583-union-as-ident.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/parser/issues/issue-88770.rs b/tests/ui/parser/issues/issue-88770.rs index 9341415b2d9d6..ecc50481f65d7 100644 --- a/tests/ui/parser/issues/issue-88770.rs +++ b/tests/ui/parser/issues/issue-88770.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #88770. -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn m(){print!("",(c for&g u diff --git a/tests/ui/parser/issues/issue-89396.fixed b/tests/ui/parser/issues/issue-89396.fixed index 0c040ddea44d4..c31858d4a89b0 100644 --- a/tests/ui/parser/issues/issue-89396.fixed +++ b/tests/ui/parser/issues/issue-89396.fixed @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89396.rs b/tests/ui/parser/issues/issue-89396.rs index d95f666d797b6..b93820715fe72 100644 --- a/tests/ui/parser/issues/issue-89396.rs +++ b/tests/ui/parser/issues/issue-89396.rs @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs index fe67d9822fc9c..51bb04dba1921 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,4 +1,4 @@ -// aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs +//@ aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs #[macro_use] extern crate issue_89971_outer_attr_following_inner_attr_ice; diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed index 4b4a416b1ac82..37fa7fa54b6bd 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs index 9cc886641293b..8df82be0aba51 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum struct Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed index 64ab6f62b77f3..0c8b36f6f2e8f 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs index 50520971ffb32..55cabf533aced 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const let _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed index 7b73dfb02df89..64c06d608df8a 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 => {} //~ ERROR diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs index 92143fcf3f767..8ef31b230a322 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 >= {} //~ ERROR diff --git a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs index acfdd3c363f25..4edbee54de673 100644 --- a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs index db0039204d870..df5192645e11e 100644 --- a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs index 58fc926d08f3e..80de3cfc668dc 100644 --- a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs +++ b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.fixed b/tests/ui/parser/item-kw-case-mismatch.fixed index 4b99537fbf7f4..f5afa482712f6 100644 --- a/tests/ui/parser/item-kw-case-mismatch.fixed +++ b/tests/ui/parser/item-kw-case-mismatch.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.rs b/tests/ui/parser/item-kw-case-mismatch.rs index b11ec93754fc5..ea224e08a0085 100644 --- a/tests/ui/parser/item-kw-case-mismatch.rs +++ b/tests/ui/parser/item-kw-case-mismatch.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs index 4fa37bdb057b7..27452f4d45e85 100644 --- a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs +++ b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 fn main() { let try = "foo"; //~ error: expected identifier, found reserved keyword `try` diff --git a/tests/ui/parser/keyword-union-as-identifier.rs b/tests/ui/parser/keyword-union-as-identifier.rs index 7062557d73126..8b4a89442766d 100644 --- a/tests/ui/parser/keyword-union-as-identifier.rs +++ b/tests/ui/parser/keyword-union-as-identifier.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/parser/kw-in-trait-bounds.rs b/tests/ui/parser/kw-in-trait-bounds.rs index e9e85339affa9..16d23672ca3c6 100644 --- a/tests/ui/parser/kw-in-trait-bounds.rs +++ b/tests/ui/parser/kw-in-trait-bounds.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn _f(_: impl fn(), _: &dyn fn()) //~^ ERROR expected identifier, found keyword `fn` diff --git a/tests/ui/parser/let-binop.fixed b/tests/ui/parser/let-binop.fixed index 93f7f97b04fb7..83eff697f894f 100644 --- a/tests/ui/parser/let-binop.fixed +++ b/tests/ui/parser/let-binop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 = 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/let-binop.rs b/tests/ui/parser/let-binop.rs index 2adbceae5d3c4..16e46cd4d6c4d 100644 --- a/tests/ui/parser/let-binop.rs +++ b/tests/ui/parser/let-binop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 *= 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/lifetime-semicolon.fixed b/tests/ui/parser/lifetime-semicolon.fixed index 482b7704695c3..e9b6ab54b1f7a 100644 --- a/tests/ui/parser/lifetime-semicolon.fixed +++ b/tests/ui/parser/lifetime-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/lifetime-semicolon.rs b/tests/ui/parser/lifetime-semicolon.rs index 21c8b0a7f88b3..158c5ccdcdf19 100644 --- a/tests/ui/parser/lifetime-semicolon.rs +++ b/tests/ui/parser/lifetime-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/macro-braces-dot-question.rs b/tests/ui/parser/macro-braces-dot-question.rs index 016b434a6124a..9b070f201b573 100644 --- a/tests/ui/parser/macro-braces-dot-question.rs +++ b/tests/ui/parser/macro-braces-dot-question.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::io::Write; diff --git a/tests/ui/parser/macro/macro-expand-to-field.rs b/tests/ui/parser/macro/macro-expand-to-field.rs index 533511ecf5aac..ccdcf013cd25f 100644 --- a/tests/ui/parser/macro/macro-expand-to-field.rs +++ b/tests/ui/parser/macro/macro-expand-to-field.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // https://github.com/rust-lang/rust/issues/113766 diff --git a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs index fe062d62e5aa7..494e58c1ca516 100644 --- a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs +++ b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs @@ -3,8 +3,8 @@ // even in newer editions like Rust 2021. // Therefore the arm `?$Trait:path` shouldn't get reached. -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass macro_rules! check { ($Ty:ty) => {}; diff --git a/tests/ui/parser/match-refactor-to-expr.fixed b/tests/ui/parser/match-refactor-to-expr.fixed index 423147b27aa0b..bee49af9c95d8 100644 --- a/tests/ui/parser/match-refactor-to-expr.fixed +++ b/tests/ui/parser/match-refactor-to-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/match-refactor-to-expr.rs b/tests/ui/parser/match-refactor-to-expr.rs index fcba5d0447e0d..063f534197f3e 100644 --- a/tests/ui/parser/match-refactor-to-expr.rs +++ b/tests/ui/parser/match-refactor-to-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/mbe_missing_right_paren.rs b/tests/ui/parser/mbe_missing_right_paren.rs index 9a92e67da4db2..9c57b0ebcfc3d 100644 --- a/tests/ui/parser/mbe_missing_right_paren.rs +++ b/tests/ui/parser/mbe_missing_right_paren.rs @@ -1,3 +1,3 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter macro_rules! abc(ؼ \ No newline at end of file diff --git a/tests/ui/parser/missing_right_paren.rs b/tests/ui/parser/missing_right_paren.rs index cc6d30c9cac12..bbf4519a713ee 100644 --- a/tests/ui/parser/missing_right_paren.rs +++ b/tests/ui/parser/missing_right_paren.rs @@ -1,4 +1,4 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error fn main((ؼ \ No newline at end of file diff --git a/tests/ui/parser/misspelled-macro-rules.fixed b/tests/ui/parser/misspelled-macro-rules.fixed index 62be913d85f05..7471a5641c28a 100644 --- a/tests/ui/parser/misspelled-macro-rules.fixed +++ b/tests/ui/parser/misspelled-macro-rules.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/misspelled-macro-rules.rs b/tests/ui/parser/misspelled-macro-rules.rs index 4290e6e5e4cb9..8f63f37d3d388 100644 --- a/tests/ui/parser/misspelled-macro-rules.rs +++ b/tests/ui/parser/misspelled-macro-rules.rs @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/mod_file_not_exist.rs b/tests/ui/parser/mod_file_not_exist.rs index 7b079eb02dcf4..80a17163087c9 100644 --- a/tests/ui/parser/mod_file_not_exist.rs +++ b/tests/ui/parser/mod_file_not_exist.rs @@ -1,4 +1,4 @@ -// ignore-windows +//@ ignore-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_not_exist_windows.rs b/tests/ui/parser/mod_file_not_exist_windows.rs index 5db21e2bbc78c..88780c0c24e94 100644 --- a/tests/ui/parser/mod_file_not_exist_windows.rs +++ b/tests/ui/parser/mod_file_not_exist_windows.rs @@ -1,4 +1,4 @@ -// only-windows +//@ only-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_with_path_attr.rs b/tests/ui/parser/mod_file_with_path_attr.rs index 9450d89e5f51c..e2854f3cc8d90 100644 --- a/tests/ui/parser/mod_file_with_path_attr.rs +++ b/tests/ui/parser/mod_file_with_path_attr.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" #[path = "not_a_real_file.rs"] mod m; //~ ERROR not_a_real_file.rs diff --git a/tests/ui/parser/mut-patterns.rs b/tests/ui/parser/mut-patterns.rs index f2d2df0af29d9..b8610c4e19050 100644 --- a/tests/ui/parser/mut-patterns.rs +++ b/tests/ui/parser/mut-patterns.rs @@ -1,6 +1,6 @@ // Can't put mut in non-ident pattern -// edition:2018 +//@ edition:2018 #![feature(box_patterns)] #![allow(warnings)] diff --git a/tests/ui/parser/operator-associativity.rs b/tests/ui/parser/operator-associativity.rs index 4f40c80bc4c74..e6082d22cc376 100644 --- a/tests/ui/parser/operator-associativity.rs +++ b/tests/ui/parser/operator-associativity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testcase for issue #130, operator associativity. pub fn main() { assert_eq!(3 * 5 / 2, 7); } diff --git a/tests/ui/parser/parse-assoc-type-lt.rs b/tests/ui/parser/parse-assoc-type-lt.rs index 913fcd920bdb6..f1823ce96b932 100644 --- a/tests/ui/parser/parse-assoc-type-lt.rs +++ b/tests/ui/parser/parse-assoc-type-lt.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { type T; diff --git a/tests/ui/parser/parse-panic.rs b/tests/ui/parser/parse-panic.rs index aeb2ba4faa54a..6ef439d48378e 100644 --- a/tests/ui/parser/parse-panic.rs +++ b/tests/ui/parser/parse-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unreachable_code)] diff --git a/tests/ui/parser/parser-unicode-whitespace.rs b/tests/ui/parser/parser-unicode-whitespace.rs index 555cd68c3a76f..0b1c3186a4f52 100644 --- a/tests/ui/parser/parser-unicode-whitespace.rs +++ b/tests/ui/parser/parser-unicode-whitespace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Beware editing: it has numerous whitespace characters which are important. // It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in // https://unicode.org/Public/UNIDATA/PropList.txt diff --git a/tests/ui/parser/pat-tuple-2.rs b/tests/ui/parser/pat-tuple-2.rs index a8f3debd3d634..8bf2a9aa44904 100644 --- a/tests/ui/parser/pat-tuple-2.rs +++ b/tests/ui/parser/pat-tuple-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0, 1, 2) { diff --git a/tests/ui/parser/public-instead-of-pub-1.fixed b/tests/ui/parser/public-instead-of-pub-1.fixed index a4fa68ba5cc2f..dfbd14bb57589 100644 --- a/tests/ui/parser/public-instead-of-pub-1.fixed +++ b/tests/ui/parser/public-instead-of-pub-1.fixed @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix pub enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-1.rs b/tests/ui/parser/public-instead-of-pub-1.rs index 43565c9b1d25f..a783a348be001 100644 --- a/tests/ui/parser/public-instead-of-pub-1.rs +++ b/tests/ui/parser/public-instead-of-pub-1.rs @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix public enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-3.fixed b/tests/ui/parser/public-instead-of-pub-3.fixed index 14f620f41e8cd..dd85df4009da8 100644 --- a/tests/ui/parser/public-instead-of-pub-3.fixed +++ b/tests/ui/parser/public-instead-of-pub-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { pub const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub-3.rs b/tests/ui/parser/public-instead-of-pub-3.rs index ee27cb1a1a8b2..d79647ced6fe8 100644 --- a/tests/ui/parser/public-instead-of-pub-3.rs +++ b/tests/ui/parser/public-instead-of-pub-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { public const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub.fixed b/tests/ui/parser/public-instead-of-pub.fixed index 01db609990e37..69203c4afcf34 100644 --- a/tests/ui/parser/public-instead-of-pub.fixed +++ b/tests/ui/parser/public-instead-of-pub.fixed @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix pub struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/public-instead-of-pub.rs b/tests/ui/parser/public-instead-of-pub.rs index 18e0fd3af1ce6..9507477fcd3ef 100644 --- a/tests/ui/parser/public-instead-of-pub.rs +++ b/tests/ui/parser/public-instead-of-pub.rs @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix public struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/qualified-path-in-turbofish.fixed b/tests/ui/parser/qualified-path-in-turbofish.fixed index 404d2f7762df4..1cfd8db624575 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.fixed +++ b/tests/ui/parser/qualified-path-in-turbofish.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/qualified-path-in-turbofish.rs b/tests/ui/parser/qualified-path-in-turbofish.rs index 2f4b2ed348b9c..7aec515cc3d76 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.rs +++ b/tests/ui/parser/qualified-path-in-turbofish.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/range_inclusive.fixed b/tests/ui/parser/range_inclusive.fixed index fe23880d1d48a..3f466f0cf1055 100644 --- a/tests/ui/parser/range_inclusive.fixed +++ b/tests/ui/parser/range_inclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/range_inclusive.rs b/tests/ui/parser/range_inclusive.rs index bc6d2413d2623..00ded0d07929c 100644 --- a/tests/ui/parser/range_inclusive.rs +++ b/tests/ui/parser/range_inclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/ranges-precedence.rs b/tests/ui/parser/ranges-precedence.rs index db241ed0ccd7c..14dd6488ff26d 100644 --- a/tests/ui/parser/ranges-precedence.rs +++ b/tests/ui/parser/ranges-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the precedence of ranges is correct diff --git a/tests/ui/parser/raw/raw-str-in-macro-call.rs b/tests/ui/parser/raw/raw-str-in-macro-call.rs index 462c2279f5c1c..fc3c34cc1dd53 100644 --- a/tests/ui/parser/raw/raw-str-in-macro-call.rs +++ b/tests/ui/parser/raw/raw-str-in-macro-call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m1 { ($tt:tt #) => () diff --git a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs index 25af8772cedbd..2d8a3858aa603 100644 --- a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs +++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` type T1 = const extern "C" fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed index 6afc2d9935517..7d0566632d226 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs index b1716900c49d0..a8bad49fffc2c 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed index c2e76444d115e..d8ebe0869f8f5 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs index fc11c646a8c68..062e39643cac2 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 'label: 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed index acb846373cbb2..6f85452c6fb96 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.rs b/tests/ui/parser/recover/recover-missing-semi-before-item.rs index ef6cfe3c4ed7a..f75945b55c2b0 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.rs +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed index 6b9b7fa882a07..7e0194d5115bb 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs index f523581e2da19..d208bc7150d6f 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed index 159d995b8dad3..f003550cbc222 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.fixed +++ b/tests/ui/parser/recover/recover-unticked-labels.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break 'label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs index 56034de68449f..2b864f16b8412 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.rs +++ b/tests/ui/parser/recover/recover-unticked-labels.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed index a09ff3e5417e0..a851300a9828e 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example(#[allow(dead_code)] usize) where diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs index e86f2a8acb83d..10f435859f15a 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example where diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed index 09d1304b77546..8aec8c4cc435a 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.rs b/tests/ui/parser/removed-syntax/removed-syntax-box.rs index 1f5061b02c705..b77880e37553f 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.rs +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/self-param-syntactic-pass.rs b/tests/ui/parser/self-param-syntactic-pass.rs index d7bb7863c07d6..c7fdc5297164a 100644 --- a/tests/ui/parser/self-param-syntactic-pass.rs +++ b/tests/ui/parser/self-param-syntactic-pass.rs @@ -1,7 +1,7 @@ // This test ensures that `self` is syntactically accepted in all places an `FnDecl` is parsed. // FIXME(Centril): For now closures are an exception. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/semi-after-closure-in-macro.rs b/tests/ui/parser/semi-after-closure-in-macro.rs index 14efb6100b0a5..1eeb04b883378 100644 --- a/tests/ui/parser/semi-after-closure-in-macro.rs +++ b/tests/ui/parser/semi-after-closure-in-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that the fix in #103222 doesn't also disqualify semicolons after // closures within parentheses *in macros*, where they're totally allowed. diff --git a/tests/ui/parser/shebang/multiline-attrib.rs b/tests/ui/parser/shebang/multiline-attrib.rs index 931c94c7fba03..bb083610e551b 100644 --- a/tests/ui/parser/shebang/multiline-attrib.rs +++ b/tests/ui/parser/shebang/multiline-attrib.rs @@ -1,6 +1,6 @@ #! [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; diff --git a/tests/ui/parser/shebang/regular-attrib.rs b/tests/ui/parser/shebang/regular-attrib.rs index ca8fb0830ffb1..aed633d3ef1e0 100644 --- a/tests/ui/parser/shebang/regular-attrib.rs +++ b/tests/ui/parser/shebang/regular-attrib.rs @@ -1,5 +1,5 @@ #![allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/shebang-and-attrib.rs b/tests/ui/parser/shebang/shebang-and-attrib.rs index 61b89c655a3fc..a66c10db5321b 100644 --- a/tests/ui/parser/shebang/shebang-and-attrib.rs +++ b/tests/ui/parser/shebang/shebang-and-attrib.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/parser/shebang/shebang-comment.rs b/tests/ui/parser/shebang/shebang-comment.rs index 2b1ab0c574d26..37bcac8b29eeb 100644 --- a/tests/ui/parser/shebang/shebang-comment.rs +++ b/tests/ui/parser/shebang/shebang-comment.rs @@ -1,6 +1,6 @@ #!//bin/bash -// check-pass +//@ check-pass fn main() { println!("a valid shebang (that is also a rust comment)") } diff --git a/tests/ui/parser/shebang/shebang-empty.rs b/tests/ui/parser/shebang/shebang-empty.rs index e38cc637e945e..bb0df599783ee 100644 --- a/tests/ui/parser/shebang/shebang-empty.rs +++ b/tests/ui/parser/shebang/shebang-empty.rs @@ -1,4 +1,4 @@ #! -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/shebang/shebang-space.rs b/tests/ui/parser/shebang/shebang-space.rs index 0978b759d2a6e..cc58eed8b8abb 100644 --- a/tests/ui/parser/shebang/shebang-space.rs +++ b/tests/ui/parser/shebang/shebang-space.rs @@ -1,5 +1,5 @@ #! -// check-pass +//@ check-pass // ignore-tidy-end-whitespace fn main() {} diff --git a/tests/ui/parser/shebang/sneaky-attrib.rs b/tests/ui/parser/shebang/sneaky-attrib.rs index b406cc3aa13c7..eb814c6af2475 100644 --- a/tests/ui/parser/shebang/sneaky-attrib.rs +++ b/tests/ui/parser/shebang/sneaky-attrib.rs @@ -10,7 +10,7 @@ [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/valid-shebang.rs b/tests/ui/parser/shebang/valid-shebang.rs index e480d3da3fc8d..e59d4074ddf9c 100644 --- a/tests/ui/parser/shebang/valid-shebang.rs +++ b/tests/ui/parser/shebang/valid-shebang.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass fn main() { println!("Hello World!"); } diff --git a/tests/ui/parser/slowparse-bstring.rs b/tests/ui/parser/slowparse-bstring.rs index f3a6a668372fb..facfa8bb8529b 100644 --- a/tests/ui/parser/slowparse-bstring.rs +++ b/tests/ui/parser/slowparse-bstring.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/slowparse-string.rs b/tests/ui/parser/slowparse-string.rs index 6ebc61dae783b..977aa7c8766f9 100644 --- a/tests/ui/parser/slowparse-string.rs +++ b/tests/ui/parser/slowparse-string.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/stripped-nested-outline-mod-pass.rs b/tests/ui/parser/stripped-nested-outline-mod-pass.rs index 1b4669a439ffe..8909d8ae0eb63 100644 --- a/tests/ui/parser/stripped-nested-outline-mod-pass.rs +++ b/tests/ui/parser/stripped-nested-outline-mod-pass.rs @@ -1,7 +1,7 @@ // Expansion drives parsing, so conditional compilation will strip // out outline modules and we will never attempt parsing them. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed index 28191b82621fd..be6ed053c6e3e 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs index 924cb08a990a5..7900d397a5ded 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-filed-with-attr.fixed b/tests/ui/parser/struct-filed-with-attr.fixed index a799ec8ca2ea5..38ae446166a11 100644 --- a/tests/ui/parser/struct-filed-with-attr.fixed +++ b/tests/ui/parser/struct-filed-with-attr.fixed @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool, diff --git a/tests/ui/parser/struct-filed-with-attr.rs b/tests/ui/parser/struct-filed-with-attr.rs index bfc78e15b5b09..f8eac6251e2c0 100644 --- a/tests/ui/parser/struct-filed-with-attr.rs +++ b/tests/ui/parser/struct-filed-with-attr.rs @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool diff --git a/tests/ui/parser/struct-literal-in-match-guard.rs b/tests/ui/parser/struct-literal-in-match-guard.rs index bbee60e281732..ced01e08621a6 100644 --- a/tests/ui/parser/struct-literal-in-match-guard.rs +++ b/tests/ui/parser/struct-literal-in-match-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Unlike `if` condition, `match` guards accept struct literals. // This is detected in . diff --git a/tests/ui/parser/suggest-assoc-const.fixed b/tests/ui/parser/suggest-assoc-const.fixed index 4229135ebb23b..de7f2cbaaba5e 100644 --- a/tests/ui/parser/suggest-assoc-const.fixed +++ b/tests/ui/parser/suggest-assoc-const.fixed @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { const _X: i32; diff --git a/tests/ui/parser/suggest-assoc-const.rs b/tests/ui/parser/suggest-assoc-const.rs index 0cf695bd40aff..6d0244130a9b5 100644 --- a/tests/ui/parser/suggest-assoc-const.rs +++ b/tests/ui/parser/suggest-assoc-const.rs @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { let _X: i32; diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed index 81ee6cdf0a722..e8785eea307e8 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs index c8f525fc4f0ad..c5d7fa6412e47 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-semicolon-before-array.fixed b/tests/ui/parser/suggest-semicolon-before-array.fixed index a06b58b2740fa..219e2ae28b235 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.fixed +++ b/tests/ui/parser/suggest-semicolon-before-array.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest-semicolon-before-array.rs b/tests/ui/parser/suggest-semicolon-before-array.rs index f601ca2aef54e..382769b84c800 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.rs +++ b/tests/ui/parser/suggest-semicolon-before-array.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.fixed b/tests/ui/parser/suggest_misplaced_generics/enum.fixed index 3332118a1e768..cd9b70323ff2e 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/enum.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.rs b/tests/ui/parser/suggest_misplaced_generics/enum.rs index 5a2289c5c5ae2..e456347d01e40 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.rs +++ b/tests/ui/parser/suggest_misplaced_generics/enum.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed index 84bf64bd63cf9..311be359fe931 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn f<'a, B: 'a + std::ops::Add>(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs index d0684397e744c..9af1206a24b49 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn<'a, B: 'a + std::ops::Add> f(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed index cbfd5f2d39c08..8d319f7e612f4 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs index b207cf70d8584..c8503473b562c 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.fixed b/tests/ui/parser/suggest_misplaced_generics/struct.fixed index fec05bdeca15c..65d26601e101d 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/struct.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.rs b/tests/ui/parser/suggest_misplaced_generics/struct.rs index 6b80150d54656..013ba6e3ce50a 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.rs +++ b/tests/ui/parser/suggest_misplaced_generics/struct.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.fixed b/tests/ui/parser/suggest_misplaced_generics/trait.fixed index a471a078af142..1a848ccf7f260 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/trait.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.rs b/tests/ui/parser/suggest_misplaced_generics/trait.rs index 55355f451f9fd..a6b843c6cf6d5 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.rs +++ b/tests/ui/parser/suggest_misplaced_generics/trait.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/type.fixed b/tests/ui/parser/suggest_misplaced_generics/type.fixed index a97b9e66d0b2b..7aa223f212515 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/type.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/suggest_misplaced_generics/type.rs b/tests/ui/parser/suggest_misplaced_generics/type.rs index 17e200536fa3e..db0d8dd22b1bb 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.rs +++ b/tests/ui/parser/suggest_misplaced_generics/type.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/trailing-plus-in-bounds.rs b/tests/ui/parser/trailing-plus-in-bounds.rs index 400649bcf752f..ef9bdadb2825a 100644 --- a/tests/ui/parser/trailing-plus-in-bounds.rs +++ b/tests/ui/parser/trailing-plus-in-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/trailing-question-in-type.fixed b/tests/ui/parser/trailing-question-in-type.fixed index 6ea24484e033e..47ae66ac677e2 100644 --- a/tests/ui/parser/trailing-question-in-type.fixed +++ b/tests/ui/parser/trailing-question-in-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> Option { //~ ERROR invalid `?` in type let x: Option = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trailing-question-in-type.rs b/tests/ui/parser/trailing-question-in-type.rs index b1c508365cff5..4432ec9380cc4 100644 --- a/tests/ui/parser/trailing-question-in-type.rs +++ b/tests/ui/parser/trailing-question-in-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32? { //~ ERROR invalid `?` in type let x: i32? = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trait-item-with-defaultness-pass.rs b/tests/ui/parser/trait-item-with-defaultness-pass.rs index a6318bd99e2f6..c636342f6ca42 100644 --- a/tests/ui/parser/trait-item-with-defaultness-pass.rs +++ b/tests/ui/parser/trait-item-with-defaultness-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/trait-object-delimiters.rs b/tests/ui/parser/trait-object-delimiters.rs index 240ae3084d68e..84cd16c279684 100644 --- a/tests/ui/parser/trait-object-delimiters.rs +++ b/tests/ui/parser/trait-object-delimiters.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn foo1(_: &dyn Drop + AsRef) {} //~ ERROR ambiguous `+` in a type //~^ ERROR only auto traits can be used as additional traits in a trait object diff --git a/tests/ui/parser/trait-plusequal-splitting.rs b/tests/ui/parser/trait-plusequal-splitting.rs index 6ca6774507b88..2824da50d0f8e 100644 --- a/tests/ui/parser/trait-plusequal-splitting.rs +++ b/tests/ui/parser/trait-plusequal-splitting.rs @@ -1,6 +1,6 @@ // Fixes issue where `+` in generics weren't parsed if they were part of a `+=`. -// check-pass +//@ check-pass struct Whitespace { t: T } struct TokenSplit { t: T } diff --git a/tests/ui/parser/try-with-nonterminal-block.rs b/tests/ui/parser/try-with-nonterminal-block.rs index 2a9652f2e6dce..bc52dcd0e01d3 100644 --- a/tests/ui/parser/try-with-nonterminal-block.rs +++ b/tests/ui/parser/try-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(try_blocks)] diff --git a/tests/ui/parser/unbalanced-doublequote.rs b/tests/ui/parser/unbalanced-doublequote.rs index f213162053780..d9c936186ea07 100644 --- a/tests/ui/parser/unbalanced-doublequote.rs +++ b/tests/ui/parser/unbalanced-doublequote.rs @@ -1,4 +1,4 @@ -// error-pattern: unterminated double quote string +//@ error-pattern: unterminated double quote string fn main() { diff --git a/tests/ui/parser/unicode-character-literal.fixed b/tests/ui/parser/unicode-character-literal.fixed index 26ef5ffa11a80..9e31890151cc1 100644 --- a/tests/ui/parser/unicode-character-literal.fixed +++ b/tests/ui/parser/unicode-character-literal.fixed @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = "♠️"; diff --git a/tests/ui/parser/unicode-character-literal.rs b/tests/ui/parser/unicode-character-literal.rs index d331522c04cbb..d886e5b26a56b 100644 --- a/tests/ui/parser/unicode-character-literal.rs +++ b/tests/ui/parser/unicode-character-literal.rs @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = '♠️'; diff --git a/tests/ui/parser/use-unclosed-brace.rs b/tests/ui/parser/use-unclosed-brace.rs index fcfe95b26f96b..6679651fe47e2 100644 --- a/tests/ui/parser/use-unclosed-brace.rs +++ b/tests/ui/parser/use-unclosed-brace.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter use foo::{bar, baz; use std::fmt::Display; diff --git a/tests/ui/parser/utf16-be-without-bom.rs b/tests/ui/parser/utf16-be-without-bom.rs index 22aa19717873a..68e89bc7c223c 100644 Binary files a/tests/ui/parser/utf16-be-without-bom.rs and b/tests/ui/parser/utf16-be-without-bom.rs differ diff --git a/tests/ui/parser/utf16-le-without-bom.rs b/tests/ui/parser/utf16-le-without-bom.rs index 3c1049929e115..bdf4860d016f3 100644 Binary files a/tests/ui/parser/utf16-le-without-bom.rs and b/tests/ui/parser/utf16-le-without-bom.rs differ diff --git a/tests/ui/parser/utf8_idents-rpass.rs b/tests/ui/parser/utf8_idents-rpass.rs index 206744a58fde4..f485f15732866 100644 --- a/tests/ui/parser/utf8_idents-rpass.rs +++ b/tests/ui/parser/utf8_idents-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #![allow(non_snake_case)] diff --git a/tests/ui/parser/variadic-ffi-syntactic-pass.rs b/tests/ui/parser/variadic-ffi-syntactic-pass.rs index 3875d6af13716..da81f1362160a 100644 --- a/tests/ui/parser/variadic-ffi-syntactic-pass.rs +++ b/tests/ui/parser/variadic-ffi-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/path-lookahead.fixed b/tests/ui/path-lookahead.fixed index 928955630e9ff..440b22edd7d51 100644 --- a/tests/ui/path-lookahead.fixed +++ b/tests/ui/path-lookahead.fixed @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![allow(dead_code)] #![warn(unused_parens)] diff --git a/tests/ui/path-lookahead.rs b/tests/ui/path-lookahead.rs index d05c75fe8d8e0..7eaacd6bba78b 100644 --- a/tests/ui/path-lookahead.rs +++ b/tests/ui/path-lookahead.rs @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![allow(dead_code)] #![warn(unused_parens)] diff --git a/tests/ui/path.rs b/tests/ui/path.rs index 4c137de82d072..cd6962ac3e0c7 100644 --- a/tests/ui/path.rs +++ b/tests/ui/path.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod foo { pub fn bar(_offset: usize) { } diff --git a/tests/ui/paths-containing-nul.rs b/tests/ui/paths-containing-nul.rs index cb40c4f6fbf91..23ea84bc33fbc 100644 --- a/tests/ui/paths-containing-nul.rs +++ b/tests/ui/paths-containing-nul.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(deprecated)] -// ignore-wasm32-bare no files or I/O -// ignore-emscripten no files -// ignore-sgx no files +//@ ignore-wasm32-bare no files or I/O +//@ ignore-emscripten no files +//@ ignore-sgx no files use std::fs; use std::io; diff --git a/tests/ui/pattern/bindings-after-at/bind-by-copy.rs b/tests/ui/pattern/bindings-after-at/bind-by-copy.rs index 253b2d8890100..3d26b5e87d93f 100644 --- a/tests/ui/pattern/bindings-after-at/bind-by-copy.rs +++ b/tests/ui/pattern/bindings-after-at/bind-by-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] // Test copy diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs index 43b53b7cf1f17..d06733bb34427 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test `@` patterns combined with `box` patterns. diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs index 1df51c0edd911..1572747aaf821 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test `Copy` bindings in the rhs of `@` patterns. diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs index df213f688c282..1dda9e6a9b20b 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that `ref` patterns may be used on both sides // of an `@` pattern according to NLL borrowck. diff --git a/tests/ui/pattern/bindings-after-at/box-patterns.rs b/tests/ui/pattern/bindings-after-at/box-patterns.rs index 9db37253c5368..57110b0439a89 100644 --- a/tests/ui/pattern/bindings-after-at/box-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/box-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs b/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs index fe7d1eba1d9f2..b445e85163409 100644 --- a/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs +++ b/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/pattern/bindings-after-at/nested-patterns.rs b/tests/ui/pattern/bindings-after-at/nested-patterns.rs index f06563d56cb06..25537f0dd19db 100644 --- a/tests/ui/pattern/bindings-after-at/nested-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/nested-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: u8, b: u8 } diff --git a/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs index 383e377a5ebbb..f6c285634c07f 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns and box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs index d315f7ee3b68a..82e3f596e3efb 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns and slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/bindings-after-at/or-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns.rs index fcc361489994f..360ba9d1ad2ea 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/bindings-after-at/slice-patterns.rs b/tests/ui/pattern/bindings-after-at/slice-patterns.rs index 4f4c96e450b64..aa03269b53fbe 100644 --- a/tests/ui/pattern/bindings-after-at/slice-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/slice-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/byte-string-inference.rs b/tests/ui/pattern/byte-string-inference.rs index b1517de6b6797..c49f599bc9bfd 100644 --- a/tests/ui/pattern/byte-string-inference.rs +++ b/tests/ui/pattern/byte-string-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn load() -> Option { todo!() diff --git a/tests/ui/pattern/ignore-all-the-things.rs b/tests/ui/pattern/ignore-all-the-things.rs index 5980e1a857f26..80f016b8cec74 100644 --- a/tests/ui/pattern/ignore-all-the-things.rs +++ b/tests/ui/pattern/ignore-all-the-things.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed index cf6c2a24fdf52..e28208fc3b45a 100644 --- a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed +++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S { field_name: (), } diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs index 98772c1188ed4..59bc598a19783 100644 --- a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs +++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S { field_name: (), } diff --git a/tests/ui/pattern/integer-range-binding.rs b/tests/ui/pattern/integer-range-binding.rs index ff065882d96e2..a1838c0c997bc 100644 --- a/tests/ui/pattern/integer-range-binding.rs +++ b/tests/ui/pattern/integer-range-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let -2147483648..=2147483647 = 1; diff --git a/tests/ui/pattern/issue-10392.rs b/tests/ui/pattern/issue-10392.rs index 926fa94800eb1..dcbe2198ec605 100644 --- a/tests/ui/pattern/issue-10392.rs +++ b/tests/ui/pattern/issue-10392.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct A { foo: isize } diff --git a/tests/ui/pattern/issue-106862.fixed b/tests/ui/pattern/issue-106862.fixed index 9b27a61ffd069..82c6e6cfac395 100644 --- a/tests/ui/pattern/issue-106862.fixed +++ b/tests/ui/pattern/issue-106862.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/pattern/issue-106862.rs b/tests/ui/pattern/issue-106862.rs index 590430a784314..7adbd384c7083 100644 --- a/tests/ui/pattern/issue-106862.rs +++ b/tests/ui/pattern/issue-106862.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/pattern/issue-110508.rs b/tests/ui/pattern/issue-110508.rs index 1024ff05578ef..6ed0476183ece 100644 --- a/tests/ui/pattern/issue-110508.rs +++ b/tests/ui/pattern/issue-110508.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq)] pub enum Foo { diff --git a/tests/ui/pattern/issue-11577.rs b/tests/ui/pattern/issue-11577.rs index 70177c5ed0d36..da9720b422c5a 100644 --- a/tests/ui/pattern/issue-11577.rs +++ b/tests/ui/pattern/issue-11577.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Destructuring struct variants would ICE where regular structs wouldn't enum Foo { diff --git a/tests/ui/pattern/issue-117626.rs b/tests/ui/pattern/issue-117626.rs index f87147a5d88ec..f76f6b6222259 100644 --- a/tests/ui/pattern/issue-117626.rs +++ b/tests/ui/pattern/issue-117626.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(PartialEq)] struct NonMatchable; diff --git a/tests/ui/pattern/issue-12582.rs b/tests/ui/pattern/issue-12582.rs index f3366704e63af..2da2163726da2 100644 --- a/tests/ui/pattern/issue-12582.rs +++ b/tests/ui/pattern/issue-12582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 1; diff --git a/tests/ui/pattern/issue-15080.rs b/tests/ui/pattern/issue-15080.rs index 4dd6981d448e5..0cc550bea9c34 100644 --- a/tests/ui/pattern/issue-15080.rs +++ b/tests/ui/pattern/issue-15080.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut x: &[_] = &[1, 2, 3, 4]; diff --git a/tests/ui/pattern/issue-22546.rs b/tests/ui/pattern/issue-22546.rs index 8a0f51d0b84b9..fd1d5fb6c4775 100644 --- a/tests/ui/pattern/issue-22546.rs +++ b/tests/ui/pattern/issue-22546.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Parsing patterns with paths with type parameters (issue #22544) diff --git a/tests/ui/pattern/issue-27320.rs b/tests/ui/pattern/issue-27320.rs index d1aa56b915ba3..50c3f2afe32d4 100644 --- a/tests/ui/pattern/issue-27320.rs +++ b/tests/ui/pattern/issue-27320.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/ui/pattern/issue-6449.rs b/tests/ui/pattern/issue-6449.rs index bfd4c1232083c..38399a18793dd 100644 --- a/tests/ui/pattern/issue-6449.rs +++ b/tests/ui/pattern/issue-6449.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/pattern/issue-74954.rs b/tests/ui/pattern/issue-74954.rs index 269ec3c7abe93..7f998d7f21600 100644 --- a/tests/ui/pattern/issue-74954.rs +++ b/tests/ui/pattern/issue-74954.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { if let Some([b'@', filename @ ..]) = Some(b"@abc123") { diff --git a/tests/ui/pattern/issue-8351-1.rs b/tests/ui/pattern/issue-8351-1.rs index 139f027cb903e..371d6037fef29 100644 --- a/tests/ui/pattern/issue-8351-1.rs +++ b/tests/ui/pattern/issue-8351-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/pattern/issue-8351-2.rs b/tests/ui/pattern/issue-8351-2.rs index bc66cbb77c0cb..c1b839c89b5db 100644 --- a/tests/ui/pattern/issue-8351-2.rs +++ b/tests/ui/pattern/issue-8351-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/pattern/issue-88074-pat-range-type-inference.rs b/tests/ui/pattern/issue-88074-pat-range-type-inference.rs index 27db7d8c7ab9d..ce8087204116c 100644 --- a/tests/ui/pattern/issue-88074-pat-range-type-inference.rs +++ b/tests/ui/pattern/issue-88074-pat-range-type-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Zero { const ZERO: Self; diff --git a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs index 204cd3e665762..72674eb40ff04 100644 --- a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs +++ b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs b/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs index ff7b625a68e4a..b229480971d06 100644 --- a/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs +++ b/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs @@ -2,7 +2,7 @@ // happen and that code is unreachable according to borrowck, we accept this code. // In particular, we want to ensure here that an ICE does not happen, which it did originally. -// check-pass +//@ check-pass fn main() { return; diff --git a/tests/ui/pattern/move-ref-patterns/issue-53840.rs b/tests/ui/pattern/move-ref-patterns/issue-53840.rs index 80effc497ed93..64b6e8f2dcaa7 100644 --- a/tests/ui/pattern/move-ref-patterns/issue-53840.rs +++ b/tests/ui/pattern/move-ref-patterns/issue-53840.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E { Foo(String, String, String), diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs index 4de1f653db03a..875fe9dba898b 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed index 5f04fc83d37ab..2a0649ba47899 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { struct U; diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs index 5dc1ae2feb5f0..1bb6d8e15e14d 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { struct U; diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs index 1d6d9acead1d4..62d31f54f844d 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test checks the dynamic semantics and drop order of pattern matching // where a product pattern has both a by-move and by-ref binding. diff --git a/tests/ui/pattern/non-structural-match-types.rs b/tests/ui/pattern/non-structural-match-types.rs index 552342a1d3841..dde44dfee9c3d 100644 --- a/tests/ui/pattern/non-structural-match-types.rs +++ b/tests/ui/pattern/non-structural-match-types.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unreachable_code)] #![feature(const_async_blocks)] diff --git a/tests/ui/pattern/pat-tuple-field-count-cross.rs b/tests/ui/pattern/pat-tuple-field-count-cross.rs index b63da4e154f73..5a1f0432368f0 100644 --- a/tests/ui/pattern/pat-tuple-field-count-cross.rs +++ b/tests/ui/pattern/pat-tuple-field-count-cross.rs @@ -1,4 +1,4 @@ -// aux-build:declarations-for-tuple-field-count-errors.rs +//@ aux-build:declarations-for-tuple-field-count-errors.rs extern crate declarations_for_tuple_field_count_errors; diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.fixed b/tests/ui/pattern/pattern-bad-ref-box-order.fixed index 8825744a08b1d..96b91bca63b15 100644 --- a/tests/ui/pattern/pattern-bad-ref-box-order.fixed +++ b/tests/ui/pattern/pattern-bad-ref-box-order.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.rs b/tests/ui/pattern/pattern-bad-ref-box-order.rs index f3fcf0ceacf0b..29bf95d48b085 100644 --- a/tests/ui/pattern/pattern-bad-ref-box-order.rs +++ b/tests/ui/pattern/pattern-bad-ref-box-order.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/rest-pat-syntactic.rs b/tests/ui/pattern/rest-pat-syntactic.rs index 4da5a2db76743..1de29e69b0543 100644 --- a/tests/ui/pattern/rest-pat-syntactic.rs +++ b/tests/ui/pattern/rest-pat-syntactic.rs @@ -1,7 +1,7 @@ // Here we test that `..` is allowed in all pattern locations *syntactically*. // The semantic test is in `rest-pat-semantic-disallowed.rs`. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/pattern/size-and-align.rs b/tests/ui/pattern/size-and-align.rs index a32b5de72920a..f436ea481041e 100644 --- a/tests/ui/pattern/size-and-align.rs +++ b/tests/ui/pattern/size-and-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum clam { a(T, isize), b, } diff --git a/tests/ui/pattern/slice-array-infer.rs b/tests/ui/pattern/slice-array-infer.rs index f94a3dcfe0a6c..fdead488ea11d 100644 --- a/tests/ui/pattern/slice-array-infer.rs +++ b/tests/ui/pattern/slice-array-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] #![feature(generic_arg_infer)] diff --git a/tests/ui/pattern/slice-patterns-nested.rs b/tests/ui/pattern/slice-patterns-nested.rs index 077e0a139544b..32b01c5572d6c 100644 --- a/tests/ui/pattern/slice-patterns-nested.rs +++ b/tests/ui/pattern/slice-patterns-nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] struct Zeroes; diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed index b469fade3ea5e..db09fd1c0328e 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs index 42493a6327173..7e4b60f8ff28d 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs index 247b7f21f6866..c951cb567fcb7 100644 --- a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs +++ b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns // The precise semantics of inhabitedness with respect to unions and references is currently // undecided. This test file currently checks a conservative choice. diff --git a/tests/ui/pattern/usefulness/const-pat-ice.rs b/tests/ui/pattern/usefulness/const-pat-ice.rs index abfacf3936b6d..69f161856765f 100644 --- a/tests/ui/pattern/usefulness/const-pat-ice.rs +++ b/tests/ui/pattern/usefulness/const-pat-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: &&&u32 = &&&42; diff --git a/tests/ui/pattern/usefulness/const-private-fields.rs b/tests/ui/pattern/usefulness/const-private-fields.rs index 06c832ca46a6b..79a1d6e3ed7ff 100644 --- a/tests/ui/pattern/usefulness/const-private-fields.rs +++ b/tests/ui/pattern/usefulness/const-private-fields.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Check that we don't ignore private fields in usefulness checking #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/doc-hidden-fields.rs b/tests/ui/pattern/usefulness/doc-hidden-fields.rs index 4163b87dc8597..549e0d1af558a 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-fields.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-fields.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs index 5d4181a30f052..56842917f500b 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.rs b/tests/ui/pattern/usefulness/empty-match-check-notes.rs index c30cdfc2e4fee..ea797bc7dd5a3 100644 --- a/tests/ui/pattern/usefulness/empty-match-check-notes.rs +++ b/tests/ui/pattern/usefulness/empty-match-check-notes.rs @@ -1,5 +1,5 @@ -// aux-build:empty.rs -// revisions: normal exhaustive_patterns +//@ aux-build:empty.rs +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types, and checks NOTEs. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-match.rs b/tests/ui/pattern/usefulness/empty-match.rs index 20ab702c9c899..9b22b47a12b1f 100644 --- a/tests/ui/pattern/usefulness/empty-match.rs +++ b/tests/ui/pattern/usefulness/empty-match.rs @@ -1,4 +1,4 @@ -// revisions: normal exhaustive_patterns +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-types.rs b/tests/ui/pattern/usefulness/empty-types.rs index c66fd1edc19ec..170a663e754b2 100644 --- a/tests/ui/pattern/usefulness/empty-types.rs +++ b/tests/ui/pattern/usefulness/empty-types.rs @@ -1,4 +1,4 @@ -// revisions: normal min_exh_pats exhaustive_patterns +//@ revisions: normal min_exh_pats exhaustive_patterns // gate-test-min_exhaustive_patterns // // This tests correct handling of empty types in exhaustiveness checking. diff --git a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs index 37fcb4b4af9f3..7c9ea341ddb20 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0i8, 0i8) { (0, _) => {} diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs index 3778dede721f2..40f086dcc71c8 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs @@ -1,4 +1,4 @@ -// revisions: deny +//@ revisions: deny #![feature(exclusive_range_pattern)] #![allow(overlapping_range_endpoints)] diff --git a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs index d400ef0bbd64c..ef90e0e6ea766 100644 --- a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs +++ b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/pattern/usefulness/irrefutable-unit.rs b/tests/ui/pattern/usefulness/irrefutable-unit.rs index dd8f03b6dbd59..b4e72c0aa2ac4 100644 --- a/tests/ui/pattern/usefulness/irrefutable-unit.rs +++ b/tests/ui/pattern/usefulness/irrefutable-unit.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let ((),()) = ((),()); diff --git a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs index 39ad2d4abf3cc..984feef5f47e4 100644 --- a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs +++ b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct BaseCommand { field01: bool, field02: bool, diff --git a/tests/ui/pattern/usefulness/issue-30240-rpass.rs b/tests/ui/pattern/usefulness/issue-30240-rpass.rs index ab16614fd3084..c8342295b9197 100644 --- a/tests/ui/pattern/usefulness/issue-30240-rpass.rs +++ b/tests/ui/pattern/usefulness/issue-30240-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let &ref a = &[0i32] as &[_]; assert_eq!(a, &[0i32] as &[_]); diff --git a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs index 5b0482de2200e..e5adf15396549 100644 --- a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs +++ b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to cause a stack overflow during exhaustiveness checking in the compiler. diff --git a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs index 54dfa889ee35a..ebe6ce0629e68 100644 --- a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs +++ b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-66501.rs b/tests/ui/pattern/usefulness/issue-66501.rs index ffcfd4ad83e1f..e7a36ba3463e9 100644 --- a/tests/ui/pattern/usefulness/issue-66501.rs +++ b/tests/ui/pattern/usefulness/issue-66501.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs index e2ff9ac87ef51..1db5dff3bf825 100644 --- a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs +++ b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // In PR 71930, it was discovered that the code to retrieve the inferred type of a match scrutinee // was incorrect. diff --git a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs index 058f419679847..96ff8ff36cd15 100644 --- a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs +++ b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/72476 // and https://github.com/rust-lang/rust/issues/89393 diff --git a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs index 2879caf2c4c70..4b05a2cad81dd 100644 --- a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs +++ b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/78549 fn main() { diff --git a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs index aac7d7d5385a4..e963d65d6c702 100644 --- a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs +++ b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] pub enum TypeCtor { Slice, diff --git a/tests/ui/pattern/usefulness/issue-88747.rs b/tests/ui/pattern/usefulness/issue-88747.rs index 948c99f9ce989..9b04e766be81f 100644 --- a/tests/ui/pattern/usefulness/issue-88747.rs +++ b/tests/ui/pattern/usefulness/issue-88747.rs @@ -1,4 +1,4 @@ -// check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` +//@ check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` macro_rules! long_tuple_arg { ([$($t:tt)*]#$($h:tt)*) => { diff --git a/tests/ui/pattern/usefulness/match-privately-empty.rs b/tests/ui/pattern/usefulness/match-privately-empty.rs index 67a9aa2e91614..95b18e774fbdc 100644 --- a/tests/ui/pattern/usefulness/match-privately-empty.rs +++ b/tests/ui/pattern/usefulness/match-privately-empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete diff --git a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs index 8b2294f843272..51b05c9a1116e 100644 --- a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs +++ b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { foo: bool, bar: Option, baz: isize } diff --git a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs index 3a8a74d1fd65f..0c512e404321e 100644 --- a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs +++ b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs @@ -1,4 +1,4 @@ -// aux-build:non-exhaustive.rs +//@ aux-build:non-exhaustive.rs extern crate non_exhaustive; diff --git a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs index cbf64e2c53d02..63ae2c3d2fc26 100644 --- a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs +++ b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let s: &[bool] = &[true; 0]; diff --git a/tests/ui/pattern/usefulness/slice_of_empty.rs b/tests/ui/pattern/usefulness/slice_of_empty.rs index 5f64dd3fecc9a..589c7767ad246 100644 --- a/tests/ui/pattern/usefulness/slice_of_empty.rs +++ b/tests/ui/pattern/usefulness/slice_of_empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete diff --git a/tests/ui/pattern/usefulness/stable-gated-fields.rs b/tests/ui/pattern/usefulness/stable-gated-fields.rs index 90f40a8d62962..61b202b77f61f 100644 --- a/tests/ui/pattern/usefulness/stable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/stable-gated-fields.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/stable-gated-patterns.rs b/tests/ui/pattern/usefulness/stable-gated-patterns.rs index 03db01160ddab..5ceffbf092366 100644 --- a/tests/ui/pattern/usefulness/stable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/stable-gated-patterns.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/uninhabited.rs b/tests/ui/pattern/usefulness/uninhabited.rs index 5622808d4c7d6..ff7aeb263e4d2 100644 --- a/tests/ui/pattern/usefulness/uninhabited.rs +++ b/tests/ui/pattern/usefulness/uninhabited.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:empty.rs +//@ check-pass +//@ aux-build:empty.rs // // This tests plays with matching and uninhabited types. This also serves as a test for the // `Ty::is_inhabited_from` function. diff --git a/tests/ui/pattern/usefulness/unstable-gated-fields.rs b/tests/ui/pattern/usefulness/unstable-gated-fields.rs index 2b473ae989bbe..e6a4494867a0c 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-fields.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs index 7046555e0d2f0..e6db495a14940 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pin-macro/cant_access_internals.rs b/tests/ui/pin-macro/cant_access_internals.rs index 4aeb6a643d959..17fe7fa073848 100644 --- a/tests/ui/pin-macro/cant_access_internals.rs +++ b/tests/ui/pin-macro/cant_access_internals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::{ marker::PhantomPinned, diff --git a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs index 59774bc753dc9..8a0244e8145a7 100644 --- a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs +++ b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::{ convert::identity, diff --git a/tests/ui/polymorphization/closure_in_upvar/fn.rs b/tests/ui/polymorphization/closure_in_upvar/fn.rs index e1030858814e0..87f7bc9562be0 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fn.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fn.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { let x = |_: ()| (); diff --git a/tests/ui/polymorphization/closure_in_upvar/fnmut.rs b/tests/ui/polymorphization/closure_in_upvar/fnmut.rs index 62164ff948508..0f49c0426eecf 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fnmut.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fnmut.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { // Mutate an upvar from `x` so that it implements `FnMut`. diff --git a/tests/ui/polymorphization/closure_in_upvar/fnonce.rs b/tests/ui/polymorphization/closure_in_upvar/fnonce.rs index 7a364882fb8fd..85c7ce2ce272d 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fnonce.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fnonce.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { // Move a non-copy type into `x` so that it implements `FnOnce`. diff --git a/tests/ui/polymorphization/closure_in_upvar/other.rs b/tests/ui/polymorphization/closure_in_upvar/other.rs index 27d59ec889980..b008fc49af466 100644 --- a/tests/ui/polymorphization/closure_in_upvar/other.rs +++ b/tests/ui/polymorphization/closure_in_upvar/other.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn y_uses_f(f: impl Fn()) { let x = |_: ()| (); diff --git a/tests/ui/polymorphization/const_parameters/closures.rs b/tests/ui/polymorphization/const_parameters/closures.rs index 2f41beeb9691a..8bdb7381454ef 100644 --- a/tests/ui/polymorphization/const_parameters/closures.rs +++ b/tests/ui/polymorphization/const_parameters/closures.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/const_parameters/functions.rs b/tests/ui/polymorphization/const_parameters/functions.rs index cbc1b63fbc4e6..6535e3f081d82 100644 --- a/tests/ui/polymorphization/const_parameters/functions.rs +++ b/tests/ui/polymorphization/const_parameters/functions.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/coroutine.rs b/tests/ui/polymorphization/coroutine.rs index 3f28e89e36c6e..a989947f78738 100644 --- a/tests/ui/polymorphization/coroutine.rs +++ b/tests/ui/polymorphization/coroutine.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on -Zinline-mir=off +//@ build-fail +//@ compile-flags:-Zpolymorphize=on -Zinline-mir=off #![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/drop_shims/simple.rs b/tests/ui/polymorphization/drop_shims/simple.rs index 5f10d5e831cd3..e51765bf432e9 100644 --- a/tests/ui/polymorphization/drop_shims/simple.rs +++ b/tests/ui/polymorphization/drop_shims/simple.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Zpolymorphize=on +//@ check-pass +//@ compile-flags:-Zpolymorphize=on pub struct OnDrop(pub F); diff --git a/tests/ui/polymorphization/drop_shims/transitive.rs b/tests/ui/polymorphization/drop_shims/transitive.rs index 283b8da132947..331451e1a15fb 100644 --- a/tests/ui/polymorphization/drop_shims/transitive.rs +++ b/tests/ui/polymorphization/drop_shims/transitive.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Zpolymorphize=on +//@ check-pass +//@ compile-flags:-Zpolymorphize=on pub struct OnDrop(pub F); diff --git a/tests/ui/polymorphization/issue-74614.rs b/tests/ui/polymorphization/issue-74614.rs index 8b0c00b135519..3ed030b5778ce 100644 --- a/tests/ui/polymorphization/issue-74614.rs +++ b/tests/ui/polymorphization/issue-74614.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zpolymorphize=on -// build-pass +//@ compile-flags:-Zpolymorphize=on +//@ build-pass fn test() { std::mem::size_of::(); diff --git a/tests/ui/polymorphization/issue-74636.rs b/tests/ui/polymorphization/issue-74636.rs index 4c532f451e373..b06b5fdb004ee 100644 --- a/tests/ui/polymorphization/issue-74636.rs +++ b/tests/ui/polymorphization/issue-74636.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zpolymorphize=on -// build-pass +//@ compile-flags:-Zpolymorphize=on +//@ build-pass use std::any::TypeId; diff --git a/tests/ui/polymorphization/lifetimes.rs b/tests/ui/polymorphization/lifetimes.rs index f26df45230a5c..5f8aa13d61d99 100644 --- a/tests/ui/polymorphization/lifetimes.rs +++ b/tests/ui/polymorphization/lifetimes.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(rustc_attrs)] // This test checks that the polymorphization analysis doesn't break when the diff --git a/tests/ui/polymorphization/normalized_sig_types.rs b/tests/ui/polymorphization/normalized_sig_types.rs index d732b1071d8a9..c8a5b3e929539 100644 --- a/tests/ui/polymorphization/normalized_sig_types.rs +++ b/tests/ui/polymorphization/normalized_sig_types.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on +//@ build-pass +//@ compile-flags:-Zpolymorphize=on pub trait ParallelIterator: Sized { fn drive>(_: C) { diff --git a/tests/ui/polymorphization/predicates.rs b/tests/ui/polymorphization/predicates.rs index 6a5fc2e33de63..1ba68f2698e3e 100644 --- a/tests/ui/polymorphization/predicates.rs +++ b/tests/ui/polymorphization/predicates.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Copt-level=0 -Zpolymorphize=on +//@ build-fail +//@ compile-flags: -Copt-level=0 -Zpolymorphize=on #![feature(rustc_attrs)] diff --git a/tests/ui/polymorphization/promoted-function-1.rs b/tests/ui/polymorphization/promoted-function-1.rs index 2cd02673442fe..8c2ed6212493c 100644 --- a/tests/ui/polymorphization/promoted-function-1.rs +++ b/tests/ui/polymorphization/promoted-function-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zpolymorphize=on +//@ build-fail +//@ compile-flags: -Zpolymorphize=on #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/polymorphization/promoted-function-2.rs b/tests/ui/polymorphization/promoted-function-2.rs index d2d0f33681244..aaae7064f377a 100644 --- a/tests/ui/polymorphization/promoted-function-2.rs +++ b/tests/ui/polymorphization/promoted-function-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![crate_type = "lib"] #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/promoted-function-3.rs b/tests/ui/polymorphization/promoted-function-3.rs index bbd991e36ccaf..2ac06d5a139ae 100644 --- a/tests/ui/polymorphization/promoted-function-3.rs +++ b/tests/ui/polymorphization/promoted-function-3.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zpolymorphize=on -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zpolymorphize=on -Zmir-opt-level=4 fn caller() -> &'static usize { callee::() diff --git a/tests/ui/polymorphization/promoted-function.rs b/tests/ui/polymorphization/promoted-function.rs index a56a8e70e4c50..057daf4e75750 100644 --- a/tests/ui/polymorphization/promoted-function.rs +++ b/tests/ui/polymorphization/promoted-function.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zpolymorphize=on +//@ run-pass +//@ compile-flags:-Zpolymorphize=on fn fop() {} diff --git a/tests/ui/polymorphization/symbol-ambiguity.rs b/tests/ui/polymorphization/symbol-ambiguity.rs index 6277a902fa213..183837f996106 100644 --- a/tests/ui/polymorphization/symbol-ambiguity.rs +++ b/tests/ui/polymorphization/symbol-ambiguity.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags: -Zpolymorphize=on -Csymbol-mangling-version=v0 pub(crate) struct Foo<'a, I, E>(I, &'a E); diff --git a/tests/ui/polymorphization/too-many-generic-params.rs b/tests/ui/polymorphization/too-many-generic-params.rs index ec6244630fd1f..db160c336e0b3 100644 --- a/tests/ui/polymorphization/too-many-generic-params.rs +++ b/tests/ui/polymorphization/too-many-generic-params.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(rustc_attrs)] // This test checks that the analysis doesn't panic when there are >64 generic parameters, but diff --git a/tests/ui/polymorphization/type_parameters/closures.rs b/tests/ui/polymorphization/type_parameters/closures.rs index 07ab1355a47cf..552c5cb89806f 100644 --- a/tests/ui/polymorphization/type_parameters/closures.rs +++ b/tests/ui/polymorphization/type_parameters/closures.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(stmt_expr_attributes, rustc_attrs)] // This test checks that the polymorphization analysis correctly detects unused type diff --git a/tests/ui/polymorphization/type_parameters/functions.rs b/tests/ui/polymorphization/type_parameters/functions.rs index aad957e1dd362..548993fbca979 100644 --- a/tests/ui/polymorphization/type_parameters/functions.rs +++ b/tests/ui/polymorphization/type_parameters/functions.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(rustc_attrs)] // This test checks that the polymorphization analysis correctly detects unused type diff --git a/tests/ui/polymorphization/unsized_cast.rs b/tests/ui/polymorphization/unsized_cast.rs index b803fec2ccfdb..749e21f4e5b3c 100644 --- a/tests/ui/polymorphization/unsized_cast.rs +++ b/tests/ui/polymorphization/unsized_cast.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(fn_traits, rustc_attrs, unboxed_closures)] // This test checks that the polymorphization analysis considers a closure diff --git a/tests/ui/precondition-checks/misaligned-slice.rs b/tests/ui/precondition-checks/misaligned-slice.rs index c961c80035232..d105154ecd888 100644 --- a/tests/ui/precondition-checks/misaligned-slice.rs +++ b/tests/ui/precondition-checks/misaligned-slice.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: slice::from_raw_parts -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/precondition-checks/null-slice.rs b/tests/ui/precondition-checks/null-slice.rs index 1e67e7f5fb1d0..4347b85875d7d 100644 --- a/tests/ui/precondition-checks/null-slice.rs +++ b/tests/ui/precondition-checks/null-slice.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: slice::from_raw_parts -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs index 1366ba28f1c9e..7956d5e874322 100644 --- a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs +++ b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: hint::assert_unchecked -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/primitive-binop-lhs-mut.rs b/tests/ui/primitive-binop-lhs-mut.rs index 4f1c456ace354..d988e2ed14fc4 100644 --- a/tests/ui/primitive-binop-lhs-mut.rs +++ b/tests/ui/primitive-binop-lhs-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = Box::new(0); diff --git a/tests/ui/print-fuel/print-fuel.rs b/tests/ui/print-fuel/print-fuel.rs index f68de00b9b591..fd7e568bea7a0 100644 --- a/tests/ui/print-fuel/print-fuel.rs +++ b/tests/ui/print-fuel/print-fuel.rs @@ -2,8 +2,8 @@ #![allow(dead_code)] // (#55495: The --error-format is to sidestep an issue in our test harness) -// compile-flags: -C opt-level=0 --error-format human -Z print-fuel=foo -// check-pass +//@ compile-flags: -C opt-level=0 --error-format human -Z print-fuel=foo +//@ check-pass struct S1(u8, u16, u8); struct S2(u8, u16, u8); diff --git a/tests/ui/print-stdout-eprint-stderr.rs b/tests/ui/print-stdout-eprint-stderr.rs index cfa9aec806858..e676a9ad1afba 100644 --- a/tests/ui/print-stdout-eprint-stderr.rs +++ b/tests/ui/print-stdout-eprint-stderr.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes use std::{env, process}; diff --git a/tests/ui/print_type_sizes/anonymous.rs b/tests/ui/print_type_sizes/anonymous.rs index 2b008ca3b3a9a..a3a3222808802 100644 --- a/tests/ui/print_type_sizes/anonymous.rs +++ b/tests/ui/print_type_sizes/anonymous.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes -// build-pass +//@ compile-flags: -Z print-type-sizes +//@ build-pass // All of the types that occur in this function are uninteresting, in // that one cannot control the sizes of these types with the same sort diff --git a/tests/ui/print_type_sizes/async.rs b/tests/ui/print_type_sizes/async.rs index f38a6e674da99..805bccbcf6381 100644 --- a/tests/ui/print_type_sizes/async.rs +++ b/tests/ui/print_type_sizes/async.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// edition:2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ edition:2021 +//@ build-pass +//@ ignore-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/print_type_sizes/coroutine.rs b/tests/ui/print_type_sizes/coroutine.rs index aae72e0f37ec5..61488c51f0530 100644 --- a/tests/ui/print_type_sizes/coroutine.rs +++ b/tests/ui/print_type_sizes/coroutine.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/print_type_sizes/coroutine_discr_placement.rs b/tests/ui/print_type_sizes/coroutine_discr_placement.rs index 78fe75cdeb9e9..4b9f67a79997f 100644 --- a/tests/ui/print_type_sizes/coroutine_discr_placement.rs +++ b/tests/ui/print_type_sizes/coroutine_discr_placement.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ build-pass +//@ ignore-pass // Tests a coroutine that has its discriminant as the *final* field. diff --git a/tests/ui/print_type_sizes/generics.rs b/tests/ui/print_type_sizes/generics.rs index 05097087d5a81..af26dc690d27b 100644 --- a/tests/ui/print_type_sizes/generics.rs +++ b/tests/ui/print_type_sizes/generics.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/multiple_types.rs b/tests/ui/print_type_sizes/multiple_types.rs index 9159038924719..bbb16687f6a89 100644 --- a/tests/ui/print_type_sizes/multiple_types.rs +++ b/tests/ui/print_type_sizes/multiple_types.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates that when multiple structural types occur in // a function, every one of them is included in the output. diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs index feb9643850d05..da11f0c012170 100644 --- a/tests/ui/print_type_sizes/niche-filling.rs +++ b/tests/ui/print_type_sizes/niche-filling.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// ignore-debug: debug assertions will print more types -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ ignore-debug: debug assertions will print more types +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/no_duplicates.rs b/tests/ui/print_type_sizes/no_duplicates.rs index 2ec5d9e64bfbf..0903fd6fa9a47 100644 --- a/tests/ui/print_type_sizes/no_duplicates.rs +++ b/tests/ui/print_type_sizes/no_duplicates.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/packed.rs b/tests/ui/print_type_sizes/packed.rs index 5ddfe4bf4dbb0..888fa41a7597e 100644 --- a/tests/ui/print_type_sizes/packed.rs +++ b/tests/ui/print_type_sizes/packed.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/padding.rs b/tests/ui/print_type_sizes/padding.rs index f41c677dc6c08..81a5c78631026 100644 --- a/tests/ui/print_type_sizes/padding.rs +++ b/tests/ui/print_type_sizes/padding.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates how padding is handled: alignment // requirements can lead to the introduction of padding, either before diff --git a/tests/ui/print_type_sizes/repr-align.rs b/tests/ui/print_type_sizes/repr-align.rs index 0bd11ebc95843..1b9a22dcef7af 100644 --- a/tests/ui/print_type_sizes/repr-align.rs +++ b/tests/ui/print_type_sizes/repr-align.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/repr_int_c.rs b/tests/ui/print_type_sizes/repr_int_c.rs index 6b103776a30d3..f82dfcb7cfc54 100644 --- a/tests/ui/print_type_sizes/repr_int_c.rs +++ b/tests/ui/print_type_sizes/repr_int_c.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This test makes sure that the tag is not grown for `repr(C)` or `repr(u8)` // variants (see https://github.com/rust-lang/rust/issues/50098 for the original bug). diff --git a/tests/ui/print_type_sizes/uninhabited.rs b/tests/ui/print_type_sizes/uninhabited.rs index 86fab7b500af0..7cb3e5b33fa56 100644 --- a/tests/ui/print_type_sizes/uninhabited.rs +++ b/tests/ui/print_type_sizes/uninhabited.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/variants.rs b/tests/ui/print_type_sizes/variants.rs index 5a3020520265d..0d0e8a0773bb2 100644 --- a/tests/ui/print_type_sizes/variants.rs +++ b/tests/ui/print_type_sizes/variants.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates two things: // diff --git a/tests/ui/print_type_sizes/zero-sized-fields.rs b/tests/ui/print_type_sizes/zero-sized-fields.rs index 09415824d5df0..b3c4b684c6e80 100644 --- a/tests/ui/print_type_sizes/zero-sized-fields.rs +++ b/tests/ui/print_type_sizes/zero-sized-fields.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // At one point, zero-sized fields such as those in this file were causing // incorrect output from `-Z print-type-sizes`. diff --git a/tests/ui/privacy/auxiliary/ctor_aux.rs b/tests/ui/privacy/auxiliary/ctor_aux.rs index 9c99cca9ae6ed..625c4a7433634 100644 --- a/tests/ui/privacy/auxiliary/ctor_aux.rs +++ b/tests/ui/privacy/auxiliary/ctor_aux.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 //! Missing docs lint warns about undocumented exported items. //! Use the lint to additionally verify that items are reachable //! but not exported. diff --git a/tests/ui/privacy/auxiliary/issue-117997.rs b/tests/ui/privacy/auxiliary/issue-117997.rs index 6f71cc2ba3570..1ad90b1cfad8f 100644 --- a/tests/ui/privacy/auxiliary/issue-117997.rs +++ b/tests/ui/privacy/auxiliary/issue-117997.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --crate-type=rlib +//@ no-prefer-dynamic +//@ compile-flags: --crate-type=rlib pub use impl_mod::TraitImplementer as Implementer; diff --git a/tests/ui/privacy/ctor.rs b/tests/ui/privacy/ctor.rs index 0ec15d68ed39e..aa8012faf1e91 100644 --- a/tests/ui/privacy/ctor.rs +++ b/tests/ui/privacy/ctor.rs @@ -3,9 +3,9 @@ // shadowed and cannot be named directly, while their constructors are // reexported. Regression test for issue #96934. // -// aux-build:ctor_aux.rs -// edition:2021 -// build-pass +//@ aux-build:ctor_aux.rs +//@ edition:2021 +//@ build-pass extern crate ctor_aux; diff --git a/tests/ui/privacy/impl-privacy-xc-2.rs b/tests/ui/privacy/impl-privacy-xc-2.rs index 390764588fc87..da345ba207201 100644 --- a/tests/ui/privacy/impl-privacy-xc-2.rs +++ b/tests/ui/privacy/impl-privacy-xc-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:impl_privacy_xc_2.rs +//@ run-pass +//@ aux-build:impl_privacy_xc_2.rs extern crate impl_privacy_xc_2; diff --git a/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs index 21f7828fc8442..c1b43c5290fee 100644 --- a/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs +++ b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 mod outer { mod inner { diff --git a/tests/ui/privacy/issue-11593.rs b/tests/ui/privacy/issue-11593.rs index 8bf034e8203c9..fc7174bb2011e 100644 --- a/tests/ui/privacy/issue-11593.rs +++ b/tests/ui/privacy/issue-11593.rs @@ -1,4 +1,4 @@ -// aux-build:private-trait-xc.rs +//@ aux-build:private-trait-xc.rs extern crate private_trait_xc; diff --git a/tests/ui/privacy/issue-117997.rs b/tests/ui/privacy/issue-117997.rs index d8284ef29970c..5d2a417dccfbb 100644 --- a/tests/ui/privacy/issue-117997.rs +++ b/tests/ui/privacy/issue-117997.rs @@ -1,5 +1,5 @@ -// aux-build:issue-117997.rs -// build-pass +//@ aux-build:issue-117997.rs +//@ build-pass extern crate issue_117997; diff --git a/tests/ui/privacy/issue-119463.rs b/tests/ui/privacy/issue-119463.rs index e010bc9f536b0..7a7440a790b89 100644 --- a/tests/ui/privacy/issue-119463.rs +++ b/tests/ui/privacy/issue-119463.rs @@ -1,4 +1,4 @@ -// aux-build:issue-119463-extern.rs +//@ aux-build:issue-119463-extern.rs extern crate issue_119463_extern; diff --git a/tests/ui/privacy/issue-17718-const-privacy.rs b/tests/ui/privacy/issue-17718-const-privacy.rs index 6ab3a60df8742..85a5fec161728 100644 --- a/tests/ui/privacy/issue-17718-const-privacy.rs +++ b/tests/ui/privacy/issue-17718-const-privacy.rs @@ -1,4 +1,4 @@ -// aux-build:issue-17718-const-privacy.rs +//@ aux-build:issue-17718-const-privacy.rs extern crate issue_17718_const_privacy as other; diff --git a/tests/ui/privacy/issue-57264-1.rs b/tests/ui/privacy/issue-57264-1.rs index 59ebc4f54eedb..27b2551f17122 100644 --- a/tests/ui/privacy/issue-57264-1.rs +++ b/tests/ui/privacy/issue-57264-1.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-57264-1.rs +//@ check-pass +//@ aux-build:issue-57264-1.rs extern crate issue_57264_1; diff --git a/tests/ui/privacy/issue-57264-2.rs b/tests/ui/privacy/issue-57264-2.rs index 36ce5fd3b3e6f..857d73abdde4e 100644 --- a/tests/ui/privacy/issue-57264-2.rs +++ b/tests/ui/privacy/issue-57264-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-57264-2.rs +//@ check-pass +//@ aux-build:issue-57264-2.rs extern crate issue_57264_2; diff --git a/tests/ui/privacy/issue-75907_b.rs b/tests/ui/privacy/issue-75907_b.rs index fdfc5907c1674..a4781e4961759 100644 --- a/tests/ui/privacy/issue-75907_b.rs +++ b/tests/ui/privacy/issue-75907_b.rs @@ -1,5 +1,5 @@ // Test for diagnostic improvement issue #75907, extern crate -// aux-build:issue-75907.rs +//@ aux-build:issue-75907.rs extern crate issue_75907 as a; diff --git a/tests/ui/privacy/issue-92755.rs b/tests/ui/privacy/issue-92755.rs index 49559152b6fd0..dac72b367361c 100644 --- a/tests/ui/privacy/issue-92755.rs +++ b/tests/ui/privacy/issue-92755.rs @@ -1,5 +1,5 @@ -// aux-build:issue-92755.rs -// build-pass +//@ aux-build:issue-92755.rs +//@ build-pass // Thank you @tmiasko for providing the content of this test! diff --git a/tests/ui/privacy/macro-private-reexport.rs b/tests/ui/privacy/macro-private-reexport.rs index d0aab528ed480..ebefde18f1f4c 100644 --- a/tests/ui/privacy/macro-private-reexport.rs +++ b/tests/ui/privacy/macro-private-reexport.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(decl_macro)] diff --git a/tests/ui/privacy/priv-impl-prim-ty.rs b/tests/ui/privacy/priv-impl-prim-ty.rs index 5d6a6b64ed36a..f4c4973f61baf 100644 --- a/tests/ui/privacy/priv-impl-prim-ty.rs +++ b/tests/ui/privacy/priv-impl-prim-ty.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:priv-impl-prim-ty.rs +//@ run-pass +//@ aux-build:priv-impl-prim-ty.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate priv_impl_prim_ty as bar; diff --git a/tests/ui/privacy/privacy-ns.rs b/tests/ui/privacy/privacy-ns.rs index c32e3f17880db..10d5e7222177b 100644 --- a/tests/ui/privacy/privacy-ns.rs +++ b/tests/ui/privacy/privacy-ns.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/privacy/privacy-reexport.rs b/tests/ui/privacy/privacy-reexport.rs index b3ec3af04ace8..df642a57372e0 100644 --- a/tests/ui/privacy/privacy-reexport.rs +++ b/tests/ui/privacy/privacy-reexport.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:privacy_reexport.rs +//@ run-pass +//@ aux-build:privacy_reexport.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate privacy_reexport; diff --git a/tests/ui/privacy/privacy1-rpass.rs b/tests/ui/privacy/privacy1-rpass.rs index 4e54780dad2bb..10bc2492bc807 100644 --- a/tests/ui/privacy/privacy1-rpass.rs +++ b/tests/ui/privacy/privacy1-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod test2 { // This used to generate an ICE (make sure that default functions are diff --git a/tests/ui/privacy/privacy2.rs b/tests/ui/privacy/privacy2.rs index 212bc003e075c..33292a65c5d89 100644 --- a/tests/ui/privacy/privacy2.rs +++ b/tests/ui/privacy/privacy2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(start, no_core)] #![no_core] // makes debugging this test *a lot* easier (during resolve) diff --git a/tests/ui/privacy/privacy3.rs b/tests/ui/privacy/privacy3.rs index 3466f5bb1d207..fb1f432410dd1 100644 --- a/tests/ui/privacy/privacy3.rs +++ b/tests/ui/privacy/privacy3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(start, no_core)] #![no_core] // makes debugging this test *a lot* easier (during resolve) diff --git a/tests/ui/privacy/privacy5.rs b/tests/ui/privacy/privacy5.rs index 3dc26b1955cd7..048189c3433da 100644 --- a/tests/ui/privacy/privacy5.rs +++ b/tests/ui/privacy/privacy5.rs @@ -1,4 +1,4 @@ -// aux-build:privacy_tuple_struct.rs +//@ aux-build:privacy_tuple_struct.rs extern crate privacy_tuple_struct as other; diff --git a/tests/ui/privacy/private-bounds-locally-allowed.rs b/tests/ui/privacy/private-bounds-locally-allowed.rs index 96a007a64f630..956912249bf46 100644 --- a/tests/ui/privacy/private-bounds-locally-allowed.rs +++ b/tests/ui/privacy/private-bounds-locally-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #[allow(private_bounds)] pub trait Foo: FooImpl {} diff --git a/tests/ui/privacy/private-class-field.rs b/tests/ui/privacy/private-class-field.rs index 98e32ee0745b5..526cb788a12c5 100644 --- a/tests/ui/privacy/private-class-field.rs +++ b/tests/ui/privacy/private-class-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/privacy/private-in-public-expr-pat.rs b/tests/ui/privacy/private-in-public-expr-pat.rs index 5c9ecd13b0976..529a8f8970f41 100644 --- a/tests/ui/privacy/private-in-public-expr-pat.rs +++ b/tests/ui/privacy/private-in-public-expr-pat.rs @@ -1,6 +1,6 @@ // Patterns and expressions are not interface parts and don't produce private-in-public errors. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Priv1(usize); struct Priv2; diff --git a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs index 3fb543e962411..fd0e07fb9b49e 100644 --- a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs +++ b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(impl_trait_in_assoc_type)] #![feature(type_alias_impl_trait)] #![deny(private_interfaces, private_bounds)] diff --git a/tests/ui/privacy/private-in-public.rs b/tests/ui/privacy/private-in-public.rs index 7b8e0fbe6b64a..ee101b312726d 100644 --- a/tests/ui/privacy/private-in-public.rs +++ b/tests/ui/privacy/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Private types and traits are not allowed in public interfaces. // This test also ensures that the checks are performed even inside private modules. diff --git a/tests/ui/privacy/private-inferred-type-2.rs b/tests/ui/privacy/private-inferred-type-2.rs index 1c4c52bea289f..f9cdfe23cab2e 100644 --- a/tests/ui/privacy/private-inferred-type-2.rs +++ b/tests/ui/privacy/private-inferred-type-2.rs @@ -1,4 +1,4 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs #![allow(private_interfaces)] extern crate private_inferred_type as ext; diff --git a/tests/ui/privacy/private-inferred-type-3.rs b/tests/ui/privacy/private-inferred-type-3.rs index cdbdcf60b2c54..7bf6bea4b0f6e 100644 --- a/tests/ui/privacy/private-inferred-type-3.rs +++ b/tests/ui/privacy/private-inferred-type-3.rs @@ -1,12 +1,12 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs -// error-pattern:type `fn() {ext::priv_fn}` is private -// error-pattern:static `ext::PRIV_STATIC` is private -// error-pattern:type `ext::PrivEnum` is private -// error-pattern:type `fn() {::method}` is private -// error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private -// error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private -// error-pattern:type `for<'a> fn(&'a Pub) {Pub::::priv_method}` is private +//@ error-pattern:type `fn() {ext::priv_fn}` is private +//@ error-pattern:static `ext::PRIV_STATIC` is private +//@ error-pattern:type `ext::PrivEnum` is private +//@ error-pattern:type `fn() {::method}` is private +//@ error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private +//@ error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private +//@ error-pattern:type `for<'a> fn(&'a Pub) {Pub::::priv_method}` is private #![feature(decl_macro)] diff --git a/tests/ui/privacy/private-method-cross-crate.rs b/tests/ui/privacy/private-method-cross-crate.rs index 4da44e0682be9..7a11ab5ad55e1 100644 --- a/tests/ui/privacy/private-method-cross-crate.rs +++ b/tests/ui/privacy/private-method-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cci_class_5.rs +//@ aux-build:cci_class_5.rs extern crate cci_class_5; use cci_class_5::kitties::cat; diff --git a/tests/ui/privacy/private-method-rpass.rs b/tests/ui/privacy/private-method-rpass.rs index 726944fb25122..2ec29327d462f 100644 --- a/tests/ui/privacy/private-method-rpass.rs +++ b/tests/ui/privacy/private-method-rpass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { meows : usize, diff --git a/tests/ui/privacy/private-struct-field-cross-crate.rs b/tests/ui/privacy/private-struct-field-cross-crate.rs index 301cd37b76cdc..fa4a4c5c6a518 100644 --- a/tests/ui/privacy/private-struct-field-cross-crate.rs +++ b/tests/ui/privacy/private-struct-field-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cci_class.rs +//@ aux-build:cci_class.rs extern crate cci_class; use cci_class::kitties::cat; diff --git a/tests/ui/privacy/private-type-in-interface.rs b/tests/ui/privacy/private-type-in-interface.rs index 9f55127fd168e..2e8be28d76ebf 100644 --- a/tests/ui/privacy/private-type-in-interface.rs +++ b/tests/ui/privacy/private-type-in-interface.rs @@ -1,4 +1,4 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs #![allow(warnings)] #![allow(private_interfaces)] diff --git a/tests/ui/privacy/pub-extern-privacy.rs b/tests/ui/privacy/pub-extern-privacy.rs index dbbbe4e3b7d8f..b6c18bd1ee7c4 100644 --- a/tests/ui/privacy/pub-extern-privacy.rs +++ b/tests/ui/privacy/pub-extern-privacy.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem::transmute; diff --git a/tests/ui/privacy/pub-priv-dep/pub-priv1.rs b/tests/ui/privacy/pub-priv-dep/pub-priv1.rs index ec8666f93f096..f26dbb47ba5e9 100644 --- a/tests/ui/privacy/pub-priv-dep/pub-priv1.rs +++ b/tests/ui/privacy/pub-priv-dep/pub-priv1.rs @@ -1,6 +1,6 @@ -// aux-crate:priv:priv_dep=priv_dep.rs -// aux-build:pub_dep.rs -// compile-flags: -Zunstable-options +//@ aux-crate:priv:priv_dep=priv_dep.rs +//@ aux-build:pub_dep.rs +//@ compile-flags: -Zunstable-options #![deny(exported_private_dependencies)] // This crate is a private dependency diff --git a/tests/ui/privacy/pub-priv-dep/std-pub.rs b/tests/ui/privacy/pub-priv-dep/std-pub.rs index e25aa93a02e60..348e8d10735a3 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 +//@ run-pass #![deny(exported_private_dependencies)] diff --git a/tests/ui/privacy/pub-use-xcrate.rs b/tests/ui/privacy/pub-use-xcrate.rs index e8a6e8cf182d4..96c650d0c6843 100644 --- a/tests/ui/privacy/pub-use-xcrate.rs +++ b/tests/ui/privacy/pub-use-xcrate.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:pub_use_xcrate1.rs -// aux-build:pub_use_xcrate2.rs +//@ run-pass +//@ aux-build:pub_use_xcrate1.rs +//@ aux-build:pub_use_xcrate2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate pub_use_xcrate2; diff --git a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs index f163619e7cb5f..12b16c8cec8ec 100644 --- a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs +++ b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:pub_use_mods_xcrate.rs +//@ run-pass +//@ aux-build:pub_use_mods_xcrate.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] diff --git a/tests/ui/privacy/reachable-unnameable-items.rs b/tests/ui/privacy/reachable-unnameable-items.rs index 1babe011996b0..6ad95a77f454f 100644 --- a/tests/ui/privacy/reachable-unnameable-items.rs +++ b/tests/ui/privacy/reachable-unnameable-items.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// aux-build:reachable-unnameable-items.rs +//@ run-pass +//@ needs-unwind +//@ aux-build:reachable-unnameable-items.rs extern crate reachable_unnameable_items; use reachable_unnameable_items::*; diff --git a/tests/ui/privacy/restricted/lookup-ignores-private.rs b/tests/ui/privacy/restricted/lookup-ignores-private.rs index 240ce1e2b03b6..7060db0092fee 100644 --- a/tests/ui/privacy/restricted/lookup-ignores-private.rs +++ b/tests/ui/privacy/restricted/lookup-ignores-private.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] mod foo { diff --git a/tests/ui/privacy/restricted/private-in-public.rs b/tests/ui/privacy/restricted/private-in-public.rs index 80a7e6ad0a7ec..fa8371436b5b2 100644 --- a/tests/ui/privacy/restricted/private-in-public.rs +++ b/tests/ui/privacy/restricted/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { struct Priv; mod bar { diff --git a/tests/ui/privacy/restricted/relative-2018.rs b/tests/ui/privacy/restricted/relative-2018.rs index 954169a9ffb55..e4f290dec4ac6 100644 --- a/tests/ui/privacy/restricted/relative-2018.rs +++ b/tests/ui/privacy/restricted/relative-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod m { pub(in crate) struct S1; // OK diff --git a/tests/ui/privacy/restricted/test.rs b/tests/ui/privacy/restricted/test.rs index a8c269378c2ee..e1d87cfcd88c8 100644 --- a/tests/ui/privacy/restricted/test.rs +++ b/tests/ui/privacy/restricted/test.rs @@ -1,4 +1,4 @@ -// aux-build:pub_restricted.rs +//@ aux-build:pub_restricted.rs #![allow(warnings)] extern crate pub_restricted; diff --git a/tests/ui/privacy/sealed-traits/re-exported-trait.fixed b/tests/ui/privacy/sealed-traits/re-exported-trait.fixed index 6de7b865a9914..1553d689a1c2a 100644 --- a/tests/ui/privacy/sealed-traits/re-exported-trait.fixed +++ b/tests/ui/privacy/sealed-traits/re-exported-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub mod a { diff --git a/tests/ui/privacy/sealed-traits/re-exported-trait.rs b/tests/ui/privacy/sealed-traits/re-exported-trait.rs index bf07d666dff89..37eed341be1d9 100644 --- a/tests/ui/privacy/sealed-traits/re-exported-trait.rs +++ b/tests/ui/privacy/sealed-traits/re-exported-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub mod a { diff --git a/tests/ui/privacy/suggest-making-field-public.fixed b/tests/ui/privacy/suggest-making-field-public.fixed index 78e335b3db1cb..29dcde88ab489 100644 --- a/tests/ui/privacy/suggest-making-field-public.fixed +++ b/tests/ui/privacy/suggest-making-field-public.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod a { pub struct A(pub String); } diff --git a/tests/ui/privacy/suggest-making-field-public.rs b/tests/ui/privacy/suggest-making-field-public.rs index b65c801d10e6a..c9f04757b2fe5 100644 --- a/tests/ui/privacy/suggest-making-field-public.rs +++ b/tests/ui/privacy/suggest-making-field-public.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod a { pub struct A(pub(self)String); } diff --git a/tests/ui/privacy/unresolved-trait-impl-item.rs b/tests/ui/privacy/unresolved-trait-impl-item.rs index fea7c462a8e0c..1ad6be5c197b4 100644 --- a/tests/ui/privacy/unresolved-trait-impl-item.rs +++ b/tests/ui/privacy/unresolved-trait-impl-item.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait MyTrait { async fn resolved(&self); diff --git a/tests/ui/privacy/where-pub-type-impls-priv-trait.rs b/tests/ui/privacy/where-pub-type-impls-priv-trait.rs index d5e797b52b30b..1ebc396cdf5b1 100644 --- a/tests/ui/privacy/where-pub-type-impls-priv-trait.rs +++ b/tests/ui/privacy/where-pub-type-impls-priv-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // priv-in-pub lint tests where the private trait bounds a public type diff --git a/tests/ui/privacy/xc-private-method.rs b/tests/ui/privacy/xc-private-method.rs index f05994646b3c4..33747c63fa4b3 100644 --- a/tests/ui/privacy/xc-private-method.rs +++ b/tests/ui/privacy/xc-private-method.rs @@ -1,4 +1,4 @@ -// aux-build:xc-private-method-lib.rs +//@ aux-build:xc-private-method-lib.rs extern crate xc_private_method_lib; diff --git a/tests/ui/privacy/xc-private-method2.rs b/tests/ui/privacy/xc-private-method2.rs index f11b251082bf2..7976076217e7a 100644 --- a/tests/ui/privacy/xc-private-method2.rs +++ b/tests/ui/privacy/xc-private-method2.rs @@ -1,4 +1,4 @@ -// aux-build:xc-private-method-lib.rs +//@ aux-build:xc-private-method-lib.rs extern crate xc_private_method_lib; diff --git a/tests/ui/proc-macro/add-impl.rs b/tests/ui/proc-macro/add-impl.rs index ff2897a5e8681..7780c39f0c14b 100644 --- a/tests/ui/proc-macro/add-impl.rs +++ b/tests/ui/proc-macro/add-impl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:add-impl.rs +//@ run-pass +//@ aux-build:add-impl.rs #[macro_use] extern crate add_impl; diff --git a/tests/ui/proc-macro/allowed-attr-stmt-expr.rs b/tests/ui/proc-macro/allowed-attr-stmt-expr.rs index 25243aeef3b44..c5e3ffa1672ab 100644 --- a/tests/ui/proc-macro/allowed-attr-stmt-expr.rs +++ b/tests/ui/proc-macro/allowed-attr-stmt-expr.rs @@ -1,7 +1,7 @@ -// aux-build:attr-stmt-expr.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:attr-stmt-expr.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass #![feature(proc_macro_hygiene)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/allowed-signatures.rs b/tests/ui/proc-macro/allowed-signatures.rs index ce327901b1a24..8dede3f50b59b 100644 --- a/tests/ui/proc-macro/allowed-signatures.rs +++ b/tests/ui/proc-macro/allowed-signatures.rs @@ -1,6 +1,6 @@ -// check-pass -// force-host -// no-prefer-dynamic +//@ check-pass +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(private_interfaces)] diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs index 6a47e50f62dbb..3f191cba74583 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs @@ -1,5 +1,5 @@ -// aux-build:builtin-attrs.rs -// compile-flags:--test +//@ aux-build:builtin-attrs.rs +//@ compile-flags:--test #![feature(decl_macro, test)] diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs index 695ea69c8e652..c82663541a795 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:builtin-attrs.rs +//@ edition:2018 +//@ aux-build:builtin-attrs.rs #![feature(decl_macro)] //~ ERROR `feature` is ambiguous extern crate builtin_attrs; diff --git a/tests/ui/proc-macro/amputate-span.fixed b/tests/ui/proc-macro/amputate-span.fixed index 1afc3501a3277..0fdaf01357c76 100644 --- a/tests/ui/proc-macro/amputate-span.fixed +++ b/tests/ui/proc-macro/amputate-span.fixed @@ -1,7 +1,7 @@ -// aux-build:amputate-span.rs -// run-rustfix -// edition:2018 -// compile-flags: --extern amputate_span +//@ aux-build:amputate-span.rs +//@ run-rustfix +//@ edition:2018 +//@ compile-flags: --extern amputate_span // This test has been crafted to ensure the following things: // diff --git a/tests/ui/proc-macro/amputate-span.rs b/tests/ui/proc-macro/amputate-span.rs index 894a06dd5f661..7081660bc29f6 100644 --- a/tests/ui/proc-macro/amputate-span.rs +++ b/tests/ui/proc-macro/amputate-span.rs @@ -1,7 +1,7 @@ -// aux-build:amputate-span.rs -// run-rustfix -// edition:2018 -// compile-flags: --extern amputate_span +//@ aux-build:amputate-span.rs +//@ run-rustfix +//@ edition:2018 +//@ compile-flags: --extern amputate_span // This test has been crafted to ensure the following things: // diff --git a/tests/ui/proc-macro/append-impl.rs b/tests/ui/proc-macro/append-impl.rs index a493840134840..f5163e965a03f 100644 --- a/tests/ui/proc-macro/append-impl.rs +++ b/tests/ui/proc-macro/append-impl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:append-impl.rs +//@ run-pass +//@ aux-build:append-impl.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-args.rs b/tests/ui/proc-macro/attr-args.rs index 764f507abfc61..ed7e96bcc89cf 100644 --- a/tests/ui/proc-macro/attr-args.rs +++ b/tests/ui/proc-macro/attr-args.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-args.rs +//@ run-pass +//@ aux-build:attr-args.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-cfg.rs b/tests/ui/proc-macro/attr-cfg.rs index 2aed9e2e814de..4679807ad79ad 100644 --- a/tests/ui/proc-macro/attr-cfg.rs +++ b/tests/ui/proc-macro/attr-cfg.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:attr-cfg.rs -// revisions: foo bar +//@ run-pass +//@ aux-build:attr-cfg.rs +//@ revisions: foo bar extern crate attr_cfg; use attr_cfg::attr_cfg; diff --git a/tests/ui/proc-macro/attr-complex-fn.rs b/tests/ui/proc-macro/attr-complex-fn.rs index 47734c94fe297..7baf469d7d0ff 100644 --- a/tests/ui/proc-macro/attr-complex-fn.rs +++ b/tests/ui/proc-macro/attr-complex-fn.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/attr-invalid-exprs.rs b/tests/ui/proc-macro/attr-invalid-exprs.rs index 9dcffc3405ead..3d8806ee80030 100644 --- a/tests/ui/proc-macro/attr-invalid-exprs.rs +++ b/tests/ui/proc-macro/attr-invalid-exprs.rs @@ -1,6 +1,6 @@ //! Attributes producing expressions in invalid locations -// aux-build:attr-stmt-expr.rs +//@ aux-build:attr-stmt-expr.rs #![feature(proc_macro_hygiene)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/attr-on-trait.rs b/tests/ui/proc-macro/attr-on-trait.rs index e0edee630a4a9..659b461f7593c 100644 --- a/tests/ui/proc-macro/attr-on-trait.rs +++ b/tests/ui/proc-macro/attr-on-trait.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-on-trait.rs +//@ run-pass +//@ aux-build:attr-on-trait.rs extern crate attr_on_trait; diff --git a/tests/ui/proc-macro/attr-stmt-expr-rpass.rs b/tests/ui/proc-macro/attr-stmt-expr-rpass.rs index 16b8fabfc3f7e..18e477f012961 100644 --- a/tests/ui/proc-macro/attr-stmt-expr-rpass.rs +++ b/tests/ui/proc-macro/attr-stmt-expr-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-stmt-expr-rpass.rs +//@ run-pass +//@ aux-build:attr-stmt-expr-rpass.rs #![feature(stmt_expr_attributes, proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/attr-stmt-expr.rs b/tests/ui/proc-macro/attr-stmt-expr.rs index 0403684cda004..f33c686f284cd 100644 --- a/tests/ui/proc-macro/attr-stmt-expr.rs +++ b/tests/ui/proc-macro/attr-stmt-expr.rs @@ -1,6 +1,6 @@ -// aux-build:attr-stmt-expr.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ aux-build:attr-stmt-expr.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(proc_macro_hygiene)] #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/attribute-after-derive.rs b/tests/ui/proc-macro/attribute-after-derive.rs index 0f0f27bff97be..3120b23e97ee8 100644 --- a/tests/ui/proc-macro/attribute-after-derive.rs +++ b/tests/ui/proc-macro/attribute-after-derive.rs @@ -1,9 +1,9 @@ // Macro attributes are allowed after `#[derive]` and // `#[derive]` fully configures the item for following attributes. -// check-pass -// compile-flags: -Z span-debug -// aux-build: test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build: test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/attribute-spans-preserved.rs b/tests/ui/proc-macro/attribute-spans-preserved.rs index c01fce90593ba..946b16a0c80eb 100644 --- a/tests/ui/proc-macro/attribute-spans-preserved.rs +++ b/tests/ui/proc-macro/attribute-spans-preserved.rs @@ -1,4 +1,4 @@ -// aux-build:attribute-spans-preserved.rs +//@ aux-build:attribute-spans-preserved.rs extern crate attribute_spans_preserved as foo; diff --git a/tests/ui/proc-macro/attribute-with-error.rs b/tests/ui/proc-macro/attribute-with-error.rs index aaa6c07dddbbd..5e81a9c70116b 100644 --- a/tests/ui/proc-macro/attribute-with-error.rs +++ b/tests/ui/proc-macro/attribute-with-error.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/attribute.rs b/tests/ui/proc-macro/attribute.rs index 9e40e4d9ba63e..30ed8ff824790 100644 --- a/tests/ui/proc-macro/attribute.rs +++ b/tests/ui/proc-macro/attribute.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/attributes-included.rs b/tests/ui/proc-macro/attributes-included.rs index 95e8e10a3ece9..47fd21fdd2493 100644 --- a/tests/ui/proc-macro/attributes-included.rs +++ b/tests/ui/proc-macro/attributes-included.rs @@ -1,5 +1,5 @@ -// aux-build:attributes-included.rs -// check-pass +//@ aux-build:attributes-included.rs +//@ check-pass #![warn(unused)] diff --git a/tests/ui/proc-macro/attributes-on-definitions.rs b/tests/ui/proc-macro/attributes-on-definitions.rs index c0733c8b416be..187d1be236408 100644 --- a/tests/ui/proc-macro/attributes-on-definitions.rs +++ b/tests/ui/proc-macro/attributes-on-definitions.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:attributes-on-definitions.rs +//@ check-pass +//@ aux-build:attributes-on-definitions.rs #![forbid(unsafe_code)] diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.rs b/tests/ui/proc-macro/attributes-on-modules-fail.rs index 6c30e8f4f9558..9b2eb703eacca 100644 --- a/tests/ui/proc-macro/attributes-on-modules-fail.rs +++ b/tests/ui/proc-macro/attributes-on-modules-fail.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/attributes-on-modules.rs b/tests/ui/proc-macro/attributes-on-modules.rs index 6c73b0bf19c7f..26c8d8e113b5a 100644 --- a/tests/ui/proc-macro/attributes-on-modules.rs +++ b/tests/ui/proc-macro/attributes-on-modules.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/auxiliary/add-impl.rs b/tests/ui/proc-macro/auxiliary/add-impl.rs index 741e64875b645..23a86e76ef9bd 100644 --- a/tests/ui/proc-macro/auxiliary/add-impl.rs +++ b/tests/ui/proc-macro/auxiliary/add-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/amputate-span.rs b/tests/ui/proc-macro/auxiliary/amputate-span.rs index 1a82119ae95e5..c1ab0477ba2a8 100644 --- a/tests/ui/proc-macro/auxiliary/amputate-span.rs +++ b/tests/ui/proc-macro/auxiliary/amputate-span.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/api/mod.rs b/tests/ui/proc-macro/auxiliary/api/mod.rs index 5a533b9e17e16..199d097336af6 100644 --- a/tests/ui/proc-macro/auxiliary/api/mod.rs +++ b/tests/ui/proc-macro/auxiliary/api/mod.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// edition: 2021 +//@ force-host +//@ no-prefer-dynamic +//@ edition: 2021 #![crate_type = "proc-macro"] #![crate_name = "proc_macro_api_tests"] diff --git a/tests/ui/proc-macro/auxiliary/append-impl.rs b/tests/ui/proc-macro/auxiliary/append-impl.rs index b032b13375928..30657d2738e1d 100644 --- a/tests/ui/proc-macro/auxiliary/append-impl.rs +++ b/tests/ui/proc-macro/auxiliary/append-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/assert-span-pos.rs b/tests/ui/proc-macro/auxiliary/assert-span-pos.rs index 8126470ece9d3..8935ce2bc0ae6 100644 --- a/tests/ui/proc-macro/auxiliary/assert-span-pos.rs +++ b/tests/ui/proc-macro/auxiliary/assert-span-pos.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_diagnostic, proc_macro_span)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-args.rs b/tests/ui/proc-macro/auxiliary/attr-args.rs index 5f76a4484e1a4..1fac41c37217c 100644 --- a/tests/ui/proc-macro/auxiliary/attr-args.rs +++ b/tests/ui/proc-macro/auxiliary/attr-args.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-cfg.rs b/tests/ui/proc-macro/auxiliary/attr-cfg.rs index 2f0054cc14aa6..3645128b50907 100644 --- a/tests/ui/proc-macro/auxiliary/attr-cfg.rs +++ b/tests/ui/proc-macro/auxiliary/attr-cfg.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-on-trait.rs b/tests/ui/proc-macro/auxiliary/attr-on-trait.rs index 3787b8eeccc40..c4581359da127 100644 --- a/tests/ui/proc-macro/auxiliary/attr-on-trait.rs +++ b/tests/ui/proc-macro/auxiliary/attr-on-trait.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs index 76346d9a172cd..c8b7aa412b52f 100644 --- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs index 0af628884498c..888aab848d478 100644 --- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs +++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs b/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs index 4d3279584c4b8..d06903c270890 100644 --- a/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs +++ b/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attributes-included.rs b/tests/ui/proc-macro/auxiliary/attributes-included.rs index a5eb40b28dca4..cc29818380b6a 100644 --- a/tests/ui/proc-macro/auxiliary/attributes-included.rs +++ b/tests/ui/proc-macro/auxiliary/attributes-included.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs b/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs index 93a339840d621..c7e6e681da30f 100644 --- a/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs +++ b/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(allow_internal_unsafe)] #![feature(allow_internal_unstable)] diff --git a/tests/ui/proc-macro/auxiliary/bang-macro.rs b/tests/ui/proc-macro/auxiliary/bang-macro.rs index ff00022821807..361643aa8e5ef 100644 --- a/tests/ui/proc-macro/auxiliary/bang-macro.rs +++ b/tests/ui/proc-macro/auxiliary/bang-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs b/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs index fcaaba6023d11..3df2676ddab71 100644 --- a/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs +++ b/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/builtin-attrs.rs b/tests/ui/proc-macro/auxiliary/builtin-attrs.rs index 6edafae398515..bd634b4f41cd6 100644 --- a/tests/ui/proc-macro/auxiliary/builtin-attrs.rs +++ b/tests/ui/proc-macro/auxiliary/builtin-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/call-deprecated.rs b/tests/ui/proc-macro/auxiliary/call-deprecated.rs index 2f484809a5c99..8864de17ed3b6 100644 --- a/tests/ui/proc-macro/auxiliary/call-deprecated.rs +++ b/tests/ui/proc-macro/auxiliary/call-deprecated.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/call-site.rs b/tests/ui/proc-macro/auxiliary/call-site.rs index e64a5a3438a7c..ce0fc70c1a6ce 100644 --- a/tests/ui/proc-macro/auxiliary/call-site.rs +++ b/tests/ui/proc-macro/auxiliary/call-site.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/cond_plugin.rs b/tests/ui/proc-macro/auxiliary/cond_plugin.rs index 8d3c4ec239a1a..c6cdc8ce8baf0 100644 --- a/tests/ui/proc-macro/auxiliary/cond_plugin.rs +++ b/tests/ui/proc-macro/auxiliary/cond_plugin.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/count_compound_ops.rs b/tests/ui/proc-macro/auxiliary/count_compound_ops.rs index 3a656d6485e1c..86c27f2d818bd 100644 --- a/tests/ui/proc-macro/auxiliary/count_compound_ops.rs +++ b/tests/ui/proc-macro/auxiliary/count_compound_ops.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs index 41f73f5963a10..eab7d903e91c3 100644 --- a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs +++ b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/custom-quote.rs b/tests/ui/proc-macro/auxiliary/custom-quote.rs index 3b7811748edfa..88800596ce562 100644 --- a/tests/ui/proc-macro/auxiliary/custom-quote.rs +++ b/tests/ui/proc-macro/auxiliary/custom-quote.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // ignore-tidy-linelength #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/derive-a.rs b/tests/ui/proc-macro/auxiliary/derive-a.rs index cd2be5fd84d44..50e963a0a4167 100644 --- a/tests/ui/proc-macro/auxiliary/derive-a.rs +++ b/tests/ui/proc-macro/auxiliary/derive-a.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-atob.rs b/tests/ui/proc-macro/auxiliary/derive-atob.rs index e78e5bb8f4c75..8a1f81450fa86 100644 --- a/tests/ui/proc-macro/auxiliary/derive-atob.rs +++ b/tests/ui/proc-macro/auxiliary/derive-atob.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs b/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs index e7e9634e0bd18..b9c0b5e6f7763 100644 --- a/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs +++ b/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs index 3e6af67a9f412..82f0b4f19eda7 100644 --- a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-b.rs b/tests/ui/proc-macro/auxiliary/derive-b.rs index e7ab6c0729fbf..0b2cf31b0591b 100644 --- a/tests/ui/proc-macro/auxiliary/derive-b.rs +++ b/tests/ui/proc-macro/auxiliary/derive-b.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-bad.rs b/tests/ui/proc-macro/auxiliary/derive-bad.rs index 90bb9b1baf2b7..3fd2bfc4b63a7 100644 --- a/tests/ui/proc-macro/auxiliary/derive-bad.rs +++ b/tests/ui/proc-macro/auxiliary/derive-bad.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-clona.rs b/tests/ui/proc-macro/auxiliary/derive-clona.rs index 4a35c9d0dbbda..83bcc5b08be83 100644 --- a/tests/ui/proc-macro/auxiliary/derive-clona.rs +++ b/tests/ui/proc-macro/auxiliary/derive-clona.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-ctod.rs b/tests/ui/proc-macro/auxiliary/derive-ctod.rs index dbf44ed1b0537..78b1b8615b0bb 100644 --- a/tests/ui/proc-macro/auxiliary/derive-ctod.rs +++ b/tests/ui/proc-macro/auxiliary/derive-ctod.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-foo.rs b/tests/ui/proc-macro/auxiliary/derive-foo.rs index 3ea027d4f5323..5c63c3937e4be 100644 --- a/tests/ui/proc-macro/auxiliary/derive-foo.rs +++ b/tests/ui/proc-macro/auxiliary/derive-foo.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs index 370a1a2794dcf..d09ff6cadc57e 100644 --- a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs +++ b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs index 41d3a184640ac..d1f5b67cf85bf 100644 --- a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-nothing.rs b/tests/ui/proc-macro/auxiliary/derive-nothing.rs index b6d1e133af739..adf9b4e83fdfa 100644 --- a/tests/ui/proc-macro/auxiliary/derive-nothing.rs +++ b/tests/ui/proc-macro/auxiliary/derive-nothing.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs index ce7a50d2381cd..bfdd71e9a15fd 100644 --- a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs +++ b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs b/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs index a6f0eec126a0a..24a88dceb4b5d 100644 --- a/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs +++ b/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-union.rs b/tests/ui/proc-macro/auxiliary/derive-union.rs index d950e1e773c70..8bf7041ebad27 100644 --- a/tests/ui/proc-macro/auxiliary/derive-union.rs +++ b/tests/ui/proc-macro/auxiliary/derive-union.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs index eac21b04983c8..f80a2cfdd9927 100644 --- a/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs +++ b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-unstable.rs b/tests/ui/proc-macro/auxiliary/derive-unstable.rs index 2ccd3f88200e3..c92df49191b69 100644 --- a/tests/ui/proc-macro/auxiliary/derive-unstable.rs +++ b/tests/ui/proc-macro/auxiliary/derive-unstable.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/double.rs b/tests/ui/proc-macro/auxiliary/double.rs index 99eb4e3754672..ffde0bce24515 100644 --- a/tests/ui/proc-macro/auxiliary/double.rs +++ b/tests/ui/proc-macro/auxiliary/double.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/duplicate.rs b/tests/ui/proc-macro/auxiliary/duplicate.rs index b8f82b46f0945..bcbb1c7474c8e 100644 --- a/tests/ui/proc-macro/auxiliary/duplicate.rs +++ b/tests/ui/proc-macro/auxiliary/duplicate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![deny(unused)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs index ce7e60356f279..da6584e31e5fa 100644 --- a/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs +++ b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // Proc macro helper for issue #89699, used by tests/ui/proc-macro/edition-gated-async-move- // syntax-issue89699.rs, emitting an `async move` closure. This syntax is only available in diff --git a/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs b/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs index 27c59b805e213..c33736a74a707 100644 --- a/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs +++ b/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs @@ -1,6 +1,6 @@ -// edition:2015 -// force-host -// no-prefer-dynamic +//@ edition:2015 +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/empty-crate.rs b/tests/ui/proc-macro/auxiliary/empty-crate.rs index 1cf7534b28969..c502cd921cc8c 100644 --- a/tests/ui/proc-macro/auxiliary/empty-crate.rs +++ b/tests/ui/proc-macro/auxiliary/empty-crate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(unused_variables)] diff --git a/tests/ui/proc-macro/auxiliary/env.rs b/tests/ui/proc-macro/auxiliary/env.rs index 58bcb08bf0697..da9aaa5cb5629 100644 --- a/tests/ui/proc-macro/auxiliary/env.rs +++ b/tests/ui/proc-macro/auxiliary/env.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_tracked_env)] diff --git a/tests/ui/proc-macro/auxiliary/expand-expr.rs b/tests/ui/proc-macro/auxiliary/expand-expr.rs index 1d6ef8a13610a..68d0843be5abf 100644 --- a/tests/ui/proc-macro/auxiliary/expand-expr.rs +++ b/tests/ui/proc-macro/auxiliary/expand-expr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(warnings)] diff --git a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs index 5155a4b855865..9096fd7139756 100644 --- a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs +++ b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(warnings)] diff --git a/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs b/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs index a8a478ffc74c4..80236b8905b65 100644 --- a/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs +++ b/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type="lib"] // Issue 111888: this crate (1.) is imported by a proc-macro crate and (2.) diff --git a/tests/ui/proc-macro/auxiliary/first-second.rs b/tests/ui/proc-macro/auxiliary/first-second.rs index 6331608fbe543..c8c1defa9f100 100644 --- a/tests/ui/proc-macro/auxiliary/first-second.rs +++ b/tests/ui/proc-macro/auxiliary/first-second.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs b/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs index d1a1c584f8b80..fb05c97833c3d 100644 --- a/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs +++ b/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs index 548fefe76f571..9d6767dc11f56 100644 --- a/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs b/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs index d4b67d6b0b07c..d2f82c52c5898 100644 --- a/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs +++ b/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs b/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs index 3f3e12eed6c6f..855084be84d35 100644 --- a/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs +++ b/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/generate-mod.rs b/tests/ui/proc-macro/auxiliary/generate-mod.rs index e950f7d62d645..2ef1faffaa661 100644 --- a/tests/ui/proc-macro/auxiliary/generate-mod.rs +++ b/tests/ui/proc-macro/auxiliary/generate-mod.rs @@ -1,7 +1,7 @@ -// run-pass -// force-host -// no-prefer-dynamic -// ignore-pass +//@ run-pass +//@ force-host +//@ no-prefer-dynamic +//@ ignore-pass #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs b/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs index 2bd4d33360f8a..e324e3f312966 100644 --- a/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs +++ b/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs b/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs index 518dfd0d688d7..19b3632dc3fd3 100644 --- a/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs +++ b/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_raw_ident)] diff --git a/tests/ui/proc-macro/auxiliary/is-available.rs b/tests/ui/proc-macro/auxiliary/is-available.rs index 03f5265e376f0..f1d0e3c78f5be 100644 --- a/tests/ui/proc-macro/auxiliary/is-available.rs +++ b/tests/ui/proc-macro/auxiliary/is-available.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-104884.rs b/tests/ui/proc-macro/auxiliary/issue-104884.rs index 0de59d005731d..55d0d76ad184e 100644 --- a/tests/ui/proc-macro/auxiliary/issue-104884.rs +++ b/tests/ui/proc-macro/auxiliary/issue-104884.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-107113.rs b/tests/ui/proc-macro/auxiliary/issue-107113.rs index b27d3fd2fbda3..5662277acce53 100644 --- a/tests/ui/proc-macro/auxiliary/issue-107113.rs +++ b/tests/ui/proc-macro/auxiliary/issue-107113.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-118809.rs b/tests/ui/proc-macro/auxiliary/issue-118809.rs index 029b58c6d0c19..f662f623b190c 100644 --- a/tests/ui/proc-macro/auxiliary/issue-118809.rs +++ b/tests/ui/proc-macro/auxiliary/issue-118809.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-38586.rs b/tests/ui/proc-macro/auxiliary/issue-38586.rs index f3a19081c475f..e2bba3e13d10a 100644 --- a/tests/ui/proc-macro/auxiliary/issue-38586.rs +++ b/tests/ui/proc-macro/auxiliary/issue-38586.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-39889.rs b/tests/ui/proc-macro/auxiliary/issue-39889.rs index e7af66da79758..b1659d6168e6c 100644 --- a/tests/ui/proc-macro/auxiliary/issue-39889.rs +++ b/tests/ui/proc-macro/auxiliary/issue-39889.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-42708.rs b/tests/ui/proc-macro/auxiliary/issue-42708.rs index dae05204b8b70..ed5ba53034109 100644 --- a/tests/ui/proc-macro/auxiliary/issue-42708.rs +++ b/tests/ui/proc-macro/auxiliary/issue-42708.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-50061.rs b/tests/ui/proc-macro/auxiliary/issue-50061.rs index f5fe8cabbcec5..9ecbb383d4be5 100644 --- a/tests/ui/proc-macro/auxiliary/issue-50061.rs +++ b/tests/ui/proc-macro/auxiliary/issue-50061.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-50493.rs b/tests/ui/proc-macro/auxiliary/issue-50493.rs index f72024948a9dc..e9ad86005339d 100644 --- a/tests/ui/proc-macro/auxiliary/issue-50493.rs +++ b/tests/ui/proc-macro/auxiliary/issue-50493.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-59191.rs b/tests/ui/proc-macro/auxiliary/issue-59191.rs index d9ee77067ecb7..40ba0063e4392 100644 --- a/tests/ui/proc-macro/auxiliary/issue-59191.rs +++ b/tests/ui/proc-macro/auxiliary/issue-59191.rs @@ -1,6 +1,6 @@ -// edition:2018 -// force-host -// no-prefer-dynamic +//@ edition:2018 +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-66286.rs b/tests/ui/proc-macro/auxiliary/issue-66286.rs index 6217f1c7e61d4..d224dcda5901c 100644 --- a/tests/ui/proc-macro/auxiliary/issue-66286.rs +++ b/tests/ui/proc-macro/auxiliary/issue-66286.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-75801.rs b/tests/ui/proc-macro/auxiliary/issue-75801.rs index d6c031d7d4f7e..bd553b7ab8460 100644 --- a/tests/ui/proc-macro/auxiliary/issue-75801.rs +++ b/tests/ui/proc-macro/auxiliary/issue-75801.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-79242.rs b/tests/ui/proc-macro/auxiliary/issue-79242.rs index e586980f0ad8e..7b24e5a2ef223 100644 --- a/tests/ui/proc-macro/auxiliary/issue-79242.rs +++ b/tests/ui/proc-macro/auxiliary/issue-79242.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-79825.rs b/tests/ui/proc-macro/auxiliary/issue-79825.rs index 69cf5904f90df..4326712458bc0 100644 --- a/tests/ui/proc-macro/auxiliary/issue-79825.rs +++ b/tests/ui/proc-macro/auxiliary/issue-79825.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/proc-macro/auxiliary/issue-83510.rs b/tests/ui/proc-macro/auxiliary/issue-83510.rs index 1d6ef3914a91b..6e8e2d1f78029 100644 --- a/tests/ui/proc-macro/auxiliary/issue-83510.rs +++ b/tests/ui/proc-macro/auxiliary/issue-83510.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs b/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs index 958a8bed9e2d1..a638a33cf2573 100644 --- a/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs +++ b/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs b/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs index 4e5d22e6e3ece..4f605ed07b351 100644 --- a/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/lifetimes.rs b/tests/ui/proc-macro/auxiliary/lifetimes.rs index 212164dd2c908..79885a92f6847 100644 --- a/tests/ui/proc-macro/auxiliary/lifetimes.rs +++ b/tests/ui/proc-macro/auxiliary/lifetimes.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs b/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs index 4ca3a0faa27b2..501a03985cb39 100644 --- a/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs +++ b/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // These are tests for syntax that is accepted by the Rust parser but // unconditionally rejected semantically after macro expansion. Attribute macros diff --git a/tests/ui/proc-macro/auxiliary/make-macro.rs b/tests/ui/proc-macro/auxiliary/make-macro.rs index 3c851b6de2a1a..a0db47885a10d 100644 --- a/tests/ui/proc-macro/auxiliary/make-macro.rs +++ b/tests/ui/proc-macro/auxiliary/make-macro.rs @@ -1,4 +1,4 @@ -// force-host +//@ force-host #[macro_export] macro_rules! make_it { diff --git a/tests/ui/proc-macro/auxiliary/meta-macro.rs b/tests/ui/proc-macro/auxiliary/meta-macro.rs index 0a9b9887d9553..cbe882c173f66 100644 --- a/tests/ui/proc-macro/auxiliary/meta-macro.rs +++ b/tests/ui/proc-macro/auxiliary/meta-macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// edition:2018 +//@ force-host +//@ no-prefer-dynamic +//@ edition:2018 #![feature(proc_macro_def_site)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/mixed-site-span.rs b/tests/ui/proc-macro/auxiliary/mixed-site-span.rs index c2a4987004860..c143e2d40f3c8 100644 --- a/tests/ui/proc-macro/auxiliary/mixed-site-span.rs +++ b/tests/ui/proc-macro/auxiliary/mixed-site-span.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/modify-ast.rs b/tests/ui/proc-macro/auxiliary/modify-ast.rs index cc582c1522c0b..174c588e8bf23 100644 --- a/tests/ui/proc-macro/auxiliary/modify-ast.rs +++ b/tests/ui/proc-macro/auxiliary/modify-ast.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/multiple-derives.rs b/tests/ui/proc-macro/auxiliary/multiple-derives.rs index e3f6607b2ae8d..84a826cf1f6ac 100644 --- a/tests/ui/proc-macro/auxiliary/multiple-derives.rs +++ b/tests/ui/proc-macro/auxiliary/multiple-derives.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/multispan.rs b/tests/ui/proc-macro/auxiliary/multispan.rs index c05d15643dbb1..b5f1ed9b56a9e 100644 --- a/tests/ui/proc-macro/auxiliary/multispan.rs +++ b/tests/ui/proc-macro/auxiliary/multispan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/proc-macro/auxiliary/negative-token.rs b/tests/ui/proc-macro/auxiliary/negative-token.rs index 8b89f2e373165..43355bfd20bbe 100644 --- a/tests/ui/proc-macro/auxiliary/negative-token.rs +++ b/tests/ui/proc-macro/auxiliary/negative-token.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs b/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs index ea5ff466570e6..48ae360019238 100644 --- a/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs +++ b/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/not-joint.rs b/tests/ui/proc-macro/auxiliary/not-joint.rs index e6c09f7628eb1..5f94805361a67 100644 --- a/tests/ui/proc-macro/auxiliary/not-joint.rs +++ b/tests/ui/proc-macro/auxiliary/not-joint.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/parent-source-spans.rs b/tests/ui/proc-macro/auxiliary/parent-source-spans.rs index 594f108833286..3ec92d7133253 100644 --- a/tests/ui/proc-macro/auxiliary/parent-source-spans.rs +++ b/tests/ui/proc-macro/auxiliary/parent-source-spans.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_diagnostic, proc_macro_span)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/print-tokens.rs b/tests/ui/proc-macro/auxiliary/print-tokens.rs index 3a5767edb153d..6d25f1f8471a9 100644 --- a/tests/ui/proc-macro/auxiliary/print-tokens.rs +++ b/tests/ui/proc-macro/auxiliary/print-tokens.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs b/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs index fc15bb9c59db3..cfd6464661efa 100644 --- a/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs +++ b/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/raw-ident.rs b/tests/ui/proc-macro/auxiliary/raw-ident.rs index 9daee21aa17d4..1fec617975687 100644 --- a/tests/ui/proc-macro/auxiliary/raw-ident.rs +++ b/tests/ui/proc-macro/auxiliary/raw-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/re-export.rs b/tests/ui/proc-macro/auxiliary/re-export.rs index e8e9c9d3ecb99..a886015a031da 100644 --- a/tests/ui/proc-macro/auxiliary/re-export.rs +++ b/tests/ui/proc-macro/auxiliary/re-export.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/recollect.rs b/tests/ui/proc-macro/auxiliary/recollect.rs index d4494a5aff2e9..7db29035f7144 100644 --- a/tests/ui/proc-macro/auxiliary/recollect.rs +++ b/tests/ui/proc-macro/auxiliary/recollect.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/resolved-located-at.rs b/tests/ui/proc-macro/auxiliary/resolved-located-at.rs index db660824fbb0b..032d41688affa 100644 --- a/tests/ui/proc-macro/auxiliary/resolved-located-at.rs +++ b/tests/ui/proc-macro/auxiliary/resolved-located-at.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_def_site)] #![feature(proc_macro_diagnostic)] diff --git a/tests/ui/proc-macro/auxiliary/span-api-tests.rs b/tests/ui/proc-macro/auxiliary/span-api-tests.rs index ad1e770a4dcbe..16640a32098a7 100644 --- a/tests/ui/proc-macro/auxiliary/span-api-tests.rs +++ b/tests/ui/proc-macro/auxiliary/span-api-tests.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_span)] diff --git a/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs b/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs index 49292acfea746..fdcca29e177bc 100644 --- a/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs +++ b/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![feature(proc_macro_internals)] // FIXME - this shouldn't be necessary diff --git a/tests/ui/proc-macro/auxiliary/subspan.rs b/tests/ui/proc-macro/auxiliary/subspan.rs index f92adc0402384..69a9c8a9fa84e 100644 --- a/tests/ui/proc-macro/auxiliary/subspan.rs +++ b/tests/ui/proc-macro/auxiliary/subspan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span)] diff --git a/tests/ui/proc-macro/auxiliary/test-macros.rs b/tests/ui/proc-macro/auxiliary/test-macros.rs index 7a46aee462b7d..69a89e94cd6f9 100644 --- a/tests/ui/proc-macro/auxiliary/test-macros.rs +++ b/tests/ui/proc-macro/auxiliary/test-macros.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // Proc macros commonly used by tests. // `panic`/`print` -> `panic_bang`/`print_bang` to avoid conflicts with standard macros. diff --git a/tests/ui/proc-macro/auxiliary/three-equals.rs b/tests/ui/proc-macro/auxiliary/three-equals.rs index e740e86e5d0af..f0ff0437a8b46 100644 --- a/tests/ui/proc-macro/auxiliary/three-equals.rs +++ b/tests/ui/proc-macro/auxiliary/three-equals.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/proc-macro/auxiliary/weird-hygiene.rs b/tests/ui/proc-macro/auxiliary/weird-hygiene.rs index 338e436df500f..f401f7d55baa8 100644 --- a/tests/ui/proc-macro/auxiliary/weird-hygiene.rs +++ b/tests/ui/proc-macro/auxiliary/weird-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/bad-projection.rs b/tests/ui/proc-macro/bad-projection.rs index c3ac624b6004f..e633191bd310f 100644 --- a/tests/ui/proc-macro/bad-projection.rs +++ b/tests/ui/proc-macro/bad-projection.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/bang-macro.rs b/tests/ui/proc-macro/bang-macro.rs index 92810791314df..03d4174d652b0 100644 --- a/tests/ui/proc-macro/bang-macro.rs +++ b/tests/ui/proc-macro/bang-macro.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:bang-macro.rs +//@ run-pass +//@ aux-build:bang-macro.rs extern crate bang_macro; use bang_macro::rewrite; diff --git a/tests/ui/proc-macro/break-token-spans.rs b/tests/ui/proc-macro/break-token-spans.rs index 59dc3b5043cd7..ae90e04e08120 100644 --- a/tests/ui/proc-macro/break-token-spans.rs +++ b/tests/ui/proc-macro/break-token-spans.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // Regression test for issues #68489 and #70987 // Tests that we properly break tokens in `probably_equal_for_proc_macro` // See #72306 diff --git a/tests/ui/proc-macro/call-deprecated.rs b/tests/ui/proc-macro/call-deprecated.rs index cb634671bd4fa..1779e33f3b1b9 100644 --- a/tests/ui/proc-macro/call-deprecated.rs +++ b/tests/ui/proc-macro/call-deprecated.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:call-deprecated.rs +//@ check-pass +//@ aux-build:call-deprecated.rs extern crate call_deprecated; diff --git a/tests/ui/proc-macro/call-site.rs b/tests/ui/proc-macro/call-site.rs index 12c77250c0e72..31fa78902d5d6 100644 --- a/tests/ui/proc-macro/call-site.rs +++ b/tests/ui/proc-macro/call-site.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:call-site.rs +//@ check-pass +//@ aux-build:call-site.rs extern crate call_site; diff --git a/tests/ui/proc-macro/capture-macro-rules-invoke.rs b/tests/ui/proc-macro/capture-macro-rules-invoke.rs index de008a3708ae8..71a290c1fc06d 100644 --- a/tests/ui/proc-macro/capture-macro-rules-invoke.rs +++ b/tests/ui/proc-macro/capture-macro-rules-invoke.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// check-pass -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/capture-unglued-token.rs b/tests/ui/proc-macro/capture-unglued-token.rs index 727b779776b9b..32286ed084c2a 100644 --- a/tests/ui/proc-macro/capture-unglued-token.rs +++ b/tests/ui/proc-macro/capture-unglued-token.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass // Tests that we properly handle parsing a nonterminal // where we have two consecutive angle brackets (one inside diff --git a/tests/ui/proc-macro/cfg-eval-inner.rs b/tests/ui/proc-macro/cfg-eval-inner.rs index 5fd3ca0d163bc..d0a6c1afa2307 100644 --- a/tests/ui/proc-macro/cfg-eval-inner.rs +++ b/tests/ui/proc-macro/cfg-eval-inner.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass #![feature(cfg_eval)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/cfg-eval.rs b/tests/ui/proc-macro/cfg-eval.rs index fa6d015e48eb8..bbf11949e7e34 100644 --- a/tests/ui/proc-macro/cfg-eval.rs +++ b/tests/ui/proc-macro/cfg-eval.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![feature(cfg_eval)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/count_compound_ops.rs b/tests/ui/proc-macro/count_compound_ops.rs index 2cb8718448898..e58c36e047db6 100644 --- a/tests/ui/proc-macro/count_compound_ops.rs +++ b/tests/ui/proc-macro/count_compound_ops.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:count_compound_ops.rs +//@ run-pass +//@ aux-build:count_compound_ops.rs extern crate count_compound_ops; use count_compound_ops::count_compound_ops; diff --git a/tests/ui/proc-macro/crate-attrs-multiple.rs b/tests/ui/proc-macro/crate-attrs-multiple.rs index 29a0eca417281..24f46b0a2fab4 100644 --- a/tests/ui/proc-macro/crate-attrs-multiple.rs +++ b/tests/ui/proc-macro/crate-attrs-multiple.rs @@ -1,7 +1,7 @@ // Multiple custom crate-level attributes, both inert and active. -// check-pass -// aux-crate:test_macros=test-macros.rs +//@ check-pass +//@ aux-crate:test_macros=test-macros.rs #![feature(custom_inner_attributes)] #![feature(prelude_import)] diff --git a/tests/ui/proc-macro/crate-var.rs b/tests/ui/proc-macro/crate-var.rs index c0518e4b08cce..7388ca683580e 100644 --- a/tests/ui/proc-macro/crate-var.rs +++ b/tests/ui/proc-macro/crate-var.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:double.rs -// aux-build:external-crate-var.rs +//@ run-pass +//@ aux-build:double.rs +//@ aux-build:external-crate-var.rs #![allow(unused)] diff --git a/tests/ui/proc-macro/crt-static.rs b/tests/ui/proc-macro/crt-static.rs index 78592f82709d4..546d30dbad743 100644 --- a/tests/ui/proc-macro/crt-static.rs +++ b/tests/ui/proc-macro/crt-static.rs @@ -1,13 +1,13 @@ // Test proc-macro crate can be built without additional RUSTFLAGS // on musl target // override -Ctarget-feature=-crt-static from compiletest -// compile-flags: --crate-type proc-macro -Ctarget-feature= -// ignore-wasm32 -// ignore-sgx no support for proc-macro crate type -// build-pass -// force-host -// no-prefer-dynamic -// needs-dynamic-linking +//@ compile-flags: --crate-type proc-macro -Ctarget-feature= +//@ ignore-wasm32 +//@ ignore-sgx no support for proc-macro crate type +//@ build-pass +//@ force-host +//@ no-prefer-dynamic +//@ needs-dynamic-linking #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/custom-attr-only-one-derive.rs index 901394384d545..2616c122a6597 100644 --- a/tests/ui/proc-macro/custom-attr-only-one-derive.rs +++ b/tests/ui/proc-macro/custom-attr-only-one-derive.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:custom-attr-only-one-derive.rs +//@ run-pass +//@ aux-build:custom-attr-only-one-derive.rs #[macro_use] extern crate custom_attr_only_one_derive; diff --git a/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs b/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs index 56ad0612f74bd..2d7bff836815e 100644 --- a/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs +++ b/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![crate_name = "macro_dump_debug"] diff --git a/tests/ui/proc-macro/debug/dump-debug-span-debug.rs b/tests/ui/proc-macro/debug/dump-debug-span-debug.rs index 102bd6b7b1757..d4d9199bf3b0a 100644 --- a/tests/ui/proc-macro/debug/dump-debug-span-debug.rs +++ b/tests/ui/proc-macro/debug/dump-debug-span-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:macro-dump-debug.rs -// compile-flags: -Z span-debug +//@ run-pass +//@ aux-build:macro-dump-debug.rs +//@ compile-flags: -Z span-debug extern crate macro_dump_debug; diff --git a/tests/ui/proc-macro/debug/dump-debug.rs b/tests/ui/proc-macro/debug/dump-debug.rs index 0ed36b690f49b..7a5cc979df9b1 100644 --- a/tests/ui/proc-macro/debug/dump-debug.rs +++ b/tests/ui/proc-macro/debug/dump-debug.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-dump-debug.rs +//@ run-pass +//@ aux-build:macro-dump-debug.rs extern crate macro_dump_debug; use macro_dump_debug::dump_debug; diff --git a/tests/ui/proc-macro/debug/dump-debug.stderr b/tests/ui/proc-macro/debug/dump-debug.stderr index db422b6012aea..6aefacacd0025 100644 --- a/tests/ui/proc-macro/debug/dump-debug.stderr +++ b/tests/ui/proc-macro/debug/dump-debug.stderr @@ -1,166 +1,166 @@ -TokenStream [Ident { ident: "ident", span: #0 bytes(130..135) }, Ident { ident: "r#ident", span: #0 bytes(151..158) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(176..177) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(203..204) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(204..205) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(205..206) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(230..232) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: #0 bytes(258..259) }], span: #0 bytes(257..260) }, Literal { kind: Integer, symbol: "0", suffix: None, span: #0 bytes(315..316) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: #0 bytes(321..324) }, Literal { kind: Str, symbol: "S", suffix: None, span: #0 bytes(329..332) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: #0 bytes(337..341) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: #0 bytes(346..350) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: #0 bytes(355..363) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: #0 bytes(368..374) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: #0 bytes(379..389) }, Literal { kind: Char, symbol: "C", suffix: None, span: #0 bytes(394..397) }, Literal { kind: Byte, symbol: "B", suffix: None, span: #0 bytes(402..406) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: #0 bytes(437..439) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: #0 bytes(444..448) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: #0 bytes(453..457) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: #0 bytes(462..467) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: #0 bytes(472..477) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: #0 bytes(482..491) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: #0 bytes(496..503) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: #0 bytes(508..519) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: #0 bytes(524..528) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: #0 bytes(533..538) }] +TokenStream [Ident { ident: "ident", span: #0 bytes(132..137) }, Ident { ident: "r#ident", span: #0 bytes(153..160) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(178..179) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(205..206) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(206..207) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(207..208) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(232..234) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: #0 bytes(260..261) }], span: #0 bytes(259..262) }, Literal { kind: Integer, symbol: "0", suffix: None, span: #0 bytes(317..318) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: #0 bytes(323..326) }, Literal { kind: Str, symbol: "S", suffix: None, span: #0 bytes(331..334) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: #0 bytes(339..343) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: #0 bytes(348..352) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: #0 bytes(357..365) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: #0 bytes(370..376) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: #0 bytes(381..391) }, Literal { kind: Char, symbol: "C", suffix: None, span: #0 bytes(396..399) }, Literal { kind: Byte, symbol: "B", suffix: None, span: #0 bytes(404..408) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: #0 bytes(439..441) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: #0 bytes(446..450) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: #0 bytes(455..459) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: #0 bytes(464..469) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: #0 bytes(474..479) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: #0 bytes(484..493) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: #0 bytes(498..505) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: #0 bytes(510..521) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: #0 bytes(526..530) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: #0 bytes(535..540) }] TokenStream [ Ident { ident: "ident", - span: #0 bytes(130..135), + span: #0 bytes(132..137), }, Ident { ident: "r#ident", - span: #0 bytes(151..158), + span: #0 bytes(153..160), }, Punct { ch: ',', spacing: Alone, - span: #0 bytes(176..177), + span: #0 bytes(178..179), }, Punct { ch: '=', spacing: Joint, - span: #0 bytes(203..204), + span: #0 bytes(205..206), }, Punct { ch: '=', spacing: Joint, - span: #0 bytes(204..205), + span: #0 bytes(206..207), }, Punct { ch: '>', spacing: Alone, - span: #0 bytes(205..206), + span: #0 bytes(207..208), }, Group { delimiter: Parenthesis, stream: TokenStream [], - span: #0 bytes(230..232), + span: #0 bytes(232..234), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "_", - span: #0 bytes(258..259), + span: #0 bytes(260..261), }, ], - span: #0 bytes(257..260), + span: #0 bytes(259..262), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(315..316), + span: #0 bytes(317..318), }, Literal { kind: Float, symbol: "1.0", suffix: None, - span: #0 bytes(321..324), + span: #0 bytes(323..326), }, Literal { kind: Str, symbol: "S", suffix: None, - span: #0 bytes(329..332), + span: #0 bytes(331..334), }, Literal { kind: ByteStr, symbol: "B", suffix: None, - span: #0 bytes(337..341), + span: #0 bytes(339..343), }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, - span: #0 bytes(346..350), + span: #0 bytes(348..352), }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, - span: #0 bytes(355..363), + span: #0 bytes(357..365), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, - span: #0 bytes(368..374), + span: #0 bytes(370..376), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, - span: #0 bytes(379..389), + span: #0 bytes(381..391), }, Literal { kind: Char, symbol: "C", suffix: None, - span: #0 bytes(394..397), + span: #0 bytes(396..399), }, Literal { kind: Byte, symbol: "B", suffix: None, - span: #0 bytes(402..406), + span: #0 bytes(404..408), }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), - span: #0 bytes(437..439), + span: #0 bytes(439..441), }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), - span: #0 bytes(444..448), + span: #0 bytes(446..450), }, Literal { kind: Str, symbol: "S", suffix: Some("q"), - span: #0 bytes(453..457), + span: #0 bytes(455..459), }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), - span: #0 bytes(462..467), + span: #0 bytes(464..469), }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), - span: #0 bytes(472..477), + span: #0 bytes(474..479), }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), - span: #0 bytes(482..491), + span: #0 bytes(484..493), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), - span: #0 bytes(496..503), + span: #0 bytes(498..505), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), - span: #0 bytes(508..519), + span: #0 bytes(510..521), }, Literal { kind: Char, symbol: "C", suffix: Some("q"), - span: #0 bytes(524..528), + span: #0 bytes(526..530), }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), - span: #0 bytes(533..538), + span: #0 bytes(535..540), }, ] diff --git a/tests/ui/proc-macro/define-two.rs b/tests/ui/proc-macro/define-two.rs index b2184eae33e15..27767cda3065a 100644 --- a/tests/ui/proc-macro/define-two.rs +++ b/tests/ui/proc-macro/define-two.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/derive-attr-cfg.rs b/tests/ui/proc-macro/derive-attr-cfg.rs index 3947746286da0..162be0754d91d 100644 --- a/tests/ui/proc-macro/derive-attr-cfg.rs +++ b/tests/ui/proc-macro/derive-attr-cfg.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-attr-cfg.rs +//@ aux-build:derive-attr-cfg.rs extern crate derive_attr_cfg; use derive_attr_cfg::Foo; diff --git a/tests/ui/proc-macro/derive-b.rs b/tests/ui/proc-macro/derive-b.rs index a026c2bd77a6f..6cbe1fd0a3f8d 100644 --- a/tests/ui/proc-macro/derive-b.rs +++ b/tests/ui/proc-macro/derive-b.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:derive-b-rpass.rs +//@ run-pass +//@ aux-build:derive-b-rpass.rs extern crate derive_b_rpass as derive_b; diff --git a/tests/ui/proc-macro/derive-bad.rs b/tests/ui/proc-macro/derive-bad.rs index 92d35f5371ab8..c8f3a77ea4c5f 100644 --- a/tests/ui/proc-macro/derive-bad.rs +++ b/tests/ui/proc-macro/derive-bad.rs @@ -1,4 +1,4 @@ -// aux-build:derive-bad.rs +//@ aux-build:derive-bad.rs #[macro_use] extern crate derive_bad; diff --git a/tests/ui/proc-macro/derive-expand-order.rs b/tests/ui/proc-macro/derive-expand-order.rs index 0cf1ceb91dea1..75981f16a7fd8 100644 --- a/tests/ui/proc-macro/derive-expand-order.rs +++ b/tests/ui/proc-macro/derive-expand-order.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:multiple-derives.rs +//@ run-pass +//@ aux-build:multiple-derives.rs extern crate multiple_derives; diff --git a/tests/ui/proc-macro/derive-helper-configured.rs b/tests/ui/proc-macro/derive-helper-configured.rs index 243cf685e8145..74d5d827f166e 100644 --- a/tests/ui/proc-macro/derive-helper-configured.rs +++ b/tests/ui/proc-macro/derive-helper-configured.rs @@ -1,8 +1,8 @@ // Derive helpers are resolved successfully inside `cfg_attr`. -// check-pass +//@ check-pass // compile-flats:--cfg TRUE -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-legacy-limits.rs b/tests/ui/proc-macro/derive-helper-legacy-limits.rs index ca904900da0bb..ff09095a60f9d 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-limits.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-limits.rs @@ -1,8 +1,8 @@ // Support for legacy derive helpers is limited and heuristic-based // (that's exactly the reason why they are deprecated). -// edition:2018 -// aux-build:test-macros.rs +//@ edition:2018 +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs index b484b42e56672..2b5bb905e8302 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![dummy] //~ ERROR cannot find attribute `dummy` in this scope diff --git a/tests/ui/proc-macro/derive-helper-shadowed.rs b/tests/ui/proc-macro/derive-helper-shadowed.rs index ac14ece691846..9b2a4ab6bc741 100644 --- a/tests/ui/proc-macro/derive-helper-shadowed.rs +++ b/tests/ui/proc-macro/derive-helper-shadowed.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// aux-build:derive-helper-shadowed-2.rs +//@ check-pass +//@ aux-build:test-macros.rs +//@ aux-build:derive-helper-shadowed-2.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-shadowing-2.rs b/tests/ui/proc-macro/derive-helper-shadowing-2.rs index 5204d72b980c1..dc35dd05498bd 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing-2.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing-2.rs @@ -1,8 +1,8 @@ // If a derive macro introduces a helper attribute with the same name as that macro, // then make sure that it's usable without ambiguities. -// check-pass -// aux-build:derive-helper-shadowing-2.rs +//@ check-pass +//@ aux-build:derive-helper-shadowing-2.rs #[macro_use] extern crate derive_helper_shadowing_2; diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs index 4f25b4b0dca54..1c66a60b294b8 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:test-macros.rs -// aux-build:derive-helper-shadowing.rs +//@ edition:2018 +//@ aux-build:test-macros.rs +//@ aux-build:derive-helper-shadowing.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-vs-legacy.rs b/tests/ui/proc-macro/derive-helper-vs-legacy.rs index 98836bcb8937d..feae7adda68f6 100644 --- a/tests/ui/proc-macro/derive-helper-vs-legacy.rs +++ b/tests/ui/proc-macro/derive-helper-vs-legacy.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-in-mod.rs b/tests/ui/proc-macro/derive-in-mod.rs index 96e9d93fe1285..3bd70f1090d03 100644 --- a/tests/ui/proc-macro/derive-in-mod.rs +++ b/tests/ui/proc-macro/derive-in-mod.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-multiple-with-packed.rs b/tests/ui/proc-macro/derive-multiple-with-packed.rs index 23578aa0e9fb8..641be4dee5443 100644 --- a/tests/ui/proc-macro/derive-multiple-with-packed.rs +++ b/tests/ui/proc-macro/derive-multiple-with-packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Copy)] #[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]` diff --git a/tests/ui/proc-macro/derive-same-struct.rs b/tests/ui/proc-macro/derive-same-struct.rs index 528b0f22a81e4..432476d1ebb1d 100644 --- a/tests/ui/proc-macro/derive-same-struct.rs +++ b/tests/ui/proc-macro/derive-same-struct.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] -// aux-build:derive-same-struct.rs +//@ aux-build:derive-same-struct.rs #[macro_use] extern crate derive_same_struct; diff --git a/tests/ui/proc-macro/derive-still-gated.rs b/tests/ui/proc-macro/derive-still-gated.rs index 3f8d6f0716b3a..bce7badeffe1d 100644 --- a/tests/ui/proc-macro/derive-still-gated.rs +++ b/tests/ui/proc-macro/derive-still-gated.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-test.rs b/tests/ui/proc-macro/derive-test.rs index b81e38432e83a..246588527d9be 100644 --- a/tests/ui/proc-macro/derive-test.rs +++ b/tests/ui/proc-macro/derive-test.rs @@ -1,6 +1,6 @@ -// run-pass -// no-prefer-dynamic -// compile-flags: --test +//@ run-pass +//@ no-prefer-dynamic +//@ compile-flags: --test #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/derive-two-attrs.rs b/tests/ui/proc-macro/derive-two-attrs.rs index 08225b8e3f22a..911160976658e 100644 --- a/tests/ui/proc-macro/derive-two-attrs.rs +++ b/tests/ui/proc-macro/derive-two-attrs.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-two-attrs.rs +//@ aux-build:derive-two-attrs.rs extern crate derive_two_attrs as foo; diff --git a/tests/ui/proc-macro/derive-union.rs b/tests/ui/proc-macro/derive-union.rs index e83eee0936ada..d1e65bf45957b 100644 --- a/tests/ui/proc-macro/derive-union.rs +++ b/tests/ui/proc-macro/derive-union.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:derive-union.rs +//@ aux-build:derive-union.rs #[macro_use] extern crate derive_union; diff --git a/tests/ui/proc-macro/disappearing-resolution.rs b/tests/ui/proc-macro/disappearing-resolution.rs index 50f04b1eae150..b8bc2953576a6 100644 --- a/tests/ui/proc-macro/disappearing-resolution.rs +++ b/tests/ui/proc-macro/disappearing-resolution.rs @@ -1,6 +1,6 @@ // Regression test for issue #64803 (initial attribute resolution can disappear later). -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/doc-comment-preserved.rs b/tests/ui/proc-macro/doc-comment-preserved.rs index ed8ca99bd2c94..f0891e7d6a74e 100644 --- a/tests/ui/proc-macro/doc-comment-preserved.rs +++ b/tests/ui/proc-macro/doc-comment-preserved.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-101211.rs b/tests/ui/proc-macro/dollar-crate-issue-101211.rs index fc1acfd32d2fc..fd5768dc7d1c2 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-101211.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-101211.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2021 -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2021 +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-57089.rs b/tests/ui/proc-macro/dollar-crate-issue-57089.rs index 27bfa099f211a..d4540643e029d 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-57089.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-57089.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-62325.rs b/tests/ui/proc-macro/dollar-crate-issue-62325.rs index d828fb9fd805d..ee2e0c3973dca 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-62325.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-62325.rs @@ -1,8 +1,8 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// aux-build:dollar-crate-external.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ aux-build:dollar-crate-external.rs #![no_std] // Don't load unnecessary hygiene information from std diff --git a/tests/ui/proc-macro/dollar-crate.rs b/tests/ui/proc-macro/dollar-crate.rs index ac27dfa1aeb44..a487e77a83310 100644 --- a/tests/ui/proc-macro/dollar-crate.rs +++ b/tests/ui/proc-macro/dollar-crate.rs @@ -1,8 +1,8 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// aux-build:dollar-crate-external.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ aux-build:dollar-crate-external.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs index 1a9d4601acafe..0f302708537ed 100644 --- a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs +++ b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs @@ -1,8 +1,8 @@ -// aux-build:edition-gated-async-move-syntax.rs -// edition: 2015 +//@ aux-build:edition-gated-async-move-syntax.rs +//@ edition: 2015 // Non-regression test for issue #89699, where a proc-macro emitting syntax only available in -// edition 2018 and up (`async move`) is used on edition 2015 +//@ edition 2018 and up (`async move`) is used on edition 2015 extern crate edition_gated_async_move_syntax; diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs index 7656735319872..de05868ebf933 100644 --- a/tests/ui/proc-macro/edition-imports-2018.rs +++ b/tests/ui/proc-macro/edition-imports-2018.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/proc-macro/empty-crate.rs b/tests/ui/proc-macro/empty-crate.rs index 3e54c9feebc6b..ba4de590e6364 100644 --- a/tests/ui/proc-macro/empty-crate.rs +++ b/tests/ui/proc-macro/empty-crate.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:empty-crate.rs +//@ aux-build:empty-crate.rs #[macro_use] extern crate empty_crate; diff --git a/tests/ui/proc-macro/empty-where-clause.rs b/tests/ui/proc-macro/empty-where-clause.rs index 719555c092a78..4e432934e3cde 100644 --- a/tests/ui/proc-macro/empty-where-clause.rs +++ b/tests/ui/proc-macro/empty-where-clause.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs extern crate test_macros; use test_macros::recollect_attr; diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs index c0edda4f7df23..85bcf4521fe60 100644 --- a/tests/ui/proc-macro/env.rs +++ b/tests/ui/proc-macro/env.rs @@ -1,7 +1,7 @@ -// aux-build:env.rs -// run-pass -// rustc-env: THE_CONST=1 -// compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4 +//@ aux-build:env.rs +//@ run-pass +//@ rustc-env: THE_CONST=1 +//@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4 #![crate_name = "foo"] diff --git a/tests/ui/proc-macro/expand-expr.rs b/tests/ui/proc-macro/expand-expr.rs index 89cd1d767a5d8..5f7375d7450d6 100644 --- a/tests/ui/proc-macro/expand-expr.rs +++ b/tests/ui/proc-macro/expand-expr.rs @@ -1,4 +1,4 @@ -// aux-build:expand-expr.rs +//@ aux-build:expand-expr.rs // no-remap-src-base: check_expand_expr_file!() fails when enabled. #![feature(concat_bytes)] diff --git a/tests/ui/proc-macro/expand-to-derive.rs b/tests/ui/proc-macro/expand-to-derive.rs index ff2876e8471f0..0b603cd4bccb0 100644 --- a/tests/ui/proc-macro/expand-to-derive.rs +++ b/tests/ui/proc-macro/expand-to-derive.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/expand-to-unstable.rs b/tests/ui/proc-macro/expand-to-unstable.rs index 0825c1a8ecbce..c4eaba6bba235 100644 --- a/tests/ui/proc-macro/expand-to-unstable.rs +++ b/tests/ui/proc-macro/expand-to-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:derive-unstable.rs +//@ aux-build:derive-unstable.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/expand-with-a-macro.rs b/tests/ui/proc-macro/expand-with-a-macro.rs index 042a283659517..fcaafbbc1490e 100644 --- a/tests/ui/proc-macro/expand-with-a-macro.rs +++ b/tests/ui/proc-macro/expand-with-a-macro.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// aux-build:expand-with-a-macro.rs +//@ run-pass +//@ needs-unwind +//@ aux-build:expand-with-a-macro.rs #![deny(warnings)] diff --git a/tests/ui/proc-macro/export-macro.rs b/tests/ui/proc-macro/export-macro.rs index ad69fe5eed205..e6001d06f0f32 100644 --- a/tests/ui/proc-macro/export-macro.rs +++ b/tests/ui/proc-macro/export-macro.rs @@ -1,7 +1,7 @@ -// error-pattern: cannot export macro_rules! macros from a `proc-macro` crate +//@ error-pattern: cannot export macro_rules! macros from a `proc-macro` crate -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/exports.rs b/tests/ui/proc-macro/exports.rs index a40c15908bc62..ebe73e27ca800 100644 --- a/tests/ui/proc-macro/exports.rs +++ b/tests/ui/proc-macro/exports.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs index d4067a3359271..0b34b07edbee4 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![feature(decl_macro)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout index ddd59b583a814..e11d2c0715cb3 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout @@ -3,39 +3,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = #[allow(warning PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #3 bytes(299..303), + span: #3 bytes(301..305), }, Ident { ident: "E", - span: #3 bytes(304..305), + span: #3 bytes(306..307), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #3 bytes(320..321), + span: #3 bytes(322..323), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(322..323), + span: #3 bytes(324..325), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #3 bytes(326..329), + span: #3 bytes(328..331), }, Ident { ident: "_", - span: #3 bytes(330..331), + span: #3 bytes(332..333), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(332..333), + span: #3 bytes(334..335), }, Group { delimiter: None, @@ -43,83 +43,83 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: #0 bytes(541..542), + span: #0 bytes(543..544), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "allow", - span: #0 bytes(543..548), + span: #0 bytes(545..550), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "warnings", - span: #0 bytes(549..557), + span: #0 bytes(551..559), }, ], - span: #0 bytes(548..558), + span: #0 bytes(550..560), }, ], - span: #0 bytes(542..559), + span: #0 bytes(544..561), }, Punct { ch: '#', spacing: Alone, - span: #0 bytes(541..542), + span: #0 bytes(543..544), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "allow", - span: #0 bytes(543..548), + span: #0 bytes(545..550), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "warnings", - span: #0 bytes(549..557), + span: #0 bytes(551..559), }, ], - span: #0 bytes(548..558), + span: #0 bytes(550..560), }, ], - span: #0 bytes(542..559), + span: #0 bytes(544..561), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(560..561), + span: #0 bytes(562..563), }, ], - span: #3 bytes(334..339), + span: #3 bytes(336..341), }, Punct { ch: ';', spacing: Alone, - span: #3 bytes(339..340), + span: #3 bytes(341..342), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #3 bytes(341..342), + span: #3 bytes(343..344), }, ], - span: #3 bytes(324..344), + span: #3 bytes(326..346), }, Punct { ch: ',', spacing: Alone, - span: #3 bytes(344..345), + span: #3 bytes(346..347), }, ], - span: #3 bytes(306..355), + span: #3 bytes(308..357), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; }; 0 }, } @@ -127,39 +127,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 }; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #7 bytes(423..427), + span: #7 bytes(425..429), }, Ident { ident: "E", - span: #7 bytes(428..429), + span: #7 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #7 bytes(444..445), + span: #7 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #7 bytes(446..447), + span: #7 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #7 bytes(450..453), + span: #7 bytes(452..455), }, Ident { ident: "_", - span: #7 bytes(454..455), + span: #7 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #7 bytes(456..457), + span: #7 bytes(458..459), }, Group { delimiter: Brace, @@ -171,74 +171,74 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(578..579), + span: #0 bytes(580..581), }, ], - span: #7 bytes(460..465), + span: #7 bytes(462..467), }, ], - span: #7 bytes(458..467), + span: #7 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #7 bytes(467..468), + span: #7 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #7 bytes(469..470), + span: #7 bytes(471..472), }, ], - span: #7 bytes(448..472), + span: #7 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #7 bytes(472..473), + span: #7 bytes(474..475), }, ], - span: #7 bytes(430..483), + span: #7 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} }; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #11 bytes(423..427), + span: #11 bytes(425..429), }, Ident { ident: "E", - span: #11 bytes(428..429), + span: #11 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #11 bytes(444..445), + span: #11 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #11 bytes(446..447), + span: #11 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #11 bytes(450..453), + span: #11 bytes(452..455), }, Ident { ident: "_", - span: #11 bytes(454..455), + span: #11 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #11 bytes(456..457), + span: #11 bytes(458..459), }, Group { delimiter: Brace, @@ -249,35 +249,35 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Group { delimiter: Brace, stream: TokenStream [], - span: #0 bytes(596..598), + span: #0 bytes(598..600), }, ], - span: #11 bytes(460..465), + span: #11 bytes(462..467), }, ], - span: #11 bytes(458..467), + span: #11 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #11 bytes(467..468), + span: #11 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #11 bytes(469..470), + span: #11 bytes(471..472), }, ], - span: #11 bytes(448..472), + span: #11 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #11 bytes(472..473), + span: #11 bytes(474..475), }, ], - span: #11 bytes(430..483), + span: #11 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; }; 0 }, } @@ -285,39 +285,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH }; 0 }, PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #15 bytes(423..427), + span: #15 bytes(425..429), }, Ident { ident: "E", - span: #15 bytes(428..429), + span: #15 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #15 bytes(444..445), + span: #15 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #15 bytes(446..447), + span: #15 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #15 bytes(450..453), + span: #15 bytes(452..455), }, Ident { ident: "_", - span: #15 bytes(454..455), + span: #15 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #15 bytes(456..457), + span: #15 bytes(458..459), }, Group { delimiter: Brace, @@ -327,35 +327,35 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ stream: TokenStream [ Ident { ident: "PATH", - span: #0 bytes(615..619), + span: #0 bytes(617..621), }, ], - span: #15 bytes(460..465), + span: #15 bytes(462..467), }, ], - span: #15 bytes(458..467), + span: #15 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #15 bytes(467..468), + span: #15 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #15 bytes(469..470), + span: #15 bytes(471..472), }, ], - span: #15 bytes(448..472), + span: #15 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #15 bytes(472..473), + span: #15 bytes(474..475), }, ], - span: #15 bytes(430..483), + span: #15 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; }; 0 }, } @@ -363,39 +363,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 + 1 }; 0 }, PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #19 bytes(423..427), + span: #19 bytes(425..429), }, Ident { ident: "E", - span: #19 bytes(428..429), + span: #19 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #19 bytes(444..445), + span: #19 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #19 bytes(446..447), + span: #19 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #19 bytes(450..453), + span: #19 bytes(452..455), }, Ident { ident: "_", - span: #19 bytes(454..455), + span: #19 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #19 bytes(456..457), + span: #19 bytes(458..459), }, Group { delimiter: Brace, @@ -407,46 +407,46 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(636..637), + span: #0 bytes(638..639), }, Punct { ch: '+', spacing: Alone, - span: #0 bytes(638..639), + span: #0 bytes(640..641), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(640..641), + span: #0 bytes(642..643), }, ], - span: #19 bytes(460..465), + span: #19 bytes(462..467), }, ], - span: #19 bytes(458..467), + span: #19 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #19 bytes(467..468), + span: #19 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #19 bytes(469..470), + span: #19 bytes(471..472), }, ], - span: #19 bytes(448..472), + span: #19 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #19 bytes(472..473), + span: #19 bytes(474..475), }, ], - span: #19 bytes(430..483), + span: #19 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; }; 0 }, } @@ -454,39 +454,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH + 1 }; 0 PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #23 bytes(423..427), + span: #23 bytes(425..429), }, Ident { ident: "E", - span: #23 bytes(428..429), + span: #23 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #23 bytes(444..445), + span: #23 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #23 bytes(446..447), + span: #23 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #23 bytes(450..453), + span: #23 bytes(452..455), }, Ident { ident: "_", - span: #23 bytes(454..455), + span: #23 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #23 bytes(456..457), + span: #23 bytes(458..459), }, Group { delimiter: Brace, @@ -496,45 +496,45 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ stream: TokenStream [ Ident { ident: "PATH", - span: #0 bytes(658..662), + span: #0 bytes(660..664), }, Punct { ch: '+', spacing: Alone, - span: #0 bytes(663..664), + span: #0 bytes(665..666), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(665..666), + span: #0 bytes(667..668), }, ], - span: #23 bytes(460..465), + span: #23 bytes(462..467), }, ], - span: #23 bytes(458..467), + span: #23 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #23 bytes(467..468), + span: #23 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #23 bytes(469..470), + span: #23 bytes(471..472), }, ], - span: #23 bytes(448..472), + span: #23 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #23 bytes(472..473), + span: #23 bytes(474..475), }, ], - span: #23 bytes(430..483), + span: #23 bytes(432..485), }, ] diff --git a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs index 38f61c36c8c6e..7a5f53416620e 100644 --- a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs +++ b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 extern crate proc_macro; use proc_macro::TokenStream; // OK diff --git a/tests/ui/proc-macro/gen-lifetime-token.rs b/tests/ui/proc-macro/gen-lifetime-token.rs index 588bd2b76c105..d65efb5c46475 100644 --- a/tests/ui/proc-macro/gen-lifetime-token.rs +++ b/tests/ui/proc-macro/gen-lifetime-token.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:gen-lifetime-token.rs +//@ run-pass +//@ aux-build:gen-lifetime-token.rs extern crate gen_lifetime_token as bar; diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs index 195bda82e9ce1..2bfbf9dcccaaf 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs @@ -2,7 +2,7 @@ // Local variables and labels are hygienic, items are not hygienic. // `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro. -// aux-build:gen-macro-rules-hygiene.rs +//@ aux-build:gen-macro-rules-hygiene.rs #[macro_use] extern crate gen_macro_rules_hygiene; diff --git a/tests/ui/proc-macro/gen-macro-rules.rs b/tests/ui/proc-macro/gen-macro-rules.rs index 13ad27f937252..5f2cfc70d8ecc 100644 --- a/tests/ui/proc-macro/gen-macro-rules.rs +++ b/tests/ui/proc-macro/gen-macro-rules.rs @@ -1,7 +1,7 @@ // Derive macros can generate `macro_rules` items, regression test for issue #63651. -// check-pass -// aux-build:gen-macro-rules.rs +//@ check-pass +//@ aux-build:gen-macro-rules.rs extern crate gen_macro_rules as repro; diff --git a/tests/ui/proc-macro/generate-dollar-ident.rs b/tests/ui/proc-macro/generate-dollar-ident.rs index b838be9fb9f2c..c087a206566f4 100644 --- a/tests/ui/proc-macro/generate-dollar-ident.rs +++ b/tests/ui/proc-macro/generate-dollar-ident.rs @@ -1,8 +1,8 @@ // Proc macros can generate token sequence `$ IDENT` // without it being recognized as an unknown macro variable. -// check-pass -// aux-build:generate-dollar-ident.rs +//@ check-pass +//@ aux-build:generate-dollar-ident.rs extern crate generate_dollar_ident; use generate_dollar_ident::*; diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs index 471f317edf964..ab93666f28af1 100644 --- a/tests/ui/proc-macro/generate-mod.rs +++ b/tests/ui/proc-macro/generate-mod.rs @@ -1,6 +1,6 @@ // Modules generated by transparent proc macros still acts as barriers for names (issue #50504). -// aux-build:generate-mod.rs +//@ aux-build:generate-mod.rs extern crate generate_mod; diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs index 40c42d82f68de..03bb04b77860c 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use(Empty)] extern crate test_macros; diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs index 344323122dc26..03c307834114a 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use(Empty)] extern crate test_macros; diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs index 346ed1207cde5..6c3e1067436d0 100644 --- a/tests/ui/proc-macro/hygiene_example.rs +++ b/tests/ui/proc-macro/hygiene_example.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:hygiene_example_codegen.rs -// aux-build:hygiene_example.rs +//@ check-pass +//@ aux-build:hygiene_example_codegen.rs +//@ aux-build:hygiene_example.rs extern crate hygiene_example; use hygiene_example::hello; diff --git a/tests/ui/proc-macro/import.rs b/tests/ui/proc-macro/import.rs index d1b1ff350695f..53dc0f4cbedcb 100644 --- a/tests/ui/proc-macro/import.rs +++ b/tests/ui/proc-macro/import.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs extern crate test_macros; diff --git a/tests/ui/proc-macro/inert-attribute-order.rs b/tests/ui/proc-macro/inert-attribute-order.rs index f807967564116..bca4df9604060 100644 --- a/tests/ui/proc-macro/inert-attribute-order.rs +++ b/tests/ui/proc-macro/inert-attribute-order.rs @@ -1,8 +1,8 @@ // Order of inert attributes, both built-in and custom is preserved during expansion. -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/inner-attr-non-inline-mod.rs b/tests/ui/proc-macro/inner-attr-non-inline-mod.rs index 30c2666df470c..df006a4d7a93d 100644 --- a/tests/ui/proc-macro/inner-attr-non-inline-mod.rs +++ b/tests/ui/proc-macro/inner-attr-non-inline-mod.rs @@ -1,8 +1,8 @@ -// compile-flags: -Z span-debug -// error-pattern:custom inner attributes are unstable -// error-pattern:inner macro attributes are unstable -// error-pattern:this was previously accepted -// aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ error-pattern:custom inner attributes are unstable +//@ error-pattern:inner macro attributes are unstable +//@ error-pattern:this was previously accepted +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/inner-attrs.rs b/tests/ui/proc-macro/inner-attrs.rs index c448294e0f64e..45bb4d3c5bfee 100644 --- a/tests/ui/proc-macro/inner-attrs.rs +++ b/tests/ui/proc-macro/inner-attrs.rs @@ -1,8 +1,8 @@ // gate-test-custom_inner_attributes -// compile-flags: -Z span-debug --error-format human -// error-pattern:expected non-macro inner attribute -// aux-build:test-macros.rs -// edition:2018 +//@ compile-flags: -Z span-debug --error-format human +//@ error-pattern:expected non-macro inner attribute +//@ aux-build:test-macros.rs +//@ edition:2018 #![feature(custom_inner_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/input-interpolated.rs b/tests/ui/proc-macro/input-interpolated.rs index 5e49e330cacfa..d84572a6afe7a 100644 --- a/tests/ui/proc-macro/input-interpolated.rs +++ b/tests/ui/proc-macro/input-interpolated.rs @@ -1,8 +1,8 @@ // Check what token streams proc macros see when interpolated tokens are passed to them as input. -// check-pass -// edition:2018 -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/input-interpolated.stdout b/tests/ui/proc-macro/input-interpolated.stdout index f2a0bc3b1aaf9..1bccd8806be91 100644 --- a/tests/ui/proc-macro/input-interpolated.stdout +++ b/tests/ui/proc-macro/input-interpolated.stdout @@ -2,58 +2,58 @@ PRINT-BANG INPUT (DISPLAY): A PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, ] PRINT-ATTR INPUT (DISPLAY): const A : u8 = 0; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "const", - span: #3 bytes(416..421), + span: #3 bytes(419..424), }, Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, Punct { ch: ':', spacing: Alone, - span: #3 bytes(424..425), + span: #3 bytes(427..428), }, Ident { ident: "u8", - span: #3 bytes(426..428), + span: #3 bytes(429..431), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(429..430), + span: #3 bytes(432..433), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #3 bytes(431..432), + span: #3 bytes(434..435), }, Punct { ch: ';', spacing: Alone, - span: #3 bytes(432..433), + span: #3 bytes(435..436), }, ] PRINT-DERIVE INPUT (DISPLAY): struct A {} PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: #3 bytes(468..474), + span: #3 bytes(471..477), }, Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, Group { delimiter: Brace, stream: TokenStream [], - span: #3 bytes(478..480), + span: #3 bytes(481..483), }, ] diff --git a/tests/ui/proc-macro/invalid-attributes.rs b/tests/ui/proc-macro/invalid-attributes.rs index 6bbe022c690fe..a70c73e9b8f2d 100644 --- a/tests/ui/proc-macro/invalid-attributes.rs +++ b/tests/ui/proc-macro/invalid-attributes.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/invalid-punct-ident-1.rs b/tests/ui/proc-macro/invalid-punct-ident-1.rs index 9a1802737722c..b0f163adc02e8 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-1.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-1.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-2.rs b/tests/ui/proc-macro/invalid-punct-ident-2.rs index afb6985e45829..b1f7f570d3f16 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-2.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-2.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-3.rs b/tests/ui/proc-macro/invalid-punct-ident-3.rs index ff83695c56247..7698d2c4b394c 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-3.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-3.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-4.rs b/tests/ui/proc-macro/invalid-punct-ident-4.rs index 2d2774bd194c7..042fe6c600daa 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-4.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-4.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/is-available.rs b/tests/ui/proc-macro/is-available.rs index b32bb61b495d3..36fd44b266f72 100644 --- a/tests/ui/proc-macro/is-available.rs +++ b/tests/ui/proc-macro/is-available.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass extern crate proc_macro; -// aux-build:is-available.rs +//@ aux-build:is-available.rs extern crate is_available; fn main() { diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs index 1e387326b2e6e..8567d812e4fb2 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs @@ -1,4 +1,4 @@ -// aux-build:issue-104884.rs +//@ aux-build:issue-104884.rs use std::collections::BinaryHeap; diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs index bc5b44963f724..01bf3615acfe3 100644 --- a/tests/ui/proc-macro/issue-107113-wrap.rs +++ b/tests/ui/proc-macro/issue-107113-wrap.rs @@ -1,5 +1,5 @@ -// edition:2021 -// aux-build:issue-107113.rs +//@ edition:2021 +//@ aux-build:issue-107113.rs #[macro_use] extern crate issue_107113; diff --git a/tests/ui/proc-macro/issue-118809.rs b/tests/ui/proc-macro/issue-118809.rs index 732bf19c1736f..770b19e817219 100644 --- a/tests/ui/proc-macro/issue-118809.rs +++ b/tests/ui/proc-macro/issue-118809.rs @@ -1,4 +1,4 @@ -// aux-build: issue-118809.rs +//@ aux-build: issue-118809.rs #[macro_use] extern crate issue_118809; diff --git a/tests/ui/proc-macro/issue-36935.rs b/tests/ui/proc-macro/issue-36935.rs index 03cdfa05e6b23..eb019d1e1740c 100644 --- a/tests/ui/proc-macro/issue-36935.rs +++ b/tests/ui/proc-macro/issue-36935.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-37788.rs b/tests/ui/proc-macro/issue-37788.rs index 73b1f0d58c837..c32ab6b8116e4 100644 --- a/tests/ui/proc-macro/issue-37788.rs +++ b/tests/ui/proc-macro/issue-37788.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-38586.rs b/tests/ui/proc-macro/issue-38586.rs index 24e88ed93caaf..54d5d1038a621 100644 --- a/tests/ui/proc-macro/issue-38586.rs +++ b/tests/ui/proc-macro/issue-38586.rs @@ -1,4 +1,4 @@ -// aux-build:issue-38586.rs +//@ aux-build:issue-38586.rs #[macro_use] extern crate issue_38586; diff --git a/tests/ui/proc-macro/issue-39889.rs b/tests/ui/proc-macro/issue-39889.rs index 69bfb4f3cbfbc..687aefbc068ae 100644 --- a/tests/ui/proc-macro/issue-39889.rs +++ b/tests/ui/proc-macro/issue-39889.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_macros)] -// aux-build:issue-39889.rs +//@ aux-build:issue-39889.rs extern crate issue_39889; use issue_39889::Issue39889; diff --git a/tests/ui/proc-macro/issue-42708.rs b/tests/ui/proc-macro/issue-42708.rs index e8f445aaaf72d..27cb2f73d562c 100644 --- a/tests/ui/proc-macro/issue-42708.rs +++ b/tests/ui/proc-macro/issue-42708.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-42708.rs +//@ run-pass +//@ aux-build:issue-42708.rs #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/proc-macro/issue-50061.rs b/tests/ui/proc-macro/issue-50061.rs index 01c6b80b46ca7..34999bb507024 100644 --- a/tests/ui/proc-macro/issue-50061.rs +++ b/tests/ui/proc-macro/issue-50061.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(path_statements)] -// aux-build:issue-50061.rs +//@ aux-build:issue-50061.rs #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/issue-50493.rs b/tests/ui/proc-macro/issue-50493.rs index ce0e0839f1d17..5456eddb78d0b 100644 --- a/tests/ui/proc-macro/issue-50493.rs +++ b/tests/ui/proc-macro/issue-50493.rs @@ -1,4 +1,4 @@ -// aux-build:issue-50493.rs +//@ aux-build:issue-50493.rs #[macro_use] extern crate issue_50493; diff --git a/tests/ui/proc-macro/issue-53481.rs b/tests/ui/proc-macro/issue-53481.rs index 922e60a4c4fa1..636b8e0c0ae5c 100644 --- a/tests/ui/proc-macro/issue-53481.rs +++ b/tests/ui/proc-macro/issue-53481.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs index a4161d4fc3dcc..24e3be0ed2e40 100644 --- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs +++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs @@ -1,9 +1,9 @@ // Test that using a macro to replace the entire crate tree with a non-'mod' item errors out nicely. // `issue_59191::no_main` replaces whatever's passed in with `fn main() {}`. -// edition:2018 -// aux-crate:issue_59191=issue-59191.rs -// error-pattern: requires `sized` lang_item +//@ edition:2018 +//@ aux-crate:issue_59191=issue-59191.rs +//@ error-pattern: requires `sized` lang_item #![feature(custom_inner_attributes)] #![issue_59191::no_main] diff --git a/tests/ui/proc-macro/issue-66286.rs b/tests/ui/proc-macro/issue-66286.rs index 2a67aeab44e34..3ca064768b2d6 100644 --- a/tests/ui/proc-macro/issue-66286.rs +++ b/tests/ui/proc-macro/issue-66286.rs @@ -1,4 +1,4 @@ -// aux-build:issue-66286.rs +//@ aux-build:issue-66286.rs // Regression test for #66286. diff --git a/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs b/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs index a573c6e1c0b86..8f07cd34cc9eb 100644 --- a/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs +++ b/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// check-pass +//@ aux-build:test-macros.rs +//@ check-pass #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout b/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout index 8cd981e03f118..5e39c01ab5e2b 100644 --- a/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout +++ b/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout @@ -2,20 +2,20 @@ PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #0 bytes(100..104), + span: #0 bytes(102..106), }, Ident { ident: "ProceduralMasqueradeDummyType", - span: #0 bytes(105..134), + span: #0 bytes(107..136), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "Input", - span: #0 bytes(141..146), + span: #0 bytes(143..148), }, ], - span: #0 bytes(135..148), + span: #0 bytes(137..150), }, ] diff --git a/tests/ui/proc-macro/issue-75734-pp-paren.rs b/tests/ui/proc-macro/issue-75734-pp-paren.rs index faa93787d1385..ab0f4f72e62d0 100644 --- a/tests/ui/proc-macro/issue-75734-pp-paren.rs +++ b/tests/ui/proc-macro/issue-75734-pp-paren.rs @@ -2,9 +2,9 @@ // Ensures that we don't lose tokens when pretty-printing would // normally insert extra parentheses. -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-75801.rs b/tests/ui/proc-macro/issue-75801.rs index b07cde0fabd74..f0a1940cb5c12 100644 --- a/tests/ui/proc-macro/issue-75801.rs +++ b/tests/ui/proc-macro/issue-75801.rs @@ -1,4 +1,4 @@ -// aux-build: issue-75801.rs +//@ aux-build: issue-75801.rs // Regression test for #75801. diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.rs b/tests/ui/proc-macro/issue-75930-derive-cfg.rs index 1e37b40c9540f..f480de24e3e40 100644 --- a/tests/ui/proc-macro/issue-75930-derive-cfg.rs +++ b/tests/ui/proc-macro/issue-75930-derive-cfg.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs // Regression test for issue #75930 // Tests that we cfg-strip all targets before invoking diff --git a/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs b/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs index 7d31de1d22df2..dc40a1715a685 100644 --- a/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs +++ b/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug // // Regression test for issue #76182 // Tests that we properly handle patterns with a leading vert diff --git a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs index 5aefec3ece038..001a09fc5523e 100644 --- a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs +++ b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs @@ -1,6 +1,6 @@ -// aux-build:proc-macro-panic.rs -// edition:2018 -// needs-unwind proc macro panics to report errors +//@ aux-build:proc-macro-panic.rs +//@ edition:2018 +//@ needs-unwind proc macro panics to report errors // Regression test for issue #76270 // Tests that we don't print an ICE message when a panic diff --git a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs index 478809324ee6d..d3716b22729fe 100644 --- a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs +++ b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-79148.rs b/tests/ui/proc-macro/issue-79148.rs index 3f01187a8bfff..96ee5e033e16a 100644 --- a/tests/ui/proc-macro/issue-79148.rs +++ b/tests/ui/proc-macro/issue-79148.rs @@ -1,5 +1,5 @@ -// aux-build:re-export.rs -// edition:2018 +//@ aux-build:re-export.rs +//@ edition:2018 extern crate re_export; diff --git a/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs b/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs index b68f19c5dd21d..d0c14d8b5d09f 100644 --- a/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs +++ b/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-79242.rs +//@ check-pass +//@ aux-build:issue-79242.rs // Regression test for issue #79242 // Tests that compilation time doesn't blow up for a proc-macro diff --git a/tests/ui/proc-macro/issue-79825.rs b/tests/ui/proc-macro/issue-79825.rs index f628469ce3a62..f846bb404864c 100644 --- a/tests/ui/proc-macro/issue-79825.rs +++ b/tests/ui/proc-macro/issue-79825.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-79825.rs +//@ check-pass +//@ aux-build:issue-79825.rs #![feature(trait_alias)] extern crate issue_79825; diff --git a/tests/ui/proc-macro/issue-80760-empty-stmt.rs b/tests/ui/proc-macro/issue-80760-empty-stmt.rs index 86865af0b5298..59244e12eb8d2 100644 --- a/tests/ui/proc-macro/issue-80760-empty-stmt.rs +++ b/tests/ui/proc-macro/issue-80760-empty-stmt.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-81007-item-attrs.rs b/tests/ui/proc-macro/issue-81007-item-attrs.rs index ea27d54ee4148..ab47c9df08179 100644 --- a/tests/ui/proc-macro/issue-81007-item-attrs.rs +++ b/tests/ui/proc-macro/issue-81007-item-attrs.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/issue-81543-item-parse-err.rs b/tests/ui/proc-macro/issue-81543-item-parse-err.rs index 027389556fe24..f3c307318a0b4 100644 --- a/tests/ui/proc-macro/issue-81543-item-parse-err.rs +++ b/tests/ui/proc-macro/issue-81543-item-parse-err.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // Regression test for issue #81543 // Tests that we emit a properly spanned error diff --git a/tests/ui/proc-macro/issue-81555.rs b/tests/ui/proc-macro/issue-81555.rs index 693f1f7dc39ff..7a61a31952f41 100644 --- a/tests/ui/proc-macro/issue-81555.rs +++ b/tests/ui/proc-macro/issue-81555.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes, proc_macro_hygiene)] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs index 2b1aec4df0be3..ea8a334f57c55 100644 --- a/tests/ui/proc-macro/issue-83510.rs +++ b/tests/ui/proc-macro/issue-83510.rs @@ -1,4 +1,4 @@ -// aux-build: issue-83510.rs +//@ aux-build: issue-83510.rs extern crate issue_83510; diff --git a/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed b/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed index 426a5fa723fcf..367ad66a1a62b 100644 --- a/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed +++ b/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// run-rustfix +//@ aux-build:test-macros.rs +//@ run-rustfix #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs b/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs index 31e3f3c859236..c49619ef2ac7d 100644 --- a/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs +++ b/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// run-rustfix +//@ aux-build:test-macros.rs +//@ run-rustfix #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed index a61c868ed0a1a..9845bf8f2b654 100644 --- a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed +++ b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] //~ ERROR `derive` attribute cannot be used at crate level #[allow(dead_code)] diff --git a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs index 403f4470de77b..edc3ab9736dad 100644 --- a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs +++ b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![derive(Debug)] //~ ERROR `derive` attribute cannot be used at crate level #[allow(dead_code)] diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs index f48c8bf72d727..b69fce4cf7731 100644 --- a/tests/ui/proc-macro/issue-91800.rs +++ b/tests/ui/proc-macro/issue-91800.rs @@ -1,4 +1,4 @@ -// aux-build: issue-91800-macro.rs +//@ aux-build: issue-91800-macro.rs #[macro_use] extern crate issue_91800_macro; diff --git a/tests/ui/proc-macro/item-error.rs b/tests/ui/proc-macro/item-error.rs index 64c203e548071..f3e3eafcd8d17 100644 --- a/tests/ui/proc-macro/item-error.rs +++ b/tests/ui/proc-macro/item-error.rs @@ -1,4 +1,4 @@ -// aux-build:derive-b.rs +//@ aux-build:derive-b.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/keep-expr-tokens.rs b/tests/ui/proc-macro/keep-expr-tokens.rs index 0bf889a855d01..ced7fad47b924 100644 --- a/tests/ui/proc-macro/keep-expr-tokens.rs +++ b/tests/ui/proc-macro/keep-expr-tokens.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(stmt_expr_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/lifetimes-rpass.rs b/tests/ui/proc-macro/lifetimes-rpass.rs index a1d33ddca700e..a6b1f46a5d1a7 100644 --- a/tests/ui/proc-macro/lifetimes-rpass.rs +++ b/tests/ui/proc-macro/lifetimes-rpass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:lifetimes-rpass.rs +//@ aux-build:lifetimes-rpass.rs extern crate lifetimes_rpass as lifetimes; use lifetimes::*; diff --git a/tests/ui/proc-macro/lifetimes.rs b/tests/ui/proc-macro/lifetimes.rs index 5605696715e34..0c5d3e2f72fa5 100644 --- a/tests/ui/proc-macro/lifetimes.rs +++ b/tests/ui/proc-macro/lifetimes.rs @@ -1,4 +1,4 @@ -// aux-build:lifetimes.rs +//@ aux-build:lifetimes.rs extern crate lifetimes; diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs index 377a1f25b635c..13ae7239a143d 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.rs +++ b/tests/ui/proc-macro/lints_in_proc_macros.rs @@ -1,4 +1,4 @@ -// aux-build:bang_proc_macro2.rs +//@ aux-build:bang_proc_macro2.rs extern crate bang_proc_macro2; diff --git a/tests/ui/proc-macro/literal-to-string.rs b/tests/ui/proc-macro/literal-to-string.rs index eb009036a9a83..e87315fe14492 100644 --- a/tests/ui/proc-macro/literal-to-string.rs +++ b/tests/ui/proc-macro/literal-to-string.rs @@ -1,7 +1,7 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 -// aux-build: print-tokens.rs +//@ aux-build: print-tokens.rs extern crate print_tokens; fn main() { diff --git a/tests/ui/proc-macro/literal-to-string.stdout b/tests/ui/proc-macro/literal-to-string.stdout index ec6427545f45c..c3114265e0a86 100644 --- a/tests/ui/proc-macro/literal-to-string.stdout +++ b/tests/ui/proc-macro/literal-to-string.stdout @@ -3,91 +3,91 @@ TokenStream [ kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(144..145), + span: #0 bytes(147..148), }, Literal { kind: Integer, symbol: "17", suffix: Some("u8"), - span: #0 bytes(154..158), + span: #0 bytes(157..161), }, Literal { kind: Float, symbol: "42.", suffix: None, - span: #0 bytes(167..170), + span: #0 bytes(170..173), }, Literal { kind: Float, symbol: "3.14", suffix: Some("f32"), - span: #0 bytes(179..186), + span: #0 bytes(182..189), }, Literal { kind: Byte, symbol: "a", suffix: None, - span: #0 bytes(195..199), + span: #0 bytes(198..202), }, Literal { kind: Byte, symbol: "\xFF", suffix: None, - span: #0 bytes(208..215), + span: #0 bytes(211..218), }, Literal { kind: Char, symbol: "c", suffix: None, - span: #0 bytes(224..227), + span: #0 bytes(227..230), }, Literal { kind: Char, symbol: "\x32", suffix: None, - span: #0 bytes(236..242), + span: #0 bytes(239..245), }, Literal { kind: Str, symbol: "\\"str\\"", suffix: None, - span: #0 bytes(251..260), + span: #0 bytes(254..263), }, Literal { kind: StrRaw(1), symbol: "\"raw\" str", suffix: None, - span: #0 bytes(269..283), + span: #0 bytes(272..286), }, Literal { kind: StrRaw(3), symbol: "very ##\"raw\"## str", suffix: None, - span: #0 bytes(292..319), + span: #0 bytes(295..322), }, Literal { kind: ByteStr, symbol: "\\"byte\\" str", suffix: None, - span: #0 bytes(328..343), + span: #0 bytes(331..346), }, Literal { kind: ByteStrRaw(1), symbol: "\"raw\" \"byte\" str", suffix: None, - span: #0 bytes(352..374), + span: #0 bytes(355..377), }, Literal { kind: CStr, symbol: "\\"c\\" str", suffix: None, - span: #0 bytes(383..395), + span: #0 bytes(386..398), }, Literal { kind: CStrRaw(1), symbol: "\"raw\" \"c\" str", suffix: None, - span: #0 bytes(404..423), + span: #0 bytes(407..426), }, ] 1 diff --git a/tests/ui/proc-macro/load-panic-backtrace.rs b/tests/ui/proc-macro/load-panic-backtrace.rs index bcdcb704a7538..56ef4e9e08841 100644 --- a/tests/ui/proc-macro/load-panic-backtrace.rs +++ b/tests/ui/proc-macro/load-panic-backtrace.rs @@ -1,9 +1,9 @@ -// aux-build:test-macros.rs -// compile-flags: -Z proc-macro-backtrace -// rustc-env:RUST_BACKTRACE=0 -// normalize-stderr-test "thread '.*' panicked " -> "" -// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ compile-flags: -Z proc-macro-backtrace +//@ rustc-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test "thread '.*' panicked " -> "" +//@ normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/load-panic.rs b/tests/ui/proc-macro/load-panic.rs index 6ce88c400e0f7..50475a34226b4 100644 --- a/tests/ui/proc-macro/load-panic.rs +++ b/tests/ui/proc-macro/load-panic.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/load-two.rs b/tests/ui/proc-macro/load-two.rs index 5ce0e65452e99..44fcdb056dd61 100644 --- a/tests/ui/proc-macro/load-two.rs +++ b/tests/ui/proc-macro/load-two.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] -// aux-build:derive-atob.rs -// aux-build:derive-ctod.rs +//@ aux-build:derive-atob.rs +//@ aux-build:derive-ctod.rs #[macro_use] extern crate derive_atob; diff --git a/tests/ui/proc-macro/macro-brackets.rs b/tests/ui/proc-macro/macro-brackets.rs index aa0046f458229..91bd652d37b88 100644 --- a/tests/ui/proc-macro/macro-brackets.rs +++ b/tests/ui/proc-macro/macro-brackets.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macro-crate-multi-decorator.rs b/tests/ui/proc-macro/macro-crate-multi-decorator.rs index ec57dec14ed20..26a2d1592aba3 100644 --- a/tests/ui/proc-macro/macro-crate-multi-decorator.rs +++ b/tests/ui/proc-macro/macro-crate-multi-decorator.rs @@ -1,7 +1,7 @@ // The duplicate macro will create a copy of the item with the given identifier. -// check-pass -// aux-build:duplicate.rs +//@ check-pass +//@ aux-build:duplicate.rs #[macro_use] extern crate duplicate; diff --git a/tests/ui/proc-macro/macro-namespace-reserved-2.rs b/tests/ui/proc-macro/macro-namespace-reserved-2.rs index 470b22b48749d..79f591d8cb61e 100644 --- a/tests/ui/proc-macro/macro-namespace-reserved-2.rs +++ b/tests/ui/proc-macro/macro-namespace-reserved-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/macro-namespace-reserved.rs b/tests/ui/proc-macro/macro-namespace-reserved.rs index 60d379e41ad92..26eb94d800c39 100644 --- a/tests/ui/proc-macro/macro-namespace-reserved.rs +++ b/tests/ui/proc-macro/macro-namespace-reserved.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(decl_macro)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/macro-quote-cond.rs b/tests/ui/proc-macro/macro-quote-cond.rs index 48307f4d9ae64..3658e2a28f2a7 100644 --- a/tests/ui/proc-macro/macro-quote-cond.rs +++ b/tests/ui/proc-macro/macro-quote-cond.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cond_plugin.rs +//@ run-pass +//@ aux-build:cond_plugin.rs #![allow(unused_parens)] diff --git a/tests/ui/proc-macro/macro-rules-derive-cfg.rs b/tests/ui/proc-macro/macro-rules-derive-cfg.rs index a221b9578af3e..68026a60be686 100644 --- a/tests/ui/proc-macro/macro-rules-derive-cfg.rs +++ b/tests/ui/proc-macro/macro-rules-derive-cfg.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/macro-rules-derive.rs b/tests/ui/proc-macro/macro-rules-derive.rs index e0c40bbc7344e..4023a9a044aa8 100644 --- a/tests/ui/proc-macro/macro-rules-derive.rs +++ b/tests/ui/proc-macro/macro-rules-derive.rs @@ -1,4 +1,4 @@ -// aux-build:first-second.rs +//@ aux-build:first-second.rs extern crate first_second; use first_second::*; diff --git a/tests/ui/proc-macro/macro-use-attr.rs b/tests/ui/proc-macro/macro-use-attr.rs index d275fb6a804f7..fe071b263838a 100644 --- a/tests/ui/proc-macro/macro-use-attr.rs +++ b/tests/ui/proc-macro/macro-use-attr.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macro-use-bang.rs b/tests/ui/proc-macro/macro-use-bang.rs index e3174fd446a1c..f8ccba6b0941a 100644 --- a/tests/ui/proc-macro/macro-use-bang.rs +++ b/tests/ui/proc-macro/macro-use-bang.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macros-in-extern.rs b/tests/ui/proc-macro/macros-in-extern.rs index 57e2066d83c58..82ab7b506baba 100644 --- a/tests/ui/proc-macro/macros-in-extern.rs +++ b/tests/ui/proc-macro/macros-in-extern.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:test-macros.rs -// ignore-wasm32 +//@ run-pass +//@ aux-build:test-macros.rs +//@ ignore-wasm32 #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macros-in-type.rs b/tests/ui/proc-macro/macros-in-type.rs index 19ed58eceb964..4db7cf273f702 100644 --- a/tests/ui/proc-macro/macros-in-type.rs +++ b/tests/ui/proc-macro/macros-in-type.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/meta-delim.rs b/tests/ui/proc-macro/meta-delim.rs index 964291bc6784c..1afba1fd34349 100644 --- a/tests/ui/proc-macro/meta-delim.rs +++ b/tests/ui/proc-macro/meta-delim.rs @@ -1,6 +1,6 @@ -// aux-build:meta-delim.rs -// edition:2018 -// run-pass +//@ aux-build:meta-delim.rs +//@ edition:2018 +//@ run-pass // Tests that we can properly deserialize a macro with strange delimiters // See https://github.com/rust-lang/rust/pull/73569#issuecomment-650860457 diff --git a/tests/ui/proc-macro/meta-macro-hygiene.rs b/tests/ui/proc-macro/meta-macro-hygiene.rs index 72fd88e119fd0..9dac1030b9c7f 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.rs +++ b/tests/ui/proc-macro/meta-macro-hygiene.rs @@ -1,12 +1,12 @@ -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no -// check-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no +//@ check-pass // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout diff --git a/tests/ui/proc-macro/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout index 3672a3590fd7a..8697ba58a3903 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.stdout +++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout @@ -2,15 +2,15 @@ Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:26:37: 26:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:26:43: 26:44 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:44: 26:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:26:45: 26:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:50: 26:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:26:51: 26:53 (#3) }] Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }] #![feature /* 0#0 */(prelude_import)] -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no -// check-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no +//@ check-pass // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout diff --git a/tests/ui/proc-macro/meta-macro.rs b/tests/ui/proc-macro/meta-macro.rs index dbac90382d1d7..abe63c60fb8de 100644 --- a/tests/ui/proc-macro/meta-macro.rs +++ b/tests/ui/proc-macro/meta-macro.rs @@ -1,8 +1,8 @@ -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -// run-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ run-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs index 0083846568e29..bab76a8c43319 100644 --- a/tests/ui/proc-macro/mixed-site-span.rs +++ b/tests/ui/proc-macro/mixed-site-span.rs @@ -1,6 +1,6 @@ // Proc macros using `mixed_site` spans exhibit usual properties of `macro_rules` hygiene. -// aux-build:mixed-site-span.rs +//@ aux-build:mixed-site-span.rs #[macro_use] extern crate mixed_site_span; diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs index ea9bf837c2479..86a7d6a7772a9 100644 --- a/tests/ui/proc-macro/modify-ast.rs +++ b/tests/ui/proc-macro/modify-ast.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:modify-ast.rs +//@ run-pass +//@ aux-build:modify-ast.rs extern crate modify_ast; diff --git a/tests/ui/proc-macro/module.rs b/tests/ui/proc-macro/module.rs index a750083c607fe..210c05988bf23 100644 --- a/tests/ui/proc-macro/module.rs +++ b/tests/ui/proc-macro/module.rs @@ -1 +1 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) diff --git a/tests/ui/proc-macro/module_with_attrs.rs b/tests/ui/proc-macro/module_with_attrs.rs index 0b2604f95b6c1..8a4ca92e44b6c 100644 --- a/tests/ui/proc-macro/module_with_attrs.rs +++ b/tests/ui/proc-macro/module_with_attrs.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![rustfmt::skip] #![print_attr] diff --git a/tests/ui/proc-macro/multispan.rs b/tests/ui/proc-macro/multispan.rs index e9e0349f2c2d7..60f67c8c67c06 100644 --- a/tests/ui/proc-macro/multispan.rs +++ b/tests/ui/proc-macro/multispan.rs @@ -1,4 +1,4 @@ -// aux-build:multispan.rs +//@ aux-build:multispan.rs extern crate multispan; diff --git a/tests/ui/proc-macro/negative-token.rs b/tests/ui/proc-macro/negative-token.rs index 2ed3cbc08cd51..32408e0d9367f 100644 --- a/tests/ui/proc-macro/negative-token.rs +++ b/tests/ui/proc-macro/negative-token.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:negative-token.rs +//@ run-pass +//@ aux-build:negative-token.rs extern crate negative_token; diff --git a/tests/ui/proc-macro/nested-derive-cfg.rs b/tests/ui/proc-macro/nested-derive-cfg.rs index 53cfbb7c98fc9..696a5024ec2ae 100644 --- a/tests/ui/proc-macro/nested-derive-cfg.rs +++ b/tests/ui/proc-macro/nested-derive-cfg.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs -// check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs +//@ check-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nested-item-spans.rs b/tests/ui/proc-macro/nested-item-spans.rs index 63da170d0bbb2..c19af0f9796a4 100644 --- a/tests/ui/proc-macro/nested-item-spans.rs +++ b/tests/ui/proc-macro/nested-item-spans.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/nested-macro-rules.rs b/tests/ui/proc-macro/nested-macro-rules.rs index 25ffcfad7c7ea..bb25b97df5067 100644 --- a/tests/ui/proc-macro/nested-macro-rules.rs +++ b/tests/ui/proc-macro/nested-macro-rules.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:nested-macro-rules.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -Z macro-backtrace -// edition:2018 +//@ run-pass +//@ aux-build:nested-macro-rules.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug -Z macro-backtrace +//@ edition:2018 #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nested-nonterminal-tokens.rs b/tests/ui/proc-macro/nested-nonterminal-tokens.rs index 04d34e21cdc74..6e28cabd2fe60 100644 --- a/tests/ui/proc-macro/nested-nonterminal-tokens.rs +++ b/tests/ui/proc-macro/nested-nonterminal-tokens.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs // Tests that we properly pass tokens to proc-macro when nested // nonterminals are involved. diff --git a/tests/ui/proc-macro/no-macro-use-attr.rs b/tests/ui/proc-macro/no-macro-use-attr.rs index a8a8fa4e19a4a..ae507a31ba783 100644 --- a/tests/ui/proc-macro/no-macro-use-attr.rs +++ b/tests/ui/proc-macro/no-macro-use-attr.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] #![warn(unused_extern_crates)] diff --git a/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs index 4e5208e50580b..e04d45bbd0dfe 100644 --- a/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs +++ b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs @@ -1,7 +1,7 @@ -// build-pass -// force-host -// no-prefer-dynamic -// aux-build:exports_no_mangle.rs +//@ build-pass +//@ force-host +//@ no-prefer-dynamic +//@ aux-build:exports_no_mangle.rs #![crate_type = "proc-macro"] // Issue #111888: this proc-macro crate imports another crate that itself diff --git a/tests/ui/proc-macro/no-missing-docs.rs b/tests/ui/proc-macro/no-missing-docs.rs index e1e8218582f6b..124af9bea756d 100644 --- a/tests/ui/proc-macro/no-missing-docs.rs +++ b/tests/ui/proc-macro/no-missing-docs.rs @@ -1,9 +1,9 @@ //! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs` //! warnings. -// build-pass (FIXME(62277): could be check-pass?) -// force-host -// no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(missing_docs)] diff --git a/tests/ui/proc-macro/nodelim-groups.rs b/tests/ui/proc-macro/nodelim-groups.rs index ec30199028142..f13d97aaff57b 100644 --- a/tests/ui/proc-macro/nodelim-groups.rs +++ b/tests/ui/proc-macro/nodelim-groups.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// edition:2018 +//@ run-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ edition:2018 // // Tests the pretty-printing behavior of inserting `Invisible`-delimited groups diff --git a/tests/ui/proc-macro/non-root.rs b/tests/ui/proc-macro/non-root.rs index a7c4ac00a4481..da3cd83f0fda9 100644 --- a/tests/ui/proc-macro/non-root.rs +++ b/tests/ui/proc-macro/non-root.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/nonterminal-expansion.rs b/tests/ui/proc-macro/nonterminal-expansion.rs index e6215587153c4..96ea4aef85b4d 100644 --- a/tests/ui/proc-macro/nonterminal-expansion.rs +++ b/tests/ui/proc-macro/nonterminal-expansion.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nonterminal-recollect-attr.rs b/tests/ui/proc-macro/nonterminal-recollect-attr.rs index 79c4ad4cd2a24..7d922bafdcdb6 100644 --- a/tests/ui/proc-macro/nonterminal-recollect-attr.rs +++ b/tests/ui/proc-macro/nonterminal-recollect-attr.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:nonterminal-recollect-attr.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:nonterminal-recollect-attr.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.rs b/tests/ui/proc-macro/nonterminal-token-hygiene.rs index 1e9e90a6b6f08..d1e42509584b4 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.rs +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.rs @@ -1,13 +1,13 @@ // Make sure that marks from declarative macros are applied to tokens in nonterminal. -// check-pass -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -// compile-flags: -Z trim-diagnostic-paths=no +//@ check-pass +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +//@ compile-flags: -Z trim-diagnostic-paths=no // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" -// aux-build:test-macros.rs +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ aux-build:test-macros.rs #![feature(decl_macro)] #![no_std] // Don't load unnecessary hygiene information from std diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout index cf9addb8a947d..2078e59b8b4b0 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout @@ -24,14 +24,14 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ #![no_std /* 0#0 */] // Make sure that marks from declarative macros are applied to tokens in nonterminal. -// check-pass -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -// compile-flags: -Z trim-diagnostic-paths=no +//@ check-pass +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +//@ compile-flags: -Z trim-diagnostic-paths=no // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" -// aux-build:test-macros.rs +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ aux-build:test-macros.rs #![feature /* 0#0 */(decl_macro)] #![no_std /* 0#0 */] diff --git a/tests/ui/proc-macro/not-joint.rs b/tests/ui/proc-macro/not-joint.rs index 30da2811ed4d4..16b89bc6e8193 100644 --- a/tests/ui/proc-macro/not-joint.rs +++ b/tests/ui/proc-macro/not-joint.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:not-joint.rs +//@ run-pass +//@ aux-build:not-joint.rs extern crate not_joint as bar; use bar::{tokens, nothing}; diff --git a/tests/ui/proc-macro/out-of-line-mod.rs b/tests/ui/proc-macro/out-of-line-mod.rs index 658ed6c18e05a..2a4fb16a09ad4 100644 --- a/tests/ui/proc-macro/out-of-line-mod.rs +++ b/tests/ui/proc-macro/out-of-line-mod.rs @@ -1,7 +1,7 @@ // Out-of-line module is found on the filesystem if passed through a proc macro (issue #58818). -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/outer/inner.rs b/tests/ui/proc-macro/outer/inner.rs index a750083c607fe..210c05988bf23 100644 --- a/tests/ui/proc-macro/outer/inner.rs +++ b/tests/ui/proc-macro/outer/inner.rs @@ -1 +1 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) diff --git a/tests/ui/proc-macro/panic-abort.rs b/tests/ui/proc-macro/panic-abort.rs index ad312a875e396..40d8aec5ef690 100644 --- a/tests/ui/proc-macro/panic-abort.rs +++ b/tests/ui/proc-macro/panic-abort.rs @@ -1,4 +1,4 @@ -// error-pattern: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic -// compile-flags: --crate-type proc-macro -Cpanic=abort -// force-host -// check-pass +//@ error-pattern: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic +//@ compile-flags: --crate-type proc-macro -Cpanic=abort +//@ force-host +//@ check-pass diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs index 354657db4db38..12a1ab1a43d57 100644 --- a/tests/ui/proc-macro/parent-source-spans.rs +++ b/tests/ui/proc-macro/parent-source-spans.rs @@ -1,4 +1,4 @@ -// aux-build:parent-source-spans.rs +//@ aux-build:parent-source-spans.rs #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/pretty-print-hack-hide.rs b/tests/ui/proc-macro/pretty-print-hack-hide.rs index f53e8fe8252f8..26db43341ab7a 100644 --- a/tests/ui/proc-macro/pretty-print-hack-hide.rs +++ b/tests/ui/proc-macro/pretty-print-hack-hide.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/pretty-print-hack-show.rs b/tests/ui/proc-macro/pretty-print-hack-show.rs index 24a389c450ea0..1b6794ae69862 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.rs +++ b/tests/ui/proc-macro/pretty-print-hack-show.rs @@ -1,8 +1,8 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// revisions: local remapped +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ revisions: local remapped // [local] no-remap-src-base: The hack should work regardless of remapping. -// [remapped] remap-src-base +//@ [remapped] remap-src-base #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs index 889f399a7f256..f89098f3a5ecc 100644 --- a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs index 889f399a7f256..f89098f3a5ecc 100644 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs index 889f399a7f256..f89098f3a5ecc 100644 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-tts.rs b/tests/ui/proc-macro/pretty-print-tts.rs index ffe2a74155151..e3240e27c2a04 100644 --- a/tests/ui/proc-macro/pretty-print-tts.rs +++ b/tests/ui/proc-macro/pretty-print-tts.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/proc-macro-abi.rs b/tests/ui/proc-macro/proc-macro-abi.rs index 93a613e8b8fc3..188912bed92ea 100644 --- a/tests/ui/proc-macro/proc-macro-abi.rs +++ b/tests/ui/proc-macro/proc-macro-abi.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/proc-macro-attributes.rs b/tests/ui/proc-macro/proc-macro-attributes.rs index 8d96381b9bdff..6d5e7b67c782e 100644 --- a/tests/ui/proc-macro/proc-macro-attributes.rs +++ b/tests/ui/proc-macro/proc-macro-attributes.rs @@ -1,4 +1,4 @@ -// aux-build:derive-b.rs +//@ aux-build:derive-b.rs #[macro_use] extern crate derive_b; diff --git a/tests/ui/proc-macro/proc-macro-deprecated-attr.rs b/tests/ui/proc-macro/proc-macro-deprecated-attr.rs index f1144a4a55b16..5e06a1c6cf8ba 100644 --- a/tests/ui/proc-macro/proc-macro-deprecated-attr.rs +++ b/tests/ui/proc-macro/proc-macro-deprecated-attr.rs @@ -1,6 +1,6 @@ -// check-pass -// force-host -// no-prefer-dynamic +//@ check-pass +//@ force-host +//@ no-prefer-dynamic #![deny(deprecated)] diff --git a/tests/ui/proc-macro/proc-macro-gates.rs b/tests/ui/proc-macro/proc-macro-gates.rs index e2cf4e7398756..585d9a3c9be34 100644 --- a/tests/ui/proc-macro/proc-macro-gates.rs +++ b/tests/ui/proc-macro/proc-macro-gates.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // gate-test-proc_macro_hygiene #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/proc-macro-gates2.rs b/tests/ui/proc-macro/proc-macro-gates2.rs index 38fbd4733d5cb..76d8036d8a447 100644 --- a/tests/ui/proc-macro/proc-macro-gates2.rs +++ b/tests/ui/proc-macro/proc-macro-gates2.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/pub-at-crate-root.rs b/tests/ui/proc-macro/pub-at-crate-root.rs index 54cf333a45b13..32e4999a71bc6 100644 --- a/tests/ui/proc-macro/pub-at-crate-root.rs +++ b/tests/ui/proc-macro/pub-at-crate-root.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/quote-debug.rs b/tests/ui/proc-macro/quote-debug.rs index e0304a01405a5..f1593b505f9a3 100644 --- a/tests/ui/proc-macro/quote-debug.rs +++ b/tests/ui/proc-macro/quote-debug.rs @@ -1,7 +1,7 @@ -// check-pass -// force-host -// no-prefer-dynamic -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: -Z unpretty=expanded // // This file is not actually used as a proc-macro - instead, // it's just used to show the output of the `quote!` macro diff --git a/tests/ui/proc-macro/quote-debug.stdout b/tests/ui/proc-macro/quote-debug.stdout index 9f64a1e06b9d4..51f34423366ff 100644 --- a/tests/ui/proc-macro/quote-debug.stdout +++ b/tests/ui/proc-macro/quote-debug.stdout @@ -1,9 +1,9 @@ #![feature(prelude_import)] #![no_std] -// check-pass -// force-host -// no-prefer-dynamic -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: -Z unpretty=expanded // // This file is not actually used as a proc-macro - instead, // it's just used to show the output of the `quote!` macro diff --git a/tests/ui/proc-macro/raw-ident.rs b/tests/ui/proc-macro/raw-ident.rs index 03cb4571496e9..2ea2d3079dc00 100644 --- a/tests/ui/proc-macro/raw-ident.rs +++ b/tests/ui/proc-macro/raw-ident.rs @@ -1,4 +1,4 @@ -// aux-build:raw-ident.rs +//@ aux-build:raw-ident.rs #[macro_use] extern crate raw_ident; diff --git a/tests/ui/proc-macro/reserved-macro-names.rs b/tests/ui/proc-macro/reserved-macro-names.rs index c5e71a87dfbe8..0cbb0c06096d1 100644 --- a/tests/ui/proc-macro/reserved-macro-names.rs +++ b/tests/ui/proc-macro/reserved-macro-names.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/resolve-error.rs b/tests/ui/proc-macro/resolve-error.rs index ad8a5bbb0f9ff..2670d8884ae72 100644 --- a/tests/ui/proc-macro/resolve-error.rs +++ b/tests/ui/proc-macro/resolve-error.rs @@ -1,6 +1,6 @@ -// aux-build:derive-foo.rs -// aux-build:derive-clona.rs -// aux-build:test-macros.rs +//@ aux-build:derive-foo.rs +//@ aux-build:derive-clona.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate derive_foo; diff --git a/tests/ui/proc-macro/resolved-located-at.rs b/tests/ui/proc-macro/resolved-located-at.rs index b785573f2031f..2f906d91e6b2b 100644 --- a/tests/ui/proc-macro/resolved-located-at.rs +++ b/tests/ui/proc-macro/resolved-located-at.rs @@ -1,4 +1,4 @@ -// aux-build:resolved-located-at.rs +//@ aux-build:resolved-located-at.rs #[macro_use] extern crate resolved_located_at; diff --git a/tests/ui/proc-macro/shadow.rs b/tests/ui/proc-macro/shadow.rs index 61959594c7981..22aecb7c05fc8 100644 --- a/tests/ui/proc-macro/shadow.rs +++ b/tests/ui/proc-macro/shadow.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/signature-proc-macro-attribute.rs b/tests/ui/proc-macro/signature-proc-macro-attribute.rs index fb48f748ce004..e24e7c90d3712 100644 --- a/tests/ui/proc-macro/signature-proc-macro-attribute.rs +++ b/tests/ui/proc-macro/signature-proc-macro-attribute.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature-proc-macro-derive.rs b/tests/ui/proc-macro/signature-proc-macro-derive.rs index d294b15912794..4e3cb090cdc4a 100644 --- a/tests/ui/proc-macro/signature-proc-macro-derive.rs +++ b/tests/ui/proc-macro/signature-proc-macro-derive.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature-proc-macro.rs b/tests/ui/proc-macro/signature-proc-macro.rs index ca2509ed84b5d..0c9b3e6bde770 100644 --- a/tests/ui/proc-macro/signature-proc-macro.rs +++ b/tests/ui/proc-macro/signature-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature.rs b/tests/ui/proc-macro/signature.rs index 7b4982a6178f9..6e2e8561a835d 100644 --- a/tests/ui/proc-macro/signature.rs +++ b/tests/ui/proc-macro/signature.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/smoke.rs b/tests/ui/proc-macro/smoke.rs index 04625559b919e..dc32adb2e27ab 100644 --- a/tests/ui/proc-macro/smoke.rs +++ b/tests/ui/proc-macro/smoke.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(path_statements)] -// aux-build:derive-a.rs +//@ aux-build:derive-a.rs #[macro_use] extern crate derive_a; diff --git a/tests/ui/proc-macro/span-absolute-posititions.rs b/tests/ui/proc-macro/span-absolute-posititions.rs index 6d70fe611c47e..ddbc5902d6b00 100644 --- a/tests/ui/proc-macro/span-absolute-posititions.rs +++ b/tests/ui/proc-macro/span-absolute-posititions.rs @@ -1,4 +1,4 @@ -// aux-build:assert-span-pos.rs +//@ aux-build:assert-span-pos.rs // ignore-tidy-tab extern crate assert_span_pos; diff --git a/tests/ui/proc-macro/span-api-tests.rs b/tests/ui/proc-macro/span-api-tests.rs index 7493f9cdb3de2..1e00f3ad7ac60 100644 --- a/tests/ui/proc-macro/span-api-tests.rs +++ b/tests/ui/proc-macro/span-api-tests.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:span-api-tests.rs -// aux-build:span-test-macros.rs -// compile-flags: -Ztranslate-remapped-path-to-local-path=yes +//@ run-pass +//@ aux-build:span-api-tests.rs +//@ aux-build:span-test-macros.rs +//@ compile-flags: -Ztranslate-remapped-path-to-local-path=yes #[macro_use] extern crate span_test_macros; diff --git a/tests/ui/proc-macro/span-from-proc-macro.rs b/tests/ui/proc-macro/span-from-proc-macro.rs index ecff2d7258797..9d851d62d1269 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.rs +++ b/tests/ui/proc-macro/span-from-proc-macro.rs @@ -1,6 +1,6 @@ -// aux-build:custom-quote.rs -// aux-build:span-from-proc-macro.rs -// compile-flags: -Z macro-backtrace +//@ aux-build:custom-quote.rs +//@ aux-build:span-from-proc-macro.rs +//@ compile-flags: -Z macro-backtrace #[macro_use] extern crate span_from_proc_macro; diff --git a/tests/ui/proc-macro/span-preservation.rs b/tests/ui/proc-macro/span-preservation.rs index 0c73586555822..25a44505c772e 100644 --- a/tests/ui/proc-macro/span-preservation.rs +++ b/tests/ui/proc-macro/span-preservation.rs @@ -1,7 +1,7 @@ // For each of these, we should get the appropriate type mismatch error message, // and the function should be echoed. -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/struct-field-macro.rs b/tests/ui/proc-macro/struct-field-macro.rs index 460f4d9f726f3..b2c3dd49de942 100644 --- a/tests/ui/proc-macro/struct-field-macro.rs +++ b/tests/ui/proc-macro/struct-field-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-nothing.rs +//@ aux-build:derive-nothing.rs #[macro_use] extern crate derive_nothing; diff --git a/tests/ui/proc-macro/subspan.rs b/tests/ui/proc-macro/subspan.rs index a4187f9e7c20c..78804cba342d0 100644 --- a/tests/ui/proc-macro/subspan.rs +++ b/tests/ui/proc-macro/subspan.rs @@ -1,4 +1,4 @@ -// aux-build:subspan.rs +//@ aux-build:subspan.rs extern crate subspan; diff --git a/tests/ui/proc-macro/test-same-crate.rs b/tests/ui/proc-macro/test-same-crate.rs index c13f384fa3ae1..3b3565c25b279 100644 --- a/tests/ui/proc-macro/test-same-crate.rs +++ b/tests/ui/proc-macro/test-same-crate.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/proc-macro/test.rs b/tests/ui/proc-macro/test.rs index 2ec620720202b..9e76deab9ce4b 100644 --- a/tests/ui/proc-macro/test.rs +++ b/tests/ui/proc-macro/test.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:api/mod.rs -// edition: 2021 +//@ check-pass +//@ aux-build:api/mod.rs +//@ edition: 2021 //! This is for everything that *would* be a #[test] inside of libproc_macro, //! except for the fact that proc_macro objects are not capable of existing diff --git a/tests/ui/proc-macro/three-equals.rs b/tests/ui/proc-macro/three-equals.rs index 21b137c99a74c..d16fc55656ce3 100644 --- a/tests/ui/proc-macro/three-equals.rs +++ b/tests/ui/proc-macro/three-equals.rs @@ -1,4 +1,4 @@ -// aux-build:three-equals.rs +//@ aux-build:three-equals.rs extern crate three_equals; diff --git a/tests/ui/proc-macro/trailing-plus.rs b/tests/ui/proc-macro/trailing-plus.rs index 4f61de47d8545..875225c15cae4 100644 --- a/tests/ui/proc-macro/trailing-plus.rs +++ b/tests/ui/proc-macro/trailing-plus.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/trait-fn-args-2015.rs b/tests/ui/proc-macro/trait-fn-args-2015.rs index 6b8df78a061c7..389bb5b6a92f5 100644 --- a/tests/ui/proc-macro/trait-fn-args-2015.rs +++ b/tests/ui/proc-macro/trait-fn-args-2015.rs @@ -1,7 +1,7 @@ // Unnamed arguments in trait functions can be passed through proc macros on 2015 edition. -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![allow(anonymous_parameters)] diff --git a/tests/ui/proc-macro/two-crate-types-1.rs b/tests/ui/proc-macro/two-crate-types-1.rs index 80bfd357f073c..432b0a601b22a 100644 --- a/tests/ui/proc-macro/two-crate-types-1.rs +++ b/tests/ui/proc-macro/two-crate-types-1.rs @@ -1,7 +1,7 @@ -// error-pattern: cannot mix `proc-macro` crate type with others +//@ error-pattern: cannot mix `proc-macro` crate type with others -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![crate_type = "rlib"] diff --git a/tests/ui/proc-macro/two-crate-types-2.rs b/tests/ui/proc-macro/two-crate-types-2.rs index 39cbf7d3b72f5..491c5c71d76c4 100644 --- a/tests/ui/proc-macro/two-crate-types-2.rs +++ b/tests/ui/proc-macro/two-crate-types-2.rs @@ -1,3 +1,3 @@ -// error-pattern: cannot mix `proc-macro` crate type with others -// compile-flags: --crate-type rlib --crate-type proc-macro -// force-host +//@ error-pattern: cannot mix `proc-macro` crate type with others +//@ compile-flags: --crate-type rlib --crate-type proc-macro +//@ force-host diff --git a/tests/ui/proc-macro/unsafe-foreign-mod.rs b/tests/ui/proc-macro/unsafe-foreign-mod.rs index 7bdfa93c21fc7..b863b0fc11403 100644 --- a/tests/ui/proc-macro/unsafe-foreign-mod.rs +++ b/tests/ui/proc-macro/unsafe-foreign-mod.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-only-syntax.rs +//@ run-pass +//@ aux-build:macro-only-syntax.rs extern crate macro_only_syntax; diff --git a/tests/ui/proc-macro/unsafe-mod.rs b/tests/ui/proc-macro/unsafe-mod.rs index 8ff6e352c53d0..00ea388af932a 100644 --- a/tests/ui/proc-macro/unsafe-mod.rs +++ b/tests/ui/proc-macro/unsafe-mod.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-only-syntax.rs +//@ run-pass +//@ aux-build:macro-only-syntax.rs #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/visibility-path.rs b/tests/ui/proc-macro/visibility-path.rs index a73430db2c19a..7b8579890b8f3 100644 --- a/tests/ui/proc-macro/visibility-path.rs +++ b/tests/ui/proc-macro/visibility-path.rs @@ -1,7 +1,7 @@ // Proc macro defined with `pub(path)` doesn't ICEs due to resolving the `path` (issue #68921). -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/weird-braces.rs b/tests/ui/proc-macro/weird-braces.rs index b9a7e08f99379..b17b90742b502 100644 --- a/tests/ui/proc-macro/weird-braces.rs +++ b/tests/ui/proc-macro/weird-braces.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// check-pass -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/weird-hygiene.rs b/tests/ui/proc-macro/weird-hygiene.rs index 7ba3f98a7a9a8..8b35898a4d20c 100644 --- a/tests/ui/proc-macro/weird-hygiene.rs +++ b/tests/ui/proc-macro/weird-hygiene.rs @@ -1,4 +1,4 @@ -// aux-build:weird-hygiene.rs +//@ aux-build:weird-hygiene.rs #![feature(stmt_expr_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/process-termination/process-termination-blocking-io.rs b/tests/ui/process-termination/process-termination-blocking-io.rs index b2dab5c93814b..c21edff25cf7c 100644 --- a/tests/ui/process-termination/process-termination-blocking-io.rs +++ b/tests/ui/process-termination/process-termination-blocking-io.rs @@ -1,8 +1,8 @@ // program should terminate even if a thread is blocked on I/O. // https://github.com/fortanix/rust-sgx/issues/109 -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::{net::TcpListener, sync::mpsc, thread}; diff --git a/tests/ui/process-termination/process-termination-simple.rs b/tests/ui/process-termination/process-termination-simple.rs index 8f2e5b94c3a6e..63eb2c747068b 100644 --- a/tests/ui/process-termination/process-termination-simple.rs +++ b/tests/ui/process-termination/process-termination-simple.rs @@ -1,7 +1,7 @@ // program should terminate when std::process::exit is called from any thread -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::{process, thread}; diff --git a/tests/ui/process/core-run-destroy.rs b/tests/ui/process/core-run-destroy.rs index d0e97bf01f38a..42bb35edf3ba5 100644 --- a/tests/ui/process/core-run-destroy.rs +++ b/tests/ui/process/core-run-destroy.rs @@ -1,14 +1,14 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(stable_features)] #![allow(deprecated)] #![allow(unused_imports)] -// compile-flags:--test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'cat' and 'sleep' -// ignore-fuchsia no 'cat' +//@ compile-flags:--test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'cat' and 'sleep' +//@ ignore-fuchsia no 'cat' // N.B., these tests kill child processes. Valgrind sees these children as leaking // memory, which makes for some *confusing* logs. That's why these are here diff --git a/tests/ui/process/fds-are-cloexec.rs b/tests/ui/process/fds-are-cloexec.rs index 4482b7032a75a..a5ede2ee04da8 100644 --- a/tests/ui/process/fds-are-cloexec.rs +++ b/tests/ui/process/fds-are-cloexec.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows -// ignore-android -// ignore-emscripten no processes -// ignore-haiku -// ignore-sgx no processes +//@ run-pass +//@ ignore-windows +//@ ignore-android +//@ ignore-emscripten no processes +//@ ignore-haiku +//@ ignore-sgx no processes #![feature(rustc_private)] diff --git a/tests/ui/process/issue-13304.rs b/tests/ui/process/issue-13304.rs index b10f6d57255de..06aad569169de 100644 --- a/tests/ui/process/issue-13304.rs +++ b/tests/ui/process/issue-13304.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/issue-14456.rs b/tests/ui/process/issue-14456.rs index 52a56eb77f78e..9146588aa4bc3 100644 --- a/tests/ui/process/issue-14456.rs +++ b/tests/ui/process/issue-14456.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/issue-14940.rs b/tests/ui/process/issue-14940.rs index 98a4af0c467a3..3c8de7cfccccf 100644 --- a/tests/ui/process/issue-14940.rs +++ b/tests/ui/process/issue-14940.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/process/issue-16272.rs b/tests/ui/process/issue-16272.rs index 5cf3fd9492826..484c3ea41166d 100644 --- a/tests/ui/process/issue-16272.rs +++ b/tests/ui/process/issue-16272.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/process/issue-20091.rs b/tests/ui/process/issue-20091.rs index 86cc79d6b4244..27986277fad48 100644 --- a/tests/ui/process/issue-20091.rs +++ b/tests/ui/process/issue-20091.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(os)] diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs index c240dc18fd366..e8aa7f59f8534 100644 --- a/tests/ui/process/multi-panic.rs +++ b/tests/ui/process/multi-panic.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// needs-unwind +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ needs-unwind fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); diff --git a/tests/ui/process/no-stdio.rs b/tests/ui/process/no-stdio.rs index 68e6fa838b4e2..86e177617e59c 100644 --- a/tests/ui/process/no-stdio.rs +++ b/tests/ui/process/no-stdio.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-android -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-android +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(rustc_private)] diff --git a/tests/ui/process/nofile-limit.rs b/tests/ui/process/nofile-limit.rs index 3ddf8d6ef2405..dafc982607c1c 100644 --- a/tests/ui/process/nofile-limit.rs +++ b/tests/ui/process/nofile-limit.rs @@ -2,11 +2,11 @@ // with RLIMIT_NOFILE resource lowered to zero. Regression // test for issue #96621. // -// run-pass -// dont-check-compiler-stderr -// only-linux -// no-prefer-dynamic -// compile-flags: -Ctarget-feature=+crt-static -Crpath=no -Crelocation-model=static +//@ run-pass +//@ dont-check-compiler-stderr +//@ only-linux +//@ no-prefer-dynamic +//@ compile-flags: -Ctarget-feature=+crt-static -Crpath=no -Crelocation-model=static #![feature(exit_status_error)] #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs index 47c590ce2f015..bfbea280f0bce 100644 --- a/tests/ui/process/println-with-broken-pipe.rs +++ b/tests/ui/process/println-with-broken-pipe.rs @@ -1,11 +1,11 @@ -// run-pass -// check-run-results -// ignore-windows -// ignore-emscripten -// ignore-fuchsia -// ignore-horizon -// ignore-android -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ run-pass +//@ check-run-results +//@ ignore-windows +//@ ignore-emscripten +//@ ignore-fuchsia +//@ ignore-horizon +//@ ignore-android +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" // Test what the error message looks like when `println!()` panics because of // `std::io::ErrorKind::BrokenPipe` diff --git a/tests/ui/process/process-envs.rs b/tests/ui/process/process-envs.rs index f3a469791427d..6f8a591b7d46c 100644 --- a/tests/ui/process/process-envs.rs +++ b/tests/ui/process/process-envs.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'env' -// ignore-fuchsia no 'env' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'env' +//@ ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/tests/ui/process/process-exit.rs b/tests/ui/process/process-exit.rs index d193e073e7f07..7cf1f2bccc396 100644 --- a/tests/ui/process/process-exit.rs +++ b/tests/ui/process/process-exit.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::{self, Command, Stdio}; diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs index 7c2fc296bb028..0115dbd27ef66 100644 --- a/tests/ui/process/process-panic-after-fork.rs +++ b/tests/ui/process/process-panic-after-fork.rs @@ -1,11 +1,11 @@ -// run-pass -// no-prefer-dynamic -// ignore-wasm32-bare no libc -// ignore-windows -// ignore-sgx no libc -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no fork +//@ run-pass +//@ no-prefer-dynamic +//@ ignore-wasm32-bare no libc +//@ ignore-windows +//@ ignore-sgx no libc +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no fork #![feature(rustc_private)] #![feature(never_type)] diff --git a/tests/ui/process/process-remove-from-env.rs b/tests/ui/process/process-remove-from-env.rs index ad027d68588ff..abacccf5a8a44 100644 --- a/tests/ui/process/process-remove-from-env.rs +++ b/tests/ui/process/process-remove-from-env.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'env' -// ignore-fuchsia no 'env' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'env' +//@ ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs index 4f4db11911594..64d0bbc2b41f7 100644 --- a/tests/ui/process/process-sigpipe.rs +++ b/tests/ui/process/process-sigpipe.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(deprecated)] -// ignore-android since the dynamic linker sets a SIGPIPE handler (to do +//@ ignore-android since the dynamic linker sets a SIGPIPE handler (to do // a crash report) so inheritance is moot on the entire platform // libstd ignores SIGPIPE, and other libraries may set signal masks. @@ -13,9 +13,9 @@ // (instead of running forever), and that it does not print an error // message about a broken pipe. -// ignore-emscripten no threads support -// ignore-vxworks no 'sh' -// ignore-fuchsia no 'sh' +//@ ignore-emscripten no threads support +//@ ignore-vxworks no 'sh' +//@ ignore-fuchsia no 'sh' use std::process; use std::thread; diff --git a/tests/ui/process/process-spawn-nonexistent.rs b/tests/ui/process/process-spawn-nonexistent.rs index 9dd608986df16..2f45dace2f9c7 100644 --- a/tests/ui/process/process-spawn-nonexistent.rs +++ b/tests/ui/process/process-spawn-nonexistent.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia ErrorKind not translated +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia ErrorKind not translated use std::io::ErrorKind; use std::process::Command; diff --git a/tests/ui/process/process-spawn-with-unicode-params.rs b/tests/ui/process/process-spawn-with-unicode-params.rs index 16dba6292db98..26b3899df9684 100644 --- a/tests/ui/process/process-spawn-with-unicode-params.rs +++ b/tests/ui/process/process-spawn-with-unicode-params.rs @@ -1,5 +1,5 @@ -// run-pass -// no-prefer-dynamic +//@ run-pass +//@ no-prefer-dynamic // The test copies itself into a subdirectory with a non-ASCII name and then // runs it as a child process within the subdirectory. The parent process @@ -7,9 +7,9 @@ // non-ASCII characters. The child process ensures all the strings are // intact. -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Filesystem manipulation privileged +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Filesystem manipulation privileged use std::io::prelude::*; use std::io; diff --git a/tests/ui/process/process-status-inherits-stdin.rs b/tests/ui/process/process-status-inherits-stdin.rs index 7719dd9ad8557..210968a6ce54d 100644 --- a/tests/ui/process/process-status-inherits-stdin.rs +++ b/tests/ui/process/process-status-inherits-stdin.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io; diff --git a/tests/ui/process/signal-exit-status.rs b/tests/ui/process/signal-exit-status.rs index 0f05f916cb939..5efef8a612177 100644 --- a/tests/ui/process/signal-exit-status.rs +++ b/tests/ui/process/signal-exit-status.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-windows -// ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-windows +//@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) #![feature(core_intrinsics)] diff --git a/tests/ui/process/sigpipe-should-be-ignored.rs b/tests/ui/process/sigpipe-should-be-ignored.rs index 144eeca23184b..cd6bda2764688 100644 --- a/tests/ui/process/sigpipe-should-be-ignored.rs +++ b/tests/ui/process/sigpipe-should-be-ignored.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Be sure that when a SIGPIPE would have been received that the entire process // doesn't die in a ball of fire, but rather it's gracefully handled. -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/tls-exit-status.rs b/tests/ui/process/tls-exit-status.rs index 6296e5042d280..5a81c7708feaa 100644 --- a/tests/ui/process/tls-exit-status.rs +++ b/tests/ui/process/tls-exit-status.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:nonzero -// exec-env:RUST_NEWRT=1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:nonzero +//@ exec-env:RUST_NEWRT=1 +//@ ignore-emscripten no processes use std::env; diff --git a/tests/ui/process/try-wait.rs b/tests/ui/process/try-wait.rs index 692197210b15f..948ce63c76c2c 100644 --- a/tests/ui/process/try-wait.rs +++ b/tests/ui/process/try-wait.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(process_try_wait)] diff --git a/tests/ui/project-cache-issue-31849.rs b/tests/ui/project-cache-issue-31849.rs index 07fb6abaeace0..29c278171a61b 100644 --- a/tests/ui/project-cache-issue-31849.rs +++ b/tests/ui/project-cache-issue-31849.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #31849: the problem here was actually a performance // cliff, but I'm adding the test for reference. diff --git a/tests/ui/ptr-coercion-rpass.rs b/tests/ui/ptr-coercion-rpass.rs index 1c3ce33039e12..5d9b907f0e4a9 100644 --- a/tests/ui/ptr-coercion-rpass.rs +++ b/tests/ui/ptr-coercion-rpass.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test coercions between pointers which don't do anything fancy like unsizing. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { // &mut -> & diff --git a/tests/ui/ptr_ops/issue-80309-safe.rs b/tests/ui/ptr_ops/issue-80309-safe.rs index 8a4ff16694bdb..70c27c42adf80 100644 --- a/tests/ui/ptr_ops/issue-80309-safe.rs +++ b/tests/ui/ptr_ops/issue-80309-safe.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for issue #80309 diff --git a/tests/ui/ptr_ops/issue-80309.rs b/tests/ui/ptr_ops/issue-80309.rs index c13ce3c9cd2c1..c9b1af5540a17 100644 --- a/tests/ui/ptr_ops/issue-80309.rs +++ b/tests/ui/ptr_ops/issue-80309.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for issue #80309 diff --git a/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs b/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs index 7930964c83bfd..9eb8857e5e9fe 100644 --- a/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs +++ b/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] // genus is always capitalized diff --git a/tests/ui/pub/pub-ident-fn-2.fixed b/tests/ui/pub/pub-ident-fn-2.fixed index afd75a41f7b0f..d9da7374e620f 100644 --- a/tests/ui/pub/pub-ident-fn-2.fixed +++ b/tests/ui/pub/pub-ident-fn-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(_s: usize) { bar() } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-2.rs b/tests/ui/pub/pub-ident-fn-2.rs index e7b86a9098d16..4aeb72aef8c5b 100644 --- a/tests/ui/pub/pub-ident-fn-2.rs +++ b/tests/ui/pub/pub-ident-fn-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo(_s: usize) { bar() } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime.fixed b/tests/ui/pub/pub-ident-fn-with-lifetime.fixed index e510ace5fc14c..2c0d8849cdd63 100644 --- a/tests/ui/pub/pub-ident-fn-with-lifetime.fixed +++ b/tests/ui/pub/pub-ident-fn-with-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo<'a>(_s: &'a usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime.rs b/tests/ui/pub/pub-ident-fn-with-lifetime.rs index 63e6eca151600..8cdc152f163aa 100644 --- a/tests/ui/pub/pub-ident-fn-with-lifetime.rs +++ b/tests/ui/pub/pub-ident-fn-with-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo<'a>(_s: &'a usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn.fixed b/tests/ui/pub/pub-ident-fn.fixed index 65ed8c7b4dd7e..d2aea4e0690dc 100644 --- a/tests/ui/pub/pub-ident-fn.fixed +++ b/tests/ui/pub/pub-ident-fn.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(_s: usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn.rs b/tests/ui/pub/pub-ident-fn.rs index 2fe4d34fb228f..899ea82ccb7e7 100644 --- a/tests/ui/pub/pub-ident-fn.rs +++ b/tests/ui/pub/pub-ident-fn.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo(_s: usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-struct-4.fixed b/tests/ui/pub/pub-ident-struct-4.fixed index 71c6f0a699425..5fedbb7243749 100644 --- a/tests/ui/pub/pub-ident-struct-4.fixed +++ b/tests/ui/pub/pub-ident-struct-4.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct T(#[allow(dead_code)] String); //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct-4.rs b/tests/ui/pub/pub-ident-struct-4.rs index 971f39a8ce13e..5c721c25a7815 100644 --- a/tests/ui/pub/pub-ident-struct-4.rs +++ b/tests/ui/pub/pub-ident-struct-4.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub T(#[allow(dead_code)] String); //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct.fixed b/tests/ui/pub/pub-ident-struct.fixed index 58cde8fd6e0ca..3f0610cd765c2 100644 --- a/tests/ui/pub/pub-ident-struct.fixed +++ b/tests/ui/pub/pub-ident-struct.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct S { //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct.rs b/tests/ui/pub/pub-ident-struct.rs index 3930e556e9a9c..6d06c406f6c7e 100644 --- a/tests/ui/pub/pub-ident-struct.rs +++ b/tests/ui/pub/pub-ident-struct.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub S { //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/query-system/query_depth.rs b/tests/ui/query-system/query_depth.rs index e600c1c08e5cf..29514b58e2422 100644 --- a/tests/ui/query-system/query_depth.rs +++ b/tests/ui/query-system/query_depth.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![recursion_limit = "64"] type Byte = Option "long-type-hash" +//@ build-fail +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" //~^^^ ERROR overflow evaluating the requirement -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) fn main() { let mut iter = 0u8..1; diff --git a/tests/ui/recursion/issue-86784.rs b/tests/ui/recursion/issue-86784.rs index 34f4aaedb326f..05873ef13d76a 100644 --- a/tests/ui/recursion/issue-86784.rs +++ b/tests/ui/recursion/issue-86784.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let _temp_1 = 0; diff --git a/tests/ui/recursion/issue-95134.rs b/tests/ui/recursion/issue-95134.rs index 2f1cffa2fa907..cbf278861fafa 100644 --- a/tests/ui/recursion/issue-95134.rs +++ b/tests/ui/recursion/issue-95134.rs @@ -1,8 +1,8 @@ -// build-fail -// known-bug: #95134 -// compile-flags: -Copt-level=0 -// dont-check-failure-status -// dont-check-compiler-stderr +//@ build-fail +//@ known-bug: #95134 +//@ compile-flags: -Copt-level=0 +//@ dont-check-failure-status +//@ dont-check-compiler-stderr pub fn encode_num(n: u32, mut writer: Writer) -> Result<(), Writer::Error> { if n > 15 { diff --git a/tests/ui/recursion/recursion.rs b/tests/ui/recursion/recursion.rs index b3ba0ec3a2a01..074e9ed6947a8 100644 --- a/tests/ui/recursion/recursion.rs +++ b/tests/ui/recursion/recursion.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags:-C overflow-checks=off -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ compile-flags:-C overflow-checks=off +//@ normalize-stderr-test: ".nll/" -> "/" enum Nil {NilValue} struct Cons {head:isize, tail:T} diff --git a/tests/ui/recursion/recursive-reexports.rs b/tests/ui/recursion/recursive-reexports.rs index 0e17f22511818..26d15fb04734b 100644 --- a/tests/ui/recursion/recursive-reexports.rs +++ b/tests/ui/recursion/recursive-reexports.rs @@ -1,4 +1,4 @@ -// aux-build:recursive_reexports.rs +//@ aux-build:recursive_reexports.rs extern crate recursive_reexports; diff --git a/tests/ui/recursion_limit/issue-40003.rs b/tests/ui/recursion_limit/issue-40003.rs index 01a2aaffb9ef5..5032d0c9db3bc 100644 --- a/tests/ui/recursion_limit/issue-40003.rs +++ b/tests/ui/recursion_limit/issue-40003.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn main() { if false { test(); } diff --git a/tests/ui/recursion_limit/zero-overflow.rs b/tests/ui/recursion_limit/zero-overflow.rs index 77bd818567608..3887972a51623 100644 --- a/tests/ui/recursion_limit/zero-overflow.rs +++ b/tests/ui/recursion_limit/zero-overflow.rs @@ -1,6 +1,6 @@ //~ ERROR overflow evaluating the requirement `&mut Self: DispatchFromDyn<&mut RustaceansAreAwesome> //~| HELP consider increasing the recursion limit -// build-fail +//@ build-fail #![recursion_limit = "0"] diff --git a/tests/ui/reexport-test-harness-main.rs b/tests/ui/reexport-test-harness-main.rs index 2582975e219a6..f79828fc7d666 100644 --- a/tests/ui/reexport-test-harness-main.rs +++ b/tests/ui/reexport-test-harness-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![reexport_test_harness_main = "test_main"] diff --git a/tests/ui/regions/closure-in-projection-issue-97405.rs b/tests/ui/regions/closure-in-projection-issue-97405.rs index 5489533972e73..fd73e480865a5 100644 --- a/tests/ui/regions/closure-in-projection-issue-97405.rs +++ b/tests/ui/regions/closure-in-projection-issue-97405.rs @@ -3,8 +3,8 @@ // but we should be able to prove ` as Iterator>::Item: 'static` without // requiring `T: 'static` -// edition:2018 -// check-fail +//@ edition:2018 +//@ check-fail fn opaque(_: F) -> impl Iterator { b"".iter() } diff --git a/tests/ui/regions/forall-wf-reflexive.rs b/tests/ui/regions/forall-wf-reflexive.rs index 8e6b8224b3186..3748ee2b8cc8f 100644 --- a/tests/ui/regions/forall-wf-reflexive.rs +++ b/tests/ui/regions/forall-wf-reflexive.rs @@ -1,7 +1,7 @@ // Test that we consider `for<'a> T: 'a` to be sufficient to prove // that `for<'a> T: 'a`. // -// check-pass +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/regions/init-res-into-things.rs b/tests/ui/regions/init-res-into-things.rs index 7f416262dcb8c..64909b329199e 100644 --- a/tests/ui/regions/init-res-into-things.rs +++ b/tests/ui/regions/init-res-into-things.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/regions/issue-102374.rs b/tests/ui/regions/issue-102374.rs index fd71248d9cb45..db2b38334b5db 100644 --- a/tests/ui/regions/issue-102374.rs +++ b/tests/ui/regions/issue-102374.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" use std::cell::Cell; #[rustfmt::skip] diff --git a/tests/ui/regions/issue-11612.rs b/tests/ui/regions/issue-11612.rs index 9f7f1cc6fc7db..b95229ffa4a00 100644 --- a/tests/ui/regions/issue-11612.rs +++ b/tests/ui/regions/issue-11612.rs @@ -1,10 +1,10 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // #11612 // We weren't updating the auto adjustments with all the resolved // type information after type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } } diff --git a/tests/ui/regions/issue-21520.rs b/tests/ui/regions/issue-21520.rs index ab4ac7237c787..4f92109ab90a6 100644 --- a/tests/ui/regions/issue-21520.rs +++ b/tests/ui/regions/issue-21520.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that the requirement (in `Bar`) that `T::Bar : 'static` does // not wind up propagating to `T`. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type Bar; diff --git a/tests/ui/regions/issue-24085.rs b/tests/ui/regions/issue-24085.rs index 86e94beb7e255..a45ea9a87a7b2 100644 --- a/tests/ui/regions/issue-24085.rs +++ b/tests/ui/regions/issue-24085.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #24085. Errors were occurring in region // inference due to the requirement that `'a:b'`, which was getting diff --git a/tests/ui/regions/issue-26448-1.rs b/tests/ui/regions/issue-26448-1.rs index 7d2d75bf2e878..0fa40709a7b95 100644 --- a/tests/ui/regions/issue-26448-1.rs +++ b/tests/ui/regions/issue-26448-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { fn foo(self) -> T; diff --git a/tests/ui/regions/issue-26448-2.rs b/tests/ui/regions/issue-26448-2.rs index c60e06c3ceb35..5fd1e90ebfd96 100644 --- a/tests/ui/regions/issue-26448-2.rs +++ b/tests/ui/regions/issue-26448-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Bar { items: Vec<&'static str>, diff --git a/tests/ui/regions/issue-26448-3.rs b/tests/ui/regions/issue-26448-3.rs index d48022c09fee3..8b6dfb0ed40e6 100644 --- a/tests/ui/regions/issue-26448-3.rs +++ b/tests/ui/regions/issue-26448-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Item { _inner: &'static str, diff --git a/tests/ui/regions/issue-5243.rs b/tests/ui/regions/issue-5243.rs index c511d45f02de4..a346903d6525e 100644 --- a/tests/ui/regions/issue-5243.rs +++ b/tests/ui/regions/issue-5243.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that merely having lifetime parameters is not // enough for codegen to consider this as non-monomorphic, // which led to various assertions and failures in turn. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S<'a> { v: &'a isize diff --git a/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs b/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs index a8f7a41c44284..601ef577079c3 100644 --- a/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs +++ b/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs @@ -8,7 +8,7 @@ // follow the same lifetime-elision rules used elsewhere. See // rust-lang/rust#56537 -// check-pass +//@ check-pass fn willy_no_annot<'w>(p: &'w str, q: &str) -> &'w str { let free_dumb = |_x| { p }; // no type annotation at all diff --git a/tests/ui/regions/issue-6157.rs b/tests/ui/regions/issue-6157.rs index b7a44ed862395..03a8c14e1a625 100644 --- a/tests/ui/regions/issue-6157.rs +++ b/tests/ui/regions/issue-6157.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait OpInt { fn call(&mut self, _: isize, _: isize) -> isize; } diff --git a/tests/ui/regions/issue-72051-member-region-hang.rs b/tests/ui/regions/issue-72051-member-region-hang.rs index b7340b79d682a..c27d3ccbb9d12 100644 --- a/tests/ui/regions/issue-72051-member-region-hang.rs +++ b/tests/ui/regions/issue-72051-member-region-hang.rs @@ -1,7 +1,7 @@ // Regression test for #72051, hang when resolving regions. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 pub async fn query<'a>(_: &(), _: &(), _: (&(dyn std::any::Any + 'a),) ) {} fn main() {} diff --git a/tests/ui/regions/issue-78262.rs b/tests/ui/regions/issue-78262.rs index 642dbd7f821cf..d31b847997eb3 100644 --- a/tests/ui/regions/issue-78262.rs +++ b/tests/ui/regions/issue-78262.rs @@ -1,6 +1,6 @@ -// revisions: base polonius -// ignore-compare-mode-polonius -// [polonius] compile-flags: -Z polonius +//@ revisions: base polonius +//@ ignore-compare-mode-polonius +//@ [polonius] compile-flags: -Z polonius trait TT {} diff --git a/tests/ui/regions/owned-implies-static.rs b/tests/ui/regions/owned-implies-static.rs index 2efa8cc02f425..d97e2f2d239b8 100644 --- a/tests/ui/regions/owned-implies-static.rs +++ b/tests/ui/regions/owned-implies-static.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_x: T) {} diff --git a/tests/ui/regions/rcvr-borrowed-to-region.rs b/tests/ui/regions/rcvr-borrowed-to-region.rs index 7f32b8b91a6f0..7cda692772dfe 100644 --- a/tests/ui/regions/rcvr-borrowed-to-region.rs +++ b/tests/ui/regions/rcvr-borrowed-to-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs b/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs index 72d82da45344e..eec81921f1cee 100644 --- a/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs +++ b/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs @@ -1,7 +1,7 @@ // Test related to #22779. In this case, the impl is an inherent impl, // so it doesn't have to match any trait, so no error results. -// check-pass +//@ check-pass #![allow(dead_code)] struct MySlice<'a, T:'a>(&'a mut [T]); diff --git a/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs b/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs index 68056370c4489..e3c1f0efaf00a 100644 --- a/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs +++ b/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs @@ -1,7 +1,7 @@ // Test related to #22779, but where the `'a:'b` relation // appears in the trait too. No error here. -// check-pass +//@ check-pass trait Tr<'a, T> { fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b; diff --git a/tests/ui/regions/region-invariant-static-error-reporting.rs b/tests/ui/regions/region-invariant-static-error-reporting.rs index c8288b5923cf2..9ab46a7757897 100644 --- a/tests/ui/regions/region-invariant-static-error-reporting.rs +++ b/tests/ui/regions/region-invariant-static-error-reporting.rs @@ -3,7 +3,7 @@ // over time, but this test used to exhibit some pretty bogus messages // that were not remotely helpful. -// error-pattern:argument requires that `'a` must outlive `'static` +//@ error-pattern:argument requires that `'a` must outlive `'static` struct Invariant<'a>(Option<&'a mut &'a mut ()>); diff --git a/tests/ui/regions/region-object-lifetime-1.rs b/tests/ui/regions/region-object-lifetime-1.rs index ddf3be690dd79..11e3c8a1a3328 100644 --- a/tests/ui/regions/region-object-lifetime-1.rs +++ b/tests/ui/regions/region-object-lifetime-1.rs @@ -1,7 +1,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -// check-pass +//@ check-pass #![allow(warnings)] trait Foo { diff --git a/tests/ui/regions/region-object-lifetime-3.rs b/tests/ui/regions/region-object-lifetime-3.rs index 0536fa2a20f45..ddeeec902f10f 100644 --- a/tests/ui/regions/region-object-lifetime-3.rs +++ b/tests/ui/regions/region-object-lifetime-3.rs @@ -1,7 +1,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -// check-pass +//@ check-pass #![allow(warnings)] trait Foo { 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 4221ebfdffb2b..bd3d4a1acdc4e 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,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Point { x: isize, diff --git a/tests/ui/regions/regions-addr-of-ret.rs b/tests/ui/regions/regions-addr-of-ret.rs index e5dcd6db033f3..bf95709848fb1 100644 --- a/tests/ui/regions/regions-addr-of-ret.rs +++ b/tests/ui/regions/regions-addr-of-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: &isize) -> &isize { return &*x; } diff --git a/tests/ui/regions/regions-assoc-type-region-bound.rs b/tests/ui/regions/regions-assoc-type-region-bound.rs index cbb7d1726d9e1..1b7fdf112515e 100644 --- a/tests/ui/regions/regions-assoc-type-region-bound.rs +++ b/tests/ui/regions/regions-assoc-type-region-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the compiler considers the 'a bound declared in the // trait. Issue #20890. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo<'a> { type Value: 'a; diff --git a/tests/ui/regions/regions-assoc-type-static-bound.rs b/tests/ui/regions/regions-assoc-type-static-bound.rs index 1458787ea65a3..9ffc66d284d2e 100644 --- a/tests/ui/regions/regions-assoc-type-static-bound.rs +++ b/tests/ui/regions/regions-assoc-type-static-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the compiler considers the 'static bound declared in the // trait. Issue #20890. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type Value: 'static; diff --git a/tests/ui/regions/regions-borrow-at.rs b/tests/ui/regions/regions-borrow-at.rs index 152abe109bca4..66b56a6aee501 100644 --- a/tests/ui/regions/regions-borrow-at.rs +++ b/tests/ui/regions/regions-borrow-at.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> usize { *x diff --git a/tests/ui/regions/regions-borrow-evec-fixed.rs b/tests/ui/regions/regions-borrow-evec-fixed.rs index ed828312b46d8..67e2c509f5354 100644 --- a/tests/ui/regions/regions-borrow-evec-fixed.rs +++ b/tests/ui/regions/regions-borrow-evec-fixed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &[isize]) -> isize { x[0] diff --git a/tests/ui/regions/regions-borrow-evec-uniq.rs b/tests/ui/regions/regions-borrow-evec-uniq.rs index bbf7ba79e2a64..f1679a5ea66a7 100644 --- a/tests/ui/regions/regions-borrow-evec-uniq.rs +++ b/tests/ui/regions/regions-borrow-evec-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &[isize]) -> isize { diff --git a/tests/ui/regions/regions-borrow-uniq.rs b/tests/ui/regions/regions-borrow-uniq.rs index adc6b1939da7f..7c56828bf6870 100644 --- a/tests/ui/regions/regions-borrow-uniq.rs +++ b/tests/ui/regions/regions-borrow-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> usize { *x diff --git a/tests/ui/regions/regions-bot.rs b/tests/ui/regions/regions-bot.rs index 580162936401f..f8fb995c83e2e 100644 --- a/tests/ui/regions/regions-bot.rs +++ b/tests/ui/regions/regions-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A very limited test of the "bottom" region 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 2c75037993325..f4f27a4456dfb 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 +//@ run-pass #![allow(dead_code)] #![allow(stable_features)] diff --git a/tests/ui/regions/regions-bound-lists-feature-gate.rs b/tests/ui/regions/regions-bound-lists-feature-gate.rs index 3815498f86fbb..1bc2b7dd03efc 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs index c014b2ccf1e40..33026803c8171 100644 --- a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs +++ b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:rbmtp_cross_crate_lib.rs +//@ aux-build:rbmtp_cross_crate_lib.rs // Check explicit region bounds on methods in the cross crate case. diff --git a/tests/ui/regions/regions-close-over-type-parameter-successfully.rs b/tests/ui/regions/regions-close-over-type-parameter-successfully.rs index 48aad9481bbea..8662fa381c43c 100644 --- a/tests/ui/regions/regions-close-over-type-parameter-successfully.rs +++ b/tests/ui/regions/regions-close-over-type-parameter-successfully.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A test where we (successfully) close over a reference into // an object. diff --git a/tests/ui/regions/regions-copy-closure.rs b/tests/ui/regions/regions-copy-closure.rs index 43640079777a3..7465f7424e38c 100644 --- a/tests/ui/regions/regions-copy-closure.rs +++ b/tests/ui/regions/regions-copy-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct closure_box<'a> { diff --git a/tests/ui/regions/regions-creating-enums2.rs b/tests/ui/regions/regions-creating-enums2.rs index 7b16fb1a8e081..b81344cceecbf 100644 --- a/tests/ui/regions/regions-creating-enums2.rs +++ b/tests/ui/regions/regions-creating-enums2.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ast<'a> { num(usize), diff --git a/tests/ui/regions/regions-creating-enums5.rs b/tests/ui/regions/regions-creating-enums5.rs index ad3d9748bf0a6..55793fb620299 100644 --- a/tests/ui/regions/regions-creating-enums5.rs +++ b/tests/ui/regions/regions-creating-enums5.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ast<'a> { num(usize), diff --git a/tests/ui/regions/regions-debruijn-of-object.rs b/tests/ui/regions/regions-debruijn-of-object.rs index 0b5510489fb45..04bedf18ef08b 100644 --- a/tests/ui/regions/regions-debruijn-of-object.rs +++ b/tests/ui/regions/regions-debruijn-of-object.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct ctxt<'tcx> { x: &'tcx i32 diff --git a/tests/ui/regions/regions-dependent-addr-of.rs b/tests/ui/regions/regions-dependent-addr-of.rs index a6cb56e3156d4..12fc38a02f72d 100644 --- a/tests/ui/regions/regions-dependent-addr-of.rs +++ b/tests/ui/regions/regions-dependent-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. diff --git a/tests/ui/regions/regions-dependent-autofn.rs b/tests/ui/regions/regions-dependent-autofn.rs index 246dbb5563c1c..ccbb1219ce271 100644 --- a/tests/ui/regions/regions-dependent-autofn.rs +++ b/tests/ui/regions/regions-dependent-autofn.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn subslice(v: F) -> F where F: FnOnce() { v } diff --git a/tests/ui/regions/regions-dependent-autoslice.rs b/tests/ui/regions/regions-dependent-autoslice.rs index 4c5b35ec45590..3672b99151d3e 100644 --- a/tests/ui/regions/regions-dependent-autoslice.rs +++ b/tests/ui/regions/regions-dependent-autoslice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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 94e3df4b3f1e8..f3127abafb7a9 100644 --- a/tests/ui/regions/regions-dependent-let-ref.rs +++ b/tests/ui/regions/regions-dependent-let-ref.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we take reference // to interior. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo(isize); pub fn main() { 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 fe50a7dd1be33..1b6c3c933771a 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 +//@ run-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 @@ -6,7 +6,7 @@ // lifetime parameters must be early bound in the type of the // associated item. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/regions/regions-early-bound-trait-param.rs b/tests/ui/regions/regions-early-bound-trait-param.rs index a28bd14ba88f6..6d77d323b8009 100644 --- a/tests/ui/regions/regions-early-bound-trait-param.rs +++ b/tests/ui/regions/regions-early-bound-trait-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use an early-bound lifetime parameter as // on of the generic parameters in a trait. diff --git a/tests/ui/regions/regions-early-bound-used-in-bound-method.rs b/tests/ui/regions/regions-early-bound-used-in-bound-method.rs index a778dae1ed315..3510d4ce939c6 100644 --- a/tests/ui/regions/regions-early-bound-used-in-bound-method.rs +++ b/tests/ui/regions/regions-early-bound-used-in-bound-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-early-bound-used-in-bound.rs b/tests/ui/regions/regions-early-bound-used-in-bound.rs index 6ccc99e845db7..693d6b71b27e5 100644 --- a/tests/ui/regions/regions-early-bound-used-in-bound.rs +++ b/tests/ui/regions/regions-early-bound-used-in-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-early-bound-used-in-type-param.rs b/tests/ui/regions/regions-early-bound-used-in-type-param.rs index d58c17ad9c8d5..24e5404c2970d 100644 --- a/tests/ui/regions/regions-early-bound-used-in-type-param.rs +++ b/tests/ui/regions/regions-early-bound-used-in-type-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-escape-into-other-fn.rs b/tests/ui/regions/regions-escape-into-other-fn.rs index 65f4c1b6a6487..95cdb2de8d530 100644 --- a/tests/ui/regions/regions-escape-into-other-fn.rs +++ b/tests/ui/regions/regions-escape-into-other-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> &usize { x } fn bar(x: &usize) -> usize { *x } diff --git a/tests/ui/regions/regions-expl-self.rs b/tests/ui/regions/regions-expl-self.rs index f7315d628a57e..812201d7e52a6 100644 --- a/tests/ui/regions/regions-expl-self.rs +++ b/tests/ui/regions/regions-expl-self.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that you can insert an explicit lifetime in explicit self. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { f: usize diff --git a/tests/ui/regions/regions-fn-subtyping-2.rs b/tests/ui/regions/regions-fn-subtyping-2.rs index 83949ddba3d1e..f5332ac12809f 100644 --- a/tests/ui/regions/regions-fn-subtyping-2.rs +++ b/tests/ui/regions/regions-fn-subtyping-2.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #2263. // Here, `f` is a function that takes a pointer `x` and a function // `g`, where `g` requires its argument `y` to be in the same region // that `x` is in. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn has_same_region(f: Box FnMut(&'a isize, Box)>) { // `f` should be the type that `wants_same_region` wants, but diff --git a/tests/ui/regions/regions-fn-subtyping-return-static.rs b/tests/ui/regions/regions-fn-subtyping-return-static.rs index de14d5ba82a1b..dda1f129a3352 100644 --- a/tests/ui/regions/regions-fn-subtyping-return-static.rs +++ b/tests/ui/regions/regions-fn-subtyping-return-static.rs @@ -6,7 +6,7 @@ // This can safely be considered to be an instance of `F` because all // lifetimes are sublifetimes of 'static. // -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-fn-subtyping.rs b/tests/ui/regions/regions-fn-subtyping.rs index 9570359c69e31..7e264eb03d836 100644 --- a/tests/ui/regions/regions-fn-subtyping.rs +++ b/tests/ui/regions/regions-fn-subtyping.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] // Issue #2263. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs index 46462c432a8c7..f6a628e97f56d 100644 --- a/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs +++ b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we recognize that if you have // diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs index a481a9cc5fe8e..6a15d3206eee3 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that is // enough to conclude that `T::Foo: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs index a627cbbd88f18..a183639ac3a55 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T::Foo: 'x`, and that // is (naturally) enough to conclude that `T::Foo: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs index 5158c2893404d..cd8fe6b7042b9 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that // is (naturally) enough to conclude that `T: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs b/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs index 5d8ad932ed61c..c46396dfbd6a2 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/regions/regions-infer-borrow-scope-view.rs b/tests/ui/regions/regions-infer-borrow-scope-view.rs index 349b5204434d3..0f0c2f6cd6527 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-view.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-view.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn view(x: &[T]) -> &[T] {x} diff --git a/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs b/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs index dca26742dacc5..5134256a893f1 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn borrow(x: &T) -> &T {x} diff --git a/tests/ui/regions/regions-infer-borrow-scope.rs b/tests/ui/regions/regions-infer-borrow-scope.rs index b4a050bf1ede0..2f25d0010833b 100644 --- a/tests/ui/regions/regions-infer-borrow-scope.rs +++ b/tests/ui/regions/regions-infer-borrow-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Point {x: isize, y: isize} diff --git a/tests/ui/regions/regions-infer-call-2.rs b/tests/ui/regions/regions-infer-call-2.rs index a288d2e4d6e01..4f3ec222c8258 100644 --- a/tests/ui/regions/regions-infer-call-2.rs +++ b/tests/ui/regions/regions-infer-call-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn takes_two(x: &isize, y: &isize) -> isize { *x + *y } diff --git a/tests/ui/regions/regions-infer-call.rs b/tests/ui/regions/regions-infer-call.rs index 248f9e923d32a..ad48f3aa93a36 100644 --- a/tests/ui/regions/regions-infer-call.rs +++ b/tests/ui/regions/regions-infer-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn takes_two(x: &isize, y: &isize) -> isize { *x + *y } diff --git a/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs b/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs index fbd89501559b7..1b9379fd8c867 100644 --- a/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs +++ b/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] 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 31a48b4adcfaf..f5d28a281541b 100644 --- a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs +++ b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a,'b>(x: &'a &'b mut isize) -> &'a isize { let y = &*x; // should be inferred to have type &'a &'b mut isize... diff --git a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs index 6aa5d8217a466..165a246935f97 100644 --- a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs +++ b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_camel_case_types)] @@ -6,7 +6,7 @@ // check that the &isize here does not cause us to think that `foo` // contains region pointers -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct foo(Box); diff --git a/tests/ui/regions/regions-infer-static-from-proc.rs b/tests/ui/regions/regions-infer-static-from-proc.rs index 39501e2d697a3..9a130808ae8df 100644 --- a/tests/ui/regions/regions-infer-static-from-proc.rs +++ b/tests/ui/regions/regions-infer-static-from-proc.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Check that the 'static bound on a proc influences lifetimes of // region variables contained within (otherwise, region inference will // give `x` a very short lifetime). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static i: usize = 3; fn foo(_: F) {} diff --git a/tests/ui/regions/regions-issue-21422.rs b/tests/ui/regions/regions-issue-21422.rs index 198b714664789..54beed9b3ac2b 100644 --- a/tests/ui/regions/regions-issue-21422.rs +++ b/tests/ui/regions/regions-issue-21422.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct P<'a> { _ptr: *const &'a u8, diff --git a/tests/ui/regions/regions-issue-22246.rs b/tests/ui/regions/regions-issue-22246.rs index 0858833678bfa..e3bf7b31205cb 100644 --- a/tests/ui/regions/regions-issue-22246.rs +++ b/tests/ui/regions/regions-issue-22246.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Regression test for issue #22246 -- we should be able to deduce // that `&'a B::Owned` implies that `B::Owned : 'a`. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs index 3852a14d9f98e..ee29f44ecc99e 100644 --- a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs +++ b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for the ICE from issue #10846. // // The original issue causing the ICE: the LUB-computations during @@ -13,7 +13,7 @@ // doing region-folding, when really all clients of the region-folding // case only want to see FREE lifetime variables, not bound ones. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { fn explicit() { diff --git a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs index 2c455fc35634f..68daf2893efad 100644 --- a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs +++ b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test verifies that temporary lifetime is correctly computed // for static objects in enclosing scopes. diff --git a/tests/ui/regions/regions-link-fn-args.rs b/tests/ui/regions/regions-link-fn-args.rs index 231407b226ee9..5fed86d504870 100644 --- a/tests/ui/regions/regions-link-fn-args.rs +++ b/tests/ui/regions/regions-link-fn-args.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that region inference correctly links up the regions when a // `ref` borrow occurs inside a fn argument. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/regions/regions-lub-ref-ref-rc.rs b/tests/ui/regions/regions-lub-ref-ref-rc.rs index 96c71b084b13e..d20bc73940671 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 +//@ run-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 d5c93f81fd84d..4cdbc680e6fc9 100644 --- a/tests/ui/regions/regions-mock-codegen.rs +++ b/tests/ui/regions/regions-mock-codegen.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(allocator_api)] use std::alloc::{handle_alloc_error, Allocator, Global, Layout}; diff --git a/tests/ui/regions/regions-name-undeclared.rs b/tests/ui/regions/regions-name-undeclared.rs index 7b6ede19341b4..e4779a1853daa 100644 --- a/tests/ui/regions/regions-name-undeclared.rs +++ b/tests/ui/regions/regions-name-undeclared.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Check that lifetime resolver enforces the lifetime name scoping // rules correctly in various scenarios. 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 aafab5d86b865..2c02ce670b944 100644 --- a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs +++ b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/regions/regions-no-variance-from-fn-generics.rs b/tests/ui/regions/regions-no-variance-from-fn-generics.rs index a455d4efd71b5..e53d7e9da60e7 100644 --- a/tests/ui/regions/regions-no-variance-from-fn-generics.rs +++ b/tests/ui/regions/regions-no-variance-from-fn-generics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Issue #12856: a lifetime formal binding introduced by a generic fn // should not upset the variance inference for actual occurrences of diff --git a/tests/ui/regions/regions-nullary-variant.rs b/tests/ui/regions/regions-nullary-variant.rs index 82470af82faf3..8fe0a97c61c8f 100644 --- a/tests/ui/regions/regions-nullary-variant.rs +++ b/tests/ui/regions/regions-nullary-variant.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum roption<'a> { a, b(&'a usize) diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs index 15deaba5638aa..3d4a305078843 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs index 7767c13c825b3..2e0d1b36ca59e 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs index 37415994210cd..baf7874bc1a61 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs index 2e7f198d8c7c2..b8392c967b10a 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs index 45155c7216603..6a50248cb70b0 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs index bba8b24452496..17564bcbf269f 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs index 220d2e83cc0a6..33961de7d6a45 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs index 9ddcdb649d8dd..c5238086fc05d 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-projection-hrtype.rs b/tests/ui/regions/regions-outlives-projection-hrtype.rs index 5f9700df1cbd6..0fd634125d51a 100644 --- a/tests/ui/regions/regions-outlives-projection-hrtype.rs +++ b/tests/ui/regions/regions-outlives-projection-hrtype.rs @@ -5,7 +5,7 @@ // `'r` is bound, that leads to badness. This test checks that // everything works. -// check-pass +//@ check-pass #![allow(dead_code)] trait TheTrait { diff --git a/tests/ui/regions/regions-outlives-projection-trait-def.rs b/tests/ui/regions/regions-outlives-projection-trait-def.rs index 5c37a585a40b1..a67fe8c2d5008 100644 --- a/tests/ui/regions/regions-outlives-projection-trait-def.rs +++ b/tests/ui/regions/regions-outlives-projection-trait-def.rs @@ -1,7 +1,7 @@ // Test that `>::Type: 'b`, where `trait Foo<'a> { Type: // 'a; }`, does not require that `F: 'b`. -// check-pass +//@ check-pass #![allow(dead_code)] trait SomeTrait<'a> { diff --git a/tests/ui/regions/regions-outlives-scalar.rs b/tests/ui/regions/regions-outlives-scalar.rs index ce34ffcc85815..9e507eaf4dc5c 100644 --- a/tests/ui/regions/regions-outlives-scalar.rs +++ b/tests/ui/regions/regions-outlives-scalar.rs @@ -1,7 +1,7 @@ // Test that scalar values outlive all regions. // Rule OutlivesScalar from RFC 1214. -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo<'a> { diff --git a/tests/ui/regions/regions-params.rs b/tests/ui/regions/regions-params.rs index 04f3b8eaf57f3..46d5ac21b360d 100644 --- a/tests/ui/regions/regions-params.rs +++ b/tests/ui/regions/regions-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] diff --git a/tests/ui/regions/regions-reassign-let-bound-pointer.rs b/tests/ui/regions/regions-reassign-let-bound-pointer.rs index 948b11e0f3023..d2f35973511a8 100644 --- a/tests/ui/regions/regions-reassign-let-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-let-bound-pointer.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: &isize) { let a = 1; diff --git a/tests/ui/regions/regions-reassign-match-bound-pointer.rs b/tests/ui/regions/regions-reassign-match-bound-pointer.rs index ca52659c4db14..5e69396aa37f6 100644 --- a/tests/ui/regions/regions-reassign-match-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-match-bound-pointer.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: &isize) { let a = 1; diff --git a/tests/ui/regions/regions-refcell.rs b/tests/ui/regions/regions-refcell.rs index 39ad0c53f1e98..29eb5161a6c37 100644 --- a/tests/ui/regions/regions-refcell.rs +++ b/tests/ui/regions/regions-refcell.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for something that only came up while // attempting to bootstrap librustc with new destructor lifetime // semantics. diff --git a/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs index b1bdb813ac6aa..8218af6bcffd3 100644 --- a/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs +++ b/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that this fairly specialized, but also reasonable, pattern // typechecks. The pattern involves regions bound in closures that diff --git a/tests/ui/regions/regions-return-interior-of-option.rs b/tests/ui/regions/regions-return-interior-of-option.rs index 2dc91ec84f556..f46d926bcf492 100644 --- a/tests/ui/regions/regions-return-interior-of-option.rs +++ b/tests/ui/regions/regions-return-interior-of-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn get(opt: &Option) -> &T { match *opt { diff --git a/tests/ui/regions/regions-scope-chain-example.rs b/tests/ui/regions/regions-scope-chain-example.rs index 2beb20add32e0..01ce04b63d065 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // This is an example where the older inference algorithm failed. The @@ -9,7 +9,7 @@ // wrong path. The new algorithm avoids this problem and hence this // example typechecks correctly. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ScopeChain<'a> { Link(Scope<'a>), diff --git a/tests/ui/regions/regions-self-impls.rs b/tests/ui/regions/regions-self-impls.rs index 80b88568e42a1..2a31a5f904c81 100644 --- a/tests/ui/regions/regions-self-impls.rs +++ b/tests/ui/regions/regions-self-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct Clam<'a> { diff --git a/tests/ui/regions/regions-self-in-enums.rs b/tests/ui/regions/regions-self-in-enums.rs index c2e4b2ff10dfe..ff924b2866d8c 100644 --- a/tests/ui/regions/regions-self-in-enums.rs +++ b/tests/ui/regions/regions-self-in-enums.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-simple.rs b/tests/ui/regions/regions-simple.rs index fff1b47f53fd6..fdf827956667a 100644 --- a/tests/ui/regions/regions-simple.rs +++ b/tests/ui/regions/regions-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x: isize = 3; let y: &mut isize = &mut x; diff --git a/tests/ui/regions/regions-static-bound-rpass.rs b/tests/ui/regions/regions-static-bound-rpass.rs index e2ebb394d0ad2..27da42882f3a6 100644 --- a/tests/ui/regions/regions-static-bound-rpass.rs +++ b/tests/ui/regions/regions-static-bound-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(unused_lifetimes)] diff --git a/tests/ui/regions/regions-static-closure.rs b/tests/ui/regions/regions-static-closure.rs index 09cd56220323d..b2b998a4c36bb 100644 --- a/tests/ui/regions/regions-static-closure.rs +++ b/tests/ui/regions/regions-static-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct closure_box<'a> { diff --git a/tests/ui/regions/regions-trait-1.rs b/tests/ui/regions/regions-trait-1.rs index b6dab1c32e8b2..af6203262f220 100644 --- a/tests/ui/regions/regions-trait-1.rs +++ b/tests/ui/regions/regions-trait-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Ctxt { v: usize, diff --git a/tests/ui/regions/regions-trait-object-1.rs b/tests/ui/regions/regions-trait-object-1.rs index e2520d978908d..30932239d8a2a 100644 --- a/tests/ui/regions/regions-trait-object-1.rs +++ b/tests/ui/regions/regions-trait-object-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for something that only came up while // attempting to bootstrap librustc_ast; it is adapted from // `rustc_ast::ext::tt::generic_extension`. diff --git a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs index e6377867018c0..b177f3a011042 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that a type which is contravariant with respect to its region @@ -7,7 +7,7 @@ // Note: see ui/variance/variance-regions-*.rs for the tests that check that the // variance inference works in the first place. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Contravariant<'a> { f: &'a isize diff --git a/tests/ui/regions/regions-variance-covariant-use-covariant.rs b/tests/ui/regions/regions-variance-covariant-use-covariant.rs index c5c80ce54f12f..bd5959df2e1e2 100644 --- a/tests/ui/regions/regions-variance-covariant-use-covariant.rs +++ b/tests/ui/regions/regions-variance-covariant-use-covariant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that a type which is covariant with respect to its region // parameter is successful when used in a covariant way. @@ -9,7 +9,7 @@ // This is covariant with respect to 'a, meaning that // Covariant<'foo> <: Covariant<'static> because // 'foo <= 'static -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Covariant<'a> { f: extern "Rust" fn(&'a isize) diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs index 5ae5ebb450e84..9a61bc8ed6d61 100644 --- a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs +++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs @@ -1,7 +1,7 @@ // Regression test for #74429, where we didn't think that a type parameter // outlived `ReEmpty`. -// check-pass +//@ check-pass use std::marker::PhantomData; use std::ptr::NonNull; diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs index 0c1e931444162..2e112099a50d3 100644 --- a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs +++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs @@ -1,7 +1,7 @@ // Regression test for #74429, where we didn't think that a type parameter // outlived `ReEmpty`. -// check-pass +//@ check-pass #![allow(dropping_copy_types)] 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 7c4dd3ec84f6c..caa265b4ea281 100644 --- a/tests/ui/regions/wf-bound-region-in-object-type.rs +++ b/tests/ui/regions/wf-bound-region-in-object-type.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that the `wf` checker properly handles bound regions in object // types. Compiling this code used to trigger an ICE. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Context<'tcx> { vec: &'tcx Vec diff --git a/tests/ui/reify-intrinsic.rs b/tests/ui/reify-intrinsic.rs index 9eb2f724017ed..00398d272beeb 100644 --- a/tests/ui/reify-intrinsic.rs +++ b/tests/ui/reify-intrinsic.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(core_intrinsics, intrinsics)] diff --git a/tests/ui/removing-extern-crate.fixed b/tests/ui/removing-extern-crate.fixed index 8dbd0395b97bd..477161fba804d 100644 --- a/tests/ui/removing-extern-crate.fixed +++ b/tests/ui/removing-extern-crate.fixed @@ -1,7 +1,7 @@ -// edition:2018 -// aux-build:removing-extern-crate.rs -// run-rustfix -// check-pass +//@ edition:2018 +//@ aux-build:removing-extern-crate.rs +//@ run-rustfix +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/removing-extern-crate.rs b/tests/ui/removing-extern-crate.rs index 465e1360c2ad1..0b819482c7101 100644 --- a/tests/ui/removing-extern-crate.rs +++ b/tests/ui/removing-extern-crate.rs @@ -1,7 +1,7 @@ -// edition:2018 -// aux-build:removing-extern-crate.rs -// run-rustfix -// check-pass +//@ edition:2018 +//@ aux-build:removing-extern-crate.rs +//@ run-rustfix +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/repeat-expr/infer.rs b/tests/ui/repeat-expr/infer.rs index 8197713b97ed0..eb47b5f462f9c 100644 --- a/tests/ui/repeat-expr/infer.rs +++ b/tests/ui/repeat-expr/infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Default)] struct MaybeCopy(T); diff --git a/tests/ui/repeat-expr/repeat-expr-in-static.rs b/tests/ui/repeat-expr/repeat-expr-in-static.rs index 0b8953793307a..b6e619788849b 100644 --- a/tests/ui/repeat-expr/repeat-expr-in-static.rs +++ b/tests/ui/repeat-expr/repeat-expr-in-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: [isize; 4] = [32; 4]; static BAR: [isize; 4] = [32, 32, 32, 32]; diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs index 987fd455fcc09..2509416ad87d4 100644 --- a/tests/ui/repr/16-bit-repr-c-enum.rs +++ b/tests/ui/repr/16-bit-repr-c-enum.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: avr msp430 +//@ build-pass +//@ revisions: avr msp430 // -// [avr] needs-llvm-components: avr -// [avr] compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib -// [msp430] needs-llvm-components: msp430 -// [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib +//@ [avr] needs-llvm-components: avr +//@ [avr] compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ [msp430] needs-llvm-components: msp430 +//@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib #![feature(no_core, lang_items, intrinsics, staged_api, rustc_attrs)] #![no_core] #![crate_type = "lib"] diff --git a/tests/ui/repr/align-with-extern-c-fn.rs b/tests/ui/repr/align-with-extern-c-fn.rs index 659ef88fce69c..4d17d1e8816f2 100644 --- a/tests/ui/repr/align-with-extern-c-fn.rs +++ b/tests/ui/repr/align-with-extern-c-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_variables)] diff --git a/tests/ui/repr/aligned_enum_cast.rs b/tests/ui/repr/aligned_enum_cast.rs index 1ddf127172e65..276d8f0783aad 100644 --- a/tests/ui/repr/aligned_enum_cast.rs +++ b/tests/ui/repr/aligned_enum_cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // allows aligned custom discriminant enums to cast into other types // See the issue #92464 for more info #[allow(dead_code)] diff --git a/tests/ui/repr/malformed-repr-hints.rs b/tests/ui/repr/malformed-repr-hints.rs index 27840b5f835d8..09c808a041df3 100644 --- a/tests/ui/repr/malformed-repr-hints.rs +++ b/tests/ui/repr/malformed-repr-hints.rs @@ -1,7 +1,7 @@ // Regression test for various ICEs inspired by // https://github.com/rust-lang/rust/issues/83921#issuecomment-814640734 -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #[repr(packed())] //~^ ERROR: incorrect `repr(packed)` attribute format diff --git a/tests/ui/repr/repr-align-assign.fixed b/tests/ui/repr/repr-align-assign.fixed index 59ca22e9728c6..d40fcadf57b1b 100644 --- a/tests/ui/repr/repr-align-assign.fixed +++ b/tests/ui/repr/repr-align-assign.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/repr/repr-align-assign.rs b/tests/ui/repr/repr-align-assign.rs index 6b7799297e89e..3aff84a91f714 100644 --- a/tests/ui/repr/repr-align-assign.rs +++ b/tests/ui/repr/repr-align-assign.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/repr/repr-transparent-issue-87496.rs b/tests/ui/repr/repr-transparent-issue-87496.rs index a4dd45c63f564..d512308377d78 100644 --- a/tests/ui/repr/repr-transparent-issue-87496.rs +++ b/tests/ui/repr/repr-transparent-issue-87496.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #87496. -// check-pass +//@ check-pass #[repr(transparent)] struct TransparentCustomZst(()); diff --git a/tests/ui/repr/repr-transparent-non-exhaustive.rs b/tests/ui/repr/repr-transparent-non-exhaustive.rs index 84dd3f49239f2..9894b89e8e418 100644 --- a/tests/ui/repr/repr-transparent-non-exhaustive.rs +++ b/tests/ui/repr/repr-transparent-non-exhaustive.rs @@ -1,6 +1,6 @@ #![deny(repr_transparent_external_private_fields)] -// aux-build: repr-transparent-non-exhaustive.rs +//@ aux-build: repr-transparent-non-exhaustive.rs extern crate repr_transparent_non_exhaustive; use repr_transparent_non_exhaustive::{ diff --git a/tests/ui/repr/repr_c_int_align.rs b/tests/ui/repr/repr_c_int_align.rs index fdd14fc2dbe72..0a2a77f75ff16 100644 --- a/tests/ui/repr/repr_c_int_align.rs +++ b/tests/ui/repr/repr_c_int_align.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O #![allow(dead_code)] diff --git a/tests/ui/resolve/112590-2.fixed b/tests/ui/resolve/112590-2.fixed index 3bfe81ae8d03c..d88bc4b47e204 100644 --- a/tests/ui/resolve/112590-2.fixed +++ b/tests/ui/resolve/112590-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::vec; use std::sync::atomic::AtomicBool; diff --git a/tests/ui/resolve/112590-2.rs b/tests/ui/resolve/112590-2.rs index e5914cd676e73..d8aaa5a6cc121 100644 --- a/tests/ui/resolve/112590-2.rs +++ b/tests/ui/resolve/112590-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod foo { pub mod bar { pub mod baz { diff --git a/tests/ui/resolve/auxiliary/issue-112831-aux.rs b/tests/ui/resolve/auxiliary/issue-112831-aux.rs index df436fb99297e..e5c1486d8ae7a 100644 --- a/tests/ui/resolve/auxiliary/issue-112831-aux.rs +++ b/tests/ui/resolve/auxiliary/issue-112831-aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/resolve/bad-env-capture.rs b/tests/ui/resolve/bad-env-capture.rs index 83fd2544fc8d8..ccd98b6ef062d 100644 --- a/tests/ui/resolve/bad-env-capture.rs +++ b/tests/ui/resolve/bad-env-capture.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo() { let x: isize; fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/bad-env-capture2.rs b/tests/ui/resolve/bad-env-capture2.rs index b04569c9d7228..84d1832be6074 100644 --- a/tests/ui/resolve/bad-env-capture2.rs +++ b/tests/ui/resolve/bad-env-capture2.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo(x: isize) { fn bar() { log(debug, x); } } diff --git a/tests/ui/resolve/bad-env-capture3.rs b/tests/ui/resolve/bad-env-capture3.rs index 62f12fd1a6d67..849b84cb1ab77 100644 --- a/tests/ui/resolve/bad-env-capture3.rs +++ b/tests/ui/resolve/bad-env-capture3.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo(x: isize) { fn mth() { fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/blind-item-local-shadow.rs b/tests/ui/resolve/blind-item-local-shadow.rs index 942aeb6fdf401..f3e60893669ce 100644 --- a/tests/ui/resolve/blind-item-local-shadow.rs +++ b/tests/ui/resolve/blind-item-local-shadow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs index 36d8ab151e4fc..9869881db9a48 100644 --- a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs +++ b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:blind-item-mixed-crate-use-item-foo.rs -// aux-build:blind-item-mixed-crate-use-item-foo2.rs +//@ run-pass +//@ aux-build:blind-item-mixed-crate-use-item-foo.rs +//@ aux-build:blind-item-mixed-crate-use-item-foo2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m { pub fn f(_: T, _: (), _: ()) { } diff --git a/tests/ui/resolve/blind-item-mixed-use-item.rs b/tests/ui/resolve/blind-item-mixed-use-item.rs index 4a39054967b4a..416496f3219ee 100644 --- a/tests/ui/resolve/blind-item-mixed-use-item.rs +++ b/tests/ui/resolve/blind-item-mixed-use-item.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod m { pub fn f(_: T, _: ()) { } diff --git a/tests/ui/resolve/block-with-trait-parent.rs b/tests/ui/resolve/block-with-trait-parent.rs index bc86f94e921cb..e161b33dc2531 100644 --- a/tests/ui/resolve/block-with-trait-parent.rs +++ b/tests/ui/resolve/block-with-trait-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { fn method(&self) { diff --git a/tests/ui/resolve/crate-in-paths.rs b/tests/ui/resolve/crate-in-paths.rs index 7ebd259189d6d..fad1add40afa9 100644 --- a/tests/ui/resolve/crate-in-paths.rs +++ b/tests/ui/resolve/crate-in-paths.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod bar { pub(crate) struct Foo; diff --git a/tests/ui/resolve/derive-macro-1.rs b/tests/ui/resolve/derive-macro-1.rs index 90cbd903ad672..f4fbb1d2c7c1d 100644 --- a/tests/ui/resolve/derive-macro-1.rs +++ b/tests/ui/resolve/derive-macro-1.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-112831-aux.rs +//@ check-pass +//@ aux-build:issue-112831-aux.rs mod z { pub trait Zeroable {} diff --git a/tests/ui/resolve/derive-macro-2.rs b/tests/ui/resolve/derive-macro-2.rs index 7cecdd9e38e77..126f5ae107ff2 100644 --- a/tests/ui/resolve/derive-macro-2.rs +++ b/tests/ui/resolve/derive-macro-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-112831-aux.rs +//@ check-pass +//@ aux-build:issue-112831-aux.rs extern crate issue_112831_aux; use issue_112831_aux::Zeroable; diff --git a/tests/ui/resolve/editions-crate-root-2015.rs b/tests/ui/resolve/editions-crate-root-2015.rs index 4c890e3ae6994..5f764d3ceef81 100644 --- a/tests/ui/resolve/editions-crate-root-2015.rs +++ b/tests/ui/resolve/editions-crate-root-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 mod inner { fn global_inner(_: ::nonexistant::Foo) { diff --git a/tests/ui/resolve/editions-crate-root-2018.rs b/tests/ui/resolve/editions-crate-root-2018.rs index 61e4329bbb347..0e964d20f9c0e 100644 --- a/tests/ui/resolve/editions-crate-root-2018.rs +++ b/tests/ui/resolve/editions-crate-root-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod inner { fn global_inner(_: ::nonexistant::Foo) { diff --git a/tests/ui/resolve/enums-are-namespaced-xc.rs b/tests/ui/resolve/enums-are-namespaced-xc.rs index dfc16d6ce443c..7797086d4a08e 100644 --- a/tests/ui/resolve/enums-are-namespaced-xc.rs +++ b/tests/ui/resolve/enums-are-namespaced-xc.rs @@ -1,4 +1,4 @@ -// aux-build:namespaced_enums.rs +//@ aux-build:namespaced_enums.rs extern crate namespaced_enums; fn main() { diff --git a/tests/ui/resolve/export-fully-qualified-2018.rs b/tests/ui/resolve/export-fully-qualified-2018.rs index afd48acb6bb35..26e3044d8df0e 100644 --- a/tests/ui/resolve/export-fully-qualified-2018.rs +++ b/tests/ui/resolve/export-fully-qualified-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // In this test baz isn't resolved when called as foo.baz even though // it's called from inside foo. This is somewhat surprising and may diff --git a/tests/ui/resolve/export-fully-qualified.rs b/tests/ui/resolve/export-fully-qualified.rs index 9d4daf4cd7950..6de33b7e1915f 100644 --- a/tests/ui/resolve/export-fully-qualified.rs +++ b/tests/ui/resolve/export-fully-qualified.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 // In this test baz isn't resolved when called as foo.baz even though // it's called from inside foo. This is somewhat surprising and may diff --git a/tests/ui/resolve/extern-prelude-fail.rs b/tests/ui/resolve/extern-prelude-fail.rs index 7d387025ad44d..c0716f1ebf566 100644 --- a/tests/ui/resolve/extern-prelude-fail.rs +++ b/tests/ui/resolve/extern-prelude-fail.rs @@ -1,5 +1,5 @@ -// compile-flags:--extern extern_prelude -// aux-build:extern-prelude.rs +//@ compile-flags:--extern extern_prelude +//@ aux-build:extern-prelude.rs // Extern prelude names are not available by absolute paths diff --git a/tests/ui/resolve/extern-prelude.rs b/tests/ui/resolve/extern-prelude.rs index b5f1d5d35b2dd..3ce928745a96b 100644 --- a/tests/ui/resolve/extern-prelude.rs +++ b/tests/ui/resolve/extern-prelude.rs @@ -1,7 +1,7 @@ -// build-pass (FIXME(62277): could be check-pass?) -// compile-flags:--extern extern_prelude --extern Vec -// aux-build:extern-prelude.rs -// aux-build:extern-prelude-vec.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags:--extern extern_prelude --extern Vec +//@ aux-build:extern-prelude.rs +//@ aux-build:extern-prelude-vec.rs fn basic() { // It works diff --git a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs index e5647d72cba35..c9a64de7f6bba 100644 --- a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs +++ b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs @@ -2,7 +2,7 @@ // If a const item contains generic params from an outer items, only suggest // turning the const item generic if the feature `generic_const_items` is enabled. -// revisions: default generic_const_items +//@ revisions: default generic_const_items #![cfg_attr(generic_const_items, feature(generic_const_items))] #![feature(generic_const_exprs)] // only used for the test case "outer struct" diff --git a/tests/ui/resolve/hidden_glob_reexports.rs b/tests/ui/resolve/hidden_glob_reexports.rs index 102b565624526..65e248e4bd29f 100644 --- a/tests/ui/resolve/hidden_glob_reexports.rs +++ b/tests/ui/resolve/hidden_glob_reexports.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub mod upstream_a { mod inner { diff --git a/tests/ui/resolve/issue-101749.fixed b/tests/ui/resolve/issue-101749.fixed index 3e5544296e462..97815793d298e 100644 --- a/tests/ui/resolve/issue-101749.fixed +++ b/tests/ui/resolve/issue-101749.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Rectangle { width: i32, height: i32, diff --git a/tests/ui/resolve/issue-101749.rs b/tests/ui/resolve/issue-101749.rs index fd67ccab6fa75..994fc86778e08 100644 --- a/tests/ui/resolve/issue-101749.rs +++ b/tests/ui/resolve/issue-101749.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Rectangle { width: i32, height: i32, diff --git a/tests/ui/resolve/issue-111312.rs b/tests/ui/resolve/issue-111312.rs index acea37b358b2e..68fc8573dde3e 100644 --- a/tests/ui/resolve/issue-111312.rs +++ b/tests/ui/resolve/issue-111312.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait Has { fn has() {} diff --git a/tests/ui/resolve/issue-111727.rs b/tests/ui/resolve/issue-111727.rs index 36f3081211d2f..740037fe43425 100644 --- a/tests/ui/resolve/issue-111727.rs +++ b/tests/ui/resolve/issue-111727.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn main() { std::any::Any::create(); //~ ERROR diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed b/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed index 892697493b7a9..4bb68e6fe68be 100644 --- a/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed +++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs index 2b2f5f1ad8d07..a8db78a378c76 100644 --- a/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs +++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed index a7ab88fe99357..8a67b20eec11d 100644 --- a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed +++ b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs index 05936b191ffea..528edb331cf55 100644 --- a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs b/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs index 83349dd3350b3..a74e542592fb6 100644 --- a/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs @@ -1,5 +1,5 @@ #![deny(unused_qualifications)] -// check-pass +//@ check-pass fn bar() { match Option::>::None { Some(v) => {} diff --git a/tests/ui/resolve/issue-16058.rs b/tests/ui/resolve/issue-16058.rs index 048aaf65fbfa8..608edb82f025e 100644 --- a/tests/ui/resolve/issue-16058.rs +++ b/tests/ui/resolve/issue-16058.rs @@ -1,4 +1,4 @@ -// ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions +//@ ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions pub struct GslResult { pub val: f64, diff --git a/tests/ui/resolve/issue-19452.rs b/tests/ui/resolve/issue-19452.rs index 1d3aa49eac67f..da83222b11a6c 100644 --- a/tests/ui/resolve/issue-19452.rs +++ b/tests/ui/resolve/issue-19452.rs @@ -1,4 +1,4 @@ -// aux-build:issue-19452-aux.rs +//@ aux-build:issue-19452-aux.rs extern crate issue_19452_aux; diff --git a/tests/ui/resolve/issue-21221-3.rs b/tests/ui/resolve/issue-21221-3.rs index f0c0a9fd61a12..26a7a9efd0bad 100644 --- a/tests/ui/resolve/issue-21221-3.rs +++ b/tests/ui/resolve/issue-21221-3.rs @@ -1,7 +1,7 @@ // testing whether the lookup mechanism picks up types // defined in the outside crate -// aux-build:issue-21221-3.rs +//@ aux-build:issue-21221-3.rs extern crate issue_21221_3; diff --git a/tests/ui/resolve/issue-21221-4.rs b/tests/ui/resolve/issue-21221-4.rs index 88d5bd06ca5cf..85321de579a82 100644 --- a/tests/ui/resolve/issue-21221-4.rs +++ b/tests/ui/resolve/issue-21221-4.rs @@ -1,7 +1,7 @@ // testing whether the lookup mechanism picks up types // defined in the outside crate -// aux-build:issue-21221-4.rs +//@ aux-build:issue-21221-4.rs extern crate issue_21221_4; diff --git a/tests/ui/resolve/issue-30535.rs b/tests/ui/resolve/issue-30535.rs index d48f00d5acacb..a971ce12362ec 100644 --- a/tests/ui/resolve/issue-30535.rs +++ b/tests/ui/resolve/issue-30535.rs @@ -1,4 +1,4 @@ -// aux-build:issue-30535.rs +//@ aux-build:issue-30535.rs extern crate issue_30535 as foo; diff --git a/tests/ui/resolve/issue-3907-2.rs b/tests/ui/resolve/issue-3907-2.rs index 0ebaea08e1890..f261de5f4025a 100644 --- a/tests/ui/resolve/issue-3907-2.rs +++ b/tests/ui/resolve/issue-3907-2.rs @@ -1,4 +1,4 @@ -// aux-build:issue-3907.rs +//@ aux-build:issue-3907.rs extern crate issue_3907; diff --git a/tests/ui/resolve/issue-3907.rs b/tests/ui/resolve/issue-3907.rs index 6211de4271782..fd08c360d3627 100644 --- a/tests/ui/resolve/issue-3907.rs +++ b/tests/ui/resolve/issue-3907.rs @@ -1,4 +1,4 @@ -// aux-build:issue-3907.rs +//@ aux-build:issue-3907.rs extern crate issue_3907; diff --git a/tests/ui/resolve/issue-55673.fixed b/tests/ui/resolve/issue-55673.fixed index 261742a26cbf1..ac8e5e0187dff 100644 --- a/tests/ui/resolve/issue-55673.fixed +++ b/tests/ui/resolve/issue-55673.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { type Bar; diff --git a/tests/ui/resolve/issue-55673.rs b/tests/ui/resolve/issue-55673.rs index 6ac49be141ca1..b9b6b6956c53a 100644 --- a/tests/ui/resolve/issue-55673.rs +++ b/tests/ui/resolve/issue-55673.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { type Bar; diff --git a/tests/ui/resolve/issue-57523.rs b/tests/ui/resolve/issue-57523.rs index 976238cc3bd06..d55ae4b57854f 100644 --- a/tests/ui/resolve/issue-57523.rs +++ b/tests/ui/resolve/issue-57523.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(u8); diff --git a/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs index 927ecd9aee032..d2bb0dc763124 100644 --- a/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs +++ b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn free(); //~ ERROR without a body diff --git a/tests/ui/resolve/issue-80079.rs b/tests/ui/resolve/issue-80079.rs index 4795ed062c8f6..4dc61c320adce 100644 --- a/tests/ui/resolve/issue-80079.rs +++ b/tests/ui/resolve/issue-80079.rs @@ -1,4 +1,4 @@ -// aux-build:issue-80079.rs +//@ aux-build:issue-80079.rs // using a module from another crate should not cause errors to suggest private // items in that module diff --git a/tests/ui/resolve/issue-85671.rs b/tests/ui/resolve/issue-85671.rs index 337ec307ef326..54db03f774eeb 100644 --- a/tests/ui/resolve/issue-85671.rs +++ b/tests/ui/resolve/issue-85671.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Some trait with a function that returns a slice: pub trait AsSlice { diff --git a/tests/ui/resolve/macro-determinacy-non-module.rs b/tests/ui/resolve/macro-determinacy-non-module.rs index 3215e0cd34605..809e9f6f6c4b3 100644 --- a/tests/ui/resolve/macro-determinacy-non-module.rs +++ b/tests/ui/resolve/macro-determinacy-non-module.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std as line; diff --git a/tests/ui/resolve/name-collision-in-trait-fn-sig.rs b/tests/ui/resolve/name-collision-in-trait-fn-sig.rs index fba4ffa1c6ed2..f405ab5c59dd5 100644 --- a/tests/ui/resolve/name-collision-in-trait-fn-sig.rs +++ b/tests/ui/resolve/name-collision-in-trait-fn-sig.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is currently stable behavior, which was almost accidentally made an // error in #102161 since there is no test exercising it. I am not sure if // this _should_ be the desired behavior, but at least we should know if it diff --git a/tests/ui/resolve/no-std-1.rs b/tests/ui/resolve/no-std-1.rs index 5b59e9b4eb385..57770a745e88b 100644 --- a/tests/ui/resolve/no-std-1.rs +++ b/tests/ui/resolve/no-std-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/no-std-2.rs b/tests/ui/resolve/no-std-2.rs index 487d41649f4cb..e5be5edc21661 100644 --- a/tests/ui/resolve/no-std-2.rs +++ b/tests/ui/resolve/no-std-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/no-std-3.rs b/tests/ui/resolve/no-std-3.rs index f6c4ed5794c91..0dd0a6f7e3512 100644 --- a/tests/ui/resolve/no-std-3.rs +++ b/tests/ui/resolve/no-std-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/pathless-extern-ok.rs b/tests/ui/resolve/pathless-extern-ok.rs index 0ffa5eb894040..91ef4de956ded 100644 --- a/tests/ui/resolve/pathless-extern-ok.rs +++ b/tests/ui/resolve/pathless-extern-ok.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags:--extern alloc -// build-pass +//@ edition:2018 +//@ compile-flags:--extern alloc +//@ build-pass // Test that `--extern alloc` will load from the sysroot without error. diff --git a/tests/ui/resolve/privacy-struct-ctor.rs b/tests/ui/resolve/privacy-struct-ctor.rs index 0eecc7f8cc5db..da0e9f2fc0468 100644 --- a/tests/ui/resolve/privacy-struct-ctor.rs +++ b/tests/ui/resolve/privacy-struct-ctor.rs @@ -1,4 +1,4 @@ -// aux-build:privacy-struct-ctor.rs +//@ aux-build:privacy-struct-ctor.rs extern crate privacy_struct_ctor as xcrate; diff --git a/tests/ui/resolve/resolve-conflict-import-vs-import.fixed b/tests/ui/resolve/resolve-conflict-import-vs-import.fixed index e429513b51d34..2ebf2a194b816 100644 --- a/tests/ui/resolve/resolve-conflict-import-vs-import.fixed +++ b/tests/ui/resolve/resolve-conflict-import-vs-import.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::mem::transmute; diff --git a/tests/ui/resolve/resolve-conflict-import-vs-import.rs b/tests/ui/resolve/resolve-conflict-import-vs-import.rs index 43853117af699..53af6aea1f642 100644 --- a/tests/ui/resolve/resolve-conflict-import-vs-import.rs +++ b/tests/ui/resolve/resolve-conflict-import-vs-import.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::mem::transmute; diff --git a/tests/ui/resolve/resolve-hint-macro.fixed b/tests/ui/resolve/resolve-hint-macro.fixed index 54e01608498f8..4821aef1bbd6a 100644 --- a/tests/ui/resolve/resolve-hint-macro.fixed +++ b/tests/ui/resolve/resolve-hint-macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { assert_eq!(1, 1); //~^ ERROR expected function, found macro `assert_eq` diff --git a/tests/ui/resolve/resolve-hint-macro.rs b/tests/ui/resolve/resolve-hint-macro.rs index f16e8c0755384..101a7cd15156c 100644 --- a/tests/ui/resolve/resolve-hint-macro.rs +++ b/tests/ui/resolve/resolve-hint-macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { assert_eq(1, 1); //~^ ERROR expected function, found macro `assert_eq` diff --git a/tests/ui/resolve/resolve-issue-2428.rs b/tests/ui/resolve/resolve-issue-2428.rs index 5f3473e9feb74..f7bb117c88fcc 100644 --- a/tests/ui/resolve/resolve-issue-2428.rs +++ b/tests/ui/resolve/resolve-issue-2428.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/resolve/resolve-pseudo-shadowing.rs b/tests/ui/resolve/resolve-pseudo-shadowing.rs index 0ee0d0efad6c9..a5aad3c669cc2 100644 --- a/tests/ui/resolve/resolve-pseudo-shadowing.rs +++ b/tests/ui/resolve/resolve-pseudo-shadowing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that type parameters can't "shadow" qualified paths. fn check(_c: Clone) { diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.rs b/tests/ui/resolve/suggest-constructor-cycle-error.rs index e36fffd97d1b4..c23d6788eefeb 100644 --- a/tests/ui/resolve/suggest-constructor-cycle-error.rs +++ b/tests/ui/resolve/suggest-constructor-cycle-error.rs @@ -1,4 +1,4 @@ -// aux-build:suggest-constructor-cycle-error.rs +//@ aux-build:suggest-constructor-cycle-error.rs // Regression test for https://github.com/rust-lang/rust/issues/119625 diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed index fc68884fe9c6f..d05c0f058069c 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// compile-flags: --cfg=whatever -Aunused +//@ run-rustfix +//@ compile-flags: --cfg=whatever -Aunused use y::z; #[cfg(whatever)] diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs index 38a1095703b69..0be2e558e42cd 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs @@ -1,5 +1,5 @@ -// run-rustfix -// compile-flags: --cfg=whatever -Aunused +//@ run-rustfix +//@ compile-flags: --cfg=whatever -Aunused #[cfg(whatever)] use y::Whatever; diff --git a/tests/ui/resolve/tool-import.rs b/tests/ui/resolve/tool-import.rs index 971993332f540..bde375a2c490e 100644 --- a/tests/ui/resolve/tool-import.rs +++ b/tests/ui/resolve/tool-import.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 use clippy::time::Instant; //~^ `clippy` is a tool module diff --git a/tests/ui/resolve/unused-qualifications-suggestion.fixed b/tests/ui/resolve/unused-qualifications-suggestion.fixed index 0d4b9007c7b5e..6935f611b361f 100644 --- a/tests/ui/resolve/unused-qualifications-suggestion.fixed +++ b/tests/ui/resolve/unused-qualifications-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/unused-qualifications-suggestion.rs b/tests/ui/resolve/unused-qualifications-suggestion.rs index f6722e96537c9..b3fe04ff0ea4b 100644 --- a/tests/ui/resolve/unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/unused-qualifications-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/use_suggestion_placement.fixed b/tests/ui/resolve/use_suggestion_placement.fixed index d1686f7fd2b9c..de7f946d1d9f5 100644 --- a/tests/ui/resolve/use_suggestion_placement.fixed +++ b/tests/ui/resolve/use_suggestion_placement.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use m::A; diff --git a/tests/ui/resolve/use_suggestion_placement.rs b/tests/ui/resolve/use_suggestion_placement.rs index 5be91f27092fa..f761e9715a027 100644 --- a/tests/ui/resolve/use_suggestion_placement.rs +++ b/tests/ui/resolve/use_suggestion_placement.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] macro_rules! y { diff --git a/tests/ui/resolve/visibility-indeterminate.rs b/tests/ui/resolve/visibility-indeterminate.rs index 0e1142db37d2d..17e5fec4701b9 100644 --- a/tests/ui/resolve/visibility-indeterminate.rs +++ b/tests/ui/resolve/visibility-indeterminate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 foo!(); //~ ERROR cannot find macro `foo` in this scope diff --git a/tests/ui/resource-assign-is-not-copy.rs b/tests/ui/resource-assign-is-not-copy.rs index c1de139a9a95f..078824cea1bae 100644 --- a/tests/ui/resource-assign-is-not-copy.rs +++ b/tests/ui/resource-assign-is-not-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/resource-destruct.rs b/tests/ui/resource-destruct.rs index c4756a21a0016..cbb17bb6ba61c 100644 --- a/tests/ui/resource-destruct.rs +++ b/tests/ui/resource-destruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/ret-bang.rs b/tests/ui/ret-bang.rs index 6618992e0361f..f0d529ad6a693 100644 --- a/tests/ui/ret-bang.rs +++ b/tests/ui/ret-bang.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn my_err(s: String) -> ! { println!("{}", s); panic!(); } diff --git a/tests/ui/ret-non-nil.rs b/tests/ui/ret-non-nil.rs index 86c02bf38e6f2..1d039ffe18c26 100644 --- a/tests/ui/ret-non-nil.rs +++ b/tests/ui/ret-non-nil.rs @@ -1,4 +1,4 @@ -// error-pattern: `return;` in a function whose return type is not `()` +//@ error-pattern: `return;` in a function whose return type is not `()` fn f() { return; } diff --git a/tests/ui/return-nil.rs b/tests/ui/return-nil.rs index 4fc937f96a1f4..403eae260dc1a 100644 --- a/tests/ui/return-nil.rs +++ b/tests/ui/return-nil.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f() { let x = (); return x; } diff --git a/tests/ui/return/return-impl-trait.fixed b/tests/ui/return/return-impl-trait.fixed index ff2b02f73ea65..1dfc0fc0f3d6d 100644 --- a/tests/ui/return/return-impl-trait.fixed +++ b/tests/ui/return/return-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} impl Trait for () {} diff --git a/tests/ui/return/return-impl-trait.rs b/tests/ui/return/return-impl-trait.rs index e905d712f622d..6b1b8a4b738ad 100644 --- a/tests/ui/return/return-impl-trait.rs +++ b/tests/ui/return/return-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} impl Trait for () {} diff --git a/tests/ui/return/tail-expr-as-potential-return.rs b/tests/ui/return/tail-expr-as-potential-return.rs index 2046d6680dd25..37dee1c19db8c 100644 --- a/tests/ui/return/tail-expr-as-potential-return.rs +++ b/tests/ui/return/tail-expr-as-potential-return.rs @@ -9,7 +9,7 @@ // This test was amended to also serve as a regression test for #92308, where // this suggestion would not trigger with async functions. // -// edition:2018 +//@ edition:2018 fn main() { } diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs b/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs index 9150c831c8960..3d92b9dcde4c3 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs @@ -1,5 +1,5 @@ -// edition: 2018 -// known-bug: #120240 +//@ edition: 2018 +//@ known-bug: #120240 #![feature(never_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs index 3783100b50282..102539ed9d935 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 #![feature(never_patterns)] #![allow(incomplete_features)] #![deny(unreachable_patterns)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs index 3c04b4517cb7b..27d113c18a3d6 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ check-pass +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(never_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs b/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs index 72ee4d24bb629..e8bfa9245f597 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs @@ -1,6 +1,6 @@ -// revisions: pass fail -//[pass] check-pass -//[fail] check-fail +//@ revisions: pass fail +//@[pass] check-pass +//@[fail] check-fail #![feature(never_patterns)] #![feature(min_exhaustive_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs index 0374cbdbc1fd2..4d20c67cf0f86 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs @@ -1,5 +1,5 @@ -// revisions: normal exh_pats -//[normal] check-pass +//@ revisions: normal exh_pats +//@[normal] check-pass #![feature(never_patterns)] #![allow(incomplete_features)] #![cfg_attr(exh_pats, feature(min_exhaustive_patterns))] diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs index 1e086160f3f34..c925018bcc243 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs @@ -2,7 +2,7 @@ // rust-lang/rust#2329), that starts passing with this feature in // place. -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs index 3161d6fbbe647..27f5695804489 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs @@ -1,7 +1,7 @@ // This test used to emit E0008 but now passed since `bind_by_move_pattern_guards` // have been stabilized. -// check-pass +//@ check-pass fn main() { match Some("hi".to_string()) { diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs index b716fc870e071..ab99deb6cb472 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: Box } diff --git a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs index 7dd65701f125c..4944de0b82f33 100644 --- a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs +++ b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(rustc_private)] diff --git a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs index c454dfa4eb93b..1edd51dd23c6d 100644 --- a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs +++ b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc -// ignore-sgx no libc +//@ ignore-wasm32-bare no libc +//@ ignore-sgx no libc #![feature(rustc_private)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs index c95777b0ef197..22ea6f7534a74 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs index 3f663fd09f884..cd513d2aff4de 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs index 56b7988e0e4e5..9595d00876bc0 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs index 3ebe3225437a0..9dce827a57cb8 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs index dca8aaef1500d..98bfda9bddb07 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs @@ -6,7 +6,7 @@ // to its default, so that we will not issue a diangostic even if // rust-lang/rust#62614 remains an open issue. -// run-pass +//@ run-pass struct Sum(u32, u32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs index 7a853631d43b5..b64fbd9d49a12 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs index 3093f227e6f78..be37217a7d452 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs index 2b6ec850241c8..e26234bd4553b 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs index 5738d14d97bdf..729f411a02151 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs index 024226a011678..839e908544091 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs @@ -2,7 +2,7 @@ // and that if a feature gate is supplied, it permits the type to be // used in a match. -// revisions: with_gate no_gate +//@ revisions: with_gate no_gate // gate-test-structural_match diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs index e591b2a93e12b..25434e0050f05 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file checks that fn ptrs are considered structurally matchable. // See also rust-lang/rust#63479. diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs index 374e5d5acd080..81618b3b791ee 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs @@ -11,7 +11,7 @@ // Issue 62307 pointed out a case where the structural-match checking // was too shallow. #![warn(indirect_structural_match)] -// run-pass +//@ run-pass #[derive(Debug)] struct B(i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs index b05b8c8da1f39..634aaf8115f21 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The actual regression test from #63479. (Including this because my // first draft at fn-ptr-is-structurally-matchable.rs failed to actually 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 7ba0f3a9e8dd9..ad4e0d070da34 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 +//@ run-pass #[derive(PartialEq, Debug)] struct B(i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs index 50f91420ce2f1..5307f66779279 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file checks that `PhantomData` is considered structurally matchable. 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 17174e22c743b..7250da54c6c75 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 +//@ run-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 405a69c94bf01..b297ec1b4e240 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 +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Eq)] diff --git a/tests/ui/rfcs/rfc-1623-static/rfc1623.rs b/tests/ui/rfcs/rfc-1623-static/rfc1623.rs index adaf25c6bbff4..d85b83284fdd9 100644 --- a/tests/ui/rfcs/rfc-1623-static/rfc1623.rs +++ b/tests/ui/rfcs/rfc-1623-static/rfc1623.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs index 014ccac31b7a5..e31516a6480b7 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// compile-flags: -lstatic=wronglibrary:rust_test_helpers +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ compile-flags: -lstatic=wronglibrary:rust_test_helpers #[link(name = "wronglibrary", kind = "dylib")] extern "C" { diff --git a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs index b46d85160d1ee..d54b428bf22f8 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs @@ -1,4 +1,4 @@ -// compile-flags: -l foo:bar -// error-pattern: renaming of the library `foo` was specified +//@ compile-flags: -l foo:bar +//@ error-pattern: renaming of the library `foo` was specified #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs index 106f196b45555..ec1a246245e3e 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs @@ -1,5 +1,5 @@ -// compile-flags: -l foo:bar -l foo:baz -// error-pattern: multiple renamings were specified for library +//@ compile-flags: -l foo:bar -l foo:baz +//@ error-pattern: multiple renamings were specified for library #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs index 30f4db7180ece..2a13d22e22aeb 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs @@ -1,5 +1,5 @@ -// compile-flags: -l dylib=foo:bar -// error-pattern: overriding linking modifiers from command line is not supported +//@ compile-flags: -l dylib=foo:bar +//@ error-pattern: overriding linking modifiers from command line is not supported #![feature(native_link_modifiers_as_needed)] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs index 9356c41299233..39205a11dd735 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs @@ -1,5 +1,5 @@ -// compile-flags: -l foo: -// error-pattern: an empty renaming target was specified for library +//@ compile-flags: -l foo: +//@ error-pattern: an empty renaming target was specified for library #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs index 329fadb150fcd..d3b441fbe88f6 100644 --- a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs +++ b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(as_array_of_cells)] diff --git a/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs b/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs index 4c4816c2fbc8d..d5f6628e0dbc1 100644 --- a/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs +++ b/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code, unreachable_code)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs index 10dc6115dcb20..fb6718e55b286 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:returned Box from main() -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:returned Box from main() +//@ failure-status: 1 +//@ ignore-emscripten no processes use std::error::Error; use std::io; 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 e98582cbce34f..fd343eaeea95b 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 +//@ run-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 bac695d4e7942..016bccc056c36 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 +//@ run-pass fn main() {} diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs index 6d4c1562053b6..836370329b653 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::process::ExitCode; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs index c06a135dcbc20..f41684aaa9896 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass fn main() -> impl std::process::Termination { } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs index faf2526c8d8fd..91be3afbe225a 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:oh, dear -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oh, dear +//@ ignore-emscripten no processes fn main() -> ! { panic!("oh, dear"); diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index 6a625fb05e8f8..f1d972b3c5503 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:returned Box from main() -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:returned Box from main() +//@ failure-status: 1 +//@ ignore-emscripten no processes use std::io::{Error, ErrorKind}; 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 b0e932e1fe03c..8a5b962e68196 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 +//@ run-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 30f36c24489c5..ce29a8239e87b 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 +//@ run-pass use std::io::Error; fn main() -> Result<(), Error> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs index 94f16c6fd0212..acf3da2d55f36 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern: An error message for you -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern: An error message for you +//@ failure-status: 1 +//@ ignore-emscripten no processes fn main() -> Result<(), &'static str> { Err("An error message for you") diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs index f0591c38c007f..829e4f8ee440a 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() -> Result<(), &'static str> { Ok(()) } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs index 96808a3ed914f..9ede4031bb8e7 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![feature(test)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs index 43888cecedab3..7de55d5f6752d 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs @@ -1,6 +1,6 @@ -// compile-flags: --test -// run-pass -// needs-unwind +//@ compile-flags: --test +//@ run-pass +//@ needs-unwind #![feature(test)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs index 193a523aed24b..7c9a4167bfb5a 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test use std::num::ParseFloatError; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs index 0d1cded36b62d..de8afd95a84a9 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #![feature(box_patterns)] diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs index d5bca6a24741b..4b9fe71a88fa3 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const CONST_REF: &[u8; 3] = b"foo"; trait Foo { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs index 52fbb90ed541b..24f0867d095d6 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Wrapper { Wrap(i32), } diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs index a5a24a806340f..56c881826af6a 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut tups = vec![(0u8, 1u8)]; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs index 0207f607be8ea..3090f68c72b77 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn some_or_wildcard(r: &Option, b: &i32) { let _: &i32 = match r { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs index 9379753598eb0..e267f858eaa8b 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn with_u8() { let s = 5u8; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs index f8abd1b96d80e..8795adcdd4202 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i = 5; match &&&&i { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs index b74e45c9328d7..bc3e790aaaebf 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo<'a, 'b>(x: &'a &'b Option) -> &'a u32 { let x: &'a &'a Option = x; match x { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs index 3b9d07610d29a..1d9bd4d16fc96 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we "reset" the mode as we pass through a `&` pattern. // // cc #46688 diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs index 33229a205f4d8..c0b036b1c4de4 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn slice_pat() { let sl: &[u8] = b"foo"; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs index 5a00e5b68235e..8585d688a082c 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] struct Foo { x: u8, diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs index 0cf9ba1b4ca95..aadc750e14ed8 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { Bar(Option, (), (), Vec), diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs index 4c22aa2d71816..9ad95e274b7ee 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let foo = (Some(1), (), (), vec![2, 3]); diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs index b9ff24c7624dc..b2ebab382bd93 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs @@ -1,11 +1,11 @@ // Test that the borrow checker doesn't consider checking an exhaustive pattern // as an access. -// check-pass +//@ check-pass #![allow(dropping_references)] -// aux-build:monovariants.rs +//@ aux-build:monovariants.rs extern crate monovariants; use monovariants::ExhaustiveMonovariant; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs index 2ad92b7944492..d616f5e5e89a7 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs @@ -1,7 +1,7 @@ // Test that the borrow checker considers `#[non_exhaustive]` when checking // whether a match contains a discriminant read. -// aux-build:monovariants.rs +//@ aux-build:monovariants.rs extern crate monovariants; use monovariants::NonExhaustiveMonovariant; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs index 5dce8180f5920..fccfe53f40d34 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs @@ -1,4 +1,4 @@ -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs index 9d2855f5c6166..ad3a90ddeb5dd 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs @@ -1,4 +1,4 @@ -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; use enums::{EmptyNonExhaustiveEnum, NonExhaustiveEnum}; 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 54e42917f52d2..2a89eefd46136 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 +//@ run-pass #[non_exhaustive] pub enum NonExhaustiveEnum { diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs index 15c0c695fcabb..7a9b465bb56f6 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs @@ -1,4 +1,4 @@ -// aux-build:types.rs +//@ aux-build:types.rs #![deny(improper_ctypes)] extern crate types; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs index fe4ae345d85f8..cf5ab5123f679 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] // This test checks that non-exhaustive types with `#[repr(C)]` are considered proper within diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs index 33f9f56a5bbc8..6a76db9b1d634 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs @@ -1,9 +1,9 @@ -// revisions: normal lint +//@ revisions: normal lint // Test that putting the lint level on a match arm emits a warning, as this was previously // meaningful and is no longer. #![feature(non_exhaustive_omitted_patterns_lint)] -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; use enums::NonExhaustiveEnum; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs index a6c1dc53f8b20..5809e56fb7b49 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs @@ -3,11 +3,11 @@ #![feature(non_exhaustive_omitted_patterns_lint, unstable_test_feature)] #![deny(unreachable_patterns)] -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; -// aux-build:structs.rs +//@ aux-build:structs.rs extern crate structs; use enums::{ diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs index 1828fdef90139..6d3072f3ddd70 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs @@ -3,7 +3,7 @@ #![feature(non_exhaustive_omitted_patterns_lint)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; use unstable::{OnlyUnstableEnum, OnlyUnstableStruct, UnstableEnum, UnstableStruct}; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs index 07e093c152d6b..b3953c2e8d029 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs @@ -1,4 +1,4 @@ -// aux-build:structs.rs +//@ aux-build:structs.rs extern crate structs; use structs::{NormalStruct, UnitStruct, TupleStruct, FunctionalRecord}; 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 5f76b0cb2f4b6..9982e88874c0c 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 +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs index 80b9dc4c1c338..4804d34a920ca 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs index 98a7fdbc5049a..c7a7c927c0c23 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs index be86519ecb159..b4c26ed910a5c 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs index 60289aa780378..246443f029faf 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs index 230ac75298e72..fd77fab8738d3 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs index e54098d4d48b9..c330f3aa05c4b 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs index 900dfff652ea6..22cffc537bd5c 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs index de5530485f3e6..ac346bc83614b 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs index 221b5cf6bfad8..21aa562365af8 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs @@ -1,5 +1,5 @@ -// aux-build:uninhabited.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:uninhabited.rs +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs index bc346aea51cfc..fb9f8603e7560 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs @@ -1,4 +1,4 @@ -// aux-build:variants.rs +//@ aux-build:variants.rs extern crate variants; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs index dacaf489a9082..0a18b0d6de5d1 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:variants.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:variants.rs extern crate variants; 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 5f2816ec62102..7630f2753d9d9 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 +//@ run-pass pub enum NonExhaustiveVariants { #[non_exhaustive] Unit, diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs index fa04f4b12d5fe..d4337dcb16543 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs @@ -1,7 +1,7 @@ // Check that we if we get ahold of an object unsafe trait // object with auto traits and lifetimes, we can downcast it // -// check-pass +//@ check-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs index c8eee9835fed3..ba09550aad567 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs @@ -1,8 +1,8 @@ // Check that we can manually implement an object-unsafe trait for its trait object. -// revisions: current next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs index df97d2c13278e..cbf76a6830b8f 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs @@ -1,7 +1,7 @@ // Check that we can statically dispatch methods for object // unsafe trait objects, directly and indirectly // -// check-pass +//@ check-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs b/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs index a8814ce285286..70cefbe29c16d 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=false -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=false +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs index a3bed707eccda..2ae8eb9c56d27 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs @@ -3,8 +3,8 @@ // in turn called, results in the same output irrespective of whether // we're in a const or runtime context. -// run-pass -// compile-flags: -Z unleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Z unleash-the-miri-inside-of-you #![feature(core_intrinsics, const_caller_location)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs index e5754d355d9cb..e8c69f635fa2b 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #[inline(never)] #[track_caller] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs index 6e15cf3fe8ad3..2c699437c8308 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #![feature(const_caller_location)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs b/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs index 6681119557d79..4f21814bb23ed 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs @@ -1,4 +1,4 @@ -// run-fail +//@ run-fail //! This test ensures that `#[track_caller]` can be applied directly to diverging functions, as //! the tracking issue says: https://github.com/rust-lang/rust/issues/47809#issue-292138490. diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs index 351438a54707a..6eaa7d4d9bc9f 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support #![feature(naked_functions)] use std::arch::asm; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs b/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs index 23d2a4b0a99c6..7a4cef1c2edf3 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=no -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=no +//@[mir-opt] compile-flags: -Zmir-opt-level=4 macro_rules! caller_location_from_macro { () => (core::panic::Location::caller()); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs b/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs index 6ca09fac819d8..f003e40fa55f5 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See https://github.com/rust-lang/rust/issues/95151 #[track_caller] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs b/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs index a2e8eb27edeac..d553be2c0b6ce 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=no -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=no +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs index 1b13ea3e93c89..63d06d42b1ac7 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #[track_caller] fn f() {} diff --git a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs index f11456250d874..bd62a6447851f 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ needs-unwind +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #![allow(unconditional_panic)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs index 9d28eb9de095c..ef4701335dda3 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs index 5115f687c2632..ee8be90d14d9a 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs index 86bcf1f6f8d92..d5c8a529e1e37 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(stmt_expr_attributes)] #![feature(closure_track_caller)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs index 65881257815ac..b6e6ea8dd1101 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 fn pass_to_ptr_call(f: fn(T), x: T) { f(x); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs index 8bb4dd288f054..5505b78f17c27 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 fn ptr_call(f: fn()) { f(); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs index 4db4c29e53d58..d5b33bfc3b1c6 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! assert_expansion_site_is_tracked { () => {{ diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs index 06883a857900e..843434bfa6ea3 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tracked { #[track_caller] diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs index c712f15e32463..fea6f91ff2bdc 100644 --- a/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs +++ b/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs @@ -6,7 +6,7 @@ // strange errors. This test ensures that we do not give compilation // errors. // -// check-pass +//@ check-pass trait MyIterator<'a>: Iterator where Self::Item: 'a { } diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs index 180f5ac6cdc46..c6ce001806d1b 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 +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs index 9c0e0bef480d0..60b5ded8c092b 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use xcrate::S; //~ ERROR unresolved import `xcrate` diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs index def60feb5a6ef..6bbfb69800e11 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { let s = ::xcrate::S; diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs index 486159c0e4aa3..846345c846856 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use ycrate; //~ ERROR unresolved import `ycrate` diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs index acb4bbebe7f53..7233ca69e2ed5 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Tests that arbitrary crates (other than `core`, `std` and `meta`) // aren't allowed without `--extern`, even if they're in the sysroot. diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs index 72e50d78bc252..d73558d8271d2 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs @@ -1,6 +1,6 @@ -// aux-build:xcrate.rs -// compile-flags:--extern xcrate -// edition:2018 +//@ aux-build:xcrate.rs +//@ compile-flags:--extern xcrate +//@ edition:2018 use crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` use *; //~ ERROR cannot glob-import all possible crates diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs index 0deb8c7f119e9..0c0181de03579 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; #[r#repr(r#C, r#packed)] diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs index f2fe59668da94..2757f5057ac3b 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn r#fn(r#match: u32) -> u32 { r#match } diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs index 4665225178c43..5173b5ec88e37 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, PartialEq, Eq)] struct IntWrapper(u32); diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs index 0ab7e17f87b5a..58a6f29528304 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] macro_rules! r#struct { diff --git a/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs b/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs index 22f04c58f3b3c..57f0f848b77b7 100644 --- a/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs +++ b/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs index 5c42c0d8bec27..e5078bacb932d 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs @@ -1,5 +1,5 @@ // Ensure if let guards can be used in constant expressions. -// build-pass +//@ build-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs index 9bb25a66f0927..801329bcc5afd 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs @@ -2,7 +2,7 @@ // For normal guards all temporaries are dropped before the body of the arm. // For let guards temporaries live until the end of the arm. -// run-pass +//@ run-pass #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs index 9e6e23e8882c6..0578b827a47a0 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs @@ -1,7 +1,7 @@ // Ensure that temporaries in if-let guards live for the arm // regression test for #118593 -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs index aa2154e3e9e25..09dc4bfde35f3 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs @@ -1,6 +1,6 @@ // References to by-mutable-ref bindings in an if-let guard *can* be used after the guard. -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs index 349a24579a473..c13804e4534ea 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs index 071b86e2e1490..73bee8a6c68e0 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs @@ -1,7 +1,7 @@ // Check that borrowck knows that moves in the pattern for if-let guards // only happen when the pattern is matched. -// build-pass +//@ build-pass #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs index d91b3a358da1c..e836b0b88ffc7 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs @@ -1,5 +1,5 @@ // Macros can be used for (parts of) the pattern and expression in an if let guard -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs index a303a0d1fcee3..e8a74a4ac34bc 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs index 9a3520661a6f6..56a6fb5bfa3ff 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs @@ -1,6 +1,6 @@ // Tests for #88015 when using if let chains in match guards -//run-pass +//@run-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs index 86a170141f8a0..00eb952635a99 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs @@ -1,8 +1,8 @@ // Check that temporaries in if-let guards are correctly scoped. // Regression test for #116079. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // -Zvalidate-mir #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs index 37fe610637e9d..1a36bc5b372f7 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs @@ -1,6 +1,6 @@ // Check that temporaries in if-let guards are correctly scoped. -// build-pass +//@ build-pass // -Zvalidate-mir #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs index dba292ef9e21c..32a223c915951 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs @@ -1,5 +1,5 @@ // Check shadowing in if let guards works as expected. -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs index ef7a772e6c513..9d20709ee9baa 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs b/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs index 1ec20c50034bd..8f2cdcb6e1a39 100644 --- a/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs +++ b/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs b/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs index 762dfbe484396..30ef39038a068 100644 --- a/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs +++ b/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs @@ -1,6 +1,6 @@ // This test should pass since 'identity' is const fn. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { const _FOO: u8 = ::std::convert::identity(42u8); diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs index 542be3942b7ee..9f4e50679ffb7 100644 --- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs +++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results // Tests ensuring that `dbg!(expr)` has the expected run-time behavior. // as well as some compile time properties we expect. diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs index 58a2c271ecfbc..674cf930c0a6a 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs @@ -6,8 +6,8 @@ // unsafe contexts // - functions with `#[target_feature]` can coerce to unsafe fn pointers -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs index fefe100ba0ee1..122ef542e7d63 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs @@ -1,7 +1,7 @@ // Tests #73631: closures inherit `#[target_feature]` annotations -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs index 975d7a1f694c6..2add6b2e18653 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #[target_feature(enable = "sse2")] //~ ERROR can only be applied to `unsafe` functions fn foo() {} diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs index 3ecea5c531390..364b4d3581276 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs index a032a2ca05232..3c370a1b8f321 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs index 0d59e50264e1b..a1c118478677b 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs index 221c0416dbf70..6aa8f6fd821ed 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(start)] #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs index 115f00b3f4e10..6bd810b0956d8 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs @@ -1,7 +1,7 @@ // Tests #108655: closures in `#[target_feature]` functions can still be marked #[inline(always)] -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs index 033dcdfc08db0..57dac2e4adb76 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs index 788c79adc1fd9..c73b8d7e4d29b 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs index 9108f27b5f7f8..df575b0f6b636 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs b/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs index 6d7bca4da24df..c765ca6abb434 100644 --- a/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs +++ b/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that removed keywords are allowed as identifiers. diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs index 1023fee37d5dd..b0a3f2340eb4c 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Résumé; // ['LATIN SMALL LETTER E WITH ACUTE'] diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs index 94327846d6169..d7ce32cde4bba 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[path="auxiliary/mod_file_nonascii_with_path_allowed-aux.rs"] mod řųśť; diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs index e1d836b7c3e34..ba7124fae3905 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod řųśť { const IS_GREAT: bool = true; diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs index d851fac8e644f..e1edde6de19c9 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(let_chains)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs index 69bc189dd3579..8d78264633364 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded fn main() { if let 0 = 1 {} diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout index e737ef26e9b38..1c103f03c3547 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout @@ -4,7 +4,7 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded fn main() { if let 0 = 1 {} } diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs index 2c0571a7bdd3e..392d29a5bfcd3 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn and_chain() { let z; diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs index 9afb6853b3627..bd4df337614a0 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs @@ -1,5 +1,5 @@ -// revisions: allowed disallowed -//[allowed] check-pass +//@ revisions: allowed disallowed +//@[allowed] check-pass #![feature(if_let_guard, let_chains)] #![cfg_attr(allowed, allow(irrefutable_let_patterns))] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs index 3eb8a9ad06020..0234eef0cd00f 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub enum UnOp { Not(Vec<()>), diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs index 6b7d883565085..59c81d053bc76 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs index 7c7e31f4db400..ea4b34eacba5d 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs index bd81ce0b19c06..77756d0bee06b 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zvalidate-mir -C opt-level=3 -// build-pass +//@ compile-flags: -Zvalidate-mir -C opt-level=3 +//@ build-pass #![feature(let_chains)] struct TupleIter> { inner: I, diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs index 6b91c455e0e97..f23702d1d8cb9 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { loop { diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs index fcc09b159ec23..59a29446f8f02 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs index e061174f667d9..6d307be90c121 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard, let_chains)] diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs index 75e48bf4a482a..02915a5dc3729 100644 --- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs +++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_changing_struct_update)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs index 3dfbef0ee90fd..15907bc2ddbf4 100644 --- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs +++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_changing_struct_update)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs index b62cf31205fd3..93c2901fe66ca 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs index 67de50a1d922a..c427cf7af6d65 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs b/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs index 670303906d24c..17b59009bb84f 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs @@ -1,6 +1,6 @@ -// aux-build:param-attrs.rs +//@ aux-build:param-attrs.rs -// check-pass +//@ check-pass extern crate param_attrs; diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs index a6f693bd5b5f4..af13a46564ec6 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait2015 { fn foo(#[allow(C)] i32); } //~^ ERROR expected one of `:`, `@`, or `|`, found `)` diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs index 2de37c859c97a..e35f743d96aad 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --cfg something +//@ check-pass +//@ compile-flags: --cfg something #![deny(unused_mut)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs index 14539d4b6d8fa..babeaf67eb2e0 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs @@ -1,5 +1,5 @@ -// compile-flags: --cfg something -// edition:2018 +//@ compile-flags: --cfg something +//@ edition:2018 #![feature(async_closure)] #![deny(unused_variables)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs index 1183ac65b9a7f..6ed2d4fad0eee 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs @@ -1,6 +1,6 @@ -// aux-build:param-attrs.rs +//@ aux-build:param-attrs.rs -// check-pass +//@ check-pass #![feature(c_variadic)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs b/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs index 54f2f451bbe53..c1e6a92e3174e 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs @@ -1,4 +1,4 @@ -// aux-build:ident-mac.rs +//@ aux-build:ident-mac.rs #![feature(c_variadic)] #![allow(anonymous_parameters)] diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs index 880907b24b469..5ff3cd25e67be 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs @@ -1,15 +1,15 @@ // Tests that dlltool failing to generate an import library will raise an error. -// only-gnu -// only-windows -// needs-dlltool -// compile-flags: --crate-type lib --emit link -// normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" -// normalize-stderr-test: "[^ ]*/foo.def" -> "$$DEF_FILE" -// normalize-stderr-test: "[^ ]*/foo.lib" -> "$$LIB_FILE" -// normalize-stderr-test: "-m [^ ]*" -> "$$TARGET_MACHINE" -// normalize-stderr-test: "-f [^ ]*" -> "$$ASM_FLAGS" -// normalize-stderr-test: "--temp-prefix [^ ]*/foo.dll" -> "$$TEMP_PREFIX" +//@ only-gnu +//@ only-windows +//@ needs-dlltool +//@ compile-flags: --crate-type lib --emit link +//@ normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" +//@ normalize-stderr-test: "[^ ]*/foo.def" -> "$$DEF_FILE" +//@ normalize-stderr-test: "[^ ]*/foo.lib" -> "$$LIB_FILE" +//@ normalize-stderr-test: "-m [^ ]*" -> "$$TARGET_MACHINE" +//@ normalize-stderr-test: "-f [^ ]*" -> "$$ASM_FLAGS" +//@ normalize-stderr-test: "--temp-prefix [^ ]*/foo.dll" -> "$$TEMP_PREFIX" #[link(name = "foo", kind = "raw-dylib")] extern "C" { // `@1` is an invalid name to export, as it usually indicates that something diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs index 7bc44d65be9e5..50ad8a173adc3 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = 6)] //~^ ERROR import name type must be of the form `import_name_type = "string"` extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs index b96f61a26da8b..cf456b9b2614e 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated", import_name_type = "decorated")] //~^ ERROR multiple `import_name_type` arguments in a single `#[link]` attribute extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs index 067e82a17fdc5..b3859ba1ce603 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "unknown")] //~^ ERROR unknown import name type `unknown`, expected one of: decorated, noprefix, undecorated extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs index 34e907bde839a..3ead5cb1fd7ae 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", import_name_type = "decorated")] //~^ ERROR import name type can only be used with link kind `raw-dylib` extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs index 346ea18a8f8eb..ab0dcda64e635 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs @@ -1,5 +1,5 @@ -// only-windows -// ignore-x86 +//@ only-windows +//@ ignore-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")] //~^ ERROR import name type is only supported on x86 extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs index a07be9d92b4ed..ac6a2998a4762 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs @@ -1,8 +1,8 @@ // Tests that failing to run dlltool will raise an error. -// only-gnu -// only-windows -// compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe +//@ only-gnu +//@ only-windows +//@ compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe #[link(name = "foo", kind = "raw-dylib")] extern "C" { fn f(x: i32); diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs index 8842cb944045f..f5fb1649cdc43 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs @@ -1,4 +1,4 @@ -// only-windows +//@ only-windows #[link(name = "foo", kind = "raw-dylib")] extern "C" { #[link_ordinal(1)] //~ ERROR multiple `link_ordinal` attributes diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs index b4173f3b60bce..bf3c5e4d435d1 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs @@ -1,6 +1,6 @@ -// only-x86 -// only-windows -// compile-flags: --crate-type lib --emit link +//@ only-x86 +//@ only-windows +//@ compile-flags: --crate-type lib --emit link #![allow(clashing_extern_declarations)] #[link(name = "foo", kind = "raw-dylib")] extern "C" { diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs index d4c6658a33024..3b982857db8dc 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs @@ -1,5 +1,5 @@ -// ignore-windows -// compile-flags: --crate-type lib +//@ ignore-windows +//@ compile-flags: --crate-type lib #[link(name = "foo", kind = "raw-dylib")] //~^ ERROR: link kind `raw-dylib` is only supported on Windows targets extern "C" {} diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs index 2f5a23e47a749..48af6b009d3f1 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// only-windows -// compile-flags: --crate-type lib --emit link +//@ only-x86_64 +//@ only-windows +//@ compile-flags: --crate-type lib --emit link #[link(name = "foo", kind = "raw-dylib")] extern "stdcall" { fn f(x: i32); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs index d8573d3af014c..6b55e82629bbc 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs @@ -1,7 +1,7 @@ // FIXME(effects): Collapse the revisions into one once we support `::Proj`. -// revisions: unqualified qualified -//[unqualified] check-pass -//[qualified] known-bug: unknown +//@ revisions: unqualified qualified +//@[unqualified] check-pass +//@[qualified] known-bug: unknown #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs index 2190fa337b49f..8213dae136959 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs @@ -1,7 +1,7 @@ // FIXME(effects): Collapse the revisions into one once we support `::Proj`. -// revisions: unqualified qualified -//[unqualified] check-pass -//[qualified] known-bug: unknown +//@ revisions: unqualified qualified +//@[unqualified] check-pass +//@[qualified] known-bug: unknown #![feature(const_trait_impl, effects, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs index ae0c2e6bcfa41..b854b422b3a99 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs index 50c46579086c6..b63458b39e95d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs index 0df370bff8dac..37b2de0fd2d49 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs @@ -1,6 +1,6 @@ //! Basic test for calling methods on generic type parameters in `const fn`. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs index b0d5d06851526..ea8fd00556191 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs index e197c8b73c535..9dbc2b9562689 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs index abd5d2fdb393b..55d8afa8d47c6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs @@ -1,6 +1,6 @@ //! Basic test for calling methods on generic type parameters in `const fn`. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs index e85976b7e1dc9..1150d7e1059f1 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_closures, const_trait_impl, effects)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs index 9ba19e800dd65..6b96fcf0ae31d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs index 15f062edf0ede..b1b0e68b90db7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl, const_closures)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs index b4cc7a9e17e64..8c6286426d324 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs index fd9f287250d2e..ebee4daefbea3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs index 1fe4044d5279b..98f8d039cd643 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs index 7f89c12804b65..b0790f86ef54f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs index 747ccbf0fabc0..17817a460d799 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs index 1c37648ff1cba..a9640816b893d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs @@ -1,6 +1,6 @@ -// known-bug: #110395 +//@ known-bug: #110395 -// revisions: stock precise +//@ revisions: stock precise #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs index 75797b1cbfee4..4ab1704a9fbbf 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs @@ -1,6 +1,6 @@ // FIXME run-pass -// known-bug: #110395 -// revisions: stock precise +//@ known-bug: #110395 +//@ revisions: stock precise #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs index f3480fcc9eed4..f6bba19a19eae 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![allow(internal_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs index fc3a83876c5bb..bd6f476f8792a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs index 9d579e67a4be4..91f1b90bdc046 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // Broken until we have `&T: const Deref` impl in stdlib #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs index a00a6d481050d..79719dae44f7c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects)] -// edition: 2021 +//@ edition: 2021 #[const_trait] trait Trait {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs index 1ebebe632c70a..cf452cf852687 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs index ce39045d71b38..5896091f8c472 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(derive_const, effects)] pub struct A; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs index 42d7283699fae..cb649b1ec7970 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs index b479c967b0dab..0eb422728c631 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(derive_const)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs index 34a0ba1e271e5..54e5c95c259ff 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs @@ -1,11 +1,11 @@ // This tests that `const_trait` default methods can // be called from a const context when used across crates. // -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs index 95edbdc0efa10..587dd70c18b29 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs @@ -1,8 +1,8 @@ -// revisions: stock gated stocknc gatednc -// [gated] check-pass +//@ revisions: stock gated stocknc gatednc +//@ [gated] check-pass #![cfg_attr(any(gated, gatednc), feature(const_trait_impl, effects))] -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs index f5644c8883d8d..b534d23b1076a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// check-pass +//@ known-bug: #110395 +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs index 13881e042a32e..8b264ebd0e42a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This was an ICE, because the compiler ensures the // function to be const when performing const checking, diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs index 5a0db816a2bc0..8b51f65fd04ff 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, rustc_attrs, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs index 3c39c53de5f0a..443b638573576 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, rustc_attrs)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs index 7d811a2cc1f35..a1c0425b24e38 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(effects) this shouldn't pass #![feature(const_closures, const_trait_impl, effects)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs index e216f68791334..d35e9bb7f1efd 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs @@ -1,7 +1,7 @@ // Ensure that we don't get a mismatch error when inserting the host param // at the end of generic args when the generics have defaulted params. // -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs index da2778f610189..aa75aa9c989d6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs index 17f203e1565ec..502062a559c11 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // gate-test-effects // ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs index 1954d2942e0bb..53f8e3c56d761 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs index 2f474d978d3b3..85aabe46640e7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] const fn a() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs index d6a82ca3a08b0..5ee38078a2950 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs, staged_api)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs index 8e4850197de5e..97052a1d09a48 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::{Bar, foo}; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs index e22eed3e0ef57..0592ac2e0e70c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME: effects #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs index 015d90aaf21fa..c36ec3538c364 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs @@ -1,4 +1,4 @@ -// revisions: stock gated +//@ revisions: stock gated // gate-test-const_trait_impl #![cfg_attr(gated, feature(const_trait_impl))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs index 60790e2974661..61826e9977e85 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs index d665c4479c9ab..620e3259917eb 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs index ae81421e9e191..c6fab4aabb6b7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs index f8ac793e4c125..5ead1353bcd96 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] struct S; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs index 9f3f38ad4bc68..2a40a1b86ca28 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs @@ -1,5 +1,5 @@ -// revisions: nn ny yn yy -// check-pass +//@ revisions: nn ny yn yy +//@ check-pass #![feature(const_trait_impl, associated_type_defaults, const_mut_refs)] #[cfg_attr(any(yn, yy), const_trait)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs index df242721bc31a..e5394ddd688e3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] struct Bug { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs index d81724a3685ae..c032cc7a68803 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: fn(&String) = |s| { &*s as &str; }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs index 5127ec069be9f..08739de831389 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs index fdb422201d207..64fa32156c39a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs @@ -1,6 +1,6 @@ // Regression test for #92111. // -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs index 4d34696539485..825ddb6a5cdb9 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs @@ -1,6 +1,6 @@ // Regression test for #92230. // -// check-pass +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs index d06d0d6dd1088..73f8af86bd050 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// revisions: stock gated +//@ known-bug: #110395 +//@ revisions: stock gated #![cfg_attr(gated, feature(const_trait_impl))] const fn foo(input: &'static str) { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs index 2304a766aaff5..820d3d63b62d1 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs @@ -6,7 +6,7 @@ // `?$Trait:path` would never be reached. // See `parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs`. -// check-pass +//@ check-pass macro_rules! check { ($Type:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs index 9105cb6b0438c..99806922ba556 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs @@ -2,7 +2,7 @@ // introduction of const trait bounds. // Setting the edition to 2018 since we don't regress `demo! { dyn const }` in Rust <2018. -// edition:2018 +//@ edition:2018 macro_rules! demo { ($ty:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs index 817e9ee5257d6..9d65a2ac30260 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs @@ -1,7 +1,7 @@ // Ensure that the introduction of const trait bound didn't regress this code in Rust 2015. // See also `mbe-const-trait-bound-theoretical-regression.rs`. -// check-pass +//@ check-pass macro_rules! check { ($ty:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs index 0b423b340226d..d43fabcedec55 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, lazy_cell)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs index dff8a244453af..8f11c8a6e5576 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs index 234b0dd006380..fe4df09342f77 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs @@ -1,6 +1,6 @@ // Tests that trait bounds on specializing trait impls must be `~const` if the // same bound is present on the default impl and is `~const` there. -// check-pass +//@ check-pass // FIXME(effects) ^ should error #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs index b6cb24d15fe0c..6153e2770a4b0 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs @@ -1,7 +1,7 @@ // Tests that a const default trait impl can be specialized by another const // trait impl and that the specializing impl will be used during const-eval. -// run-pass +//@ run-pass #![feature(const_trait_impl, effects)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs index 2aac0a2b4d111..bc45a70777ca5 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs index 92d8be6bb1666..d80370aee8209 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs @@ -1,6 +1,6 @@ // Tests that `~const` trait bounds can be used to specialize const trait impls. -// check-pass +//@ check-pass #![feature(const_trait_impl)] #![feature(rustc_attrs)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs index 51bfaf73b57b4..d97469edaf97f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs @@ -2,7 +2,7 @@ // `T: Foo` in the default impl for the purposes of specialization (i.e., it // does not think that the user is attempting to specialize on trait `Foo`). -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs index 84c7926f4152c..fc8fc3f2a1d9c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs @@ -1,6 +1,6 @@ // Tests that a non-const default impl can be specialized by a const trait impl, // but that the default impl cannot be used in a const context. -// known-bug: #110395 +//@ known-bug: #110395 // FIXME run-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs index e0c20b819e84f..5218ea925661e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] -// known-bug: #110395 +//@ known-bug: #110395 #[rustc_specialization_trait] #[const_trait] pub trait Sup {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs index fc0d82727b553..c4ecb8f67a187 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs @@ -1,4 +1,4 @@ -// aux-build: staged-api.rs +//@ aux-build: staged-api.rs extern crate staged_api; use staged_api::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs index 2468d51cfdd17..31ca9419589cb 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs @@ -1,11 +1,11 @@ -// revisions: stable unstable +//@ revisions: stable unstable #![cfg_attr(unstable, feature(unstable))] // The feature from the ./auxiliary/staged-api.rs file. #![feature(const_trait_impl, effects)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] -// aux-build: staged-api.rs +//@ aux-build: staged-api.rs extern crate staged_api; use staged_api::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs index 4520a36960c7b..062067f8e8505 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct S T = fn() -> T> { f: F, x: Option, diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs index e9e5e0235df33..a9e2ff06290a8 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs @@ -1,7 +1,7 @@ // This tests feature gates for const impls in the standard library. -// revisions: stock gated -//[gated] known-bug: #110395 +//@ revisions: stock gated +//@[gated] known-bug: #110395 #![cfg_attr(gated, feature(const_trait_impl, const_default_impls))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs index 120399f0c787f..6d57a4f5798f6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects)] -// revisions: yy yn ny nn +//@ revisions: yy yn ny nn #[cfg_attr(any(yy, yn), const_trait)] trait Foo { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs index 745668c4dd43d..1e02a13510013 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs @@ -1,7 +1,7 @@ #![feature(const_trait_impl, effects)] -// revisions: yy yn ny nn -//[yy] check-pass +//@ revisions: yy yn ny nn +//@[yy] check-pass #[cfg_attr(any(yy, yn), const_trait)] trait Foo { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs index b3853def7213e..0bbf2dabffe57 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #110395 +//@ check-pass +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs index 92becf7c4aff6..0515380564d4e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs index 7ac2458e39928..1064713ac592c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z parse-only -// check-pass +//@ compile-flags: -Z parse-only +//@ check-pass #![feature(const_trait_bound_opt_out)] #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs index a848b6d2fc9f2..ad0f10f7ee832 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs @@ -1,5 +1,5 @@ // Regression test for issue #119700. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs index bfd9fe42e67ae..5c8f5f4db3b54 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs index 9b3c2cf2a3b04..496f97b5e24aa 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z parse-only -// check-pass +//@ compile-flags: -Z parse-only +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs index 4c383fe150674..b400678308291 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs index 06e4ede8b5e7e..c3f9f8e676480 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs index aa3b09ec9662a..f41e70c99ff8a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(staged_api)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs index 7d7cb967c6619..8a901cc60fd46 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct LazyLock { data: (Option, fn() -> T), diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs index 94be3ff46acf9..364ddfcc8ddd5 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs @@ -2,7 +2,7 @@ // Checking the validity of traits' where clauses happen at a later stage. // (`rustc_const_eval` instead of `rustc_hir_analysis`) Therefore one file as a // test is not enough. -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs index 5439f859a03e8..65e605a4a2fec 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs index c578813b84683..18d0267fed365 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs index 0907061d64a1b..e7c560a2c3514 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs @@ -1,6 +1,6 @@ -// force-host -// edition: 2018 -// no-prefer-dynamic +//@ force-host +//@ edition: 2018 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs index 5609dc51a67ed..5908887c4c7a3 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 fn main() { assert_eq!(b"test\0", c"test".to_bytes_with_nul()); diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs index 2a4cd60042609..a503f2bf7a82c 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs @@ -1,9 +1,9 @@ // Regression test for issue #113235. -// check-pass -// revisions: edition2015 edition2018 -//[edition2015] edition: 2015 -//[edition2018] edition: 2018 +//@ check-pass +//@ revisions: edition2015 edition2018 +//@[edition2015] edition: 2015 +//@[edition2018] edition: 2018 // Make sure that in pre-2021 editions we continue to parse the snippet // `c"hello"` as an identifier followed by a (normal) string literal and diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs index b3557c71b744e..57c1ba055608c 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs @@ -3,10 +3,10 @@ // // adapted from tests/ui/rust-2021/reserved-prefixes-via-macro.rs -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass -// aux-build: count.rs +//@ aux-build: count.rs extern crate count; const _: () = { diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs index 2f9ca09f3a5de..a082521f4b5b8 100644 Binary files a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs and b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs differ diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs index 8a5f514db7f61..4b18fa3974361 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 fn main() { assert_eq!( diff --git a/tests/ui/rmeta/auxiliary/rmeta-meta.rs b/tests/ui/rmeta/auxiliary/rmeta-meta.rs index 6d43504952729..f26a97e2ebe7a 100644 --- a/tests/ui/rmeta/auxiliary/rmeta-meta.rs +++ b/tests/ui/rmeta/auxiliary/rmeta-meta.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ compile-flags: --emit=metadata #![crate_type="rlib"] diff --git a/tests/ui/rmeta/emit-artifact-notifications.rs b/tests/ui/rmeta/emit-artifact-notifications.rs index 984a7fabb6633..693f406683dbb 100644 --- a/tests/ui/rmeta/emit-artifact-notifications.rs +++ b/tests/ui/rmeta/emit-artifact-notifications.rs @@ -1,6 +1,6 @@ -// compile-flags:--emit=metadata --error-format=json --json artifacts -// build-pass -// ignore-pass +//@ compile-flags:--emit=metadata --error-format=json --json artifacts +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // A very basic test for the emission of artifact notifications in JSON output. diff --git a/tests/ui/rmeta/emit-metadata-obj.rs b/tests/ui/rmeta/emit-metadata-obj.rs index 334c7cc5b8101..b39b7cb0dacae 100644 --- a/tests/ui/rmeta/emit-metadata-obj.rs +++ b/tests/ui/rmeta/emit-metadata-obj.rs @@ -1,5 +1,5 @@ -// compile-flags:--emit=metadata,obj -// build-pass +//@ compile-flags:--emit=metadata,obj +//@ build-pass // A test for the emission of metadata + obj and other metadata + non-link // combinations. See issue #81117. diff --git a/tests/ui/rmeta/no_optitimized_mir.rs b/tests/ui/rmeta/no_optitimized_mir.rs index c503005f16baf..7d2e1b87215fd 100644 --- a/tests/ui/rmeta/no_optitimized_mir.rs +++ b/tests/ui/rmeta/no_optitimized_mir.rs @@ -1,6 +1,6 @@ -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// build-fail +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ build-fail // Check that we do not ICE when we need optimized MIR but it is missing. diff --git a/tests/ui/rmeta/rmeta-lib-pass.rs b/tests/ui/rmeta/rmeta-lib-pass.rs index fdd0516e4d654..386fea5556c69 100644 --- a/tests/ui/rmeta/rmeta-lib-pass.rs +++ b/tests/ui/rmeta/rmeta-lib-pass.rs @@ -1,7 +1,7 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-rlib.rs -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-rlib.rs +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) // Check that building a metadata crate works with a dependent, rlib crate. // This is a cfail test since there is no executable to run. diff --git a/tests/ui/rmeta/rmeta-pass.rs b/tests/ui/rmeta/rmeta-pass.rs index 4f0db23f47dd9..34b9166a98414 100644 --- a/tests/ui/rmeta/rmeta-pass.rs +++ b/tests/ui/rmeta/rmeta-pass.rs @@ -1,7 +1,7 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) // Check that building a metadata crate works with a dependent, metadata-only // crate. diff --git a/tests/ui/rmeta/rmeta-priv-warn.rs b/tests/ui/rmeta/rmeta-priv-warn.rs index 430c1f06f43ac..d41eb95ba3fb2 100644 --- a/tests/ui/rmeta/rmeta-priv-warn.rs +++ b/tests/ui/rmeta/rmeta-priv-warn.rs @@ -1,6 +1,6 @@ -// compile-flags: --emit=metadata -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/tests/ui/rmeta/rmeta.rs b/tests/ui/rmeta/rmeta.rs index 63ed236505e2d..4d8cff8e60e8c 100644 --- a/tests/ui/rmeta/rmeta.rs +++ b/tests/ui/rmeta/rmeta.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ compile-flags: --emit=metadata // Check that building a metadata crate finds an error. diff --git a/tests/ui/rmeta/rmeta_lib.rs b/tests/ui/rmeta/rmeta_lib.rs index fa6826450c964..1be4ee8de7937 100644 --- a/tests/ui/rmeta/rmeta_lib.rs +++ b/tests/ui/rmeta/rmeta_lib.rs @@ -1,7 +1,7 @@ -// build-fail -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found +//@ build-fail +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found // Check that building a non-metadata crate fails if a dependent crate is // metadata-only. diff --git a/tests/ui/rmeta/rmeta_meta_main.rs b/tests/ui/rmeta/rmeta_meta_main.rs index 839f350d74130..0dfafffe770e7 100644 --- a/tests/ui/rmeta/rmeta_meta_main.rs +++ b/tests/ui/rmeta/rmeta_meta_main.rs @@ -1,6 +1,6 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-meta.rs -// no-prefer-dynamic +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic // Check that building a metadata crate finds an error with a dependent, // metadata-only crate. diff --git a/tests/ui/runtime/atomic-print.rs b/tests/ui/runtime/atomic-print.rs index fe57910530f85..aa3183885bfce 100644 --- a/tests/ui/runtime/atomic-print.rs +++ b/tests/ui/runtime/atomic-print.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(deprecated)] -// ignore-emscripten no threads support -// ignore-sgx no processes +//@ ignore-emscripten no threads support +//@ ignore-sgx no processes use std::{env, fmt, process, sync, thread}; diff --git a/tests/ui/runtime/backtrace-debuginfo-aux.rs b/tests/ui/runtime/backtrace-debuginfo-aux.rs index 1411bcf89e87f..24180ed219665 100644 --- a/tests/ui/runtime/backtrace-debuginfo-aux.rs +++ b/tests/ui/runtime/backtrace-debuginfo-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-test: not a test, used by backtrace-debuginfo.rs to test file!() +//@ run-pass +//@ ignore-test: not a test, used by backtrace-debuginfo.rs to test file!() #[inline(never)] pub fn callback(f: F) where F: FnOnce((&'static str, u32)) { diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs index 5d233b38dbe20..49f153fabdac1 100644 --- a/tests/ui/runtime/backtrace-debuginfo.rs +++ b/tests/ui/runtime/backtrace-debuginfo.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We disable tail merging here because it can't preserve debuginfo and thus // potentially breaks the backtraces. Also, subtle changes can decide whether // tail merging succeeds, so the test might work today but fail tomorrow due to a @@ -6,12 +6,12 @@ // Unfortunately, LLVM has no "disable" option for this, so we have to set // "enable" to 0 instead. -// compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0 -// compile-flags:-Cforce-frame-pointers=yes -// compile-flags:-Cstrip=none -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes -// ignore-fuchsia Backtrace not symbolized, trace different line alignment +//@ compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0 +//@ compile-flags:-Cforce-frame-pointers=yes +//@ compile-flags:-Cstrip=none +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes +//@ ignore-fuchsia Backtrace not symbolized, trace different line alignment use std::env; diff --git a/tests/ui/runtime/native-print-no-runtime.rs b/tests/ui/runtime/native-print-no-runtime.rs index f17c9fa6ca937..f0ed7d97b2caf 100644 --- a/tests/ui/runtime/native-print-no-runtime.rs +++ b/tests/ui/runtime/native-print-no-runtime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(start)] diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs index ff45ace7857a9..e8e0e847a8eb2 100644 --- a/tests/ui/runtime/out-of-stack.rs +++ b/tests/ui/runtime/out-of-stack.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unconditional_recursion)] -// ignore-android: FIXME (#20004) -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) -// ignore-nto no stack overflow handler used (no alternate stack available) +//@ ignore-android: FIXME (#20004) +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) +//@ ignore-nto no stack overflow handler used (no alternate stack available) #![feature(core_intrinsics)] #![feature(rustc_private)] diff --git a/tests/ui/runtime/rt-explody-panic-payloads.rs b/tests/ui/runtime/rt-explody-panic-payloads.rs index 755d3df42deed..bd3624a8aee3d 100644 --- a/tests/ui/runtime/rt-explody-panic-payloads.rs +++ b/tests/ui/runtime/rt-explody-panic-payloads.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/runtime/running-with-no-runtime.rs b/tests/ui/runtime/running-with-no-runtime.rs index c321e86dc1821..8430e826dc37c 100644 --- a/tests/ui/runtime/running-with-no-runtime.rs +++ b/tests/ui/runtime/running-with-no-runtime.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes #![feature(start)] diff --git a/tests/ui/runtime/signal-alternate-stack-cleanup.rs b/tests/ui/runtime/signal-alternate-stack-cleanup.rs index 37c602ae0b039..3b7bb0d505d3b 100644 --- a/tests/ui/runtime/signal-alternate-stack-cleanup.rs +++ b/tests/ui/runtime/signal-alternate-stack-cleanup.rs @@ -1,13 +1,13 @@ -// run-pass +//@ run-pass // Previously memory for alternate signal stack have been unmapped during // main thread exit while still being in use by signal handlers. This test // triggers this situation by sending signal from atexit handler. // -// ignore-wasm32-bare no libc -// ignore-windows -// ignore-sgx no libc -// ignore-vxworks no SIGWINCH in user space -// ignore-nto no SA_ONSTACK +//@ ignore-wasm32-bare no libc +//@ ignore-windows +//@ ignore-sgx no libc +//@ ignore-vxworks no SIGWINCH in user space +//@ ignore-nto no SA_ONSTACK #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/runtime/stdout-during-shutdown.rs b/tests/ui/runtime/stdout-during-shutdown.rs index a6cf812ca644e..8549f5d8eb6d9 100644 --- a/tests/ui/runtime/stdout-during-shutdown.rs +++ b/tests/ui/runtime/stdout-during-shutdown.rs @@ -1,6 +1,6 @@ -// run-pass -// check-run-results -// ignore-emscripten +//@ run-pass +//@ check-run-results +//@ ignore-emscripten // Emscripten doesn't flush its own stdout buffers on exit, which would fail // this test. So this test is disabled on this platform. diff --git a/tests/ui/rust-2018/async-ident-allowed.rs b/tests/ui/rust-2018/async-ident-allowed.rs index 8efcfbb707424..342fafc67e20a 100644 --- a/tests/ui/rust-2018/async-ident-allowed.rs +++ b/tests/ui/rust-2018/async-ident-allowed.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![deny(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/async-ident.fixed b/tests/ui/rust-2018/async-ident.fixed index e909c79070ca7..4e31f674435b8 100644 --- a/tests/ui/rust-2018/async-ident.fixed +++ b/tests/ui/rust-2018/async-ident.fixed @@ -1,8 +1,8 @@ #![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] #![deny(keyword_idents)] -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix fn r#async() {} //~ ERROR async //~^ WARN this is accepted in the current edition diff --git a/tests/ui/rust-2018/async-ident.rs b/tests/ui/rust-2018/async-ident.rs index 2bfbc3871d128..4c5134a292321 100644 --- a/tests/ui/rust-2018/async-ident.rs +++ b/tests/ui/rust-2018/async-ident.rs @@ -1,8 +1,8 @@ #![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] #![deny(keyword_idents)] -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix fn async() {} //~ ERROR async //~^ WARN this is accepted in the current edition diff --git a/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs index 7472443dcee98..d8e5eb884cfcc 100644 --- a/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs +++ b/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2018/dyn-keyword.fixed b/tests/ui/rust-2018/dyn-keyword.fixed index 044824cbbd367..e0233382e85ed 100644 --- a/tests/ui/rust-2018/dyn-keyword.fixed +++ b/tests/ui/rust-2018/dyn-keyword.fixed @@ -1,5 +1,5 @@ -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(unused_variables)] #![deny(keyword_idents)] diff --git a/tests/ui/rust-2018/dyn-keyword.rs b/tests/ui/rust-2018/dyn-keyword.rs index 5989cfa1c799a..876e83b5e89e6 100644 --- a/tests/ui/rust-2018/dyn-keyword.rs +++ b/tests/ui/rust-2018/dyn-keyword.rs @@ -1,5 +1,5 @@ -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(unused_variables)] #![deny(keyword_idents)] diff --git a/tests/ui/rust-2018/dyn-trait-compatibility.rs b/tests/ui/rust-2018/dyn-trait-compatibility.rs index 377c85fef490a..6ffc3f8d37932 100644 --- a/tests/ui/rust-2018/dyn-trait-compatibility.rs +++ b/tests/ui/rust-2018/dyn-trait-compatibility.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type A0 = dyn; type A1 = dyn::dyn; //~ERROR expected identifier, found keyword `dyn` diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed index 3bfa6d2c25410..fbe415e2e10cb 100644 --- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs index 14039626545c3..72a212453cdb5 100644 --- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs +++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed index 8cdb08e81b907..38d8a36bcdfa8 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed +++ b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-lint-infer-outlives-macro.rs -// run-rustfix +//@ edition:2018 +//@ aux-build:edition-lint-infer-outlives-macro.rs +//@ run-rustfix #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs index 647906c2dc228..60eedf7b069ad 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs +++ b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-lint-infer-outlives-macro.rs -// run-rustfix +//@ edition:2018 +//@ aux-build:edition-lint-infer-outlives-macro.rs +//@ run-rustfix #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives.fixed b/tests/ui/rust-2018/edition-lint-infer-outlives.fixed index 5058d61b58802..c4948051c18ea 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives.fixed +++ b/tests/ui/rust-2018/edition-lint-infer-outlives.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives.rs b/tests/ui/rust-2018/edition-lint-infer-outlives.rs index 3f63cb8e90030..c80e91ca12cb7 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives.rs +++ b/tests/ui/rust-2018/edition-lint-infer-outlives.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed index fd23e9f5562b8..7ec421099c7ab 100644 --- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs index f3fb012a5842e..135908c8aef97 100644 --- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs +++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-paths.fixed index 0e47e70bb02ab..742732ebc494b 100644 --- a/tests/ui/rust-2018/edition-lint-nested-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-nested-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.rs b/tests/ui/rust-2018/edition-lint-nested-paths.rs index d261c10e36dbe..861ca521bb7b0 100644 --- a/tests/ui/rust-2018/edition-lint-nested-paths.rs +++ b/tests/ui/rust-2018/edition-lint-nested-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-paths-2018.rs b/tests/ui/rust-2018/edition-lint-paths-2018.rs index 2005d8f4d7941..bd304b9ad62ea 100644 --- a/tests/ui/rust-2018/edition-lint-paths-2018.rs +++ b/tests/ui/rust-2018/edition-lint-paths-2018.rs @@ -1,7 +1,7 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags:--extern edition_lint_paths -// aux-build:edition-lint-paths.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags:--extern edition_lint_paths +//@ aux-build:edition-lint-paths.rs #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-paths.fixed b/tests/ui/rust-2018/edition-lint-paths.fixed index 5057453c92699..014bf91886f7a 100644 --- a/tests/ui/rust-2018/edition-lint-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-paths.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused)] diff --git a/tests/ui/rust-2018/edition-lint-paths.rs b/tests/ui/rust-2018/edition-lint-paths.rs index 2c4a070ce8397..0ecd090c1dffe 100644 --- a/tests/ui/rust-2018/edition-lint-paths.rs +++ b/tests/ui/rust-2018/edition-lint-paths.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused)] diff --git a/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs b/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs index 950ad1f504681..2f50c68c55b99 100644 --- a/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs +++ b/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed index e51ce5d1d5b83..fcab56ac819d4 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed +++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths +//@ edition:2018 // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs index debbf085d6182..717e1a039825c 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs +++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths +//@ edition:2018 // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.fixed b/tests/ui/rust-2018/extern-crate-idiomatic.fixed index 6a0639099b145..9d7492fd1d0d9 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic.fixed +++ b/tests/ui/rust-2018/extern-crate-idiomatic.fixed @@ -1,7 +1,7 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ compile-flags:--extern edition_lint_paths +//@ run-rustfix // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.rs b/tests/ui/rust-2018/extern-crate-idiomatic.rs index 6a0639099b145..9d7492fd1d0d9 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic.rs +++ b/tests/ui/rust-2018/extern-crate-idiomatic.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ compile-flags:--extern edition_lint_paths +//@ run-rustfix // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed index c4a3dd9415c29..8be9c004952d1 100644 --- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed +++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed @@ -1,6 +1,6 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: `edition_lint_paths` is accessed via this `self` path // rather than being accessed directly. Unless we rewrite that path, diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs index c4a3dd9415c29..8be9c004952d1 100644 --- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs +++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: `edition_lint_paths` is accessed via this `self` path // rather than being accessed directly. Unless we rewrite that path, diff --git a/tests/ui/rust-2018/extern-crate-rename.fixed b/tests/ui/rust-2018/extern-crate-rename.fixed index 5e2bf64a2e28b..36b5280299038 100644 --- a/tests/ui/rust-2018/extern-crate-rename.fixed +++ b/tests/ui/rust-2018/extern-crate-rename.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: crate is renamed, making it harder for us to rewrite // paths. We don't (and we leave the `extern crate` in place). diff --git a/tests/ui/rust-2018/extern-crate-rename.rs b/tests/ui/rust-2018/extern-crate-rename.rs index 290fcd6b7db7f..725e3aaa0726c 100644 --- a/tests/ui/rust-2018/extern-crate-rename.rs +++ b/tests/ui/rust-2018/extern-crate-rename.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: crate is renamed, making it harder for us to rewrite // paths. We don't (and we leave the `extern crate` in place). diff --git a/tests/ui/rust-2018/extern-crate-submod.fixed b/tests/ui/rust-2018/extern-crate-submod.fixed index dd31710414cd4..dc864d8703923 100644 --- a/tests/ui/rust-2018/extern-crate-submod.fixed +++ b/tests/ui/rust-2018/extern-crate-submod.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: extern crate appears in a submodule, making it harder for // us to rewrite paths. We don't (and we leave the `extern crate` in diff --git a/tests/ui/rust-2018/extern-crate-submod.rs b/tests/ui/rust-2018/extern-crate-submod.rs index cb0cd7a833136..f15bc6bced8c8 100644 --- a/tests/ui/rust-2018/extern-crate-submod.rs +++ b/tests/ui/rust-2018/extern-crate-submod.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: extern crate appears in a submodule, making it harder for // us to rewrite paths. We don't (and we leave the `extern crate` in diff --git a/tests/ui/rust-2018/future-proofing-locals.rs b/tests/ui/rust-2018/future-proofing-locals.rs index 2c388cf3713b0..77c704dfedae3 100644 --- a/tests/ui/rust-2018/future-proofing-locals.rs +++ b/tests/ui/rust-2018/future-proofing-locals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/issue-51008-1.rs b/tests/ui/rust-2018/issue-51008-1.rs index 67dfbf6460133..8ecbd6f9d37fd 100644 --- a/tests/ui/rust-2018/issue-51008-1.rs +++ b/tests/ui/rust-2018/issue-51008-1.rs @@ -2,7 +2,7 @@ // being incorrectly considered part of the "elided lifetimes" from // the impl. // -// check-pass +//@ check-pass trait A { diff --git a/tests/ui/rust-2018/issue-51008.rs b/tests/ui/rust-2018/issue-51008.rs index f9e4bc14ec82c..e04e6cf30b8fe 100644 --- a/tests/ui/rust-2018/issue-51008.rs +++ b/tests/ui/rust-2018/issue-51008.rs @@ -2,7 +2,7 @@ // being incorrectly considered part of the "elided lifetimes" from // the impl. // -// check-pass +//@ check-pass trait A { diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.rs b/tests/ui/rust-2018/issue-52202-use-suggestions.rs index 1c0426808c705..ce9a5edf007f9 100644 --- a/tests/ui/rust-2018/issue-52202-use-suggestions.rs +++ b/tests/ui/rust-2018/issue-52202-use-suggestions.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // The local `use` suggestion should start with `crate::` (but the // standard-library suggestions should not, obviously). diff --git a/tests/ui/rust-2018/issue-54006.rs b/tests/ui/rust-2018/issue-54006.rs index 6f929731c7674..277f658026b85 100644 --- a/tests/ui/rust-2018/issue-54006.rs +++ b/tests/ui/rust-2018/issue-54006.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![no_std] #![crate_type = "lib"] diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed index d592438009a48..2625cdc8b4898 100644 --- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed +++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths --cfg blandiloquence +//@ edition:2018 #![deny(rust_2018_idioms)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs index a948baee53c4c..eff03c6fbe63a 100644 --- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs +++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths --cfg blandiloquence +//@ edition:2018 #![deny(rust_2018_idioms)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/local-path-suggestions-2015.rs b/tests/ui/rust-2018/local-path-suggestions-2015.rs index 32e9c0c33661d..378b112c40cb2 100644 --- a/tests/ui/rust-2018/local-path-suggestions-2015.rs +++ b/tests/ui/rust-2018/local-path-suggestions-2015.rs @@ -1,6 +1,6 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2015 +//@ aux-build:baz.rs +//@ compile-flags:--extern baz +//@ edition:2015 // This test exists to demonstrate the behaviour of the import suggestions // from the `local-path-suggestions-2018.rs` test when not using the 2018 edition. diff --git a/tests/ui/rust-2018/local-path-suggestions-2018.rs b/tests/ui/rust-2018/local-path-suggestions-2018.rs index 5eafbb2c2fc66..bdf83ad8b8ff5 100644 --- a/tests/ui/rust-2018/local-path-suggestions-2018.rs +++ b/tests/ui/rust-2018/local-path-suggestions-2018.rs @@ -1,6 +1,6 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2018 +//@ aux-build:baz.rs +//@ compile-flags:--extern baz +//@ edition:2018 mod foo { pub type Bar = u32; diff --git a/tests/ui/rust-2018/macro-use-warned-against.rs b/tests/ui/rust-2018/macro-use-warned-against.rs index 72f2868e0bfd6..1e78acf201da7 100644 --- a/tests/ui/rust-2018/macro-use-warned-against.rs +++ b/tests/ui/rust-2018/macro-use-warned-against.rs @@ -1,6 +1,6 @@ -// aux-build:macro-use-warned-against.rs -// aux-build:macro-use-warned-against2.rs -// check-pass +//@ aux-build:macro-use-warned-against.rs +//@ aux-build:macro-use-warned-against2.rs +//@ check-pass #![warn(macro_use_extern_crate, unused)] diff --git a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs index 37e00a3936e7a..ce29fc51a4fda 100644 --- a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs +++ b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// force-host -// no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/remove-extern-crate.fixed b/tests/ui/rust-2018/remove-extern-crate.fixed index 209b91af1ddfb..f025ccfeaeb33 100644 --- a/tests/ui/rust-2018/remove-extern-crate.fixed +++ b/tests/ui/rust-2018/remove-extern-crate.fixed @@ -1,8 +1,8 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate +//@ run-rustfix +//@ edition:2018 +//@ check-pass +//@ aux-build:remove-extern-crate.rs +//@ compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] #![allow(dropping_copy_types)] diff --git a/tests/ui/rust-2018/remove-extern-crate.rs b/tests/ui/rust-2018/remove-extern-crate.rs index ef3c2db696af2..0312964d5f6f3 100644 --- a/tests/ui/rust-2018/remove-extern-crate.rs +++ b/tests/ui/rust-2018/remove-extern-crate.rs @@ -1,8 +1,8 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate +//@ run-rustfix +//@ edition:2018 +//@ check-pass +//@ aux-build:remove-extern-crate.rs +//@ compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] #![allow(dropping_copy_types)] diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed index d9e39a3b748a0..f94bf2d66d38f 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed @@ -1,8 +1,8 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass +//@ aux-build:suggestions-not-always-applicable.rs +//@ edition:2015 +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs index d9e39a3b748a0..f94bf2d66d38f 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs @@ -1,8 +1,8 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass +//@ aux-build:suggestions-not-always-applicable.rs +//@ edition:2015 +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/trait-import-suggestions.rs b/tests/ui/rust-2018/trait-import-suggestions.rs index 900b3d09334d0..5a5eeacedfcc5 100644 --- a/tests/ui/rust-2018/trait-import-suggestions.rs +++ b/tests/ui/rust-2018/trait-import-suggestions.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:trait-import-suggestions.rs -// compile-flags:--extern trait_import_suggestions +//@ edition:2018 +//@ aux-build:trait-import-suggestions.rs +//@ compile-flags:--extern trait_import_suggestions mod foo { mod foobar { diff --git a/tests/ui/rust-2018/try-ident.fixed b/tests/ui/rust-2018/try-ident.fixed index 985348665c908..b1c446e10226f 100644 --- a/tests/ui/rust-2018/try-ident.fixed +++ b/tests/ui/rust-2018/try-ident.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/try-ident.rs b/tests/ui/rust-2018/try-ident.rs index 2c02b75960ec7..8e62f698e2528 100644 --- a/tests/ui/rust-2018/try-ident.rs +++ b/tests/ui/rust-2018/try-ident.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/try-macro.fixed b/tests/ui/rust-2018/try-macro.fixed index 3308870f654c9..98c48d6b96f67 100644 --- a/tests/ui/rust-2018/try-macro.fixed +++ b/tests/ui/rust-2018/try-macro.fixed @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/try-macro.rs b/tests/ui/rust-2018/try-macro.rs index 69e87a1ff621c..99480b2a3ec1b 100644 --- a/tests/ui/rust-2018/try-macro.rs +++ b/tests/ui/rust-2018/try-macro.rs @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs index 678b4774dba1d..f864779d9e5aa 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test is similar to `ambiguity-macros.rs`, but nested in a module. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs index 56ea726d73ebc..afa7f632945ea 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test is similar to `ambiguity.rs`, but with macros defining local items. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs index 0ef580d7aa53d..adff2bf63f517 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This test is similar to `ambiguity.rs`, but nested in a module. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity.rs b/tests/ui/rust-2018/uniform-paths/ambiguity.rs index 890e8b7b3c037..241bb1f25acae 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs b/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs index 4aa5d1870000d..90a0849659963 100644 --- a/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs +++ b/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub use ignore as built_in_attr; pub use u8 as built_in_type; diff --git a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs index 4cba0949802ad..e0702cfe15923 100644 --- a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 mod my { pub mod sub { diff --git a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs index c902d133e7cec..1ea1ee053236a 100644 --- a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs +++ b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/rust-2018/uniform-paths/cross-crate.rs b/tests/ui/rust-2018/uniform-paths/cross-crate.rs index 0ca7fa37a3096..de03866219cf9 100644 --- a/tests/ui/rust-2018/uniform-paths/cross-crate.rs +++ b/tests/ui/rust-2018/uniform-paths/cross-crate.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:cross-crate.rs +//@ edition:2018 +//@ aux-build:cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rust-2018/uniform-paths/deadlock.rs b/tests/ui/rust-2018/uniform-paths/deadlock.rs index 2427bde6d18bc..4011ba3ee2822 100644 --- a/tests/ui/rust-2018/uniform-paths/deadlock.rs +++ b/tests/ui/rust-2018/uniform-paths/deadlock.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags:--extern foo --extern bar +//@ edition:2018 +//@ compile-flags:--extern foo --extern bar use bar::foo; //~ ERROR can't find crate for `bar` use foo::bar; //~ ERROR can't find crate for `foo` diff --git a/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs b/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs index c6525869b021a..49b920907223d 100644 --- a/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs +++ b/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 fn main() { enum E { A, B, C } diff --git a/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs b/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs index 9af520a07693b..9dcdbb0bce94d 100644 --- a/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs +++ b/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/rust-2018/uniform-paths/issue-54253.rs b/tests/ui/rust-2018/uniform-paths/issue-54253.rs index 7db469945e08c..c6a1da9250f2d 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-54253.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-54253.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Dummy import that previously introduced uniform path canaries. use std; diff --git a/tests/ui/rust-2018/uniform-paths/issue-55779.rs b/tests/ui/rust-2018/uniform-paths/issue-55779.rs index 0af17a89b17bf..350ab324682b4 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-55779.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-55779.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2018 -// aux-crate:issue_55779_extern_trait=issue-55779-extern-trait.rs +//@ run-pass +//@ edition:2018 +//@ aux-crate:issue_55779_extern_trait=issue-55779-extern-trait.rs use issue_55779_extern_trait::Trait; diff --git a/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs b/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs index 9ea7e496d2b41..d349e620efb4b 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: --extern issue_56596_2 -// aux-build:issue-56596-2.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: --extern issue_56596_2 +//@ aux-build:issue-56596-2.rs mod m { use core::any; diff --git a/tests/ui/rust-2018/uniform-paths/issue-56596.rs b/tests/ui/rust-2018/uniform-paths/issue-56596.rs index ec5bb656ad4e7..c1b5d9fad727a 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-56596.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-56596.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags: --extern issue_56596 -// aux-build:issue-56596.rs +//@ edition:2018 +//@ compile-flags: --extern issue_56596 +//@ aux-build:issue-56596.rs mod m { pub mod issue_56596 {} diff --git a/tests/ui/rust-2018/uniform-paths/issue-87932.rs b/tests/ui/rust-2018/uniform-paths/issue-87932.rs index 70a641d8a47ad..d24d4b8b4820b 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-87932.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-87932.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:issue_87932_a=issue-87932-a.rs +//@ edition:2018 +//@ aux-crate:issue_87932_a=issue-87932-a.rs pub struct A {} diff --git a/tests/ui/rust-2018/uniform-paths/macro-rules.rs b/tests/ui/rust-2018/uniform-paths/macro-rules.rs index 1084f5e8b344a..72a1a4116a6b2 100644 --- a/tests/ui/rust-2018/uniform-paths/macro-rules.rs +++ b/tests/ui/rust-2018/uniform-paths/macro-rules.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs b/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs index 44da71de085be..e26807daec9c7 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Built-in attribute use inline as imported_inline; diff --git a/tests/ui/rust-2018/uniform-paths/prelude-fail.rs b/tests/ui/rust-2018/uniform-paths/prelude-fail.rs index 48c33d720dcad..ae2606102bc1a 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude-fail.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude-fail.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Tool attribute use rustfmt::skip as imported_rustfmt_skip; //~ ERROR unresolved import `rustfmt` diff --git a/tests/ui/rust-2018/uniform-paths/prelude.rs b/tests/ui/rust-2018/uniform-paths/prelude.rs index 65763614ce028..20195541e38c3 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // Macro imported with `#[macro_use] extern crate` use vec as imported_vec; diff --git a/tests/ui/rust-2018/uniform-paths/redundant.rs b/tests/ui/rust-2018/uniform-paths/redundant.rs index fd7fc7fbd41b7..c7eca0c9e00f4 100644 --- a/tests/ui/rust-2018/uniform-paths/redundant.rs +++ b/tests/ui/rust-2018/uniform-paths/redundant.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 use std; use std::io; diff --git a/tests/ui/rust-2018/unresolved-asterisk-imports.rs b/tests/ui/rust-2018/unresolved-asterisk-imports.rs index ad1064570c77b..809f1dbc6d277 100644 --- a/tests/ui/rust-2018/unresolved-asterisk-imports.rs +++ b/tests/ui/rust-2018/unresolved-asterisk-imports.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use not_existing_crate::*; //~ ERROR unresolved import `not_existing_crate use std as foo; diff --git a/tests/ui/rust-2021/array-into-iter-ambiguous.fixed b/tests/ui/rust-2021/array-into-iter-ambiguous.fixed index 76f661baed750..2d5aeb266c15e 100644 --- a/tests/ui/rust-2021/array-into-iter-ambiguous.fixed +++ b/tests/ui/rust-2021/array-into-iter-ambiguous.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88475 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(array_into_iter)] #![allow(unused)] diff --git a/tests/ui/rust-2021/array-into-iter-ambiguous.rs b/tests/ui/rust-2021/array-into-iter-ambiguous.rs index 83fbf8f6c218d..b2fe27e064a5f 100644 --- a/tests/ui/rust-2021/array-into-iter-ambiguous.rs +++ b/tests/ui/rust-2021/array-into-iter-ambiguous.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88475 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(array_into_iter)] #![allow(unused)] diff --git a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs index eb301e5e1be32..1273969c4af3b 100644 --- a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs +++ b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs @@ -1,6 +1,6 @@ -// force-host -// edition:2018 -// no-prefer-dynamic +//@ force-host +//@ edition:2018 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs index 691bfdc15c3ad..b68701a516525 100644 --- a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs +++ b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs @@ -1,6 +1,6 @@ -// force-host -// edition:2021 -// no-prefer-dynamic +//@ force-host +//@ edition:2021 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed b/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed index a1b6f5b16baf8..ea104011873ce 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88470 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs b/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs index 142ba552002fc..ce7dd2fdac76a 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs +++ b/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88470 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.fixed b/tests/ui/rust-2021/future-prelude-collision-generic.fixed index 1bb9ba3777404..3546b1aef6ca6 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-generic.fixed @@ -1,7 +1,7 @@ // test for https://github.com/rust-lang/rust/issues/86940 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.rs b/tests/ui/rust-2021/future-prelude-collision-generic.rs index d7f8affc61ade..1ae5e8fce23cd 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.rs +++ b/tests/ui/rust-2021/future-prelude-collision-generic.rs @@ -1,7 +1,7 @@ // test for https://github.com/rust-lang/rust/issues/86940 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-imported.fixed b/tests/ui/rust-2021/future-prelude-collision-imported.fixed index 15ccff7496e09..e69896ed569ed 100644 --- a/tests/ui/rust-2021/future-prelude-collision-imported.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-imported.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-imported.rs b/tests/ui/rust-2021/future-prelude-collision-imported.rs index cdffcaf754541..4c29031b83550 100644 --- a/tests/ui/rust-2021/future-prelude-collision-imported.rs +++ b/tests/ui/rust-2021/future-prelude-collision-imported.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.fixed b/tests/ui/rust-2021/future-prelude-collision-macros.fixed index a97dc176e1b8b..f5a548a2501ba 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-macros.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(unreachable_code)] diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.rs b/tests/ui/rust-2021/future-prelude-collision-macros.rs index 82484b5b3688d..46265356f4610 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.rs +++ b/tests/ui/rust-2021/future-prelude-collision-macros.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(unreachable_code)] diff --git a/tests/ui/rust-2021/future-prelude-collision-shadow.rs b/tests/ui/rust-2021/future-prelude-collision-shadow.rs index 27891a8d11db7..556d646e0131b 100644 --- a/tests/ui/rust-2021/future-prelude-collision-shadow.rs +++ b/tests/ui/rust-2021/future-prelude-collision-shadow.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed b/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed index 3e76fced774db..591fa32efab03 100644 --- a/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88442 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![allow(unused)] #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision-turbofish.rs b/tests/ui/rust-2021/future-prelude-collision-turbofish.rs index abb292ef99284..a7033ab87c9c2 100644 --- a/tests/ui/rust-2021/future-prelude-collision-turbofish.rs +++ b/tests/ui/rust-2021/future-prelude-collision-turbofish.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88442 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![allow(unused)] #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs index 247d5884b868a..b97dc1bc0424a 100644 --- a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs +++ b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(unused)] #![deny(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision.fixed b/tests/ui/rust-2021/future-prelude-collision.fixed index 43b0ec1c3e6a7..37c56400c3eeb 100644 --- a/tests/ui/rust-2021/future-prelude-collision.fixed +++ b/tests/ui/rust-2021/future-prelude-collision.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] trait TryIntoU32 { diff --git a/tests/ui/rust-2021/future-prelude-collision.rs b/tests/ui/rust-2021/future-prelude-collision.rs index 4c7a47ffbe28a..067c62f4d9edc 100644 --- a/tests/ui/rust-2021/future-prelude-collision.rs +++ b/tests/ui/rust-2021/future-prelude-collision.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] trait TryIntoU32 { diff --git a/tests/ui/rust-2021/generic-type-collision.fixed b/tests/ui/rust-2021/generic-type-collision.fixed index feba7d19b6615..a0a53e92d26b9 100644 --- a/tests/ui/rust-2021/generic-type-collision.fixed +++ b/tests/ui/rust-2021/generic-type-collision.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition 2018 +//@ check-pass +//@ run-rustfix +//@ edition 2018 #![warn(rust_2021_prelude_collisions)] trait MyTrait { diff --git a/tests/ui/rust-2021/generic-type-collision.rs b/tests/ui/rust-2021/generic-type-collision.rs index 335e7e520a495..16c3967287d24 100644 --- a/tests/ui/rust-2021/generic-type-collision.rs +++ b/tests/ui/rust-2021/generic-type-collision.rs @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition 2018 +//@ check-pass +//@ run-rustfix +//@ edition 2018 #![warn(rust_2021_prelude_collisions)] trait MyTrait { diff --git a/tests/ui/rust-2021/inherent-dyn-collision.fixed b/tests/ui/rust-2021/inherent-dyn-collision.fixed index 5789a90393bae..f5702613af032 100644 --- a/tests/ui/rust-2021/inherent-dyn-collision.fixed +++ b/tests/ui/rust-2021/inherent-dyn-collision.fixed @@ -1,9 +1,9 @@ // Test case where the method we want is an inherent method on a // dyn Trait. In that case, the fix is to insert `*` on the receiver. // -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/inherent-dyn-collision.rs b/tests/ui/rust-2021/inherent-dyn-collision.rs index a3893c033e942..0bcb34e5708bb 100644 --- a/tests/ui/rust-2021/inherent-dyn-collision.rs +++ b/tests/ui/rust-2021/inherent-dyn-collision.rs @@ -1,9 +1,9 @@ // Test case where the method we want is an inherent method on a // dyn Trait. In that case, the fix is to insert `*` on the receiver. // -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/inherent-method-collision.rs b/tests/ui/rust-2021/inherent-method-collision.rs index 507105207d695..1dad62eb13ca2 100644 --- a/tests/ui/rust-2021/inherent-method-collision.rs +++ b/tests/ui/rust-2021/inherent-method-collision.rs @@ -1,6 +1,6 @@ // Test that we do NOT warn for inherent methods invoked via `T::` form. // -// check-pass +//@ check-pass #![deny(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/panic.rs b/tests/ui/rust-2021/panic.rs index 394fc3c8f8254..77221bfa34e45 100644 --- a/tests/ui/rust-2021/panic.rs +++ b/tests/ui/rust-2021/panic.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { debug_assert!(false, 123); diff --git a/tests/ui/rust-2021/prelude2021.rs b/tests/ui/rust-2021/prelude2021.rs index a63b6fcf2627a..274b6437efa8c 100644 --- a/tests/ui/rust-2021/prelude2021.rs +++ b/tests/ui/rust-2021/prelude2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 fn main() { let _: u16 = 123i32.try_into().unwrap(); diff --git a/tests/ui/rust-2021/reserved-prefixes-migration.fixed b/tests/ui/rust-2021/reserved-prefixes-migration.fixed index eed2f313abe6e..399ff1c75ba8d 100644 --- a/tests/ui/rust-2021/reserved-prefixes-migration.fixed +++ b/tests/ui/rust-2021/reserved-prefixes-migration.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/tests/ui/rust-2021/reserved-prefixes-migration.rs b/tests/ui/rust-2021/reserved-prefixes-migration.rs index 0565db793df66..5adb9a00e3a21 100644 --- a/tests/ui/rust-2021/reserved-prefixes-migration.rs +++ b/tests/ui/rust-2021/reserved-prefixes-migration.rs @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs index 74f20660613ad..b64761b55e98b 100644 --- a/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs +++ b/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:reserved-prefixes-macro-2018.rs -// aux-build:reserved-prefixes-macro-2021.rs +//@ edition:2018 +//@ aux-build:reserved-prefixes-macro-2018.rs +//@ aux-build:reserved-prefixes-macro-2021.rs extern crate reserved_prefixes_macro_2018 as m2018; extern crate reserved_prefixes_macro_2021 as m2021; diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs index 110b6d64ccc68..85f894d7f7970 100644 --- a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs +++ b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// aux-build:reserved-prefixes-macro-2018.rs +//@ run-pass +//@ edition:2021 +//@ aux-build:reserved-prefixes-macro-2018.rs extern crate reserved_prefixes_macro_2018 as m2018; diff --git a/tests/ui/rust-2021/reserved-prefixes.rs b/tests/ui/rust-2021/reserved-prefixes.rs index 1994f25b6a511..aa76f0e0dad54 100644 --- a/tests/ui/rust-2021/reserved-prefixes.rs +++ b/tests/ui/rust-2021/reserved-prefixes.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 macro_rules! demo2 { ( $a:tt $b:tt ) => { println!("two tokens") }; diff --git a/tests/ui/rustc-rust-log.rs b/tests/ui/rustc-rust-log.rs index 52e7dcf4499a8..299b6c40a5639 100644 --- a/tests/ui/rustc-rust-log.rs +++ b/tests/ui/rustc-rust-log.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-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. // -// dont-check-compiler-stdout -// dont-check-compiler-stderr -// compile-flags: --error-format human -// aux-build: rustc-rust-log-aux.rs -// rustc-env:RUSTC_LOG=debug +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr +//@ compile-flags: --error-format human +//@ aux-build: rustc-rust-log-aux.rs +//@ rustc-env:RUSTC_LOG=debug fn main() {} diff --git a/tests/ui/rustdoc/doc-alias-crate-level.rs b/tests/ui/rustdoc/doc-alias-crate-level.rs index c7783aae5ea62..7bbfb72900a5e 100644 --- a/tests/ui/rustdoc/doc-alias-crate-level.rs +++ b/tests/ui/rustdoc/doc-alias-crate-level.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=no +//@ compile-flags: -Zdeduplicate-diagnostics=no #![crate_type = "lib"] diff --git a/tests/ui/rustdoc/doc-test-attr-pass.rs b/tests/ui/rustdoc/doc-test-attr-pass.rs index 7884addd15fe7..f0120b7c2d0b4 100644 --- a/tests/ui/rustdoc/doc-test-attr-pass.rs +++ b/tests/ui/rustdoc/doc-test-attr-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![deny(invalid_doc_attributes)] diff --git a/tests/ui/rustdoc/hidden-doc-associated-item.rs b/tests/ui/rustdoc/hidden-doc-associated-item.rs index d431f9e899c02..beb7628b5e09b 100644 --- a/tests/ui/rustdoc/hidden-doc-associated-item.rs +++ b/tests/ui/rustdoc/hidden-doc-associated-item.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See issue #85526. // This test should produce no warnings. diff --git a/tests/ui/sanitize/address.rs b/tests/ui/sanitize/address.rs index 1faab1fd2fce1..7a5e767687cf1 100644 --- a/tests/ui/sanitize/address.rs +++ b/tests/ui/sanitize/address.rs @@ -1,12 +1,12 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Z sanitizer=address -O -g +//@ compile-flags: -Z sanitizer=address -O -g // -// run-fail -// error-pattern: AddressSanitizer: stack-buffer-overflow -// error-pattern: 'xs' (line 14) <== Memory access at offset +//@ run-fail +//@ error-pattern: AddressSanitizer: stack-buffer-overflow +//@ error-pattern: 'xs' (line 14) <== Memory access at offset use std::hint::black_box; diff --git a/tests/ui/sanitize/badfree.rs b/tests/ui/sanitize/badfree.rs index 4a230e11d9579..ecbb58eba00d4 100644 --- a/tests/ui/sanitize/badfree.rs +++ b/tests/ui/sanitize/badfree.rs @@ -1,11 +1,11 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Z sanitizer=address -O +//@ compile-flags: -Z sanitizer=address -O // -// run-fail -// regex-error-pattern: AddressSanitizer: (SEGV|attempting free on address which was not malloc) +//@ run-fail +//@ regex-error-pattern: AddressSanitizer: (SEGV|attempting free on address which was not malloc) use std::ffi::c_void; diff --git a/tests/ui/sanitize/cfg-kasan.rs b/tests/ui/sanitize/cfg-kasan.rs index fb9a6f549ce0c..394bf2165810c 100644 --- a/tests/ui/sanitize/cfg-kasan.rs +++ b/tests/ui/sanitize/cfg-kasan.rs @@ -1,17 +1,17 @@ // Verifies that when compiling with -Zsanitizer=kernel-address, // the `#[cfg(sanitize = "address")]` attribute is configured. -// check-pass -// compile-flags: -Zsanitizer=kernel-address --cfg kernel_address -// revisions: aarch64 riscv64imac riscv64gc x86_64 -//[aarch64] compile-flags: --target aarch64-unknown-none -//[aarch64] needs-llvm-components: aarch64 -//[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf -//[riscv64imac] needs-llvm-components: riscv -//[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf -//[riscv64gc] needs-llvm-components: riscv -//[x86_64] compile-flags: --target x86_64-unknown-none -//[x86_64] needs-llvm-components: x86 +//@ check-pass +//@ compile-flags: -Zsanitizer=kernel-address --cfg kernel_address +//@ revisions: aarch64 riscv64imac riscv64gc x86_64 +//@[aarch64] compile-flags: --target aarch64-unknown-none +//@[aarch64] needs-llvm-components: aarch64 +//@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf +//@[riscv64imac] needs-llvm-components: riscv +//@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf +//@[riscv64gc] needs-llvm-components: riscv +//@[x86_64] compile-flags: --target x86_64-unknown-none +//@[x86_64] needs-llvm-components: x86 #![crate_type = "rlib"] #![feature(cfg_sanitize, no_core, lang_items)] diff --git a/tests/ui/sanitize/cfg.rs b/tests/ui/sanitize/cfg.rs index 761c646ec884a..942141bd3fe3c 100644 --- a/tests/ui/sanitize/cfg.rs +++ b/tests/ui/sanitize/cfg.rs @@ -1,22 +1,22 @@ // Verifies that when compiling with -Zsanitizer=option, // the `#[cfg(sanitize = "option")]` attribute is configured. -// check-pass -// revisions: address cfi kcfi leak memory thread -//compile-flags: -Ctarget-feature=-crt-static -//[address]needs-sanitizer-address -//[address]compile-flags: -Zsanitizer=address --cfg address -//[cfi]needs-sanitizer-cfi -//[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi -//[cfi]compile-flags: -Clto -Ccodegen-units=1 -//[kcfi]needs-llvm-components: x86 -//[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi --target x86_64-unknown-none -//[leak]needs-sanitizer-leak -//[leak]compile-flags: -Zsanitizer=leak --cfg leak -//[memory]needs-sanitizer-memory -//[memory]compile-flags: -Zsanitizer=memory --cfg memory -//[thread]needs-sanitizer-thread -//[thread]compile-flags: -Zsanitizer=thread --cfg thread +//@ check-pass +//@ revisions: address cfi kcfi leak memory thread +//@compile-flags: -Ctarget-feature=-crt-static +//@[address]needs-sanitizer-address +//@[address]compile-flags: -Zsanitizer=address --cfg address +//@[cfi]needs-sanitizer-cfi +//@[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi +//@[cfi]compile-flags: -Clto -Ccodegen-units=1 +//@[kcfi]needs-llvm-components: x86 +//@[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi --target x86_64-unknown-none +//@[leak]needs-sanitizer-leak +//@[leak]compile-flags: -Zsanitizer=leak --cfg leak +//@[memory]needs-sanitizer-memory +//@[memory]compile-flags: -Zsanitizer=memory --cfg memory +//@[thread]needs-sanitizer-thread +//@[thread]compile-flags: -Zsanitizer=thread --cfg thread #![feature(cfg_sanitize, no_core, lang_items)] #![crate_type="lib"] diff --git a/tests/ui/sanitize/crt-static.rs b/tests/ui/sanitize/crt-static.rs index 7a6b9eda3fa12..c24faeca3dc85 100644 --- a/tests/ui/sanitize/crt-static.rs +++ b/tests/ui/sanitize/crt-static.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z sanitizer=address -C target-feature=+crt-static --target x86_64-unknown-linux-gnu -// needs-llvm-components: x86 +//@ compile-flags: -Z sanitizer=address -C target-feature=+crt-static --target x86_64-unknown-linux-gnu +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/hwaddress.rs b/tests/ui/sanitize/hwaddress.rs index f9b37a155aad7..e5939eb734b66 100644 --- a/tests/ui/sanitize/hwaddress.rs +++ b/tests/ui/sanitize/hwaddress.rs @@ -1,14 +1,14 @@ -// needs-sanitizer-support -// needs-sanitizer-hwaddress +//@ needs-sanitizer-support +//@ needs-sanitizer-hwaddress // // FIXME(#83706): this test triggers errors on aarch64-gnu -// ignore-aarch64-unknown-linux-gnu +//@ ignore-aarch64-unknown-linux-gnu // // FIXME(#83989): codegen-units=1 triggers linker errors on aarch64-gnu -// compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 +//@ compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 // -// run-fail -// error-pattern: HWAddressSanitizer: tag-mismatch +//@ run-fail +//@ error-pattern: HWAddressSanitizer: tag-mismatch use std::hint::black_box; diff --git a/tests/ui/sanitize/incompatible.rs b/tests/ui/sanitize/incompatible.rs index bcafc2891fda8..d000abb26ac74 100644 --- a/tests/ui/sanitize/incompatible.rs +++ b/tests/ui/sanitize/incompatible.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu -// needs-llvm-components: x86 -// error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory` +//@ compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu +//@ needs-llvm-components: x86 +//@ error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory` #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/inline-always.rs b/tests/ui/sanitize/inline-always.rs index 52dc557818039..d92daee3026a6 100644 --- a/tests/ui/sanitize/inline-always.rs +++ b/tests/ui/sanitize/inline-always.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(no_sanitize)] diff --git a/tests/ui/sanitize/issue-111184-coroutine-witness.rs b/tests/ui/sanitize/issue-111184-coroutine-witness.rs index dffb739f20321..e5b1e0322575c 100644 --- a/tests/ui/sanitize/issue-111184-coroutine-witness.rs +++ b/tests/ui/sanitize/issue-111184-coroutine-witness.rs @@ -1,11 +1,11 @@ // Regression test for issue 111184, where ty::CoroutineWitness were not expected to occur in // encode_ty and caused the compiler to ICE. // -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021 -// no-prefer-dynamic -// only-x86_64-unknown-linux-gnu -// build-pass +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021 +//@ no-prefer-dynamic +//@ only-x86_64-unknown-linux-gnu +//@ build-pass use std::future::Future; diff --git a/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs b/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs index 8f870be13725f..b1b7487fa2a4d 100644 --- a/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs +++ b/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs @@ -1,9 +1,9 @@ // Regression test for issue 114275 `typeid::typeid_itanium_cxx_abi::transform_ty` // was expecting array type lengths to be evaluated, this was causing an ICE. // -// build-pass -// compile-flags: -Ccodegen-units=1 -Clto -Zsanitizer=cfi -Ctarget-feature=-crt-static -// needs-sanitizer-cfi +//@ build-pass +//@ compile-flags: -Ccodegen-units=1 -Clto -Zsanitizer=cfi -Ctarget-feature=-crt-static +//@ needs-sanitizer-cfi #![crate_type = "lib"] diff --git a/tests/ui/sanitize/issue-72154-lifetime-markers.rs b/tests/ui/sanitize/issue-72154-lifetime-markers.rs index 3d9c51daa6505..aa0c19db9a12b 100644 --- a/tests/ui/sanitize/issue-72154-lifetime-markers.rs +++ b/tests/ui/sanitize/issue-72154-lifetime-markers.rs @@ -3,12 +3,12 @@ // always inliner pass not to insert them. This eventually lead to a // miscompilation which was subsequently detected by AddressSanitizer as UB. // -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Copt-level=0 -Zsanitizer=address -// run-pass +//@ compile-flags: -Copt-level=0 -Zsanitizer=address +//@ run-pass pub struct Wrap { pub t: [usize; 1] diff --git a/tests/ui/sanitize/leak.rs b/tests/ui/sanitize/leak.rs index cbb44ae8acd60..65915ec24b723 100644 --- a/tests/ui/sanitize/leak.rs +++ b/tests/ui/sanitize/leak.rs @@ -1,10 +1,10 @@ -// needs-sanitizer-support -// needs-sanitizer-leak +//@ needs-sanitizer-support +//@ needs-sanitizer-leak // -// compile-flags: -Z sanitizer=leak -O +//@ compile-flags: -Z sanitizer=leak -O // -// run-fail -// error-pattern: LeakSanitizer: detected memory leaks +//@ run-fail +//@ error-pattern: LeakSanitizer: detected memory leaks use std::hint::black_box; use std::mem; diff --git a/tests/ui/sanitize/memory-eager.rs b/tests/ui/sanitize/memory-eager.rs index 0e992b4a5ebbb..9e7889fa1bc09 100644 --- a/tests/ui/sanitize/memory-eager.rs +++ b/tests/ui/sanitize/memory-eager.rs @@ -1,15 +1,15 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-fail -// error-pattern: MemorySanitizer: use-of-uninitialized-value -// error-pattern: Uninitialized value was created by an allocation -// error-pattern: in the stack frame +//@ run-fail +//@ error-pattern: MemorySanitizer: use-of-uninitialized-value +//@ error-pattern: Uninitialized value was created by an allocation +//@ error-pattern: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/memory-passing.rs b/tests/ui/sanitize/memory-passing.rs index 6d9b70ad6b1c2..c8ab64bfaf833 100644 --- a/tests/ui/sanitize/memory-passing.rs +++ b/tests/ui/sanitize/memory-passing.rs @@ -1,12 +1,12 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-pass +//@ run-pass // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/memory.rs b/tests/ui/sanitize/memory.rs index 1a9ac3a4f3c32..bd2d67717495f 100644 --- a/tests/ui/sanitize/memory.rs +++ b/tests/ui/sanitize/memory.rs @@ -1,15 +1,15 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-fail -// error-pattern: MemorySanitizer: use-of-uninitialized-value -// error-pattern: Uninitialized value was created by an allocation -// error-pattern: in the stack frame +//@ run-fail +//@ error-pattern: MemorySanitizer: use-of-uninitialized-value +//@ error-pattern: Uninitialized value was created by an allocation +//@ error-pattern: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs b/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs index 052a40598a856..b7dd4a437821a 100644 --- a/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs +++ b/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs @@ -2,17 +2,17 @@ // being run when compiling with new LLVM pass manager and ThinLTO. // Note: The issue occurred only on non-zero opt-level. // -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// no-prefer-dynamic -// revisions: opt0 opt1 -// compile-flags: -Zsanitizer=address -Clto=thin -//[opt0]compile-flags: -Copt-level=0 -//[opt1]compile-flags: -Copt-level=1 -// run-fail -// error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ no-prefer-dynamic +//@ revisions: opt0 opt1 +//@ compile-flags: -Zsanitizer=address -Clto=thin +//@[opt0]compile-flags: -Copt-level=0 +//@[opt1]compile-flags: -Copt-level=1 +//@ run-fail +//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs index 462a3f661efb5..10c5bf6ea5e14 100644 --- a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-canonical-jump-tables=false +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-canonical-jump-tables=false #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs index 5b8de5c219e13..d46002c69fda0 100644 --- a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs +++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs @@ -1,9 +1,9 @@ // Verifies that when compiling with `-Zsanitizer-cfi-generalize-pointers` the // `#[cfg(sanitizer_cfi_generalize_pointers)]` attribute is configured. // -// needs-sanitizer-cfi -// check-pass -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ check-pass +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers #![feature(cfg_sanitizer_cfi)] diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs index f31b8bde7aebf..8ba13bd3639b1 100644 --- a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs @@ -1,8 +1,8 @@ // Verifies that `-Zsanitizer-cfi-generalize-pointers` requires `-Zsanitizer=cfi` or // `-Zsanitizer=kcfi`. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-generalize-pointers #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs index fe044f50a2162..7ef6bd2f0acc3 100644 --- a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs +++ b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs @@ -1,7 +1,7 @@ // Verifies that invalid user-defined CFI encodings can't be used. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi #![feature(cfi_encoding, no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs index 9a5b0f3899041..c628709d7a1ce 100644 --- a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs @@ -1,11 +1,11 @@ // Verifies that `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: x86 -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer=kcfi +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: x86 +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer=kcfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs index 4972ccf31678e..24c2c2c13da75 100644 --- a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs +++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs @@ -1,9 +1,9 @@ // Verifies that when compiling with `-Zsanitizer-cfi-normalize-integers` the // `#[cfg(sanitizer_cfi_normalize_integers)]` attribute is configured. // -// needs-sanitizer-cfi -// check-pass -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers +//@ needs-sanitizer-cfi +//@ check-pass +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers #![feature(cfg_sanitizer_cfi)] diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs index b25a60d3494b8..a7ecefbf7efb7 100644 --- a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs @@ -1,8 +1,8 @@ // Verifies that `-Zsanitizer-cfi-normalize-integers` requires `-Zsanitizer=cfi` or // `-Zsanitizer=kcfi` // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-normalize-integers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-normalize-integers #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs index e9a49dd3ff114..5a34f696e0546 100644 --- a/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs +++ b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer=cfi` requires `-Clto` or `-Clinker-plugin-lto`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs index a13c12c17878a..954e4ec3b8538 100644 --- a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs +++ b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer=cfi` with `-Clto` or `-Clto=thin` requires `-Ccodegen-units=1`. // -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=2 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=2 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/split-lto-unit-requires-lto.rs b/tests/ui/sanitize/split-lto-unit-requires-lto.rs index 3c497260e85c6..35e610f03076b 100644 --- a/tests/ui/sanitize/split-lto-unit-requires-lto.rs +++ b/tests/ui/sanitize/split-lto-unit-requires-lto.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsplit-lto-unit` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsplit-lto-unit +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsplit-lto-unit #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/thread.rs b/tests/ui/sanitize/thread.rs index c70cf5accc077..9d9ad6ee51867 100644 --- a/tests/ui/sanitize/thread.rs +++ b/tests/ui/sanitize/thread.rs @@ -10,15 +10,15 @@ // is necessary to make the test robust. Without the barrier data race detection // would occasionally fail, making test flaky. // -// needs-sanitizer-support -// needs-sanitizer-thread +//@ needs-sanitizer-support +//@ needs-sanitizer-thread // -// compile-flags: -Z sanitizer=thread -O +//@ compile-flags: -Z sanitizer=thread -O // -// run-fail -// error-pattern: WARNING: ThreadSanitizer: data race -// error-pattern: Location is heap block of size 4 -// error-pattern: allocated by main thread +//@ run-fail +//@ error-pattern: WARNING: ThreadSanitizer: data race +//@ error-pattern: Location is heap block of size 4 +//@ error-pattern: allocated by main thread #![feature(raw_ref_op)] #![feature(rustc_private)] diff --git a/tests/ui/sanitize/unsupported-target.rs b/tests/ui/sanitize/unsupported-target.rs index 9f29c76353bac..7c7dc24b5d9a5 100644 --- a/tests/ui/sanitize/unsupported-target.rs +++ b/tests/ui/sanitize/unsupported-target.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu -// needs-llvm-components: x86 -// error-pattern: error: leak sanitizer is not supported for this target +//@ compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu +//@ needs-llvm-components: x86 +//@ error-pattern: error: leak sanitizer is not supported for this target #![feature(no_core)] #![no_core] #![no_main] diff --git a/tests/ui/sanitize/use-after-scope.rs b/tests/ui/sanitize/use-after-scope.rs index de63eea194ba9..4d7f6f6c2f2b5 100644 --- a/tests/ui/sanitize/use-after-scope.rs +++ b/tests/ui/sanitize/use-after-scope.rs @@ -1,10 +1,10 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Zsanitizer=address -// run-fail -// error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ compile-flags: -Zsanitizer=address +//@ run-fail +//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/self/arbitrary-self-from-method-substs.rs b/tests/ui/self/arbitrary-self-from-method-substs.rs index 004445dc32723..99977ed9b8c51 100644 --- a/tests/ui/self/arbitrary-self-from-method-substs.rs +++ b/tests/ui/self/arbitrary-self-from-method-substs.rs @@ -1,4 +1,4 @@ -// revisions: default feature +//@ revisions: default feature #![cfg_attr(feature, feature(arbitrary_self_types))] use std::ops::Deref; diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.rs b/tests/ui/self/arbitrary-self-types-not-object-safe.rs index 40e8df3395f6e..0053eb5f73948 100644 --- a/tests/ui/self/arbitrary-self-types-not-object-safe.rs +++ b/tests/ui/self/arbitrary-self-types-not-object-safe.rs @@ -1,4 +1,4 @@ -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed index 6a94b85b9ba59..1d80f5397739b 100644 --- a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed +++ b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] mod first { trait Foo { fn m(self: Box); } diff --git a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs index fa480b1f72b2f..a9930da204df7 100644 --- a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs +++ b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] mod first { trait Foo { fn m(self: Box); } diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed b/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed index a400a1672a43c..8064ff2f20b95 100644 --- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed +++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct S; diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs b/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs index d15676a623d39..dce5ab8e08826 100644 --- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs +++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct S; diff --git a/tests/ui/self/arbitrary_self_types_nested.rs b/tests/ui/self/arbitrary_self_types_nested.rs index 680196fbb92f6..4ec3d4038e37d 100644 --- a/tests/ui/self/arbitrary_self_types_nested.rs +++ b/tests/ui/self/arbitrary_self_types_nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use { std::{ diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs index f3474bc1f9f81..67d092791da1c 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime.rs index 3002013881249..8fbfecb8e6b17 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs index a1e7f4aa875ee..43ad360e1967f 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::pin::Pin; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs index a2b7f0805683f..b5a8992542bf4 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::pin::Pin; diff --git a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs index 91aacedfc5778..d7149002e7bca 100644 --- a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs +++ b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)] #![feature(rustc_attrs)] diff --git a/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs b/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs index 0eab7617f7a75..1f45d91847f97 100644 --- a/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs +++ b/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs b/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs index 0a9370e6f5ac7..43f596659b9cd 100644 --- a/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs +++ b/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] use std::ptr; diff --git a/tests/ui/self/arbitrary_self_types_silly.rs b/tests/ui/self/arbitrary_self_types_silly.rs index fb5f9012b1865..94726bd69cc57 100644 --- a/tests/ui/self/arbitrary_self_types_silly.rs +++ b/tests/ui/self/arbitrary_self_types_silly.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] struct Foo; diff --git a/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs b/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs index 29563fbbd8676..4b8a21f764855 100644 --- a/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs +++ b/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/self/arbitrary_self_types_struct.rs b/tests/ui/self/arbitrary_self_types_struct.rs index 905ad83b659d4..b9769622a3311 100644 --- a/tests/ui/self/arbitrary_self_types_struct.rs +++ b/tests/ui/self/arbitrary_self_types_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_trait.rs b/tests/ui/self/arbitrary_self_types_trait.rs index c4651ec717787..83d39d0beb4fd 100644 --- a/tests/ui/self/arbitrary_self_types_trait.rs +++ b/tests/ui/self/arbitrary_self_types_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_allocation)] use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_unsized_struct.rs b/tests/ui/self/arbitrary_self_types_unsized_struct.rs index d43f3132890b5..d6e1e78c82769 100644 --- a/tests/ui/self/arbitrary_self_types_unsized_struct.rs +++ b/tests/ui/self/arbitrary_self_types_unsized_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/self/builtin-superkinds-self-type.rs b/tests/ui/self/builtin-superkinds-self-type.rs index c56542bb4684a..d8e98c9c1423d 100644 --- a/tests/ui/self/builtin-superkinds-self-type.rs +++ b/tests/ui/self/builtin-superkinds-self-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests the ability for the Self type in default methods to use // capabilities granted by builtin kinds as supertraits. diff --git a/tests/ui/self/by-value-self-in-mut-slot.rs b/tests/ui/self/by-value-self-in-mut-slot.rs index 267afd1dcad7f..fd7b0a8e21f1e 100644 --- a/tests/ui/self/by-value-self-in-mut-slot.rs +++ b/tests/ui/self/by-value-self-in-mut-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/elision/alias-async.rs b/tests/ui/self/elision/alias-async.rs index 7c0dd068623f3..fbdc8b9023aa7 100644 --- a/tests/ui/self/elision/alias-async.rs +++ b/tests/ui/self/elision/alias-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/alias.rs b/tests/ui/self/elision/alias.rs index 0c801d7023212..6041c7cbf3636 100644 --- a/tests/ui/self/elision/alias.rs +++ b/tests/ui/self/elision/alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/assoc-async.rs b/tests/ui/self/elision/assoc-async.rs index 363b7fc2aaeb2..0fb4eb898dee7 100644 --- a/tests/ui/self/elision/assoc-async.rs +++ b/tests/ui/self/elision/assoc-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/assoc.rs b/tests/ui/self/elision/assoc.rs index fa39a2b478b1e..72237d7f52aa4 100644 --- a/tests/ui/self/elision/assoc.rs +++ b/tests/ui/self/elision/assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-alias-async.rs b/tests/ui/self/elision/lt-alias-async.rs index 3a6f8471e6642..fb3bc573ae1b6 100644 --- a/tests/ui/self/elision/lt-alias-async.rs +++ b/tests/ui/self/elision/lt-alias-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-alias.rs b/tests/ui/self/elision/lt-alias.rs index bbba88e4e5bb9..85958182cb650 100644 --- a/tests/ui/self/elision/lt-alias.rs +++ b/tests/ui/self/elision/lt-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-assoc-async.rs b/tests/ui/self/elision/lt-assoc-async.rs index 0d3ff630d14e7..180998a166a37 100644 --- a/tests/ui/self/elision/lt-assoc-async.rs +++ b/tests/ui/self/elision/lt-assoc-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-assoc.rs b/tests/ui/self/elision/lt-assoc.rs index 8f3543135365c..31868d9ce5e68 100644 --- a/tests/ui/self/elision/lt-assoc.rs +++ b/tests/ui/self/elision/lt-assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-ref-self-async.rs b/tests/ui/self/elision/lt-ref-self-async.rs index a2325ba7fa6c8..8eb4a48a9c932 100644 --- a/tests/ui/self/elision/lt-ref-self-async.rs +++ b/tests/ui/self/elision/lt-ref-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-self-async.rs b/tests/ui/self/elision/lt-self-async.rs index 4cedaf79da3a3..bdb0e80784e67 100644 --- a/tests/ui/self/elision/lt-self-async.rs +++ b/tests/ui/self/elision/lt-self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-self.rs b/tests/ui/self/elision/lt-self.rs index cf74f892b8fce..f9a288b095586 100644 --- a/tests/ui/self/elision/lt-self.rs +++ b/tests/ui/self/elision/lt-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-struct-async.rs b/tests/ui/self/elision/lt-struct-async.rs index abbee7fdfcb87..ffce3029fc774 100644 --- a/tests/ui/self/elision/lt-struct-async.rs +++ b/tests/ui/self/elision/lt-struct-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-struct.rs b/tests/ui/self/elision/lt-struct.rs index 799c6c079b34d..c0fc45c1b8b73 100644 --- a/tests/ui/self/elision/lt-struct.rs +++ b/tests/ui/self/elision/lt-struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/multiple-ref-self-async.rs b/tests/ui/self/elision/multiple-ref-self-async.rs index be073c6edbad5..fb77f91396caa 100644 --- a/tests/ui/self/elision/multiple-ref-self-async.rs +++ b/tests/ui/self/elision/multiple-ref-self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/multiple-ref-self.rs b/tests/ui/self/elision/multiple-ref-self.rs index f39613d0c9007..01d6bb47c045c 100644 --- a/tests/ui/self/elision/multiple-ref-self.rs +++ b/tests/ui/self/elision/multiple-ref-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-alias-async.rs b/tests/ui/self/elision/ref-alias-async.rs index 15f16525b6b1c..ac0abb89bcf54 100644 --- a/tests/ui/self/elision/ref-alias-async.rs +++ b/tests/ui/self/elision/ref-alias-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-alias.rs b/tests/ui/self/elision/ref-alias.rs index 341f5b52df0ad..c8552c4a06d63 100644 --- a/tests/ui/self/elision/ref-alias.rs +++ b/tests/ui/self/elision/ref-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-assoc-async.rs b/tests/ui/self/elision/ref-assoc-async.rs index ad10d8ba4f4e2..2af4f13a41b34 100644 --- a/tests/ui/self/elision/ref-assoc-async.rs +++ b/tests/ui/self/elision/ref-assoc-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-assoc.rs b/tests/ui/self/elision/ref-assoc.rs index 2f02cb5f3c8af..8dc78d31d39e9 100644 --- a/tests/ui/self/elision/ref-assoc.rs +++ b/tests/ui/self/elision/ref-assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-alias-async.rs b/tests/ui/self/elision/ref-mut-alias-async.rs index 2c3f971d26e8b..4de52fa96a3f8 100644 --- a/tests/ui/self/elision/ref-mut-alias-async.rs +++ b/tests/ui/self/elision/ref-mut-alias-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-alias.rs b/tests/ui/self/elision/ref-mut-alias.rs index ce1ab3ffccaba..026a96bf29fc3 100644 --- a/tests/ui/self/elision/ref-mut-alias.rs +++ b/tests/ui/self/elision/ref-mut-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-self-async.rs b/tests/ui/self/elision/ref-mut-self-async.rs index e07bc85643c44..3c80951a6663f 100644 --- a/tests/ui/self/elision/ref-mut-self-async.rs +++ b/tests/ui/self/elision/ref-mut-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-struct-async.rs b/tests/ui/self/elision/ref-mut-struct-async.rs index 392bf1d6be381..24a95672795f7 100644 --- a/tests/ui/self/elision/ref-mut-struct-async.rs +++ b/tests/ui/self/elision/ref-mut-struct-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-self-async.rs b/tests/ui/self/elision/ref-self-async.rs index b0133ec1b615d..1f3e670d3d1df 100644 --- a/tests/ui/self/elision/ref-self-async.rs +++ b/tests/ui/self/elision/ref-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] #![feature(arbitrary_self_types)] diff --git a/tests/ui/self/elision/ref-struct-async.rs b/tests/ui/self/elision/ref-struct-async.rs index 0be7487451503..b3317bc5522ef 100644 --- a/tests/ui/self/elision/ref-struct-async.rs +++ b/tests/ui/self/elision/ref-struct-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/self-async.rs b/tests/ui/self/elision/self-async.rs index eb01cfc9768e6..244ad5edfcc55 100644 --- a/tests/ui/self/elision/self-async.rs +++ b/tests/ui/self/elision/self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/self.rs b/tests/ui/self/elision/self.rs index 574b7e7c9b3d6..d8c20c7e38180 100644 --- a/tests/ui/self/elision/self.rs +++ b/tests/ui/self/elision/self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/struct-async.rs b/tests/ui/self/elision/struct-async.rs index e018e0daf9620..708ddabc39fab 100644 --- a/tests/ui/self/elision/struct-async.rs +++ b/tests/ui/self/elision/struct-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/struct.rs b/tests/ui/self/elision/struct.rs index d1ac99d13be7f..fd3c9b2dea864 100644 --- a/tests/ui/self/elision/struct.rs +++ b/tests/ui/self/elision/struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/explicit-self-closures.rs b/tests/ui/self/explicit-self-closures.rs index b409dfd7a1e08..ea85caa22cea4 100644 --- a/tests/ui/self/explicit-self-closures.rs +++ b/tests/ui/self/explicit-self-closures.rs @@ -1,8 +1,8 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test to make sure that explicit self params work inside closures -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Box { x: usize diff --git a/tests/ui/self/explicit-self-generic.rs b/tests/ui/self/explicit-self-generic.rs index 8f6bed3b0cd6e..b4ef8b2a29ab4 100644 --- a/tests/ui/self/explicit-self-generic.rs +++ b/tests/ui/self/explicit-self-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Copy, Clone)] diff --git a/tests/ui/self/explicit-self-objects-uniq.rs b/tests/ui/self/explicit-self-objects-uniq.rs index 250ea12e57c81..fc43a35f271e1 100644 --- a/tests/ui/self/explicit-self-objects-uniq.rs +++ b/tests/ui/self/explicit-self-objects-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(self: Box); diff --git a/tests/ui/self/explicit-self.rs b/tests/ui/self/explicit-self.rs index 873c3621a3bce..f85fe739b9f92 100644 --- a/tests/ui/self/explicit-self.rs +++ b/tests/ui/self/explicit-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/self/explicit_self_xcrate_exe.rs b/tests/ui/self/explicit_self_xcrate_exe.rs index c3796f73ab5f7..f9daf91bdfa56 100644 --- a/tests/ui/self/explicit_self_xcrate_exe.rs +++ b/tests/ui/self/explicit_self_xcrate_exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:explicit_self_xcrate.rs +//@ run-pass +//@ aux-build:explicit_self_xcrate.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate explicit_self_xcrate; use explicit_self_xcrate::{Foo, Bar}; diff --git a/tests/ui/self/move-self.rs b/tests/ui/self/move-self.rs index 66032780b812a..94310382dd0b7 100644 --- a/tests/ui/self/move-self.rs +++ b/tests/ui/self/move-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { x: String } diff --git a/tests/ui/self/object-safety-sized-self-by-value-self.rs b/tests/ui/self/object-safety-sized-self-by-value-self.rs index 43b1d8b9149a1..d902812eb9a67 100644 --- a/tests/ui/self/object-safety-sized-self-by-value-self.rs +++ b/tests/ui/self/object-safety-sized-self-by-value-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // Check that a trait is still object-safe (and usable) if it has // methods with by-value self so long as they require `Self : Sized`. diff --git a/tests/ui/self/object-safety-sized-self-generic-method.rs b/tests/ui/self/object-safety-sized-self-generic-method.rs index e0b0526a3338a..7a2ebd2cb7935 100644 --- a/tests/ui/self/object-safety-sized-self-generic-method.rs +++ b/tests/ui/self/object-safety-sized-self-generic-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Check that a trait is still object-safe (and usable) if it has // generic methods so long as they require `Self : Sized`. diff --git a/tests/ui/self/object-safety-sized-self-return-Self.rs b/tests/ui/self/object-safety-sized-self-return-Self.rs index 222c754394569..9fc3f85677223 100644 --- a/tests/ui/self/object-safety-sized-self-return-Self.rs +++ b/tests/ui/self/object-safety-sized-self-return-Self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that a trait is still object-safe (and usable) if it has // methods that return `Self` so long as they require `Self : Sized`. diff --git a/tests/ui/self/objects-owned-object-owned-method.rs b/tests/ui/self/objects-owned-object-owned-method.rs index 15677a5185c2f..8d9dda126d570 100644 --- a/tests/ui/self/objects-owned-object-owned-method.rs +++ b/tests/ui/self/objects-owned-object-owned-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test invoked `&self` methods on owned objects where the values // closed over contain managed values. This implies that the boxes // will have headers that must be skipped over. diff --git a/tests/ui/self/self-ctor-nongeneric.rs b/tests/ui/self/self-ctor-nongeneric.rs index 0ae7f8da4b4b9..0594e87a0a464 100644 --- a/tests/ui/self/self-ctor-nongeneric.rs +++ b/tests/ui/self/self-ctor-nongeneric.rs @@ -1,5 +1,5 @@ // `Self` as a constructor is currently allowed when the outer item is not generic. -// check-pass +//@ check-pass struct S0(usize); diff --git a/tests/ui/self/self-impl-2.rs b/tests/ui/self/self-impl-2.rs index 7eed3f056a25f..8c09f1ef75691 100644 --- a/tests/ui/self/self-impl-2.rs +++ b/tests/ui/self/self-impl-2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we can use `Self` types in impls in the expected way. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/self/self-in-mut-slot-default-method.rs b/tests/ui/self/self-in-mut-slot-default-method.rs index 45e122c8d77a0..4aab19d28f4fb 100644 --- a/tests/ui/self/self-in-mut-slot-default-method.rs +++ b/tests/ui/self/self-in-mut-slot-default-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/self-in-mut-slot-immediate-value.rs b/tests/ui/self/self-in-mut-slot-immediate-value.rs index 60865304f1c93..79d7b4df63f48 100644 --- a/tests/ui/self/self-in-mut-slot-immediate-value.rs +++ b/tests/ui/self/self-in-mut-slot-immediate-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Assert that `mut self` on an immediate value doesn't // allow mutating the original - issue #10615. diff --git a/tests/ui/self/self-in-typedefs.rs b/tests/ui/self/self-in-typedefs.rs index 81e557d53a660..786f176c019bd 100644 --- a/tests/ui/self/self-in-typedefs.rs +++ b/tests/ui/self/self-in-typedefs.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::mem::ManuallyDrop; diff --git a/tests/ui/self/self-re-assign.rs b/tests/ui/self/self-re-assign.rs index 9595ebf9601fb..a66dedb587b1a 100644 --- a/tests/ui/self/self-re-assign.rs +++ b/tests/ui/self/self-re-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure assigning an owned or managed variable to itself works. In particular, // that we do not glue_drop before we glue_take (#3290). diff --git a/tests/ui/self/self-shadowing-import.rs b/tests/ui/self/self-shadowing-import.rs index 1d60c6c22768d..85574daad5fd5 100644 --- a/tests/ui/self/self-shadowing-import.rs +++ b/tests/ui/self/self-shadowing-import.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub mod b { diff --git a/tests/ui/self/self-type-param.rs b/tests/ui/self/self-type-param.rs index 5eb8c3622e4bd..0b123de2531a8 100644 --- a/tests/ui/self/self-type-param.rs +++ b/tests/ui/self/self-type-param.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait MyTrait { fn f(&self) -> Self; diff --git a/tests/ui/self/self_lifetime-async.rs b/tests/ui/self/self_lifetime-async.rs index c3c6e56582d9f..7d6eb3f5eaf02 100644 --- a/tests/ui/self/self_lifetime-async.rs +++ b/tests/ui/self/self_lifetime-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a ()); impl<'a> Foo<'a> { diff --git a/tests/ui/self/self_lifetime.rs b/tests/ui/self/self_lifetime.rs index f04bd83ab6e4c..3f655b960b163 100644 --- a/tests/ui/self/self_lifetime.rs +++ b/tests/ui/self/self_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/60944#issuecomment-495346120 diff --git a/tests/ui/self/string-self-append.rs b/tests/ui/self/string-self-append.rs index e63dc0090cb7f..dea81392d7936 100644 --- a/tests/ui/self/string-self-append.rs +++ b/tests/ui/self/string-self-append.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Make sure we properly handle repeated self-appends. let mut a: String = "A".to_string(); diff --git a/tests/ui/self/ufcs-explicit-self.rs b/tests/ui/self/ufcs-explicit-self.rs index d83af14d354fb..5e6e2d2c93c89 100644 --- a/tests/ui/self/ufcs-explicit-self.rs +++ b/tests/ui/self/ufcs-explicit-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Copy, Clone)] diff --git a/tests/ui/self/uniq-self-in-mut-slot.rs b/tests/ui/self/uniq-self-in-mut-slot.rs index 71e57d8c1fa1b..6d087b7356fb8 100644 --- a/tests/ui/self/uniq-self-in-mut-slot.rs +++ b/tests/ui/self/uniq-self-in-mut-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/where-for-self.rs b/tests/ui/self/where-for-self.rs index 76c592dc49b72..9b4e83256645d 100644 --- a/tests/ui/self/where-for-self.rs +++ b/tests/ui/self/where-for-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can quantify lifetimes outside a constraint (i.e., including // the self type) in a where clause. diff --git a/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs b/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs index 1536228c265b2..59efb3f790b8c 100644 --- a/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs +++ b/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs @@ -1,4 +1,4 @@ -// compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g +//@ compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g pub mod a { pub fn one() -> usize { diff --git a/tests/ui/sepcomp/sepcomp-cci.rs b/tests/ui/sepcomp/sepcomp-cci.rs index 02bbab30e9c6e..66b0edda9a9a3 100644 --- a/tests/ui/sepcomp/sepcomp-cci.rs +++ b/tests/ui/sepcomp/sepcomp-cci.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C codegen-units=3 -// aux-build:sepcomp_cci_lib.rs +//@ run-pass +//@ compile-flags: -C codegen-units=3 +//@ aux-build:sepcomp_cci_lib.rs // Test accessing cross-crate inlined items from multiple compilation units. diff --git a/tests/ui/sepcomp/sepcomp-extern.rs b/tests/ui/sepcomp/sepcomp-extern.rs index 6323bf664fc25..6acd3a1eede33 100644 --- a/tests/ui/sepcomp/sepcomp-extern.rs +++ b/tests/ui/sepcomp/sepcomp-extern.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C codegen-units=3 -// aux-build:sepcomp-extern-lib.rs +//@ run-pass +//@ compile-flags: -C codegen-units=3 +//@ aux-build:sepcomp-extern-lib.rs // Test accessing external items from multiple compilation units. diff --git a/tests/ui/sepcomp/sepcomp-fns-backwards.rs b/tests/ui/sepcomp/sepcomp-fns-backwards.rs index f56769e2b8c6d..35326d19d6e30 100644 --- a/tests/ui/sepcomp/sepcomp-fns-backwards.rs +++ b/tests/ui/sepcomp/sepcomp-fns-backwards.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -C codegen-units=3 +//@ compile-flags: -C codegen-units=3 // Test references to items that haven't been codegened yet. diff --git a/tests/ui/sepcomp/sepcomp-fns.rs b/tests/ui/sepcomp/sepcomp-fns.rs index a432c89606e33..399193e69b655 100644 --- a/tests/ui/sepcomp/sepcomp-fns.rs +++ b/tests/ui/sepcomp/sepcomp-fns.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C codegen-units=3 +//@ run-pass +//@ compile-flags: -C codegen-units=3 // Test basic separate compilation functionality. The functions should be able // to call each other even though they will be placed in different compilation diff --git a/tests/ui/sepcomp/sepcomp-lib-lto.rs b/tests/ui/sepcomp/sepcomp-lib-lto.rs index 164ae79c254fa..2166a8fd031ff 100644 --- a/tests/ui/sepcomp/sepcomp-lib-lto.rs +++ b/tests/ui/sepcomp/sepcomp-lib-lto.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Check that we can use `-C lto` when linking against libraries that were // separately compiled. -// aux-build:sepcomp_lib.rs -// compile-flags: -C lto -g -// no-prefer-dynamic +//@ aux-build:sepcomp_lib.rs +//@ compile-flags: -C lto -g +//@ no-prefer-dynamic extern crate sepcomp_lib; use sepcomp_lib::a::one; diff --git a/tests/ui/sepcomp/sepcomp-lib.rs b/tests/ui/sepcomp/sepcomp-lib.rs index 728dc078b7ed2..70948e6d64379 100644 --- a/tests/ui/sepcomp/sepcomp-lib.rs +++ b/tests/ui/sepcomp/sepcomp-lib.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sepcomp_lib.rs +//@ run-pass +//@ aux-build:sepcomp_lib.rs // Test linking against a library built with -C codegen-units > 1 diff --git a/tests/ui/sepcomp/sepcomp-statics.rs b/tests/ui/sepcomp/sepcomp-statics.rs index 5457c8a0ae97d..580bb628da68c 100644 --- a/tests/ui/sepcomp/sepcomp-statics.rs +++ b/tests/ui/sepcomp/sepcomp-statics.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -C codegen-units=3 +//@ compile-flags: -C codegen-units=3 // Test references to static items across compilation units. diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs index a59e25a273e70..6a40b5ccc1247 100644 --- a/tests/ui/sepcomp/sepcomp-unwind.rs +++ b/tests/ui/sepcomp/sepcomp-unwind.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code)] -// compile-flags: -C codegen-units=3 -// ignore-emscripten no threads support +//@ compile-flags: -C codegen-units=3 +//@ ignore-emscripten no threads support // Test unwinding through multiple compilation units. diff --git a/tests/ui/shadow-bool.rs b/tests/ui/shadow-bool.rs index f290a329eaac2..8cba2c1710b44 100644 --- a/tests/ui/shadow-bool.rs +++ b/tests/ui/shadow-bool.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod bar { pub trait QueryId { diff --git a/tests/ui/shadowed-use-visibility.rs b/tests/ui/shadowed-use-visibility.rs index 350fbfeaeb5ba..66181267f98a8 100644 --- a/tests/ui/shadowed-use-visibility.rs +++ b/tests/ui/shadowed-use-visibility.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] mod foo { diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs index 800735cf3a768..ef90937b2217f 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs @@ -4,8 +4,8 @@ // separators. This test uses backslash as the path separator for the command // line arguments and is only run on windows. // -// only-windows -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}\shell-argfiles\shell-argfiles-badquotes.args +//@ only-windows +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}\shell-argfiles\shell-argfiles-badquotes.args fn main() { } diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs index f9160143a0410..1edb69c3f2bbc 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs @@ -5,8 +5,8 @@ // the path separator for the command line arguments that is only run on // windows. // -// ignore-windows -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles-badquotes.args +//@ ignore-windows +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles-badquotes.args fn main() { } diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs index d71e3218f53b8..b907fd3bbc758 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: @{{src-base}}/shell-argfiles/shell-argfiles-via-argfile.args @shell:{{src-base}}/shell-argfiles/shell-argfiles-via-argfile-shell.args +//@ build-pass +//@ compile-flags: @{{src-base}}/shell-argfiles/shell-argfiles-via-argfile.args @shell:{{src-base}}/shell-argfiles/shell-argfiles-via-argfile-shell.args #[cfg(not(shell_args_set))] compile_error!("shell_args_set not set"); diff --git a/tests/ui/shell-argfiles/shell-argfiles.rs b/tests/ui/shell-argfiles/shell-argfiles.rs index 9bc252ea628a9..f9ebef68f5a14 100644 --- a/tests/ui/shell-argfiles/shell-argfiles.rs +++ b/tests/ui/shell-argfiles/shell-argfiles.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles.args +//@ build-pass +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/ui/short-error-format.rs b/tests/ui/short-error-format.rs index acba4674a4d6d..719870a04fb9b 100644 --- a/tests/ui/short-error-format.rs +++ b/tests/ui/short-error-format.rs @@ -1,4 +1,4 @@ -// compile-flags: --error-format=short +//@ compile-flags: --error-format=short fn foo(_: u32) {} diff --git a/tests/ui/simd/array-trait.rs b/tests/ui/simd/array-trait.rs index 27a7df17d666d..bf1e219460f4b 100644 --- a/tests/ui/simd/array-trait.rs +++ b/tests/ui/simd/array-trait.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(repr_simd, platform_intrinsics, generic_const_exprs)] #![allow(non_camel_case_types, incomplete_features)] diff --git a/tests/ui/simd/array-type.rs b/tests/ui/simd/array-type.rs index 7d66395a3c80f..c9f5ed0d03130 100644 --- a/tests/ui/simd/array-type.rs +++ b/tests/ui/simd/array-type.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/generics.rs b/tests/ui/simd/generics.rs index fa9d35ee4df85..9b54de809ed1a 100644 --- a/tests/ui/simd/generics.rs +++ b/tests/ui/simd/generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/float-math-pass.rs b/tests/ui/simd/intrinsic/float-math-pass.rs index 7a4f7466559ff..c1ba50a910b17 100644 --- a/tests/ui/simd/intrinsic/float-math-pass.rs +++ b/tests/ui/simd/intrinsic/float-math-pass.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten -// ignore-android +//@ run-pass +//@ ignore-emscripten +//@ ignore-android // FIXME: this test fails on arm-android because the NDK version 14 is too old. // It needs at least version 18. We disable it on all android build bots because diff --git a/tests/ui/simd/intrinsic/float-minmax-pass.rs b/tests/ui/simd/intrinsic/float-minmax-pass.rs index 968b074b6ef16..a773c79dbe9d4 100644 --- a/tests/ui/simd/intrinsic/float-minmax-pass.rs +++ b/tests/ui/simd/intrinsic/float-minmax-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Test that the simd_f{min,max} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs index 62fb5238bbd0f..b337a77c24c31 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs index f021ee4710a93..fa54228bbcfbd 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs index 9736d1b964da3..b31a604cb14c5 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-emscripten +//@ build-fail +//@ ignore-emscripten #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] #[repr(simd)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs index c11d14b99d482..1a4ba3659c1d5 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-as.rs b/tests/ui/simd/intrinsic/generic-as.rs index a975190a2fafd..807cd927734d5 100644 --- a/tests/ui/simd/intrinsic/generic-as.rs +++ b/tests/ui/simd/intrinsic/generic-as.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-bitmask-pass.rs b/tests/ui/simd/intrinsic/generic-bitmask-pass.rs index 8c436841b44e8..3063a0a4a3afd 100644 --- a/tests/ui/simd/intrinsic/generic-bitmask-pass.rs +++ b/tests/ui/simd/intrinsic/generic-bitmask-pass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten -// ignore-endian-big behavior of simd_bitmask is endian-specific +//@ ignore-emscripten +//@ ignore-endian-big behavior of simd_bitmask is endian-specific // Test that the simd_bitmask intrinsic produces correct results. diff --git a/tests/ui/simd/intrinsic/generic-bitmask.rs b/tests/ui/simd/intrinsic/generic-bitmask.rs index 9a23dae77b96e..f1bda34a85ed8 100644 --- a/tests/ui/simd/intrinsic/generic-bitmask.rs +++ b/tests/ui/simd/intrinsic/generic-bitmask.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_bitmask intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-bswap-byte.rs b/tests/ui/simd/intrinsic/generic-bswap-byte.rs index 13fc942c25a35..d86db6601b239 100644 --- a/tests/ui/simd/intrinsic/generic-bswap-byte.rs +++ b/tests/ui/simd/intrinsic/generic-bswap-byte.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-cast-pass.rs b/tests/ui/simd/intrinsic/generic-cast-pass.rs index 89436c83e25ea..24ec910f53439 100644 --- a/tests/ui/simd/intrinsic/generic-cast-pass.rs +++ b/tests/ui/simd/intrinsic/generic-cast-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs b/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs index b9382310deb2c..ade52086bc42f 100644 --- a/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs +++ b/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/generic-cast.rs b/tests/ui/simd/intrinsic/generic-cast.rs index 4f4fa06b00230..9488d9a42ab74 100644 --- a/tests/ui/simd/intrinsic/generic-cast.rs +++ b/tests/ui/simd/intrinsic/generic-cast.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-comparison-pass.rs b/tests/ui/simd/intrinsic/generic-comparison-pass.rs index 103132c18ae2f..083236387e477 100644 --- a/tests/ui/simd/intrinsic/generic-comparison-pass.rs +++ b/tests/ui/simd/intrinsic/generic-comparison-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics, concat_idents)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-comparison.rs b/tests/ui/simd/intrinsic/generic-comparison.rs index 3cd38042f0f24..710e660d9cbbc 100644 --- a/tests/ui/simd/intrinsic/generic-comparison.rs +++ b/tests/ui/simd/intrinsic/generic-comparison.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-elements-pass.rs b/tests/ui/simd/intrinsic/generic-elements-pass.rs index 905c3b8d3cca1..e3b527fa4fe45 100644 --- a/tests/ui/simd/intrinsic/generic-elements-pass.rs +++ b/tests/ui/simd/intrinsic/generic-elements-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] #![feature(inline_const)] diff --git a/tests/ui/simd/intrinsic/generic-elements.rs b/tests/ui/simd/intrinsic/generic-elements.rs index 6ba93e46f75e6..a8ee4cf396577 100644 --- a/tests/ui/simd/intrinsic/generic-elements.rs +++ b/tests/ui/simd/intrinsic/generic-elements.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics, rustc_attrs, adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/simd/intrinsic/generic-gather-pass.rs b/tests/ui/simd/intrinsic/generic-gather-pass.rs index 7d4b3dbd7b411..ca9e9de2afa18 100644 --- a/tests/ui/simd/intrinsic/generic-gather-pass.rs +++ b/tests/ui/simd/intrinsic/generic-gather-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Test that the simd_{gather,scatter} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-reduction-pass.rs b/tests/ui/simd/intrinsic/generic-reduction-pass.rs index 4a54afee80758..4928ea7bac739 100644 --- a/tests/ui/simd/intrinsic/generic-reduction-pass.rs +++ b/tests/ui/simd/intrinsic/generic-reduction-pass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten +//@ ignore-emscripten // Test that the simd_reduce_{op} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-reduction.rs b/tests/ui/simd/intrinsic/generic-reduction.rs index ede4b26d19c2a..5e3debb411e44 100644 --- a/tests/ui/simd/intrinsic/generic-reduction.rs +++ b/tests/ui/simd/intrinsic/generic-reduction.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-emscripten +//@ build-fail +//@ ignore-emscripten // Test that the simd_reduce_{op} intrinsics produce ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-select-pass.rs b/tests/ui/simd/intrinsic/generic-select-pass.rs index b850cf9750a1f..df8a89e26c9f3 100644 --- a/tests/ui/simd/intrinsic/generic-select-pass.rs +++ b/tests/ui/simd/intrinsic/generic-select-pass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten -// ignore-endian-big behavior of simd_select_bitmask is endian-specific +//@ ignore-emscripten +//@ ignore-endian-big behavior of simd_select_bitmask is endian-specific // Test that the simd_select intrinsics produces correct results. diff --git a/tests/ui/simd/intrinsic/generic-select.rs b/tests/ui/simd/intrinsic/generic-select.rs index 248e82ea21cfc..ab963ed942f74 100644 --- a/tests/ui/simd/intrinsic/generic-select.rs +++ b/tests/ui/simd/intrinsic/generic-select.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_select intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-shuffle.rs b/tests/ui/simd/intrinsic/generic-shuffle.rs index 9611780ac079e..db814f02c8b34 100644 --- a/tests/ui/simd/intrinsic/generic-shuffle.rs +++ b/tests/ui/simd/intrinsic/generic-shuffle.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_shuffle intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs index 5ca684a9d7831..5b49f4f7203c5 100644 --- a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs +++ b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs @@ -1,8 +1,8 @@ // 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 -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/inlining-issue67557.rs b/tests/ui/simd/intrinsic/inlining-issue67557.rs index 5633ad70cd318..3d6284ef1c6be 100644 --- a/tests/ui/simd/intrinsic/inlining-issue67557.rs +++ b/tests/ui/simd/intrinsic/inlining-issue67557.rs @@ -1,8 +1,8 @@ // This used to cause assert_10_13 to unexpectingly fail, due to simd_shuffle_indices being passed // the wrong Instance, causing issues with inlining. See #67557. // -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/ptr-cast.rs b/tests/ui/simd/intrinsic/ptr-cast.rs index 1d13720bcd31e..109e1d0039a65 100644 --- a/tests/ui/simd/intrinsic/ptr-cast.rs +++ b/tests/ui/simd/intrinsic/ptr-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/issue-105439.rs b/tests/ui/simd/issue-105439.rs index 35ca76e989b91..3eb137e4ee7d1 100644 --- a/tests/ui/simd/issue-105439.rs +++ b/tests/ui/simd/issue-105439.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zverify-llvm-ir +//@ run-pass +//@ compile-flags: -O -Zverify-llvm-ir #![feature(repr_simd)] #![feature(platform_intrinsics)] diff --git a/tests/ui/simd/issue-17170.rs b/tests/ui/simd/issue-17170.rs index 8d70dacdc9010..abfc1c25ffb78 100644 --- a/tests/ui/simd/issue-17170.rs +++ b/tests/ui/simd/issue-17170.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd)] #[repr(simd)] diff --git a/tests/ui/simd/issue-32947.rs b/tests/ui/simd/issue-32947.rs index b07def21e88be..bccca25c52b1d 100644 --- a/tests/ui/simd/issue-32947.rs +++ b/tests/ui/simd/issue-32947.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) +//@ run-pass +//@ ignore-emscripten FIXME(#45351) #![feature(repr_simd, test)] diff --git a/tests/ui/simd/issue-39720.rs b/tests/ui/simd/issue-39720.rs index 8cf841f937121..ea6e893b79d9c 100644 --- a/tests/ui/simd/issue-39720.rs +++ b/tests/ui/simd/issue-39720.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) +//@ run-pass +//@ ignore-emscripten FIXME(#45351) #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/issue-85915-simd-ptrs.rs b/tests/ui/simd/issue-85915-simd-ptrs.rs index 6fe415545f809..96ac76f0590e9 100644 --- a/tests/ui/simd/issue-85915-simd-ptrs.rs +++ b/tests/ui/simd/issue-85915-simd-ptrs.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Short form of the generic gather/scatter tests, // verifying simd([*const T; N]) and simd([*mut T; N]) pass typeck and work. diff --git a/tests/ui/simd/issue-89193.rs b/tests/ui/simd/issue-89193.rs index cd24d6675b2f8..f34242e7bf894 100644 --- a/tests/ui/simd/issue-89193.rs +++ b/tests/ui/simd/issue-89193.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that simd gather instructions on slice of usize don't cause crash // See issue #89183 - https://github.com/rust-lang/rust/issues/89193 diff --git a/tests/ui/simd/libm_std_can_float.rs b/tests/ui/simd/libm_std_can_float.rs index 78bd0c14022e4..520b7d09ae96f 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 +//@ run-pass // This is the converse of the other libm test. #![feature(portable_simd)] diff --git a/tests/ui/simd/masked-load-store-build-fail.rs b/tests/ui/simd/masked-load-store-build-fail.rs index 9b79b3bd6eaf2..7b414dfcc9324 100644 --- a/tests/ui/simd/masked-load-store-build-fail.rs +++ b/tests/ui/simd/masked-load-store-build-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/masked-load-store-check-fail.rs b/tests/ui/simd/masked-load-store-check-fail.rs index d4b35e211c865..a86979d8faf60 100644 --- a/tests/ui/simd/masked-load-store-check-fail.rs +++ b/tests/ui/simd/masked-load-store-check-fail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/masked-load-store.rs b/tests/ui/simd/masked-load-store.rs index 74ee652ec6e0a..b2f5490727fda 100644 --- a/tests/ui/simd/masked-load-store.rs +++ b/tests/ui/simd/masked-load-store.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/monomorphize-shuffle-index.rs b/tests/ui/simd/monomorphize-shuffle-index.rs index db7953f06dd46..052f0eec472d3 100644 --- a/tests/ui/simd/monomorphize-shuffle-index.rs +++ b/tests/ui/simd/monomorphize-shuffle-index.rs @@ -1,6 +1,6 @@ -//[old]run-pass -//[generic_with_fn]run-pass -// revisions: old generic generic_with_fn +//@[old]run-pass +//@[generic_with_fn]run-pass +//@ revisions: old generic generic_with_fn #![feature(repr_simd, platform_intrinsics, adt_const_params, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/simd/repr_packed.rs b/tests/ui/simd/repr_packed.rs index df2d59a58b887..395751e86f110 100644 --- a/tests/ui/simd/repr_packed.rs +++ b/tests/ui/simd/repr_packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/shuffle-not-out-of-bounds.rs b/tests/ui/simd/shuffle-not-out-of-bounds.rs index 18939bcc5b4b2..158e9956435da 100644 --- a/tests/ui/simd/shuffle-not-out-of-bounds.rs +++ b/tests/ui/simd/shuffle-not-out-of-bounds.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/shuffle.rs b/tests/ui/simd/shuffle.rs index 838e31f8e4154..5022afc5b4963 100644 --- a/tests/ui/simd/shuffle.rs +++ b/tests/ui/simd/shuffle.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: opt noopt -//[noopt] compile-flags: -Copt-level=0 -//[opt] compile-flags: -O +//@ run-pass +//@ revisions: opt noopt +//@[noopt] compile-flags: -Copt-level=0 +//@[opt] compile-flags: -O #![feature(repr_simd, platform_intrinsics)] #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/simd/simd-bitmask.rs b/tests/ui/simd/simd-bitmask.rs index 14ee2e741bdfd..a3717c9e21ae5 100644 --- a/tests/ui/simd/simd-bitmask.rs +++ b/tests/ui/simd/simd-bitmask.rs @@ -1,5 +1,5 @@ -//run-pass -//ignore-endian-big behavior of simd_select_bitmask is endian-specific +//@run-pass +//@ignore-endian-big behavior of simd_select_bitmask is endian-specific #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/size-align.rs b/tests/ui/simd/size-align.rs index 0afa4947225d3..ff23ea5980ba2 100644 --- a/tests/ui/simd/size-align.rs +++ b/tests/ui/simd/size-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs index 5dd163715eb49..7148fc509de09 100644 --- a/tests/ui/simd/target-feature-mixup.rs +++ b/tests/ui/simd/target-feature-mixup.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] #![allow(overflowing_literals)] -// ignore-emscripten -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) +//@ ignore-emscripten +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) #![feature(repr_simd, target_feature, cfg_target_feature)] #![feature(avx512_target_feature)] diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.rs b/tests/ui/simd/type-generic-monomorphisation-empty.rs index 2bf6641e9c91c..38c5581105d05 100644 --- a/tests/ui/simd/type-generic-monomorphisation-empty.rs +++ b/tests/ui/simd/type-generic-monomorphisation-empty.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd<0>` of zero length +//@ error-pattern:monomorphising SIMD type `Simd<0>` of zero length #[repr(simd)] struct Simd([f32; N]); diff --git a/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs b/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs index ae321c974b9d9..dbe2d9ddd54a7 100644 --- a/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs +++ b/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #![feature(extern_types)] #![feature(repr_simd)] diff --git a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs index 0bc73b155801e..a2f6998c6d939 100644 --- a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs +++ b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs @@ -1,10 +1,10 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] struct E; -// error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `E` +//@ error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `E` #[repr(simd)] struct S([T; 4]); diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.rs b/tests/ui/simd/type-generic-monomorphisation-oversized.rs index a7dc482f3cb1d..53f66f1d596f1 100644 --- a/tests/ui/simd/type-generic-monomorphisation-oversized.rs +++ b/tests/ui/simd/type-generic-monomorphisation-oversized.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768 +//@ error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768 #[repr(simd)] struct Simd([f32; N]); 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 9b645d363e932..26269335bc47c 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 +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs index 3e02b08ce5da2..564118e9b1343 100644 --- a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs +++ b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] -// error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` +//@ error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` #[repr(simd)] struct S(T); diff --git a/tests/ui/simd/type-generic-monomorphisation.rs b/tests/ui/simd/type-generic-monomorphisation.rs index 12f9d65d77af0..90ddd1dde0fd0 100644 --- a/tests/ui/simd/type-generic-monomorphisation.rs +++ b/tests/ui/simd/type-generic-monomorphisation.rs @@ -1,9 +1,9 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd2` with a non-primitive-scalar (integer/float/pointer) element type `X` +//@ error-pattern:monomorphising SIMD type `Simd2` with a non-primitive-scalar (integer/float/pointer) element type `X` struct X(Vec); #[repr(simd)] diff --git a/tests/ui/simd/type-wide-ptr.rs b/tests/ui/simd/type-wide-ptr.rs index 88f62a07ea0d8..41d9fac26ad42 100644 --- a/tests/ui/simd/type-wide-ptr.rs +++ b/tests/ui/simd/type-wide-ptr.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] -// error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` +//@ error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` #[repr(simd)] struct S([*mut [u8]; 4]); diff --git a/tests/ui/simd/wasm-simd-indirect.rs b/tests/ui/simd/wasm-simd-indirect.rs index 88f92fce2b2f9..f713f0307f803 100644 --- a/tests/ui/simd/wasm-simd-indirect.rs +++ b/tests/ui/simd/wasm-simd-indirect.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[cfg(target_arch = "wasm32")] fn main() { diff --git a/tests/ui/simple_global_asm.rs b/tests/ui/simple_global_asm.rs index c3b2f2e0bc4dd..9b193b3e44ce6 100644 --- a/tests/ui/simple_global_asm.rs +++ b/tests/ui/simple_global_asm.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-asm-support +//@ run-pass +//@ needs-asm-support #![feature(naked_functions)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/derive-eq.rs b/tests/ui/single-use-lifetime/derive-eq.rs index e5bdfc55dd670..e9a3e91554ad6 100644 --- a/tests/ui/single-use-lifetime/derive-eq.rs +++ b/tests/ui/single-use-lifetime/derive-eq.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/one-use-in-fn-return.rs b/tests/ui/single-use-lifetime/one-use-in-fn-return.rs index 1ade01eed36e4..818705c9bf5ec 100644 --- a/tests/ui/single-use-lifetime/one-use-in-fn-return.rs +++ b/tests/ui/single-use-lifetime/one-use-in-fn-return.rs @@ -5,7 +5,7 @@ // (Normally, using `'static` would be preferred, but there are // times when that is not what you want.) -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/one-use-in-struct.rs b/tests/ui/single-use-lifetime/one-use-in-struct.rs index 9cad942e7a2e7..1c46e37099fae 100644 --- a/tests/ui/single-use-lifetime/one-use-in-struct.rs +++ b/tests/ui/single-use-lifetime/one-use-in-struct.rs @@ -2,7 +2,7 @@ // even when they are only used once (since to not use a named // lifetime is illegal!) // -// check-pass +//@ check-pass // Use forbid to verify that `automatically_derived` is handled correctly. #![forbid(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs b/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs index f80f3f63c66d9..93575dccd4d3b 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn when lifetime name is used in // both the argument and return. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs b/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs index 51724ebf89888..38d7fb0657c62 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn when lifetime name is used multiple // arguments, or more than once in a single argument. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs b/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs index 125a395db3be3..6be28e6c9a84b 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs @@ -1,6 +1,6 @@ // Test that we DO NOT warn for a lifetime used twice in an impl. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs b/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs index 16431a39fd0e5..1f0da77baee8b 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn for a lifetime on an impl used in both // header and in an associated type. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed b/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed index 0f26a975a370f..22f16296412de 100644 --- a/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed +++ b/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we DO warn when lifetime name is not used at all. diff --git a/tests/ui/single-use-lifetime/zero-uses-in-fn.rs b/tests/ui/single-use-lifetime/zero-uses-in-fn.rs index 7f9504fe5a90a..d6950b7e1b41c 100644 --- a/tests/ui/single-use-lifetime/zero-uses-in-fn.rs +++ b/tests/ui/single-use-lifetime/zero-uses-in-fn.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we DO warn when lifetime name is not used at all. diff --git a/tests/ui/sized-borrowed-pointer.rs b/tests/ui/sized-borrowed-pointer.rs index 319b8026954b0..f1635531e4ece 100644 --- a/tests/ui/sized-borrowed-pointer.rs +++ b/tests/ui/sized-borrowed-pointer.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Possibly-dynamic size of typaram should be cleared at pointer boundary. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn bar() { } fn foo() { bar::<&T>() } diff --git a/tests/ui/sized-owned-pointer.rs b/tests/ui/sized-owned-pointer.rs index 2abf0a1e0c2c9..48f870de9ae7e 100644 --- a/tests/ui/sized-owned-pointer.rs +++ b/tests/ui/sized-owned-pointer.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Possibly-dynamic size of typaram should be cleared at pointer boundary. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn bar() { } fn foo() { bar::>() } diff --git a/tests/ui/sized/coinductive-1-gat.rs b/tests/ui/sized/coinductive-1-gat.rs index cdf70920f0095..ad284f724c4b8 100644 --- a/tests/ui/sized/coinductive-1-gat.rs +++ b/tests/ui/sized/coinductive-1-gat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Node(C::Assoc::); trait Trait { diff --git a/tests/ui/sized/coinductive-1.rs b/tests/ui/sized/coinductive-1.rs index 7bcd0f1fdaf6d..3c1ee557af774 100644 --- a/tests/ui/sized/coinductive-1.rs +++ b/tests/ui/sized/coinductive-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Node>(C::Assoc); trait Trait { diff --git a/tests/ui/sized/coinductive-2.rs b/tests/ui/sized/coinductive-2.rs index 43a5a28f710a7..277dd8c878aa1 100644 --- a/tests/ui/sized/coinductive-2.rs +++ b/tests/ui/sized/coinductive-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Node> { _children: C::Collection, } diff --git a/tests/ui/sized/recursive-type-binding.rs b/tests/ui/sized/recursive-type-binding.rs index 7d95417a6ffd9..52de04afd66d3 100644 --- a/tests/ui/sized/recursive-type-binding.rs +++ b/tests/ui/sized/recursive-type-binding.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR cycle detected when computing layout of `Foo<()>` trait A { type Assoc: ?Sized; } diff --git a/tests/ui/sized/recursive-type-coercion-from-never.rs b/tests/ui/sized/recursive-type-coercion-from-never.rs index a1b654637316d..7bd87ae06c5e4 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.rs +++ b/tests/ui/sized/recursive-type-coercion-from-never.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR cycle detected when computing layout of `Foo<()>` // Regression test for a stack overflow: https://github.com/rust-lang/rust/issues/113197 diff --git a/tests/ui/sized/recursive-type-pass.rs b/tests/ui/sized/recursive-type-pass.rs index cd6805967e524..bffca39ffcbbf 100644 --- a/tests/ui/sized/recursive-type-pass.rs +++ b/tests/ui/sized/recursive-type-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type Assoc; } impl A for () { diff --git a/tests/ui/span/borrowck-ref-into-rvalue.fixed b/tests/ui/span/borrowck-ref-into-rvalue.fixed index 51f65e5345d2a..9521a53e6bcab 100644 --- a/tests/ui/span/borrowck-ref-into-rvalue.fixed +++ b/tests/ui/span/borrowck-ref-into-rvalue.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let msg; let binding = Some("Hello".to_string()); diff --git a/tests/ui/span/borrowck-ref-into-rvalue.rs b/tests/ui/span/borrowck-ref-into-rvalue.rs index 7b09fad927fdf..1002e20987c55 100644 --- a/tests/ui/span/borrowck-ref-into-rvalue.rs +++ b/tests/ui/span/borrowck-ref-into-rvalue.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let msg; match Some("Hello".to_string()) { diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs index f20024e759aa3..4522a62705310 100644 --- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs +++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs @@ -1,4 +1,4 @@ -// compile-flags: -Wrust-2021-incompatible-closure-captures +//@ compile-flags: -Wrust-2021-incompatible-closure-captures pub struct A {} diff --git a/tests/ui/span/issue-107353.rs b/tests/ui/span/issue-107353.rs index 943f7f0eb1929..6919c95058faf 100644 --- a/tests/ui/span/issue-107353.rs +++ b/tests/ui/span/issue-107353.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength // Verify that span interning correctly handles having a span of exactly MAX_LEN length. -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![allow(dead_code)] fn a<'a, T>() -> &'a T { diff --git a/tests/ui/span/issue-15480.fixed b/tests/ui/span/issue-15480.fixed index e6d1a4dd32806..4a86769cc79ee 100644 --- a/tests/ui/span/issue-15480.fixed +++ b/tests/ui/span/issue-15480.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/span/issue-15480.rs b/tests/ui/span/issue-15480.rs index 916ce4b1edb26..753961d7186b3 100644 --- a/tests/ui/span/issue-15480.rs +++ b/tests/ui/span/issue-15480.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/span/issue-24690.rs b/tests/ui/span/issue-24690.rs index 2b7349c5503e1..a0d3551339475 100644 --- a/tests/ui/span/issue-24690.rs +++ b/tests/ui/span/issue-24690.rs @@ -1,7 +1,7 @@ //! A test to ensure that helpful `note` messages aren't emitted more often //! than necessary. -// check-pass +//@ check-pass // Although there are three warnings, we should only get two "lint level defined // here" notes pointing at the `warnings` span, one for each error type. diff --git a/tests/ui/span/issue-42234-unknown-receiver-type.rs b/tests/ui/span/issue-42234-unknown-receiver-type.rs index fd53121204c78..53d1e3eed820e 100644 --- a/tests/ui/span/issue-42234-unknown-receiver-type.rs +++ b/tests/ui/span/issue-42234-unknown-receiver-type.rs @@ -1,4 +1,4 @@ -// revisions: full generic_arg +//@ revisions: full generic_arg #![cfg_attr(generic_arg, feature(generic_arg_infer))] // When the type of a method call's receiver is unknown, the span should point diff --git a/tests/ui/span/issue-71363.rs b/tests/ui/span/issue-71363.rs index 8014f3796250a..f186e0526a424 100644 --- a/tests/ui/span/issue-71363.rs +++ b/tests/ui/span/issue-71363.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no struct MyError; impl std::error::Error for MyError {} diff --git a/tests/ui/span/lint-unused-unsafe.rs b/tests/ui/span/lint-unused-unsafe.rs index 94bdd11400717..f008b0abe9fda 100644 --- a/tests/ui/span/lint-unused-unsafe.rs +++ b/tests/ui/span/lint-unused-unsafe.rs @@ -1,7 +1,7 @@ // Exercise the unused_unsafe attribute in some positive and negative cases -// edition:2018 +//@ edition:2018 #![allow(dead_code)] #![deny(unused_unsafe)] diff --git a/tests/ui/span/macro-span-replacement.rs b/tests/ui/span/macro-span-replacement.rs index 66973c58d35cd..e6fcfa4c7090a 100644 --- a/tests/ui/span/macro-span-replacement.rs +++ b/tests/ui/span/macro-span-replacement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/span/multispan-import-lint.rs b/tests/ui/span/multispan-import-lint.rs index 3ce7f2ce35da8..3bfb8f89affcd 100644 --- a/tests/ui/span/multispan-import-lint.rs +++ b/tests/ui/span/multispan-import-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/span/transitive-dep-span.rs b/tests/ui/span/transitive-dep-span.rs index 2d46f74ad9bc9..deaf0738e2414 100644 --- a/tests/ui/span/transitive-dep-span.rs +++ b/tests/ui/span/transitive-dep-span.rs @@ -4,9 +4,9 @@ // The order of these next lines is important, since we need // transitive_dep_two.rs to be able to reference transitive_dep_three.rs // -// aux-build: transitive_dep_three.rs -// aux-build: transitive_dep_two.rs -// compile-flags: -Z macro-backtrace +//@ aux-build: transitive_dep_three.rs +//@ aux-build: transitive_dep_two.rs +//@ compile-flags: -Z macro-backtrace extern crate transitive_dep_two; diff --git a/tests/ui/span/unused-warning-point-at-identifier.rs b/tests/ui/span/unused-warning-point-at-identifier.rs index af4834503cd56..8a075850063a5 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 +//@ run-pass #![warn(unused)] diff --git a/tests/ui/specialization/assoc-ty-graph-cycle.rs b/tests/ui/specialization/assoc-ty-graph-cycle.rs index bec8cc187b4ab..083b03028f08c 100644 --- a/tests/ui/specialization/assoc-ty-graph-cycle.rs +++ b/tests/ui/specialization/assoc-ty-graph-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't crash with a cycle error during coherence. diff --git a/tests/ui/specialization/const_trait_impl.rs b/tests/ui/specialization/const_trait_impl.rs index b1ec58c3df31b..d842601a6b7b9 100644 --- a/tests/ui/specialization/const_trait_impl.rs +++ b/tests/ui/specialization/const_trait_impl.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, min_specialization, rustc_attrs)] diff --git a/tests/ui/specialization/cross-crate-defaults.rs b/tests/ui/specialization/cross-crate-defaults.rs index fc28d0c815eb3..c9204461e2063 100644 --- a/tests/ui/specialization/cross-crate-defaults.rs +++ b/tests/ui/specialization/cross-crate-defaults.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:cross_crates_defaults.rs +//@ aux-build:cross_crates_defaults.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/ctfe/default-assoc-const.rs b/tests/ui/specialization/ctfe/default-assoc-const.rs index bb3b735caa312..083aedece51a5 100644 --- a/tests/ui/specialization/ctfe/default-assoc-const.rs +++ b/tests/ui/specialization/ctfe/default-assoc-const.rs @@ -1,5 +1,5 @@ //! Regression test for revealing associated types through specialization during const eval. -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARNING the feature `specialization` is incomplete and may not be safe to use diff --git a/tests/ui/specialization/ctfe/default-assoc-type.rs b/tests/ui/specialization/ctfe/default-assoc-type.rs index 3624a0f160c5e..0ceba2dc4977a 100644 --- a/tests/ui/specialization/ctfe/default-assoc-type.rs +++ b/tests/ui/specialization/ctfe/default-assoc-type.rs @@ -1,6 +1,6 @@ //! Regression test showing that we can access associated types during const eval, //! even if they rely on specialization. -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARNING the feature `specialization` is incomplete and may not be safe to use diff --git a/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs b/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs index 5d67160eb96ad..697a62ca547f2 100644 --- a/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs +++ b/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/defaultimpl/out-of-order.rs b/tests/ui/specialization/defaultimpl/out-of-order.rs index 94b3905178fa8..2274946df697a 100644 --- a/tests/ui/specialization/defaultimpl/out-of-order.rs +++ b/tests/ui/specialization/defaultimpl/out-of-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that you can list the more specific impl before the more general one. diff --git a/tests/ui/specialization/defaultimpl/overlap-projection.rs b/tests/ui/specialization/defaultimpl/overlap-projection.rs index 46f54c466a831..da466e6671c96 100644 --- a/tests/ui/specialization/defaultimpl/overlap-projection.rs +++ b/tests/ui/specialization/defaultimpl/overlap-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that impls on projected self types can resolve overlap, even when the // projections involve specialization, so long as the associated type is diff --git a/tests/ui/specialization/defaultimpl/projection.rs b/tests/ui/specialization/defaultimpl/projection.rs index f19c55b043b4b..7a77c76a5ac5f 100644 --- a/tests/ui/specialization/defaultimpl/projection.rs +++ b/tests/ui/specialization/defaultimpl/projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs index 89fef5b5ef969..eb4ecf24a300b 100644 --- a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs +++ b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can combine a default impl that supplies one method with a // full impl that supplies the other, and they can invoke one another. diff --git a/tests/ui/specialization/issue-35376.rs b/tests/ui/specialization/issue-35376.rs index cc35213b93d68..786f22967ebda 100644 --- a/tests/ui/specialization/issue-35376.rs +++ b/tests/ui/specialization/issue-35376.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-36804.rs b/tests/ui/specialization/issue-36804.rs index 89350602f3652..5ed0c1aaf20de 100644 --- a/tests/ui/specialization/issue-36804.rs +++ b/tests/ui/specialization/issue-36804.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete pub struct Cloned(I); diff --git a/tests/ui/specialization/issue-38091-2.rs b/tests/ui/specialization/issue-38091-2.rs index 9ed0b240d0a0f..da276031378db 100644 --- a/tests/ui/specialization/issue-38091-2.rs +++ b/tests/ui/specialization/issue-38091-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR overflow evaluating the requirement `i32: Check` #![feature(specialization)] diff --git a/tests/ui/specialization/issue-39618.rs b/tests/ui/specialization/issue-39618.rs index 72630ee9c7055..5b9b012e66531 100644 --- a/tests/ui/specialization/issue-39618.rs +++ b/tests/ui/specialization/issue-39618.rs @@ -2,7 +2,7 @@ // FIXME(JohnTitor): Centril pointed out this looks suspicions, we should revisit here. // More context: https://github.com/rust-lang/rust/pull/69192#discussion_r379846796 -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-40582.rs b/tests/ui/specialization/issue-40582.rs index 9805933553dd7..61b8c4cd29583 100644 --- a/tests/ui/specialization/issue-40582.rs +++ b/tests/ui/specialization/issue-40582.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #40582 +//@ check-pass +//@ known-bug: #40582 // Should fail. Should not be possible to implement `make_static`. diff --git a/tests/ui/specialization/issue-43037.rs b/tests/ui/specialization/issue-43037.rs index a1e3f998b2370..fb9a581369e6c 100644 --- a/tests/ui/specialization/issue-43037.rs +++ b/tests/ui/specialization/issue-43037.rs @@ -1,4 +1,4 @@ -// revisions: current negative +//@ revisions: current negative #![feature(specialization)] #![cfg_attr(negative, feature(with_negative_coherence))] #![allow(incomplete_features)] diff --git a/tests/ui/specialization/issue-45814.rs b/tests/ui/specialization/issue-45814.rs index 832d734d9450a..233583bd89bff 100644 --- a/tests/ui/specialization/issue-45814.rs +++ b/tests/ui/specialization/issue-45814.rs @@ -1,4 +1,4 @@ -// revisions: current negative +//@ revisions: current negative #![feature(specialization)] #![cfg_attr(negative, feature(with_negative_coherence))] #![allow(incomplete_features)] diff --git a/tests/ui/specialization/issue-50452.rs b/tests/ui/specialization/issue-50452.rs index 29fc12066e875..c379825feda92 100644 --- a/tests/ui/specialization/issue-50452.rs +++ b/tests/ui/specialization/issue-50452.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-63716-parse-async.rs b/tests/ui/specialization/issue-63716-parse-async.rs index 10f185c335144..3314b4e20f90b 100644 --- a/tests/ui/specialization/issue-63716-parse-async.rs +++ b/tests/ui/specialization/issue-63716-parse-async.rs @@ -1,8 +1,8 @@ // Ensure that `default async fn` will parse. // See issue #63716 for details. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-70442.rs b/tests/ui/specialization/issue-70442.rs index d41b5355c2cde..fb82b0db09b56 100644 --- a/tests/ui/specialization/issue-70442.rs +++ b/tests/ui/specialization/issue-70442.rs @@ -1,6 +1,6 @@ #![feature(specialization)] //~ WARN the feature `specialization` is incomplete -// check-pass +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/specialization/min_specialization/allow_internal_unstable.rs b/tests/ui/specialization/min_specialization/allow_internal_unstable.rs index 8f3677d976989..efc509c5eac0a 100644 --- a/tests/ui/specialization/min_specialization/allow_internal_unstable.rs +++ b/tests/ui/specialization/min_specialization/allow_internal_unstable.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass // test for #119950 -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![allow(internal_features)] #![feature(allow_internal_unstable)] -// aux-build:specialization-trait.rs +//@ aux-build:specialization-trait.rs extern crate specialization_trait; #[allow_internal_unstable(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/impl_specialization_trait.rs b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs index 723ed71c3e95d..efc8491de3128 100644 --- a/tests/ui/specialization/min_specialization/impl_specialization_trait.rs +++ b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs @@ -2,7 +2,7 @@ // gate-test-min_specialization -// aux-build:specialization-trait.rs +//@ aux-build:specialization-trait.rs extern crate specialization_trait; diff --git a/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs index 98d7f9194351c..403ab182674f7 100644 --- a/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs +++ b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs @@ -1,7 +1,7 @@ // Test that specializing on the well-formed predicates of the trait and // self-type of an impl is allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/spec-iter.rs b/tests/ui/specialization/min_specialization/spec-iter.rs index e17e9dd5f133c..f579cd02ad6e7 100644 --- a/tests/ui/specialization/min_specialization/spec-iter.rs +++ b/tests/ui/specialization/min_specialization/spec-iter.rs @@ -1,7 +1,7 @@ // Check that we can specialize on a concrete iterator type. This requires us // to consider which parameters in the parent impl are constrained. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/spec-reference.rs b/tests/ui/specialization/min_specialization/spec-reference.rs index 377889e2ccad2..f6cf6b21b0fa4 100644 --- a/tests/ui/specialization/min_specialization/spec-reference.rs +++ b/tests/ui/specialization/min_specialization/spec-reference.rs @@ -1,6 +1,6 @@ // Check that lifetime parameters are allowed in specializing impls. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/specialize-associated-type.rs b/tests/ui/specialization/min_specialization/specialize-associated-type.rs index c4960b0c28e78..20a5a7476c76f 100644 --- a/tests/ui/specialization/min_specialization/specialize-associated-type.rs +++ b/tests/ui/specialization/min_specialization/specialize-associated-type.rs @@ -1,6 +1,6 @@ // Another regression test for #109815. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/min_specialization/specialize_on_marker.rs b/tests/ui/specialization/min_specialization/specialize_on_marker.rs index 4219bd13b1816..f7bc057d3ba8a 100644 --- a/tests/ui/specialization/min_specialization/specialize_on_marker.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_marker.rs @@ -1,7 +1,7 @@ // Test that specializing on a `rustc_unsafe_specialization_marker` trait is // allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs index abbab5c23dbb7..4d67f0a30e9a7 100644 --- a/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs @@ -1,6 +1,6 @@ // Test that specializing on a `rustc_specialization_trait` trait is allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs b/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs index 923dec892e080..e53cdfdf70590 100644 --- a/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs +++ b/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; use std::cmp::Ordering; diff --git a/tests/ui/specialization/soundness/partial_ord_slice.rs b/tests/ui/specialization/soundness/partial_ord_slice.rs index b9e80a48d33d3..7fd0d386a74c8 100644 --- a/tests/ui/specialization/soundness/partial_ord_slice.rs +++ b/tests/ui/specialization/soundness/partial_ord_slice.rs @@ -1,6 +1,6 @@ // Check that we aren't using unsound specialization in slice comparisons. -// run-pass +//@ run-pass use std::cell::Cell; use std::cmp::Ordering; diff --git a/tests/ui/specialization/specialization-allowed-cross-crate.rs b/tests/ui/specialization/specialization-allowed-cross-crate.rs index 5d67160eb96ad..697a62ca547f2 100644 --- a/tests/ui/specialization/specialization-allowed-cross-crate.rs +++ b/tests/ui/specialization/specialization-allowed-cross-crate.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-assoc-fns.rs b/tests/ui/specialization/specialization-assoc-fns.rs index cbfcb4719f6a4..75f0b0d24850b 100644 --- a/tests/ui/specialization/specialization-assoc-fns.rs +++ b/tests/ui/specialization/specialization-assoc-fns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that non-method associated functions can be specialized diff --git a/tests/ui/specialization/specialization-basics.rs b/tests/ui/specialization/specialization-basics.rs index 721c934dbfab9..dc320b2b91fc0 100644 --- a/tests/ui/specialization/specialization-basics.rs +++ b/tests/ui/specialization/specialization-basics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-cross-crate-no-gate.rs b/tests/ui/specialization/specialization-cross-crate-no-gate.rs index f744b16de7a2a..ec14c75f790df 100644 --- a/tests/ui/specialization/specialization-cross-crate-no-gate.rs +++ b/tests/ui/specialization/specialization-cross-crate-no-gate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that specialization works even if only the upstream crate enables it -// aux-build:specialization_cross_crate.rs +//@ aux-build:specialization_cross_crate.rs extern crate specialization_cross_crate; diff --git a/tests/ui/specialization/specialization-cross-crate.rs b/tests/ui/specialization/specialization-cross-crate.rs index 4b2ac07378d87..6daf48b6d9b51 100644 --- a/tests/ui/specialization/specialization-cross-crate.rs +++ b/tests/ui/specialization/specialization-cross-crate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:specialization_cross_crate.rs +//@ aux-build:specialization_cross_crate.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs index 87eb5d90def70..fad041f2ee108 100644 --- a/tests/ui/specialization/specialization-default-items-drop-coherence.rs +++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs @@ -1,8 +1,8 @@ -// revisions: classic coherence next -//[next] compile-flags: -Znext-solver -//[coherence] compile-flags: -Znext-solver=coherence -//[classic] check-pass -//[classic] known-bug: #105782 +//@ revisions: classic coherence next +//@[next] compile-flags: -Znext-solver +//@[coherence] compile-flags: -Znext-solver=coherence +//@[classic] check-pass +//@[classic] known-bug: #105782 // Should fail. Default items completely drop candidates instead of ambiguity, // which is unsound during coherence, since coherence requires completeness. diff --git a/tests/ui/specialization/specialization-default-methods.rs b/tests/ui/specialization/specialization-default-methods.rs index dcf68afa945bf..7058c039e465f 100644 --- a/tests/ui/specialization/specialization-default-methods.rs +++ b/tests/ui/specialization/specialization-default-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-on-projection.rs b/tests/ui/specialization/specialization-on-projection.rs index be8dcc4232e7b..876439ca0a7d6 100644 --- a/tests/ui/specialization/specialization-on-projection.rs +++ b/tests/ui/specialization/specialization-on-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-out-of-order.rs b/tests/ui/specialization/specialization-out-of-order.rs index 66e6c3c9eab31..4f4d40f43d4bb 100644 --- a/tests/ui/specialization/specialization-out-of-order.rs +++ b/tests/ui/specialization/specialization-out-of-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that you can list the more specific impl before the more general one. diff --git a/tests/ui/specialization/specialization-overlap-projection.rs b/tests/ui/specialization/specialization-overlap-projection.rs index cd21eab24c0b7..66951b9d50c60 100644 --- a/tests/ui/specialization/specialization-overlap-projection.rs +++ b/tests/ui/specialization/specialization-overlap-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that impls on projected self types can resolve overlap, even when the // projections involve specialization, so long as the associated type is diff --git a/tests/ui/specialization/specialization-projection-alias.rs b/tests/ui/specialization/specialization-projection-alias.rs index f1f0b47bb6503..73d6115af00b1 100644 --- a/tests/ui/specialization/specialization-projection-alias.rs +++ b/tests/ui/specialization/specialization-projection-alias.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/specialization/specialization-projection.rs b/tests/ui/specialization/specialization-projection.rs index 78afe7a949547..b3efa6f39ddd8 100644 --- a/tests/ui/specialization/specialization-projection.rs +++ b/tests/ui/specialization/specialization-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-supertraits.rs b/tests/ui/specialization/specialization-supertraits.rs index d0c9dbb1d4014..cb4cfef4bdd10 100644 --- a/tests/ui/specialization/specialization-supertraits.rs +++ b/tests/ui/specialization/specialization-supertraits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs index f06afc8ba4144..75d9a0d8ad059 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 +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-translate-projections-with-params.rs b/tests/ui/specialization/specialization-translate-projections-with-params.rs index 62d63590a6688..330f51877aba6 100644 --- a/tests/ui/specialization/specialization-translate-projections-with-params.rs +++ b/tests/ui/specialization/specialization-translate-projections-with-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that provided items are inherited properly even when impls vary in // type parameters *and* rely on projections, and the type parameters are input diff --git a/tests/ui/specialization/specialization-translate-projections.rs b/tests/ui/specialization/specialization-translate-projections.rs index a9753376135e7..01c7619b065cc 100644 --- a/tests/ui/specialization/specialization-translate-projections.rs +++ b/tests/ui/specialization/specialization-translate-projections.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that provided items are inherited properly even when impls vary in // type parameters *and* rely on projections. diff --git a/tests/ui/specialization/transmute-specialization.rs b/tests/ui/specialization/transmute-specialization.rs index 499334d983b1f..a896c14e6370d 100644 --- a/tests/ui/specialization/transmute-specialization.rs +++ b/tests/ui/specialization/transmute-specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/sse2.rs b/tests/ui/sse2.rs index 172f4079821a7..fa6d79713b4bc 100644 --- a/tests/ui/sse2.rs +++ b/tests/ui/sse2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/tests/ui/stability-attribute/allow-unstable-reexport.rs b/tests/ui/stability-attribute/allow-unstable-reexport.rs index 937913954a791..d2f1593c31a93 100644 --- a/tests/ui/stability-attribute/allow-unstable-reexport.rs +++ b/tests/ui/stability-attribute/allow-unstable-reexport.rs @@ -1,8 +1,8 @@ // Allow an unstable re-export without requiring a feature gate. // #94972 -// aux-build:lint-stability.rs -// aux-build:lint-stability-reexport.rs +//@ aux-build:lint-stability.rs +//@ aux-build:lint-stability-reexport.rs #![feature(staged_api)] #![stable(feature = "lint_stability", since = "1.0.0")] diff --git a/tests/ui/stability-attribute/allowed-through-unstable.rs b/tests/ui/stability-attribute/allowed-through-unstable.rs index ff0228e4da6a8..6bce5c87ddbde 100644 --- a/tests/ui/stability-attribute/allowed-through-unstable.rs +++ b/tests/ui/stability-attribute/allowed-through-unstable.rs @@ -1,6 +1,6 @@ // Test for new `#[rustc_allowed_through_unstable_modules]` attribute // -// aux-build:allowed-through-unstable-core.rs +//@ aux-build:allowed-through-unstable-core.rs #![crate_type = "lib"] extern crate allowed_through_unstable_core; diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs index 47e8d2b3609c5..2ff5ec6f22535 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] // Tests that despite the `const_foobar` feature being implied by now-stable feature `const_foo`, diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs index ffaa171d8a5f7..bc15710b025aa 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] #![deny(stable_features)] #![feature(const_foo)] diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs index 2061c5c75bd81..b06a647158703 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] #![deny(stable_features)] #![feature(const_foo)] diff --git a/tests/ui/stability-attribute/ctor-stability.rs b/tests/ui/stability-attribute/ctor-stability.rs index fcab0cb109940..db6df9a79d87b 100644 --- a/tests/ui/stability-attribute/ctor-stability.rs +++ b/tests/ui/stability-attribute/ctor-stability.rs @@ -1,5 +1,5 @@ -// aux-build:ctor-stability.rs -// check-pass +//@ aux-build:ctor-stability.rs +//@ check-pass extern crate ctor_stability; diff --git a/tests/ui/stability-attribute/default-body-stability-err.rs b/tests/ui/stability-attribute/default-body-stability-err.rs index d1a3597687d7d..5845166685963 100644 --- a/tests/ui/stability-attribute/default-body-stability-err.rs +++ b/tests/ui/stability-attribute/default-body-stability-err.rs @@ -1,4 +1,4 @@ -// aux-build:default_body.rs +//@ aux-build:default_body.rs #![crate_type = "lib"] extern crate default_body; diff --git a/tests/ui/stability-attribute/default-body-stability-ok-enables.rs b/tests/ui/stability-attribute/default-body-stability-ok-enables.rs index bdc7522f48dde..6fdf1052e5bed 100644 --- a/tests/ui/stability-attribute/default-body-stability-ok-enables.rs +++ b/tests/ui/stability-attribute/default-body-stability-ok-enables.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:default_body.rs +//@ check-pass +//@ aux-build:default_body.rs #![crate_type = "lib"] #![feature(fun_default_body, eq_default_body, constant_default_body)] diff --git a/tests/ui/stability-attribute/default-body-stability-ok-impls.rs b/tests/ui/stability-attribute/default-body-stability-ok-impls.rs index b29d45256bf39..ab30bd7b73b4e 100644 --- a/tests/ui/stability-attribute/default-body-stability-ok-impls.rs +++ b/tests/ui/stability-attribute/default-body-stability-ok-impls.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:default_body.rs +//@ check-pass +//@ aux-build:default_body.rs #![crate_type = "lib"] extern crate default_body; diff --git a/tests/ui/stability-attribute/generics-default-stability-trait.rs b/tests/ui/stability-attribute/generics-default-stability-trait.rs index d436088e42653..ba8ee143d4a3b 100644 --- a/tests/ui/stability-attribute/generics-default-stability-trait.rs +++ b/tests/ui/stability-attribute/generics-default-stability-trait.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs #![feature(unstable_default6)] extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/generics-default-stability-where.rs b/tests/ui/stability-attribute/generics-default-stability-where.rs index 142de12e1529c..f8a2fb4873aa6 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.rs +++ b/tests/ui/stability-attribute/generics-default-stability-where.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/generics-default-stability.rs b/tests/ui/stability-attribute/generics-default-stability.rs index 300cc34d63df2..abd45b651ee74 100644 --- a/tests/ui/stability-attribute/generics-default-stability.rs +++ b/tests/ui/stability-attribute/generics-default-stability.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs #![feature(unstable_default6)] extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/issue-109177.rs b/tests/ui/stability-attribute/issue-109177.rs index 6d052779c6d36..52880a43bcc3d 100644 --- a/tests/ui/stability-attribute/issue-109177.rs +++ b/tests/ui/stability-attribute/issue-109177.rs @@ -1,4 +1,4 @@ -// aux-build: similar-unstable-method.rs +//@ aux-build: similar-unstable-method.rs extern crate similar_unstable_method; diff --git a/tests/ui/stability-attribute/issue-28075.rs b/tests/ui/stability-attribute/issue-28075.rs index 6b4ea46f361b2..8fc2ffe3dc9ad 100644 --- a/tests/ui/stability-attribute/issue-28075.rs +++ b/tests/ui/stability-attribute/issue-28075.rs @@ -1,6 +1,6 @@ // Unstable entities should be caught in import lists -// aux-build:lint-stability.rs +//@ aux-build:lint-stability.rs #![allow(warnings)] diff --git a/tests/ui/stability-attribute/issue-28388-3.rs b/tests/ui/stability-attribute/issue-28388-3.rs index 7ba993501214c..2f61146f6e39a 100644 --- a/tests/ui/stability-attribute/issue-28388-3.rs +++ b/tests/ui/stability-attribute/issue-28388-3.rs @@ -1,6 +1,6 @@ // Prefix in imports with empty braces should be resolved and checked privacy, stability, etc. -// aux-build:lint-stability.rs +//@ aux-build:lint-stability.rs extern crate lint_stability; diff --git a/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs b/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs index b9eee99226618..b76603740ff9b 100644 --- a/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs +++ b/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #99286 // Tests that stabilized intrinsics are accessible diff --git a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs index 947f9f73eff11..47f885a43d6a7 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs // Tests that despite the `foobar` feature being implied by now-stable feature `foo`, if `foobar` // isn't allowed in this crate then an error will be emitted. diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs index 1a2d8e271de04..447ae744b5303 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs #![deny(stable_features)] #![feature(foo)] //~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs index 3c73c5abf3b54..7f380bc54404b 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs #![deny(stable_features)] #![feature(foo)] //~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` diff --git a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs index 810fbef7b381c..532e888b045bc 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs +++ b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(staged_api)] #![stable(feature = "test", since = "3.3.3")] diff --git a/tests/ui/stability-attribute/stability-attribute-issue.rs b/tests/ui/stability-attribute/stability-attribute-issue.rs index cda1aff133f94..2d25c0c8bd72b 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue.rs +++ b/tests/ui/stability-attribute/stability-attribute-issue.rs @@ -1,4 +1,4 @@ -// aux-build:stability_attribute_issue.rs +//@ aux-build:stability_attribute_issue.rs #![deny(deprecated)] extern crate stability_attribute_issue; diff --git a/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs b/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs index f61acc8aac5db..e7d3b67506a79 100644 --- a/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs +++ b/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zforce-unstable-if-unmarked +//@ compile-flags:-Zforce-unstable-if-unmarked #[unstable()] //~ ERROR: stability attributes may not be used #[stable()] //~ ERROR: stability attributes may not be used diff --git a/tests/ui/stability-attribute/stable-in-unstable.rs b/tests/ui/stability-attribute/stable-in-unstable.rs index 226367c399299..d10845d49a3fd 100644 --- a/tests/ui/stability-attribute/stable-in-unstable.rs +++ b/tests/ui/stability-attribute/stable-in-unstable.rs @@ -5,8 +5,8 @@ // This is necessary to support moving items from `std` into `core` or `alloc` unstably while still // exporting the original stable interface in `std`, such as moving `Error` into `core`. // -// aux-build:stable-in-unstable-core.rs -// aux-build:stable-in-unstable-std.rs +//@ aux-build:stable-in-unstable-core.rs +//@ aux-build:stable-in-unstable-std.rs #![crate_type = "lib"] extern crate stable_in_unstable_core; diff --git a/tests/ui/stable-addr-of.rs b/tests/ui/stable-addr-of.rs index 99839166e3026..e330a4853ce03 100644 --- a/tests/ui/stable-addr-of.rs +++ b/tests/ui/stable-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #2040 diff --git a/tests/ui/stable-mir-print/basic_function.rs b/tests/ui/stable-mir-print/basic_function.rs index 6394edcbb7847..9b27a56dab100 100644 --- a/tests/ui/stable-mir-print/basic_function.rs +++ b/tests/ui/stable-mir-print/basic_function.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 -// check-pass -// only-x86_64 +//@ compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 +//@ check-pass +//@ only-x86_64 fn foo(i:i32) -> i32 { i + 1 diff --git a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs index 6df5d3cd5ae1b..9205d4052ad48 100644 --- a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs +++ b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: all strong basic -// compile-flags: --target nvptx64-nvidia-cuda -// needs-llvm-components: nvptx -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic +//@ build-pass +//@ revisions: all strong basic +//@ compile-flags: --target nvptx64-nvidia-cuda +//@ needs-llvm-components: nvptx +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/ui/static/auxiliary/static-priv-by-default.rs b/tests/ui/static/auxiliary/static-priv-by-default.rs index 41f368f46d661..f36f87c5736a1 100644 --- a/tests/ui/static/auxiliary/static-priv-by-default.rs +++ b/tests/ui/static/auxiliary/static-priv-by-default.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/static/issue-24843.rs b/tests/ui/static/issue-24843.rs index 0b3397e210d70..3ed2403aba6a9 100644 --- a/tests/ui/static/issue-24843.rs +++ b/tests/ui/static/issue-24843.rs @@ -1,5 +1,5 @@ -// aux-build: issue_24843.rs -// check-pass +//@ aux-build: issue_24843.rs +//@ check-pass extern crate issue_24843; diff --git a/tests/ui/static/issue-34194.rs b/tests/ui/static/issue-34194.rs index 6dce556e9e384..e3faa567b2a44 100644 --- a/tests/ui/static/issue-34194.rs +++ b/tests/ui/static/issue-34194.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] struct A { diff --git a/tests/ui/static/nested_item_main.rs b/tests/ui/static/nested_item_main.rs index 2fe00aede0074..6793d8eae1b2f 100644 --- a/tests/ui/static/nested_item_main.rs +++ b/tests/ui/static/nested_item_main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:nested_item.rs +//@ run-pass +//@ aux-build:nested_item.rs extern crate nested_item; diff --git a/tests/ui/static/refer-to-other-statics-by-value.rs b/tests/ui/static/refer-to-other-statics-by-value.rs index 90f1980f85809..4285b4cc0a99e 100644 --- a/tests/ui/static/refer-to-other-statics-by-value.rs +++ b/tests/ui/static/refer-to-other-statics-by-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static A: usize = 42; static B: usize = A; diff --git a/tests/ui/static/reference-of-mut-static-safe.rs b/tests/ui/static/reference-of-mut-static-safe.rs index 5cb1a03bef512..d113d0ee48d2b 100644 --- a/tests/ui/static/reference-of-mut-static-safe.rs +++ b/tests/ui/static/reference-of-mut-static-safe.rs @@ -1,7 +1,7 @@ -// revisions: e2021 e2024 +//@ revisions: e2021 e2024 -// [e2021] edition:2021 -// [e2024] compile-flags: --edition 2024 -Z unstable-options +//@ [e2021] edition:2021 +//@ [e2024] compile-flags: --edition 2024 -Z unstable-options fn main() { static mut X: i32 = 1; diff --git a/tests/ui/static/reference-of-mut-static-unsafe-fn.rs b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs index 6b1e77850e50d..8f3b3eb774532 100644 --- a/tests/ui/static/reference-of-mut-static-unsafe-fn.rs +++ b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Z unstable-options +//@ compile-flags: --edition 2024 -Z unstable-options fn main() {} diff --git a/tests/ui/static/reference-of-mut-static.rs b/tests/ui/static/reference-of-mut-static.rs index 01a3b1fbd9b51..166303f0257fb 100644 --- a/tests/ui/static/reference-of-mut-static.rs +++ b/tests/ui/static/reference-of-mut-static.rs @@ -1,7 +1,7 @@ -// revisions: e2021 e2024 +//@ revisions: e2021 e2024 -// [e2021] edition:2021 -// [e2024] compile-flags: --edition 2024 -Z unstable-options +//@ [e2021] edition:2021 +//@ [e2024] compile-flags: --edition 2024 -Z unstable-options #![deny(static_mut_ref)] diff --git a/tests/ui/static/safe-extern-statics-mut.rs b/tests/ui/static/safe-extern-statics-mut.rs index 1c0662e0a6cec..8aa0b47a3116f 100644 --- a/tests/ui/static/safe-extern-statics-mut.rs +++ b/tests/ui/static/safe-extern-statics-mut.rs @@ -1,4 +1,4 @@ -// aux-build:extern-statics.rs +//@ aux-build:extern-statics.rs extern crate extern_statics; use extern_statics::*; diff --git a/tests/ui/static/safe-extern-statics.rs b/tests/ui/static/safe-extern-statics.rs index 6fa4c4aaca578..f46a792282923 100644 --- a/tests/ui/static/safe-extern-statics.rs +++ b/tests/ui/static/safe-extern-statics.rs @@ -1,4 +1,4 @@ -// aux-build:extern-statics.rs +//@ aux-build:extern-statics.rs extern crate extern_statics; use extern_statics::*; diff --git a/tests/ui/static/static-extern-type.rs b/tests/ui/static/static-extern-type.rs index 4fa48fa133be1..8b022a5c31c37 100644 --- a/tests/ui/static/static-extern-type.rs +++ b/tests/ui/static/static-extern-type.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(extern_types)] pub mod a { diff --git a/tests/ui/static/static-priv-by-default2.rs b/tests/ui/static/static-priv-by-default2.rs index bbbdb253b1e1c..f6b05366a9544 100644 --- a/tests/ui/static/static-priv-by-default2.rs +++ b/tests/ui/static/static-priv-by-default2.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/static/static_sized_requirement.rs b/tests/ui/static/static_sized_requirement.rs index 3943b26085407..80f93dea0544e 100644 --- a/tests/ui/static/static_sized_requirement.rs +++ b/tests/ui/static/static_sized_requirement.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/statics/issue-15261.rs b/tests/ui/statics/issue-15261.rs index 14422329b7dc8..71eeb2a6d2617 100644 --- a/tests/ui/statics/issue-15261.rs +++ b/tests/ui/statics/issue-15261.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static mut n_mut: usize = 0; diff --git a/tests/ui/statics/issue-17233.rs b/tests/ui/statics/issue-17233.rs index 54a12fdf8e822..199bafdc7fe97 100644 --- a/tests/ui/statics/issue-17233.rs +++ b/tests/ui/statics/issue-17233.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const X1: &'static [u8] = &[b'1']; const X2: &'static [u8] = b"1"; diff --git a/tests/ui/statics/issue-17718-static-unsafe-interior.rs b/tests/ui/statics/issue-17718-static-unsafe-interior.rs index 65a8713ba056e..82d5ec8db46ce 100644 --- a/tests/ui/statics/issue-17718-static-unsafe-interior.rs +++ b/tests/ui/statics/issue-17718-static-unsafe-interior.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; use std::cell::UnsafeCell; diff --git a/tests/ui/statics/issue-44373-2.rs b/tests/ui/statics/issue-44373-2.rs index 194ce1dca7789..030ddbc563a29 100644 --- a/tests/ui/statics/issue-44373-2.rs +++ b/tests/ui/statics/issue-44373-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo(bool); diff --git a/tests/ui/statics/issue-91050-1.rs b/tests/ui/statics/issue-91050-1.rs index c6268dba567f7..014e877558ee7 100644 --- a/tests/ui/statics/issue-91050-1.rs +++ b/tests/ui/statics/issue-91050-1.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes // This test declares globals by the same name with different types, which // caused problems because Module::getOrInsertGlobal would return a Constant* diff --git a/tests/ui/statics/issue-91050-2.rs b/tests/ui/statics/issue-91050-2.rs index 2ff954d15cabe..9198cf853802a 100644 --- a/tests/ui/statics/issue-91050-2.rs +++ b/tests/ui/statics/issue-91050-2.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes // This is a variant of issue-91050-1.rs -- see there for an explanation. diff --git a/tests/ui/statics/recursive_interior_mut.rs b/tests/ui/statics/recursive_interior_mut.rs index 7e3083909d52a..43e9d0c50913c 100644 --- a/tests/ui/statics/recursive_interior_mut.rs +++ b/tests/ui/statics/recursive_interior_mut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::Cell; use std::ptr::NonNull; diff --git a/tests/ui/statics/static-fn-inline-xc.rs b/tests/ui/statics/static-fn-inline-xc.rs index a400b9c8d5662..fe230f04d3d96 100644 --- a/tests/ui/statics/static-fn-inline-xc.rs +++ b/tests/ui/statics/static-fn-inline-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:static_fn_inline_xc_aux.rs +//@ run-pass +//@ aux-build:static_fn_inline_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate static_fn_inline_xc_aux as mycore; diff --git a/tests/ui/statics/static-fn-trait-xc.rs b/tests/ui/statics/static-fn-trait-xc.rs index 1d3126128c92b..78810eb5645c8 100644 --- a/tests/ui/statics/static-fn-trait-xc.rs +++ b/tests/ui/statics/static-fn-trait-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:static_fn_trait_xc_aux.rs +//@ run-pass +//@ aux-build:static_fn_trait_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate static_fn_trait_xc_aux as mycore; diff --git a/tests/ui/statics/static-function-pointer-xc.rs b/tests/ui/statics/static-function-pointer-xc.rs index 2d063a751ca48..4f03592cd6b87 100644 --- a/tests/ui/statics/static-function-pointer-xc.rs +++ b/tests/ui/statics/static-function-pointer-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:static-function-pointer-aux.rs +//@ run-pass +//@ aux-build:static-function-pointer-aux.rs extern crate static_function_pointer_aux as aux; diff --git a/tests/ui/statics/static-function-pointer.rs b/tests/ui/statics/static-function-pointer.rs index 6c52dfecdec9a..d42c9c467bfb2 100644 --- a/tests/ui/statics/static-function-pointer.rs +++ b/tests/ui/statics/static-function-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: isize) -> isize { x } fn g(x: isize) -> isize { 2 * x } diff --git a/tests/ui/statics/static-impl.rs b/tests/ui/statics/static-impl.rs index 9e2db7e0caf50..37f3cd1313335 100644 --- a/tests/ui/statics/static-impl.rs +++ b/tests/ui/statics/static-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs b/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs index cd3ccfee06f09..374964d08138c 100644 --- a/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs +++ b/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Deserializer { diff --git a/tests/ui/statics/static-method-xcrate.rs b/tests/ui/statics/static-method-xcrate.rs index 1d1cb38109536..a1d40f24e3748 100644 --- a/tests/ui/statics/static-method-xcrate.rs +++ b/tests/ui/statics/static-method-xcrate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:static-methods-crate.rs +//@ run-pass +//@ aux-build:static-methods-crate.rs extern crate static_methods_crate; diff --git a/tests/ui/statics/static-methods-in-traits.rs b/tests/ui/statics/static-methods-in-traits.rs index ff76d4e4a20e7..87f274b9de85c 100644 --- a/tests/ui/statics/static-methods-in-traits.rs +++ b/tests/ui/statics/static-methods-in-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub trait Foo { diff --git a/tests/ui/statics/static-methods-in-traits2.rs b/tests/ui/statics/static-methods-in-traits2.rs index 2c43ff6a788cc..dbb7120d543d5 100644 --- a/tests/ui/statics/static-methods-in-traits2.rs +++ b/tests/ui/statics/static-methods-in-traits2.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait Number: NumConv { fn from(n: T) -> Self; diff --git a/tests/ui/statics/static-mut-xc.rs b/tests/ui/statics/static-mut-xc.rs index 2fc265e02eaa3..75a4faed83d43 100644 --- a/tests/ui/statics/static-mut-xc.rs +++ b/tests/ui/statics/static-mut-xc.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Constants (static variables) can be used to match in patterns, but mutable // statics cannot. This ensures that there's some form of error if this is // attempted. -// aux-build:static_mut_xc.rs +//@ aux-build:static_mut_xc.rs extern crate static_mut_xc; diff --git a/tests/ui/statics/static-promotion.rs b/tests/ui/statics/static-promotion.rs index b9eff469177e6..24f5df091d3cd 100644 --- a/tests/ui/statics/static-promotion.rs +++ b/tests/ui/statics/static-promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Use of global static variables in literal values should be allowed for // promotion. diff --git a/tests/ui/statics/static-recursive.rs b/tests/ui/statics/static-recursive.rs index 216beb0206d9c..f504e2a79f000 100644 --- a/tests/ui/statics/static-recursive.rs +++ b/tests/ui/statics/static-recursive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 }; //~^ WARN shared reference of mutable static is discouraged [static_mut_ref] diff --git a/tests/ui/stats/hir-stats.rs b/tests/ui/stats/hir-stats.rs index 9bb87026b6418..249413d80e82a 100644 --- a/tests/ui/stats/hir-stats.rs +++ b/tests/ui/stats/hir-stats.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Zhir-stats -// only-x86_64 +//@ check-pass +//@ compile-flags: -Zhir-stats +//@ only-x86_64 // Type layouts sometimes change. When that happens, until the next bootstrap // bump occurs, stage1 and stage2 will give different outputs for this test. diff --git a/tests/ui/stats/meta-stats.rs b/tests/ui/stats/meta-stats.rs index 2d38e0882866d..5176dd0f4673f 100644 --- a/tests/ui/stats/meta-stats.rs +++ b/tests/ui/stats/meta-stats.rs @@ -1,6 +1,6 @@ -// build-pass -// dont-check-compiler-stderr -// compile-flags: -Zmeta-stats +//@ build-pass +//@ dont-check-compiler-stderr +//@ compile-flags: -Zmeta-stats #![crate_type = "lib"] diff --git a/tests/ui/std-backtrace.rs b/tests/ui/std-backtrace.rs index 59574b471dda4..141847d958dc4 100644 --- a/tests/ui/std-backtrace.rs +++ b/tests/ui/std-backtrace.rs @@ -1,12 +1,12 @@ -// run-pass -// ignore-android FIXME #17520 -// ignore-emscripten spawning processes is not supported -// ignore-openbsd no support for libbacktrace without filename -// ignore-sgx no processes -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-fuchsia Backtraces not symbolized -// compile-flags:-g -// compile-flags:-Cstrip=none +//@ run-pass +//@ ignore-android FIXME #17520 +//@ ignore-emscripten spawning processes is not supported +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-sgx no processes +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-fuchsia Backtraces not symbolized +//@ compile-flags:-g +//@ compile-flags:-Cstrip=none use std::env; use std::process::Command; diff --git a/tests/ui/std/issue-81357-unsound-file-methods.rs b/tests/ui/std/issue-81357-unsound-file-methods.rs index fdf1150f8d25a..838df40c32d72 100644 --- a/tests/ui/std/issue-81357-unsound-file-methods.rs +++ b/tests/ui/std/issue-81357-unsound-file-methods.rs @@ -1,5 +1,5 @@ -// run-fail -// only-windows +//@ run-fail +//@ only-windows fn main() { use std::fs; diff --git a/tests/ui/std/slice-from-array-issue-113238.rs b/tests/ui/std/slice-from-array-issue-113238.rs index e9e1bfb8db308..44f2d7a9478b6 100644 --- a/tests/ui/std/slice-from-array-issue-113238.rs +++ b/tests/ui/std/slice-from-array-issue-113238.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This intends to use the unsizing coercion from array to slice, but it only // works if we resolve `<&[u8]>::from` as the reflexive `From for T`. In diff --git a/tests/ui/std/stdio-from.rs b/tests/ui/std/stdio-from.rs index fef9f27fcdffd..f3d2cec2d0b2d 100644 --- a/tests/ui/std/stdio-from.rs +++ b/tests/ui/std/stdio-from.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-cross-compile +//@ run-pass +//@ ignore-cross-compile use std::env; use std::fs::File; diff --git a/tests/ui/stdio-is-blocking.rs b/tests/ui/stdio-is-blocking.rs index 4b67dbf79e007..438fb06c426e3 100644 --- a/tests/ui/stdio-is-blocking.rs +++ b/tests/ui/stdio-is-blocking.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/stdlib-unit-tests/builtin-clone.rs b/tests/ui/stdlib-unit-tests/builtin-clone.rs index 0874d5bc39038..47c00ede0e971 100644 --- a/tests/ui/stdlib-unit-tests/builtin-clone.rs +++ b/tests/ui/stdlib-unit-tests/builtin-clone.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that `Clone` is correctly implemented for builtin types. // Also test that cloning an array or a tuple is done right, i.e. // each component is cloned. diff --git a/tests/ui/stdlib-unit-tests/eq-multidispatch.rs b/tests/ui/stdlib-unit-tests/eq-multidispatch.rs index 69d83f496b392..4a991624e349d 100644 --- a/tests/ui/stdlib-unit-tests/eq-multidispatch.rs +++ b/tests/ui/stdlib-unit-tests/eq-multidispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Bar; diff --git a/tests/ui/stdlib-unit-tests/issue-21058.rs b/tests/ui/stdlib-unit-tests/issue-21058.rs index 6facf0b2dd578..0e04f1e21b8b3 100644 --- a/tests/ui/stdlib-unit-tests/issue-21058.rs +++ b/tests/ui/stdlib-unit-tests/issue-21058.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::fmt::Debug; diff --git a/tests/ui/stdlib-unit-tests/istr.rs b/tests/ui/stdlib-unit-tests/istr.rs index 219b47789b899..f6298919425d1 100644 --- a/tests/ui/stdlib-unit-tests/istr.rs +++ b/tests/ui/stdlib-unit-tests/istr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_stack_assign() { let s: String = "a".to_string(); diff --git a/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs b/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs index c5a40edbeef7c..8f351b2b40b6f 100644 --- a/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs +++ b/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/stdlib-unit-tests/matches2021.rs b/tests/ui/stdlib-unit-tests/matches2021.rs index 9143a8cdd59bc..78c8be7321362 100644 --- a/tests/ui/stdlib-unit-tests/matches2021.rs +++ b/tests/ui/stdlib-unit-tests/matches2021.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 // regression test for https://github.com/rust-lang/rust/pull/85678 diff --git a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs index 7fbffb8fa98e6..bf42347df0bf4 100644 --- a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs +++ b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; use std::cmp::{self, Ordering}; diff --git a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs index 4a8289cb24284..51876d0bf1547 100644 --- a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs +++ b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check raw fat pointer ops use std::mem; diff --git a/tests/ui/stdlib-unit-tests/seq-compare.rs b/tests/ui/stdlib-unit-tests/seq-compare.rs index 4078326b559c8..1be0569e17c09 100644 --- a/tests/ui/stdlib-unit-tests/seq-compare.rs +++ b/tests/ui/stdlib-unit-tests/seq-compare.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(("hello".to_string() < "hellr".to_string())); diff --git a/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs b/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs index f73e7e1c39121..ef227a9134dd6 100644 --- a/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs +++ b/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(volatile)] diff --git a/tests/ui/str/str-as-char.fixed b/tests/ui/str/str-as-char.fixed index 42bbef8391785..b85f86e061579 100644 --- a/tests/ui/str/str-as-char.fixed +++ b/tests/ui/str/str-as-char.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { println!("●●"); //~ ERROR character literal may only contain one codepoint diff --git a/tests/ui/str/str-as-char.rs b/tests/ui/str/str-as-char.rs index 09b9dfc590db3..b815083fada73 100644 --- a/tests/ui/str/str-as-char.rs +++ b/tests/ui/str/str-as-char.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { println!('●●'); //~ ERROR character literal may only contain one codepoint diff --git a/tests/ui/str/str-escape.rs b/tests/ui/str/str-escape.rs index 89a8217106391..6902fe50662cf 100644 --- a/tests/ui/str/str-escape.rs +++ b/tests/ui/str/str-escape.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass // ignore-tidy-tab -// edition: 2021 +//@ edition: 2021 fn main() { let s = "\ diff --git a/tests/ui/str/str-overrun.rs b/tests/ui/str/str-overrun.rs index a3ec8941322d5..b8e245475da92 100644 --- a/tests/ui/str/str-overrun.rs +++ b/tests/ui/str/str-overrun.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 5 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ ignore-emscripten no processes fn main() { let s: String = "hello".to_string(); diff --git a/tests/ui/string-box-error.rs b/tests/ui/string-box-error.rs index 11a5bd07c3b55..9a7cd81ee0453 100644 --- a/tests/ui/string-box-error.rs +++ b/tests/ui/string-box-error.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that both `Box` and `Box` can be // obtained from `String`. diff --git a/tests/ui/struct-ctor-mangling.rs b/tests/ui/struct-ctor-mangling.rs index 159e21d28635b..f32cbb7aaae99 100644 --- a/tests/ui/struct-ctor-mangling.rs +++ b/tests/ui/struct-ctor-mangling.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn size_of_val(_: &T) -> usize { std::mem::size_of::() diff --git a/tests/ui/structs-enums/align-enum.rs b/tests/ui/structs-enums/align-enum.rs index fa872caa3b47e..ff80a19211cda 100644 --- a/tests/ui/structs-enums/align-enum.rs +++ b/tests/ui/structs-enums/align-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/structs-enums/align-struct.rs b/tests/ui/structs-enums/align-struct.rs index 54092542f98fa..3d8dad6e324e3 100644 --- a/tests/ui/structs-enums/align-struct.rs +++ b/tests/ui/structs-enums/align-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_allocation)] use std::mem; diff --git a/tests/ui/structs-enums/borrow-tuple-fields.rs b/tests/ui/structs-enums/borrow-tuple-fields.rs index b1d8f91646bd9..6db583b09a1a2 100644 --- a/tests/ui/structs-enums/borrow-tuple-fields.rs +++ b/tests/ui/structs-enums/borrow-tuple-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); diff --git a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs index 989f0a275f7de..d4caa19135e8a 100644 --- a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs +++ b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_cast.rs +//@ run-pass +//@ aux-build:cci_class_cast.rs extern crate cci_class_cast; diff --git a/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs b/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs index ca35a615d2147..658e9d2117dc3 100644 --- a/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs +++ b/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/class-cast-to-trait.rs b/tests/ui/structs-enums/class-cast-to-trait.rs index 1019bb30015a9..bbbde34ec096c 100644 --- a/tests/ui/structs-enums/class-cast-to-trait.rs +++ b/tests/ui/structs-enums/class-cast-to-trait.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(non_camel_case_types)] -// ignore-freebsd FIXME fails on BSD +//@ ignore-freebsd FIXME fails on BSD trait noisy { diff --git a/tests/ui/structs-enums/class-dtor.rs b/tests/ui/structs-enums/class-dtor.rs index 583a5e2409859..ee6220b6fa451 100644 --- a/tests/ui/structs-enums/class-dtor.rs +++ b/tests/ui/structs-enums/class-dtor.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { done : extern "C" fn(usize), diff --git a/tests/ui/structs-enums/class-exports.rs b/tests/ui/structs-enums/class-exports.rs index ee20887cbfb87..53d0e3db6f5f4 100644 --- a/tests/ui/structs-enums/class-exports.rs +++ b/tests/ui/structs-enums/class-exports.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs b/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs index 5e7830296da94..0b37192fc3b34 100644 --- a/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs +++ b/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-implement-trait-cross-crate.rs b/tests/ui/structs-enums/class-implement-trait-cross-crate.rs index 31b79517566cf..7a5969451cb52 100644 --- a/tests/ui/structs-enums/class-implement-trait-cross-crate.rs +++ b/tests/ui/structs-enums/class-implement-trait-cross-crate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// aux-build:cci_class_trait.rs +//@ aux-build:cci_class_trait.rs extern crate cci_class_trait; use cci_class_trait::animals::noisy; diff --git a/tests/ui/structs-enums/class-implement-traits.rs b/tests/ui/structs-enums/class-implement-traits.rs index 732aa146ce446..04a7b706edbce 100644 --- a/tests/ui/structs-enums/class-implement-traits.rs +++ b/tests/ui/structs-enums/class-implement-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/class-method-cross-crate.rs b/tests/ui/structs-enums/class-method-cross-crate.rs index 519f0685fdf1e..f73999a24501f 100644 --- a/tests/ui/structs-enums/class-method-cross-crate.rs +++ b/tests/ui/structs-enums/class-method-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_2.rs +//@ run-pass +//@ aux-build:cci_class_2.rs extern crate cci_class_2; use cci_class_2::kitties::cat; diff --git a/tests/ui/structs-enums/class-methods-cross-crate.rs b/tests/ui/structs-enums/class-methods-cross-crate.rs index c342af31351e4..b2c48248a6712 100644 --- a/tests/ui/structs-enums/class-methods-cross-crate.rs +++ b/tests/ui/structs-enums/class-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_3.rs +//@ run-pass +//@ aux-build:cci_class_3.rs extern crate cci_class_3; use cci_class_3::kitties::cat; diff --git a/tests/ui/structs-enums/class-methods.rs b/tests/ui/structs-enums/class-methods.rs index 83f4a5fd39e4e..b0dbbbec5224f 100644 --- a/tests/ui/structs-enums/class-methods.rs +++ b/tests/ui/structs-enums/class-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-poly-methods-cross-crate.rs b/tests/ui/structs-enums/class-poly-methods-cross-crate.rs index 0307ba78d026f..dc99de95456f8 100644 --- a/tests/ui/structs-enums/class-poly-methods-cross-crate.rs +++ b/tests/ui/structs-enums/class-poly-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_6.rs +//@ run-pass +//@ aux-build:cci_class_6.rs extern crate cci_class_6; use cci_class_6::kitties::cat; diff --git a/tests/ui/structs-enums/class-poly-methods.rs b/tests/ui/structs-enums/class-poly-methods.rs index da2870b58a4c5..28374a68ad438 100644 --- a/tests/ui/structs-enums/class-poly-methods.rs +++ b/tests/ui/structs-enums/class-poly-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-separate-impl.rs b/tests/ui/structs-enums/class-separate-impl.rs index 3d6da1cc28024..2768e284c1736 100644 --- a/tests/ui/structs-enums/class-separate-impl.rs +++ b/tests/ui/structs-enums/class-separate-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-str-field.rs b/tests/ui/structs-enums/class-str-field.rs index a3dc66aab129f..a33a635344ead 100644 --- a/tests/ui/structs-enums/class-str-field.rs +++ b/tests/ui/structs-enums/class-str-field.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { diff --git a/tests/ui/structs-enums/class-typarams.rs b/tests/ui/structs-enums/class-typarams.rs index 4b2d4b12ec9cd..01cfa47024f10 100644 --- a/tests/ui/structs-enums/class-typarams.rs +++ b/tests/ui/structs-enums/class-typarams.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/structs-enums/classes-cross-crate.rs b/tests/ui/structs-enums/classes-cross-crate.rs index ca362c7a7d852..0160d3fd85c08 100644 --- a/tests/ui/structs-enums/classes-cross-crate.rs +++ b/tests/ui/structs-enums/classes-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_4.rs +//@ run-pass +//@ aux-build:cci_class_4.rs extern crate cci_class_4; use cci_class_4::kitties::cat; diff --git a/tests/ui/structs-enums/classes-self-referential.rs b/tests/ui/structs-enums/classes-self-referential.rs index 27d6ebf2c2a39..35696a9cff9e6 100644 --- a/tests/ui/structs-enums/classes-self-referential.rs +++ b/tests/ui/structs-enums/classes-self-referential.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct kitten { cat: Option, diff --git a/tests/ui/structs-enums/classes-simple-cross-crate.rs b/tests/ui/structs-enums/classes-simple-cross-crate.rs index 6ff0970c0f0d4..1548f768b6f3c 100644 --- a/tests/ui/structs-enums/classes-simple-cross-crate.rs +++ b/tests/ui/structs-enums/classes-simple-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class.rs +//@ run-pass +//@ aux-build:cci_class.rs extern crate cci_class; use cci_class::kitties::cat; diff --git a/tests/ui/structs-enums/classes-simple-method.rs b/tests/ui/structs-enums/classes-simple-method.rs index f3d98337dba2c..562fd5909815c 100644 --- a/tests/ui/structs-enums/classes-simple-method.rs +++ b/tests/ui/structs-enums/classes-simple-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/classes-simple.rs b/tests/ui/structs-enums/classes-simple.rs index 568fbb29f0dce..d870a3101f1ae 100644 --- a/tests/ui/structs-enums/classes-simple.rs +++ b/tests/ui/structs-enums/classes-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/classes.rs b/tests/ui/structs-enums/classes.rs index 51d84b9091d82..d1c1922f4b547 100644 --- a/tests/ui/structs-enums/classes.rs +++ b/tests/ui/structs-enums/classes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/codegen-tag-static-padding.rs b/tests/ui/structs-enums/codegen-tag-static-padding.rs index 8aa087c018b6f..7fe5367f358e8 100644 --- a/tests/ui/structs-enums/codegen-tag-static-padding.rs +++ b/tests/ui/structs-enums/codegen-tag-static-padding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Issue #13186 diff --git a/tests/ui/structs-enums/compare-generic-enums.rs b/tests/ui/structs-enums/compare-generic-enums.rs index 84f953b1f8eab..243cb4a21f5ec 100644 --- a/tests/ui/structs-enums/compare-generic-enums.rs +++ b/tests/ui/structs-enums/compare-generic-enums.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs b/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs index eabffc16170ca..e66042ec83cb2 100644 --- a/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs +++ b/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs extern crate newtype_struct_xc; diff --git a/tests/ui/structs-enums/discrim-explicit-23030.rs b/tests/ui/structs-enums/discrim-explicit-23030.rs index e17025e9e88cc..1d3a8cd6b9e4b 100644 --- a/tests/ui/structs-enums/discrim-explicit-23030.rs +++ b/tests/ui/structs-enums/discrim-explicit-23030.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 23030: Workaround overflowing discriminant // with explicit assignments. diff --git a/tests/ui/structs-enums/empty-struct-braces.rs b/tests/ui/structs-enums/empty-struct-braces.rs index 0663687c958cd..0449fb51af5b7 100644 --- a/tests/ui/structs-enums/empty-struct-braces.rs +++ b/tests/ui/structs-enums/empty-struct-braces.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] // Empty struct defined with braces add names into type namespace // Empty struct defined without braces add names into both type and value namespaces -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/structs-enums/empty-tag.rs b/tests/ui/structs-enums/empty-tag.rs index 271ab72c74fc1..5c3e6717306dd 100644 --- a/tests/ui/structs-enums/empty-tag.rs +++ b/tests/ui/structs-enums/empty-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/enum-alignment.rs b/tests/ui/structs-enums/enum-alignment.rs index 108dfe2e62d57..bb779b1e0cdd2 100644 --- a/tests/ui/structs-enums/enum-alignment.rs +++ b/tests/ui/structs-enums/enum-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/enum-clike-ffi-as-int.rs b/tests/ui/structs-enums/enum-clike-ffi-as-int.rs index e2b2b43dee320..39b3490309081 100644 --- a/tests/ui/structs-enums/enum-clike-ffi-as-int.rs +++ b/tests/ui/structs-enums/enum-clike-ffi-as-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] /*! diff --git a/tests/ui/structs-enums/enum-discr.rs b/tests/ui/structs-enums/enum-discr.rs index bdd6df82d0f60..51c3e9ec27cfe 100644 --- a/tests/ui/structs-enums/enum-discr.rs +++ b/tests/ui/structs-enums/enum-discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Animal { diff --git a/tests/ui/structs-enums/enum-discrim-autosizing.rs b/tests/ui/structs-enums/enum-discrim-autosizing.rs index f68fdda6053dc..a6ade028f0c10 100644 --- a/tests/ui/structs-enums/enum-discrim-autosizing.rs +++ b/tests/ui/structs-enums/enum-discrim-autosizing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(overflowing_literals)] diff --git a/tests/ui/structs-enums/enum-discrim-manual-sizing.rs b/tests/ui/structs-enums/enum-discrim-manual-sizing.rs index c8b362c99176b..e41ff78cb652d 100644 --- a/tests/ui/structs-enums/enum-discrim-manual-sizing.rs +++ b/tests/ui/structs-enums/enum-discrim-manual-sizing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::{size_of, align_of}; diff --git a/tests/ui/structs-enums/enum-discrim-range-overflow.rs b/tests/ui/structs-enums/enum-discrim-range-overflow.rs index 9c4c61e684b9c..51cabd10e3089 100644 --- a/tests/ui/structs-enums/enum-discrim-range-overflow.rs +++ b/tests/ui/structs-enums/enum-discrim-range-overflow.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum E64 { H64 = 0x7FFF_FFFF_FFFF_FFFF, diff --git a/tests/ui/structs-enums/enum-discrim-width-stuff.rs b/tests/ui/structs-enums/enum-discrim-width-stuff.rs index f278ae2d0a8a5..98948f8b3df4f 100644 --- a/tests/ui/structs-enums/enum-discrim-width-stuff.rs +++ b/tests/ui/structs-enums/enum-discrim-width-stuff.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/enum-disr-val-pretty.rs b/tests/ui/structs-enums/enum-disr-val-pretty.rs index ef1333e0eeb4f..f889460e5e225 100644 --- a/tests/ui/structs-enums/enum-disr-val-pretty.rs +++ b/tests/ui/structs-enums/enum-disr-val-pretty.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pp-exact +//@ pp-exact enum color { red = 1, green, blue, imaginary = -1, } diff --git a/tests/ui/structs-enums/enum-export-inheritance.rs b/tests/ui/structs-enums/enum-export-inheritance.rs index 6a36a004a7c94..5bb689260c2c4 100644 --- a/tests/ui/structs-enums/enum-export-inheritance.rs +++ b/tests/ui/structs-enums/enum-export-inheritance.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub enum Foo { diff --git a/tests/ui/structs-enums/enum-layout-optimization.rs b/tests/ui/structs-enums/enum-layout-optimization.rs index 05d297906c317..56055e952ce4e 100644 --- a/tests/ui/structs-enums/enum-layout-optimization.rs +++ b/tests/ui/structs-enums/enum-layout-optimization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we will do various size optimizations to enum layout, but // *not* if `#[repr(u8)]` or `#[repr(C)]` is passed. See also #40029. diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs b/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs index 7d15d607dd606..142d0ee32872e 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-c.rs b/tests/ui/structs-enums/enum-non-c-like-repr-c.rs index fc9efdeca7d19..15c9784dbb9ad 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-c.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-c.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-int.rs b/tests/ui/structs-enums/enum-non-c-like-repr-int.rs index f9e96c1a0f4ae..64338b2aba765 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-int.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-null-pointer-opt.rs b/tests/ui/structs-enums/enum-null-pointer-opt.rs index 21564eeec29e3..6f8c81689682b 100644 --- a/tests/ui/structs-enums/enum-null-pointer-opt.rs +++ b/tests/ui/structs-enums/enum-null-pointer-opt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(transparent_unions)] use std::mem::size_of; diff --git a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs index 1d52d44d1696b..e76afa49f5e61 100644 --- a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs +++ b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static C: Result<(), Box> = Ok(()); diff --git a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs index 4bd7ee45dfee4..be8e00fa1bbed 100644 --- a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs +++ b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /*! * This is a regression test for a bug in LLVM, fixed in upstream r179587, diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs index 20231dc83db91..d8343704f12b9 100644 --- a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs +++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs @@ -1,4 +1,4 @@ -// ignore-macos: cycle error does not appear on apple +//@ ignore-macos: cycle error does not appear on apple use std::sync::Mutex; diff --git a/tests/ui/structs-enums/enum-univariant-repr.rs b/tests/ui/structs-enums/enum-univariant-repr.rs index 1e0f678877828..b77b66b4f589d 100644 --- a/tests/ui/structs-enums/enum-univariant-repr.rs +++ b/tests/ui/structs-enums/enum-univariant-repr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/structs-enums/enum-variants.rs b/tests/ui/structs-enums/enum-variants.rs index 9ac5aae726a00..1f5206b8de5dd 100644 --- a/tests/ui/structs-enums/enum-variants.rs +++ b/tests/ui/structs-enums/enum-variants.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/structs-enums/enum-vec-initializer.rs b/tests/ui/structs-enums/enum-vec-initializer.rs index 42ee8ba971ebd..2fa77ec6ecda5 100644 --- a/tests/ui/structs-enums/enum-vec-initializer.rs +++ b/tests/ui/structs-enums/enum-vec-initializer.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 enum Flopsy { Bunny = 2 diff --git a/tests/ui/structs-enums/export-abstract-tag.rs b/tests/ui/structs-enums/export-abstract-tag.rs index 76ac73321d3cb..ff36fa9590330 100644 --- a/tests/ui/structs-enums/export-abstract-tag.rs +++ b/tests/ui/structs-enums/export-abstract-tag.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // We can export tags without exporting the variants to create a simple // sort of ADT. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum t { t1, } diff --git a/tests/ui/structs-enums/export-tag-variant.rs b/tests/ui/structs-enums/export-tag-variant.rs index 52e0aba0979a6..bd762a0166e47 100644 --- a/tests/ui/structs-enums/export-tag-variant.rs +++ b/tests/ui/structs-enums/export-tag-variant.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum t { t1, } diff --git a/tests/ui/structs-enums/expr-if-struct.rs b/tests/ui/structs-enums/expr-if-struct.rs index e62d47c6f5d0c..c9fc682ab01b2 100644 --- a/tests/ui/structs-enums/expr-if-struct.rs +++ b/tests/ui/structs-enums/expr-if-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/expr-match-struct.rs b/tests/ui/structs-enums/expr-match-struct.rs index f0e8d8972743f..3ebd8321846a0 100644 --- a/tests/ui/structs-enums/expr-match-struct.rs +++ b/tests/ui/structs-enums/expr-match-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/field-destruction-order.rs b/tests/ui/structs-enums/field-destruction-order.rs index a75a742d90f22..b496dcc6e3a1c 100644 --- a/tests/ui/structs-enums/field-destruction-order.rs +++ b/tests/ui/structs-enums/field-destruction-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/structs-enums/foreign-struct.rs b/tests/ui/structs-enums/foreign-struct.rs index 00a23b354a97e..4f2e413ab40cd 100644 --- a/tests/ui/structs-enums/foreign-struct.rs +++ b/tests/ui/structs-enums/foreign-struct.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // Passing enums by value -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum void {} diff --git a/tests/ui/structs-enums/functional-struct-upd.rs b/tests/ui/structs-enums/functional-struct-upd.rs index 68ff73a080592..4128db0ab9ed7 100644 --- a/tests/ui/structs-enums/functional-struct-upd.rs +++ b/tests/ui/structs-enums/functional-struct-upd.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/structs-enums/issue-103869.fixed b/tests/ui/structs-enums/issue-103869.fixed index 49fe32c71091c..074d7519392aa 100644 --- a/tests/ui/structs-enums/issue-103869.fixed +++ b/tests/ui/structs-enums/issue-103869.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct VecOrMap { //~^ HELP: perhaps you meant to use `struct` here diff --git a/tests/ui/structs-enums/issue-103869.rs b/tests/ui/structs-enums/issue-103869.rs index 729079e050115..fe23d2d519143 100644 --- a/tests/ui/structs-enums/issue-103869.rs +++ b/tests/ui/structs-enums/issue-103869.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum VecOrMap { //~^ HELP: perhaps you meant to use `struct` here diff --git a/tests/ui/structs-enums/issue-1701.rs b/tests/ui/structs-enums/issue-1701.rs index bae32a77765cc..7888e082240af 100644 --- a/tests/ui/structs-enums/issue-1701.rs +++ b/tests/ui/structs-enums/issue-1701.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/issue-38002.rs b/tests/ui/structs-enums/issue-38002.rs index fdb31fc44a19a..5ed70dbbb7f11 100644 --- a/tests/ui/structs-enums/issue-38002.rs +++ b/tests/ui/structs-enums/issue-38002.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that constant ADTs are codegened OK, part k of N. diff --git a/tests/ui/structs-enums/issue-50731.rs b/tests/ui/structs-enums/issue-50731.rs index 209c1e1279b5f..c00ef6d5f74c9 100644 --- a/tests/ui/structs-enums/issue-50731.rs +++ b/tests/ui/structs-enums/issue-50731.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Void {} fn foo(_: Result<(Void, u32), (Void, String)>) {} fn main() { diff --git a/tests/ui/structs-enums/ivec-tag.rs b/tests/ui/structs-enums/ivec-tag.rs index c39368a2bb831..9185a0cbb6e93 100644 --- a/tests/ui/structs-enums/ivec-tag.rs +++ b/tests/ui/structs-enums/ivec-tag.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/structs-enums/module-qualified-struct-destructure.rs b/tests/ui/structs-enums/module-qualified-struct-destructure.rs index 57be37cdf2bbc..b90acb1b98c0d 100644 --- a/tests/ui/structs-enums/module-qualified-struct-destructure.rs +++ b/tests/ui/structs-enums/module-qualified-struct-destructure.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod m { pub struct S { diff --git a/tests/ui/structs-enums/multiple-reprs.rs b/tests/ui/structs-enums/multiple-reprs.rs index 4be503a0ef49e..1528db126ae51 100644 --- a/tests/ui/structs-enums/multiple-reprs.rs +++ b/tests/ui/structs-enums/multiple-reprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs index 30cf645821d20..ea56faef09cd4 100644 --- a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs +++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// aux-build:namespaced_enum_emulate_flat.rs +//@ aux-build:namespaced_enum_emulate_flat.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enum_emulate_flat; diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs index f6c395059ede5..4a6352b328a1a 100644 --- a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs +++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use Foo::*; use nest::{Bar, D, E, F}; diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs index d2ccadea00778..4e58c1f717ff2 100644 --- a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs +++ b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:namespaced_enums.rs +//@ run-pass +//@ aux-build:namespaced_enums.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enums; diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import.rs b/tests/ui/structs-enums/namespaced-enum-glob-import.rs index f36ac69dc0886..d02ee5a122daa 100644 --- a/tests/ui/structs-enums/namespaced-enum-glob-import.rs +++ b/tests/ui/structs-enums/namespaced-enum-glob-import.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m2 { pub enum Foo { diff --git a/tests/ui/structs-enums/namespaced-enums-xcrate.rs b/tests/ui/structs-enums/namespaced-enums-xcrate.rs index 5e10c3ec1d0f8..b5655e68a47e3 100644 --- a/tests/ui/structs-enums/namespaced-enums-xcrate.rs +++ b/tests/ui/structs-enums/namespaced-enums-xcrate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:namespaced_enums.rs +//@ run-pass +//@ aux-build:namespaced_enums.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enums; diff --git a/tests/ui/structs-enums/namespaced-enums.rs b/tests/ui/structs-enums/namespaced-enums.rs index 6a2602501a541..1ce9319b8ec85 100644 --- a/tests/ui/structs-enums/namespaced-enums.rs +++ b/tests/ui/structs-enums/namespaced-enums.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { A, diff --git a/tests/ui/structs-enums/nested-enum-same-names.rs b/tests/ui/structs-enums/nested-enum-same-names.rs index 111b9ba94773f..e24073c38e9a4 100644 --- a/tests/ui/structs-enums/nested-enum-same-names.rs +++ b/tests/ui/structs-enums/nested-enum-same-names.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/structs-enums/newtype-struct-drop-run.rs b/tests/ui/structs-enums/newtype-struct-drop-run.rs index 0754f3187018e..8df34de3d8459 100644 --- a/tests/ui/structs-enums/newtype-struct-drop-run.rs +++ b/tests/ui/structs-enums/newtype-struct-drop-run.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure the destructor is run for newtype structs. use std::cell::Cell; diff --git a/tests/ui/structs-enums/newtype-struct-with-dtor.rs b/tests/ui/structs-enums/newtype-struct-with-dtor.rs index f73b492dfcfc1..19672e41c9a30 100644 --- a/tests/ui/structs-enums/newtype-struct-with-dtor.rs +++ b/tests/ui/structs-enums/newtype-struct-with-dtor.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_unsafe)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Fd(u32); diff --git a/tests/ui/structs-enums/newtype-struct-xc-2.rs b/tests/ui/structs-enums/newtype-struct-xc-2.rs index 40837321be2c3..e83025346d75a 100644 --- a/tests/ui/structs-enums/newtype-struct-xc-2.rs +++ b/tests/ui/structs-enums/newtype-struct-xc-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate newtype_struct_xc; use newtype_struct_xc::Au; diff --git a/tests/ui/structs-enums/newtype-struct-xc.rs b/tests/ui/structs-enums/newtype-struct-xc.rs index 0c6466d97fc94..6f90cfe8e4af4 100644 --- a/tests/ui/structs-enums/newtype-struct-xc.rs +++ b/tests/ui/structs-enums/newtype-struct-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate newtype_struct_xc; diff --git a/tests/ui/structs-enums/nonzero-enum.rs b/tests/ui/structs-enums/nonzero-enum.rs index 15b571be5637d..40abcdc78e5d4 100644 --- a/tests/ui/structs-enums/nonzero-enum.rs +++ b/tests/ui/structs-enums/nonzero-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::size_of; diff --git a/tests/ui/structs-enums/numeric-fields.rs b/tests/ui/structs-enums/numeric-fields.rs index 6ff3afc38704b..3b610f4aaef70 100644 --- a/tests/ui/structs-enums/numeric-fields.rs +++ b/tests/ui/structs-enums/numeric-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S(u8, u16); fn main() { diff --git a/tests/ui/structs-enums/rec-align-u32.rs b/tests/ui/structs-enums/rec-align-u32.rs index b3c323d2a29f5..9cd2a988871e6 100644 --- a/tests/ui/structs-enums/rec-align-u32.rs +++ b/tests/ui/structs-enums/rec-align-u32.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] // Issue #2303 diff --git a/tests/ui/structs-enums/rec-align-u64.rs b/tests/ui/structs-enums/rec-align-u64.rs index de008bcc01d29..e4b02fa0c58bf 100644 --- a/tests/ui/structs-enums/rec-align-u64.rs +++ b/tests/ui/structs-enums/rec-align-u64.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] -// ignore-wasm32-bare seems unimportant to test +//@ ignore-wasm32-bare seems unimportant to test // Issue #2303 diff --git a/tests/ui/structs-enums/rec-auto.rs b/tests/ui/structs-enums/rec-auto.rs index c2ef13ede4cf3..bf2e37a189bc8 100644 --- a/tests/ui/structs-enums/rec-auto.rs +++ b/tests/ui/structs-enums/rec-auto.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/structs-enums/rec-extend.rs b/tests/ui/structs-enums/rec-extend.rs index 4c91cd1850e3c..2141523ce9e68 100644 --- a/tests/ui/structs-enums/rec-extend.rs +++ b/tests/ui/structs-enums/rec-extend.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/structs-enums/rec-tup.rs b/tests/ui/structs-enums/rec-tup.rs index b85d28fdf03fe..941733056eb1f 100644 --- a/tests/ui/structs-enums/rec-tup.rs +++ b/tests/ui/structs-enums/rec-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/rec.rs b/tests/ui/structs-enums/rec.rs index 82c84ebd6ff88..734bd523497e8 100644 --- a/tests/ui/structs-enums/rec.rs +++ b/tests/ui/structs-enums/rec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] struct Rect {x: isize, y: isize, w: isize, h: isize} diff --git a/tests/ui/structs-enums/record-pat.rs b/tests/ui/structs-enums/record-pat.rs index 1acaf2a32c21b..1959f9bc32040 100644 --- a/tests/ui/structs-enums/record-pat.rs +++ b/tests/ui/structs-enums/record-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/structs-enums/resource-in-struct.rs b/tests/ui/structs-enums/resource-in-struct.rs index 267ad6b4a867a..0614b6c362206 100644 --- a/tests/ui/structs-enums/resource-in-struct.rs +++ b/tests/ui/structs-enums/resource-in-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Ensures that class dtors run if the object is inside an enum diff --git a/tests/ui/structs-enums/simple-generic-tag.rs b/tests/ui/structs-enums/simple-generic-tag.rs index dbd2834d46857..59521a446f4f9 100644 --- a/tests/ui/structs-enums/simple-generic-tag.rs +++ b/tests/ui/structs-enums/simple-generic-tag.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(T), } diff --git a/tests/ui/structs-enums/simple-match-generic-tag.rs b/tests/ui/structs-enums/simple-match-generic-tag.rs index 762fd49ad2475..47a2d1054e02d 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 +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/small-enum-range-edge.rs b/tests/ui/structs-enums/small-enum-range-edge.rs index 3061294796368..6ffd0f101cdba 100644 --- a/tests/ui/structs-enums/small-enum-range-edge.rs +++ b/tests/ui/structs-enums/small-enum-range-edge.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Tests the range assertion wraparound case when reading discriminants. diff --git a/tests/ui/structs-enums/small-enums-with-fields.rs b/tests/ui/structs-enums/small-enums-with-fields.rs index 565ec1bd45dcc..d38fb5165e00f 100644 --- a/tests/ui/structs-enums/small-enums-with-fields.rs +++ b/tests/ui/structs-enums/small-enums-with-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; #[derive(PartialEq, Debug)] diff --git a/tests/ui/structs-enums/struct-aliases-xcrate.rs b/tests/ui/structs-enums/struct-aliases-xcrate.rs index ffe7b22f8097f..fc9ce1a101552 100644 --- a/tests/ui/structs-enums/struct-aliases-xcrate.rs +++ b/tests/ui/structs-enums/struct-aliases-xcrate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(non_shorthand_field_patterns)] -// aux-build:xcrate_struct_aliases.rs +//@ aux-build:xcrate_struct_aliases.rs extern crate xcrate_struct_aliases; diff --git a/tests/ui/structs-enums/struct-aliases.rs b/tests/ui/structs-enums/struct-aliases.rs index b7aeed7bc3907..6b5f55a9d16ea 100644 --- a/tests/ui/structs-enums/struct-aliases.rs +++ b/tests/ui/structs-enums/struct-aliases.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] use std::mem; diff --git a/tests/ui/structs-enums/struct-destructuring-cross-crate.rs b/tests/ui/structs-enums/struct-destructuring-cross-crate.rs index 19e0a0bbdd2e3..df740bdb310c0 100644 --- a/tests/ui/structs-enums/struct-destructuring-cross-crate.rs +++ b/tests/ui/structs-enums/struct-destructuring-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:struct_destructuring_cross_crate.rs +//@ run-pass +//@ aux-build:struct_destructuring_cross_crate.rs extern crate struct_destructuring_cross_crate; diff --git a/tests/ui/structs-enums/struct-field-shorthand.rs b/tests/ui/structs-enums/struct-field-shorthand.rs index ed650c68364c1..7d78bccc0aefd 100644 --- a/tests/ui/structs-enums/struct-field-shorthand.rs +++ b/tests/ui/structs-enums/struct-field-shorthand.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: i32, y: bool, diff --git a/tests/ui/structs-enums/struct-like-variant-construct.rs b/tests/ui/structs-enums/struct-like-variant-construct.rs index 60fc7ce394c05..5a49d715b21f4 100644 --- a/tests/ui/structs-enums/struct-like-variant-construct.rs +++ b/tests/ui/structs-enums/struct-like-variant-construct.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar { diff --git a/tests/ui/structs-enums/struct-like-variant-match.rs b/tests/ui/structs-enums/struct-like-variant-match.rs index ade1a697037c5..9af0c10539498 100644 --- a/tests/ui/structs-enums/struct-like-variant-match.rs +++ b/tests/ui/structs-enums/struct-like-variant-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] enum Foo { diff --git a/tests/ui/structs-enums/struct-lit-functional-no-fields.rs b/tests/ui/structs-enums/struct-lit-functional-no-fields.rs index f19604e951cda..0eb716da4f063 100644 --- a/tests/ui/structs-enums/struct-lit-functional-no-fields.rs +++ b/tests/ui/structs-enums/struct-lit-functional-no-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug,PartialEq,Clone)] struct Foo { bar: T, diff --git a/tests/ui/structs-enums/struct-literal-dtor.rs b/tests/ui/structs-enums/struct-literal-dtor.rs index 6d1b1dfb9b6c7..30b1f1139389d 100644 --- a/tests/ui/structs-enums/struct-literal-dtor.rs +++ b/tests/ui/structs-enums/struct-literal-dtor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct foo { diff --git a/tests/ui/structs-enums/struct-new-as-field-name.rs b/tests/ui/structs-enums/struct-new-as-field-name.rs index 641fc3c58670a..1f776b40f52cf 100644 --- a/tests/ui/structs-enums/struct-new-as-field-name.rs +++ b/tests/ui/structs-enums/struct-new-as-field-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { new: isize, diff --git a/tests/ui/structs-enums/struct-order-of-eval-1.rs b/tests/ui/structs-enums/struct-order-of-eval-1.rs index f3fe9953856cc..25cdabcc03c3f 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-1.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { f0: String, f1: isize } diff --git a/tests/ui/structs-enums/struct-order-of-eval-2.rs b/tests/ui/structs-enums/struct-order-of-eval-2.rs index a4e0edc97c60f..eb425e62d8eaa 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-2.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { diff --git a/tests/ui/structs-enums/struct-order-of-eval-3.rs b/tests/ui/structs-enums/struct-order-of-eval-3.rs index 60887f8d05af4..d0ce498ac4fa9 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-3.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that functional-record-update order-of-eval is as expected // even when no Drop-implementations are involved. diff --git a/tests/ui/structs-enums/struct-order-of-eval-4.rs b/tests/ui/structs-enums/struct-order-of-eval-4.rs index 547df63184698..0ad22296ba604 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-4.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that struct-literal expression order-of-eval is as expected // even when no Drop-implementations are involved. diff --git a/tests/ui/structs-enums/struct-partial-move-1.rs b/tests/ui/structs-enums/struct-partial-move-1.rs index c157015938876..9494922b7d732 100644 --- a/tests/ui/structs-enums/struct-partial-move-1.rs +++ b/tests/ui/structs-enums/struct-partial-move-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] pub struct Partial { x: T, y: T } diff --git a/tests/ui/structs-enums/struct-partial-move-2.rs b/tests/ui/structs-enums/struct-partial-move-2.rs index 4315e5c29f34e..2c29f528554f7 100644 --- a/tests/ui/structs-enums/struct-partial-move-2.rs +++ b/tests/ui/structs-enums/struct-partial-move-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] pub struct Partial { x: T, y: T } diff --git a/tests/ui/structs-enums/struct-path-associated-type.rs b/tests/ui/structs-enums/struct-path-associated-type.rs index 2235dfe4b8436..158c2ed7ddaee 100644 --- a/tests/ui/structs-enums/struct-path-associated-type.rs +++ b/tests/ui/structs-enums/struct-path-associated-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { a: T, diff --git a/tests/ui/structs-enums/struct-path-self.rs b/tests/ui/structs-enums/struct-path-self.rs index e7a59858f570e..0906b4f32402a 100644 --- a/tests/ui/structs-enums/struct-path-self.rs +++ b/tests/ui/structs-enums/struct-path-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; struct S { diff --git a/tests/ui/structs-enums/struct-pattern-matching.rs b/tests/ui/structs-enums/struct-pattern-matching.rs index 89361bf245515..96325fc3c14f1 100644 --- a/tests/ui/structs-enums/struct-pattern-matching.rs +++ b/tests/ui/structs-enums/struct-pattern-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Foo { diff --git a/tests/ui/structs-enums/struct-variant-field-visibility.rs b/tests/ui/structs-enums/struct-variant-field-visibility.rs index 7896c829a6e1f..02d1ceb051324 100644 --- a/tests/ui/structs-enums/struct-variant-field-visibility.rs +++ b/tests/ui/structs-enums/struct-variant-field-visibility.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum Foo { diff --git a/tests/ui/structs-enums/struct_variant_xc.rs b/tests/ui/structs-enums/struct_variant_xc.rs index 9c8d1a69a3e9e..4723f2291856d 100644 --- a/tests/ui/structs-enums/struct_variant_xc.rs +++ b/tests/ui/structs-enums/struct_variant_xc.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:struct_variant_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:struct_variant_xc_aux.rs +//@ pretty-expanded FIXME #23616 extern crate struct_variant_xc_aux; diff --git a/tests/ui/structs-enums/struct_variant_xc_match.rs b/tests/ui/structs-enums/struct_variant_xc_match.rs index 5358d13faa99a..b802034ef6dc6 100644 --- a/tests/ui/structs-enums/struct_variant_xc_match.rs +++ b/tests/ui/structs-enums/struct_variant_xc_match.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:struct_variant_xc_aux.rs +//@ run-pass +//@ aux-build:struct_variant_xc_aux.rs extern crate struct_variant_xc_aux; diff --git a/tests/ui/structs-enums/tag-align-dyn-u64.rs b/tests/ui/structs-enums/tag-align-dyn-u64.rs index 3f7a5e3e51101..5e7d918b4fbcd 100644 --- a/tests/ui/structs-enums/tag-align-dyn-u64.rs +++ b/tests/ui/structs-enums/tag-align-dyn-u64.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/tag-align-dyn-variants.rs b/tests/ui/structs-enums/tag-align-dyn-variants.rs index 4d075b04c97aa..c0574f3354e65 100644 --- a/tests/ui/structs-enums/tag-align-dyn-variants.rs +++ b/tests/ui/structs-enums/tag-align-dyn-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] #![allow(non_snake_case)] diff --git a/tests/ui/structs-enums/tag-align-shape.rs b/tests/ui/structs-enums/tag-align-shape.rs index ce59958237817..6e62250e0d574 100644 --- a/tests/ui/structs-enums/tag-align-shape.rs +++ b/tests/ui/structs-enums/tag-align-shape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/tag-align-u64.rs b/tests/ui/structs-enums/tag-align-u64.rs index 684b27cd03033..8ab9f242822c7 100644 --- a/tests/ui/structs-enums/tag-align-u64.rs +++ b/tests/ui/structs-enums/tag-align-u64.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/tag-disr-val-shape.rs b/tests/ui/structs-enums/tag-disr-val-shape.rs index 51052626c30ac..996b87c4a3a75 100644 --- a/tests/ui/structs-enums/tag-disr-val-shape.rs +++ b/tests/ui/structs-enums/tag-disr-val-shape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/tag-exports.rs b/tests/ui/structs-enums/tag-exports.rs index 1bcb7d35da38a..a01b951e675ab 100644 --- a/tests/ui/structs-enums/tag-exports.rs +++ b/tests/ui/structs-enums/tag-exports.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use alder::*; diff --git a/tests/ui/structs-enums/tag-in-block.rs b/tests/ui/structs-enums/tag-in-block.rs index 03d4dd9b0abcd..944a611c71a17 100644 --- a/tests/ui/structs-enums/tag-in-block.rs +++ b/tests/ui/structs-enums/tag-in-block.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo() { fn zed(_z: bar) { } diff --git a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs index 3f59db383107d..9205ac81650ec 100644 --- a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs +++ b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum color { red = 1, diff --git a/tests/ui/structs-enums/tag-variant-disr-val.rs b/tests/ui/structs-enums/tag-variant-disr-val.rs index 297d85c588679..bd34c3a1eb5a1 100644 --- a/tests/ui/structs-enums/tag-variant-disr-val.rs +++ b/tests/ui/structs-enums/tag-variant-disr-val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use color::{red, green, blue, black, white, imaginary, purple, orange}; diff --git a/tests/ui/structs-enums/tag.rs b/tests/ui/structs-enums/tag.rs index 5fcd64b7cd102..16e6b2341cf61 100644 --- a/tests/ui/structs-enums/tag.rs +++ b/tests/ui/structs-enums/tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/tuple-struct-construct.rs b/tests/ui/structs-enums/tuple-struct-construct.rs index dc7cbaffddb48..4243bccb4eb7a 100644 --- a/tests/ui/structs-enums/tuple-struct-construct.rs +++ b/tests/ui/structs-enums/tuple-struct-construct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(dead_code)] #[derive(Debug)] struct Foo(isize, isize); diff --git a/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs b/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs index 23f0651632313..18a59841e9fab 100644 --- a/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs +++ b/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo(isize); #[derive(PartialEq, Debug)] diff --git a/tests/ui/structs-enums/tuple-struct-destructuring.rs b/tests/ui/structs-enums/tuple-struct-destructuring.rs index dff87ead03377..5213052dd7a40 100644 --- a/tests/ui/structs-enums/tuple-struct-destructuring.rs +++ b/tests/ui/structs-enums/tuple-struct-destructuring.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); pub fn main() { diff --git a/tests/ui/structs-enums/tuple-struct-matching.rs b/tests/ui/structs-enums/tuple-struct-matching.rs index 432be1d1f7a03..a5436624c658a 100644 --- a/tests/ui/structs-enums/tuple-struct-matching.rs +++ b/tests/ui/structs-enums/tuple-struct-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); pub fn main() { diff --git a/tests/ui/structs-enums/tuple-struct-trivial.rs b/tests/ui/structs-enums/tuple-struct-trivial.rs index c8651fd29dedf..329f80a462ed0 100644 --- a/tests/ui/structs-enums/tuple-struct-trivial.rs +++ b/tests/ui/structs-enums/tuple-struct-trivial.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo(isize, isize, isize); diff --git a/tests/ui/structs-enums/type-sizes.rs b/tests/ui/structs-enums/type-sizes.rs index 490d6a2f9189e..92060e3cade3c 100644 --- a/tests/ui/structs-enums/type-sizes.rs +++ b/tests/ui/structs-enums/type-sizes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/uninstantiable-struct.rs b/tests/ui/structs-enums/uninstantiable-struct.rs index 15f2fc424bb86..97bc7d8414e7f 100644 --- a/tests/ui/structs-enums/uninstantiable-struct.rs +++ b/tests/ui/structs-enums/uninstantiable-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Z(#[allow(dead_code)] &'static Z); pub fn main() {} diff --git a/tests/ui/structs-enums/unit-like-struct-drop-run.rs b/tests/ui/structs-enums/unit-like-struct-drop-run.rs index 1e9c269a4d375..02d14265f3ef2 100644 --- a/tests/ui/structs-enums/unit-like-struct-drop-run.rs +++ b/tests/ui/structs-enums/unit-like-struct-drop-run.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Make sure the destructor is run for unit-like structs. diff --git a/tests/ui/structs-enums/unit-like-struct.rs b/tests/ui/structs-enums/unit-like-struct.rs index 636ec99266717..8a2f500676e68 100644 --- a/tests/ui/structs-enums/unit-like-struct.rs +++ b/tests/ui/structs-enums/unit-like-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; pub fn main() { diff --git a/tests/ui/structs-enums/variant-structs-trivial.rs b/tests/ui/structs-enums/variant-structs-trivial.rs index 31fa610a69d95..8ca86fa35ee86 100644 --- a/tests/ui/structs-enums/variant-structs-trivial.rs +++ b/tests/ui/structs-enums/variant-structs-trivial.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar { x: isize }, diff --git a/tests/ui/structs/large-records.rs b/tests/ui/structs/large-records.rs index 7f850a94e8933..c78b62596678d 100644 --- a/tests/ui/structs/large-records.rs +++ b/tests/ui/structs/large-records.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Large {a: isize, b: isize, diff --git a/tests/ui/structs/rhs-type.rs b/tests/ui/structs/rhs-type.rs index c48e7c08ed2da..fde5c16a0680e 100644 --- a/tests/ui/structs/rhs-type.rs +++ b/tests/ui/structs/rhs-type.rs @@ -1,9 +1,9 @@ // Tests that codegen treats the rhs of pth's decl // as a _|_-typed thing, not a str-typed thing -// run-fail -// error-pattern:bye -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:bye +//@ ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/structs/struct-duplicate-comma.fixed b/tests/ui/structs/struct-duplicate-comma.fixed index c804cf57abaaa..2f40f960975f4 100644 --- a/tests/ui/structs/struct-duplicate-comma.fixed +++ b/tests/ui/structs/struct-duplicate-comma.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #50974 pub struct Foo { diff --git a/tests/ui/structs/struct-duplicate-comma.rs b/tests/ui/structs/struct-duplicate-comma.rs index db2e7cb3d05e6..5982cea93f55d 100644 --- a/tests/ui/structs/struct-duplicate-comma.rs +++ b/tests/ui/structs/struct-duplicate-comma.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #50974 pub struct Foo { diff --git a/tests/ui/structs/struct-field-privacy.rs b/tests/ui/structs/struct-field-privacy.rs index 898ca475cb17b..d70dd5c700500 100644 --- a/tests/ui/structs/struct-field-privacy.rs +++ b/tests/ui/structs/struct-field-privacy.rs @@ -1,4 +1,4 @@ -// aux-build:struct_field_privacy.rs +//@ aux-build:struct_field_privacy.rs extern crate struct_field_privacy as xc; diff --git a/tests/ui/structs/struct-missing-comma.fixed b/tests/ui/structs/struct-missing-comma.fixed index a28179ba24168..800128f503bd6 100644 --- a/tests/ui/structs/struct-missing-comma.fixed +++ b/tests/ui/structs/struct-missing-comma.fixed @@ -1,5 +1,5 @@ // Issue #50636 -// run-rustfix +//@ run-rustfix pub struct S { pub foo: u32, //~ expected `,`, or `}`, found keyword `pub` diff --git a/tests/ui/structs/struct-missing-comma.rs b/tests/ui/structs/struct-missing-comma.rs index b6d6c9b8f8762..b9d8c9eb30344 100644 --- a/tests/ui/structs/struct-missing-comma.rs +++ b/tests/ui/structs/struct-missing-comma.rs @@ -1,5 +1,5 @@ // Issue #50636 -// run-rustfix +//@ run-rustfix pub struct S { pub foo: u32 //~ expected `,`, or `}`, found keyword `pub` diff --git a/tests/ui/structs/struct-record-suggestion.fixed b/tests/ui/structs/struct-record-suggestion.fixed index d93a62185b3f1..251123807041c 100644 --- a/tests/ui/structs/struct-record-suggestion.fixed +++ b/tests/ui/structs/struct-record-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug, Default, Eq, PartialEq)] struct A { b: u32, diff --git a/tests/ui/structs/struct-record-suggestion.rs b/tests/ui/structs/struct-record-suggestion.rs index f0fd1c94e9ab5..9c4be68153a70 100644 --- a/tests/ui/structs/struct-record-suggestion.rs +++ b/tests/ui/structs/struct-record-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug, Default, Eq, PartialEq)] struct A { b: u32, diff --git a/tests/ui/structs/struct-variant-privacy-xc.rs b/tests/ui/structs/struct-variant-privacy-xc.rs index 763ab952738b7..729ce11f44273 100644 --- a/tests/ui/structs/struct-variant-privacy-xc.rs +++ b/tests/ui/structs/struct-variant-privacy-xc.rs @@ -1,4 +1,4 @@ -// aux-build:struct_variant_privacy.rs +//@ aux-build:struct_variant_privacy.rs extern crate struct_variant_privacy; fn f(b: struct_variant_privacy::Bar) { diff --git a/tests/ui/structs/suggest-private-fields.rs b/tests/ui/structs/suggest-private-fields.rs index 8267a82fe2aea..b3bae58a6e413 100644 --- a/tests/ui/structs/suggest-private-fields.rs +++ b/tests/ui/structs/suggest-private-fields.rs @@ -1,4 +1,4 @@ -// aux-build:struct_field_privacy.rs +//@ aux-build:struct_field_privacy.rs extern crate struct_field_privacy as xc; diff --git a/tests/ui/suggest-null-ptr.fixed b/tests/ui/suggest-null-ptr.fixed index 40f900c7d30cf..55c90859c83e0 100644 --- a/tests/ui/suggest-null-ptr.fixed +++ b/tests/ui/suggest-null-ptr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Suggest providing a std::ptr::null{,_mut}() to a function that takes in a raw // pointer if a literal 0 was provided by the user. diff --git a/tests/ui/suggest-null-ptr.rs b/tests/ui/suggest-null-ptr.rs index 19b595bf769ec..f4f1269d512d8 100644 --- a/tests/ui/suggest-null-ptr.rs +++ b/tests/ui/suggest-null-ptr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Suggest providing a std::ptr::null{,_mut}() to a function that takes in a raw // pointer if a literal 0 was provided by the user. diff --git a/tests/ui/suggestions/abi-typo.fixed b/tests/ui/suggestions/abi-typo.fixed index 04d265865f0f8..44fa80f63389a 100644 --- a/tests/ui/suggestions/abi-typo.fixed +++ b/tests/ui/suggestions/abi-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern "cdecl" fn cdedl() {} //~ ERROR invalid ABI fn main() { diff --git a/tests/ui/suggestions/abi-typo.rs b/tests/ui/suggestions/abi-typo.rs index 6d80db522ebc1..3d5c23e0f23a8 100644 --- a/tests/ui/suggestions/abi-typo.rs +++ b/tests/ui/suggestions/abi-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern "cdedl" fn cdedl() {} //~ ERROR invalid ABI fn main() { diff --git a/tests/ui/suggestions/args-instead-of-tuple.fixed b/tests/ui/suggestions/args-instead-of-tuple.fixed index f913995d7e28b..7d38e62e89fb4 100644 --- a/tests/ui/suggestions/args-instead-of-tuple.fixed +++ b/tests/ui/suggestions/args-instead-of-tuple.fixed @@ -1,7 +1,7 @@ // Test suggesting tuples where bare arguments may have been passed // See issue #86481 for details. -// run-rustfix +//@ run-rustfix fn main() { let _: Result<(i32, i8), ()> = Ok((1, 2)); diff --git a/tests/ui/suggestions/args-instead-of-tuple.rs b/tests/ui/suggestions/args-instead-of-tuple.rs index 1c65407b3955e..026d6464955db 100644 --- a/tests/ui/suggestions/args-instead-of-tuple.rs +++ b/tests/ui/suggestions/args-instead-of-tuple.rs @@ -1,7 +1,7 @@ // Test suggesting tuples where bare arguments may have been passed // See issue #86481 for details. -// run-rustfix +//@ run-rustfix fn main() { let _: Result<(i32, i8), ()> = Ok(1, 2); diff --git a/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 156162c9027c3..11ed167b44abf 100644 --- a/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/suggestions/auxiliary/issue-61963-1.rs b/tests/ui/suggestions/auxiliary/issue-61963-1.rs index 6c2df7e84e07c..33e5f9db2c38e 100644 --- a/tests/ui/suggestions/auxiliary/issue-61963-1.rs +++ b/tests/ui/suggestions/auxiliary/issue-61963-1.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/suggestions/auxiliary/issue-61963.rs b/tests/ui/suggestions/auxiliary/issue-61963.rs index e86f1610ab0d0..bfea8061c4b38 100644 --- a/tests/ui/suggestions/auxiliary/issue-61963.rs +++ b/tests/ui/suggestions/auxiliary/issue-61963.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/suggestions/auxiliary/issue-81839.rs b/tests/ui/suggestions/auxiliary/issue-81839.rs index 5683c45adf26d..cf1d33c3a56d7 100644 --- a/tests/ui/suggestions/auxiliary/issue-81839.rs +++ b/tests/ui/suggestions/auxiliary/issue-81839.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub struct Test {} diff --git a/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs b/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs index d71747f9687ef..aebc5a6aaa9bf 100644 --- a/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs +++ b/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/suggestions/bound-suggestions.fixed b/tests/ui/suggestions/bound-suggestions.fixed index ef61fb9ad325f..565cd26b649d8 100644 --- a/tests/ui/suggestions/bound-suggestions.fixed +++ b/tests/ui/suggestions/bound-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/suggestions/bound-suggestions.rs b/tests/ui/suggestions/bound-suggestions.rs index 6d17fae6a088e..fb547c27e1d11 100644 --- a/tests/ui/suggestions/bound-suggestions.rs +++ b/tests/ui/suggestions/bound-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/suggestions/box-future-wrong-output.rs b/tests/ui/suggestions/box-future-wrong-output.rs index d49819fcb14cf..2d45f1b6a51a5 100644 --- a/tests/ui/suggestions/box-future-wrong-output.rs +++ b/tests/ui/suggestions/box-future-wrong-output.rs @@ -1,5 +1,5 @@ // Issue #72117 -// edition:2018 +//@ edition:2018 use core::future::Future; use core::pin::Pin; diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed index 4f9e93a47ed1c..b9fc798949ccc 100644 --- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed +++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn wat(t: &T) -> T { t.clone() //~ ERROR E0308 } diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs index 89b077d671a51..d5222be0d20f6 100644 --- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs +++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn wat(t: &T) -> T { t.clone() //~ ERROR E0308 } diff --git a/tests/ui/suggestions/constrain-trait.fixed b/tests/ui/suggestions/constrain-trait.fixed index f7360efe4c527..d32747bf2cc70 100644 --- a/tests/ui/suggestions/constrain-trait.fixed +++ b/tests/ui/suggestions/constrain-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // check-only #![allow(dead_code)] diff --git a/tests/ui/suggestions/constrain-trait.rs b/tests/ui/suggestions/constrain-trait.rs index 799100669b654..3fa537a305d5e 100644 --- a/tests/ui/suggestions/constrain-trait.rs +++ b/tests/ui/suggestions/constrain-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // check-only #![allow(dead_code)] diff --git a/tests/ui/suggestions/copied-and-cloned.fixed b/tests/ui/suggestions/copied-and-cloned.fixed index 4cecf9e26f9ee..b6228ebd25ed2 100644 --- a/tests/ui/suggestions/copied-and-cloned.fixed +++ b/tests/ui/suggestions/copied-and-cloned.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn expect(_: T) {} diff --git a/tests/ui/suggestions/copied-and-cloned.rs b/tests/ui/suggestions/copied-and-cloned.rs index a79928c50d565..f88d430351d1b 100644 --- a/tests/ui/suggestions/copied-and-cloned.rs +++ b/tests/ui/suggestions/copied-and-cloned.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn expect(_: T) {} diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.rs b/tests/ui/suggestions/core-std-import-order-issue-83564.rs index b7fe5af7bf8a1..2cf1983858a65 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.rs +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This is a regression test for #83564. // For some reason, Rust 2018 or higher is required to reproduce the bug. diff --git a/tests/ui/suggestions/crate-or-module-typo.rs b/tests/ui/suggestions/crate-or-module-typo.rs index b12ad495e9fd5..dbc0605c76bce 100644 --- a/tests/ui/suggestions/crate-or-module-typo.rs +++ b/tests/ui/suggestions/crate-or-module-typo.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use st::cell::Cell; //~ ERROR failed to resolve: use of undeclared crate or module `st` diff --git a/tests/ui/suggestions/derive-clone-for-eq.fixed b/tests/ui/suggestions/derive-clone-for-eq.fixed index a74487019adf0..4dc362f947875 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.fixed +++ b/tests/ui/suggestions/derive-clone-for-eq.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 #[derive(Clone, Eq)] //~ ERROR [E0277] diff --git a/tests/ui/suggestions/derive-clone-for-eq.rs b/tests/ui/suggestions/derive-clone-for-eq.rs index 99956ed9879d5..b3635000f1658 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.rs +++ b/tests/ui/suggestions/derive-clone-for-eq.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 #[derive(Clone, Eq)] //~ ERROR [E0277] diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs index 38dabc9d71ff7..cec66214978bb 100644 --- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs +++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs @@ -1,4 +1,4 @@ -// aux-build:hidden-child.rs +//@ aux-build:hidden-child.rs // FIXME(compiler-errors): This currently suggests the wrong thing. // UI test exists to track the problem. diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs index 4d96d6c16cba0..1c752755777c5 100644 --- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs +++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs @@ -1,4 +1,4 @@ -// aux-build:hidden-parent.rs +//@ aux-build:hidden-parent.rs extern crate hidden_parent; diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs index 779a0c43c02b2..281975dcc2f3b 100644 --- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs +++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs @@ -1,5 +1,5 @@ -// aux-build:hidden-struct.rs -// compile-flags: --crate-type lib +//@ aux-build:hidden-struct.rs +//@ compile-flags: --crate-type lib extern crate hidden_struct; diff --git a/tests/ui/suggestions/dont-try-removing-the-field.rs b/tests/ui/suggestions/dont-try-removing-the-field.rs index 948aa2b94d965..80bb15441d45d 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 +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/suggestions/enum-method-probe.fixed b/tests/ui/suggestions/enum-method-probe.fixed index 6499c92bc6f15..611be9911d975 100644 --- a/tests/ui/suggestions/enum-method-probe.fixed +++ b/tests/ui/suggestions/enum-method-probe.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/enum-method-probe.rs b/tests/ui/suggestions/enum-method-probe.rs index 18ea8ed8a58ff..e183ebd25f2ac 100644 --- a/tests/ui/suggestions/enum-method-probe.rs +++ b/tests/ui/suggestions/enum-method-probe.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs index 7e9c5492d1a6b..495a62d4fddb2 100644 --- a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs +++ b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(dead_code)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/suggestions/field-access.fixed b/tests/ui/suggestions/field-access.fixed index ed9aef6e37444..e2ef2493a7b0d 100644 --- a/tests/ui/suggestions/field-access.fixed +++ b/tests/ui/suggestions/field-access.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct A { diff --git a/tests/ui/suggestions/field-access.rs b/tests/ui/suggestions/field-access.rs index d80488e8a45f5..d189ba6d2ddcb 100644 --- a/tests/ui/suggestions/field-access.rs +++ b/tests/ui/suggestions/field-access.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct A { diff --git a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 4303e5c540569..156f37f9e69bf 100644 --- a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait T { type O; } diff --git a/tests/ui/suggestions/fn-trait-notation.fixed b/tests/ui/suggestions/fn-trait-notation.fixed index fcf00a17002dd..18494d2fd8647 100644 --- a/tests/ui/suggestions/fn-trait-notation.fixed +++ b/tests/ui/suggestions/fn-trait-notation.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn e0658(f: F, g: G, h: H) -> i32 where F: Fn(i32) -> i32, //~ ERROR E0658 diff --git a/tests/ui/suggestions/fn-trait-notation.rs b/tests/ui/suggestions/fn-trait-notation.rs index 715bcf71d4720..ef0b52c9aa3ae 100644 --- a/tests/ui/suggestions/fn-trait-notation.rs +++ b/tests/ui/suggestions/fn-trait-notation.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn e0658(f: F, g: G, h: H) -> i32 where F: Fn, //~ ERROR E0658 diff --git a/tests/ui/suggestions/for-i-in-vec.fixed b/tests/ui/suggestions/for-i-in-vec.fixed index 4f2007befffa1..f266e80bcfa64 100644 --- a/tests/ui/suggestions/for-i-in-vec.fixed +++ b/tests/ui/suggestions/for-i-in-vec.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/for-i-in-vec.rs b/tests/ui/suggestions/for-i-in-vec.rs index 55fc7ad4e373d..6aee44bb982ab 100644 --- a/tests/ui/suggestions/for-i-in-vec.rs +++ b/tests/ui/suggestions/for-i-in-vec.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/if-then-neeing-semi.rs b/tests/ui/suggestions/if-then-neeing-semi.rs index a4eefb41508fa..0c1da65605508 100644 --- a/tests/ui/suggestions/if-then-neeing-semi.rs +++ b/tests/ui/suggestions/if-then-neeing-semi.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn dummy() -> i32 { 42 diff --git a/tests/ui/suggestions/ignore-nested-field-binding.fixed b/tests/ui/suggestions/ignore-nested-field-binding.fixed index 1dc44838e8bb0..c594fcb118657 100644 --- a/tests/ui/suggestions/ignore-nested-field-binding.fixed +++ b/tests/ui/suggestions/ignore-nested-field-binding.fixed @@ -1,7 +1,7 @@ // Regression test for #88403, where prefixing with an underscore was // erroneously suggested for a nested shorthand struct field binding. -// run-rustfix +//@ run-rustfix #![allow(unused)] #![forbid(unused_variables)] diff --git a/tests/ui/suggestions/ignore-nested-field-binding.rs b/tests/ui/suggestions/ignore-nested-field-binding.rs index 6dc0263ec9f2b..34815f9d5b905 100644 --- a/tests/ui/suggestions/ignore-nested-field-binding.rs +++ b/tests/ui/suggestions/ignore-nested-field-binding.rs @@ -1,7 +1,7 @@ // Regression test for #88403, where prefixing with an underscore was // erroneously suggested for a nested shorthand struct field binding. -// run-rustfix +//@ run-rustfix #![allow(unused)] #![forbid(unused_variables)] diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs index afde5ee97d78a..735efe89cba5b 100644 --- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs +++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-anonymous_lifetime_in_impl_trait // Verify the behaviour of `feature(anonymous_lifetime_in_impl_trait)`. diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime.rs b/tests/ui/suggestions/impl-trait-missing-lifetime.rs index b03d61614936f..12dc0e8216b7d 100644 --- a/tests/ui/suggestions/impl-trait-missing-lifetime.rs +++ b/tests/ui/suggestions/impl-trait-missing-lifetime.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(anonymous_lifetime_in_impl_trait)] diff --git a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed index 5109511f95a6b..232d1dd8138be 100644 --- a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed +++ b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Foo {} diff --git a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs index cd05b77386192..ab25b362fedbb 100644 --- a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs +++ b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Foo {} diff --git a/tests/ui/suggestions/inner_type.fixed b/tests/ui/suggestions/inner_type.fixed index 7af7391ca851d..cfea66b57ec1c 100644 --- a/tests/ui/suggestions/inner_type.fixed +++ b/tests/ui/suggestions/inner_type.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix pub struct Struct { pub p: T, diff --git a/tests/ui/suggestions/inner_type.rs b/tests/ui/suggestions/inner_type.rs index 4aca50716258a..5fedf3f256e3a 100644 --- a/tests/ui/suggestions/inner_type.rs +++ b/tests/ui/suggestions/inner_type.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix pub struct Struct { pub p: T, diff --git a/tests/ui/suggestions/issue-101065.fixed b/tests/ui/suggestions/issue-101065.fixed index 88c716cc86ce8..96290be96488e 100644 --- a/tests/ui/suggestions/issue-101065.fixed +++ b/tests/ui/suggestions/issue-101065.fixed @@ -1,5 +1,5 @@ -// check-fail -// run-rustfix +//@ check-fail +//@ run-rustfix enum FakeResult { Ok(T) diff --git a/tests/ui/suggestions/issue-101065.rs b/tests/ui/suggestions/issue-101065.rs index 2715f1027082f..46017286c305d 100644 --- a/tests/ui/suggestions/issue-101065.rs +++ b/tests/ui/suggestions/issue-101065.rs @@ -1,5 +1,5 @@ -// check-fail -// run-rustfix +//@ check-fail +//@ run-rustfix enum FakeResult { Ok(T) diff --git a/tests/ui/suggestions/issue-102972.fixed b/tests/ui/suggestions/issue-102972.fixed index ebd73b2dc1499..7e78b53b80c3e 100644 --- a/tests/ui/suggestions/issue-102972.fixed +++ b/tests/ui/suggestions/issue-102972.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test1() { let mut chars = "Hello".chars(); diff --git a/tests/ui/suggestions/issue-102972.rs b/tests/ui/suggestions/issue-102972.rs index 1f8e9776759ad..a2bc6169a5e64 100644 --- a/tests/ui/suggestions/issue-102972.rs +++ b/tests/ui/suggestions/issue-102972.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test1() { let mut chars = "Hello".chars(); diff --git a/tests/ui/suggestions/issue-104961.fixed b/tests/ui/suggestions/issue-104961.fixed index 36917cf339548..a4047def341e8 100644 --- a/tests/ui/suggestions/issue-104961.fixed +++ b/tests/ui/suggestions/issue-104961.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(x: &str) -> bool { x.starts_with(&("hi".to_string() + " you")) diff --git a/tests/ui/suggestions/issue-104961.rs b/tests/ui/suggestions/issue-104961.rs index 25a8e0c45e827..9d02f570c84c5 100644 --- a/tests/ui/suggestions/issue-104961.rs +++ b/tests/ui/suggestions/issue-104961.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(x: &str) -> bool { x.starts_with("hi".to_string() + " you") diff --git a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed index 78e48364bba00..434cc8470e5c3 100644 --- a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed +++ b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs index 6d8a9ffc12d39..90d5f3c5c5f17 100644 --- a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs +++ b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/suggestions/issue-107860.rs b/tests/ui/suggestions/issue-107860.rs index a6449cd44d0f8..0b7b8bc65bfc3 100644 --- a/tests/ui/suggestions/issue-107860.rs +++ b/tests/ui/suggestions/issue-107860.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn str(T: &str) -> &str { &str } //~^ ERROR mismatched types diff --git a/tests/ui/suggestions/issue-108470.fixed b/tests/ui/suggestions/issue-108470.fixed index 9d15c4a8fcb90..acc18185c1462 100644 --- a/tests/ui/suggestions/issue-108470.fixed +++ b/tests/ui/suggestions/issue-108470.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/issue-108470.rs b/tests/ui/suggestions/issue-108470.rs index bda39085d4db5..54b6a5213bdb3 100644 --- a/tests/ui/suggestions/issue-108470.rs +++ b/tests/ui/suggestions/issue-108470.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed index 57387936a4cab..e072c476c6bc7 100644 --- a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed +++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs index 8a1939bcfe93c..8899514142632 100644 --- a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs +++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/suggestions/issue-116434-2015.rs b/tests/ui/suggestions/issue-116434-2015.rs index 614fc27b77187..a53e2a044e93f 100644 --- a/tests/ui/suggestions/issue-116434-2015.rs +++ b/tests/ui/suggestions/issue-116434-2015.rs @@ -3,9 +3,12 @@ trait Foo { fn foo() -> Clone; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| ERROR the trait `Clone` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } trait DbHandle: Sized {} @@ -15,9 +18,12 @@ trait DbInterface { fn handle() -> DbHandle; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| ERROR the trait `DbHandle` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } fn main() {} diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr index 2d87029b6eb11..73a1cfa9c1d54 100644 --- a/tests/ui/suggestions/issue-116434-2015.stderr +++ b/tests/ui/suggestions/issue-116434-2015.stderr @@ -13,7 +13,7 @@ LL | fn foo() -> dyn Clone; | +++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ @@ -47,9 +47,13 @@ LL | fn foo() -> Clone; | = note: the trait cannot be made into an object because it requires `Self: Sized` = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +help: there is an associated type with the same name + | +LL | fn foo() -> Self::Clone; + | ++++++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ @@ -63,18 +67,22 @@ LL | fn handle() -> dyn DbHandle; | +++ error[E0038]: the trait `DbHandle` cannot be made into an object - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ `DbHandle` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-116434-2015.rs:11:17 + --> $DIR/issue-116434-2015.rs:14:17 | LL | trait DbHandle: Sized {} | -------- ^^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... +help: there is an associated type with the same name + | +LL | fn handle() -> Self::DbHandle; + | ++++++ error: aborting due to 2 previous errors; 4 warnings emitted diff --git a/tests/ui/suggestions/issue-116434-2021.rs b/tests/ui/suggestions/issue-116434-2021.rs index 74c30e0cc1fbe..6feba3dc6c16d 100644 --- a/tests/ui/suggestions/issue-116434-2021.rs +++ b/tests/ui/suggestions/issue-116434-2021.rs @@ -1,9 +1,10 @@ -// edition:2021 +//@ edition:2021 trait Foo { type Clone; fn foo() -> Clone; //~^ ERROR the trait `Clone` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } trait DbHandle: Sized {} @@ -12,6 +13,7 @@ trait DbInterface { type DbHandle; fn handle() -> DbHandle; //~^ ERROR the trait `DbHandle` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } fn main() {} diff --git a/tests/ui/suggestions/issue-116434-2021.stderr b/tests/ui/suggestions/issue-116434-2021.stderr index 43ad82d484a66..a10d6ef6da4d9 100644 --- a/tests/ui/suggestions/issue-116434-2021.stderr +++ b/tests/ui/suggestions/issue-116434-2021.stderr @@ -6,20 +6,28 @@ LL | fn foo() -> Clone; | = note: the trait cannot be made into an object because it requires `Self: Sized` = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +help: there is an associated type with the same name + | +LL | fn foo() -> Self::Clone; + | ++++++ error[E0038]: the trait `DbHandle` cannot be made into an object - --> $DIR/issue-116434-2021.rs:13:20 + --> $DIR/issue-116434-2021.rs:14:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ `DbHandle` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-116434-2021.rs:9:17 + --> $DIR/issue-116434-2021.rs:10:17 | LL | trait DbHandle: Sized {} | -------- ^^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... +help: there is an associated type with the same name + | +LL | fn handle() -> Self::DbHandle; + | ++++++ error: aborting due to 2 previous errors diff --git a/tests/ui/suggestions/issue-52820.fixed b/tests/ui/suggestions/issue-52820.fixed index 514690de4d045..4c4593cf3b92b 100644 --- a/tests/ui/suggestions/issue-52820.fixed +++ b/tests/ui/suggestions/issue-52820.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Bravery { diff --git a/tests/ui/suggestions/issue-52820.rs b/tests/ui/suggestions/issue-52820.rs index 17cd9224c57ec..605775fe0be4e 100644 --- a/tests/ui/suggestions/issue-52820.rs +++ b/tests/ui/suggestions/issue-52820.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Bravery { diff --git a/tests/ui/suggestions/issue-53692.fixed b/tests/ui/suggestions/issue-53692.fixed index 35a677b476186..b6cb95047ccca 100644 --- a/tests/ui/suggestions/issue-53692.fixed +++ b/tests/ui/suggestions/issue-53692.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/issue-53692.rs b/tests/ui/suggestions/issue-53692.rs index 6f6707be5f651..e11317b2cf365 100644 --- a/tests/ui/suggestions/issue-53692.rs +++ b/tests/ui/suggestions/issue-53692.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/issue-57672.rs b/tests/ui/suggestions/issue-57672.rs index ee999d83ec2e0..a6e1299612580 100644 --- a/tests/ui/suggestions/issue-57672.rs +++ b/tests/ui/suggestions/issue-57672.rs @@ -1,7 +1,7 @@ -// aux-build:foo.rs -// compile-flags:--extern foo -// check-pass -// edition:2018 +//@ aux-build:foo.rs +//@ compile-flags:--extern foo +//@ check-pass +//@ edition:2018 #![deny(unused_extern_crates)] diff --git a/tests/ui/suggestions/issue-59819.fixed b/tests/ui/suggestions/issue-59819.fixed index 644d2a4e41baf..61a9a4a68aa7e 100644 --- a/tests/ui/suggestions/issue-59819.fixed +++ b/tests/ui/suggestions/issue-59819.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/issue-59819.rs b/tests/ui/suggestions/issue-59819.rs index 8e8ff8372e808..cb0daecccacb8 100644 --- a/tests/ui/suggestions/issue-59819.rs +++ b/tests/ui/suggestions/issue-59819.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/issue-61226.fixed b/tests/ui/suggestions/issue-61226.fixed index 6e9d74344bc83..597ee9fe2933d 100644 --- a/tests/ui/suggestions/issue-61226.fixed +++ b/tests/ui/suggestions/issue-61226.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X {} fn main() { let _ = vec![X {}]; //… diff --git a/tests/ui/suggestions/issue-61226.rs b/tests/ui/suggestions/issue-61226.rs index 695fe73418a46..5c5e387663063 100644 --- a/tests/ui/suggestions/issue-61226.rs +++ b/tests/ui/suggestions/issue-61226.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X {} fn main() { let _ = vec![X]; //… diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs index d31ed01b1916b..de82700d7e4bc 100644 --- a/tests/ui/suggestions/issue-61963.rs +++ b/tests/ui/suggestions/issue-61963.rs @@ -1,5 +1,5 @@ -// aux-build:issue-61963.rs -// aux-build:issue-61963-1.rs +//@ aux-build:issue-61963.rs +//@ aux-build:issue-61963-1.rs #![deny(bare_trait_objects)] #[macro_use] diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.rs b/tests/ui/suggestions/issue-71394-no-from-impl.rs index 63f12a912824e..c295a72c7bddf 100644 --- a/tests/ui/suggestions/issue-71394-no-from-impl.rs +++ b/tests/ui/suggestions/issue-71394-no-from-impl.rs @@ -1,7 +1,7 @@ -// ignore-wasm -// ignore-msvc -// ignore-emscripten -// ignore-uwp +//@ ignore-wasm +//@ ignore-msvc +//@ ignore-emscripten +//@ ignore-uwp fn main() { let data: &[u8] = &[0; 10]; diff --git a/tests/ui/suggestions/issue-72766.rs b/tests/ui/suggestions/issue-72766.rs index c54be7f5dff0d..b9b93f22d9cfe 100644 --- a/tests/ui/suggestions/issue-72766.rs +++ b/tests/ui/suggestions/issue-72766.rs @@ -1,5 +1,5 @@ -// edition:2018 -// incremental +//@ edition:2018 +//@ incremental pub struct SadGirl; diff --git a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs index 3cd6d336e1345..3c1ad85911d6c 100644 --- a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs +++ b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs @@ -2,7 +2,7 @@ // fn with a named type parameter in order to add bounds, the suggested function // signature should be well-formed. // -// edition:2018 +//@ edition:2018 trait Foo { type Bar; diff --git a/tests/ui/suggestions/issue-81839.rs b/tests/ui/suggestions/issue-81839.rs index 0b9b7aefe735d..3971aa9fe8417 100644 --- a/tests/ui/suggestions/issue-81839.rs +++ b/tests/ui/suggestions/issue-81839.rs @@ -1,5 +1,5 @@ -// aux-build:issue-81839.rs -// edition:2018 +//@ aux-build:issue-81839.rs +//@ edition:2018 extern crate issue_81839; diff --git a/tests/ui/suggestions/issue-82361.fixed b/tests/ui/suggestions/issue-82361.fixed index d72de982bf98a..1eacb2f92473e 100644 --- a/tests/ui/suggestions/issue-82361.fixed +++ b/tests/ui/suggestions/issue-82361.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: usize = 123; diff --git a/tests/ui/suggestions/issue-82361.rs b/tests/ui/suggestions/issue-82361.rs index c068f6d22b476..d68b8ed28a49f 100644 --- a/tests/ui/suggestions/issue-82361.rs +++ b/tests/ui/suggestions/issue-82361.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: usize = 123; diff --git a/tests/ui/suggestions/issue-83892.fixed b/tests/ui/suggestions/issue-83892.fixed index dd093a7a0e312..b9a622c62f6d2 100644 --- a/tests/ui/suggestions/issue-83892.fixed +++ b/tests/ui/suggestions/issue-83892.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn func() -> u8 { 0 diff --git a/tests/ui/suggestions/issue-83892.rs b/tests/ui/suggestions/issue-83892.rs index 1d56ecee868a1..b10dcf96eda9b 100644 --- a/tests/ui/suggestions/issue-83892.rs +++ b/tests/ui/suggestions/issue-83892.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn func() -> u8 { 0 diff --git a/tests/ui/suggestions/issue-83943.fixed b/tests/ui/suggestions/issue-83943.fixed index e0d4ee29ebf88..f0ff26c446654 100644 --- a/tests/ui/suggestions/issue-83943.fixed +++ b/tests/ui/suggestions/issue-83943.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if true { diff --git a/tests/ui/suggestions/issue-83943.rs b/tests/ui/suggestions/issue-83943.rs index 68d50c1775c7f..b51f3aa189f4b 100644 --- a/tests/ui/suggestions/issue-83943.rs +++ b/tests/ui/suggestions/issue-83943.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if true { diff --git a/tests/ui/suggestions/issue-86667.rs b/tests/ui/suggestions/issue-86667.rs index b1a7e6e966517..8c18a87923894 100644 --- a/tests/ui/suggestions/issue-86667.rs +++ b/tests/ui/suggestions/issue-86667.rs @@ -1,7 +1,7 @@ // Regression test for #86667, where a garbled suggestion was issued for // a missing named lifetime parameter. -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 async fn a(s1: &str, s2: &str) -> &str { //~^ ERROR: missing lifetime specifier [E0106] diff --git a/tests/ui/suggestions/issue-89333.rs b/tests/ui/suggestions/issue-89333.rs index 03ed28ede21d8..e1c4750761bda 100644 --- a/tests/ui/suggestions/issue-89333.rs +++ b/tests/ui/suggestions/issue-89333.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // Ensure we don't error when emitting trait bound not satisfied when self type // has late bound var diff --git a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs index 1e36b2fabf2c0..f78d4e3554567 100644 --- a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs +++ b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs @@ -1,5 +1,5 @@ // Checks that we do not ICE when comparing `Self` to `Pin` -// edition:2021 +//@ edition:2021 struct S; diff --git a/tests/ui/suggestions/issue-96223.rs b/tests/ui/suggestions/issue-96223.rs index 85667bb849bd4..ab9acf7b4b241 100644 --- a/tests/ui/suggestions/issue-96223.rs +++ b/tests/ui/suggestions/issue-96223.rs @@ -1,5 +1,5 @@ // Previously ICEd because we didn't properly track binders in suggestions -// check-fail +//@ check-fail pub trait Foo<'de>: Sized {} diff --git a/tests/ui/suggestions/issue-96555.rs b/tests/ui/suggestions/issue-96555.rs index 9f0a047c6e9a8..11fdc7a55ed23 100644 --- a/tests/ui/suggestions/issue-96555.rs +++ b/tests/ui/suggestions/issue-96555.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn f() { m::f1().await; //~ ERROR `()` is not a future diff --git a/tests/ui/suggestions/issue-97677.fixed b/tests/ui/suggestions/issue-97677.fixed index 1e7569fa45106..255910487d4b5 100644 --- a/tests/ui/suggestions/issue-97677.fixed +++ b/tests/ui/suggestions/issue-97677.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn add_ten>(n: N) -> N { n + 10 diff --git a/tests/ui/suggestions/issue-97677.rs b/tests/ui/suggestions/issue-97677.rs index 2abf2af33845c..a7772a9bf9a7f 100644 --- a/tests/ui/suggestions/issue-97677.rs +++ b/tests/ui/suggestions/issue-97677.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn add_ten(n: N) -> N { n + 10 diff --git a/tests/ui/suggestions/issue-97704.fixed b/tests/ui/suggestions/issue-97704.fixed index c42bdfff5f9e6..6347ef1ba8497 100644 --- a/tests/ui/suggestions/issue-97704.fixed +++ b/tests/ui/suggestions/issue-97704.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/issue-97704.rs b/tests/ui/suggestions/issue-97704.rs index 5dfee6cac6097..2be27aaf1739c 100644 --- a/tests/ui/suggestions/issue-97704.rs +++ b/tests/ui/suggestions/issue-97704.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/issue-98500.rs b/tests/ui/suggestions/issue-98500.rs index a2717fd9206d1..b6fd9e7c23fe3 100644 --- a/tests/ui/suggestions/issue-98500.rs +++ b/tests/ui/suggestions/issue-98500.rs @@ -1,4 +1,4 @@ -// aux-build:not-object-safe.rs +//@ aux-build:not-object-safe.rs extern crate not_object_safe; diff --git a/tests/ui/suggestions/issue-98562.rs b/tests/ui/suggestions/issue-98562.rs index de04050d59312..443537ba39d17 100644 --- a/tests/ui/suggestions/issue-98562.rs +++ b/tests/ui/suggestions/issue-98562.rs @@ -1,4 +1,4 @@ -// aux-build:extern-issue-98562.rs +//@ aux-build:extern-issue-98562.rs extern crate extern_issue_98562; use extern_issue_98562::TraitA; diff --git a/tests/ui/suggestions/issue-99080.rs b/tests/ui/suggestions/issue-99080.rs index 91f574f35b80b..ecafdd6303d5f 100644 --- a/tests/ui/suggestions/issue-99080.rs +++ b/tests/ui/suggestions/issue-99080.rs @@ -1,4 +1,4 @@ -// aux-build:meow.rs +//@ aux-build:meow.rs extern crate meow; diff --git a/tests/ui/suggestions/js-style-comparison-op.fixed b/tests/ui/suggestions/js-style-comparison-op.fixed index f7e977b918d7d..0dd61ea7aaaf2 100644 --- a/tests/ui/suggestions/js-style-comparison-op.fixed +++ b/tests/ui/suggestions/js-style-comparison-op.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if 1 == 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); diff --git a/tests/ui/suggestions/js-style-comparison-op.rs b/tests/ui/suggestions/js-style-comparison-op.rs index c89c1052ed92a..621571aa40e53 100644 --- a/tests/ui/suggestions/js-style-comparison-op.rs +++ b/tests/ui/suggestions/js-style-comparison-op.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if 1 === 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); diff --git a/tests/ui/suggestions/lifetimes/issue-105544.fixed b/tests/ui/suggestions/lifetimes/issue-105544.fixed index c92114e181254..ad8f2e7f10463 100644 --- a/tests/ui/suggestions/lifetimes/issue-105544.fixed +++ b/tests/ui/suggestions/lifetimes/issue-105544.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/issue-105544.rs b/tests/ui/suggestions/lifetimes/issue-105544.rs index bbd0f097f8408..d7d164b2a2e68 100644 --- a/tests/ui/suggestions/lifetimes/issue-105544.rs +++ b/tests/ui/suggestions/lifetimes/issue-105544.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed index 474986283fc4f..9e88814d939ab 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed @@ -1,5 +1,5 @@ // Regression test for #81650 -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs index 99c8e9626af7f..366e4f8eb8ae6 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs @@ -1,5 +1,5 @@ // Regression test for #81650 -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed index 3c06f4f88c1f9..7ad2d60a68497 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/95616 fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str { //~ERROR [E0106] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs index 110468cbbc52e..2274c78f11485 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/95616 fn buggy_const(_a: &Option<[u8; N]>, _f: &str) -> &str { //~ERROR [E0106] diff --git a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed index 84315ad917327..3187b27634bda 100644 --- a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed +++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::any::Any; fn foo(value: &T) -> Box { diff --git a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs index fa7e72ff2a738..1ffeda67f8a7c 100644 --- a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs +++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::any::Any; fn foo(value: &T) -> Box { diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed index d4a8381fcb146..2c1e3ad005cf2 100644 --- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed +++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed @@ -1,6 +1,6 @@ // Make sure we suggest the bound `T: 'a` in the correct scope: // trait, impl or associated fn. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs index dc43e2df6ddb0..3840a45366141 100644 --- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs +++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs @@ -1,6 +1,6 @@ // Make sure we suggest the bound `T: 'a` in the correct scope: // trait, impl or associated fn. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed index e30c556457e53..862659ee44b09 100644 --- a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed +++ b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed @@ -1,6 +1,6 @@ // We want to suggest a bound `T: 'a` but `'a` is elided, -// run-rustfix -// edition: 2018 +//@ run-rustfix +//@ edition: 2018 #![allow(dead_code)] struct Inv<'a>(Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs index 85f08808b731c..2d41235c73e75 100644 --- a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs +++ b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs @@ -1,6 +1,6 @@ // We want to suggest a bound `T: 'a` but `'a` is elided, -// run-rustfix -// edition: 2018 +//@ run-rustfix +//@ edition: 2018 #![allow(dead_code)] struct Inv<'a>(Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/match-prev-arm-needing-semi.rs b/tests/ui/suggestions/match-prev-arm-needing-semi.rs index 11463c453d407..f7a2a7436bb4c 100644 --- a/tests/ui/suggestions/match-prev-arm-needing-semi.rs +++ b/tests/ui/suggestions/match-prev-arm-needing-semi.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn dummy() -> i32 { 42 } diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.fixed b/tests/ui/suggestions/method-access-to-range-literal-typo.fixed index 13601eef6c25b..7b1c2b4740f3a 100644 --- a/tests/ui/suggestions/method-access-to-range-literal-typo.fixed +++ b/tests/ui/suggestions/method-access-to-range-literal-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.rs b/tests/ui/suggestions/method-access-to-range-literal-typo.rs index fdcd6425d32de..a4c07d1bb7d54 100644 --- a/tests/ui/suggestions/method-access-to-range-literal-typo.rs +++ b/tests/ui/suggestions/method-access-to-range-literal-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs index 11e0c9a3a72af..ebe7e4574ca49 100644 --- a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs +++ b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs @@ -1,4 +1,4 @@ -// aux-build:missing-assoc-fn-applicable-suggestions.rs +//@ aux-build:missing-assoc-fn-applicable-suggestions.rs extern crate missing_assoc_fn_applicable_suggestions; use missing_assoc_fn_applicable_suggestions::TraitA; diff --git a/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs b/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs index 4954a8a6965be..be8f4e565b835 100644 --- a/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs +++ b/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Parent { type Ty; diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed index 269ebd2b75ada..99433f7332042 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs index e9455f918bca4..c0777e0817f03 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed index 8a91e2d5f0d09..6da3e351ffbdd 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs index c10f9d46010a0..8550a4d724761 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed index 90bc10d34c611..00ca0c41654bf 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs index 34673852a9b53..cdd92e3001d1e 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed index ff84e42c9470b..0382358fbbe3b 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs index 35d0a9dda7914..10c5a0d084b99 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs b/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs index 2a8b4c3c04473..f36a6567e423e 100644 --- a/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs +++ b/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs @@ -1,4 +1,4 @@ -// revisions: default generic_const_items +//@ revisions: default generic_const_items #![cfg_attr(generic_const_items, feature(generic_const_items), allow(incomplete_features))] diff --git a/tests/ui/suggestions/missing-lifetime-specifier.rs b/tests/ui/suggestions/missing-lifetime-specifier.rs index 85dd6a5635a21..3fa7f75f86219 100644 --- a/tests/ui/suggestions/missing-lifetime-specifier.rs +++ b/tests/ui/suggestions/missing-lifetime-specifier.rs @@ -1,7 +1,7 @@ // different number of duplicated diagnostics on different targets -// only-x86_64 -// only-linux -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ only-x86_64 +//@ only-linux +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(bare_trait_objects)] use std::cell::RefCell; diff --git a/tests/ui/suggestions/missing-semicolon.fixed b/tests/ui/suggestions/missing-semicolon.fixed index df355f0b00761..82c284a54c283 100644 --- a/tests/ui/suggestions/missing-semicolon.fixed +++ b/tests/ui/suggestions/missing-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; diff --git a/tests/ui/suggestions/missing-semicolon.rs b/tests/ui/suggestions/missing-semicolon.rs index 12ef3d33e5f43..2e38381d10801 100644 --- a/tests/ui/suggestions/missing-semicolon.rs +++ b/tests/ui/suggestions/missing-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; diff --git a/tests/ui/suggestions/missing-trait-item.fixed b/tests/ui/suggestions/missing-trait-item.fixed index ded4ec1976067..b79a7a51f07d3 100644 --- a/tests/ui/suggestions/missing-trait-item.fixed +++ b/tests/ui/suggestions/missing-trait-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait T { diff --git a/tests/ui/suggestions/missing-trait-item.rs b/tests/ui/suggestions/missing-trait-item.rs index de8974037ac99..43111c01c755b 100644 --- a/tests/ui/suggestions/missing-trait-item.rs +++ b/tests/ui/suggestions/missing-trait-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait T { diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.fixed b/tests/ui/suggestions/missing-type-param-used-in-param.fixed index be4394031047f..3763ce53007aa 100644 --- a/tests/ui/suggestions/missing-type-param-used-in-param.fixed +++ b/tests/ui/suggestions/missing-type-param-used-in-param.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn two_type_params(_: B) {} diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.rs b/tests/ui/suggestions/missing-type-param-used-in-param.rs index d444998d35bf9..1d4f9bf94c88a 100644 --- a/tests/ui/suggestions/missing-type-param-used-in-param.rs +++ b/tests/ui/suggestions/missing-type-param-used-in-param.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn two_type_params(_: B) {} diff --git a/tests/ui/suggestions/negative-literal-index.fixed b/tests/ui/suggestions/negative-literal-index.fixed index e52714cf97fe6..54949fb6a0984 100644 --- a/tests/ui/suggestions/negative-literal-index.fixed +++ b/tests/ui/suggestions/negative-literal-index.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Index; struct X; diff --git a/tests/ui/suggestions/negative-literal-index.rs b/tests/ui/suggestions/negative-literal-index.rs index d88b66e679e56..8b460b523b320 100644 --- a/tests/ui/suggestions/negative-literal-index.rs +++ b/tests/ui/suggestions/negative-literal-index.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Index; struct X; diff --git a/tests/ui/suggestions/no-extern-crate-in-type.rs b/tests/ui/suggestions/no-extern-crate-in-type.rs index bb93ef4549dc2..a868118917670 100644 --- a/tests/ui/suggestions/no-extern-crate-in-type.rs +++ b/tests/ui/suggestions/no-extern-crate-in-type.rs @@ -1,4 +1,4 @@ -// aux-build:foo.rs +//@ aux-build:foo.rs extern crate foo; diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed b/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed index e58b4e6ca4d6f..2b4ecbf0ca5c1 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed +++ b/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { first: Bar, diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.rs b/tests/ui/suggestions/non-existent-field-present-in-subfield.rs index 7e273ac23d8c3..8638e50f479f1 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield.rs +++ b/tests/ui/suggestions/non-existent-field-present-in-subfield.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { first: Bar, diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs index dbdfde6dd5061..37afab6b643ca 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(bare_trait_objects)] trait A: Sized { fn f(a: A) -> A; diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs index a598e883f3fdd..4ab10f40eb68d 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(bare_trait_objects)] trait A: Sized { fn f(a: dyn A) -> dyn A; diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed index 69487c565c933..fd9b78934c7da 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] trait Trait { diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs index 38d9aea16ebf6..e4aa0d892391b 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] trait Trait { diff --git a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed index 570d91d949bfc..226e408f54536 100644 --- a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed +++ b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::io::stdin; fn get_name() -> String { diff --git a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs index 93e8c0af0323e..be382d61d38be 100644 --- a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs +++ b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::io::stdin; fn get_name() -> String { diff --git a/tests/ui/suggestions/opaque-type-error.rs b/tests/ui/suggestions/opaque-type-error.rs index 5e1147403143e..e9dbceae6c64f 100644 --- a/tests/ui/suggestions/opaque-type-error.rs +++ b/tests/ui/suggestions/opaque-type-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::future::Future; async fn base_thing() -> Result<(), ()> { diff --git a/tests/ui/suggestions/option-content-move.fixed b/tests/ui/suggestions/option-content-move.fixed index 5e79cf71d823f..fbed486cef7ca 100644 --- a/tests/ui/suggestions/option-content-move.fixed +++ b/tests/ui/suggestions/option-content-move.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct LipogramCorpora { selections: Vec<(char, Option)>, } diff --git a/tests/ui/suggestions/option-content-move.rs b/tests/ui/suggestions/option-content-move.rs index 58efbe71f2786..90d05c7439970 100644 --- a/tests/ui/suggestions/option-content-move.rs +++ b/tests/ui/suggestions/option-content-move.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct LipogramCorpora { selections: Vec<(char, Option)>, } diff --git a/tests/ui/suggestions/pattern-slice-vec.fixed b/tests/ui/suggestions/pattern-slice-vec.fixed index f8144641f3c31..b49c33e0b708e 100644 --- a/tests/ui/suggestions/pattern-slice-vec.fixed +++ b/tests/ui/suggestions/pattern-slice-vec.fixed @@ -1,6 +1,6 @@ // Regression test for #87017. -// run-rustfix +//@ run-rustfix fn main() { fn foo() -> Vec { vec![1, 2, 3] } diff --git a/tests/ui/suggestions/pattern-slice-vec.rs b/tests/ui/suggestions/pattern-slice-vec.rs index 444687c85789e..2c4b115973fe7 100644 --- a/tests/ui/suggestions/pattern-slice-vec.rs +++ b/tests/ui/suggestions/pattern-slice-vec.rs @@ -1,6 +1,6 @@ // Regression test for #87017. -// run-rustfix +//@ run-rustfix fn main() { fn foo() -> Vec { vec![1, 2, 3] } diff --git a/tests/ui/suggestions/private-field.rs b/tests/ui/suggestions/private-field.rs index 1cc4d2a4d066e..47e1859cd2b0f 100644 --- a/tests/ui/suggestions/private-field.rs +++ b/tests/ui/suggestions/private-field.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib pub struct S { pub val: string::MyString, } diff --git a/tests/ui/suggestions/range-index-instead-of-colon.rs b/tests/ui/suggestions/range-index-instead-of-colon.rs index 3267527ecf2a7..0594d4f4c9cf7 100644 --- a/tests/ui/suggestions/range-index-instead-of-colon.rs +++ b/tests/ui/suggestions/range-index-instead-of-colon.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { &[1, 2, 3][1:2]; diff --git a/tests/ui/suggestions/raw-byte-string-prefix.rs b/tests/ui/suggestions/raw-byte-string-prefix.rs index 576561c315ce9..2d339898a48ae 100644 --- a/tests/ui/suggestions/raw-byte-string-prefix.rs +++ b/tests/ui/suggestions/raw-byte-string-prefix.rs @@ -1,6 +1,6 @@ // `br` and `rb` are easy to confuse; check that we issue a suggestion to help. -// edition:2021 +//@ edition:2021 fn main() { rb"abc"; diff --git a/tests/ui/suggestions/recover-invalid-float.fixed b/tests/ui/suggestions/recover-invalid-float.fixed index 62389ba612083..e9b67b1df26c0 100644 --- a/tests/ui/suggestions/recover-invalid-float.fixed +++ b/tests/ui/suggestions/recover-invalid-float.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: f32 = 0.3; diff --git a/tests/ui/suggestions/recover-invalid-float.rs b/tests/ui/suggestions/recover-invalid-float.rs index a5a7efe5e76e8..c0aea0a78a669 100644 --- a/tests/ui/suggestions/recover-invalid-float.rs +++ b/tests/ui/suggestions/recover-invalid-float.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: f32 = .3; diff --git a/tests/ui/suggestions/ref-pattern-binding.fixed b/tests/ui/suggestions/ref-pattern-binding.fixed index c36040eeca301..d46546cd1040a 100644 --- a/tests/ui/suggestions/ref-pattern-binding.fixed +++ b/tests/ui/suggestions/ref-pattern-binding.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S { diff --git a/tests/ui/suggestions/ref-pattern-binding.rs b/tests/ui/suggestions/ref-pattern-binding.rs index c0d4feb033098..06d56ae206b12 100644 --- a/tests/ui/suggestions/ref-pattern-binding.rs +++ b/tests/ui/suggestions/ref-pattern-binding.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S { diff --git a/tests/ui/suggestions/shadowed-lplace-method.fixed b/tests/ui/suggestions/shadowed-lplace-method.fixed index 740ac77ee0c67..87db01a3b230b 100644 --- a/tests/ui/suggestions/shadowed-lplace-method.fixed +++ b/tests/ui/suggestions/shadowed-lplace-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] use std::borrow::BorrowMut; use std::cell::RefCell; diff --git a/tests/ui/suggestions/shadowed-lplace-method.rs b/tests/ui/suggestions/shadowed-lplace-method.rs index 6bf12879e6f28..01cc58bf784c0 100644 --- a/tests/ui/suggestions/shadowed-lplace-method.rs +++ b/tests/ui/suggestions/shadowed-lplace-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] use std::borrow::BorrowMut; use std::cell::RefCell; diff --git a/tests/ui/suggestions/silenced-binding-typo.fixed b/tests/ui/suggestions/silenced-binding-typo.fixed index e0f9e31bef310..aa688c88250a8 100644 --- a/tests/ui/suggestions/silenced-binding-typo.fixed +++ b/tests/ui/suggestions/silenced-binding-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = 42; //~ HELP let _y = x; //~ ERROR diff --git a/tests/ui/suggestions/silenced-binding-typo.rs b/tests/ui/suggestions/silenced-binding-typo.rs index 6cadd5a93a752..ea49834b9e8f3 100644 --- a/tests/ui/suggestions/silenced-binding-typo.rs +++ b/tests/ui/suggestions/silenced-binding-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = 42; //~ HELP let _y = x; //~ ERROR diff --git a/tests/ui/suggestions/struct-initializer-comma.fixed b/tests/ui/suggestions/struct-initializer-comma.fixed index 6a4ee39b16d86..556bfbca58df4 100644 --- a/tests/ui/suggestions/struct-initializer-comma.fixed +++ b/tests/ui/suggestions/struct-initializer-comma.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Foo { pub first: bool, diff --git a/tests/ui/suggestions/struct-initializer-comma.rs b/tests/ui/suggestions/struct-initializer-comma.rs index c137f0594186d..7b93bf187b870 100644 --- a/tests/ui/suggestions/struct-initializer-comma.rs +++ b/tests/ui/suggestions/struct-initializer-comma.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Foo { pub first: bool, diff --git a/tests/ui/suggestions/sugg-else-for-closure.fixed b/tests/ui/suggestions/sugg-else-for-closure.fixed index cf381d9da8be9..f701c40379942 100644 --- a/tests/ui/suggestions/sugg-else-for-closure.fixed +++ b/tests/ui/suggestions/sugg-else-for-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "com.example.app"; diff --git a/tests/ui/suggestions/sugg-else-for-closure.rs b/tests/ui/suggestions/sugg-else-for-closure.rs index 540ced91fc950..d97467e4d3e3f 100644 --- a/tests/ui/suggestions/sugg-else-for-closure.rs +++ b/tests/ui/suggestions/sugg-else-for-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "com.example.app"; diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed index e9b8a9caa484a..3b739312942a1 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn foo(foo: &mut usize) { diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs index 5fae21cccef23..7fc870946b934 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn foo(foo: &mut usize) { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed index 8d96cf590c398..782822fff5464 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs b/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs index 186901f75a84b..e9856e808c506 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed index 86ac07a93a367..b4d7c6054faee 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs index 9a57ffb77405a..d99386336af86 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed index 02dd0715c8011..9518a203d02cc 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct GenericAssocMethod(T); diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs index 1d0ca8e780abf..a84dc5e7797e7 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct GenericAssocMethod(T); diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed index 61f06d802b68f..3ce9aff92fcc0 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A {} diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs index 07e614f0c15e5..cd27ce9fe860d 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A {} diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs index 14fef1b524892..76300c6a3f424 100644 --- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs +++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs @@ -1,7 +1,7 @@ // Ensure that the compiler include the blanklet implementation suggestion // when inside a `impl` statement are used two local traits. // -// edition:2021 +//@ edition:2021 use std::fmt; trait LocalTraitOne { } diff --git a/tests/ui/suggestions/suggest-box.fixed b/tests/ui/suggestions/suggest-box.fixed index 3de02cd0bd481..7cd62c4318347 100644 --- a/tests/ui/suggestions/suggest-box.fixed +++ b/tests/ui/suggestions/suggest-box.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: Box Result<(), ()>> = Box::new(|| { //~ ERROR mismatched types diff --git a/tests/ui/suggestions/suggest-box.rs b/tests/ui/suggestions/suggest-box.rs index e680a61db3b17..c31320c548594 100644 --- a/tests/ui/suggestions/suggest-box.rs +++ b/tests/ui/suggestions/suggest-box.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: Box Result<(), ()>> = || { //~ ERROR mismatched types diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.fixed b/tests/ui/suggestions/suggest-boxed-empty-block.fixed index 46683aa095355..25cb4dc74b113 100644 --- a/tests/ui/suggestions/suggest-boxed-empty-block.fixed +++ b/tests/ui/suggestions/suggest-boxed-empty-block.fixed @@ -1,7 +1,7 @@ #![feature(async_closure)] -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix fn foo(_: Box) {} fn bar(_: impl Fn() -> Box) {} diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.rs b/tests/ui/suggestions/suggest-boxed-empty-block.rs index e19670a501841..9a8d6498fb149 100644 --- a/tests/ui/suggestions/suggest-boxed-empty-block.rs +++ b/tests/ui/suggestions/suggest-boxed-empty-block.rs @@ -1,7 +1,7 @@ #![feature(async_closure)] -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix fn foo(_: Box) {} fn bar(_: impl Fn() -> Box) {} diff --git a/tests/ui/suggestions/suggest-dereferencing-index.fixed b/tests/ui/suggestions/suggest-dereferencing-index.fixed index dd4ae4eb14c30..2460d5427647c 100644 --- a/tests/ui/suggestions/suggest-dereferencing-index.fixed +++ b/tests/ui/suggestions/suggest-dereferencing-index.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/suggest-dereferencing-index.rs b/tests/ui/suggestions/suggest-dereferencing-index.rs index 82ebacc49f235..42abb5537c5a1 100644 --- a/tests/ui/suggestions/suggest-dereferencing-index.rs +++ b/tests/ui/suggestions/suggest-dereferencing-index.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/suggest-field-through-deref.fixed b/tests/ui/suggestions/suggest-field-through-deref.fixed index 07ba3aa911f4e..18511bda4d8f6 100644 --- a/tests/ui/suggestions/suggest-field-through-deref.fixed +++ b/tests/ui/suggestions/suggest-field-through-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::sync::Arc; struct S { diff --git a/tests/ui/suggestions/suggest-field-through-deref.rs b/tests/ui/suggestions/suggest-field-through-deref.rs index 6e24b425e9565..4189aa71b06e5 100644 --- a/tests/ui/suggestions/suggest-field-through-deref.rs +++ b/tests/ui/suggestions/suggest-field-through-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::sync::Arc; struct S { diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed index abb9ef9177432..0b0eaa1959b10 100644 --- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed +++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs index d2a79c3869418..38707887f0eed 100644 --- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs +++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed b/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed index 4f2fd5ba6001b..3ab3d0a6828d0 100644 --- a/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed +++ b/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; diff --git a/tests/ui/suggestions/suggest-impl-trait-lifetime.rs b/tests/ui/suggestions/suggest-impl-trait-lifetime.rs index a266e360edbad..81411b46be0d2 100644 --- a/tests/ui/suggestions/suggest-impl-trait-lifetime.rs +++ b/tests/ui/suggestions/suggest-impl-trait-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; diff --git a/tests/ui/suggestions/suggest-let-for-assignment.fixed b/tests/ui/suggestions/suggest-let-for-assignment.fixed index 76dc1dad80a90..80b9333827ec9 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.fixed +++ b/tests/ui/suggestions/suggest-let-for-assignment.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let demo = 1; //~ ERROR cannot find value `demo` in this scope diff --git a/tests/ui/suggestions/suggest-let-for-assignment.rs b/tests/ui/suggestions/suggest-let-for-assignment.rs index f1edf65a72614..22560083d34c9 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.rs +++ b/tests/ui/suggestions/suggest-let-for-assignment.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { demo = 1; //~ ERROR cannot find value `demo` in this scope diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed index 556c95438817e..fe445410c648e 100644 --- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed +++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/82081 use std::collections::HashMap; diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs index b9d49a074eade..1f8bd9ae4d8fe 100644 --- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs +++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/82081 use std::collections::HashMap; diff --git a/tests/ui/suggestions/suggest-on-bare-closure-call.rs b/tests/ui/suggestions/suggest-on-bare-closure-call.rs index 496c305bc2aff..046fe4803eca8 100644 --- a/tests/ui/suggestions/suggest-on-bare-closure-call.rs +++ b/tests/ui/suggestions/suggest-on-bare-closure-call.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs index 730f5fa1b5e3d..e5084e5411529 100644 --- a/tests/ui/suggestions/suggest-ref-macro.rs +++ b/tests/ui/suggestions/suggest-ref-macro.rs @@ -1,5 +1,5 @@ // run-check -// aux-build:proc-macro-type-error.rs +//@ aux-build:proc-macro-type-error.rs extern crate proc_macro_type_error; diff --git a/tests/ui/suggestions/suggest-remove-deref.fixed b/tests/ui/suggestions/suggest-remove-deref.fixed index 4dc12da03dd02..d056f9e1f3677 100644 --- a/tests/ui/suggestions/suggest-remove-deref.fixed +++ b/tests/ui/suggestions/suggest-remove-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix //issue #106496 diff --git a/tests/ui/suggestions/suggest-remove-deref.rs b/tests/ui/suggestions/suggest-remove-deref.rs index c2d385cbdc378..258c183950fee 100644 --- a/tests/ui/suggestions/suggest-remove-deref.rs +++ b/tests/ui/suggestions/suggest-remove-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix //issue #106496 diff --git a/tests/ui/suggestions/suggest-remove-refs-1.fixed b/tests/ui/suggestions/suggest-remove-refs-1.fixed index a39e0fbd11908..ff136fbeebae3 100644 --- a/tests/ui/suggestions/suggest-remove-refs-1.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-1.rs b/tests/ui/suggestions/suggest-remove-refs-1.rs index 6f767f2c170ef..61e0792f4cfc6 100644 --- a/tests/ui/suggestions/suggest-remove-refs-1.rs +++ b/tests/ui/suggestions/suggest-remove-refs-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-2.fixed b/tests/ui/suggestions/suggest-remove-refs-2.fixed index 0f9c3abfe8ee8..c5289a5ba4ccf 100644 --- a/tests/ui/suggestions/suggest-remove-refs-2.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-2.rs b/tests/ui/suggestions/suggest-remove-refs-2.rs index 6c94b12d20907..a5b8943cf1083 100644 --- a/tests/ui/suggestions/suggest-remove-refs-2.rs +++ b/tests/ui/suggestions/suggest-remove-refs-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-3.fixed b/tests/ui/suggestions/suggest-remove-refs-3.fixed index 3148fcbe5daec..49798baf9282e 100644 --- a/tests/ui/suggestions/suggest-remove-refs-3.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-3.rs b/tests/ui/suggestions/suggest-remove-refs-3.rs index 0622adada0c64..5a4c6adc6765c 100644 --- a/tests/ui/suggestions/suggest-remove-refs-3.rs +++ b/tests/ui/suggestions/suggest-remove-refs-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-4.fixed b/tests/ui/suggestions/suggest-remove-refs-4.fixed index dd63d21597243..562bd3ff33717 100644 --- a/tests/ui/suggestions/suggest-remove-refs-4.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-4.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = [1,2,3].iter(); for _i in foo {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-4.rs b/tests/ui/suggestions/suggest-remove-refs-4.rs index 3c3d9b1b3f981..ac5b13ffad356 100644 --- a/tests/ui/suggestions/suggest-remove-refs-4.rs +++ b/tests/ui/suggestions/suggest-remove-refs-4.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = &[1,2,3].iter(); for _i in &foo {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-5.fixed b/tests/ui/suggestions/suggest-remove-refs-5.fixed index 9f59f9c199a33..f426a372e5a61 100644 --- a/tests/ui/suggestions/suggest-remove-refs-5.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-5.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = &mut Vec::::new(); for _ in v {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-5.rs b/tests/ui/suggestions/suggest-remove-refs-5.rs index d56aa0c9ca479..367a366b80e7a 100644 --- a/tests/ui/suggestions/suggest-remove-refs-5.rs +++ b/tests/ui/suggestions/suggest-remove-refs-5.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = &mut &mut Vec::::new(); for _ in &mut &mut v {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed b/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed index 0a08383317f76..8945697a646c2 100644 --- a/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed +++ b/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-ret-on-async-w-late.rs b/tests/ui/suggestions/suggest-ret-on-async-w-late.rs index 5c8f185bd4b07..2b70cdd524ee5 100644 --- a/tests/ui/suggestions/suggest-ret-on-async-w-late.rs +++ b/tests/ui/suggestions/suggest-ret-on-async-w-late.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed index 5c55566ffe92f..99f6b080fead5 100644 --- a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed +++ b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] diff --git a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs index 91971cba3e863..1fdf640b8bfbc 100644 --- a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs +++ b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] diff --git a/tests/ui/suggestions/suggest-slice-swap.fixed b/tests/ui/suggestions/suggest-slice-swap.fixed index 05b7ec2637985..6418e8265d130 100644 --- a/tests/ui/suggestions/suggest-slice-swap.fixed +++ b/tests/ui/suggestions/suggest-slice-swap.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn swap(arr: &mut [u32; 2]) { diff --git a/tests/ui/suggestions/suggest-slice-swap.rs b/tests/ui/suggestions/suggest-slice-swap.rs index 9f3659aac1637..478f8c69edd19 100644 --- a/tests/ui/suggestions/suggest-slice-swap.rs +++ b/tests/ui/suggestions/suggest-slice-swap.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn swap(arr: &mut [u32; 2]) { diff --git a/tests/ui/suggestions/suggest-std-when-using-type.fixed b/tests/ui/suggestions/suggest-std-when-using-type.fixed index 102c5c1868fbf..ebbb854175bda 100644 --- a/tests/ui/suggestions/suggest-std-when-using-type.fixed +++ b/tests/ui/suggestions/suggest-std-when-using-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let pi = std::f32::consts::PI; //~ ERROR ambiguous associated type let bytes = "hello world".as_bytes(); diff --git a/tests/ui/suggestions/suggest-std-when-using-type.rs b/tests/ui/suggestions/suggest-std-when-using-type.rs index 5abc016deb076..06aab63d68856 100644 --- a/tests/ui/suggestions/suggest-std-when-using-type.rs +++ b/tests/ui/suggestions/suggest-std-when-using-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let pi = f32::consts::PI; //~ ERROR ambiguous associated type let bytes = "hello world".as_bytes(); diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs index 03c7ed347bddf..c4384bce3a9b8 100644 --- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs +++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait Trait<'a, T> {} diff --git a/tests/ui/suggestions/suggest-tryinto-edition-change.rs b/tests/ui/suggestions/suggest-tryinto-edition-change.rs index 70c4b210d3a7b..c4a24ffee93cd 100644 --- a/tests/ui/suggestions/suggest-tryinto-edition-change.rs +++ b/tests/ui/suggestions/suggest-tryinto-edition-change.rs @@ -1,6 +1,6 @@ // Make sure that trying to access `TryInto`, `TryFrom`, `FromIterator` in pre-2021 mentions // Edition 2021 change -// edition:2018 +//@ edition:2018 fn test() { let _i: i16 = 0_i32.try_into().unwrap(); diff --git a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed index 8ef7e34ab3050..47f542d12e2fb 100644 --- a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed +++ b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for the fixed file trait Trait { diff --git a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs index 7bd38d0d45d90..245902dad264a 100644 --- a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs +++ b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for the fixed file trait Trait { diff --git a/tests/ui/suggestions/try-removing-the-field.rs b/tests/ui/suggestions/try-removing-the-field.rs index 1b7289b229b5d..dc1bde082c4f1 100644 --- a/tests/ui/suggestions/try-removing-the-field.rs +++ b/tests/ui/suggestions/try-removing-the-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.fixed b/tests/ui/suggestions/type-ascription-instead-of-let.fixed index e3d03b6f22ad6..6a4f23b782070 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-let.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn fun(x: i32) -> i32 { x } diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.rs b/tests/ui/suggestions/type-ascription-instead-of-let.rs index 6e1c86f967119..0a753bf2eef9c 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-let.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn fun(x: i32) -> i32 { x } diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.fixed b/tests/ui/suggestions/type-ascription-instead-of-method.fixed index 02e316b264e87..1ad7a9f6e618c 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-method.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Box::new("foo".to_string()); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.rs b/tests/ui/suggestions/type-ascription-instead-of-method.rs index 6f893ee89b2cc..1984c1b19046e 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-method.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Box:new("foo".to_string()); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed index 4cec58be856f0..d432c5db6836c 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() -> Result<(), ()> { let _ = vec![Ok(2)].into_iter().collect::,_>>()?; //~^ ERROR expected one of diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs index 5695d5a7f7251..1f4352277fd3b 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() -> Result<(), ()> { let _ = vec![Ok(2)].into_iter().collect:,_>>()?; //~^ ERROR expected one of diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed index 04cb206862462..ae46e809abe31 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option::Some(""); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.rs b/tests/ui/suggestions/type-ascription-instead-of-variant.rs index 2cce69bfec8f3..07e17f812867a 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-variant.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-variant.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option:Some(""); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed index 91758c0b21882..135eb41c20324 100644 --- a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed +++ b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct RGB { r: f64, g: f64, b: f64 } diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs index 9d3a17a72b21e..f398d18a0e14f 100644 --- a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs +++ b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct RGB { r: f64, g: f64, b: f64 } diff --git a/tests/ui/suggestions/undeclared-module-alloc.rs b/tests/ui/suggestions/undeclared-module-alloc.rs index 1defa1cef2863..e5f22369b941a 100644 --- a/tests/ui/suggestions/undeclared-module-alloc.rs +++ b/tests/ui/suggestions/undeclared-module-alloc.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use alloc::rc::Rc; //~ ERROR failed to resolve: use of undeclared crate or module `alloc` diff --git a/tests/ui/suggestions/unsized-function-parameter.fixed b/tests/ui/suggestions/unsized-function-parameter.fixed index 18e93cb96cd99..24f0698f176e4 100644 --- a/tests/ui/suggestions/unsized-function-parameter.fixed +++ b/tests/ui/suggestions/unsized-function-parameter.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] diff --git a/tests/ui/suggestions/unsized-function-parameter.rs b/tests/ui/suggestions/unsized-function-parameter.rs index 344ee71c1bcc9..b2c6aa4ee060a 100644 --- a/tests/ui/suggestions/unsized-function-parameter.rs +++ b/tests/ui/suggestions/unsized-function-parameter.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] diff --git a/tests/ui/suggestions/use-placement-resolve.fixed b/tests/ui/suggestions/use-placement-resolve.fixed index afe74cff2e92d..d15aee004846d 100644 --- a/tests/ui/suggestions/use-placement-resolve.fixed +++ b/tests/ui/suggestions/use-placement-resolve.fixed @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-resolve.rs b/tests/ui/suggestions/use-placement-resolve.rs index b30ddb3af07b4..7724718ee791e 100644 --- a/tests/ui/suggestions/use-placement-resolve.rs +++ b/tests/ui/suggestions/use-placement-resolve.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-typeck.fixed b/tests/ui/suggestions/use-placement-typeck.fixed index 37335da060e42..74949495cc32e 100644 --- a/tests/ui/suggestions/use-placement-typeck.fixed +++ b/tests/ui/suggestions/use-placement-typeck.fixed @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-typeck.rs b/tests/ui/suggestions/use-placement-typeck.rs index aab20d2e90a38..74e9edafe8163 100644 --- a/tests/ui/suggestions/use-placement-typeck.rs +++ b/tests/ui/suggestions/use-placement-typeck.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/super-fast-paren-parsing.rs b/tests/ui/super-fast-paren-parsing.rs index cb42ff2c6443a..ce7283eee0349 100644 --- a/tests/ui/super-fast-paren-parsing.rs +++ b/tests/ui/super-fast-paren-parsing.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_upper_case_globals)] #![allow(dead_code)] -// exec-env:RUST_MIN_STACK=16000000 -// rustc-env:RUST_MIN_STACK=16000000 +//@ exec-env:RUST_MIN_STACK=16000000 +//@ rustc-env:RUST_MIN_STACK=16000000 // // Big stack is needed for pretty printing, a little sad... diff --git a/tests/ui/super.rs b/tests/ui/super.rs index 86c720288c355..5d2ea92e921c5 100644 --- a/tests/ui/super.rs +++ b/tests/ui/super.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod a { pub fn f() {} diff --git a/tests/ui/svh-add-nothing.rs b/tests/ui/svh-add-nothing.rs index d7d037f0b32b0..75ef82d0fa3ee 100644 --- a/tests/ui/svh-add-nothing.rs +++ b/tests/ui/svh-add-nothing.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-base.rs +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-base.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate a; extern crate b; diff --git a/tests/ui/svh/changing-crates.rs b/tests/ui/svh/changing-crates.rs index 66298e06ed627..78075a5c75fa4 100644 --- a/tests/ui/svh/changing-crates.rs +++ b/tests/ui/svh/changing-crates.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:changing-crates-a1.rs -// aux-build:changing-crates-b.rs -// aux-build:changing-crates-a2.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:changing-crates-a1.rs +//@ aux-build:changing-crates-b.rs +//@ aux-build:changing-crates-a2.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-lit.rs b/tests/ui/svh/svh-change-lit.rs index ea500711bb769..6ecdd9f2c084d 100644 --- a/tests/ui/svh/svh-change-lit.rs +++ b/tests/ui/svh/svh-change-lit.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-lit.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-lit.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-significant-cfg.rs b/tests/ui/svh/svh-change-significant-cfg.rs index ff919ea83d533..c03560ee51124 100644 --- a/tests/ui/svh/svh-change-significant-cfg.rs +++ b/tests/ui/svh/svh-change-significant-cfg.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-significant-cfg.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-significant-cfg.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-trait-bound.rs b/tests/ui/svh/svh-change-trait-bound.rs index a4ba06eaf2ee5..4bbbf45a88664 100644 --- a/tests/ui/svh/svh-change-trait-bound.rs +++ b/tests/ui/svh/svh-change-trait-bound.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-trait-bound.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-trait-bound.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-arg.rs b/tests/ui/svh/svh-change-type-arg.rs index d1651814bf66d..cdc5cf24272f9 100644 --- a/tests/ui/svh/svh-change-type-arg.rs +++ b/tests/ui/svh/svh-change-type-arg.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-arg.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-arg.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-ret.rs b/tests/ui/svh/svh-change-type-ret.rs index a4be50a643359..f2a579fab630e 100644 --- a/tests/ui/svh/svh-change-type-ret.rs +++ b/tests/ui/svh/svh-change-type-ret.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-ret.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-ret.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-static.rs b/tests/ui/svh/svh-change-type-static.rs index c470761be1954..489923ddecf5b 100644 --- a/tests/ui/svh/svh-change-type-static.rs +++ b/tests/ui/svh/svh-change-type-static.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-static.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-static.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-use-trait.rs b/tests/ui/svh/svh-use-trait.rs index e144fdffb522b..8ac4cc426054d 100644 --- a/tests/ui/svh/svh-use-trait.rs +++ b/tests/ui/svh/svh-use-trait.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-uta-base.rs -// aux-build:svh-utb.rs -// aux-build:svh-uta-change-use-trait.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-uta-base.rs +//@ aux-build:svh-utb.rs +//@ aux-build:svh-uta-change-use-trait.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" //! "svh-uta-trait.rs" is checking that we detect a //! change from `use foo::TraitB` to use `foo::TraitB` in the hash diff --git a/tests/ui/swap-1.rs b/tests/ui/swap-1.rs index d87114748dd87..b104c3ade42d7 100644 --- a/tests/ui/swap-1.rs +++ b/tests/ui/swap-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/swap-overlapping.rs b/tests/ui/swap-overlapping.rs index 85b357e0c024a..f7720e0470d74 100644 --- a/tests/ui/swap-overlapping.rs +++ b/tests/ui/swap-overlapping.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/symbol-mangling-version/bad-value.rs b/tests/ui/symbol-mangling-version/bad-value.rs index 7623857d49e81..f6fa5c85f3386 100644 --- a/tests/ui/symbol-mangling-version/bad-value.rs +++ b/tests/ui/symbol-mangling-version/bad-value.rs @@ -1,6 +1,6 @@ -// revisions: no-value blank bad -// [no-value] compile-flags: -Csymbol-mangling-version -// [blank] compile-flags: -Csymbol-mangling-version= -// [bad] compile-flags: -Csymbol-mangling-version=bad-value +//@ revisions: no-value blank bad +//@ [no-value] compile-flags: -Csymbol-mangling-version +//@ [blank] compile-flags: -Csymbol-mangling-version= +//@ [bad] compile-flags: -Csymbol-mangling-version=bad-value fn main() {} diff --git a/tests/ui/symbol-mangling-version/stable.rs b/tests/ui/symbol-mangling-version/stable.rs index dac9bb18d1c3f..c766ad039776b 100644 --- a/tests/ui/symbol-mangling-version/stable.rs +++ b/tests/ui/symbol-mangling-version/stable.rs @@ -1,5 +1,5 @@ -// check-pass -// revisions: v0 -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ check-pass +//@ revisions: v0 +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 fn main() {} diff --git a/tests/ui/symbol-mangling-version/unstable.rs b/tests/ui/symbol-mangling-version/unstable.rs index 42750a64574dc..d5af8542996b3 100644 --- a/tests/ui/symbol-mangling-version/unstable.rs +++ b/tests/ui/symbol-mangling-version/unstable.rs @@ -1,9 +1,9 @@ -// revisions: legacy legacy-ok hashed hashed-ok -// [legacy] compile-flags: -Csymbol-mangling-version=legacy -// [legacy-ok] check-pass -// [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [hashed] compile-flags: -Csymbol-mangling-version=hashed -// [hashed-ok] check-pass -// [hashed-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=hashed +//@ revisions: legacy legacy-ok hashed hashed-ok +//@ [legacy] compile-flags: -Csymbol-mangling-version=legacy +//@ [legacy-ok] check-pass +//@ [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [hashed] compile-flags: -Csymbol-mangling-version=hashed +//@ [hashed-ok] check-pass +//@ [hashed-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=hashed fn main() {} diff --git a/tests/ui/symbol-names/basic.rs b/tests/ui/symbol-names/basic.rs index 65a63262810fe..dfcac21ccd6e2 100644 --- a/tests/ui/symbol-names/basic.rs +++ b/tests/ui/symbol-names/basic.rs @@ -1,7 +1,7 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/const-generics-demangling.rs b/tests/ui/symbol-names/const-generics-demangling.rs index 4a04eca67fd35..86f24f6af6ad0 100644 --- a/tests/ui/symbol-names/const-generics-demangling.rs +++ b/tests/ui/symbol-names/const-generics-demangling.rs @@ -1,10 +1,10 @@ -// build-fail -// revisions: legacy v0 -// compile-flags: --crate-name=c -//[legacy]compile-flags: -C symbol-mangling-version=legacy -Z unstable-options -// [v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" -// [v0]normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" +//@ build-fail +//@ revisions: legacy v0 +//@ compile-flags: --crate-name=c +//@[legacy]compile-flags: -C symbol-mangling-version=legacy -Z unstable-options +//@ [v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ [v0]normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" #![feature(rustc_attrs)] pub struct Unsigned; diff --git a/tests/ui/symbol-names/const-generics-str-demangling.rs b/tests/ui/symbol-names/const-generics-str-demangling.rs index 619b34f2559a8..871f3694e00c5 100644 --- a/tests/ui/symbol-names/const-generics-str-demangling.rs +++ b/tests/ui/symbol-names/const-generics-str-demangling.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 --crate-name=c -// normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 --crate-name=c +//@ normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" #![feature(adt_const_params, rustc_attrs)] #![allow(incomplete_features)] diff --git a/tests/ui/symbol-names/const-generics-structural-demangling.rs b/tests/ui/symbol-names/const-generics-structural-demangling.rs index 947fddf3f31b5..6c79ed7314cf4 100644 --- a/tests/ui/symbol-names/const-generics-structural-demangling.rs +++ b/tests/ui/symbol-names/const-generics-structural-demangling.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 --crate-name=c +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 --crate-name=c -// normalize-stderr-test: "c\[[0-9a-f]+\]" -> "c[HASH]" +//@ normalize-stderr-test: "c\[[0-9a-f]+\]" -> "c[HASH]" #![feature(adt_const_params, decl_macro, rustc_attrs)] #![allow(incomplete_features)] diff --git a/tests/ui/symbol-names/const-generics.rs b/tests/ui/symbol-names/const-generics.rs index 1242126e0ccee..712c2a7249d14 100644 --- a/tests/ui/symbol-names/const-generics.rs +++ b/tests/ui/symbol-names/const-generics.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib -//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib +//@ check-pass +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib +//@[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib // `char` pub struct Char; diff --git a/tests/ui/symbol-names/foreign-types.rs b/tests/ui/symbol-names/foreign-types.rs index 8f5b07769caff..2a9aadfcb83b5 100644 --- a/tests/ui/symbol-names/foreign-types.rs +++ b/tests/ui/symbol-names/foreign-types.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 #![feature(extern_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/impl1.rs b/tests/ui/symbol-names/impl1.rs index 629c2f33ddcc6..fa4be88f68ffa 100644 --- a/tests/ui/symbol-names/impl1.rs +++ b/tests/ui/symbol-names/impl1.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> ")" +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> ")" #![feature(auto_traits, rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/symbol-names/impl2.rs b/tests/ui/symbol-names/impl2.rs index 81aba403d0ba2..8d103fab43ba8 100644 --- a/tests/ui/symbol-names/impl2.rs +++ b/tests/ui/symbol-names/impl2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/symbol-names/issue-53912.rs b/tests/ui/symbol-names/issue-53912.rs index 65b6825a83254..194416cdb70c9 100644 --- a/tests/ui/symbol-names/issue-53912.rs +++ b/tests/ui/symbol-names/issue-53912.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // This test is the same code as in ui/symbol-names/issue-60925.rs but this checks that the // reproduction compiles successfully and doesn't segfault, whereas that test just checks that the diff --git a/tests/ui/symbol-names/issue-60925.rs b/tests/ui/symbol-names/issue-60925.rs index ab0a3a7df1d15..9f1f007a0facf 100644 --- a/tests/ui/symbol-names/issue-60925.rs +++ b/tests/ui/symbol-names/issue-60925.rs @@ -1,7 +1,7 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/issue-75326.rs b/tests/ui/symbol-names/issue-75326.rs index 4a1f5a21263dd..a6aef3ddd7dff 100644 --- a/tests/ui/symbol-names/issue-75326.rs +++ b/tests/ui/symbol-names/issue-75326.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy -//[v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[\w{16}]+" -> "SYMBOL_HASH" +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy +//@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[\w{16}]+" -> "SYMBOL_HASH" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/issue-76365.rs b/tests/ui/symbol-names/issue-76365.rs index 932057b659081..f23ff2eff04ca 100644 --- a/tests/ui/symbol-names/issue-76365.rs +++ b/tests/ui/symbol-names/issue-76365.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib -//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib +//@ check-pass +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib +//@[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib pub struct Bar; diff --git a/tests/ui/symbol-names/trait-objects.rs b/tests/ui/symbol-names/trait-objects.rs index 5bcbc08413fe1..d3fa40d1f391a 100644 --- a/tests/ui/symbol-names/trait-objects.rs +++ b/tests/ui/symbol-names/trait-objects.rs @@ -1,9 +1,9 @@ // Ensure that trait objects don't include more than one binder. See #83611 -// build-fail -// revisions: v0 -//[v0]compile-flags: -C symbol-mangling-version=v0 -//[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" +//@ build-fail +//@ revisions: v0 +//@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/types.rs b/tests/ui/symbol-names/types.rs index 475e8d89abff6..b121408c843b5 100644 --- a/tests/ui/symbol-names/types.rs +++ b/tests/ui/symbol-names/types.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy verbose-legacy -// compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options -//[verbose-legacy]compile-flags: -Zverbose-internals -// normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ build-fail +//@ revisions: legacy verbose-legacy +//@ compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options +//@[verbose-legacy]compile-flags: -Zverbose-internals +//@ normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" #![feature(never_type)] #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/verbose.rs b/tests/ui/symbol-names/verbose.rs index 2aa43e8762741..7aee558a4b6b4 100644 --- a/tests/ui/symbol-names/verbose.rs +++ b/tests/ui/symbol-names/verbose.rs @@ -3,8 +3,8 @@ // with a different value of the flag (for symbols involving generic // arguments equal to defaults of their respective parameters). // -// build-pass -// compile-flags: -Zverbose-internals +//@ build-pass +//@ compile-flags: -Zverbose-internals pub fn error(msg: String) -> Box { msg.into() diff --git a/tests/ui/symbol-names/x86-stdcall.rs b/tests/ui/symbol-names/x86-stdcall.rs index 43c086dc6bc18..2375e3e2f70aa 100644 --- a/tests/ui/symbol-names/x86-stdcall.rs +++ b/tests/ui/symbol-names/x86-stdcall.rs @@ -1,7 +1,8 @@ -// build-pass -// only-x86 -// only-windows -// ignore-gnu - vectorcall is not supported by GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89485 +// ignore-tidy-linelength +//@ build-pass +//@ only-x86 +//@ only-windows +//@ ignore-gnu - vectorcall is not supported by GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89485 #![crate_type = "cdylib"] #![feature(abi_vectorcall)] diff --git a/tests/ui/syntax-extension-minor.rs b/tests/ui/syntax-extension-minor.rs index 2d6710af39270..cdd572b50fcce 100644 --- a/tests/ui/syntax-extension-minor.rs +++ b/tests/ui/syntax-extension-minor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(concat_idents)] diff --git a/tests/ui/tag-variant-cast-non-nullary.fixed b/tests/ui/tag-variant-cast-non-nullary.fixed index 53e68c2ac6af6..7e22116b955db 100644 --- a/tests/ui/tag-variant-cast-non-nullary.fixed +++ b/tests/ui/tag-variant-cast-non-nullary.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] enum NonNullary { Nullary, diff --git a/tests/ui/tag-variant-cast-non-nullary.rs b/tests/ui/tag-variant-cast-non-nullary.rs index 0d0c6188ad114..1a64cf1933de6 100644 --- a/tests/ui/tag-variant-cast-non-nullary.rs +++ b/tests/ui/tag-variant-cast-non-nullary.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] enum NonNullary { Nullary, diff --git a/tests/ui/tail-call-arg-leak.rs b/tests/ui/tail-call-arg-leak.rs index a60944b632d29..003fb212fcb7a 100644 --- a/tests/ui/tail-call-arg-leak.rs +++ b/tests/ui/tail-call-arg-leak.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // use of tail calls causes arg slot leaks, issue #160. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } } diff --git a/tests/ui/tail-cps.rs b/tests/ui/tail-cps.rs index f186683ea6680..6305e9ecdbcf1 100644 --- a/tests/ui/tail-cps.rs +++ b/tests/ui/tail-cps.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn checktrue(rs: bool) -> bool { assert!((rs)); return true; } diff --git a/tests/ui/tail-typeck.rs b/tests/ui/tail-typeck.rs index 37a7694c8fa71..feef58a338861 100644 --- a/tests/ui/tail-typeck.rs +++ b/tests/ui/tail-typeck.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn f() -> isize { return g(); } diff --git a/tests/ui/target-feature/aarch64-neon-works.rs b/tests/ui/target-feature/aarch64-neon-works.rs index 3878806fd0270..51fc11b2f0ef5 100644 --- a/tests/ui/target-feature/aarch64-neon-works.rs +++ b/tests/ui/target-feature/aarch64-neon-works.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// run-pass +//@ only-aarch64 +//@ run-pass #![allow(dead_code)] use std::arch::*; use std::arch::aarch64::*; diff --git a/tests/ui/target-feature/feature-hierarchy.rs b/tests/ui/target-feature/feature-hierarchy.rs index 5fbd5e8a28d94..4cf9112810ccb 100644 --- a/tests/ui/target-feature/feature-hierarchy.rs +++ b/tests/ui/target-feature/feature-hierarchy.rs @@ -1,9 +1,9 @@ -// revisions: aarch64-neon aarch64-sve2 -// [aarch64-neon] compile-flags: -Ctarget-feature=+neon --target=aarch64-unknown-linux-gnu -// [aarch64-neon] needs-llvm-components: aarch64 -// [aarch64-sve2] compile-flags: -Ctarget-feature=-neon,+sve2 --target=aarch64-unknown-linux-gnu -// [aarch64-sve2] needs-llvm-components: aarch64 -// build-pass +//@ revisions: aarch64-neon aarch64-sve2 +//@ [aarch64-neon] compile-flags: -Ctarget-feature=+neon --target=aarch64-unknown-linux-gnu +//@ [aarch64-neon] needs-llvm-components: aarch64 +//@ [aarch64-sve2] compile-flags: -Ctarget-feature=-neon,+sve2 --target=aarch64-unknown-linux-gnu +//@ [aarch64-sve2] needs-llvm-components: aarch64 +//@ build-pass #![no_core] #![crate_type = "rlib"] #![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api)] diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs index d6a191d7850b7..af47e84672ff3 100644 --- a/tests/ui/target-feature/gate.rs +++ b/tests/ui/target-feature/gate.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 // // gate-test-sse4a_target_feature // gate-test-powerpc_target_feature diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs index 7c5941f5bae86..2f951c4a00a9e 100644 --- a/tests/ui/target-feature/invalid-attribute.rs +++ b/tests/ui/target-feature/invalid-attribute.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![warn(unused_attributes)] diff --git a/tests/ui/target-feature/missing-plusminus-2.rs b/tests/ui/target-feature/missing-plusminus-2.rs index 1316872890279..19f4bc6e72440 100644 --- a/tests/ui/target-feature/missing-plusminus-2.rs +++ b/tests/ui/target-feature/missing-plusminus-2.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=rdrand --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=rdrand --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/missing-plusminus.rs b/tests/ui/target-feature/missing-plusminus.rs index efee659292342..eb3e93c2ef7fc 100644 --- a/tests/ui/target-feature/missing-plusminus.rs +++ b/tests/ui/target-feature/missing-plusminus.rs @@ -1,2 +1,2 @@ -// compile-flags: -Ctarget-feature=banana --crate-type=rlib -// build-pass +//@ compile-flags: -Ctarget-feature=banana --crate-type=rlib +//@ build-pass diff --git a/tests/ui/target-feature/no-llvm-leaks.rs b/tests/ui/target-feature/no-llvm-leaks.rs index 5a71b2166c3ae..b4a391e184e82 100644 --- a/tests/ui/target-feature/no-llvm-leaks.rs +++ b/tests/ui/target-feature/no-llvm-leaks.rs @@ -1,9 +1,9 @@ -// revisions: aarch64 x86-64 -// [aarch64] compile-flags: -Ctarget-feature=+neon,+fp16,+fhm --target=aarch64-unknown-linux-gnu -// [aarch64] needs-llvm-components: aarch64 -// [x86-64] compile-flags: -Ctarget-feature=+sse4.2,+rdrand --target=x86_64-unknown-linux-gnu -// [x86-64] needs-llvm-components: x86 -// build-pass +//@ revisions: aarch64 x86-64 +//@ [aarch64] compile-flags: -Ctarget-feature=+neon,+fp16,+fhm --target=aarch64-unknown-linux-gnu +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86-64] compile-flags: -Ctarget-feature=+sse4.2,+rdrand --target=x86_64-unknown-linux-gnu +//@ [x86-64] needs-llvm-components: x86 +//@ build-pass #![no_core] #![crate_type = "rlib"] #![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api)] diff --git a/tests/ui/target-feature/rust-specific-name-no-warnings.rs b/tests/ui/target-feature/rust-specific-name-no-warnings.rs index 1708a71a9812f..877d1b7d882e3 100644 --- a/tests/ui/target-feature/rust-specific-name-no-warnings.rs +++ b/tests/ui/target-feature/rust-specific-name-no-warnings.rs @@ -1,5 +1,5 @@ -// build-pass -// only-x86 -// compile-flags: -C target-feature=+pclmulqdq +//@ build-pass +//@ only-x86 +//@ compile-flags: -C target-feature=+pclmulqdq fn main() {} diff --git a/tests/ui/target-feature/similar-feature-suggestion.rs b/tests/ui/target-feature/similar-feature-suggestion.rs index 4e4e2160cac57..242d472b794e3 100644 --- a/tests/ui/target-feature/similar-feature-suggestion.rs +++ b/tests/ui/target-feature/similar-feature-suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=+rdrnd --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=+rdrnd --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/tied-features-cli.rs b/tests/ui/target-feature/tied-features-cli.rs index 72b7e3da5309d..1168245461fd0 100644 --- a/tests/ui/target-feature/tied-features-cli.rs +++ b/tests/ui/target-feature/tied-features-cli.rs @@ -1,16 +1,16 @@ -// revisions: one two three -// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ revisions: one two three +//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 // // -// [one] check-fail -// [one] compile-flags: -C target-feature=+paca -// [two] check-fail -// [two] compile-flags: -C target-feature=-pacg,+pacg -// [three] check-fail -// [three] compile-flags: -C target-feature=+paca,+pacg,-paca -// [four] build-pass -// [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca +//@ [one] check-fail +//@ [one] compile-flags: -C target-feature=+paca +//@ [two] check-fail +//@ [two] compile-flags: -C target-feature=-pacg,+pacg +//@ [three] check-fail +//@ [three] compile-flags: -C target-feature=+paca,+pacg,-paca +//@ [four] build-pass +//@ [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/target-feature/tied-features.rs b/tests/ui/target-feature/tied-features.rs index 15f01505eba8f..e36649d8eb1a9 100644 --- a/tests/ui/target-feature/tied-features.rs +++ b/tests/ui/target-feature/tied-features.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ build-fail +//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/target-feature/unstable-feature.rs b/tests/ui/target-feature/unstable-feature.rs index bd0d72938f4da..c74c5ad5d7798 100644 --- a/tests/ui/target-feature/unstable-feature.rs +++ b/tests/ui/target-feature/unstable-feature.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=+vaes --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=+vaes --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/wasm-safe.rs b/tests/ui/target-feature/wasm-safe.rs index 4b868684a5206..32838477608e4 100644 --- a/tests/ui/target-feature/wasm-safe.rs +++ b/tests/ui/target-feature/wasm-safe.rs @@ -1,5 +1,5 @@ -// only-wasm32 -// check-pass +//@ only-wasm32 +//@ check-pass #![feature(wasm_target_feature)] #![allow(dead_code)] diff --git a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs index 2bb133e8bfd42..8c20d464139e3 100644 --- a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs +++ b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![feature(custom_test_frameworks)] #![deny(unnameable_test_items)] diff --git a/tests/ui/test-attrs/decl-macro-test.rs b/tests/ui/test-attrs/decl-macro-test.rs index fcbe9f49e5564..8418b010c5b92 100644 --- a/tests/ui/test-attrs/decl-macro-test.rs +++ b/tests/ui/test-attrs/decl-macro-test.rs @@ -1,7 +1,7 @@ // Check that declarative macros can declare tests -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #![feature(decl_macro)] diff --git a/tests/ui/test-attrs/inaccessible-test-modules.rs b/tests/ui/test-attrs/inaccessible-test-modules.rs index f5b3479379480..c9237bf2d4d09 100644 --- a/tests/ui/test-attrs/inaccessible-test-modules.rs +++ b/tests/ui/test-attrs/inaccessible-test-modules.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // the `--test` harness creates modules with these textual names, but // they should be inaccessible from normal code. diff --git a/tests/ui/test-attrs/issue-109816.rs b/tests/ui/test-attrs/issue-109816.rs index 21fe5bc53b757..3cabf451c6635 100644 --- a/tests/ui/test-attrs/issue-109816.rs +++ b/tests/ui/test-attrs/issue-109816.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test fn align_offset_weird_strides() { #[test] diff --git a/tests/ui/test-attrs/issue-12997-1.rs b/tests/ui/test-attrs/issue-12997-1.rs index 9f808dac36278..a26a65d8d4403 100644 --- a/tests/ui/test-attrs/issue-12997-1.rs +++ b/tests/ui/test-attrs/issue-12997-1.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test //! Test that makes sure wrongly-typed bench functions aren't ignored diff --git a/tests/ui/test-attrs/issue-12997-2.rs b/tests/ui/test-attrs/issue-12997-2.rs index 9df965315ab38..d2a4202d7bdd3 100644 --- a/tests/ui/test-attrs/issue-12997-2.rs +++ b/tests/ui/test-attrs/issue-12997-2.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test //! Test that makes sure wrongly-typed bench functions are rejected diff --git a/tests/ui/test-attrs/issue-16597-empty.rs b/tests/ui/test-attrs/issue-16597-empty.rs index 2bdd08575c416..64b44f60e80dd 100644 --- a/tests/ui/test-attrs/issue-16597-empty.rs +++ b/tests/ui/test-attrs/issue-16597-empty.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test // This verifies that the test generation doesn't crash when we have // no tests - for more information, see PR #16892. diff --git a/tests/ui/test-attrs/issue-16597.rs b/tests/ui/test-attrs/issue-16597.rs index 35769bfc11773..28cea142882c2 100644 --- a/tests/ui/test-attrs/issue-16597.rs +++ b/tests/ui/test-attrs/issue-16597.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// compile-flags:--test +//@ compile-flags:--test mod tests { use super::*; diff --git a/tests/ui/test-attrs/issue-20823.rs b/tests/ui/test-attrs/issue-20823.rs index 9e209d5d33a68..a5a924786074e 100644 --- a/tests/ui/test-attrs/issue-20823.rs +++ b/tests/ui/test-attrs/issue-20823.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #[test] pub fn foo() {} diff --git a/tests/ui/test-attrs/issue-34932.rs b/tests/ui/test-attrs/issue-34932.rs index ab568fd01efc5..feb6556b60a12 100644 --- a/tests/ui/test-attrs/issue-34932.rs +++ b/tests/ui/test-attrs/issue-34932.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![cfg(any())] // This test should be configured away #![feature(rustc_attrs)] // Test that this is allowed on stable/beta #![feature(iter_arith_traits)] // Test that this is not unused diff --git a/tests/ui/test-attrs/issue-36768.rs b/tests/ui/test-attrs/issue-36768.rs index 7531f3621f50f..aca012f4af09c 100644 --- a/tests/ui/test-attrs/issue-36768.rs +++ b/tests/ui/test-attrs/issue-36768.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![deny(private_interfaces)] #[test] fn foo() {} diff --git a/tests/ui/test-attrs/issue-52557.rs b/tests/ui/test-attrs/issue-52557.rs index 09f7a8c513125..02e95669d32aa 100644 --- a/tests/ui/test-attrs/issue-52557.rs +++ b/tests/ui/test-attrs/issue-52557.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This test checks for namespace pollution by private tests. // Tests used to marked as public causing name conflicts with normal // functions only in test builds. -// compile-flags: --test +//@ compile-flags: --test mod a { pub fn foo() -> bool { diff --git a/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs b/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs index e573038980d95..06b9270cc333b 100644 --- a/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs +++ b/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs @@ -1,8 +1,8 @@ // rust-lang/rust#53675: At one point the compiler errored when a test // named `panic` used the `assert!` macro in expression position. -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test mod in_expression_position { #[test] diff --git a/tests/ui/test-attrs/run-unexported-tests.rs b/tests/ui/test-attrs/run-unexported-tests.rs index f533a3ef885d6..fc73eb519d21f 100644 --- a/tests/ui/test-attrs/run-unexported-tests.rs +++ b/tests/ui/test-attrs/run-unexported-tests.rs @@ -1,6 +1,6 @@ -// run-fail -// compile-flags:--test -// check-stdout +//@ run-fail +//@ compile-flags:--test +//@ check-stdout mod m { pub fn exported() {} diff --git a/tests/ui/test-attrs/test-attr-non-associated-functions.rs b/tests/ui/test-attrs/test-attr-non-associated-functions.rs index 2481919b616ed..1a4dfda090970 100644 --- a/tests/ui/test-attrs/test-attr-non-associated-functions.rs +++ b/tests/ui/test-attrs/test-attr-non-associated-functions.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test struct A {} diff --git a/tests/ui/test-attrs/test-cant-be-shadowed.rs b/tests/ui/test-attrs/test-cant-be-shadowed.rs index 831372d4506b3..ff47b1de177c0 100644 --- a/tests/ui/test-attrs/test-cant-be-shadowed.rs +++ b/tests/ui/test-attrs/test-cant-be-shadowed.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:test_macro.rs -// compile-flags:--test +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:test_macro.rs +//@ compile-flags:--test #[macro_use] extern crate test_macro; diff --git a/tests/ui/test-attrs/test-filter-multiple.rs b/tests/ui/test-attrs/test-filter-multiple.rs index 04dd83b7fd0f7..0347ce457ae66 100644 --- a/tests/ui/test-attrs/test-filter-multiple.rs +++ b/tests/ui/test-attrs/test-filter-multiple.rs @@ -1,9 +1,9 @@ -// run-pass -// compile-flags: --test -// run-flags: --test-threads=1 test1 test2 -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support +//@ run-pass +//@ compile-flags: --test +//@ run-flags: --test-threads=1 test1 test2 +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support #[test] fn test1() {} diff --git a/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs b/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs index 02fee1a00da6d..423b5c03b4660 100644 --- a/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs +++ b/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-fuchsia Test must be run out-of-process +//@ run-pass +//@ ignore-fuchsia Test must be run out-of-process #![feature(test)] -// compile-flags: --test +//@ compile-flags: --test extern crate test; #[bench] diff --git a/tests/ui/test-attrs/test-function-signature.rs b/tests/ui/test-attrs/test-function-signature.rs index 9e86e9209e320..0f43245be6f61 100644 --- a/tests/ui/test-attrs/test-function-signature.rs +++ b/tests/ui/test-attrs/test-function-signature.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #[test] fn foo() -> Result<(), ()> { diff --git a/tests/ui/test-attrs/test-main-not-dead-attr.rs b/tests/ui/test-attrs/test-main-not-dead-attr.rs index 0b2a9a3541b39..1bed915a1b6af 100644 --- a/tests/ui/test-attrs/test-main-not-dead-attr.rs +++ b/tests/ui/test-attrs/test-main-not-dead-attr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(rustc_attrs)] diff --git a/tests/ui/test-attrs/test-main-not-dead.rs b/tests/ui/test-attrs/test-main-not-dead.rs index 30a9c85e3d2ab..c90dbddb83b86 100644 --- a/tests/ui/test-attrs/test-main-not-dead.rs +++ b/tests/ui/test-attrs/test-main-not-dead.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/test-attrs/test-on-not-fn.rs b/tests/ui/test-attrs/test-on-not-fn.rs index a460480afb157..deba26f24ca71 100644 --- a/tests/ui/test-attrs/test-on-not-fn.rs +++ b/tests/ui/test-attrs/test-on-not-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #[test] //~ ERROR: the `#[test]` attribute may only be used on a non-associated function mod test {} diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.rs b/tests/ui/test-attrs/test-panic-abort-disabled.rs index fa67a784de47f..fbe3d7d5d18d7 100644 --- a/tests/ui/test-attrs/test-panic-abort-disabled.rs +++ b/tests/ui/test-attrs/test-panic-abort-disabled.rs @@ -1,11 +1,11 @@ -// error-pattern:building tests with panic=abort is not supported -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no -// run-flags: --test-threads=1 +//@ error-pattern:building tests with panic=abort is not supported +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no +//@ run-flags: --test-threads=1 -// needs-unwind -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ needs-unwind +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.rs b/tests/ui/test-attrs/test-panic-abort-nocapture.rs index c7415818e10f5..03c175a2a49ff 100644 --- a/tests/ui/test-attrs/test-panic-abort-nocapture.rs +++ b/tests/ui/test-attrs/test-panic-abort-nocapture.rs @@ -1,15 +1,15 @@ -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic_abort_tests -// run-flags: --test-threads=1 --nocapture -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic_abort_tests +//@ run-flags: --test-threads=1 --nocapture +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-android #120567 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support +//@ ignore-android #120567 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort.rs b/tests/ui/test-attrs/test-panic-abort.rs index d80e2435614dc..77efaf05bbc0d 100644 --- a/tests/ui/test-attrs/test-panic-abort.rs +++ b/tests/ui/test-attrs/test-panic-abort.rs @@ -1,15 +1,15 @@ -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic_abort_tests -// run-flags: --test-threads=1 -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -// ignore-android #120567 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic_abort_tests +//@ run-flags: --test-threads=1 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + +//@ ignore-android #120567 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support #![cfg(test)] #![feature(test)] diff --git a/tests/ui/test-attrs/test-panic-while-printing.rs b/tests/ui/test-attrs/test-panic-while-printing.rs index 033c8beb475df..a50a15fbe5af5 100644 --- a/tests/ui/test-attrs/test-panic-while-printing.rs +++ b/tests/ui/test-attrs/test-panic-while-printing.rs @@ -1,6 +1,6 @@ -// compile-flags:--test -// run-pass -// needs-unwind +//@ compile-flags:--test +//@ run-pass +//@ needs-unwind use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/tests/ui/test-attrs/test-passed-wasm.rs b/tests/ui/test-attrs/test-passed-wasm.rs index 578aa4b1760c4..614678e2353c5 100644 --- a/tests/ui/test-attrs/test-passed-wasm.rs +++ b/tests/ui/test-attrs/test-passed-wasm.rs @@ -1,9 +1,9 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --test-threads=1 -// run-pass -// check-run-results -// only-wasm32 +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --test-threads=1 +//@ run-pass +//@ check-run-results +//@ only-wasm32 // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-passed.rs b/tests/ui/test-attrs/test-passed.rs index f65f0003022a1..afd715322ac4b 100644 --- a/tests/ui/test-attrs/test-passed.rs +++ b/tests/ui/test-attrs/test-passed.rs @@ -1,10 +1,10 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --test-threads=1 -// run-pass -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-wasm32 no support for `Instant` +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --test-threads=1 +//@ run-pass +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-wasm32 no support for `Instant` // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-runner-hides-buried-main.rs b/tests/ui/test-attrs/test-runner-hides-buried-main.rs index 346aa868eb467..ef4ef69c66157 100644 --- a/tests/ui/test-attrs/test-runner-hides-buried-main.rs +++ b/tests/ui/test-attrs/test-runner-hides-buried-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(rustc_attrs)] diff --git a/tests/ui/test-attrs/test-runner-hides-main.rs b/tests/ui/test-attrs/test-runner-hides-main.rs index 0de1d64f0fcc7..811f16940e725 100644 --- a/tests/ui/test-attrs/test-runner-hides-main.rs +++ b/tests/ui/test-attrs/test-runner-hides-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test // Building as a test runner means that a synthetic main will be run, // not ours pub fn main() { panic!(); } diff --git a/tests/ui/test-attrs/test-runner-hides-start.rs b/tests/ui/test-attrs/test-runner-hides-start.rs index 56212bb6f4b73..444ac237cfa3a 100644 --- a/tests/ui/test-attrs/test-runner-hides-start.rs +++ b/tests/ui/test-attrs/test-runner-hides-start.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(start)] diff --git a/tests/ui/test-attrs/test-should-fail-good-message.rs b/tests/ui/test-attrs/test-should-fail-good-message.rs index 83519c4524a62..bf277a343de2f 100644 --- a/tests/ui/test-attrs/test-should-fail-good-message.rs +++ b/tests/ui/test-attrs/test-should-fail-good-message.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: --test +//@ run-pass +//@ needs-unwind +//@ compile-flags: --test #[test] #[should_panic(expected = "foo")] pub fn test_foo() { diff --git a/tests/ui/test-attrs/test-should-panic-attr.rs b/tests/ui/test-attrs/test-should-panic-attr.rs index b71878406d764..df2893b63edbc 100644 --- a/tests/ui/test-attrs/test-should-panic-attr.rs +++ b/tests/ui/test-attrs/test-should-panic-attr.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #[test] #[should_panic = "foo"] diff --git a/tests/ui/test-attrs/test-thread-capture.rs b/tests/ui/test-attrs/test-thread-capture.rs index 53acca34133a4..d770964125fba 100644 --- a/tests/ui/test-attrs/test-thread-capture.rs +++ b/tests/ui/test-attrs/test-thread-capture.rs @@ -1,11 +1,11 @@ -// compile-flags: --test -// run-fail -// run-flags: --test-threads=1 -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// needs-unwind +//@ compile-flags: --test +//@ run-fail +//@ run-flags: --test-threads=1 +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ needs-unwind #[test] fn thready_pass() { diff --git a/tests/ui/test-attrs/test-thread-nocapture.rs b/tests/ui/test-attrs/test-thread-nocapture.rs index 2b57eb8aae19d..58e5f7e33cb75 100644 --- a/tests/ui/test-attrs/test-thread-nocapture.rs +++ b/tests/ui/test-attrs/test-thread-nocapture.rs @@ -1,11 +1,11 @@ -// compile-flags: --test -// run-fail -// run-flags: --test-threads=1 --nocapture -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// needs-unwind +//@ compile-flags: --test +//@ run-fail +//@ run-flags: --test-threads=1 --nocapture +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ needs-unwind #[test] fn thready_pass() { diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index d6d44a6b4461b..8f75ff309e0ea 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -1,9 +1,9 @@ -// compile-flags: --test -Zpanic-abort-tests -// run-flags: --test-threads=1 -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// run-pass +//@ compile-flags: --test -Zpanic-abort-tests +//@ run-flags: --test-threads=1 +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ run-pass #[test] fn test_ok() { diff --git a/tests/ui/test-attrs/test-vs-cfg-test.rs b/tests/ui/test-attrs/test-vs-cfg-test.rs index cd1cd33c2840b..d7d9e61103c9a 100644 --- a/tests/ui/test-attrs/test-vs-cfg-test.rs +++ b/tests/ui/test-attrs/test-vs-cfg-test.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg test +//@ run-pass +//@ compile-flags: --cfg test // Make sure `--cfg test` does not inject test harness diff --git a/tests/ui/test-attrs/test-warns-dead-code.rs b/tests/ui/test-attrs/test-warns-dead-code.rs index 4190885b6b214..faa7306eee5e1 100644 --- a/tests/ui/test-attrs/test-warns-dead-code.rs +++ b/tests/ui/test-attrs/test-warns-dead-code.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/test-attrs/tests-listing-format-default.rs b/tests/ui/test-attrs/tests-listing-format-default.rs index d5df4b57b0591..86e871448b93f 100644 --- a/tests/ui/test-attrs/tests-listing-format-default.rs +++ b/tests/ui/test-attrs/tests-listing-format-default.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list -// run-pass -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list +//@ run-pass +//@ check-run-results // Checks the listing of tests with no --format arguments. diff --git a/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs b/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs index 5247f1f8f1746..7512e54650427 100644 --- a/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs +++ b/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -// run-fail -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json +//@ run-fail +//@ check-run-results // Checks that --format json does not work without -Zunstable-options. diff --git a/tests/ui/test-attrs/tests-listing-format-json.rs b/tests/ui/test-attrs/tests-listing-format-json.rs index 5afc2746fe4e0..b735a82c16625 100644 --- a/tests/ui/test-attrs/tests-listing-format-json.rs +++ b/tests/ui/test-attrs/tests-listing-format-json.rs @@ -1,11 +1,11 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -Zunstable-options -// run-pass -// check-run-results -// only-nightly -// normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/" -// normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/" +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json -Zunstable-options +//@ run-pass +//@ check-run-results +//@ only-nightly +//@ normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/" +//@ normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/" // Checks the listing of tests with --format json. diff --git a/tests/ui/test-attrs/tests-listing-format-terse.rs b/tests/ui/test-attrs/tests-listing-format-terse.rs index 7835f71759cb4..b8e7b12b28427 100644 --- a/tests/ui/test-attrs/tests-listing-format-terse.rs +++ b/tests/ui/test-attrs/tests-listing-format-terse.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format terse -// run-pass -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format terse +//@ run-pass +//@ check-run-results // Checks the listing of tests with --format terse. diff --git a/tests/ui/thir-print/thir-flat-const-variant.rs b/tests/ui/thir-print/thir-flat-const-variant.rs index 2cd87a5cbb2af..02a353c44353e 100644 --- a/tests/ui/thir-print/thir-flat-const-variant.rs +++ b/tests/ui/thir-print/thir-flat-const-variant.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z unpretty=thir-flat -// check-pass +//@ compile-flags: -Z unpretty=thir-flat +//@ check-pass // Previously, the constants with `Self::Bar(())` would be `Call`s instead of // `Adt`s in THIR. diff --git a/tests/ui/thir-print/thir-flat.rs b/tests/ui/thir-print/thir-flat.rs index 8fa95ce62b5ef..dc0e45e5a1c55 100644 --- a/tests/ui/thir-print/thir-flat.rs +++ b/tests/ui/thir-print/thir-flat.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-flat -// check-pass +//@ compile-flags: -Z unpretty=thir-flat +//@ check-pass pub fn main() {} diff --git a/tests/ui/thir-print/thir-tree-match.rs b/tests/ui/thir-print/thir-tree-match.rs index a5511ec95437f..c62463b45f479 100644 --- a/tests/ui/thir-print/thir-tree-match.rs +++ b/tests/ui/thir-print/thir-tree-match.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zunpretty=thir-tree +//@ check-pass +//@ compile-flags: -Zunpretty=thir-tree enum Bar { First, diff --git a/tests/ui/thir-print/thir-tree.rs b/tests/ui/thir-print/thir-tree.rs index 32df7905adbad..7f9880cc4e9c5 100644 --- a/tests/ui/thir-print/thir-tree.rs +++ b/tests/ui/thir-print/thir-tree.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-tree -// check-pass +//@ compile-flags: -Z unpretty=thir-tree +//@ check-pass pub fn main() {} diff --git a/tests/ui/thread-local/auxiliary/tls-rlib.rs b/tests/ui/thread-local/auxiliary/tls-rlib.rs index 20bc998ec11d8..42bbfc46154c6 100644 --- a/tests/ui/thread-local/auxiliary/tls-rlib.rs +++ b/tests/ui/thread-local/auxiliary/tls-rlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![feature(thread_local)] diff --git a/tests/ui/thread-local/name-collision.rs b/tests/ui/thread-local/name-collision.rs index dcff9183ad95a..fba7b680679b3 100644 --- a/tests/ui/thread-local/name-collision.rs +++ b/tests/ui/thread-local/name-collision.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[allow(non_camel_case_types)] struct u8; diff --git a/tests/ui/thread-local/thread-local-issue-37508.rs b/tests/ui/thread-local/thread-local-issue-37508.rs index 219108c77f7e8..db430a3229c7b 100644 --- a/tests/ui/thread-local/thread-local-issue-37508.rs +++ b/tests/ui/thread-local/thread-local-issue-37508.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// compile-flags: -Ccode-model=large --crate-type lib -// build-pass +//@ only-x86_64 +//@ compile-flags: -Ccode-model=large --crate-type lib +//@ build-pass // // Regression test for issue #37508 diff --git a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs index c282e2185bca2..094ce2994b895 100644 --- a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs +++ b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs @@ -1,6 +1,6 @@ -// check-pass -// known-bug: #49682 -// edition:2021 +//@ check-pass +//@ known-bug: #49682 +//@ edition:2021 // Should fail. Keeping references to thread local statics can result in a // use-after-free. diff --git a/tests/ui/thread-local/thread-local-static.rs b/tests/ui/thread-local/thread-local-static.rs index a2c1954881f89..a1b72323f710b 100644 --- a/tests/ui/thread-local/thread-local-static.rs +++ b/tests/ui/thread-local/thread-local-static.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(thread_local)] #![feature(const_swap)] diff --git a/tests/ui/thread-local/tls-dylib-access.rs b/tests/ui/thread-local/tls-dylib-access.rs index 12c46113cead1..53b01674d77ad 100644 --- a/tests/ui/thread-local/tls-dylib-access.rs +++ b/tests/ui/thread-local/tls-dylib-access.rs @@ -1,6 +1,6 @@ -// aux-build: tls-rlib.rs -// aux-build: tls-export.rs -// run-pass +//@ aux-build: tls-rlib.rs +//@ aux-build: tls-export.rs +//@ run-pass #![feature(cfg_target_thread_local)] diff --git a/tests/ui/thread-local/tls.rs b/tests/ui/thread-local/tls.rs index f03bd3f991bdf..17096319d237c 100644 --- a/tests/ui/thread-local/tls.rs +++ b/tests/ui/thread-local/tls.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no threads support -// compile-flags: -O -// ignore-nto Doesn't work without emulated TLS enabled (in LLVM) +//@ run-pass +//@ ignore-emscripten no threads support +//@ compile-flags: -O +//@ ignore-nto Doesn't work without emulated TLS enabled (in LLVM) #![feature(thread_local)] diff --git a/tests/ui/threads-sendsync/child-outlives-parent.rs b/tests/ui/threads-sendsync/child-outlives-parent.rs index e3a39a44bb821..2fb4a6f637a2b 100644 --- a/tests/ui/threads-sendsync/child-outlives-parent.rs +++ b/tests/ui/threads-sendsync/child-outlives-parent.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Reported as issue #126, child leaks the string. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/clone-with-exterior.rs b/tests/ui/threads-sendsync/clone-with-exterior.rs index 9fc661b14777e..58529e4a7887c 100644 --- a/tests/ui/threads-sendsync/clone-with-exterior.rs +++ b/tests/ui/threads-sendsync/clone-with-exterior.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/comm.rs b/tests/ui/threads-sendsync/comm.rs index aa86e174d4460..589859e60a66a 100644 --- a/tests/ui/threads-sendsync/comm.rs +++ b/tests/ui/threads-sendsync/comm.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs index f5243077384ac..3ff9fb10f2419 100644 --- a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs +++ b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::cell::RefCell; use std::env; diff --git a/tests/ui/threads-sendsync/issue-24313.rs b/tests/ui/threads-sendsync/issue-24313.rs index 6694bac0dc730..17e027520c15f 100644 --- a/tests/ui/threads-sendsync/issue-24313.rs +++ b/tests/ui/threads-sendsync/issue-24313.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no threads +//@ ignore-sgx no processes use std::thread; use std::env; diff --git a/tests/ui/threads-sendsync/issue-29488.rs b/tests/ui/threads-sendsync/issue-29488.rs index 3c9a6a80dbf01..c848e7b50bb73 100644 --- a/tests/ui/threads-sendsync/issue-29488.rs +++ b/tests/ui/threads-sendsync/issue-29488.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/issue-43733-2.rs b/tests/ui/threads-sendsync/issue-43733-2.rs index e9653dbe5c222..5a9ee015cb9dd 100644 --- a/tests/ui/threads-sendsync/issue-43733-2.rs +++ b/tests/ui/threads-sendsync/issue-43733-2.rs @@ -1,5 +1,5 @@ -// ignore-wasm32 -// dont-check-compiler-stderr +//@ ignore-wasm32 +//@ dont-check-compiler-stderr #![feature(cfg_target_thread_local, thread_local_internals)] // On platforms *without* `#[thread_local]`, use diff --git a/tests/ui/threads-sendsync/issue-43733.rs b/tests/ui/threads-sendsync/issue-43733.rs index 671b45e777f84..12207f4e6aa02 100644 --- a/tests/ui/threads-sendsync/issue-43733.rs +++ b/tests/ui/threads-sendsync/issue-43733.rs @@ -1,4 +1,4 @@ -// ignore-wasm32 +//@ ignore-wasm32 #![feature(thread_local)] #![feature(cfg_target_thread_local, thread_local_internals)] diff --git a/tests/ui/threads-sendsync/issue-4446.rs b/tests/ui/threads-sendsync/issue-4446.rs index 948f2a7bdf31c..b5e3a20ccde1e 100644 --- a/tests/ui/threads-sendsync/issue-4446.rs +++ b/tests/ui/threads-sendsync/issue-4446.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::sync::mpsc::channel; use std::thread; diff --git a/tests/ui/threads-sendsync/issue-4448.rs b/tests/ui/threads-sendsync/issue-4448.rs index 27d0326891b50..0f3bf65c441f0 100644 --- a/tests/ui/threads-sendsync/issue-4448.rs +++ b/tests/ui/threads-sendsync/issue-4448.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::sync::mpsc::channel; use std::thread; diff --git a/tests/ui/threads-sendsync/issue-8827.rs b/tests/ui/threads-sendsync/issue-8827.rs index 95be7616a4f55..b7deef0f34dd1 100644 --- a/tests/ui/threads-sendsync/issue-8827.rs +++ b/tests/ui/threads-sendsync/issue-8827.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Receiver}; diff --git a/tests/ui/threads-sendsync/issue-9396.rs b/tests/ui/threads-sendsync/issue-9396.rs index 3e7e9a51cdd3a..6228f4ba706b7 100644 --- a/tests/ui/threads-sendsync/issue-9396.rs +++ b/tests/ui/threads-sendsync/issue-9396.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(deprecated)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{TryRecvError, channel}; use std::thread; diff --git a/tests/ui/threads-sendsync/mpsc_stress.rs b/tests/ui/threads-sendsync/mpsc_stress.rs index c2e1912deb7aa..68c401512817c 100644 --- a/tests/ui/threads-sendsync/mpsc_stress.rs +++ b/tests/ui/threads-sendsync/mpsc_stress.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:--test -// ignore-emscripten +//@ run-pass +//@ compile-flags:--test +//@ ignore-emscripten use std::sync::mpsc::channel; use std::sync::mpsc::TryRecvError; diff --git a/tests/ui/threads-sendsync/send-is-not-static-par-for.rs b/tests/ui/threads-sendsync/send-is-not-static-par-for.rs index dbe4655510111..b943b0c433da7 100644 --- a/tests/ui/threads-sendsync/send-is-not-static-par-for.rs +++ b/tests/ui/threads-sendsync/send-is-not-static-par-for.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use std::thread; use std::sync::Mutex; diff --git a/tests/ui/threads-sendsync/send-resource.rs b/tests/ui/threads-sendsync/send-resource.rs index 023a84d6b6ec0..32910c5f7d177 100644 --- a/tests/ui/threads-sendsync/send-resource.rs +++ b/tests/ui/threads-sendsync/send-resource.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/send-type-inference.rs b/tests/ui/threads-sendsync/send-type-inference.rs index 0d9af7512b466..287b3d567aec8 100644 --- a/tests/ui/threads-sendsync/send-type-inference.rs +++ b/tests/ui/threads-sendsync/send-type-inference.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/send_str_hashmap.rs b/tests/ui/threads-sendsync/send_str_hashmap.rs index 7d4cca8ad746b..9cbb0bed4473f 100644 --- a/tests/ui/threads-sendsync/send_str_hashmap.rs +++ b/tests/ui/threads-sendsync/send_str_hashmap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::borrow::Cow; diff --git a/tests/ui/threads-sendsync/send_str_treemap.rs b/tests/ui/threads-sendsync/send_str_treemap.rs index 4d46317459052..cc1f560f69b2f 100644 --- a/tests/ui/threads-sendsync/send_str_treemap.rs +++ b/tests/ui/threads-sendsync/send_str_treemap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::BTreeMap; use std::borrow::Cow; diff --git a/tests/ui/threads-sendsync/sendable-class.rs b/tests/ui/threads-sendsync/sendable-class.rs index 7facf245bde42..3ee1b60a04a99 100644 --- a/tests/ui/threads-sendsync/sendable-class.rs +++ b/tests/ui/threads-sendsync/sendable-class.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_variables)] @@ -6,7 +6,7 @@ // Test that a class with only sendable fields can be sent -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/sendfn-is-a-block.rs b/tests/ui/threads-sendsync/sendfn-is-a-block.rs index 62807d8941af1..f01b440424aaf 100644 --- a/tests/ui/threads-sendsync/sendfn-is-a-block.rs +++ b/tests/ui/threads-sendsync/sendfn-is-a-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(f: F) -> usize where F: FnOnce(usize) -> usize { diff --git a/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs b/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs index 1e598b9e70971..5306d69a7d2cc 100644 --- a/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs +++ b/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn-fn.rs b/tests/ui/threads-sendsync/spawn-fn.rs index 1243bb2579f88..863c22f70d6be 100644 --- a/tests/ui/threads-sendsync/spawn-fn.rs +++ b/tests/ui/threads-sendsync/spawn-fn.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn-types.rs b/tests/ui/threads-sendsync/spawn-types.rs index 1bead6e1bb14f..9c1b6550d9b1e 100644 --- a/tests/ui/threads-sendsync/spawn-types.rs +++ b/tests/ui/threads-sendsync/spawn-types.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support /* Make sure we can spawn tasks that take different types of diff --git a/tests/ui/threads-sendsync/spawn.rs b/tests/ui/threads-sendsync/spawn.rs index b1dcc9417fb07..2c06fc2837f34 100644 --- a/tests/ui/threads-sendsync/spawn.rs +++ b/tests/ui/threads-sendsync/spawn.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn2.rs b/tests/ui/threads-sendsync/spawn2.rs index 83e066aef9625..cfe907ea6d9a3 100644 --- a/tests/ui/threads-sendsync/spawn2.rs +++ b/tests/ui/threads-sendsync/spawn2.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawning-with-debug.rs b/tests/ui/threads-sendsync/spawning-with-debug.rs index 9d3487ffb2956..58f1743527c88 100644 --- a/tests/ui/threads-sendsync/spawning-with-debug.rs +++ b/tests/ui/threads-sendsync/spawning-with-debug.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-windows -// exec-env:RUST_LOG=debug -// ignore-emscripten no threads support +//@ ignore-windows +//@ exec-env:RUST_LOG=debug +//@ ignore-emscripten no threads support // regression test for issue #10405, make sure we don't call println! too soon. diff --git a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs index bc64c8162433b..a443785a678c7 100644 --- a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs +++ b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::sync; diff --git a/tests/ui/threads-sendsync/sync-send-atomics.rs b/tests/ui/threads-sendsync/sync-send-atomics.rs index 6b260311a50a7..f64506af0a3f7 100644 --- a/tests/ui/threads-sendsync/sync-send-atomics.rs +++ b/tests/ui/threads-sendsync/sync-send-atomics.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::atomic::*; diff --git a/tests/ui/threads-sendsync/sync-send-in-std.rs b/tests/ui/threads-sendsync/sync-send-in-std.rs index 6d1fba64e4216..375e884877ab0 100644 --- a/tests/ui/threads-sendsync/sync-send-in-std.rs +++ b/tests/ui/threads-sendsync/sync-send-in-std.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// ignore-wasm32-bare networking not available -// ignore-sgx ToSocketAddrs cannot be used for DNS Resolution -// ignore-fuchsia Req. test-harness networking privileges +//@ ignore-wasm32-bare networking not available +//@ ignore-sgx ToSocketAddrs cannot be used for DNS Resolution +//@ ignore-fuchsia Req. test-harness networking privileges use std::net::ToSocketAddrs; diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs index 61f54ac4e0bdb..3b8fdb60acf5f 100644 --- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs +++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #![feature(drain, collections_bound, btree_range)] diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs index 2f6d35f01be62..4c77b5d2ad889 100644 --- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs +++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(warnings)] diff --git a/tests/ui/threads-sendsync/task-comm-0.rs b/tests/ui/threads-sendsync/task-comm-0.rs index 2b9a50e4d41b0..06ce739b8e597 100644 --- a/tests/ui/threads-sendsync/task-comm-0.rs +++ b/tests/ui/threads-sendsync/task-comm-0.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-1.rs b/tests/ui/threads-sendsync/task-comm-1.rs index 68ca62909bf93..77ca940e947b9 100644 --- a/tests/ui/threads-sendsync/task-comm-1.rs +++ b/tests/ui/threads-sendsync/task-comm-1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-10.rs b/tests/ui/threads-sendsync/task-comm-10.rs index 4cac0dc90cf9f..6f043b64a092e 100644 --- a/tests/ui/threads-sendsync/task-comm-10.rs +++ b/tests/ui/threads-sendsync/task-comm-10.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-11.rs b/tests/ui/threads-sendsync/task-comm-11.rs index 8541e143fb976..51f134344354c 100644 --- a/tests/ui/threads-sendsync/task-comm-11.rs +++ b/tests/ui/threads-sendsync/task-comm-11.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-12.rs b/tests/ui/threads-sendsync/task-comm-12.rs index 613a5cee58b31..cb1fb774f1073 100644 --- a/tests/ui/threads-sendsync/task-comm-12.rs +++ b/tests/ui/threads-sendsync/task-comm-12.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-13.rs b/tests/ui/threads-sendsync/task-comm-13.rs index 327eaaf8fa12e..6b5384e3f08a8 100644 --- a/tests/ui/threads-sendsync/task-comm-13.rs +++ b/tests/ui/threads-sendsync/task-comm-13.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-14.rs b/tests/ui/threads-sendsync/task-comm-14.rs index 88d6b090268e1..65cc750a7c39e 100644 --- a/tests/ui/threads-sendsync/task-comm-14.rs +++ b/tests/ui/threads-sendsync/task-comm-14.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-15.rs b/tests/ui/threads-sendsync/task-comm-15.rs index adb14abdce9df..844a18b61589a 100644 --- a/tests/ui/threads-sendsync/task-comm-15.rs +++ b/tests/ui/threads-sendsync/task-comm-15.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-16.rs b/tests/ui/threads-sendsync/task-comm-16.rs index d808fd9aceb3c..3b0fec11acd1b 100644 --- a/tests/ui/threads-sendsync/task-comm-16.rs +++ b/tests/ui/threads-sendsync/task-comm-16.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/threads-sendsync/task-comm-17.rs b/tests/ui/threads-sendsync/task-comm-17.rs index 7224978709371..14ef4dd3edecc 100644 --- a/tests/ui/threads-sendsync/task-comm-17.rs +++ b/tests/ui/threads-sendsync/task-comm-17.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 // Issue #922 diff --git a/tests/ui/threads-sendsync/task-comm-3.rs b/tests/ui/threads-sendsync/task-comm-3.rs index 570ae0a82ff1b..1f2a6406d79bd 100644 --- a/tests/ui/threads-sendsync/task-comm-3.rs +++ b/tests/ui/threads-sendsync/task-comm-3.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-4.rs b/tests/ui/threads-sendsync/task-comm-4.rs index b259d69d15d4b..1210cee558211 100644 --- a/tests/ui/threads-sendsync/task-comm-4.rs +++ b/tests/ui/threads-sendsync/task-comm-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-comm-5.rs b/tests/ui/threads-sendsync/task-comm-5.rs index cdedf034ac368..e07aa18c24dff 100644 --- a/tests/ui/threads-sendsync/task-comm-5.rs +++ b/tests/ui/threads-sendsync/task-comm-5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-comm-6.rs b/tests/ui/threads-sendsync/task-comm-6.rs index 990205ad33454..6a7dea63993d0 100644 --- a/tests/ui/threads-sendsync/task-comm-6.rs +++ b/tests/ui/threads-sendsync/task-comm-6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] diff --git a/tests/ui/threads-sendsync/task-comm-7.rs b/tests/ui/threads-sendsync/task-comm-7.rs index 0b9673e00338a..f6e77986e16c3 100644 --- a/tests/ui/threads-sendsync/task-comm-7.rs +++ b/tests/ui/threads-sendsync/task-comm-7.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_assignments)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-9.rs b/tests/ui/threads-sendsync/task-comm-9.rs index 5ed33012100f3..f8fe680e5e013 100644 --- a/tests/ui/threads-sendsync/task-comm-9.rs +++ b/tests/ui/threads-sendsync/task-comm-9.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-chan-nil.rs b/tests/ui/threads-sendsync/task-comm-chan-nil.rs index a93ddff43dcf3..cfbe05327a828 100644 --- a/tests/ui/threads-sendsync/task-comm-chan-nil.rs +++ b/tests/ui/threads-sendsync/task-comm-chan-nil.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-life-0.rs b/tests/ui/threads-sendsync/task-life-0.rs index 785cff9a0f304..a4652197afc7e 100644 --- a/tests/ui/threads-sendsync/task-life-0.rs +++ b/tests/ui/threads-sendsync/task-life-0.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 use std::thread; diff --git a/tests/ui/threads-sendsync/task-spawn-barefn.rs b/tests/ui/threads-sendsync/task-spawn-barefn.rs index e5b899e0af967..2c957878c95f6 100644 --- a/tests/ui/threads-sendsync/task-spawn-barefn.rs +++ b/tests/ui/threads-sendsync/task-spawn-barefn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:Ensure that the child thread runs by panicking -// ignore-emscripten Needs threads. +//@ run-fail +//@ error-pattern:Ensure that the child thread runs by panicking +//@ ignore-emscripten Needs threads. use std::thread; diff --git a/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs b/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs index a63903778026a..442955421d83e 100644 --- a/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs +++ b/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs index 68d226ffbaee3..0f215a2b763ac 100644 --- a/tests/ui/threads-sendsync/task-stderr.rs +++ b/tests/ui/threads-sendsync/task-stderr.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads support -// needs-unwind +//@ run-pass +//@ ignore-emscripten no threads support +//@ needs-unwind #![feature(internal_output_capture)] diff --git a/tests/ui/threads-sendsync/tcp-stress.rs b/tests/ui/threads-sendsync/tcp-stress.rs index 175663643403b..488cab4014085 100644 --- a/tests/ui/threads-sendsync/tcp-stress.rs +++ b/tests/ui/threads-sendsync/tcp-stress.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-android needs extra network permissions -// ignore-emscripten no threads or sockets support -// ignore-netbsd system ulimit (Too many open files) -// ignore-openbsd system ulimit (Too many open files) +//@ run-pass +//@ ignore-android needs extra network permissions +//@ ignore-emscripten no threads or sockets support +//@ ignore-netbsd system ulimit (Too many open files) +//@ ignore-openbsd system ulimit (Too many open files) use std::io::prelude::*; use std::net::{TcpListener, TcpStream}; diff --git a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs index 6411421429c4c..4b38b9ce2c9bc 100644 --- a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs +++ b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs @@ -1,11 +1,11 @@ // This checks that RUST_TEST_THREADS not being 1, 2, ... is detected // properly. -// run-fail -// error-pattern:should be a positive integer -// compile-flags: --test -// exec-env:RUST_TEST_THREADS=foo -// ignore-emscripten +//@ run-fail +//@ error-pattern:should be a positive integer +//@ compile-flags: --test +//@ exec-env:RUST_TEST_THREADS=foo +//@ ignore-emscripten #[test] fn do_nothing() {} diff --git a/tests/ui/threads-sendsync/thread-local-extern-static.rs b/tests/ui/threads-sendsync/thread-local-extern-static.rs index a2dda31aa5539..ca66f8ad1d36a 100644 --- a/tests/ui/threads-sendsync/thread-local-extern-static.rs +++ b/tests/ui/threads-sendsync/thread-local-extern-static.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-windows -// aux-build:thread-local-extern-static.rs +//@ run-pass +//@ ignore-windows +//@ aux-build:thread-local-extern-static.rs #![feature(cfg_target_thread_local, thread_local)] diff --git a/tests/ui/threads-sendsync/thread-local-syntax.rs b/tests/ui/threads-sendsync/thread-local-syntax.rs index 2f4805e4731ca..2cf91f0c1f78d 100644 --- a/tests/ui/threads-sendsync/thread-local-syntax.rs +++ b/tests/ui/threads-sendsync/thread-local-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(missing_docs)] //! this tests the syntax of `thread_local!` diff --git a/tests/ui/threads-sendsync/threads.rs b/tests/ui/threads-sendsync/threads.rs index e3da83aa12ba2..7b7e52abab459 100644 --- a/tests/ui/threads-sendsync/threads.rs +++ b/tests/ui/threads-sendsync/threads.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs b/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs index 8baef43341009..66fd6169db0e5 100644 --- a/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs +++ b/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs @@ -1,6 +1,6 @@ -// run-pass -// no-prefer-dynamic -// ignore-emscripten no threads support +//@ run-pass +//@ no-prefer-dynamic +//@ ignore-emscripten no threads support static mut HIT: bool = false; diff --git a/tests/ui/threads-sendsync/tls-init-on-init.rs b/tests/ui/threads-sendsync/tls-init-on-init.rs index 193c18151059a..ba5e4698e63dd 100644 --- a/tests/ui/threads-sendsync/tls-init-on-init.rs +++ b/tests/ui/threads-sendsync/tls-init-on-init.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(thread_local_try_with)] diff --git a/tests/ui/threads-sendsync/tls-try-with.rs b/tests/ui/threads-sendsync/tls-try-with.rs index f36ab4e4f9c55..d9af1caf74117 100644 --- a/tests/ui/threads-sendsync/tls-try-with.rs +++ b/tests/ui/threads-sendsync/tls-try-with.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(thread_local_try_with)] diff --git a/tests/ui/threads-sendsync/trivial-message.rs b/tests/ui/threads-sendsync/trivial-message.rs index 5831e867be577..8165737364384 100644 --- a/tests/ui/threads-sendsync/trivial-message.rs +++ b/tests/ui/threads-sendsync/trivial-message.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] /* diff --git a/tests/ui/threads-sendsync/unwind-resource.rs b/tests/ui/threads-sendsync/unwind-resource.rs index 6950a9c40d27d..ea9e0c7514ce1 100644 --- a/tests/ui/threads-sendsync/unwind-resource.rs +++ b/tests/ui/threads-sendsync/unwind-resource.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(non_camel_case_types)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/yield.rs b/tests/ui/threads-sendsync/yield.rs index e83ba556078a8..4d89b10af9578 100644 --- a/tests/ui/threads-sendsync/yield.rs +++ b/tests/ui/threads-sendsync/yield.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/yield1.rs b/tests/ui/threads-sendsync/yield1.rs index 002e590550c36..b003a70f47eee 100644 --- a/tests/ui/threads-sendsync/yield1.rs +++ b/tests/ui/threads-sendsync/yield1.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/yield2.rs b/tests/ui/threads-sendsync/yield2.rs index 376faab0c48fe..9502f0d33da51 100644 --- a/tests/ui/threads-sendsync/yield2.rs +++ b/tests/ui/threads-sendsync/yield2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::thread; diff --git a/tests/ui/tool-attributes/diagnostic_item2.rs b/tests/ui/tool-attributes/diagnostic_item2.rs index b32a66b16be18..241b69adb8c1c 100644 --- a/tests/ui/tool-attributes/diagnostic_item2.rs +++ b/tests/ui/tool-attributes/diagnostic_item2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[clippy::diagnostic_item = "mep"] struct Mep; diff --git a/tests/ui/tool-attributes/diagnostic_item3.rs b/tests/ui/tool-attributes/diagnostic_item3.rs index c1a236ed1cc32..f210c89c2990f 100644 --- a/tests/ui/tool-attributes/diagnostic_item3.rs +++ b/tests/ui/tool-attributes/diagnostic_item3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] #[rustc_diagnostic_item = "foomp"] diff --git a/tests/ui/tool-attributes/duplicate-diagnostic.rs b/tests/ui/tool-attributes/duplicate-diagnostic.rs index e2cf9508757be..5061bcb9e4445 100644 --- a/tests/ui/tool-attributes/duplicate-diagnostic.rs +++ b/tests/ui/tool-attributes/duplicate-diagnostic.rs @@ -1,8 +1,8 @@ -// aux-build: p1.rs -// aux-build: p2.rs +//@ aux-build: p1.rs +//@ aux-build: p2.rs -// error-pattern: duplicate diagnostic item in crate `p2` -// error-pattern: note: the diagnostic item is first defined in crate `p1` +//@ error-pattern: duplicate diagnostic item in crate `p2` +//@ error-pattern: note: the diagnostic item is first defined in crate `p1` #![feature(rustc_attrs)] extern crate p1; diff --git a/tests/ui/tool_lints-rpass.rs b/tests/ui/tool_lints-rpass.rs index e467d34376f78..458eca19ed6c7 100644 --- a/tests/ui/tool_lints-rpass.rs +++ b/tests/ui/tool_lints-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unknown_lints)] diff --git a/tests/ui/tool_lints_2018_preview.rs b/tests/ui/tool_lints_2018_preview.rs index e467d34376f78..458eca19ed6c7 100644 --- a/tests/ui/tool_lints_2018_preview.rs +++ b/tests/ui/tool_lints_2018_preview.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unknown_lints)] diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs index 08f926610d7ce..4b984171480ea 100644 --- a/tests/ui/track-diagnostics/track.rs +++ b/tests/ui/track-diagnostics/track.rs @@ -1,17 +1,17 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at -// rustc-env:RUST_BACKTRACE=0 -// failure-status: 101 +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at +//@ rustc-env:RUST_BACKTRACE=0 +//@ failure-status: 101 // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" -// normalize-stderr-test "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET" // The test becomes too flaky if we care about exact args. If `-Z ui-testing` // from compiletest and `-Z track-diagnostics` from `// compile-flags` at the // top of this file are present, then assume all args are present. -// normalize-stderr-test "note: compiler flags: .*-Z ui-testing.*-Z track-diagnostics" -> "note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics" +//@ normalize-stderr-test "note: compiler flags: .*-Z ui-testing.*-Z track-diagnostics" -> "note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics" fn main() { break rust diff --git a/tests/ui/track-diagnostics/track2.rs b/tests/ui/track-diagnostics/track2.rs index dc105c61d723b..00a17ccb2910d 100644 --- a/tests/ui/track-diagnostics/track2.rs +++ b/tests/ui/track-diagnostics/track2.rs @@ -1,9 +1,9 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" fn main() { let _moved @ _from = String::from("foo"); diff --git a/tests/ui/track-diagnostics/track3.rs b/tests/ui/track-diagnostics/track3.rs index 0699239503a97..2d0efdc839f9b 100644 --- a/tests/ui/track-diagnostics/track3.rs +++ b/tests/ui/track-diagnostics/track3.rs @@ -1,9 +1,9 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" fn main() { let _unimported = Blah { field: u8 }; diff --git a/tests/ui/track-diagnostics/track4.rs b/tests/ui/track-diagnostics/track4.rs index 35eec799bba99..788c999e0527a 100644 --- a/tests/ui/track-diagnostics/track4.rs +++ b/tests/ui/track-diagnostics/track4.rs @@ -1,9 +1,9 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" pub onion { Owo(u8), diff --git a/tests/ui/track-diagnostics/track5.rs b/tests/ui/track-diagnostics/track5.rs index c41d9424e85a9..28df72915cfb8 100644 --- a/tests/ui/track-diagnostics/track5.rs +++ b/tests/ui/track-diagnostics/track5.rs @@ -1,8 +1,8 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" } diff --git a/tests/ui/track-diagnostics/track6.rs b/tests/ui/track-diagnostics/track6.rs index fc6f5f23d92fa..7b0dd7a37a7a2 100644 --- a/tests/ui/track-diagnostics/track6.rs +++ b/tests/ui/track-diagnostics/track6.rs @@ -1,9 +1,9 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" pub trait Foo { diff --git a/tests/ui/trailing-comma.rs b/tests/ui/trailing-comma.rs index 3109139850889..95a8b366ad9d2 100644 --- a/tests/ui/trailing-comma.rs +++ b/tests/ui/trailing-comma.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: T,) {} diff --git a/tests/ui/trait-bounds/issue-75961.rs b/tests/ui/trait-bounds/issue-75961.rs index 367eac7182a26..8f4bc79f1f392 100644 --- a/tests/ui/trait-bounds/issue-75961.rs +++ b/tests/ui/trait-bounds/issue-75961.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn foo<'a>(s: &'a mut ()) where &'a mut (): Clone { <&mut () as Clone>::clone(&s); diff --git a/tests/ui/trait-bounds/issue-93008.rs b/tests/ui/trait-bounds/issue-93008.rs index f4d21a160b695..ba2b2f7f7b3b6 100644 --- a/tests/ui/trait-bounds/issue-93008.rs +++ b/tests/ui/trait-bounds/issue-93008.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 --crate-type=lib +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 --crate-type=lib #![feature(trivial_bounds)] #![allow(trivial_bounds)] diff --git a/tests/ui/trait-bounds/issue-94680.rs b/tests/ui/trait-bounds/issue-94680.rs index 58e892079e65f..7937ce9eadf23 100644 --- a/tests/ui/trait-bounds/issue-94680.rs +++ b/tests/ui/trait-bounds/issue-94680.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { println!("{:?}", { diff --git a/tests/ui/trait-bounds/issue-94999.rs b/tests/ui/trait-bounds/issue-94999.rs index e131902346f1b..b6a180a1579c7 100644 --- a/tests/ui/trait-bounds/issue-94999.rs +++ b/tests/ui/trait-bounds/issue-94999.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Identity { type T; diff --git a/tests/ui/trait-bounds/issue-95640.rs b/tests/ui/trait-bounds/issue-95640.rs index e4e998b5d0bb8..e8062faebfac9 100644 --- a/tests/ui/trait-bounds/issue-95640.rs +++ b/tests/ui/trait-bounds/issue-95640.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zmir-opt-level=3 +//@ build-pass +//@ compile-flags:-Zmir-opt-level=3 struct D; diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed index b3f5ad52db593..b8dedd7e11cd3 100644 --- a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed +++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait MyTrait { type T; diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs index 213abda778292..cb41e9abcd1a2 100644 --- a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs +++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait MyTrait { type T; diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed index 39e90d7a3f786..e6aac1708cef7 100644 --- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed +++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] mod A { pub trait Trait {} diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs index ee6ed0cae671c..d5c557dc9c7dc 100644 --- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs +++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] mod A { pub trait Trait {} diff --git a/tests/ui/trait-impl-bound-suggestions.fixed b/tests/ui/trait-impl-bound-suggestions.fixed index 342841b483859..9d3168f5acd68 100644 --- a/tests/ui/trait-impl-bound-suggestions.fixed +++ b/tests/ui/trait-impl-bound-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/trait-impl-bound-suggestions.rs b/tests/ui/trait-impl-bound-suggestions.rs index 9a494402260b0..342fb4416adcb 100644 --- a/tests/ui/trait-impl-bound-suggestions.rs +++ b/tests/ui/trait-impl-bound-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/traits/alias/basic.rs b/tests/ui/traits/alias/basic.rs index d8168f2990c46..b1283d2729519 100644 --- a/tests/ui/traits/alias/basic.rs +++ b/tests/ui/traits/alias/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/bounds.rs b/tests/ui/traits/alias/bounds.rs index 7b1920bc8f27c..30ee5794bc430 100644 --- a/tests/ui/traits/alias/bounds.rs +++ b/tests/ui/traits/alias/bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/cross-crate.rs b/tests/ui/traits/alias/cross-crate.rs index 8919c643400a5..207216f73bf9f 100644 --- a/tests/ui/traits/alias/cross-crate.rs +++ b/tests/ui/traits/alias/cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:send_sync.rs +//@ aux-build:send_sync.rs #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/import-cross-crate.rs b/tests/ui/traits/alias/import-cross-crate.rs index 868585cd09789..65e7c90965b85 100644 --- a/tests/ui/traits/alias/import-cross-crate.rs +++ b/tests/ui/traits/alias/import-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:greeter.rs +//@ run-pass +//@ aux-build:greeter.rs #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/import.rs b/tests/ui/traits/alias/import.rs index 802a8f15698f2..9469490ca2bf3 100644 --- a/tests/ui/traits/alias/import.rs +++ b/tests/ui/traits/alias/import.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs b/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs index 9b41a8096c4e5..1f686d0b9e001 100644 --- a/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs +++ b/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs @@ -1,6 +1,6 @@ // Regression test for #107747: methods from trait alias supertraits were brought into scope // -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs b/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs index 5e27ed3c6460e..91c04c28e9cd3 100644 --- a/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs +++ b/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-60755.rs b/tests/ui/traits/alias/issue-60755.rs index 6b955a752479f..dcb3c5ff6e914 100644 --- a/tests/ui/traits/alias/issue-60755.rs +++ b/tests/ui/traits/alias/issue-60755.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs b/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs index e49125d10249d..8b3e504ac4556 100644 --- a/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs +++ b/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-75983.rs b/tests/ui/traits/alias/issue-75983.rs index f9a7f36de43f1..0e81d4c3aacdd 100644 --- a/tests/ui/traits/alias/issue-75983.rs +++ b/tests/ui/traits/alias/issue-75983.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/maybe-bound.rs b/tests/ui/traits/alias/maybe-bound.rs index 284baa481497c..9fdeb714d5e75 100644 --- a/tests/ui/traits/alias/maybe-bound.rs +++ b/tests/ui/traits/alias/maybe-bound.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Test that `dyn ... + ?Sized + ...` resulting from the expansion of trait aliases is okay. diff --git a/tests/ui/traits/alias/object-wf.rs b/tests/ui/traits/alias/object-wf.rs index 1440f02df1df8..3abffd22d142f 100644 --- a/tests/ui/traits/alias/object-wf.rs +++ b/tests/ui/traits/alias/object-wf.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that trait objects involving trait aliases are well-formed. diff --git a/tests/ui/traits/alias/object.rs b/tests/ui/traits/alias/object.rs index 12177cd827fdf..30626909faea0 100644 --- a/tests/ui/traits/alias/object.rs +++ b/tests/ui/traits/alias/object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/style_lint.rs b/tests/ui/traits/alias/style_lint.rs index 33be20054b5d3..51c3a5aa77329 100644 --- a/tests/ui/traits/alias/style_lint.rs +++ b/tests/ui/traits/alias/style_lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed index 8a94abaeb0744..aa5ec17a28d79 100644 --- a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed +++ b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed @@ -1,6 +1,6 @@ // Regression test of #43913. -// run-rustfix +//@ run-rustfix #![feature(trait_alias)] #![allow(bare_trait_objects, dead_code)] diff --git a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs index 40c678c281f4c..5ed8bc84e0da1 100644 --- a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs +++ b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs @@ -1,6 +1,6 @@ // Regression test of #43913. -// run-rustfix +//@ run-rustfix #![feature(trait_alias)] #![allow(bare_trait_objects, dead_code)] diff --git a/tests/ui/traits/alias/syntax.rs b/tests/ui/traits/alias/syntax.rs index 50c77d33c6bce..bced5f165cbc0 100644 --- a/tests/ui/traits/alias/syntax.rs +++ b/tests/ui/traits/alias/syntax.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alignment-gep-tup-like-1.rs b/tests/ui/traits/alignment-gep-tup-like-1.rs index eb503dcf3b63b..66677bb0a0939 100644 --- a/tests/ui/traits/alignment-gep-tup-like-1.rs +++ b/tests/ui/traits/alignment-gep-tup-like-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/traits/anon-static-method.rs b/tests/ui/traits/anon-static-method.rs index ede01afae0294..6a348874b4cf5 100644 --- a/tests/ui/traits/anon-static-method.rs +++ b/tests/ui/traits/anon-static-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: isize } diff --git a/tests/ui/traits/anon_trait_static_method_exe.rs b/tests/ui/traits/anon_trait_static_method_exe.rs index b4930295499f7..8a6a8389cf126 100644 --- a/tests/ui/traits/anon_trait_static_method_exe.rs +++ b/tests/ui/traits/anon_trait_static_method_exe.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// aux-build:anon_trait_static_method_lib.rs +//@ aux-build:anon_trait_static_method_lib.rs extern crate anon_trait_static_method_lib; use anon_trait_static_method_lib::Foo; diff --git a/tests/ui/traits/assignability-trait.rs b/tests/ui/traits/assignability-trait.rs index a8547c1d2710a..ce4d9ca5161c5 100644 --- a/tests/ui/traits/assignability-trait.rs +++ b/tests/ui/traits/assignability-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Tests that type assignability is used to search for instances when diff --git a/tests/ui/traits/assoc-type-in-supertrait.rs b/tests/ui/traits/assoc-type-in-supertrait.rs index 7d6a754cc5abb..8ea1f1709533e 100644 --- a/tests/ui/traits/assoc-type-in-supertrait.rs +++ b/tests/ui/traits/assoc-type-in-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test case where an associated type is referenced from within the // supertrait definition. Issue #20220. 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 1422dda276b9b..6eaab6e594777 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 +//@ run-pass trait X<'a> { type F: FnOnce(&i32) -> &'a i32; diff --git a/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs b/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs index 6c3125a9fc5fd..6fa2265e611c8 100644 --- a/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs +++ b/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar<'a> { type Assoc: 'static; } diff --git a/tests/ui/traits/associated_type_bound/issue-51446.rs b/tests/ui/traits/associated_type_bound/issue-51446.rs index 7dd95de73ba41..48c1c2858cf94 100644 --- a/tests/ui/traits/associated_type_bound/issue-51446.rs +++ b/tests/ui/traits/associated_type_bound/issue-51446.rs @@ -1,5 +1,5 @@ // Regression test for #51446. -// check-pass +//@ check-pass trait Foo { type Item; diff --git a/tests/ui/traits/astconv-cycle-between-and-type.rs b/tests/ui/traits/astconv-cycle-between-and-type.rs index cc8f9dc519084..1d45028657e08 100644 --- a/tests/ui/traits/astconv-cycle-between-and-type.rs +++ b/tests/ui/traits/astconv-cycle-between-and-type.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-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`, // substituted). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/augmented-assignments-trait.rs b/tests/ui/traits/augmented-assignments-trait.rs index 75168c4f1e546..37fe42ce1c60c 100644 --- a/tests/ui/traits/augmented-assignments-trait.rs +++ b/tests/ui/traits/augmented-assignments-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::AddAssign; struct Int(#[allow(dead_code)] i32); diff --git a/tests/ui/traits/bound/basic.rs b/tests/ui/traits/bound/basic.rs index 8c8a7eb7d9da1..85157fdbf62f6 100644 --- a/tests/ui/traits/bound/basic.rs +++ b/tests/ui/traits/bound/basic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unconditional_recursion)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { } diff --git a/tests/ui/traits/bound/generic_trait.rs b/tests/ui/traits/bound/generic_trait.rs index 2484c5a88fb31..6099c38ff8ee7 100644 --- a/tests/ui/traits/bound/generic_trait.rs +++ b/tests/ui/traits/bound/generic_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/bound/impl-comparison-duplicates.rs b/tests/ui/traits/bound/impl-comparison-duplicates.rs index a59662c2797ff..68b64de3e96d5 100644 --- a/tests/ui/traits/bound/impl-comparison-duplicates.rs +++ b/tests/ui/traits/bound/impl-comparison-duplicates.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // Tests that type parameter bounds on an implementation need not match the // trait exactly, as long as the implementation doesn't demand *more* bounds // than the trait. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn foo(&self); diff --git a/tests/ui/traits/bound/in-arc.rs b/tests/ui/traits/bound/in-arc.rs index a1492c0b98237..40a6115e8381e 100644 --- a/tests/ui/traits/bound/in-arc.rs +++ b/tests/ui/traits/bound/in-arc.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Tests that a heterogeneous list of existential `dyn` types can be put inside an Arc // and shared between threads as long as all types fulfill Send. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::Arc; use std::sync::mpsc::channel; diff --git a/tests/ui/traits/bound/multiple.rs b/tests/ui/traits/bound/multiple.rs index 868b334070bdd..385fa8851c124 100644 --- a/tests/ui/traits/bound/multiple.rs +++ b/tests/ui/traits/bound/multiple.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: T) { } diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.rs b/tests/ui/traits/bound/not-on-bare-trait-2021.rs index 4c2e6f0852b6e..07b866cb4a65b 100644 --- a/tests/ui/traits/bound/not-on-bare-trait-2021.rs +++ b/tests/ui/traits/bound/not-on-bare-trait-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { fn dummy(&self) {} } diff --git a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs index 4dc4fecc91fcf..25e1b6b4bc35b 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait U {} trait T { fn get(self) -> X; } diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc.rs b/tests/ui/traits/bound/on-structs-and-enums-xc.rs index 94316d2404057..2a32e6dbab8a1 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-xc.rs @@ -1,4 +1,4 @@ -// aux-build:on_structs_and_enums_xc.rs +//@ aux-build:on_structs_and_enums_xc.rs extern crate on_structs_and_enums_xc; diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc1.rs b/tests/ui/traits/bound/on-structs-and-enums-xc1.rs index 5ef35b513e0fb..5240b76158a29 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc1.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-xc1.rs @@ -1,4 +1,4 @@ -// aux-build:on_structs_and_enums_xc.rs +//@ aux-build:on_structs_and_enums_xc.rs extern crate on_structs_and_enums_xc; diff --git a/tests/ui/traits/bound/recursion.rs b/tests/ui/traits/bound/recursion.rs index 767040dff3f73..1d9832ac917d9 100644 --- a/tests/ui/traits/bound/recursion.rs +++ b/tests/ui/traits/bound/recursion.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait I { fn i(&self) -> Self; } diff --git a/tests/ui/traits/bound/same-crate-name.rs b/tests/ui/traits/bound/same-crate-name.rs index 8d646a414599c..06d79a0c8b8d1 100644 --- a/tests/ui/traits/bound/same-crate-name.rs +++ b/tests/ui/traits/bound/same-crate-name.rs @@ -1,5 +1,5 @@ -// aux-build:crate_a1.rs -// aux-build:crate_a2.rs +//@ aux-build:crate_a1.rs +//@ aux-build:crate_a2.rs // Issue 22750 // This tests the extra help message reported when a trait bound diff --git a/tests/ui/traits/bug-7183-generics.rs b/tests/ui/traits/bug-7183-generics.rs index f53a173612743..4b8135fcbbc23 100644 --- a/tests/ui/traits/bug-7183-generics.rs +++ b/tests/ui/traits/bug-7183-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Speak : Sized { fn say(&self, s:&str) -> String; diff --git a/tests/ui/traits/bug-7295.rs b/tests/ui/traits/bug-7295.rs index 156ff2ee82f47..bd4e126c22004 100644 --- a/tests/ui/traits/bug-7295.rs +++ b/tests/ui/traits/bug-7295.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 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 15676e4554aeb..e0c309ed97d24 100644 --- a/tests/ui/traits/cache-issue-18209.rs +++ b/tests/ui/traits/cache-issue-18209.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that the cache results from the default method do not pollute // the cache for the later call in `load()`. // // See issue #18209. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { fn load_from() -> Box; diff --git a/tests/ui/traits/coercion-generic.rs b/tests/ui/traits/coercion-generic.rs index bf4dda4951910..92678dc35f123 100644 --- a/tests/ui/traits/coercion-generic.rs +++ b/tests/ui/traits/coercion-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Trait { fn f(&self, x: T); diff --git a/tests/ui/traits/coercion.rs b/tests/ui/traits/coercion.rs index e62742bac5c74..b93c865279656 100644 --- a/tests/ui/traits/coercion.rs +++ b/tests/ui/traits/coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/traits/composition-trivial.rs b/tests/ui/traits/composition-trivial.rs index 41e6a55607449..26f7673e61650 100644 --- a/tests/ui/traits/composition-trivial.rs +++ b/tests/ui/traits/composition-trivial.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn foo(&self); diff --git a/tests/ui/traits/conditional-dispatch.rs b/tests/ui/traits/conditional-dispatch.rs index dd882dce66635..434b629818b2d 100644 --- a/tests/ui/traits/conditional-dispatch.rs +++ b/tests/ui/traits/conditional-dispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to resolve conditional dispatch. Here, the // blanket impl for T:Copy coexists with an impl for Box, because // Box does not impl Copy. diff --git a/tests/ui/traits/conditional-model-fn.rs b/tests/ui/traits/conditional-model-fn.rs index ba88670032c95..604f9b24cb903 100644 --- a/tests/ui/traits/conditional-model-fn.rs +++ b/tests/ui/traits/conditional-model-fn.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // A model for how the `Fn` traits could work. You can implement at // most one of `Go`, `GoMut`, or `GoOnce`, and then the others follow // automatically. -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs extern crate go_trait; diff --git a/tests/ui/traits/conservative_impl_trait.rs b/tests/ui/traits/conservative_impl_trait.rs index 4f25e57be566b..4550778e47357 100644 --- a/tests/ui/traits/conservative_impl_trait.rs +++ b/tests/ui/traits/conservative_impl_trait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // #39665 fn batches(n: &u32) -> impl Iterator { diff --git a/tests/ui/traits/copy-is-not-modulo-regions.rs b/tests/ui/traits/copy-is-not-modulo-regions.rs index b899083747afa..1e7d2d9c691ac 100644 --- a/tests/ui/traits/copy-is-not-modulo-regions.rs +++ b/tests/ui/traits/copy-is-not-modulo-regions.rs @@ -1,5 +1,5 @@ -// revisions: not_static yes_static -//[yes_static] check-pass +//@ revisions: not_static yes_static +//@[yes_static] check-pass #[derive(Clone)] struct Foo<'lt>(&'lt ()); diff --git a/tests/ui/traits/copy-requires-self-wf.rs b/tests/ui/traits/copy-requires-self-wf.rs index 9abfdfab9d06d..3a8bf8c420e15 100644 --- a/tests/ui/traits/copy-requires-self-wf.rs +++ b/tests/ui/traits/copy-requires-self-wf.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone)] struct A<'a, T>(&'a T); diff --git a/tests/ui/traits/cycle-generic-bound.rs b/tests/ui/traits/cycle-generic-bound.rs index 77685c26da242..dec51ef35bc04 100644 --- a/tests/ui/traits/cycle-generic-bound.rs +++ b/tests/ui/traits/cycle-generic-bound.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Regression test for #15477. This test just needs to compile. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Chromosome> { } diff --git a/tests/ui/traits/cycle-type-trait.rs b/tests/ui/traits/cycle-type-trait.rs index c62d01403c7f8..f1125c9274aaf 100644 --- a/tests/ui/traits/cycle-type-trait.rs +++ b/tests/ui/traits/cycle-type-trait.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Chromosome: Get> { } diff --git a/tests/ui/traits/default-method/auxiliary/xc_2.rs b/tests/ui/traits/default-method/auxiliary/xc_2.rs index 9792338204c70..aa185d560f218 100644 --- a/tests/ui/traits/default-method/auxiliary/xc_2.rs +++ b/tests/ui/traits/default-method/auxiliary/xc_2.rs @@ -1,4 +1,4 @@ -// aux-build:xc.rs +//@ aux-build:xc.rs extern crate xc as aux; use aux::A; diff --git a/tests/ui/traits/default-method/bound-subst.rs b/tests/ui/traits/default-method/bound-subst.rs index 6a5d5c8ba2d74..2a3eece7a82ec 100644 --- a/tests/ui/traits/default-method/bound-subst.rs +++ b/tests/ui/traits/default-method/bound-subst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst2.rs b/tests/ui/traits/default-method/bound-subst2.rs index 78eabba2d2320..e9437e426708c 100644 --- a/tests/ui/traits/default-method/bound-subst2.rs +++ b/tests/ui/traits/default-method/bound-subst2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst3.rs b/tests/ui/traits/default-method/bound-subst3.rs index dd39dec4b634d..6223f8d9e2251 100644 --- a/tests/ui/traits/default-method/bound-subst3.rs +++ b/tests/ui/traits/default-method/bound-subst3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst4.rs b/tests/ui/traits/default-method/bound-subst4.rs index 6bc4cf0ef805c..3cb0966e8c78f 100644 --- a/tests/ui/traits/default-method/bound-subst4.rs +++ b/tests/ui/traits/default-method/bound-subst4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/traits/default-method/bound.rs b/tests/ui/traits/default-method/bound.rs index 0855a9db85110..1e806a3e4a34b 100644 --- a/tests/ui/traits/default-method/bound.rs +++ b/tests/ui/traits/default-method/bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/macro.rs b/tests/ui/traits/default-method/macro.rs index 2b50ee9b42210..5f80a73dc5667 100644 --- a/tests/ui/traits/default-method/macro.rs +++ b/tests/ui/traits/default-method/macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { diff --git a/tests/ui/traits/default-method/mut.rs b/tests/ui/traits/default-method/mut.rs index 3294b96561fd1..fd8b788035f87 100644 --- a/tests/ui/traits/default-method/mut.rs +++ b/tests/ui/traits/default-method/mut.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/traits/default-method/self.rs b/tests/ui/traits/default-method/self.rs index cdf4d1e148c84..8b2e422ad30d3 100644 --- a/tests/ui/traits/default-method/self.rs +++ b/tests/ui/traits/default-method/self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Cat { diff --git a/tests/ui/traits/default-method/supervtable.rs b/tests/ui/traits/default-method/supervtable.rs index 939ad51355e72..f61b526a79871 100644 --- a/tests/ui/traits/default-method/supervtable.rs +++ b/tests/ui/traits/default-method/supervtable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can call a function bounded over a supertrait from diff --git a/tests/ui/traits/default-method/trivial.rs b/tests/ui/traits/default-method/trivial.rs index dc41938ec8993..38f7388c676d2 100644 --- a/tests/ui/traits/default-method/trivial.rs +++ b/tests/ui/traits/default-method/trivial.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Cat { diff --git a/tests/ui/traits/default-method/xc-2.rs b/tests/ui/traits/default-method/xc-2.rs index 1de61dcf89689..f8274da83bb84 100644 --- a/tests/ui/traits/default-method/xc-2.rs +++ b/tests/ui/traits/default-method/xc-2.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:xc.rs -// aux-build:xc_2.rs +//@ run-pass +//@ aux-build:xc.rs +//@ aux-build:xc_2.rs diff --git a/tests/ui/traits/default-method/xc.rs b/tests/ui/traits/default-method/xc.rs index 76a1573d6c767..bbf4db0341099 100644 --- a/tests/ui/traits/default-method/xc.rs +++ b/tests/ui/traits/default-method/xc.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// aux-build:xc.rs +//@ aux-build:xc.rs extern crate xc as aux; diff --git a/tests/ui/traits/deny-builtin-object-impl.rs b/tests/ui/traits/deny-builtin-object-impl.rs index d0eb6382e411f..8e4e44f6a6712 100644 --- a/tests/ui/traits/deny-builtin-object-impl.rs +++ b/tests/ui/traits/deny-builtin-object-impl.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] diff --git a/tests/ui/traits/dyn-trait.rs b/tests/ui/traits/dyn-trait.rs index 10e69105cedae..4fb7aea5cbabe 100644 --- a/tests/ui/traits/dyn-trait.rs +++ b/tests/ui/traits/dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/traits/early-vtbl-resolution.rs b/tests/ui/traits/early-vtbl-resolution.rs index f4b69c1409561..f2dd2b8a6609a 100644 --- a/tests/ui/traits/early-vtbl-resolution.rs +++ b/tests/ui/traits/early-vtbl-resolution.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait thing { fn foo(&self) -> Option; diff --git a/tests/ui/traits/elaborate-type-region.rs b/tests/ui/traits/elaborate-type-region.rs index 03aef0184badd..c4f38a90692e2 100644 --- a/tests/ui/traits/elaborate-type-region.rs +++ b/tests/ui/traits/elaborate-type-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we elaborate `Type: 'region` constraints and infer various important things. 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 3413db6a6845b..b41d719d0ec4f 100644 --- a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs +++ b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: Option) where Option : Sized diff --git a/tests/ui/traits/fmt-pointer-trait.rs b/tests/ui/traits/fmt-pointer-trait.rs index b7876b9bd5158..edf734597f50a 100644 --- a/tests/ui/traits/fmt-pointer-trait.rs +++ b/tests/ui/traits/fmt-pointer-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr; use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/traits/generic.rs b/tests/ui/traits/generic.rs index 80efe1c9375dd..81167272b65d9 100644 --- a/tests/ui/traits/generic.rs +++ b/tests/ui/traits/generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/ice-with-dyn-pointee.rs b/tests/ui/traits/ice-with-dyn-pointee.rs index 9b3b9c8cddf19..45361cc44600d 100644 --- a/tests/ui/traits/ice-with-dyn-pointee.rs +++ b/tests/ui/traits/ice-with-dyn-pointee.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] // Address issue #112737 -- ICE with dyn Pointee extern crate core; diff --git a/tests/ui/traits/impl-2.rs b/tests/ui/traits/impl-2.rs index 804ffec12c2bf..6cc702800e392 100644 --- a/tests/ui/traits/impl-2.rs +++ b/tests/ui/traits/impl-2.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod Foo { pub trait Trait { diff --git a/tests/ui/traits/impl-evaluation-order.rs b/tests/ui/traits/impl-evaluation-order.rs index 2ce0b6b0df8f0..af44243ac5cb6 100644 --- a/tests/ui/traits/impl-evaluation-order.rs +++ b/tests/ui/traits/impl-evaluation-order.rs @@ -4,7 +4,7 @@ // MIR building) evaluates bounds from normalizing an impl after evaluating // any bounds on the impl. -// check-pass +//@ check-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/traits/impl-implicit-trait.rs b/tests/ui/traits/impl-implicit-trait.rs index fac2bcce2481b..03c1ec8a53b2e 100644 --- a/tests/ui/traits/impl-implicit-trait.rs +++ b/tests/ui/traits/impl-implicit-trait.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum option_ { none_, diff --git a/tests/ui/traits/impl-inherent-prefer-over-trait.rs b/tests/ui/traits/impl-inherent-prefer-over-trait.rs index f03e730d091eb..29aa073341e47 100644 --- a/tests/ui/traits/impl-inherent-prefer-over-trait.rs +++ b/tests/ui/traits/impl-inherent-prefer-over-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.rs b/tests/ui/traits/impl-object-overlap-issue-23853.rs index c0d3af11443d4..e091a01949f1d 100644 --- a/tests/ui/traits/impl-object-overlap-issue-23853.rs +++ b/tests/ui/traits/impl-object-overlap-issue-23853.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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, diff --git a/tests/ui/traits/impl.rs b/tests/ui/traits/impl.rs index 7bec1b6c9ff4f..348096f37f7be 100644 --- a/tests/ui/traits/impl.rs +++ b/tests/ui/traits/impl.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test calling methods on an impl for a bare trait. -// aux-build:traitimpl.rs +//@ aux-build:traitimpl.rs extern crate traitimpl; use traitimpl::Bar; diff --git a/tests/ui/traits/impl_trait_as_trait_return_position.rs b/tests/ui/traits/impl_trait_as_trait_return_position.rs index c3325fd80ca0c..07a8ff66fb644 100644 --- a/tests/ui/traits/impl_trait_as_trait_return_position.rs +++ b/tests/ui/traits/impl_trait_as_trait_return_position.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type Foo; diff --git a/tests/ui/traits/infer-from-object-issue-26952.rs b/tests/ui/traits/infer-from-object-issue-26952.rs index 9544b4f2088ea..83eb9bcb62d75 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when we match a trait reference like `Foo: Foo`, diff --git a/tests/ui/traits/inherent-method-order.rs b/tests/ui/traits/inherent-method-order.rs index f632ae8a9aca9..d5179e943f48e 100644 --- a/tests/ui/traits/inherent-method-order.rs +++ b/tests/ui/traits/inherent-method-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/traits/inheritance/auto-xc-2.rs b/tests/ui/traits/inheritance/auto-xc-2.rs index f2130228d51db..1dac885f6590f 100644 --- a/tests/ui/traits/inheritance/auto-xc-2.rs +++ b/tests/ui/traits/inheritance/auto-xc-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:auto_xc_2.rs +//@ run-pass +//@ aux-build:auto_xc_2.rs extern crate auto_xc_2 as aux; diff --git a/tests/ui/traits/inheritance/auto-xc.rs b/tests/ui/traits/inheritance/auto-xc.rs index 3d5ae182af118..817f4a8f645af 100644 --- a/tests/ui/traits/inheritance/auto-xc.rs +++ b/tests/ui/traits/inheritance/auto-xc.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:auto_xc.rs +//@ aux-build:auto_xc.rs extern crate auto_xc as aux; diff --git a/tests/ui/traits/inheritance/auto.rs b/tests/ui/traits/inheritance/auto.rs index 0be67a55eba97..99086f00641a8 100644 --- a/tests/ui/traits/inheritance/auto.rs +++ b/tests/ui/traits/inheritance/auto.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that this impl turns A into a Quux, because // A is already a Foo Bar Baz diff --git a/tests/ui/traits/inheritance/basic.rs b/tests/ui/traits/inheritance/basic.rs index 5bfa60b1aece0..d9ef5f59220d9 100644 --- a/tests/ui/traits/inheritance/basic.rs +++ b/tests/ui/traits/inheritance/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/call-bound-inherited.rs b/tests/ui/traits/inheritance/call-bound-inherited.rs index 37c2ff63c6ab1..980325de6bdfc 100644 --- a/tests/ui/traits/inheritance/call-bound-inherited.rs +++ b/tests/ui/traits/inheritance/call-bound-inherited.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/call-bound-inherited2.rs b/tests/ui/traits/inheritance/call-bound-inherited2.rs index 8576d29f251b2..4a03316a749c1 100644 --- a/tests/ui/traits/inheritance/call-bound-inherited2.rs +++ b/tests/ui/traits/inheritance/call-bound-inherited2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs b/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs index 25159c1adb6f6..97295636da815 100644 --- a/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs +++ b/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that we can cast to a subtrait and call subtrait // methods. Not testing supertrait methods diff --git a/tests/ui/traits/inheritance/cast.rs b/tests/ui/traits/inheritance/cast.rs index 9070b9d1f5606..8b8c8eb5ff3a6 100644 --- a/tests/ui/traits/inheritance/cast.rs +++ b/tests/ui/traits/inheritance/cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that supertrait methods can be called on subtrait object types diff --git a/tests/ui/traits/inheritance/cross-trait-call-xc.rs b/tests/ui/traits/inheritance/cross-trait-call-xc.rs index 99fbb5c6148dc..29796c7a0e63a 100644 --- a/tests/ui/traits/inheritance/cross-trait-call-xc.rs +++ b/tests/ui/traits/inheritance/cross-trait-call-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xc_call.rs +//@ run-pass +//@ aux-build:xc_call.rs extern crate xc_call as aux; diff --git a/tests/ui/traits/inheritance/cross-trait-call.rs b/tests/ui/traits/inheritance/cross-trait-call.rs index 512c928ca8fa5..51a371c7c5b74 100644 --- a/tests/ui/traits/inheritance/cross-trait-call.rs +++ b/tests/ui/traits/inheritance/cross-trait-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/diamond.rs b/tests/ui/traits/inheritance/diamond.rs index 32ad0fb4d4107..a2b0a5e77ae86 100644 --- a/tests/ui/traits/inheritance/diamond.rs +++ b/tests/ui/traits/inheritance/diamond.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // B and C both require A, so D does as well, twice, but that's just fine diff --git a/tests/ui/traits/inheritance/multiple-inheritors.rs b/tests/ui/traits/inheritance/multiple-inheritors.rs index 77ecbd8eb17ba..37cbb865011d6 100644 --- a/tests/ui/traits/inheritance/multiple-inheritors.rs +++ b/tests/ui/traits/inheritance/multiple-inheritors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait A { fn a(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/multiple-params.rs b/tests/ui/traits/inheritance/multiple-params.rs index 8ff5ba541853a..9119726f6aa97 100644 --- a/tests/ui/traits/inheritance/multiple-params.rs +++ b/tests/ui/traits/inheritance/multiple-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait A { fn a(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/num.rs b/tests/ui/traits/inheritance/num.rs index 3d63d78cabb45..339ff04ff530d 100644 --- a/tests/ui/traits/inheritance/num.rs +++ b/tests/ui/traits/inheritance/num.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumExt: PartialEq + PartialOrd {} diff --git a/tests/ui/traits/inheritance/num0.rs b/tests/ui/traits/inheritance/num0.rs index c9c73ee00e606..a2ebc5c62d787 100644 --- a/tests/ui/traits/inheritance/num0.rs +++ b/tests/ui/traits/inheritance/num0.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Extending Num and using inherited static methods -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/num1.rs b/tests/ui/traits/inheritance/num1.rs index 663dd3a5eafdb..9fa2cde6d2222 100644 --- a/tests/ui/traits/inheritance/num1.rs +++ b/tests/ui/traits/inheritance/num1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/num2.rs b/tests/ui/traits/inheritance/num2.rs index b713c66a37cd6..0531cae5eac7f 100644 --- a/tests/ui/traits/inheritance/num2.rs +++ b/tests/ui/traits/inheritance/num2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A more complex example of numeric extensions pub trait TypeExt {} diff --git a/tests/ui/traits/inheritance/num3.rs b/tests/ui/traits/inheritance/num3.rs index c40be6f83545f..bb0c233863759 100644 --- a/tests/ui/traits/inheritance/num3.rs +++ b/tests/ui/traits/inheritance/num3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait NumCast: Sized { fn from(i: i32) -> Option; } diff --git a/tests/ui/traits/inheritance/num5.rs b/tests/ui/traits/inheritance/num5.rs index f478618f7b593..b38fb441cff4e 100644 --- a/tests/ui/traits/inheritance/num5.rs +++ b/tests/ui/traits/inheritance/num5.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/overloading-simple.rs b/tests/ui/traits/inheritance/overloading-simple.rs index 800d7bc6b1fe6..5f0dd291b8092 100644 --- a/tests/ui/traits/inheritance/overloading-simple.rs +++ b/tests/ui/traits/inheritance/overloading-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait MyNum : PartialEq { } diff --git a/tests/ui/traits/inheritance/overloading-xc-exe.rs b/tests/ui/traits/inheritance/overloading-xc-exe.rs index 08778061ba1c2..356b6c7d86608 100644 --- a/tests/ui/traits/inheritance/overloading-xc-exe.rs +++ b/tests/ui/traits/inheritance/overloading-xc-exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:overloading_xc.rs +//@ run-pass +//@ aux-build:overloading_xc.rs extern crate overloading_xc; diff --git a/tests/ui/traits/inheritance/overloading.rs b/tests/ui/traits/inheritance/overloading.rs index f126847da09c0..0366ed1f54763 100644 --- a/tests/ui/traits/inheritance/overloading.rs +++ b/tests/ui/traits/inheritance/overloading.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Add, Sub, Mul}; trait MyNum : Add + Sub + Mul + PartialEq + Clone { } diff --git a/tests/ui/traits/inheritance/repeated-supertrait.rs b/tests/ui/traits/inheritance/repeated-supertrait.rs index cb2581ffa99a5..bcd1a8fb35742 100644 --- a/tests/ui/traits/inheritance/repeated-supertrait.rs +++ b/tests/ui/traits/inheritance/repeated-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a case of a trait which extends the same supertrait twice, but // with difference type parameters. Test that we can invoke the // various methods in various ways successfully. diff --git a/tests/ui/traits/inheritance/self-in-supertype.rs b/tests/ui/traits/inheritance/self-in-supertype.rs index e8a2bd791a5e6..d71b7b45ca3f7 100644 --- a/tests/ui/traits/inheritance/self-in-supertype.rs +++ b/tests/ui/traits/inheritance/self-in-supertype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for issue #4183: use of Self in supertraits. pub static FUZZY_EPSILON: f64 = 0.1; diff --git a/tests/ui/traits/inheritance/self.rs b/tests/ui/traits/inheritance/self.rs index 5f2559f48eb34..73a608f28097f 100644 --- a/tests/ui/traits/inheritance/self.rs +++ b/tests/ui/traits/inheritance/self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(&self, x: &T); } diff --git a/tests/ui/traits/inheritance/simple.rs b/tests/ui/traits/inheritance/simple.rs index ca3a284e5974c..cc7fe1744e45d 100644 --- a/tests/ui/traits/inheritance/simple.rs +++ b/tests/ui/traits/inheritance/simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/static.rs b/tests/ui/traits/inheritance/static.rs index 16218fbd23619..95ebe83f9a29f 100644 --- a/tests/ui/traits/inheritance/static.rs +++ b/tests/ui/traits/inheritance/static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait MyNum { fn from_int(_: isize) -> Self; diff --git a/tests/ui/traits/inheritance/static2.rs b/tests/ui/traits/inheritance/static2.rs index bc78e1e2328a5..ea1325958902b 100644 --- a/tests/ui/traits/inheritance/static2.rs +++ b/tests/ui/traits/inheritance/static2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait MyEq {} pub trait MyNum { diff --git a/tests/ui/traits/inheritance/subst.rs b/tests/ui/traits/inheritance/subst.rs index b2b6503666e47..556a8b9544c8a 100644 --- a/tests/ui/traits/inheritance/subst.rs +++ b/tests/ui/traits/inheritance/subst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Add { fn add(&self, rhs: &RHS) -> Result; diff --git a/tests/ui/traits/inheritance/subst2.rs b/tests/ui/traits/inheritance/subst2.rs index ccc9628c77781..345e08eea5bdc 100644 --- a/tests/ui/traits/inheritance/subst2.rs +++ b/tests/ui/traits/inheritance/subst2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Panda { fn chomp(&self, bamboo: &T) -> T; diff --git a/tests/ui/traits/inheritance/visibility.rs b/tests/ui/traits/inheritance/visibility.rs index 6ad8649267481..3bcaa53212bba 100644 --- a/tests/ui/traits/inheritance/visibility.rs +++ b/tests/ui/traits/inheritance/visibility.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod traits { pub trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/issue-103563.rs b/tests/ui/traits/issue-103563.rs index cd3eea09b997d..8a905488a5085 100644 --- a/tests/ui/traits/issue-103563.rs +++ b/tests/ui/traits/issue-103563.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let mut log_service = LogService { inner: Inner }; diff --git a/tests/ui/traits/issue-104322.rs b/tests/ui/traits/issue-104322.rs index dcc27f1f03ae1..9f8ee8e5e4d76 100644 --- a/tests/ui/traits/issue-104322.rs +++ b/tests/ui/traits/issue-104322.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // // Tests that overflows do not occur in certain situations // related to generic diesel code diff --git a/tests/ui/traits/issue-18412.rs b/tests/ui/traits/issue-18412.rs index fe1cfb3dffa9e..611d0e00aba5d 100644 --- a/tests/ui/traits/issue-18412.rs +++ b/tests/ui/traits/issue-18412.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that non-static methods can be assigned to local variables as // function pointers. diff --git a/tests/ui/traits/issue-22019.rs b/tests/ui/traits/issue-22019.rs index 605fee510b103..120f611ccb69c 100644 --- a/tests/ui/traits/issue-22019.rs +++ b/tests/ui/traits/issue-22019.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(missing_copy_implementations)] #![allow(unused_variables)] diff --git a/tests/ui/traits/issue-22110.rs b/tests/ui/traits/issue-22110.rs index bdbfee799f176..b0b584bd49daf 100644 --- a/tests/ui/traits/issue-22110.rs +++ b/tests/ui/traits/issue-22110.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-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. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/issue-22655.rs b/tests/ui/traits/issue-22655.rs index bc08ca0a2ba64..aaf1b05b6e563 100644 --- a/tests/ui/traits/issue-22655.rs +++ b/tests/ui/traits/issue-22655.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for issue #22655: This test should not lead to // infinite recursion. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe impl Send for Unique { } diff --git a/tests/ui/traits/issue-23003-overflow.rs b/tests/ui/traits/issue-23003-overflow.rs index c5f471f23c2e3..ff6b377c4a576 100644 --- a/tests/ui/traits/issue-23003-overflow.rs +++ b/tests/ui/traits/issue-23003-overflow.rs @@ -2,7 +2,7 @@ // types are required. This test now just compiles fine, since the // relevant rules that triggered the overflow were removed. -// check-pass +//@ check-pass #![allow(dead_code)] use std::marker::PhantomData; diff --git a/tests/ui/traits/issue-23003.rs b/tests/ui/traits/issue-23003.rs index 24c2b2ad66074..cb05a5dfb6b80 100644 --- a/tests/ui/traits/issue-23003.rs +++ b/tests/ui/traits/issue-23003.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-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` // again, leading to an infinite cycle. Issue #23003. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/traits/issue-23825.rs b/tests/ui/traits/issue-23825.rs index a9f0095d2e245..e873a3b35c0f6 100644 --- a/tests/ui/traits/issue-23825.rs +++ b/tests/ui/traits/issue-23825.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Stringify { fn to_string(&self) -> String; } diff --git a/tests/ui/traits/issue-24010.rs b/tests/ui/traits/issue-24010.rs index 1eaa5bf0c6792..a42a747b2d32e 100644 --- a/tests/ui/traits/issue-24010.rs +++ b/tests/ui/traits/issue-24010.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: classic next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver trait Foo: Fn(i32) -> i32 + Send {} diff --git a/tests/ui/traits/issue-26339.rs b/tests/ui/traits/issue-26339.rs index bedd87cc4cc79..0d532fbeb9bc4 100644 --- a/tests/ui/traits/issue-26339.rs +++ b/tests/ui/traits/issue-26339.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the right implementation is called through a trait // object when supertraits include multiple references to the // same trait, with different type parameters. diff --git a/tests/ui/traits/issue-33096.rs b/tests/ui/traits/issue-33096.rs index f0b472e2fe821..bd513b749bffe 100644 --- a/tests/ui/traits/issue-33096.rs +++ b/tests/ui/traits/issue-33096.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g +//@ run-pass +//@ compile-flags: -g use std::ops::Deref; diff --git a/tests/ui/traits/issue-3683.rs b/tests/ui/traits/issue-3683.rs index b12c450c937fb..535d492109a8c 100644 --- a/tests/ui/traits/issue-3683.rs +++ b/tests/ui/traits/issue-3683.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn a(&self) -> isize; diff --git a/tests/ui/traits/issue-38033.rs b/tests/ui/traits/issue-38033.rs index 4d76df1e8d5bc..f3525bd13c4fa 100644 --- a/tests/ui/traits/issue-38033.rs +++ b/tests/ui/traits/issue-38033.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker; use std::mem; diff --git a/tests/ui/traits/issue-40085.rs b/tests/ui/traits/issue-40085.rs index 132044cfd6dce..22679b20d1604 100644 --- a/tests/ui/traits/issue-40085.rs +++ b/tests/ui/traits/issue-40085.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Index; fn bar() {} static UNIT: () = (); diff --git a/tests/ui/traits/issue-4107.rs b/tests/ui/traits/issue-4107.rs index 98433e806e37f..1a754dab5ada6 100644 --- a/tests/ui/traits/issue-4107.rs +++ b/tests/ui/traits/issue-4107.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/traits/issue-43132.rs b/tests/ui/traits/issue-43132.rs index c886f4b0a2d6b..5f11928b3173d 100644 --- a/tests/ui/traits/issue-43132.rs +++ b/tests/ui/traits/issue-43132.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn main() { diff --git a/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs b/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs index fc869ae4fec26..851036beede28 100644 --- a/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs +++ b/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /* #5008 cast to &Trait causes code to segfault on method call diff --git a/tests/ui/traits/issue-52893.rs b/tests/ui/traits/issue-52893.rs index d72598d5d5942..58a15f702ee6f 100644 --- a/tests/ui/traits/issue-52893.rs +++ b/tests/ui/traits/issue-52893.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // // regression test for issue 52893 trait At { diff --git a/tests/ui/traits/issue-56202.rs b/tests/ui/traits/issue-56202.rs index 0952843e60a1a..7c12e4a493669 100644 --- a/tests/ui/traits/issue-56202.rs +++ b/tests/ui/traits/issue-56202.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait FooTrait {} diff --git a/tests/ui/traits/issue-56488.rs b/tests/ui/traits/issue-56488.rs index 8b68f314c04dd..e33099821bda3 100644 --- a/tests/ui/traits/issue-56488.rs +++ b/tests/ui/traits/issue-56488.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/issue-58344.rs b/tests/ui/traits/issue-58344.rs index 0cb04dcb22a54..455f831a0f846 100644 --- a/tests/ui/traits/issue-58344.rs +++ b/tests/ui/traits/issue-58344.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Add; diff --git a/tests/ui/traits/issue-59029-2.rs b/tests/ui/traits/issue-59029-2.rs index fca9f1f13c9de..de767b24af9f0 100644 --- a/tests/ui/traits/issue-59029-2.rs +++ b/tests/ui/traits/issue-59029-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] trait Svc { type Res; } diff --git a/tests/ui/traits/issue-6128.rs b/tests/ui/traits/issue-6128.rs index f5fa0de809a19..95b61549b5ef4 100644 --- a/tests/ui/traits/issue-6128.rs +++ b/tests/ui/traits/issue-6128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/traits/issue-6334.rs b/tests/ui/traits/issue-6334.rs index acf48da1543af..0f6b40dc0c048 100644 --- a/tests/ui/traits/issue-6334.rs +++ b/tests/ui/traits/issue-6334.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that everything still compiles and runs fine even when // we reorder the bounds. diff --git a/tests/ui/traits/issue-66768.rs b/tests/ui/traits/issue-66768.rs index ce42c8b01cc32..dc9fe361019a2 100644 --- a/tests/ui/traits/issue-66768.rs +++ b/tests/ui/traits/issue-66768.rs @@ -1,5 +1,5 @@ // Regression test for #66768. -// check-pass +//@ check-pass #![allow(dead_code)] //-^ "dead code" is needed to reproduce the issue. diff --git a/tests/ui/traits/issue-68295.rs b/tests/ui/traits/issue-68295.rs index 7ff54539adc5b..147f1dcc8a908 100644 --- a/tests/ui/traits/issue-68295.rs +++ b/tests/ui/traits/issue-68295.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // // regression test for #68295 diff --git a/tests/ui/traits/issue-70944.rs b/tests/ui/traits/issue-70944.rs index 3286de9d5b8e0..b9b11d638333a 100644 --- a/tests/ui/traits/issue-70944.rs +++ b/tests/ui/traits/issue-70944.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test of #70944, should compile fine. use std::ops::Index; diff --git a/tests/ui/traits/issue-72455.rs b/tests/ui/traits/issue-72455.rs index b6c3bb222876d..41ecd91193355 100644 --- a/tests/ui/traits/issue-72455.rs +++ b/tests/ui/traits/issue-72455.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait ResultExt { type Ok; diff --git a/tests/ui/traits/issue-77982.rs b/tests/ui/traits/issue-77982.rs index 2331dda91680c..57d7899f6dd36 100644 --- a/tests/ui/traits/issue-77982.rs +++ b/tests/ui/traits/issue-77982.rs @@ -1,4 +1,4 @@ -// ignore-windows different list of satisfying impls +//@ ignore-windows different list of satisfying impls use std::collections::HashMap; fn what() { diff --git a/tests/ui/traits/issue-78632.rs b/tests/ui/traits/issue-78632.rs index c72a2aef4900f..11425199c0719 100644 --- a/tests/ui/traits/issue-78632.rs +++ b/tests/ui/traits/issue-78632.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #78632 diff --git a/tests/ui/traits/issue-82830.rs b/tests/ui/traits/issue-82830.rs index 37bae2e90a595..4530f9cc45646 100644 --- a/tests/ui/traits/issue-82830.rs +++ b/tests/ui/traits/issue-82830.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type B; diff --git a/tests/ui/traits/issue-84399-bad-fresh-caching.rs b/tests/ui/traits/issue-84399-bad-fresh-caching.rs index 1494001564fe7..c0a6b8d0daca5 100644 --- a/tests/ui/traits/issue-84399-bad-fresh-caching.rs +++ b/tests/ui/traits/issue-84399-bad-fresh-caching.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type lib -// check-pass +//@ compile-flags: --crate-type lib +//@ check-pass // // Regression test for issue #84399 // Tests that we keep the full `ParamEnv` when diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.rs b/tests/ui/traits/issue-85360-eval-obligation-ice.rs index 75483a810949d..931879a672262 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.rs +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition=2021 +//@ compile-flags: --edition=2021 #![feature(rustc_attrs)] diff --git a/tests/ui/traits/issue-89119.rs b/tests/ui/traits/issue-89119.rs index 170f69915e2ab..52d2ab91a69f4 100644 --- a/tests/ui/traits/issue-89119.rs +++ b/tests/ui/traits/issue-89119.rs @@ -5,7 +5,7 @@ // // The auxiliary crate used in the test contains the code minimized from `zvariant-2.8.0`. -// check-pass -// aux-build: issue_89119_intercrate_caching.rs +//@ check-pass +//@ aux-build: issue_89119_intercrate_caching.rs fn main() {} diff --git a/tests/ui/traits/issue-90195-2.rs b/tests/ui/traits/issue-90195-2.rs index b739dc46e4e8b..ad6185a879b5d 100644 --- a/tests/ui/traits/issue-90195-2.rs +++ b/tests/ui/traits/issue-90195-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Archive { type Archived; } diff --git a/tests/ui/traits/issue-90195.rs b/tests/ui/traits/issue-90195.rs index 543c9f197e1bb..c5e146c81cbbe 100644 --- a/tests/ui/traits/issue-90195.rs +++ b/tests/ui/traits/issue-90195.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Archive { type Archived; } diff --git a/tests/ui/traits/issue-90662-projection-caching.rs b/tests/ui/traits/issue-90662-projection-caching.rs index e08ab53fbb058..247cc78979a91 100644 --- a/tests/ui/traits/issue-90662-projection-caching.rs +++ b/tests/ui/traits/issue-90662-projection-caching.rs @@ -1,6 +1,6 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver=coherence -// check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver=coherence +//@ check-pass // Regression test for issue #90662 // Tests that projection caching does not cause a spurious error. diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.rs b/tests/ui/traits/issue-91949-hangs-on-recursion.rs index 312d5d08c7df8..ddbbcdd052965 100644 --- a/tests/ui/traits/issue-91949-hangs-on-recursion.rs +++ b/tests/ui/traits/issue-91949-hangs-on-recursion.rs @@ -1,9 +1,9 @@ -// build-fail -// compile-flags: -Zinline-mir=no -// error-pattern: overflow evaluating the requirement ` as Iterator>::Item == ()` -// error-pattern: function cannot return without recursing -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ compile-flags: -Zinline-mir=no +//@ error-pattern: overflow evaluating the requirement ` as Iterator>::Item == ()` +//@ error-pattern: function cannot return without recursing +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ ignore-compare-mode-next-solver (hangs) // Regression test for #91949. // This hanged *forever* on 1.56, fixed by #90423. diff --git a/tests/ui/traits/issue-92292.rs b/tests/ui/traits/issue-92292.rs index bb3700a2b5e94..e1358157cfb7b 100644 --- a/tests/ui/traits/issue-92292.rs +++ b/tests/ui/traits/issue-92292.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/traits/issue-9394-inherited-calls.rs b/tests/ui/traits/issue-9394-inherited-calls.rs index cc0dd4fc14a0d..9eb5c63d337ac 100644 --- a/tests/ui/traits/issue-9394-inherited-calls.rs +++ b/tests/ui/traits/issue-9394-inherited-calls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Base: Base2 + Base3{ fn foo(&self) -> String; diff --git a/tests/ui/traits/issue-95311.rs b/tests/ui/traits/issue-95311.rs index 9d40d254ad913..1c91dfeeff7f8 100644 --- a/tests/ui/traits/issue-95311.rs +++ b/tests/ui/traits/issue-95311.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test to check that pointee trait doesn't let region variables escape into the cache diff --git a/tests/ui/traits/issue-95898.rs b/tests/ui/traits/issue-95898.rs index 41a20b899599a..31b7e79c575dd 100644 --- a/tests/ui/traits/issue-95898.rs +++ b/tests/ui/traits/issue-95898.rs @@ -1,5 +1,5 @@ // Test for #95898: The trait suggestion had an extra `:` after the trait. -// edition:2021 +//@ edition:2021 fn foo(t: T) { t.clone(); diff --git a/tests/ui/traits/issue-96664.rs b/tests/ui/traits/issue-96664.rs index 3c5314af73e2d..8de78c71fe9ee 100644 --- a/tests/ui/traits/issue-96664.rs +++ b/tests/ui/traits/issue-96664.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/issue-96665.rs b/tests/ui/traits/issue-96665.rs index a571d48d97a22..f38a12dd98839 100644 --- a/tests/ui/traits/issue-96665.rs +++ b/tests/ui/traits/issue-96665.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Sequence> {} diff --git a/tests/ui/traits/issue-97695-double-trivial-bound.rs b/tests/ui/traits/issue-97695-double-trivial-bound.rs index 213605b51142c..7d4749f3b7a9a 100644 --- a/tests/ui/traits/issue-97695-double-trivial-bound.rs +++ b/tests/ui/traits/issue-97695-double-trivial-bound.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zinline-mir --emit=mir -// build-pass +//@ compile-flags: -Zinline-mir --emit=mir +//@ build-pass pub trait Associate { type Associated; diff --git a/tests/ui/traits/item-inside-macro.rs b/tests/ui/traits/item-inside-macro.rs index 54bf872d0287d..6866c7313fcb5 100644 --- a/tests/ui/traits/item-inside-macro.rs +++ b/tests/ui/traits/item-inside-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #34183 macro_rules! foo { diff --git a/tests/ui/traits/kindck-owned-contains-1.rs b/tests/ui/traits/kindck-owned-contains-1.rs index 8adb06ba3d04e..e4c69744cd735 100644 --- a/tests/ui/traits/kindck-owned-contains-1.rs +++ b/tests/ui/traits/kindck-owned-contains-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/monad.rs b/tests/ui/traits/monad.rs index 5d0612cf8dc83..376fe56cb1781 100644 --- a/tests/ui/traits/monad.rs +++ b/tests/ui/traits/monad.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] 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 bc314a39d8ea7..35d6dddfa30d6 100644 --- a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs +++ b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 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 e9ae8ab012a09..daefdcff5a556 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 +//@ run-pass // Test that we correctly ignore the blanket impl // because (in this case) `T` does not impl `Clone`. // diff --git a/tests/ui/traits/multidispatch-infer-convert-target.rs b/tests/ui/traits/multidispatch-infer-convert-target.rs index a3653dea2cbdf..f73792a2b280a 100644 --- a/tests/ui/traits/multidispatch-infer-convert-target.rs +++ b/tests/ui/traits/multidispatch-infer-convert-target.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can infer the Target based on the Self or vice versa. diff --git a/tests/ui/traits/multidispatch1.rs b/tests/ui/traits/multidispatch1.rs index f2469e1490eb1..b8265ec384a27 100644 --- a/tests/ui/traits/multidispatch1.rs +++ b/tests/ui/traits/multidispatch1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/traits/multidispatch2.rs b/tests/ui/traits/multidispatch2.rs index 21aa13fd48752..69ca012456a7c 100644 --- a/tests/ui/traits/multidispatch2.rs +++ b/tests/ui/traits/multidispatch2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs index 01a98a308950a..05b167326d4c6 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(negative_bounds, negative_impls)] diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs index bb2e861a1a770..d714d781c8822 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(negative_bounds, unboxed_closures)] diff --git a/tests/ui/traits/negative-bounds/supertrait.rs b/tests/ui/traits/negative-bounds/supertrait.rs index a66bc4a60a08e..1a0ab274df9f9 100644 --- a/tests/ui/traits/negative-bounds/supertrait.rs +++ b/tests/ui/traits/negative-bounds/supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_bounds)] diff --git a/tests/ui/traits/negative-impls/eager-mono.rs b/tests/ui/traits/negative-impls/eager-mono.rs index ce770376c0b2f..dd2f6f279534f 100644 --- a/tests/ui/traits/negative-impls/eager-mono.rs +++ b/tests/ui/traits/negative-impls/eager-mono.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-C link-dead-code=y +//@ build-pass +//@ compile-flags:-C link-dead-code=y #![feature(negative_impls)] diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs index 05345d3432b62..2d376a9b0562e 100644 --- a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs +++ b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![feature(negative_impls)] diff --git a/tests/ui/traits/negative-impls/negative-impls-basic.rs b/tests/ui/traits/negative-impls/negative-impls-basic.rs index 474e0381799bd..3d766cc785d5b 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 +//@ run-pass #![feature(negative_impls)] #![allow(dead_code)] diff --git a/tests/ui/traits/negative-impls/negative-specializes-negative.rs b/tests/ui/traits/negative-impls/negative-specializes-negative.rs index 01829e4130115..bb2856ae7e7ca 100644 --- a/tests/ui/traits/negative-impls/negative-specializes-negative.rs +++ b/tests/ui/traits/negative-impls/negative-specializes-negative.rs @@ -3,7 +3,7 @@ // Test a negative impl that "specializes" another negative impl. // -// check-pass +//@ check-pass trait MyTrait {} diff --git a/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs b/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs index c1f96ab8c149e..30b82f1f3f71e 100644 --- a/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs +++ b/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] -// aux-build: foreign_trait.rs +//@ aux-build: foreign_trait.rs // Test that we cannot implement `LocalTrait` for `String`, // even though there is a `String: !ForeignTrait` impl. diff --git a/tests/ui/traits/next-solver/alias-bound-preference.rs b/tests/ui/traits/next-solver/alias-bound-preference.rs index 1c6e12096105c..99008bddf4ffb 100644 --- a/tests/ui/traits/next-solver/alias-bound-preference.rs +++ b/tests/ui/traits/next-solver/alias-bound-preference.rs @@ -1,6 +1,6 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver +//@ run-pass // A test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/45. diff --git a/tests/ui/traits/next-solver/alias-bound-unsound.rs b/tests/ui/traits/next-solver/alias-bound-unsound.rs index a520bf6c25b04..a5bd3e7afa846 100644 --- a/tests/ui/traits/next-solver/alias-bound-unsound.rs +++ b/tests/ui/traits/next-solver/alias-bound-unsound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Makes sure that alias bounds are not unsound! diff --git a/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs index aa7c94791a739..65d55bac968e8 100644 --- a/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs +++ b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Foo { type Gat<'a> diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs index 04d1b949692cd..1903f87f35a99 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // check that a goal such as `alias-eq(::Assoc, ::Assoc)` // succeeds with a constraint that `?0 = bool` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs index 48157192a10bc..f45ee58fcc44d 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver -// check-pass +//@ check-pass // (should not pass, should be turned into a coherence-only test) // check that when computing `alias-eq(<() as Foo>::Assoc, <() as Foo>::Assoc)` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs index 21ad1a4fa3c2f..48c4826ffc709 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // test that the new solver can handle `alias-eq(::Assoc, u32)` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs index 4717aa80499a4..1365db4869b91 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // check that a `alias-eq(::Assoc, ::Assoc)` goal fails // during coherence. We must not incorrectly constrain `?a` and `?b` to be diff --git a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs index 91cfda37adf63..554ec8b560e13 100644 --- a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs +++ b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // regression test for trait-system-refactor-initiative#68 trait Identity { type Assoc: ?Sized; diff --git a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs index 88bbd13f9a2d7..633092023c177 100644 --- a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs +++ b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn test(x: T::Item) -> impl Sized { x diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs index 915643f1d2a89..cb9fe176ac958 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs index 871e8e1e9fcba..8d92c88ae7251 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs index 2629a124c3a9b..c813f94a90464 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Not exactly sure if this is the inference behavior we *want*, // but it is a side-effect of the lazy normalization of TAITs. diff --git a/tests/ui/traits/next-solver/alias-sub.rs b/tests/ui/traits/next-solver/alias-sub.rs index f7f23a024dd0e..fb77990392bbb 100644 --- a/tests/ui/traits/next-solver/alias-sub.rs +++ b/tests/ui/traits/next-solver/alias-sub.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Assoc: Sized; diff --git a/tests/ui/traits/next-solver/array-default.rs b/tests/ui/traits/next-solver/array-default.rs index 6bfbce7d433d2..63dbd8255391b 100644 --- a/tests/ui/traits/next-solver/array-default.rs +++ b/tests/ui/traits/next-solver/array-default.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn has_default() where [(); N]: Default {} diff --git a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs index 99a368a746f77..e4332ced52142 100644 --- a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs +++ b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Reader: Default { fn read_u8_array(&self) -> Result { diff --git a/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs index 4401abd07834a..b50577485df2e 100644 --- a/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs +++ b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Checks that we do not get ambiguity by considering an impl // multiple times if we're able to normalize the self type. diff --git a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs index 1edc1a8c58c7d..03d03e4a91d9d 100644 --- a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs +++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // In the new solver, we are trying to select `::Item: Debug`, // which, naively can be unified with every impl of `Debug` if we're not careful. diff --git a/tests/ui/traits/next-solver/async.rs b/tests/ui/traits/next-solver/async.rs index 5833c052234be..129e4cfaa028b 100644 --- a/tests/ui/traits/next-solver/async.rs +++ b/tests/ui/traits/next-solver/async.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass use std::future::Future; diff --git a/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs index d4010a55244f6..c82c17931194a 100644 --- a/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs +++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass #![feature(negative_impls)] diff --git a/tests/ui/traits/next-solver/borrowck-error.rs b/tests/ui/traits/next-solver/borrowck-error.rs index 25f1445941b10..1de13d7fd78c4 100644 --- a/tests/ui/traits/next-solver/borrowck-error.rs +++ b/tests/ui/traits/next-solver/borrowck-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver use std::collections::HashMap; diff --git a/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs index eab25214d635c..ccb10bab6c1bc 100644 --- a/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs +++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs index ea2740523c9ba..6c07817ff0329 100644 --- a/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs +++ b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs index b1e4a9e58cfbb..2f9e919da2e04 100644 --- a/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs +++ b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Mirror { type Item; diff --git a/tests/ui/traits/next-solver/canonicalize-effect-var.rs b/tests/ui/traits/next-solver/canonicalize-effect-var.rs index 4a13ba37303bf..6d0f09bb9be63 100644 --- a/tests/ui/traits/next-solver/canonicalize-effect-var.rs +++ b/tests/ui/traits/next-solver/canonicalize-effect-var.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(effects)] #![feature(const_trait_impl)] diff --git a/tests/ui/traits/next-solver/cast-checks-handling-projections.rs b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs index 406b4dc1211f2..4edcc97d09e33 100644 --- a/tests/ui/traits/next-solver/cast-checks-handling-projections.rs +++ b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn main() { (0u8 + 0u8) as char; diff --git a/tests/ui/traits/next-solver/closure-inference-guidance.rs b/tests/ui/traits/next-solver/closure-inference-guidance.rs index 8175b92f882bc..4ee58a4ad0c7d 100644 --- a/tests/ui/traits/next-solver/closure-inference-guidance.rs +++ b/tests/ui/traits/next-solver/closure-inference-guidance.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(i: isize) -> isize { i + 1 } diff --git a/tests/ui/traits/next-solver/closure-signature-inference-2.rs b/tests/ui/traits/next-solver/closure-signature-inference-2.rs index 8fece7ba91f17..4b438e673a80c 100644 --- a/tests/ui/traits/next-solver/closure-signature-inference-2.rs +++ b/tests/ui/traits/next-solver/closure-signature-inference-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn map U>(f: F) { f(T::default()); diff --git a/tests/ui/traits/next-solver/closure-signature-inference.rs b/tests/ui/traits/next-solver/closure-signature-inference.rs index 355fc790229d0..00f8a21eb2fd1 100644 --- a/tests/ui/traits/next-solver/closure-signature-inference.rs +++ b/tests/ui/traits/next-solver/closure-signature-inference.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct A; impl A { diff --git a/tests/ui/traits/next-solver/closure-substs-ambiguity.rs b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs index cc9ee58f27fd7..f0f2974e2608a 100644 --- a/tests/ui/traits/next-solver/closure-substs-ambiguity.rs +++ b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn main() { let mut x: Vec<_> = vec![]; diff --git a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs index bcb48b5acc74d..cc78dc20eafc4 100644 --- a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs +++ b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/traits/next-solver/coherence/issue-102048.rs b/tests/ui/traits/next-solver/coherence/issue-102048.rs index 600e63d4d445f..64b223822c6ec 100644 --- a/tests/ui/traits/next-solver/coherence/issue-102048.rs +++ b/tests/ui/traits/next-solver/coherence/issue-102048.rs @@ -17,7 +17,7 @@ // that to `i32`. We then try to unify `i32` from `impl1` with `u32` from `impl2` which fails, // causing coherence to consider these two impls distinct. -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver pub trait Trait {} pub trait WithAssoc1<'a> { diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs index d7a2c8e7a928e..66409f171e6e3 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Coherence should handle overflow while normalizing for // `trait_ref_is_knowable` correctly. diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs index e6ffb55b4416b..aa1c20f5b8e92 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Id { type Assoc; diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs index d16f9d22ce087..f85b865952efa 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::future::{Future, IntoFuture}; use std::pin::Pin; diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs index 90de6b847d08c..98fd98ac28255 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Id { type Assoc; diff --git a/tests/ui/traits/next-solver/const-param-placeholder.rs b/tests/ui/traits/next-solver/const-param-placeholder.rs index c22bc54cfcab4..3dd5cd1f5dd7c 100644 --- a/tests/ui/traits/next-solver/const-param-placeholder.rs +++ b/tests/ui/traits/next-solver/const-param-placeholder.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: pass fail +//@[pass] check-pass struct Wrapper([T; N]); diff --git a/tests/ui/traits/next-solver/coroutine.rs b/tests/ui/traits/next-solver/coroutine.rs index 727e235685960..2b5bf01cefd7d 100644 --- a/tests/ui/traits/next-solver/coroutine.rs +++ b/tests/ui/traits/next-solver/coroutine.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass #![feature(coroutine_trait, coroutines)] diff --git a/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs index 947b52da7c204..bb168e2cd7ae0 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Proving `W: Trait` instantiates `?0` with `(W, W)` and then // proves `W: Trait` and `W: Trait`, resulting in a coinductive cycle. diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs index a3c07b98722d4..7eea81ce03c66 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // This test is incredibly subtle. At its core the goal is to get a coinductive cycle, diff --git a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs index 0f19bc2c59222..0d3872142087a 100644 --- a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs +++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // Test that having both an inductive and a coinductive cycle diff --git a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs index f6c75317a34e4..f7ed0e100c466 100644 --- a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs +++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // Check that we correctly rerun the trait solver for heads of cycles, diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs index fdc7afea378fa..b0c778e7f5742 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(trivial_bounds, marker_trait_attr)] #![allow(trivial_bounds)] // This previously triggered a bug in the provisional cache. diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs index d6d9762bb73dd..edcf2e5472b49 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trivial_bounds, marker_trait_attr)] #![allow(trivial_bounds)] diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs index a32f7a13a03ac..527ca812efb8b 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(rustc_attrs, marker_trait_attr)] #[rustc_coinductive] trait Trait {} diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs index efeb8d0231e25..9cbcc5a3cdf2f 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // This currently hangs if we do not erase constraints from // overflow. diff --git a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs index f2f6e009d5413..78683372580be 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs, trivial_bounds)] // We have to be careful here: diff --git a/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs index 9ff362ec882f1..c6ec4fd39de11 100644 --- a/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs +++ b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] #[rustc_coinductive] diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs index 424508dd9d924..6d75d24186430 100644 --- a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs +++ b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // A test intended to check how we handle provisional results diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs index 300f30ecad2fa..c939a6e5ef2f7 100644 --- a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs +++ b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // A test showcasing that the solver may need to diff --git a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs index ab7c4c7601b1a..b005b909aedbe 100644 --- a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs +++ b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] // A test showcasing that using a provisional cache can differ diff --git a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs index 0f3b84ce52005..683a4fe48317a 100644 --- a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs +++ b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // This tests checks that we update results in the provisional cache when // we pop a goal from the stack. diff --git a/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs index f9f5a1dc24d47..a0fe7f0d0a5ba 100644 --- a/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs +++ b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // FIXME(-Znext-solver): This test is currently broken because the `deduce_closure_signature` // is unable to look at nested obligations. trait Foo { diff --git a/tests/ui/traits/next-solver/deduce-ty-from-object.rs b/tests/ui/traits/next-solver/deduce-ty-from-object.rs index b627fd720e313..ea187b506acf1 100644 --- a/tests/ui/traits/next-solver/deduce-ty-from-object.rs +++ b/tests/ui/traits/next-solver/deduce-ty-from-object.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn main() { let x: Box> = Box::new(std::iter::empty()); diff --git a/tests/ui/traits/next-solver/dedup-regions.rs b/tests/ui/traits/next-solver/dedup-regions.rs index dd406333f2790..6efc1aad20d21 100644 --- a/tests/ui/traits/next-solver/dedup-regions.rs +++ b/tests/ui/traits/next-solver/dedup-regions.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct A(*mut ()); diff --git a/tests/ui/traits/next-solver/destruct.rs b/tests/ui/traits/next-solver/destruct.rs index 5093344e4b6b4..f595cb30db846 100644 --- a/tests/ui/traits/next-solver/destruct.rs +++ b/tests/ui/traits/next-solver/destruct.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs index da07869f3b63e..12fb3d0d9e146 100644 --- a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs +++ b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs index 9123871db9790..31517f6655f0d 100644 --- a/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs +++ b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Iter<'a, I: 'a>: Iterator {} diff --git a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs index 1e1ef8c23a2fd..cbe489a0430a8 100644 --- a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs +++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver=coherence +//@ compile-flags: -Znext-solver=coherence // Makes sure we don't ICE on associated const projection when the feature gate // is not enabled, since we should avoid encountering ICEs on stable if possible. diff --git a/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs index a85098a95ad6c..207797faa144b 100644 --- a/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs +++ b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Eq<'a, 'b, T> {} diff --git a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs index fd1682cd61acb..2f7ea3bb09548 100644 --- a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs +++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Test that we don't incorrectly leak unconstrained inference variables // if the projection contained an error. This caused an ICE in writeback. diff --git a/tests/ui/traits/next-solver/dont-remap-tait-substs.rs b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs index b089f0df3c786..904bc17949590 100644 --- a/tests/ui/traits/next-solver/dont-remap-tait-substs.rs +++ b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Makes sure we don't prepopulate the MIR typeck of `define` // with `Foo = T`, but instead, `Foo = B`, so that diff --git a/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs index 9720a653e2bc0..10b746cc9895e 100644 --- a/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs +++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs @@ -1,5 +1,5 @@ -// revisions: is_send not_send -// compile-flags: -Znext-solver +//@ revisions: is_send not_send +//@ compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] 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 bb1c24a001fb4..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 -// check-pass +//@ compile-flags: -Znext-solver +//@ 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/next-solver/elaborate-item-bounds.rs b/tests/ui/traits/next-solver/elaborate-item-bounds.rs index 0f1f6c0445c1f..c9edf37b7db03 100644 --- a/tests/ui/traits/next-solver/elaborate-item-bounds.rs +++ b/tests/ui/traits/next-solver/elaborate-item-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo { type Bar: Bar; diff --git a/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs b/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs index 37730d38c7a64..362f911c14428 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // If a trait goal is proven using the environment, we discard // impl candidates when normalizing. However, in this example diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs index 63742d0d1a1e8..ce2d6304875bc 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Normalizing `::TraitAssoc` in the elaborated environment // `[T: Trait, T: Super, ::SuperAssoc = ::TraitAssoc]` diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs index b0ef0d44baf80..583d3c18fafa3 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs @@ -1,6 +1,6 @@ -// revisions: next current -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: next current +//@[next] compile-flags: -Znext-solver +//@ check-pass #![allow(warnings)] trait Trait { diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs index 807e19a4a5869..da6f2908ab1f2 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // If we normalize using the impl here the constraints from normalization and // trait goals can differ. This is especially bad if normalization results diff --git a/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs b/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs index af2c44ea23398..e66d1c485f899 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Checks whether the new solver is smart enough to infer `?0 = U` when solving: // `normalizes-to( as Trait>::Assoc, u8)` diff --git a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs index 5989e605bd9aa..ce7a380f07a6b 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo { type Assoc; diff --git a/tests/ui/traits/next-solver/equating-projection-cyclically.rs b/tests/ui/traits/next-solver/equating-projection-cyclically.rs index e7c80cfd797d7..317eb65745a6f 100644 --- a/tests/ui/traits/next-solver/equating-projection-cyclically.rs +++ b/tests/ui/traits/next-solver/equating-projection-cyclically.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Test { type Assoc; diff --git a/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs index 77bedc351e75d..fd4d95b1b71de 100644 --- a/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs +++ b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trivial { type Assoc; diff --git a/tests/ui/traits/next-solver/float-canonical.rs b/tests/ui/traits/next-solver/float-canonical.rs index 90d75bacbf413..2d86fc9bdc0b4 100644 --- a/tests/ui/traits/next-solver/float-canonical.rs +++ b/tests/ui/traits/next-solver/float-canonical.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(x: f64) { let y = x + 1.0; diff --git a/tests/ui/traits/next-solver/fn-trait-closure.rs b/tests/ui/traits/next-solver/fn-trait-closure.rs index cd2ae1f6fb2af..e9d332455c04e 100644 --- a/tests/ui/traits/next-solver/fn-trait-closure.rs +++ b/tests/ui/traits/next-solver/fn-trait-closure.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn require_fn(_: impl Fn() -> i32) {} diff --git a/tests/ui/traits/next-solver/fn-trait.rs b/tests/ui/traits/next-solver/fn-trait.rs index 1e3d8a21c7ccf..6d6ae9260b0f3 100644 --- a/tests/ui/traits/next-solver/fn-trait.rs +++ b/tests/ui/traits/next-solver/fn-trait.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver fn require_fn(_: impl Fn() -> i32) {} diff --git a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs index 4a70bd5f8154b..afef0e5537c70 100644 --- a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs +++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // A minimization of an ambiguity when using typenum. See // https://github.com/rust-lang/trait-system-refactor-initiative/issues/55 diff --git a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs index 70758e7deaace..4de5eda3a7988 100644 --- a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs +++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// known-bug: trait-system-refactor-initiative#60 +//@ compile-flags: -Znext-solver +//@ known-bug: trait-system-refactor-initiative#60 // Generalizing a projection containing an inference variable // which cannot be named by the `root_vid` can result in ambiguity. diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs index e51508d684f9c..78fbe44152788 100644 --- a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs +++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs @@ -1,10 +1,10 @@ -// revisions: old next -//[old] check-pass +//@ revisions: old next +//@[old] check-pass // Currently always fails to generalize the outer alias, even if it // is treated as rigid by `alias-relate`. -//[next] compile-flags: -Znext-solver -//[next] known-bug: trait-system-refactor-initiative#8 +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: trait-system-refactor-initiative#8 #![crate_type = "lib"] #![allow(unused)] trait Unnormalizable { diff --git a/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs index b87210d7fb390..306eaddae1bcf 100644 --- a/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs +++ b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait<'a> { type Item: for<'b> Trait2<'b>; diff --git a/tests/ui/traits/next-solver/int-var-alias-eq.rs b/tests/ui/traits/next-solver/int-var-alias-eq.rs index 26ba7f8e511e1..2459b3678dd53 100644 --- a/tests/ui/traits/next-solver/int-var-alias-eq.rs +++ b/tests/ui/traits/next-solver/int-var-alias-eq.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // HIR typeck ends up equating `::Output == ?0i`. // Want to make sure that we emit an alias-eq goal for this, diff --git a/tests/ui/traits/next-solver/int-var-is-send.rs b/tests/ui/traits/next-solver/int-var-is-send.rs index d8b963f20084a..9c9a91a53ae6e 100644 --- a/tests/ui/traits/next-solver/int-var-is-send.rs +++ b/tests/ui/traits/next-solver/int-var-is-send.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn needs_send(_: impl Send) {} diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs index c50276c78b4f8..8667b3fe466c8 100644 --- a/tests/ui/traits/next-solver/issue-118950-root-region.rs +++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // // This is a gnarly test but I don't know how to minimize it, frankly. diff --git a/tests/ui/traits/next-solver/iter-filter-projection.rs b/tests/ui/traits/next-solver/iter-filter-projection.rs index f948831ad52c6..d111c1c687dbb 100644 --- a/tests/ui/traits/next-solver/iter-filter-projection.rs +++ b/tests/ui/traits/next-solver/iter-filter-projection.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::{iter, slice}; diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs index f9e73a93c271d..62803b39f7798 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 94358 fn foo(_: C) diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs index b85f9d9736c5c..51b7f57f7e60c 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass pub trait With { type F; diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs index 5fb4832dd08ca..0d4f128cc7734 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 96750 use std::marker::PhantomData; diff --git a/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs index 16e95e94ce5d3..74164ad2aa2d8 100644 --- a/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs +++ b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Ty; diff --git a/tests/ui/traits/next-solver/more-object-bound.rs b/tests/ui/traits/next-solver/more-object-bound.rs index 8522f034d87df..511111af83f3d 100644 --- a/tests/ui/traits/next-solver/more-object-bound.rs +++ b/tests/ui/traits/next-solver/more-object-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // From #80800 trait SuperTrait { diff --git a/tests/ui/traits/next-solver/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/negative-coherence-bounds.rs index 5436b02c3ded2..d98cd1147efec 100644 --- a/tests/ui/traits/next-solver/negative-coherence-bounds.rs +++ b/tests/ui/traits/next-solver/negative-coherence-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test verifies that negative trait predicate cannot be satisfied from a // positive param-env candidate. diff --git a/tests/ui/traits/next-solver/nested-alias-bound.rs b/tests/ui/traits/next-solver/nested-alias-bound.rs index 2e3de0ac66d05..5aa887c171f3b 100644 --- a/tests/ui/traits/next-solver/nested-alias-bound.rs +++ b/tests/ui/traits/next-solver/nested-alias-bound.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait A { type A: B; diff --git a/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs index 94c6c2856806a..b0695f6afec12 100644 --- a/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs +++ b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 96230 use std::fmt::Debug; diff --git a/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs index b58db2be841cc..8cdde4f4d51db 100644 --- a/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs +++ b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// check-pass -// edition:2021 +//@ compile-flags: -Znext-solver +//@ check-pass +//@ edition:2021 trait Foo { async fn bar() {} diff --git a/tests/ui/traits/next-solver/normalize-param-env-1.rs b/tests/ui/traits/next-solver/normalize-param-env-1.rs index 92d4051378b84..6f5fdd561f4e4 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-1.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 108933 trait Add { diff --git a/tests/ui/traits/next-solver/normalize-param-env-2.rs b/tests/ui/traits/next-solver/normalize-param-env-2.rs index 9da1f8dbec1de..bc387ff6d1cd7 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-2.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// known-bug: #92505 +//@ compile-flags: -Znext-solver +//@ known-bug: #92505 // When checking that the impl method where-bounds are implied by the trait, // we prove `<() as A>::Assoc: A` in the environment `<() as A>::Assoc: A`. diff --git a/tests/ui/traits/next-solver/normalize-param-env-3.rs b/tests/ui/traits/next-solver/normalize-param-env-3.rs index e15e1155a1a09..9d895df5d3ee4 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-3.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 100177 trait GenericTrait {} diff --git a/tests/ui/traits/next-solver/normalize-param-env-4.rs b/tests/ui/traits/next-solver/normalize-param-env-4.rs index d49f74922971f..b28fe5c3bd89b 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-4.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-4.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] known-bug: #92505 -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: #92505 +//@[current] check-pass trait Trait { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-path-for-method.rs b/tests/ui/traits/next-solver/normalize-path-for-method.rs index b95454306cd69..bbb66574ea3f8 100644 --- a/tests/ui/traits/next-solver/normalize-path-for-method.rs +++ b/tests/ui/traits/next-solver/normalize-path-for-method.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs index d308b1695f532..8e6c686663577 100644 --- a/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs +++ b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Verify that we can assemble inherent impl candidates on a possibly // unnormalized self type. diff --git a/tests/ui/traits/next-solver/normalize-region-obligations.rs b/tests/ui/traits/next-solver/normalize-region-obligations.rs index d189e4893a320..7bf3274f9c634 100644 --- a/tests/ui/traits/next-solver/normalize-region-obligations.rs +++ b/tests/ui/traits/next-solver/normalize-region-obligations.rs @@ -1,6 +1,6 @@ -// revisions: normalize_param_env normalize_obligation hrtb -// check-pass -// compile-flags: -Znext-solver +//@ revisions: normalize_param_env normalize_obligation hrtb +//@ check-pass +//@ compile-flags: -Znext-solver trait Foo { #[cfg(normalize_param_env)] diff --git a/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs b/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs index 7477c56cd5487..6f2756d852449 100644 --- a/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs +++ b/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-type-outlives.rs b/tests/ui/traits/next-solver/normalize-type-outlives.rs index f50eb6326e239..6c633b58aedd6 100644 --- a/tests/ui/traits/next-solver/normalize-type-outlives.rs +++ b/tests/ui/traits/next-solver/normalize-type-outlives.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tr<'a> { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-unsize-rhs.rs b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs index 08bb0cf42e805..dc5912b123a46 100644 --- a/tests/ui/traits/next-solver/normalize-unsize-rhs.rs +++ b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trait_upcasting)] trait A {} diff --git a/tests/ui/traits/next-solver/normalized-const-built-in-op.rs b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs index 0fffe7b4369a8..d82e0b8d43ff6 100644 --- a/tests/ui/traits/next-solver/normalized-const-built-in-op.rs +++ b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass const fn foo() { let mut x = [1, 2, 3]; diff --git a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs index 6e709d9ae8ecc..11a2617ad4278 100644 --- a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs +++ b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// ignore-test +//@ compile-flags: -Znext-solver +//@ ignore-test trait Trait { type Gat<'lt>; diff --git a/tests/ui/traits/next-solver/object-unsafety.rs b/tests/ui/traits/next-solver/object-unsafety.rs index cfa53948b97fd..c9b3b1566a4b4 100644 --- a/tests/ui/traits/next-solver/object-unsafety.rs +++ b/tests/ui/traits/next-solver/object-unsafety.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Setup { type From: Copy; diff --git a/tests/ui/traits/next-solver/opportunistic-region-resolve.rs b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs index d852332d0e59e..b1d89e3267126 100644 --- a/tests/ui/traits/next-solver/opportunistic-region-resolve.rs +++ b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs index a465bcecfe076..186d0e8be56e8 100644 --- a/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs +++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Trait {} diff --git a/tests/ui/traits/next-solver/overflow/global-cache.rs b/tests/ui/traits/next-solver/overflow/global-cache.rs index fe4032ca62eaf..5c5f8e1d1a271 100644 --- a/tests/ui/traits/next-solver/overflow/global-cache.rs +++ b/tests/ui/traits/next-solver/overflow/global-cache.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Check that we consider the reached depth of global cache // entries when detecting overflow. We would otherwise be unstable diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs index 03ef93dc233df..dee5500aaddbd 100644 --- a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs +++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver=coherence -// check-pass +//@ compile-flags: -Znext-solver=coherence +//@ check-pass // A regression test for trait-system-refactor-initiative#70. diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs index 52a17a1428133..fb668f83b0188 100644 --- a/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs +++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs @@ -2,8 +2,8 @@ //~| ERROR overflow evaluating the requirement `Self: Trait` // This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE. -// compile-flags: -Znext-solver --crate-type=lib -// check-fail +//@ compile-flags: -Znext-solver --crate-type=lib +//@ check-fail #![recursion_limit = "0"] trait Trait {} diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs index 983a0fec65349..0f01a453b332e 100644 --- a/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs +++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo1 { type Assoc1; diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs index 40e2aa9e63f31..f435b48737e23 100644 --- a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs +++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo { type Assoc; diff --git a/tests/ui/traits/next-solver/param-discr-kind.rs b/tests/ui/traits/next-solver/param-discr-kind.rs index c66b0b9f45f8a..310ee45c76348 100644 --- a/tests/ui/traits/next-solver/param-discr-kind.rs +++ b/tests/ui/traits/next-solver/param-discr-kind.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(x: T) { std::mem::discriminant(&x); diff --git a/tests/ui/traits/next-solver/pointee.rs b/tests/ui/traits/next-solver/pointee.rs index a56df549a8d36..a861ce825162f 100644 --- a/tests/ui/traits/next-solver/pointee.rs +++ b/tests/ui/traits/next-solver/pointee.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(ptr_metadata)] use std::ptr::{DynMetadata, Pointee}; diff --git a/tests/ui/traits/next-solver/pointer-like.rs b/tests/ui/traits/next-solver/pointer-like.rs index f6cc718c6e218..bdcad4d4c5eb2 100644 --- a/tests/ui/traits/next-solver/pointer-like.rs +++ b/tests/ui/traits/next-solver/pointer-like.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(pointer_like_trait)] diff --git a/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs index a47f819f1928f..11ee6aa8b22a0 100644 --- a/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs +++ b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo {} diff --git a/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs index f8c0223e1876e..ca98eee1981c5 100644 --- a/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs +++ b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo<'a> {} trait Bar<'a> {} diff --git a/tests/ui/traits/next-solver/projection-discr-kind.rs b/tests/ui/traits/next-solver/projection-discr-kind.rs index bf557f8633a04..8d62937e07b51 100644 --- a/tests/ui/traits/next-solver/projection-discr-kind.rs +++ b/tests/ui/traits/next-solver/projection-discr-kind.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Check that `::Discriminant` doesn't normalize // to itself and cause overflow/ambiguity. diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs index b337c06737421..6ca8982c4fa49 100644 --- a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs +++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1 // a minimization of a pattern in core. diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs index db8dc1eb9bed2..874372918de16 100644 --- a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs +++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1, // a minimization of a pattern in core. diff --git a/tests/ui/traits/next-solver/slice-match-byte-lit.rs b/tests/ui/traits/next-solver/slice-match-byte-lit.rs index 1edc9f1e8e95e..9416f734b2d24 100644 --- a/tests/ui/traits/next-solver/slice-match-byte-lit.rs +++ b/tests/ui/traits/next-solver/slice-match-byte-lit.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn test(s: &[u8]) { match &s[0..3] { diff --git a/tests/ui/traits/next-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs index 9b35a2677438a..41c9032201138 100644 --- a/tests/ui/traits/next-solver/specialization-transmute.rs +++ b/tests/ui/traits/next-solver/specialization-transmute.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver //~^ ERROR cannot normalize `::Id: '_` #![feature(specialization)] diff --git a/tests/ui/traits/next-solver/specialization-unconstrained.rs b/tests/ui/traits/next-solver/specialization-unconstrained.rs index 950fb1512bc2e..f4046fba20b2e 100644 --- a/tests/ui/traits/next-solver/specialization-unconstrained.rs +++ b/tests/ui/traits/next-solver/specialization-unconstrained.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs index f5bf985cdb2dd..4ca523ebc5675 100644 --- a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs +++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: fallback constrain -//[constrain] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: fallback constrain +//@[constrain] check-pass // Tests that we stall the `{integer}: Foo` obligation until after we // constrain the int type (or fallback occurs). diff --git a/tests/ui/traits/next-solver/structural-resolve-field.rs b/tests/ui/traits/next-solver/structural-resolve-field.rs index b247e237534a6..21700bc3a00f7 100644 --- a/tests/ui/traits/next-solver/structural-resolve-field.rs +++ b/tests/ui/traits/next-solver/structural-resolve-field.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #[derive(Default)] struct Foo { diff --git a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs index 8e0378e94f043..ee6a7a0986dd6 100644 --- a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs +++ b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(trait_upcasting)] pub trait A {} diff --git a/tests/ui/traits/next-solver/try-example.rs b/tests/ui/traits/next-solver/try-example.rs index 92b0b59788104..b39bc247aab1b 100644 --- a/tests/ui/traits/next-solver/try-example.rs +++ b/tests/ui/traits/next-solver/try-example.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver use std::error::Error; diff --git a/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs index d25e372b5d896..40d68dbaffdf0 100644 --- a/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs +++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // When we're solving `::Assoc = i32`, we actually first solve // `::Assoc = ?1t`, then unify `?1t` with `i32`. That goal diff --git a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs index 77a169d48deac..8ed903f892536 100644 --- a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs +++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: works fails -//[works] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: works fails +//@[works] check-pass trait Trait {} diff --git a/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs index f66bf0b87ec8b..89e3600bbbea1 100644 --- a/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs +++ b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct Foo(*mut ()); diff --git a/tests/ui/traits/next-solver/unsize-although-ambiguous.rs b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs index 8217701b9f8e0..c55632174ec4f 100644 --- a/tests/ui/traits/next-solver/unsize-although-ambiguous.rs +++ b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver use std::fmt::Display; diff --git a/tests/ui/traits/next-solver/unsize-good.rs b/tests/ui/traits/next-solver/unsize-good.rs index 04ebe66f21c27..4456e4f21884c 100644 --- a/tests/ui/traits/next-solver/unsize-good.rs +++ b/tests/ui/traits/next-solver/unsize-good.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/traits/next-solver/unsound-region-obligation.rs b/tests/ui/traits/next-solver/unsound-region-obligation.rs index b8bfa03538887..32a510d165438 100644 --- a/tests/ui/traits/next-solver/unsound-region-obligation.rs +++ b/tests/ui/traits/next-solver/unsound-region-obligation.rs @@ -1,5 +1,5 @@ //~ ERROR the type `<() as StaticTy>::Item<'a>` does not fulfill the required lifetime -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Regression test for rust-lang/trait-system-refactor-initiative#59 trait StaticTy { diff --git a/tests/ui/traits/next-solver/upcast-right-substs.rs b/tests/ui/traits/next-solver/upcast-right-substs.rs index 5b4f6d4be0ca8..bbb8a039aa7fe 100644 --- a/tests/ui/traits/next-solver/upcast-right-substs.rs +++ b/tests/ui/traits/next-solver/upcast-right-substs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trait_upcasting)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/upcast-wrong-substs.rs index 0cd253007fc54..473977c527c82 100644 --- a/tests/ui/traits/next-solver/upcast-wrong-substs.rs +++ b/tests/ui/traits/next-solver/upcast-wrong-substs.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/winnow-specializing-impls.rs b/tests/ui/traits/next-solver/winnow-specializing-impls.rs index d70a915961161..ec0351f404d7e 100644 --- a/tests/ui/traits/next-solver/winnow-specializing-impls.rs +++ b/tests/ui/traits/next-solver/winnow-specializing-impls.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Znext-solver +//@ build-pass +//@ compile-flags: -Znext-solver // Tests that the specializing impl `<() as Foo>` holds during codegen. diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs index 996cd295dc4c1..26cf6105c50d2 100644 --- a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs +++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete and may not be safe diff --git a/tests/ui/traits/non_lifetime_binders/basic.rs b/tests/ui/traits/non_lifetime_binders/basic.rs index a797aae65dba2..7e45b76434a3b 100644 --- a/tests/ui/traits/non_lifetime_binders/basic.rs +++ b/tests/ui/traits/non_lifetime_binders/basic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Basic test that show's we can succesfully typeck a `for` where clause. #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs b/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs index 2535eb99c59b6..b73b34549adf4 100644 --- a/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs +++ b/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![allow(incomplete_features)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs index b999f251d333e..8202cf1e6eebd 100644 --- a/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs +++ b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs index c65b5ea9ba493..db8f3de2149d4 100644 --- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs +++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs @@ -1,5 +1,5 @@ -// revisions: no yes -//[yes] check-pass +//@ revisions: no yes +//@[yes] check-pass // Issue 110557 diff --git a/tests/ui/traits/non_lifetime_binders/method-probe.rs b/tests/ui/traits/non_lifetime_binders/method-probe.rs index 8df240c2082b7..5f8e31446f523 100644 --- a/tests/ui/traits/non_lifetime_binders/method-probe.rs +++ b/tests/ui/traits/non_lifetime_binders/method-probe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs index 9830241c3770c..e776d5f2f21ad 100644 --- a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs +++ b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/on-rpit.rs b/tests/ui/traits/non_lifetime_binders/on-rpit.rs index c501e057e2830..4d1cacb189083 100644 --- a/tests/ui/traits/non_lifetime_binders/on-rpit.rs +++ b/tests/ui/traits/non_lifetime_binders/on-rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs index ae6866511e277..e87863ab25127 100644 --- a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs +++ b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs @@ -1,6 +1,6 @@ -// revisions: good bad +//@ revisions: good bad -//[good] known-bug: unknown +//@[good] known-bug: unknown // `for T: 'static` doesn't imply itself when processing outlives obligations #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs b/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs index ba55ab0718521..e4c3b4d2c7886 100644 --- a/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs +++ b/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN is incomplete and may not be safe diff --git a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs index 53957914e3ab2..37bb3cea34e6b 100644 --- a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs +++ b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs @@ -1,5 +1,5 @@ -// edition:2021 -// known-bug: unknown +//@ edition:2021 +//@ known-bug: unknown // Checks that test_type_match code doesn't ICE when predicates have late-bound types diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs index bbf1a1f72db6c..0749cbe1140c9 100644 --- a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs +++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs index 5e28a2ba8b9b8..333f4f8038646 100644 --- a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs +++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/normalize-supertrait.rs b/tests/ui/traits/normalize-supertrait.rs index 021a93eacff1f..1ab2b8ecfc108 100644 --- a/tests/ui/traits/normalize-supertrait.rs +++ b/tests/ui/traits/normalize-supertrait.rs @@ -3,7 +3,7 @@ // requires us to normalize the `Base<<() as Proj>::S>` to `Base<()>` when // comparing the supertrait `Derived<()>` to the expected trait. -// build-pass +//@ build-pass trait Proj { type S; diff --git a/tests/ui/traits/object-one-type-two-traits.rs b/tests/ui/traits/object-one-type-two-traits.rs index 86a2094eee098..28f994205d60b 100644 --- a/tests/ui/traits/object-one-type-two-traits.rs +++ b/tests/ui/traits/object-one-type-two-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Testing creating two vtables with the same self type, but different diff --git a/tests/ui/traits/object/auto-dedup.rs b/tests/ui/traits/object/auto-dedup.rs index 39d25eb7fe05b..732a504e750b2 100644 --- a/tests/ui/traits/object/auto-dedup.rs +++ b/tests/ui/traits/object/auto-dedup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] diff --git a/tests/ui/traits/object/bounds-cycle-1.rs b/tests/ui/traits/object/bounds-cycle-1.rs index 3146764927cd8..4f2e74cc1b0d3 100644 --- a/tests/ui/traits/object/bounds-cycle-1.rs +++ b/tests/ui/traits/object/bounds-cycle-1.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::U` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-2.rs b/tests/ui/traits/object/bounds-cycle-2.rs index 4c1df38058dad..b5d11955f1a57 100644 --- a/tests/ui/traits/object/bounds-cycle-2.rs +++ b/tests/ui/traits/object/bounds-cycle-2.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::V` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-3.rs b/tests/ui/traits/object/bounds-cycle-3.rs index 55726a5ae4557..1e45f9535532a 100644 --- a/tests/ui/traits/object/bounds-cycle-3.rs +++ b/tests/ui/traits/object/bounds-cycle-3.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::V` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-4.rs b/tests/ui/traits/object/bounds-cycle-4.rs index f83cb75c7f29b..4fbeaa757cacd 100644 --- a/tests/ui/traits/object/bounds-cycle-4.rs +++ b/tests/ui/traits/object/bounds-cycle-4.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::U` in the // bound below. Make sure that having a lifetime on the trait object doesn't break things -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/exclusion.rs b/tests/ui/traits/object/exclusion.rs index 3abd3bbfccf1f..1f3432aecb875 100644 --- a/tests/ui/traits/object/exclusion.rs +++ b/tests/ui/traits/object/exclusion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Future: 'static { // The requirement for Self: Sized must prevent instantiation of // Future::forget in vtables, otherwise there's an infinite type diff --git a/tests/ui/traits/object/generics.rs b/tests/ui/traits/object/generics.rs index e2e70d43ab848..462b0bc5bb77f 100644 --- a/tests/ui/traits/object/generics.rs +++ b/tests/ui/traits/object/generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test for #8664 use std::marker; diff --git a/tests/ui/traits/object/issue-33140-traitobject-crate.rs b/tests/ui/traits/object/issue-33140-traitobject-crate.rs index 8abd92da362d3..00ef6430d6382 100644 --- a/tests/ui/traits/object/issue-33140-traitobject-crate.rs +++ b/tests/ui/traits/object/issue-33140-traitobject-crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(order_dependent_trait_objects)] #![allow(dyn_drop)] diff --git a/tests/ui/traits/object/lifetime-first.rs b/tests/ui/traits/object/lifetime-first.rs index 33757cb7c0ab1..867ee08f48ca5 100644 --- a/tests/ui/traits/object/lifetime-first.rs +++ b/tests/ui/traits/object/lifetime-first.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; static BYTE: u8 = 33; diff --git a/tests/ui/traits/object/print_vtable_sizes.rs b/tests/ui/traits/object/print_vtable_sizes.rs index f510608537abb..684458d079e5e 100644 --- a/tests/ui/traits/object/print_vtable_sizes.rs +++ b/tests/ui/traits/object/print_vtable_sizes.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z print-vtable-sizes +//@ check-pass +//@ compile-flags: -Z print-vtable-sizes #![crate_type = "lib"] trait A: AsRef<[T::V]> + AsMut<[T::V]> {} diff --git a/tests/ui/traits/object/with-lifetime-bound.rs b/tests/ui/traits/object/with-lifetime-bound.rs index 05aab5e3b085c..9053d2f749432 100644 --- a/tests/ui/traits/object/with-lifetime-bound.rs +++ b/tests/ui/traits/object/with-lifetime-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Uncovered during work on new scoping rules for safe destructors // as an important use case to support properly. diff --git a/tests/ui/traits/object/with-self-in-projection-output-good.rs b/tests/ui/traits/object/with-self-in-projection-output-good.rs index d1b7bf6c2d766..30909e7493ca6 100644 --- a/tests/ui/traits/object/with-self-in-projection-output-good.rs +++ b/tests/ui/traits/object/with-self-in-projection-output-good.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Regression test related to #56288. Check that a supertrait projection (of // `Output`) that references `Self` can be ok if it is referencing a projection (of diff --git a/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs b/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs index 39e817168f610..2d8230973325d 100644 --- a/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs +++ b/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // FIXME(eddyb) shorten the name so windows doesn't choke on it. #![crate_name = "trait_test"] diff --git a/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs b/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs index fce1341fc7415..ec1c582227325 100644 --- a/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs +++ b/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test invoked `&self` methods on owned objects where the values // closed over do not contain managed values, and thus the boxes do // not have headers. diff --git a/tests/ui/traits/operator-overloading-issue-52025.rs b/tests/ui/traits/operator-overloading-issue-52025.rs index 7ce638832b06b..48e2d5e038676 100644 --- a/tests/ui/traits/operator-overloading-issue-52025.rs +++ b/tests/ui/traits/operator-overloading-issue-52025.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// build-pass +//@ only-x86_64 +//@ build-pass use std::arch::x86_64::*; use std::fmt::Debug; diff --git a/tests/ui/traits/overlap-permitted-for-marker-traits.rs b/tests/ui/traits/overlap-permitted-for-marker-traits.rs index 00823d13b3696..c05e5fddae635 100644 --- a/tests/ui/traits/overlap-permitted-for-marker-traits.rs +++ b/tests/ui/traits/overlap-permitted-for-marker-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for RFC 1268: we allow overlapping impls of marker traits, // that is, traits without items. In this case, a type `T` is // `MyMarker` if it is either `Debug` or `Display`. diff --git a/tests/ui/traits/parameterized-with-bounds.rs b/tests/ui/traits/parameterized-with-bounds.rs index 832d4f6c89f09..2de9bf3d04cc8 100644 --- a/tests/ui/traits/parameterized-with-bounds.rs +++ b/tests/ui/traits/parameterized-with-bounds.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/pointee-deduction.rs b/tests/ui/traits/pointee-deduction.rs index 82e3aa1ae892e..541daf2308782 100644 --- a/tests/ui/traits/pointee-deduction.rs +++ b/tests/ui/traits/pointee-deduction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] diff --git a/tests/ui/traits/pointee-normalize-equate.rs b/tests/ui/traits/pointee-normalize-equate.rs index 2e75933aca0cf..3edb010a827b8 100644 --- a/tests/ui/traits/pointee-normalize-equate.rs +++ b/tests/ui/traits/pointee-normalize-equate.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(ptr_metadata)] diff --git a/tests/ui/traits/pointee-tail-is-generic-errors.rs b/tests/ui/traits/pointee-tail-is-generic-errors.rs index 28bc1da964dbc..92a83f40b184c 100644 --- a/tests/ui/traits/pointee-tail-is-generic-errors.rs +++ b/tests/ui/traits/pointee-tail-is-generic-errors.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(ptr_metadata)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/pointee-tail-is-generic.rs b/tests/ui/traits/pointee-tail-is-generic.rs index e0da0fc38613d..e33b2b2f2bc9d 100644 --- a/tests/ui/traits/pointee-tail-is-generic.rs +++ b/tests/ui/traits/pointee-tail-is-generic.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(ptr_metadata)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/principal-less-objects.rs b/tests/ui/traits/principal-less-objects.rs index 5fe01efa4f886..e56f23ab5a20e 100644 --- a/tests/ui/traits/principal-less-objects.rs +++ b/tests/ui/traits/principal-less-objects.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that trait objects without a principal codegen properly. use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/traits/privacy.rs b/tests/ui/traits/privacy.rs index 17a2e05e99f2c..98e9509645d9b 100644 --- a/tests/ui/traits/privacy.rs +++ b/tests/ui/traits/privacy.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] mod foo { pub use self::bar::T; diff --git a/tests/ui/traits/project-modulo-regions.rs b/tests/ui/traits/project-modulo-regions.rs index e88f21ecfe801..3af5fbc7ea76d 100644 --- a/tests/ui/traits/project-modulo-regions.rs +++ b/tests/ui/traits/project-modulo-regions.rs @@ -1,4 +1,4 @@ -// revisions: with_clause without_clause +//@ revisions: with_clause without_clause // Tests that `EvaluatedToOkModuloRegions` from a projection sub-obligation // is correctly propagated diff --git a/tests/ui/traits/region-pointer-simple.rs b/tests/ui/traits/region-pointer-simple.rs index 0456ca931156e..718950388a207 100644 --- a/tests/ui/traits/region-pointer-simple.rs +++ b/tests/ui/traits/region-pointer-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.rs b/tests/ui/traits/reservation-impl/coherence-conflict.rs index cdea162d64a47..558793c25f3c4 100644 --- a/tests/ui/traits/reservation-impl/coherence-conflict.rs +++ b/tests/ui/traits/reservation-impl/coherence-conflict.rs @@ -1,6 +1,6 @@ // check that reservation impls are accounted for in negative reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] trait MyTrait {} diff --git a/tests/ui/traits/reservation-impl/no-use.rs b/tests/ui/traits/reservation-impl/no-use.rs index 10aad3605ea3b..b470a2815c0c7 100644 --- a/tests/ui/traits/reservation-impl/no-use.rs +++ b/tests/ui/traits/reservation-impl/no-use.rs @@ -1,6 +1,6 @@ // check that reservation impls can't be used as normal impls in positive reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] trait MyTrait { fn foo(&self); } diff --git a/tests/ui/traits/reservation-impl/non-lattice-ok.rs b/tests/ui/traits/reservation-impl/non-lattice-ok.rs index 9a3c2b4f991ee..32d610bf915aa 100644 --- a/tests/ui/traits/reservation-impl/non-lattice-ok.rs +++ b/tests/ui/traits/reservation-impl/non-lattice-ok.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Check that a reservation impl does not force other impls to follow // a lattice discipline. @@ -33,8 +33,8 @@ // check that reservation impls can't be used as normal impls in positive reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs, never_type)] diff --git a/tests/ui/traits/reservation-impl/ok.rs b/tests/ui/traits/reservation-impl/ok.rs index 2d945f6adebd8..cf68c1b2e96dc 100644 --- a/tests/ui/traits/reservation-impl/ok.rs +++ b/tests/ui/traits/reservation-impl/ok.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // rpass test for reservation impls. Not 100% required because `From` uses them, // but still. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] diff --git a/tests/ui/traits/safety-ok-cc.rs b/tests/ui/traits/safety-ok-cc.rs index 099ba80e5b51f..fe65ea9d2d7c1 100644 --- a/tests/ui/traits/safety-ok-cc.rs +++ b/tests/ui/traits/safety-ok-cc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:trait_safety_lib.rs +//@ run-pass +//@ aux-build:trait_safety_lib.rs // Simple smoke test that unsafe traits can be compiled across crates. diff --git a/tests/ui/traits/safety-ok.rs b/tests/ui/traits/safety-ok.rs index d456a78b64dcb..432ffb4036216 100644 --- a/tests/ui/traits/safety-ok.rs +++ b/tests/ui/traits/safety-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Simple smoke test that unsafe traits can be compiled etc. diff --git a/tests/ui/traits/safety-trait-impl-cc.rs b/tests/ui/traits/safety-trait-impl-cc.rs index 6f125e5f95021..9099cf24a1670 100644 --- a/tests/ui/traits/safety-trait-impl-cc.rs +++ b/tests/ui/traits/safety-trait-impl-cc.rs @@ -1,4 +1,4 @@ -// aux-build:trait_safety_lib.rs +//@ aux-build:trait_safety_lib.rs // Check that unsafe traits require unsafe impls and that inherent // impls cannot be unsafe. diff --git a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs index 5449f5f00d52a..f644728ee114a 100644 --- a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs +++ b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that we're correctly dealing with inductive cycles // with canonical inference variables. diff --git a/tests/ui/traits/static-method-overwriting.rs b/tests/ui/traits/static-method-overwriting.rs index f669ffae6bb5d..7a2a51a4b9959 100644 --- a/tests/ui/traits/static-method-overwriting.rs +++ b/tests/ui/traits/static-method-overwriting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] mod base { pub trait HasNew { diff --git a/tests/ui/traits/static-outlives-a-where-clause.rs b/tests/ui/traits/static-outlives-a-where-clause.rs index f0c2c1082b09f..c3db2eb83515a 100644 --- a/tests/ui/traits/static-outlives-a-where-clause.rs +++ b/tests/ui/traits/static-outlives-a-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo<'a> { fn xyz(self); diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.fixed b/tests/ui/traits/suggest-dereferences/issue-39029.fixed index a1abf668b8b6e..0e37a2f73a17a 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-39029.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::net::TcpListener; struct NoToSocketAddrs(String); diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.rs b/tests/ui/traits/suggest-dereferences/issue-39029.rs index 90d097105edc6..71ddad93a9334 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.rs +++ b/tests/ui/traits/suggest-dereferences/issue-39029.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::net::TcpListener; struct NoToSocketAddrs(String); diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.fixed b/tests/ui/traits/suggest-dereferences/issue-62530.fixed index 406caaa007fdc..0f011638ead07 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-62530.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn takes_str(_x: &str) {} fn takes_type_parameter(_x: T) where T: SomeTrait {} diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.rs b/tests/ui/traits/suggest-dereferences/issue-62530.rs index 53846be73063d..4367bd1aecaf6 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.rs +++ b/tests/ui/traits/suggest-dereferences/issue-62530.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn takes_str(_x: &str) {} fn takes_type_parameter(_x: T) where T: SomeTrait {} diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.fixed b/tests/ui/traits/suggest-dereferences/multiple-0.fixed index b7160b75c605e..acc55caabd6e5 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.fixed +++ b/tests/ui/traits/suggest-dereferences/multiple-0.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; trait Happy {} diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.rs b/tests/ui/traits/suggest-dereferences/multiple-0.rs index 9ac55177ffadd..f2ea611456144 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.rs +++ b/tests/ui/traits/suggest-dereferences/multiple-0.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; trait Happy {} diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.fixed b/tests/ui/traits/suggest-dereferences/root-obligation.fixed index d03d733c76d0c..eecd52304ff66 100644 --- a/tests/ui/traits/suggest-dereferences/root-obligation.fixed +++ b/tests/ui/traits/suggest-dereferences/root-obligation.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn get_vowel_count(string: &str) -> usize { string diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.rs b/tests/ui/traits/suggest-dereferences/root-obligation.rs index 9d9ffb3f55ef0..d58193f121382 100644 --- a/tests/ui/traits/suggest-dereferences/root-obligation.rs +++ b/tests/ui/traits/suggest-dereferences/root-obligation.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn get_vowel_count(string: &str) -> usize { string diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed index ea3d1bf853a49..03cc6580d5e7b 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct TargetStruct; diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs index 9eda68027b23e..9397f46a43456 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct TargetStruct; diff --git a/tests/ui/traits/suggest-fully-qualified-closure.rs b/tests/ui/traits/suggest-fully-qualified-closure.rs index 6bbb6a95d7d59..f401a3012da1d 100644 --- a/tests/ui/traits/suggest-fully-qualified-closure.rs +++ b/tests/ui/traits/suggest-fully-qualified-closure.rs @@ -1,7 +1,7 @@ -// check-fail -// known-bug: #103705 -// normalize-stderr-test "\{closure@.*\}" -> "{closure@}" -// normalize-stderr-test "\+* ~" -> "+++ ~" +//@ check-fail +//@ known-bug: #103705 +//@ normalize-stderr-test "\{closure@.*\}" -> "{closure@}" +//@ normalize-stderr-test "\+* ~" -> "+++ ~" // The output of this currently suggests writing a closure in the qualified path. diff --git a/tests/ui/traits/superdefault-generics.rs b/tests/ui/traits/superdefault-generics.rs index e862c0e976b31..f3cf4a16df13b 100644 --- a/tests/ui/traits/superdefault-generics.rs +++ b/tests/ui/traits/superdefault-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/syntax-polarity.rs b/tests/ui/traits/syntax-polarity.rs index c809f9e89f934..80ad40bad8071 100644 --- a/tests/ui/traits/syntax-polarity.rs +++ b/tests/ui/traits/syntax-polarity.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(negative_impls)] diff --git a/tests/ui/traits/to-str.rs b/tests/ui/traits/to-str.rs index 9670edbfa2bd9..683edf055515f 100644 --- a/tests/ui/traits/to-str.rs +++ b/tests/ui/traits/to-str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs b/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs index 7e242ed91260e..5983b13185fca 100644 --- a/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs +++ b/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/basic.rs b/tests/ui/traits/trait-upcasting/basic.rs index 570ec5160bfe9..9b9669565bac4 100644 --- a/tests/ui/traits/trait-upcasting/basic.rs +++ b/tests/ui/traits/trait-upcasting/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs b/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs index eae5cf8d58d01..7f4343dbd2f16 100644 --- a/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs +++ b/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/trait-upcasting/diamond.rs b/tests/ui/traits/trait-upcasting/diamond.rs index a4f81c464b402..303c99b67bd00 100644 --- a/tests/ui/traits/trait-upcasting/diamond.rs +++ b/tests/ui/traits/trait-upcasting/diamond.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/fewer-associated.rs b/tests/ui/traits/trait-upcasting/fewer-associated.rs index 58e72d9d7ef57..214293b084021 100644 --- a/tests/ui/traits/trait-upcasting/fewer-associated.rs +++ b/tests/ui/traits/trait-upcasting/fewer-associated.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // issue: 114035 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs index ffed8beb44845..2f15d343f9f7e 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs b/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs index b672963ae9887..ef3d366c38139 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs +++ b/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] struct Test { diff --git a/tests/ui/traits/trait-upcasting/issue-11515.rs b/tests/ui/traits/trait-upcasting/issue-11515.rs index 31ea2fb353cd2..174be31d139cd 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515.rs +++ b/tests/ui/traits/trait-upcasting/issue-11515.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct Test { func: Box, diff --git a/tests/ui/traits/trait-upcasting/lifetime.rs b/tests/ui/traits/trait-upcasting/lifetime.rs index 6486ec3891c68..ab006f8bedcea 100644 --- a/tests/ui/traits/trait-upcasting/lifetime.rs +++ b/tests/ui/traits/trait-upcasting/lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs index 8a90a09ff0411..8e62c4b95b06c 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs +++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs index 2e53a00a90e9c..754437a3bec77 100644 --- a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs +++ b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(trait_upcasting)] trait Bar { diff --git a/tests/ui/traits/trait-upcasting/normalization.rs b/tests/ui/traits/trait-upcasting/normalization.rs index 24da1ec5dfb58..e4b65740ca4ee 100644 --- a/tests/ui/traits/trait-upcasting/normalization.rs +++ b/tests/ui/traits/trait-upcasting/normalization.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // issue: 114113 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/replace-vptr.rs b/tests/ui/traits/trait-upcasting/replace-vptr.rs index 5ef65786bb705..4829e3c5c1240 100644 --- a/tests/ui/traits/trait-upcasting/replace-vptr.rs +++ b/tests/ui/traits/trait-upcasting/replace-vptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/struct.rs b/tests/ui/traits/trait-upcasting/struct.rs index a3e41696956cb..39da20259a043 100644 --- a/tests/ui/traits/trait-upcasting/struct.rs +++ b/tests/ui/traits/trait-upcasting/struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs index 54c3c5e0c28f5..0246b7d056668 100644 --- a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs +++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs index 948f058e5287b..40850b45a0023 100644 --- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs +++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct Wrapper(T); diff --git a/tests/ui/traits/trivial_impl3.rs b/tests/ui/traits/trivial_impl3.rs index 714f643bc994c..e027016d0b8d8 100644 --- a/tests/ui/traits/trivial_impl3.rs +++ b/tests/ui/traits/trivial_impl3.rs @@ -3,7 +3,7 @@ //! which would break this crate. We want to avoid adding //! more ways in which adding an impl can be a breaking change. -// aux-build:trivial3.rs +//@ aux-build:trivial3.rs extern crate trivial3; diff --git a/tests/ui/traits/trivial_impl4.rs b/tests/ui/traits/trivial_impl4.rs index 518f159c1fb65..595f273df6b4b 100644 --- a/tests/ui/traits/trivial_impl4.rs +++ b/tests/ui/traits/trivial_impl4.rs @@ -5,7 +5,7 @@ //! This test differs from `trivial_impl3` because there actually //! exists any impl for `Trait`, which has an effect on coherence. -// aux-build:trivial4.rs +//@ aux-build:trivial4.rs extern crate trivial4; diff --git a/tests/ui/traits/typeclasses-eq-example-static.rs b/tests/ui/traits/typeclasses-eq-example-static.rs index f982ad6a0ddc3..baa759e460c65 100644 --- a/tests/ui/traits/typeclasses-eq-example-static.rs +++ b/tests/ui/traits/typeclasses-eq-example-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/typeclasses-eq-example.rs b/tests/ui/traits/typeclasses-eq-example.rs index 4400301e61ed7..0fb5d25d6dd99 100644 --- a/tests/ui/traits/typeclasses-eq-example.rs +++ b/tests/ui/traits/typeclasses-eq-example.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/ufcs-object.rs b/tests/ui/traits/ufcs-object.rs index 700488c22d678..7a41937753ebd 100644 --- a/tests/ui/traits/ufcs-object.rs +++ b/tests/ui/traits/ufcs-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that when you use ufcs form to invoke a trait method (on a // trait object) everything works fine. diff --git a/tests/ui/traits/unsend-future.rs b/tests/ui/traits/unsend-future.rs index a8367573fbdfa..061897dc02c96 100644 --- a/tests/ui/traits/unsend-future.rs +++ b/tests/ui/traits/unsend-future.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // issue 108897 trait Handler {} diff --git a/tests/ui/traits/upcast_soundness_bug.rs b/tests/ui/traits/upcast_soundness_bug.rs index 32e32850925f7..95b48cdf379e8 100644 --- a/tests/ui/traits/upcast_soundness_bug.rs +++ b/tests/ui/traits/upcast_soundness_bug.rs @@ -1,6 +1,6 @@ #![feature(trait_upcasting)] -// known-bug: #120222 -// check-pass +//@ known-bug: #120222 +//@ check-pass //! This will segfault at runtime. pub trait SupSupA { diff --git a/tests/ui/traits/use-before-def.rs b/tests/ui/traits/use-before-def.rs index e52dc53fbab79..fb7e540db1875 100644 --- a/tests/ui/traits/use-before-def.rs +++ b/tests/ui/traits/use-before-def.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] // Issue #1761 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 impl foo for isize { fn foo(&self) -> isize { 10 } } trait foo { fn foo(&self) -> isize; } diff --git a/tests/ui/traits/vtable/issue-91807.rs b/tests/ui/traits/vtable/issue-91807.rs index f435ff09dc3af..88a2e342adf74 100644 --- a/tests/ui/traits/vtable/issue-91807.rs +++ b/tests/ui/traits/vtable/issue-91807.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental struct Struct(T); diff --git a/tests/ui/traits/vtable/multiple-markers.rs b/tests/ui/traits/vtable/multiple-markers.rs index 1e6e308702762..8a9e7a006cf55 100644 --- a/tests/ui/traits/vtable/multiple-markers.rs +++ b/tests/ui/traits/vtable/multiple-markers.rs @@ -3,7 +3,7 @@ // This test makes sure that multiple marker (method-less) traits can reuse the // same pointer for upcasting. // -// build-fail +//@ build-fail #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/traits/vtable/vtable-diamond.rs b/tests/ui/traits/vtable/vtable-diamond.rs index dc3c17ac3144b..2cfa86c526de3 100644 --- a/tests/ui/traits/vtable/vtable-diamond.rs +++ b/tests/ui/traits/vtable/vtable-diamond.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #[rustc_dump_vtable] diff --git a/tests/ui/traits/vtable/vtable-multi-level.rs b/tests/ui/traits/vtable/vtable-multi-level.rs index ebd55bcf39b17..bedbf84d30398 100644 --- a/tests/ui/traits/vtable/vtable-multi-level.rs +++ b/tests/ui/traits/vtable/vtable-multi-level.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] // O --> G --> C --> A diff --git a/tests/ui/traits/vtable/vtable-multiple.rs b/tests/ui/traits/vtable/vtable-multiple.rs index 7a0111c5ef251..beaaf4db6b1c7 100644 --- a/tests/ui/traits/vtable/vtable-multiple.rs +++ b/tests/ui/traits/vtable/vtable-multiple.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #[rustc_dump_vtable] diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.rs b/tests/ui/traits/vtable/vtable-non-object-safe.rs index 7661bb574613b..f98af0f23b732 100644 --- a/tests/ui/traits/vtable/vtable-non-object-safe.rs +++ b/tests/ui/traits/vtable/vtable-non-object-safe.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] // Ensure that non-object-safe methods in Iterator does not generate diff --git a/tests/ui/traits/vtable/vtable-vacant.rs b/tests/ui/traits/vtable/vtable-vacant.rs index a64796358345f..26de3f606210b 100644 --- a/tests/ui/traits/vtable/vtable-vacant.rs +++ b/tests/ui/traits/vtable/vtable-vacant.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #![feature(negative_impls)] #![allow(where_clauses_object_safety)] diff --git a/tests/ui/traits/wf-object/reverse-order.rs b/tests/ui/traits/wf-object/reverse-order.rs index e90c8763d651f..b8f2aae89663b 100644 --- a/tests/ui/traits/wf-object/reverse-order.rs +++ b/tests/ui/traits/wf-object/reverse-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that `dyn $($AutoTrait)+ ObjSafe` is well-formed. diff --git a/tests/ui/traits/where-clause-vs-impl.rs b/tests/ui/traits/where-clause-vs-impl.rs index 7cfee27efb32a..074c27036c2e1 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 +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when there is a conditional (but blanket) impl and a @@ -6,7 +6,7 @@ // // Issue #18453. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/traits/with-bounds-default.rs b/tests/ui/traits/with-bounds-default.rs index 31f73d79cc7f4..2bc00b683663a 100644 --- a/tests/ui/traits/with-bounds-default.rs +++ b/tests/ui/traits/with-bounds-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Clone2 { /// Returns a copy of the value. The contents of boxes diff --git a/tests/ui/traits/with-dst.rs b/tests/ui/traits/with-dst.rs index a3e3b31df922e..fe83a48af8dcb 100644 --- a/tests/ui/traits/with-dst.rs +++ b/tests/ui/traits/with-dst.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // #55266 struct VTable { diff --git a/tests/ui/transmutability/abstraction/abstracted_assume.rs b/tests/ui/transmutability/abstraction/abstracted_assume.rs index 0225c4230dc4d..0e62dc632bf52 100644 --- a/tests/ui/transmutability/abstraction/abstracted_assume.rs +++ b/tests/ui/transmutability/abstraction/abstracted_assume.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The implementation should behave correctly when the `ASSUME` parameters are //! provided indirectly through an abstraction. diff --git a/tests/ui/transmutability/abstraction/const_generic_fn.rs b/tests/ui/transmutability/abstraction/const_generic_fn.rs index e693a09570f3a..076b7c8999be2 100644 --- a/tests/ui/transmutability/abstraction/const_generic_fn.rs +++ b/tests/ui/transmutability/abstraction/const_generic_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must have the correct length. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/alignment/align-fail.rs b/tests/ui/transmutability/alignment/align-fail.rs index 7f6090a6e4db5..2bb6bfeeaae16 100644 --- a/tests/ui/transmutability/alignment/align-fail.rs +++ b/tests/ui/transmutability/alignment/align-fail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/alignment/align-pass.rs b/tests/ui/transmutability/alignment/align-pass.rs index 62dc672eacb9b..d97a55f730cd6 100644 --- a/tests/ui/transmutability/alignment/align-pass.rs +++ b/tests/ui/transmutability/alignment/align-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/arrays/should_have_correct_length.rs b/tests/ui/transmutability/arrays/should_have_correct_length.rs index 353797d0c4bb0..44a60360014cb 100644 --- a/tests/ui/transmutability/arrays/should_have_correct_length.rs +++ b/tests/ui/transmutability/arrays/should_have_correct_length.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must have the correct length. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/arrays/should_inherit_alignment.rs b/tests/ui/transmutability/arrays/should_inherit_alignment.rs index b00e5c7e4008c..bb78cd82a3439 100644 --- a/tests/ui/transmutability/arrays/should_inherit_alignment.rs +++ b/tests/ui/transmutability/arrays/should_inherit_alignment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must inherit the alignment of its inner type. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/enums/should_order_correctly.rs b/tests/ui/transmutability/enums/should_order_correctly.rs index 1335cc9d2b17e..6146e37e54e8f 100644 --- a/tests/ui/transmutability/enums/should_order_correctly.rs +++ b/tests/ui/transmutability/enums/should_order_correctly.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The payloads of an enum variant should be ordered after its tag. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/issue-110467.rs b/tests/ui/transmutability/issue-110467.rs index 358733b9832c2..6485ed8aab7f7 100644 --- a/tests/ui/transmutability/issue-110467.rs +++ b/tests/ui/transmutability/issue-110467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(transmutability)] use std::mem::BikeshedIntrinsicFrom; diff --git a/tests/ui/transmutability/issue-110892.rs b/tests/ui/transmutability/issue-110892.rs index ce926b3999632..1baf117518bc0 100644 --- a/tests/ui/transmutability/issue-110892.rs +++ b/tests/ui/transmutability/issue-110892.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(generic_const_exprs, transmutability)] #![allow(incomplete_features)] diff --git a/tests/ui/transmutability/primitives/bool-mut.rs b/tests/ui/transmutability/primitives/bool-mut.rs index 6ee168d1a718c..0a74aba8f63a9 100644 --- a/tests/ui/transmutability/primitives/bool-mut.rs +++ b/tests/ui/transmutability/primitives/bool-mut.rs @@ -1,5 +1,5 @@ -// check-fail -//[next] compile-flags: -Znext-solver +//@ check-fail +//@[next] compile-flags: -Znext-solver #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/primitives/bool.rs b/tests/ui/transmutability/primitives/bool.rs index ac4024b7f333f..b7dc309e469c7 100644 --- a/tests/ui/transmutability/primitives/bool.rs +++ b/tests/ui/transmutability/primitives/bool.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/primitives/numbers.rs b/tests/ui/transmutability/primitives/numbers.rs index 1afc7d677ee5b..8baa4b05216ef 100644 --- a/tests/ui/transmutability/primitives/numbers.rs +++ b/tests/ui/transmutability/primitives/numbers.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![crate_type = "lib"] #![feature(transmutability)] diff --git a/tests/ui/transmutability/primitives/unit.rs b/tests/ui/transmutability/primitives/unit.rs index 5ea96cf8ba7a9..77240dd340b90 100644 --- a/tests/ui/transmutability/primitives/unit.rs +++ b/tests/ui/transmutability/primitives/unit.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver //! The unit type, `()`, should be one byte. diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs index a6e2889d3f23d..8e005d83a45e7 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs index 709d8cdc762e9..6dd4986360903 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs index e8582d2fd0212..bac174014ee32 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types.rs b/tests/ui/transmutability/references/recursive-wrapper-types.rs index 090c1fea6dbdf..9556a0e76c753 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/u8-to-unit.rs b/tests/ui/transmutability/references/u8-to-unit.rs index 8b37492bd6b1c..bf11372f9cb55 100644 --- a/tests/ui/transmutability/references/u8-to-unit.rs +++ b/tests/ui/transmutability/references/u8-to-unit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/unit-to-itself.rs b/tests/ui/transmutability/references/unit-to-itself.rs index 04a7e16d7cccc..5c0db04c2e63a 100644 --- a/tests/ui/transmutability/references/unit-to-itself.rs +++ b/tests/ui/transmutability/references/unit-to-itself.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/unit-to-u8.rs b/tests/ui/transmutability/references/unit-to-u8.rs index eff516e9a9691..ccc401042af38 100644 --- a/tests/ui/transmutability/references/unit-to-u8.rs +++ b/tests/ui/transmutability/references/unit-to-u8.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/structs/repr/should_handle_align.rs b/tests/ui/transmutability/structs/repr/should_handle_align.rs index ea9bf2a237ed3..ca18e0f1543ed 100644 --- a/tests/ui/transmutability/structs/repr/should_handle_align.rs +++ b/tests/ui/transmutability/structs/repr/should_handle_align.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/structs/repr/should_handle_packed.rs b/tests/ui/transmutability/structs/repr/should_handle_packed.rs index 17dc995fcd961..dcd4e5b80ebff 100644 --- a/tests/ui/transmutability/structs/repr/should_handle_packed.rs +++ b/tests/ui/transmutability/structs/repr/should_handle_packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/structs/should_order_fields_correctly.rs b/tests/ui/transmutability/structs/should_order_fields_correctly.rs index 28724562bad2c..bda5bfb89a279 100644 --- a/tests/ui/transmutability/structs/should_order_fields_correctly.rs +++ b/tests/ui/transmutability/structs/should_order_fields_correctly.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The fields of a struct should be laid out in lexical order. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/boolish.rs b/tests/ui/transmutability/unions/boolish.rs index e469c497353bb..9ab5f2be59aec 100644 --- a/tests/ui/transmutability/unions/boolish.rs +++ b/tests/ui/transmutability/unions/boolish.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(transmutability)] diff --git a/tests/ui/transmutability/unions/repr/should_handle_align.rs b/tests/ui/transmutability/unions/repr/should_handle_align.rs index 09c13cc4dc759..652158ecf521e 100644 --- a/tests/ui/transmutability/unions/repr/should_handle_align.rs +++ b/tests/ui/transmutability/unions/repr/should_handle_align.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/repr/should_handle_packed.rs b/tests/ui/transmutability/unions/repr/should_handle_packed.rs index 24c2abd698e70..173fec9ff0cce 100644 --- a/tests/ui/transmutability/unions/repr/should_handle_packed.rs +++ b/tests/ui/transmutability/unions/repr/should_handle_packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs b/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs index 1007fdd795422..82cf3aba8a74d 100644 --- a/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs +++ b/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If validity is assumed, there need only be one matching bit-pattern between //! the source and destination types. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs index 8a41669c65e74..fa5569325b3a0 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains a private field. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs index dd57b877d78c0..8ff8e2de0e61c 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains a private variant. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs index ebce8ce87dfda..b9cf66ec31096 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! Unless visibility is assumed, a transmutation should be rejected if the //! destination type contains an unreachable field (e.g., a public field with a //! private type). (This rule is distinct from type privacy, which still may diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs index b61291633330b..a56145f59d832 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains an unreachable field (e.g., a public field with a diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs index 5a0df09d49262..22392c53905ed 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of a private field in the source type does not affect //! transmutability. diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs index 0f69630cc64fa..876db7c658953 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of a private variant in the source type does not affect //! transmutability. diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs index e7742058c57f5..8b6db9ff150da 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an unreachable field in the source type (e.g., a public //! field with a private type does not affect transmutability. (This rule is diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs b/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs index 662c32af17aa8..9b7b940ca691c 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! NOTE: This test documents a known-bug in the implementation of the //! transmutability trait. Once fixed, the above "check-pass" header should be //! removed, and an "ERROR cannot be safely transmuted" annotation should be added at the end diff --git a/tests/ui/transmute-equal-assoc-types.rs b/tests/ui/transmute-equal-assoc-types.rs index d1b593b7f0a71..526f4ebbffa3e 100644 --- a/tests/ui/transmute-equal-assoc-types.rs +++ b/tests/ui/transmute-equal-assoc-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar; diff --git a/tests/ui/transmute-non-immediate-to-immediate.rs b/tests/ui/transmute-non-immediate-to-immediate.rs index cf77c113f4c61..f5ddf0cfa330b 100644 --- a/tests/ui/transmute-non-immediate-to-immediate.rs +++ b/tests/ui/transmute-non-immediate-to-immediate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Issue #7988 // Transmuting non-immediate type to immediate type -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { unsafe { diff --git a/tests/ui/transmute/lifetimes.rs b/tests/ui/transmute/lifetimes.rs index 943191551396d..0114e6205bb38 100644 --- a/tests/ui/transmute/lifetimes.rs +++ b/tests/ui/transmute/lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr::NonNull; diff --git a/tests/ui/transmute/main.rs b/tests/ui/transmute/main.rs index da4a0a660c8cb..e4a5f9103cd79 100644 --- a/tests/ui/transmute/main.rs +++ b/tests/ui/transmute/main.rs @@ -1,5 +1,5 @@ -// normalize-stderr-32bit: "`&str` \(64 bits\)" -> "`&str` ($$STR bits)" -// normalize-stderr-64bit: "`&str` \(128 bits\)" -> "`&str` ($$STR bits)" +//@ normalize-stderr-32bit: "`&str` \(64 bits\)" -> "`&str` ($$STR bits)" +//@ normalize-stderr-64bit: "`&str` \(128 bits\)" -> "`&str` ($$STR bits)" use std::mem::transmute; diff --git a/tests/ui/transmute/transmute-different-sizes.rs b/tests/ui/transmute/transmute-different-sizes.rs index 690decf639285..4fe79b9fa4e29 100644 --- a/tests/ui/transmute/transmute-different-sizes.rs +++ b/tests/ui/transmute/transmute-different-sizes.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that `transmute` cannot be called on types of different size. diff --git a/tests/ui/transmute/transmute-fat-pointers.rs b/tests/ui/transmute/transmute-fat-pointers.rs index 7c1beffd14ed4..7043e53dbff79 100644 --- a/tests/ui/transmute/transmute-fat-pointers.rs +++ b/tests/ui/transmute/transmute-fat-pointers.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that are conservative around thin/fat pointer mismatches. diff --git a/tests/ui/transmute/transmute-impl.rs b/tests/ui/transmute/transmute-impl.rs index df422bda166c1..617e707cda911 100644 --- a/tests/ui/transmute/transmute-impl.rs +++ b/tests/ui/transmute/transmute-impl.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that are conservative around thin/fat pointer mismatches. diff --git a/tests/ui/treat-err-as-bug/err.rs b/tests/ui/treat-err-as-bug/err.rs index 74992497dab2d..02eea06049490 100644 --- a/tests/ui/treat-err-as-bug/err.rs +++ b/tests/ui/treat-err-as-bug/err.rs @@ -1,10 +1,10 @@ -// compile-flags: -Ztreat-err-as-bug -// failure-status: 101 -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// error-pattern: [eval_static_initializer] evaluating initializer of static `C` -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug +//@ failure-status: 101 +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ error-pattern: [eval_static_initializer] evaluating initializer of static `C` +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![crate_type = "rlib"] diff --git a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs index c7d480a773d5e..0b75bb23faff9 100644 --- a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs +++ b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs @@ -1,8 +1,8 @@ -// compile-flags: -Ztreat-err-as-bug -// dont-check-failure-status -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// dont-check-compiler-stderr -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug +//@ dont-check-failure-status +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ dont-check-compiler-stderr +//@ rustc-env:RUST_BACKTRACE=0 fn main() { #[deny(while_true)] diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs index 1ea14aee6c459..7e5a221b6d85d 100644 --- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs +++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs @@ -1,10 +1,10 @@ -// compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs -// failure-status: 101 -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// error-pattern: [trigger_delayed_bug] triggering a delayed bug for testing incremental -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs +//@ failure-status: 101 +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ error-pattern: [trigger_delayed_bug] triggering a delayed bug for testing incremental +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(rustc_attrs)] diff --git a/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs b/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs index ab6677e911b24..602582310ad9a 100644 --- a/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs +++ b/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: no-opt inline -// [inline]compile-flags: -Zmir-opt-level=3 --emit=mir +//@ build-pass +//@ revisions: no-opt inline +//@ [inline]compile-flags: -Zmir-opt-level=3 --emit=mir #![feature(trivial_bounds)] #![allow(unused)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs index 69eee66e64d89..59824873ef5da 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Force mir to be emitted, to ensure that const // propagation doesn't ICE on a function // with an 'impossible' body. See issue #67696 diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs index f98c3164d7eb5..df3b70dcc7f82 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check tautalogically false `Copy` bounds #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs index b13956673d231..6213017d5c9e9 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that global bounds result in the expected choice of associated type #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs index bfa083655c4fa..bc7ec1f687216 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 +//@ run-pass // Check tautalogically false `Sized` bounds #![feature(trivial_bounds)] #![allow(unused)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs index 9efa22b10717f..a08f37c5035f2 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that inconsistent bounds are used in well-formedness checks #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs index 7148f5d6da05b..90699e6830a8c 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that tautalogically false bounds are accepted, and are used // in type inference. diff --git a/tests/ui/trivial-bounds/trivial-bounds-object.rs b/tests/ui/trivial-bounds/trivial-bounds-object.rs index f5feeea7cd41c..a69c94aae00db 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-object.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that the object bound dyn A + 'a: A is preferred over the // where clause bound dyn A + 'static: A. diff --git a/tests/ui/trivial_casts-rpass.rs b/tests/ui/trivial_casts-rpass.rs index 4653a8df802da..701e2f6166f39 100644 --- a/tests/ui/trivial_casts-rpass.rs +++ b/tests/ui/trivial_casts-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that all coercions can actually be done using casts (modulo the lints). #![allow(trivial_casts, trivial_numeric_casts)] diff --git a/tests/ui/try-block/issue-45124.rs b/tests/ui/try-block/issue-45124.rs index 2cf2ade65e91f..e9e0e767efa25 100644 --- a/tests/ui/try-block/issue-45124.rs +++ b/tests/ui/try-block/issue-45124.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-bad-lifetime.rs b/tests/ui/try-block/try-block-bad-lifetime.rs index d9524e99f9ad0..bfff757a2df63 100644 --- a/tests/ui/try-block/try-block-bad-lifetime.rs +++ b/tests/ui/try-block/try-block-bad-lifetime.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-bad-type.rs b/tests/ui/try-block/try-block-bad-type.rs index 30ae96763c0e2..71eb832dd4eb2 100644 --- a/tests/ui/try-block/try-block-bad-type.rs +++ b/tests/ui/try-block/try-block-bad-type.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-catch.rs b/tests/ui/try-block/try-block-catch.rs index d165015611d04..c3aa442ba6635 100644 --- a/tests/ui/try-block/try-block-catch.rs +++ b/tests/ui/try-block/try-block-catch.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-edition2015.rs b/tests/ui/try-block/try-block-in-edition2015.rs index 0096429730809..423269df12d68 100644 --- a/tests/ui/try-block/try-block-in-edition2015.rs +++ b/tests/ui/try-block/try-block-in-edition2015.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2015 +//@ compile-flags: --edition 2015 pub fn main() { let try_result: Option<_> = try { diff --git a/tests/ui/try-block/try-block-in-match-arm.rs b/tests/ui/try-block/try-block-in-match-arm.rs index ea004ebe29f9e..cecbf724916ca 100644 --- a/tests/ui/try-block/try-block-in-match-arm.rs +++ b/tests/ui/try-block/try-block-in-match-arm.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --edition 2018 +//@ check-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-match.rs b/tests/ui/try-block/try-block-in-match.rs index cd0b967e79d07..5c62f41efdba3 100644 --- a/tests/ui/try-block/try-block-in-match.rs +++ b/tests/ui/try-block/try-block-in-match.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2018 +//@ run-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-return.rs b/tests/ui/try-block/try-block-in-return.rs index a15bfeef1c12d..ee5ca696b6d6c 100644 --- a/tests/ui/try-block/try-block-in-return.rs +++ b/tests/ui/try-block/try-block-in-return.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2018 +//@ run-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-while.rs b/tests/ui/try-block/try-block-in-while.rs index 69793df525e77..88a97136c5947 100644 --- a/tests/ui/try-block/try-block-in-while.rs +++ b/tests/ui/try-block/try-block-in-while.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-maybe-bad-lifetime.rs b/tests/ui/try-block/try-block-maybe-bad-lifetime.rs index cd2ddf63a2f01..52ec0c44a059c 100644 --- a/tests/ui/try-block/try-block-maybe-bad-lifetime.rs +++ b/tests/ui/try-block/try-block-maybe-bad-lifetime.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-opt-init.rs b/tests/ui/try-block/try-block-opt-init.rs index f4f45abcc75b1..fbe7f90d03039 100644 --- a/tests/ui/try-block/try-block-opt-init.rs +++ b/tests/ui/try-block/try-block-opt-init.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-type-error.rs b/tests/ui/try-block/try-block-type-error.rs index fe1993a37f64a..79cdb7a2e48d7 100644 --- a/tests/ui/try-block/try-block-type-error.rs +++ b/tests/ui/try-block/try-block-type-error.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-unreachable-code-lint.rs b/tests/ui/try-block/try-block-unreachable-code-lint.rs index e1d82ea360dc6..62c74b76d59c0 100644 --- a/tests/ui/try-block/try-block-unreachable-code-lint.rs +++ b/tests/ui/try-block/try-block-unreachable-code-lint.rs @@ -1,7 +1,7 @@ // Test unreachable_code lint for `try {}` block ok-wrapping. See issues #54165, #63324. -// compile-flags: --edition 2018 -// check-pass +//@ compile-flags: --edition 2018 +//@ check-pass #![feature(try_blocks)] #![warn(unreachable_code)] diff --git a/tests/ui/try-block/try-block-unused-delims.fixed b/tests/ui/try-block/try-block-unused-delims.fixed index 756081738c3d7..348eb8f796567 100644 --- a/tests/ui/try-block/try-block-unused-delims.fixed +++ b/tests/ui/try-block/try-block-unused-delims.fixed @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --edition 2018 -// run-rustfix +//@ check-pass +//@ compile-flags: --edition 2018 +//@ run-rustfix #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block-unused-delims.rs b/tests/ui/try-block/try-block-unused-delims.rs index ce087fb351d63..f119e1074f6e5 100644 --- a/tests/ui/try-block/try-block-unused-delims.rs +++ b/tests/ui/try-block/try-block-unused-delims.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --edition 2018 -// run-rustfix +//@ check-pass +//@ compile-flags: --edition 2018 +//@ run-rustfix #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block.rs b/tests/ui/try-block/try-block.rs index c29ccc704277f..7520cbaad378e 100644 --- a/tests/ui/try-block/try-block.rs +++ b/tests/ui/try-block/try-block.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-is-identifier-edition2015.rs b/tests/ui/try-block/try-is-identifier-edition2015.rs index 90f56d5fa71d1..54bd049442fcc 100644 --- a/tests/ui/try-block/try-is-identifier-edition2015.rs +++ b/tests/ui/try-block/try-is-identifier-edition2015.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// compile-flags: --edition 2015 +//@ compile-flags: --edition 2015 fn main() { let try = 2; diff --git a/tests/ui/try-from-int-error-partial-eq.rs b/tests/ui/try-from-int-error-partial-eq.rs index 6ee4a4cf31924..66a78b3f842fb 100644 --- a/tests/ui/try-from-int-error-partial-eq.rs +++ b/tests/ui/try-from-int-error-partial-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] diff --git a/tests/ui/try-operator-hygiene.rs b/tests/ui/try-operator-hygiene.rs index 0b24b4305accc..20538e094c6d6 100644 --- a/tests/ui/try-operator-hygiene.rs +++ b/tests/ui/try-operator-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/try-operator.rs b/tests/ui/try-operator.rs index 516ae4c4090dc..b99782045575f 100644 --- a/tests/ui/try-operator.rs +++ b/tests/ui/try-operator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/try-trait/try-as-monad.rs b/tests/ui/try-trait/try-as-monad.rs index cf09838b304b3..2854a160069e4 100644 --- a/tests/ui/try-trait/try-as-monad.rs +++ b/tests/ui/try-trait/try-as-monad.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(try_trait_v2)] diff --git a/tests/ui/try-trait/try-on-option-diagnostics.rs b/tests/ui/try-trait/try-on-option-diagnostics.rs index 7ffa0de6c0fcc..60942d1c4f7e8 100644 --- a/tests/ui/try-trait/try-on-option-diagnostics.rs +++ b/tests/ui/try-trait/try-on-option-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/try-trait/try-operator-custom.rs b/tests/ui/try-trait/try-operator-custom.rs index 45636a7fceddf..ab0772dd228b0 100644 --- a/tests/ui/try-trait/try-operator-custom.rs +++ b/tests/ui/try-trait/try-operator-custom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(control_flow_enum)] #![feature(try_trait_v2)] diff --git a/tests/ui/try-trait/try-poll.rs b/tests/ui/try-trait/try-poll.rs index d42e51c7405ba..c349db6e16d8b 100644 --- a/tests/ui/try-trait/try-poll.rs +++ b/tests/ui/try-trait/try-poll.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, unused)] diff --git a/tests/ui/try-trait/yeet-for-option.rs b/tests/ui/try-trait/yeet-for-option.rs index 753fbc1dee7d7..a83107d004e3e 100644 --- a/tests/ui/try-trait/yeet-for-option.rs +++ b/tests/ui/try-trait/yeet-for-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(yeet_expr)] diff --git a/tests/ui/try-trait/yeet-for-result.rs b/tests/ui/try-trait/yeet-for-result.rs index b7b113797cde4..67e1b1a235920 100644 --- a/tests/ui/try-trait/yeet-for-result.rs +++ b/tests/ui/try-trait/yeet-for-result.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(yeet_expr)] diff --git a/tests/ui/tuple/builtin.rs b/tests/ui/tuple/builtin.rs index d87ce526357e3..2678ae322e914 100644 --- a/tests/ui/tuple/builtin.rs +++ b/tests/ui/tuple/builtin.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(tuple_trait)] diff --git a/tests/ui/tuple/index-float.rs b/tests/ui/tuple/index-float.rs index 53b025c9135b2..2faf71cb01d33 100644 --- a/tests/ui/tuple/index-float.rs +++ b/tests/ui/tuple/index-float.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let tuple = (((),),); diff --git a/tests/ui/tuple/indexing-in-macro.rs b/tests/ui/tuple/indexing-in-macro.rs index bef4a69ab23c9..8b548ef052431 100644 --- a/tests/ui/tuple/indexing-in-macro.rs +++ b/tests/ui/tuple/indexing-in-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { (.$l:literal) => {}; diff --git a/tests/ui/tuple/nested-index.rs b/tests/ui/tuple/nested-index.rs index a3232d6fc361e..fc967873d3519 100644 --- a/tests/ui/tuple/nested-index.rs +++ b/tests/ui/tuple/nested-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main () { let n = (1, (2, 3)).1.1; diff --git a/tests/ui/tuple/one-tuple.rs b/tests/ui/tuple/one-tuple.rs index 00fbadce1ac88..a9723029e5db5 100644 --- a/tests/ui/tuple/one-tuple.rs +++ b/tests/ui/tuple/one-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Why one-tuples? Because macros. diff --git a/tests/ui/tuple/tup.rs b/tests/ui/tuple/tup.rs index 160477b0b0a6b..7bc316e7bd0bd 100644 --- a/tests/ui/tuple/tup.rs +++ b/tests/ui/tuple/tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/tuple/tuple-index-fat-types.rs b/tests/ui/tuple/tuple-index-fat-types.rs index 5dda1ed975cc3..0dbdacde60ac5 100644 --- a/tests/ui/tuple/tuple-index-fat-types.rs +++ b/tests/ui/tuple/tuple-index-fat-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo<'a>(&'a [isize]); diff --git a/tests/ui/tuple/tuple-index.rs b/tests/ui/tuple/tuple-index.rs index 3e1d92b42aac4..c98eb42af4524 100644 --- a/tests/ui/tuple/tuple-index.rs +++ b/tests/ui/tuple/tuple-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Point(isize, isize); diff --git a/tests/ui/tydesc-name.rs b/tests/ui/tydesc-name.rs index c432e5b54810c..068a42606c2f3 100644 --- a/tests/ui/tydesc-name.rs +++ b/tests/ui/tydesc-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs index d869794ec0ac6..b28b9e52dd200 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs +++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that resolving, in the value namespace, to an `enum` variant // through a type alias is well behaved in the presence of generics. diff --git a/tests/ui/type-alias-enum-variants/issue-57866.rs b/tests/ui/type-alias-enum-variants/issue-57866.rs index 5e105b20a8926..5d612925ec8ab 100644 --- a/tests/ui/type-alias-enum-variants/issue-57866.rs +++ b/tests/ui/type-alias-enum-variants/issue-57866.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Outer { A(T) diff --git a/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs b/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs index 9c9eaab8da326..c03052b5733c1 100644 --- a/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs +++ b/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs @@ -1,7 +1,7 @@ // In this regression test we check that a path pattern referring to a unit variant // through a type alias is successful in inferring the generic argument. -// check-pass +//@ check-pass enum Opt { N, diff --git a/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs b/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs index 66fb8dd0deaf4..b38fb7fef77fd 100644 --- a/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs +++ b/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for the issue #63151: // Spurious unused field warning when matching variants under a `Self` scope diff --git a/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs b/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs index 39677733d524d..b8b7f56e37899 100644 --- a/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs +++ b/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that it is possible to resolve, in the value namespace, // to an `enum` variant through a type alias. This includes `Self`. diff --git a/tests/ui/type-alias-impl-trait/argument-types.rs b/tests/ui/type-alias-impl-trait/argument-types.rs index 185207b9800bb..9e4a8bb8dda45 100644 --- a/tests/ui/type-alias-impl-trait/argument-types.rs +++ b/tests/ui/type-alias-impl-trait/argument-types.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; type Foo = impl Debug; diff --git a/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs b/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs index 703e3e8693e8e..761402582e241 100644 --- a/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs +++ b/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// build-pass +//@ build-pass trait T { type Item; } diff --git a/tests/ui/type-alias-impl-trait/assoc-type-const.rs b/tests/ui/type-alias-impl-trait/assoc-type-const.rs index e385fe045fc90..3591773209ac3 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-const.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-const.rs @@ -1,9 +1,9 @@ // Tests that we properly detect defining usages when using // const generics in an associated opaque type -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(impl_trait_in_assoc_type)] trait UnwrapItemsExt<'a, const C: usize> { diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs index 81dacbcfb7ecc..e5b987f948571 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs @@ -1,6 +1,6 @@ // Tests that we still detect defining usages when // lifetimes are used in an associated opaque type -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs b/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs index 42f07d49ffe25..a1185cd5ba88f 100644 --- a/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs index 58eaa9c2c4263..40689406cfe64 100644 --- a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs index d9f7c7809b98c..a03a146d0418c 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs b/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs index 444a4e6957fad..726b523606e68 100644 --- a/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs +++ b/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// edition:2018 +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/bound_reduction.rs b/tests/ui/type-alias-impl-trait/bound_reduction.rs index b9b50f0b77aa3..74012e34e9214 100644 --- a/tests/ui/type-alias-impl-trait/bound_reduction.rs +++ b/tests/ui/type-alias-impl-trait/bound_reduction.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/bounds.rs b/tests/ui/type-alias-impl-trait/bounds.rs index dc05b70c5cc9c..8e24a937d1d47 100644 --- a/tests/ui/type-alias-impl-trait/bounds.rs +++ b/tests/ui/type-alias-impl-trait/bounds.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/broken_mir.rs b/tests/ui/type-alias-impl-trait/broken_mir.rs index b68e798fb7c95..1b0ec3f7c408e 100644 --- a/tests/ui/type-alias-impl-trait/broken_mir.rs +++ b/tests/ui/type-alias-impl-trait/broken_mir.rs @@ -4,8 +4,8 @@ //! This test used to ICE because oli-obk assumed mir validation //! was only ever run after opaque types were revealed in MIR. -// compile-flags: -Zvalidate-mir -// check-pass +//@ compile-flags: -Zvalidate-mir +//@ check-pass fn main() { let _ = Some(()).into_iter().flat_map(|_| Some(()).into_iter().flat_map(func)); diff --git a/tests/ui/type-alias-impl-trait/closure_args.rs b/tests/ui/type-alias-impl-trait/closure_args.rs index 243f9cd6d4f4c..eb5ab9d67f720 100644 --- a/tests/ui/type-alias-impl-trait/closure_args.rs +++ b/tests/ui/type-alias-impl-trait/closure_args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for https://github.com/rust-lang/rust/issues/100800 diff --git a/tests/ui/type-alias-impl-trait/closure_args2.rs b/tests/ui/type-alias-impl-trait/closure_args2.rs index 1dd5c3e40cda6..329596b19e9b9 100644 --- a/tests/ui/type-alias-impl-trait/closure_args2.rs +++ b/tests/ui/type-alias-impl-trait/closure_args2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/closure_infer.rs b/tests/ui/type-alias-impl-trait/closure_infer.rs index 04e2323ec4ae9..fa0514c34a091 100644 --- a/tests/ui/type-alias-impl-trait/closure_infer.rs +++ b/tests/ui/type-alias-impl-trait/closure_infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for an ICE: https://github.com/rust-lang/rust/issues/119916 diff --git a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs index 7d8193b26cccf..e78c7c16c8e68 100644 --- a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs +++ b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs @@ -5,7 +5,7 @@ // These region parameters are not really useful in this check. // So here we ignore them and replace them with fresh region variables. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs b/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs index 53974dbb36bdf..430b444aae186 100644 --- a/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs +++ b/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs @@ -4,7 +4,7 @@ // It's not clear if this is the desired behavior but at least // it's consistent and has no back-compat risk. -// check-fail +//@ check-fail #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/coherence.rs b/tests/ui/type-alias-impl-trait/coherence.rs index 1700c800e3130..641c0fac17a64 100644 --- a/tests/ui/type-alias-impl-trait/coherence.rs +++ b/tests/ui/type-alias-impl-trait/coherence.rs @@ -1,4 +1,4 @@ -// aux-build:foreign-crate.rs +//@ aux-build:foreign-crate.rs #![feature(type_alias_impl_trait)] extern crate foreign_crate; diff --git a/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs b/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs index a63e0a1ee6f70..c1958e4f246d7 100644 --- a/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs +++ b/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs @@ -1,4 +1,4 @@ -// aux-build: coherence_cross_crate_trait_decl.rs +//@ aux-build: coherence_cross_crate_trait_decl.rs // This test ensures that adding an `impl SomeTrait for i32` within // `coherence_cross_crate_trait_decl` is not a breaking change, by // making sure that even without such an impl this test fails to compile. diff --git a/tests/ui/type-alias-impl-trait/coherence_generalization.rs b/tests/ui/type-alias-impl-trait/coherence_generalization.rs index 1ec8877eaeba8..2d7de1add490d 100644 --- a/tests/ui/type-alias-impl-trait/coherence_generalization.rs +++ b/tests/ui/type-alias-impl-trait/coherence_generalization.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(type_alias_impl_trait): What does this test? This needs a comment // explaining what we're worried about here. diff --git a/tests/ui/type-alias-impl-trait/collect_hidden_types.rs b/tests/ui/type-alias-impl-trait/collect_hidden_types.rs index e78f178e464eb..694c70f57a3f7 100644 --- a/tests/ui/type-alias-impl-trait/collect_hidden_types.rs +++ b/tests/ui/type-alias-impl-trait/collect_hidden_types.rs @@ -1,12 +1,12 @@ -// aux-build:collect_hidden_types.rs +//@ aux-build:collect_hidden_types.rs use collect_hidden_types::Service; use std::future::Future; use std::pin::Pin; use std::task::Context; -// build-pass +//@ build-pass -// edition:2018 +//@ edition:2018 extern crate collect_hidden_types; diff --git a/tests/ui/type-alias-impl-trait/cross_crate_ice.rs b/tests/ui/type-alias-impl-trait/cross_crate_ice.rs index c30608176aada..a249c17d7d374 100644 --- a/tests/ui/type-alias-impl-trait/cross_crate_ice.rs +++ b/tests/ui/type-alias-impl-trait/cross_crate_ice.rs @@ -1,5 +1,5 @@ -// aux-build:cross_crate_ice.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:cross_crate_ice.rs +//@ build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice; diff --git a/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs b/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs index 3a7e490260f3f..1f4f3880203a7 100644 --- a/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs +++ b/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs @@ -1,5 +1,5 @@ -// aux-build:cross_crate_ice2.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:cross_crate_ice2.rs +//@ build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice2; diff --git a/tests/ui/type-alias-impl-trait/cross_inference.rs b/tests/ui/type-alias-impl-trait/cross_inference.rs index c5ef75fee61a6..50777e5711245 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs index 31fea42fa5d8a..4f3f6d37eff4e 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// build-pass +//@ compile-flags: --edition=2021 +//@ build-pass #![feature(type_alias_impl_trait)] fn main() { diff --git a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs index b929122a6c23f..cad1cbf61a295 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs @@ -1,6 +1,6 @@ -// compile-flags: --edition=2021 --crate-type=lib -// rustc-env:RUST_BACKTRACE=0 -// check-pass +//@ compile-flags: --edition=2021 --crate-type=lib +//@ rustc-env:RUST_BACKTRACE=0 +//@ check-pass // tracked in https://github.com/rust-lang/rust/issues/96572 diff --git a/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs b/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs index f6affbf175995..6afc30b72f41f 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(b: bool) -> impl Copy { if b { diff --git a/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs b/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs index 44158349fdd64..7e743fc09dd5f 100644 --- a/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs +++ b/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Cdebuginfo=2 -// build-pass +//@ compile-flags: --crate-type=lib -Cdebuginfo=2 +//@ build-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs b/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs index 5a421ea1dc02f..d97a3010a17a0 100644 --- a/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs +++ b/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs @@ -1,5 +1,5 @@ // User type annotation in fn bodies is a a valid defining site for opaque types. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] trait Equate { type Proj; } diff --git a/tests/ui/type-alias-impl-trait/defining-use-submodule.rs b/tests/ui/type-alias-impl-trait/defining-use-submodule.rs index 4d84b2cbbe9a5..3e7bc32640f52 100644 --- a/tests/ui/type-alias-impl-trait/defining-use-submodule.rs +++ b/tests/ui/type-alias-impl-trait/defining-use-submodule.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs b/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs index 7c2d68cceb8fc..eadf21c9138c3 100644 --- a/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs +++ b/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs @@ -1,5 +1,5 @@ -// build-pass -// edition: 2021 +//@ build-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs b/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs index 8568b26bea2a3..17d8a44430d9f 100644 --- a/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs +++ b/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs @@ -1,5 +1,5 @@ -// build-pass -// edition: 2021 +//@ build-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/destructuring.rs b/tests/ui/type-alias-impl-trait/destructuring.rs index b752e58380a89..5122522dca657 100644 --- a/tests/ui/type-alias-impl-trait/destructuring.rs +++ b/tests/ui/type-alias-impl-trait/destructuring.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass // issue: https://github.com/rust-lang/rust/issues/104551 diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs index 8549687ea7814..c39cc192dc74d 100644 --- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs +++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs b/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs index 51d2870497259..b1658b166f330 100644 --- a/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs +++ b/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs @@ -1,6 +1,6 @@ -// aux-build:drop-shim-relates-opaque-aux.rs -// compile-flags: -Zvalidate-mir --crate-type=lib -// build-pass +//@ aux-build:drop-shim-relates-opaque-aux.rs +//@ compile-flags: -Zvalidate-mir --crate-type=lib +//@ build-pass extern crate drop_shim_relates_opaque_aux; diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs index 4c56fe2d1dce2..b1d5961067bd7 100644 --- a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs +++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs index 97f8c799fc566..f0674fb0c97e1 100644 --- a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs +++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/field-types.rs b/tests/ui/type-alias-impl-trait/field-types.rs index d99ed58127bd4..24e430afac3ab 100644 --- a/tests/ui/type-alias-impl-trait/field-types.rs +++ b/tests/ui/type-alias-impl-trait/field-types.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/future.rs b/tests/ui/type-alias-impl-trait/future.rs index 56323216effa4..36d1dcd00ad13 100644 --- a/tests/ui/type-alias-impl-trait/future.rs +++ b/tests/ui/type-alias-impl-trait/future.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// compile-flags: --crate-type=lib +//@ edition:2021 +//@ compile-flags: --crate-type=lib use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs index c17d595dbb3ad..439214911eb97 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs index feebf81eef2a7..adc912294fdf9 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs b/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs index e109c38c98695..b9b34f55e7e22 100644 --- a/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs +++ b/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs index 58778702de666..7b59b369d009c 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs +++ b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs @@ -4,7 +4,7 @@ //! if the opaque type is actually used in the field. #![feature(impl_trait_in_assoc_type)] -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params.rs index db1a3a1c7a9d0..e43f53e40578c 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params.rs @@ -1,9 +1,9 @@ //! This test checks that walking into binders //! during opaque type collection does not ICE or raise errors. -// edition: 2021 +//@ edition: 2021 -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs index f011e5b214813..1022e5c4ecedb 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs @@ -1,7 +1,7 @@ //! This test checks the behaviour of walking into binders //! and normalizing something behind them actually works. -// edition: 2021 +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs index 6edfccaf7d179..e0bb1e2d02fc3 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs @@ -1,7 +1,7 @@ //! This test checks that we can't actually have an opaque type behind //! a binder that references variables from that binder. -// edition: 2021 +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs index 0efbd1c2bd5fd..91610c92d2278 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] trait Foo { diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs index 9f32c5d888b5f..bce5ba7c91c30 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(type_alias_impl_trait)] type Alias = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs index dfcf733653376..7db64f3bf3357 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs @@ -1,7 +1,7 @@ //! Check that non-defining assoc items can use the opaque type //! opaquely. -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/implied_bounds2.rs b/tests/ui/type-alias-impl-trait/implied_bounds2.rs index b4c4c013cd251..effedb954c359 100644 --- a/tests/ui/type-alias-impl-trait/implied_bounds2.rs +++ b/tests/ui/type-alias-impl-trait/implied_bounds2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/implied_bounds3.rs b/tests/ui/type-alias-impl-trait/implied_bounds3.rs index e39c613281dc7..5e399c3d06c53 100644 --- a/tests/ui/type-alias-impl-trait/implied_bounds3.rs +++ b/tests/ui/type-alias-impl-trait/implied_bounds3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: F) where diff --git a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs index b6a7264a529fd..bc9d760cd2979 100644 --- a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs +++ b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs @@ -1,8 +1,8 @@ #![feature(type_alias_impl_trait)] -// known-bug: #99840 +//@ known-bug: #99840 // this should not compile -// check-pass +//@ check-pass type Alias = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs index 06c119287d745..4a9f162823e35 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type, type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs index e7b23d5f8a1c9..1aa64810d1908 100644 --- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs +++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-fail +//@ edition: 2021 +//@ build-fail #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-101750.rs b/tests/ui/type-alias-impl-trait/issue-101750.rs index f564f4fa702cb..1c5261b7a791a 100644 --- a/tests/ui/type-alias-impl-trait/issue-101750.rs +++ b/tests/ui/type-alias-impl-trait/issue-101750.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/type-alias-impl-trait/issue-104817.rs b/tests/ui/type-alias-impl-trait/issue-104817.rs index 0d3bace4db1f4..4679d025fce0f 100644 --- a/tests/ui/type-alias-impl-trait/issue-104817.rs +++ b/tests/ui/type-alias-impl-trait/issue-104817.rs @@ -2,8 +2,8 @@ #![cfg_attr(specialized, feature(specialization))] #![allow(incomplete_features)] -// revisions: stock specialized -// [specialized]check-pass +//@ revisions: stock specialized +//@ [specialized]check-pass trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/tests/ui/type-alias-impl-trait/issue-109054.rs b/tests/ui/type-alias-impl-trait/issue-109054.rs index 1fbec47b14bcd..51f30779cd948 100644 --- a/tests/ui/type-alias-impl-trait/issue-109054.rs +++ b/tests/ui/type-alias-impl-trait/issue-109054.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs b/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs index b89c3e4590f22..ae463b6ef5b8e 100644 --- a/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs +++ b/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl Fn() -> Foo; diff --git a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs index ad1ede9c3e482..cd14bc1fd0985 100644 --- a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs +++ b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs @@ -1,7 +1,7 @@ #![feature(coroutines, coroutine_trait, rustc_attrs)] #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass mod gen { use std::ops::Coroutine; diff --git a/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs b/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs index af0780ab0b998..e54dd01122e0a 100644 --- a/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs +++ b/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #55099 // Tests that we don't incorrectly consider a lifetime to part // of the concrete type diff --git a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs index 3bdb3bf1d5305..43b72b8e549d8 100644 --- a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs +++ b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs @@ -1,6 +1,6 @@ // Regression test for #57188 -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs index 3917bb3b6cfbf..eedf7f4a8442b 100644 --- a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs +++ b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #57611 // Ensures that we don't ICE diff --git a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs index 841bac5f6a0f4..e046c73948e8c 100644 --- a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs @@ -1,7 +1,7 @@ // Regression test for issue #57807 - ensure // that we properly unify associated types within // a type alias impl trait -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] trait Bar { diff --git a/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs index bc6a34392127e..78a1d5116bedb 100644 --- a/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs index a1cf23dab7b69..9d74c0687fe67 100644 --- a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs +++ b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58887.rs b/tests/ui/type-alias-impl-trait/issue-58887.rs index 68d85ed6b0f9b..51d8595adf19e 100644 --- a/tests/ui/type-alias-impl-trait/issue-58887.rs +++ b/tests/ui/type-alias-impl-trait/issue-58887.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-58951-2.rs b/tests/ui/type-alias-impl-trait/issue-58951-2.rs index e4ba7f8e2a623..fb92b1274365c 100644 --- a/tests/ui/type-alias-impl-trait/issue-58951-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-58951-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58951.rs b/tests/ui/type-alias-impl-trait/issue-58951.rs index 7303cbab4a813..8a9e586eb25b2 100644 --- a/tests/ui/type-alias-impl-trait/issue-58951.rs +++ b/tests/ui/type-alias-impl-trait/issue-58951.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-60564-working.rs b/tests/ui/type-alias-impl-trait/issue-60564-working.rs index c4687c29de8e1..f215d1bc69ede 100644 --- a/tests/ui/type-alias-impl-trait/issue-60564-working.rs +++ b/tests/ui/type-alias-impl-trait/issue-60564-working.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// check-pass +//@ check-pass trait IterBits { type BitsIter: Iterator; diff --git a/tests/ui/type-alias-impl-trait/issue-60662.rs b/tests/ui/type-alias-impl-trait/issue-60662.rs index b9faa668b80eb..35d96e52fd611 100644 --- a/tests/ui/type-alias-impl-trait/issue-60662.rs +++ b/tests/ui/type-alias-impl-trait/issue-60662.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=hir +//@ check-pass +//@ compile-flags: -Z unpretty=hir #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-60662.stdout b/tests/ui/type-alias-impl-trait/issue-60662.stdout index 5b3d7375de0e3..e643dba124537 100644 --- a/tests/ui/type-alias-impl-trait/issue-60662.stdout +++ b/tests/ui/type-alias-impl-trait/issue-60662.stdout @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=hir +//@ check-pass +//@ compile-flags: -Z unpretty=hir #![feature(type_alias_impl_trait)] #[prelude_import] diff --git a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs index 0245eab796948..8434dcba19df0 100644 --- a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs @@ -1,6 +1,6 @@ // Regression test for #62988 -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs b/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs index ddea7aeb6cda7..38abc3ec7e859 100644 --- a/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs +++ b/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs @@ -2,7 +2,7 @@ // Tests that we properly handle closures with an explicit return type // that return an opaque type. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-63355.rs b/tests/ui/type-alias-impl-trait/issue-63355.rs index 7066a0535e184..0c977b3099490 100644 --- a/tests/ui/type-alias-impl-trait/issue-63355.rs +++ b/tests/ui/type-alias-impl-trait/issue-63355.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass pub trait Foo {} diff --git a/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs b/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs index 28f4a85c9f290..51f95637969a5 100644 --- a/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs +++ b/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #63677 - ensure that // coherence checking can properly handle 'impl trait' // in type aliases diff --git a/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs b/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs index 7b3e9e12405c7..61251d7f6da91 100644 --- a/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs +++ b/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait, rustc_attrs)] diff --git a/tests/ui/type-alias-impl-trait/issue-65918.rs b/tests/ui/type-alias-impl-trait/issue-65918.rs index 82cc823e494c8..c81650876c8ad 100644 --- a/tests/ui/type-alias-impl-trait/issue-65918.rs +++ b/tests/ui/type-alias-impl-trait/issue-65918.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs b/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs index d97270c3124d1..0e3d01c2d6181 100644 --- a/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs +++ b/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs @@ -1,7 +1,7 @@ // Regression test for issue #66580 // Ensures that we don't try to determine whether a closure // is foreign when it's the underlying type of an opaque type -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Closure = impl FnOnce(); diff --git a/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs b/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs index cd219328a995a..c320b0db31bb4 100644 --- a/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs +++ b/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #67844 // Ensures that we properly handle nested TAIT occurrences // with generic parameters diff --git a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs index a6916eda8b093..8e631fd1b6a3d 100644 --- a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs +++ b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs @@ -1,6 +1,6 @@ // Test-pass variant of #69136 -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-69323.rs b/tests/ui/type-alias-impl-trait/issue-69323.rs index a9bd6daf2acf7..18bc4cf91787f 100644 --- a/tests/ui/type-alias-impl-trait/issue-69323.rs +++ b/tests/ui/type-alias-impl-trait/issue-69323.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-72793.rs b/tests/ui/type-alias-impl-trait/issue-72793.rs index 828c871143ad5..9389517e37bde 100644 --- a/tests/ui/type-alias-impl-trait/issue-72793.rs +++ b/tests/ui/type-alias-impl-trait/issue-72793.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zmir-opt-level=3 +//@ check-pass +//@ compile-flags: -Zmir-opt-level=3 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs index b6906f68ded57..f072bb88792ef 100644 --- a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs +++ b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs @@ -1,9 +1,9 @@ // Regression test for issue #76202 // Tests that we don't ICE when we have a trait impl on a TAIT. -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] trait Test { diff --git a/tests/ui/type-alias-impl-trait/issue-78450.rs b/tests/ui/type-alias-impl-trait/issue-78450.rs index c51dfb6782b7a..d1328be84751c 100644 --- a/tests/ui/type-alias-impl-trait/issue-78450.rs +++ b/tests/ui/type-alias-impl-trait/issue-78450.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs b/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs index 2ba4befea2a39..2a39da1176c30 100644 --- a/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs +++ b/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs @@ -1,7 +1,7 @@ // Regression test for issues #84660 and #86411: both are variations on #76202. // Tests that we don't ICE when we have an opaque type appearing anywhere in an impl header. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs b/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs index 80a74eb63a83e..987fad2efeadb 100644 --- a/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs +++ b/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::error::Error as StdError; use std::pin::Pin; diff --git a/tests/ui/type-alias-impl-trait/issue-89686.rs b/tests/ui/type-alias-impl-trait/issue-89686.rs index de070fc9debdb..f734c518dd21e 100644 --- a/tests/ui/type-alias-impl-trait/issue-89686.rs +++ b/tests/ui/type-alias-impl-trait/issue-89686.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-89952.rs b/tests/ui/type-alias-impl-trait/issue-89952.rs index f0ba9fa7cec29..608f2ec3d867f 100644 --- a/tests/ui/type-alias-impl-trait/issue-89952.rs +++ b/tests/ui/type-alias-impl-trait/issue-89952.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-93411.rs b/tests/ui/type-alias-impl-trait/issue-93411.rs index 1f8c789267d1b..2d08b7ba4c11a 100644 --- a/tests/ui/type-alias-impl-trait/issue-93411.rs +++ b/tests/ui/type-alias-impl-trait/issue-93411.rs @@ -1,8 +1,8 @@ #![feature(type_alias_impl_trait)] // this test used to stack overflow due to infinite recursion. -// check-pass -// compile-flags: --edition=2018 +//@ check-pass +//@ compile-flags: --edition=2018 use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs index 5bd854be8c6ab..7097123d608c6 100644 --- a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs +++ b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// check-pass -// revisions: default edition2021 -//[edition2021] compile-flags: --edition 2021 +//@ check-pass +//@ revisions: default edition2021 +//@[edition2021] compile-flags: --edition 2021 fn main() { type T = impl Copy; diff --git a/tests/ui/type-alias-impl-trait/issue-98604.rs b/tests/ui/type-alias-impl-trait/issue-98604.rs index d07fc9822a02d..9231e82d9f43b 100644 --- a/tests/ui/type-alias-impl-trait/issue-98604.rs +++ b/tests/ui/type-alias-impl-trait/issue-98604.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type AsyncFnPtr = Box std::pin::Pin>>>; diff --git a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs index 55994d6a3259d..d7033bf61a7fd 100644 --- a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs +++ b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs @@ -1,7 +1,7 @@ #![feature(impl_trait_in_assoc_type)] -// revisions: ok bad -// [ok] check-pass +//@ revisions: ok bad +//@ [ok] check-pass trait Foo { type Assoc; diff --git a/tests/ui/type-alias-impl-trait/match-unification.rs b/tests/ui/type-alias-impl-trait/match-unification.rs index f5c2abc0efa2e..27440c2fdd76f 100644 --- a/tests/ui/type-alias-impl-trait/match-unification.rs +++ b/tests/ui/type-alias-impl-trait/match-unification.rs @@ -1,6 +1,6 @@ use std::fmt::Debug; -// check-pass +//@ check-pass fn bar() -> impl Debug {} diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs index 83fd9a1da450b..40c00e553a6df 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type X = impl ToString; diff --git a/tests/ui/type-alias-impl-trait/multiple_definitions.rs b/tests/ui/type-alias-impl-trait/multiple_definitions.rs index 9e6268e63cde0..f474e30b9806d 100644 --- a/tests/ui/type-alias-impl-trait/multiple_definitions.rs +++ b/tests/ui/type-alias-impl-trait/multiple_definitions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs index 1ccd1b0cbad4b..4eb16727ba817 100644 --- a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs +++ b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-fail +//@ edition: 2021 +//@ build-fail //~^^ ERROR overflow evaluating the requirement `<() as B>::Assoc == _` #![feature(rustc_attrs)] diff --git a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs index 11b659eec9732..518417954084e 100644 --- a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs @@ -1,6 +1,6 @@ // Regression test for issue #83190, triggering an ICE in borrowck. -// check-pass +//@ check-pass pub trait Any {} impl Any for T {} diff --git a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs index 5f3dbaa179891..ad25f06dc1ec8 100644 --- a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs +++ b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs @@ -4,8 +4,8 @@ //! a signature. They become part of a signature via `dyn Trait` or `impl Trait`, //! which is something that we process abstractly without looking at its hidden //! types. -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/nested_in_closure.rs b/tests/ui/type-alias-impl-trait/nested_in_closure.rs index 362f3d53e88bf..1d6a5d978ee30 100644 --- a/tests/ui/type-alias-impl-trait/nested_in_closure.rs +++ b/tests/ui/type-alias-impl-trait/nested_in_closure.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass fn main() { let x = || { diff --git a/tests/ui/type-alias-impl-trait/nested_inference_failure.rs b/tests/ui/type-alias-impl-trait/nested_inference_failure.rs index d2091ca96ea01..08acfea00045d 100644 --- a/tests/ui/type-alias-impl-trait/nested_inference_failure.rs +++ b/tests/ui/type-alias-impl-trait/nested_inference_failure.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: new old -//[new] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: new old +//@[new] compile-flags: -Znext-solver //! This test checks that we can successfully infer //! the hidden type of `FooImpl` to be `Foo` diff --git a/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs b/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs index fed5ac07c901e..590107d10384a 100644 --- a/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs +++ b/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass fn main() {} type NoReveal = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/normalize-alias-type.rs b/tests/ui/type-alias-impl-trait/normalize-alias-type.rs index 7c62002b931be..605799260385f 100644 --- a/tests/ui/type-alias-impl-trait/normalize-alias-type.rs +++ b/tests/ui/type-alias-impl-trait/normalize-alias-type.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z mir-opt-level=3 +//@ check-pass +//@ compile-flags: -Z mir-opt-level=3 #![feature(type_alias_impl_trait)] #![crate_type = "lib"] pub trait Tr { diff --git a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs index 371cac6da7cd9..e78e6cf7690e7 100644 --- a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs +++ b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs @@ -1,9 +1,9 @@ // Regression test for #112691 // -// revisions: current next -// [next] compile-flags: -Znext-solver -// [next] check-pass -// [current]: known-bug: #112691 +//@ revisions: current next +//@ [next] compile-flags: -Znext-solver +//@ [next] check-pass +//@ [current]: known-bug: #112691 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.fixed b/tests/ui/type-alias-impl-trait/not_well_formed.fixed index d98e83ff6dd02..bd45d8cddae98 100644 --- a/tests/ui/type-alias-impl-trait/not_well_formed.fixed +++ b/tests/ui/type-alias-impl-trait/not_well_formed.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.rs b/tests/ui/type-alias-impl-trait/not_well_formed.rs index 18f173a693d22..7b5444ae0d345 100644 --- a/tests/ui/type-alias-impl-trait/not_well_formed.rs +++ b/tests/ui/type-alias-impl-trait/not_well_formed.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/obligation_ice.rs b/tests/ui/type-alias-impl-trait/obligation_ice.rs index 5aef04ff19c0b..e3698b23be86f 100644 --- a/tests/ui/type-alias-impl-trait/obligation_ice.rs +++ b/tests/ui/type-alias-impl-trait/obligation_ice.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass use std::iter::{once, Chain}; diff --git a/tests/ui/type-alias-impl-trait/outlives-bound-var.rs b/tests/ui/type-alias-impl-trait/outlives-bound-var.rs index b8fac45b76db7..0ae2c9600ce36 100644 --- a/tests/ui/type-alias-impl-trait/outlives-bound-var.rs +++ b/tests/ui/type-alias-impl-trait/outlives-bound-var.rs @@ -2,7 +2,7 @@ // opaque types with bound vars in substs. // This was an ICE. // -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Ty<'a> = impl Sized + 'a; diff --git a/tests/ui/type-alias-impl-trait/privacy.rs b/tests/ui/type-alias-impl-trait/privacy.rs index 3efbfaf09167e..a5386bbec0d23 100644 --- a/tests/ui/type-alias-impl-trait/privacy.rs +++ b/tests/ui/type-alias-impl-trait/privacy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs index 1b02fce2ad9be..88a8f6e11a531 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs @@ -5,19 +5,19 @@ //! query, we attempt to actually check the defining anchor, but now we //! have a situation where the RPIT gets constrained outside its anchor. -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass - -//[current] known-bug: #108498 -//[current] failure-status: 101 -//[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[current] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" -//[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" -//[current] normalize-stderr-test: "(?m)^ *at .*\n" -> "" +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass + +//@[current] known-bug: #108498 +//@[current] failure-status: 101 +//@[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" +//@[current] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" +//@[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" +//@[current] normalize-stderr-test: "(?m)^ *at .*\n" -> "" #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs index 9d7e647dd9434..9cb0316b7a38e 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs @@ -1,7 +1,7 @@ // The canonical query `Projection(::Output = Opaque)` // is the *only* site that defines `Opaque` in MIR typeck. // -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential-2.rs b/tests/ui/type-alias-impl-trait/self-referential-2.rs index 3a765a2e3ef82..abba5b3a203d6 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-2.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-2.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/self-referential-3.rs b/tests/ui/type-alias-impl-trait/self-referential-3.rs index 922ac66207187..b33051da2d779 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-3.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-3.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential-4.rs b/tests/ui/type-alias-impl-trait/self-referential-4.rs index caa9e33bad049..29b5a042b7df1 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-4.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-4.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential.rs b/tests/ui/type-alias-impl-trait/self-referential.rs index 0900d7279ca61..3090f7733d24d 100644 --- a/tests/ui/type-alias-impl-trait/self-referential.rs +++ b/tests/ui/type-alias-impl-trait/self-referential.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self_implication.rs b/tests/ui/type-alias-impl-trait/self_implication.rs index 65659a0f3b133..eed13933a037c 100644 --- a/tests/ui/type-alias-impl-trait/self_implication.rs +++ b/tests/ui/type-alias-impl-trait/self_implication.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn foo() { diff --git a/tests/ui/type-alias-impl-trait/static-const-types.rs b/tests/ui/type-alias-impl-trait/static-const-types.rs index 748a279e43989..dad515aaa7bd9 100644 --- a/tests/ui/type-alias-impl-trait/static-const-types.rs +++ b/tests/ui/type-alias-impl-trait/static-const-types.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs index 39f0b9a02eeae..9901c8fe25d47 100644 --- a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs +++ b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zvalidate-mir -// check-pass +//@ compile-flags: -Zvalidate-mir +//@ check-pass // Check that we don't cause cycle errors when validating pre-`Reveal::All` MIR // that assigns opaques through normalized projections. diff --git a/tests/ui/type-alias-impl-trait/tait-normalize.rs b/tests/ui/type-alias-impl-trait/tait-normalize.rs index 26d94dbb42a36..38e09b6087b64 100644 --- a/tests/ui/type-alias-impl-trait/tait-normalize.rs +++ b/tests/ui/type-alias-impl-trait/tait-normalize.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs index f6a8302967060..66a6c0a35b50e 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs index fddecfcacf680..e46d2bd559cf2 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs index 5630e036be34b..6b37552fed145 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass // Ensures that `const` items can constrain an opaque `impl Trait`. use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs index 4e7388517a5eb..bd580a78984a1 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs index c5e8068e5c8e9..188b23732f912 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs index 1a4064055db65..1340a4214ee54 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs index 7bf899a96be12..8d0456e587cb7 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[current] check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs index 70c2ee4278ca2..0fe653ac471a1 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs index 67f56bcde939a..65e2feaf7954d 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs index fd954801dc047..af575a4ff36ba 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type_of_a_let.rs b/tests/ui/type-alias-impl-trait/type_of_a_let.rs index 0f4dac6c68333..48fcac92bec7f 100644 --- a/tests/ui/type-alias-impl-trait/type_of_a_let.rs +++ b/tests/ui/type-alias-impl-trait/type_of_a_let.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs b/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs index f43ad7dce1d40..03afec859d272 100644 --- a/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs +++ b/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Opaque = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/unused_generic_param.rs b/tests/ui/type-alias-impl-trait/unused_generic_param.rs index ad5e4918ccac5..b675bc2e6225f 100644 --- a/tests/ui/type-alias-impl-trait/unused_generic_param.rs +++ b/tests/ui/type-alias-impl-trait/unused_generic_param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/weird-return-types.rs b/tests/ui/type-alias-impl-trait/weird-return-types.rs index faad5ee956a1d..29d4faa7ba908 100644 --- a/tests/ui/type-alias-impl-trait/weird-return-types.rs +++ b/tests/ui/type-alias-impl-trait/weird-return-types.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs b/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs index 3b8470e4ae628..1484d9fd0734f 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs +++ b/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// build-pass +//@ build-pass trait Bar { fn bar(&self); diff --git a/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs b/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs index b92e15aad5618..bca146ffd117b 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass pub struct Key; #[derive(Clone)] diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs index 22e2b0efd1f34..c20be3125bc7a 100644 --- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs @@ -1,10 +1,10 @@ // WF check for impl Trait in associated type position. // -// revisions: pass pass_next fail -// [pass] check-pass -// [pass_next] compile-flags: -Znext-solver -// [pass_next] check-pass -// [fail] check-fail +//@ revisions: pass pass_next fail +//@ [pass] check-pass +//@ [pass_next] compile-flags: -Znext-solver +//@ [pass_next] check-pass +//@ [fail] check-fail #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/wf-nested.rs b/tests/ui/type-alias-impl-trait/wf-nested.rs index 2f90c4e00e380..1fc93a3cd2793 100644 --- a/tests/ui/type-alias-impl-trait/wf-nested.rs +++ b/tests/ui/type-alias-impl-trait/wf-nested.rs @@ -2,10 +2,10 @@ // `type Outer = impl Trait`. // See the comments below. // -// revisions: pass pass_sound fail -// [pass] check-pass -// [pass_sound] check-fail -// [fail] check-fail +//@ revisions: pass pass_sound fail +//@ [pass] check-pass +//@ [pass_sound] check-fail +//@ [fail] check-fail #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias/issue-14933.rs b/tests/ui/type-alias/issue-14933.rs index bd95332cabaed..ddad6071017cd 100644 --- a/tests/ui/type-alias/issue-14933.rs +++ b/tests/ui/type-alias/issue-14933.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub type BigRat = T; diff --git a/tests/ui/type-alias/issue-37515.rs b/tests/ui/type-alias/issue-37515.rs index b3a870d505a2d..28875c97f2dfe 100644 --- a/tests/ui/type-alias/issue-37515.rs +++ b/tests/ui/type-alias/issue-37515.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/type-id-higher-rank-2.rs b/tests/ui/type-id-higher-rank-2.rs index 5391c849dad96..4a76b737e8c43 100644 --- a/tests/ui/type-id-higher-rank-2.rs +++ b/tests/ui/type-id-higher-rank-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can't ignore lifetimes by going through Any. use std::any::Any; diff --git a/tests/ui/type-inference/generalize-subtyped-variables.rs b/tests/ui/type-inference/generalize-subtyped-variables.rs index f93408a43db5e..b7cae32ee32ff 100644 --- a/tests/ui/type-inference/generalize-subtyped-variables.rs +++ b/tests/ui/type-inference/generalize-subtyped-variables.rs @@ -13,7 +13,7 @@ // to generalize `z` to first (when related to the type of `y`). // // Found when considering fixes to #117151 -// check-pass +//@ check-pass fn main() { let mut x = None; diff --git a/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs index 5d0e456d9ddc0..d4bf3cc5cdb76 100644 --- a/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs +++ b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Verify that PartialEq implementations do not break type inference when // accepting types with different allocators diff --git a/tests/ui/type-namespace.rs b/tests/ui/type-namespace.rs index 3cc0bc447a5b1..31dc684a214a7 100644 --- a/tests/ui/type-namespace.rs +++ b/tests/ui/type-namespace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: isize } diff --git a/tests/ui/type-param-constraints.rs b/tests/ui/type-param-constraints.rs index 3d87a089fca3a..a5c36af63fa78 100644 --- a/tests/ui/type-param-constraints.rs +++ b/tests/ui/type-param-constraints.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn p_foo(_pinned: T) { } fn s_foo(_shared: T) { } diff --git a/tests/ui/type-param.rs b/tests/ui/type-param.rs index ca2f24d379bc6..fdb56feab82a9 100644 --- a/tests/ui/type-param.rs +++ b/tests/ui/type-param.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 type lteq = extern "C" fn(T) -> bool; diff --git a/tests/ui/type-ptr.rs b/tests/ui/type-ptr.rs index 7c2438d38bddc..8f3868fc609c3 100644 --- a/tests/ui/type-ptr.rs +++ b/tests/ui/type-ptr.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(a: *const isize) -> *const isize { return a; } diff --git a/tests/ui/type-use-i1-versus-i8.rs b/tests/ui/type-use-i1-versus-i8.rs index 7315cd2feeaa6..916a77d993484 100644 --- a/tests/ui/type-use-i1-versus-i8.rs +++ b/tests/ui/type-use-i1-versus-i8.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/type/ascription/issue-47666.fixed b/tests/ui/type/ascription/issue-47666.fixed index 027c692f9003b..5facc83bc63a6 100644 --- a/tests/ui/type/ascription/issue-47666.fixed +++ b/tests/ui/type/ascription/issue-47666.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option::Some(vec![0, 1]); //~ ERROR path separator must be a double colon } diff --git a/tests/ui/type/ascription/issue-47666.rs b/tests/ui/type/ascription/issue-47666.rs index e2f5d03ef7425..a529b00b48092 100644 --- a/tests/ui/type/ascription/issue-47666.rs +++ b/tests/ui/type/ascription/issue-47666.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option:Some(vec![0, 1]); //~ ERROR path separator must be a double colon } diff --git a/tests/ui/type/ascription/issue-54516.fixed b/tests/ui/type/ascription/issue-54516.fixed index 48622663b4d5e..cf65d08e2fb7a 100644 --- a/tests/ui/type/ascription/issue-54516.fixed +++ b/tests/ui/type/ascription/issue-54516.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::BTreeMap; fn main() { diff --git a/tests/ui/type/ascription/issue-54516.rs b/tests/ui/type/ascription/issue-54516.rs index 9e71d2af1d32b..b087870abb528 100644 --- a/tests/ui/type/ascription/issue-54516.rs +++ b/tests/ui/type/ascription/issue-54516.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::BTreeMap; fn main() { diff --git a/tests/ui/type/ascription/issue-60933.fixed b/tests/ui/type/ascription/issue-60933.fixed index 016ad4a7e6a63..8cce8e96c7419 100644 --- a/tests/ui/type/ascription/issue-60933.fixed +++ b/tests/ui/type/ascription/issue-60933.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: usize = std::mem::size_of::(); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/type/ascription/issue-60933.rs b/tests/ui/type/ascription/issue-60933.rs index 972bf2827f97f..048423289cc2f 100644 --- a/tests/ui/type/ascription/issue-60933.rs +++ b/tests/ui/type/ascription/issue-60933.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: usize = std::mem:size_of::(); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs index 68aadcf605384..5ee3c027f4049 100644 --- a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs +++ b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs @@ -1,7 +1,7 @@ // Regression test for issue #67690 // Rustc endless loop out-of-memory and consequent SIGKILL in generic new type -// check-pass +//@ check-pass pub type T = P; //~^ WARN bounds on generic parameters are not enforced in type aliases diff --git a/tests/ui/type/issue-91268.rs b/tests/ui/type/issue-91268.rs index 274ea839e8bdd..16d5b24114565 100644 --- a/tests/ui/type/issue-91268.rs +++ b/tests/ui/type/issue-91268.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter // ignore-tidy-trailing-newlines // `ţ` must be the last character in this file, it cannot be followed by a newline fn main() { diff --git a/tests/ui/type/issue-94187-verbose-type-name.rs b/tests/ui/type/issue-94187-verbose-type-name.rs index 7c765d6d8104a..3c0dc72f234d7 100644 --- a/tests/ui/type/issue-94187-verbose-type-name.rs +++ b/tests/ui/type/issue-94187-verbose-type-name.rs @@ -1,8 +1,8 @@ // Ensure the output of `std::any::type_name` does not change based on `-Zverbose-internals` -// run-pass -// edition: 2018 -// revisions: normal verbose -// [verbose]compile-flags:-Zverbose-internals --verbose +//@ run-pass +//@ edition: 2018 +//@ revisions: normal verbose +//@ [verbose]compile-flags:-Zverbose-internals --verbose use std::any::type_name; diff --git a/tests/ui/type/missing-let-in-binding-2.fixed b/tests/ui/type/missing-let-in-binding-2.fixed index d64013c8c8385..f4e34c739c5e7 100644 --- a/tests/ui/type/missing-let-in-binding-2.fixed +++ b/tests/ui/type/missing-let-in-binding-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _v: Vec = vec![1, 2, 3]; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding-2.rs b/tests/ui/type/missing-let-in-binding-2.rs index f95f7bef21585..bb813acbc6897 100644 --- a/tests/ui/type/missing-let-in-binding-2.rs +++ b/tests/ui/type/missing-let-in-binding-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { _v: Vec = vec![1, 2, 3]; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding.fixed b/tests/ui/type/missing-let-in-binding.fixed index 4301fed2312e6..81eda1a1c0b41 100644 --- a/tests/ui/type/missing-let-in-binding.fixed +++ b/tests/ui/type/missing-let-in-binding.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _foo: i32 = 1; let _foo: i32 = 4; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding.rs b/tests/ui/type/missing-let-in-binding.rs index c0f91d98ff31f..215df6e4c55a8 100644 --- a/tests/ui/type/missing-let-in-binding.rs +++ b/tests/ui/type/missing-let-in-binding.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _foo: i32 = 1; _foo: i32 = 4; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/subtyping-opaque-type.rs b/tests/ui/type/subtyping-opaque-type.rs index beda232ea8b37..e17114a364768 100644 --- a/tests/ui/type/subtyping-opaque-type.rs +++ b/tests/ui/type/subtyping-opaque-type.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir trait Duh {} impl Duh for i32 {} diff --git a/tests/ui/type/type-alias-bounds.rs b/tests/ui/type/type-alias-bounds.rs index e49731725d512..6d63c0c7e1bda 100644 --- a/tests/ui/type/type-alias-bounds.rs +++ b/tests/ui/type/type-alias-bounds.rs @@ -1,6 +1,6 @@ // Test `ignored_generic_bounds` lint warning about bounds in type aliases. -// check-pass +//@ check-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/tests/ui/type/type-arg-out-of-scope.rs b/tests/ui/type/type-arg-out-of-scope.rs index c36f9904e5dc1..3f8a6ff101652 100644 --- a/tests/ui/type/type-arg-out-of-scope.rs +++ b/tests/ui/type/type-arg-out-of-scope.rs @@ -1,4 +1,4 @@ -// error-pattern:can't use generic parameters from outer item +//@ error-pattern:can't use generic parameters from outer item fn foo(x: T) { fn bar(f: Box T>) { } } diff --git a/tests/ui/type/type-ascription-with-fn-call.fixed b/tests/ui/type/type-ascription-with-fn-call.fixed index 847f33099732e..2b85427f91e3b 100644 --- a/tests/ui/type/type-ascription-with-fn-call.fixed +++ b/tests/ui/type/type-ascription-with-fn-call.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { f() ; //~ ERROR statements are terminated with a semicolon f(); diff --git a/tests/ui/type/type-ascription-with-fn-call.rs b/tests/ui/type/type-ascription-with-fn-call.rs index 1db48b0adc435..645f6c4536b53 100644 --- a/tests/ui/type/type-ascription-with-fn-call.rs +++ b/tests/ui/type/type-ascription-with-fn-call.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { f() : //~ ERROR statements are terminated with a semicolon f(); diff --git a/tests/ui/type/type-ascription.rs b/tests/ui/type/type-ascription.rs index e4a4c89d057f2..76d6d923affc2 100644 --- a/tests/ui/type/type-ascription.rs +++ b/tests/ui/type/type-ascription.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/type/type-check/coerce-result-return-value.fixed b/tests/ui/type/type-check/coerce-result-return-value.fixed index 8a05407070dad..4fcfe5c38389b 100644 --- a/tests/ui/type/type-check/coerce-result-return-value.fixed +++ b/tests/ui/type/type-check/coerce-result-return-value.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A; struct B; impl From for B { diff --git a/tests/ui/type/type-check/coerce-result-return-value.rs b/tests/ui/type/type-check/coerce-result-return-value.rs index 442203addb787..79aa8817c809a 100644 --- a/tests/ui/type/type-check/coerce-result-return-value.rs +++ b/tests/ui/type/type-check/coerce-result-return-value.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A; struct B; impl From for B { diff --git a/tests/ui/type/type-check/point-at-inference-3.fixed b/tests/ui/type/type-check/point-at-inference-3.fixed index 15a3b580568d6..ce572c346b3bb 100644 --- a/tests/ui/type/type-check/point-at-inference-3.fixed +++ b/tests/ui/type/type-check/point-at-inference-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut v = Vec::new(); v.push(0i32); diff --git a/tests/ui/type/type-check/point-at-inference-3.rs b/tests/ui/type/type-check/point-at-inference-3.rs index a48c4f9862f75..9089cc59e554d 100644 --- a/tests/ui/type/type-check/point-at-inference-3.rs +++ b/tests/ui/type/type-check/point-at-inference-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut v = Vec::new(); v.push(0i32); diff --git a/tests/ui/type/type-check/point-at-inference.fixed b/tests/ui/type/type-check/point-at-inference.fixed index f41fbe59fba6c..915f63c708015 100644 --- a/tests/ui/type/type-check/point-at-inference.fixed +++ b/tests/ui/type/type-check/point-at-inference.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn bar(_: Vec) {} fn baz(_: &impl std::any::Any) {} fn main() { diff --git a/tests/ui/type/type-check/point-at-inference.rs b/tests/ui/type/type-check/point-at-inference.rs index 6419e42e70d12..e4893eb8534f6 100644 --- a/tests/ui/type/type-check/point-at-inference.rs +++ b/tests/ui/type/type-check/point-at-inference.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn bar(_: Vec) {} fn baz(_: &impl std::any::Any) {} fn main() { diff --git a/tests/ui/type/type-mismatch-same-crate-name.rs b/tests/ui/type/type-mismatch-same-crate-name.rs index 2a59bd9945083..da76616523826 100644 --- a/tests/ui/type/type-mismatch-same-crate-name.rs +++ b/tests/ui/type/type-mismatch-same-crate-name.rs @@ -1,5 +1,5 @@ -// aux-build:crate_a1.rs -// aux-build:crate_a2.rs +//@ aux-build:crate_a1.rs +//@ aux-build:crate_a2.rs // This tests the extra note reported when a type error deals with // seemingly identical types. diff --git a/tests/ui/type/type-unsatisfiable.rs b/tests/ui/type/type-unsatisfiable.rs index 7fbbb50dc115f..0c05d48c76b2a 100644 --- a/tests/ui/type/type-unsatisfiable.rs +++ b/tests/ui/type/type-unsatisfiable.rs @@ -1,6 +1,6 @@ -// revisions: lib usage -//[lib] compile-flags: --crate-type=lib -//[lib] build-pass +//@ revisions: lib usage +//@[lib] compile-flags: --crate-type=lib +//@[lib] build-pass use std::ops::Sub; trait Vector2 { diff --git a/tests/ui/type/verbose.rs b/tests/ui/type/verbose.rs index 4ebd5cdccfcf9..7ee69d99566fc 100644 --- a/tests/ui/type/verbose.rs +++ b/tests/ui/type/verbose.rs @@ -1,5 +1,5 @@ -// revisions:verbose normal -// [verbose]compile-flags:--verbose +//@ revisions:verbose normal +//@ [verbose]compile-flags:--verbose #![crate_type = "lib"] struct Foo { x: T, y: U } diff --git a/tests/ui/type_length_limit.rs b/tests/ui/type_length_limit.rs index b3c12747414ed..c60f1be06c671 100644 --- a/tests/ui/type_length_limit.rs +++ b/tests/ui/type_length_limit.rs @@ -1,7 +1,7 @@ -// build-fail -// error-pattern: reached the type-length limit while instantiating -// compile-flags: -Copt-level=0 -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ error-pattern: reached the type-length limit while instantiating +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: ".nll/" -> "/" // Test that the type length limit can be changed. // The exact type depends on optimizations, so disable them. diff --git a/tests/ui/typeck/assign-non-lval-derefmut.fixed b/tests/ui/typeck/assign-non-lval-derefmut.fixed index 0c23199af2270..6ecec574f2ece 100644 --- a/tests/ui/typeck/assign-non-lval-derefmut.fixed +++ b/tests/ui/typeck/assign-non-lval-derefmut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = std::sync::Mutex::new(1usize); diff --git a/tests/ui/typeck/assign-non-lval-derefmut.rs b/tests/ui/typeck/assign-non-lval-derefmut.rs index ec1882f5271b1..ac1be913e2a9d 100644 --- a/tests/ui/typeck/assign-non-lval-derefmut.rs +++ b/tests/ui/typeck/assign-non-lval-derefmut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = std::sync::Mutex::new(1usize); diff --git a/tests/ui/typeck/assign-non-lval-mut-ref.fixed b/tests/ui/typeck/assign-non-lval-mut-ref.fixed index 10c7b9dbfb331..5733e74b613e8 100644 --- a/tests/ui/typeck/assign-non-lval-mut-ref.fixed +++ b/tests/ui/typeck/assign-non-lval-mut-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut x = vec![1usize]; diff --git a/tests/ui/typeck/assign-non-lval-mut-ref.rs b/tests/ui/typeck/assign-non-lval-mut-ref.rs index bceff0ef09d19..d2f1253eb0ccd 100644 --- a/tests/ui/typeck/assign-non-lval-mut-ref.rs +++ b/tests/ui/typeck/assign-non-lval-mut-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut x = vec![1usize]; diff --git a/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs b/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs index 88a040529e709..4285ebb7b6cda 100644 --- a/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs +++ b/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![crate_type="lib"] #![crate_name="xcrate_issue_61711_b"] pub struct Struct; diff --git a/tests/ui/typeck/issue-100164.fixed b/tests/ui/typeck/issue-100164.fixed index a5f68beb1d522..4af32cfa3f1a2 100644 --- a/tests/ui/typeck/issue-100164.fixed +++ b/tests/ui/typeck/issue-100164.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix const _A: i32 = 123; //~^ ERROR: missing type for `const` item diff --git a/tests/ui/typeck/issue-100164.rs b/tests/ui/typeck/issue-100164.rs index 7efb9ac624042..46ec1dea0c038 100644 --- a/tests/ui/typeck/issue-100164.rs +++ b/tests/ui/typeck/issue-100164.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix const _A: = 123; //~^ ERROR: missing type for `const` item diff --git a/tests/ui/typeck/issue-103899.rs b/tests/ui/typeck/issue-103899.rs index ac9e4c716962f..5876a34ef55c5 100644 --- a/tests/ui/typeck/issue-103899.rs +++ b/tests/ui/typeck/issue-103899.rs @@ -1,7 +1,7 @@ -// check-fail -// failure-status: 101 -// dont-check-compiler-stderr -// known-bug: #103899 +//@ check-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ known-bug: #103899 trait BaseWithAssoc { type Assoc; diff --git a/tests/ui/typeck/issue-104510-ice.rs b/tests/ui/typeck/issue-104510-ice.rs index 157bdf07e3826..627af1fe95230 100644 --- a/tests/ui/typeck/issue-104510-ice.rs +++ b/tests/ui/typeck/issue-104510-ice.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 struct W(Oops); //~^ ERROR cannot find type `Oops` in this scope diff --git a/tests/ui/typeck/issue-107775.rs b/tests/ui/typeck/issue-107775.rs index 6fbac2ee9758e..3c3ae8ee5525b 100644 --- a/tests/ui/typeck/issue-107775.rs +++ b/tests/ui/typeck/issue-107775.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::collections::HashMap; use std::future::Future; diff --git a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed index b101cf1dcf57b..ff3f392e777db 100644 --- a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed +++ b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub fn foo(x: &str) -> Result<(), Box> { diff --git a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs index cfde912d8961e..7659d6734cae7 100644 --- a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs +++ b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub fn foo(x: &str) -> Result<(), Box> { diff --git a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed index 29b6b8b868f56..dcb256de18f17 100644 --- a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed +++ b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] // https://github.com/rust-lang/rust/issues/112007 diff --git a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs index bd731e02bd1e9..58cd6cbf20c57 100644 --- a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs +++ b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] // https://github.com/rust-lang/rust/issues/112007 diff --git a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed index bdb884f54312c..144f6f7a0ff0b 100644 --- a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed +++ b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ptr1: *const u32 = std::ptr::null(); diff --git a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs index cf68850cc4dee..5e259ab3566bc 100644 --- a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs +++ b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ptr1: *const u32 = std::ptr::null(); diff --git a/tests/ui/typeck/issue-116864.rs b/tests/ui/typeck/issue-116864.rs index 88c3f7866082a..6cbe56b2f926a 100644 --- a/tests/ui/typeck/issue-116864.rs +++ b/tests/ui/typeck/issue-116864.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// check-pass -// edition: 2021 +//@ compile-flags: -Znext-solver +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/typeck/issue-18937-1.rs b/tests/ui/typeck/issue-18937-1.rs index 57e56d832c6b0..e65aab553fdcc 100644 --- a/tests/ui/typeck/issue-18937-1.rs +++ b/tests/ui/typeck/issue-18937-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to type-check this example. In particular, // knowing that `T: 'a` allows us to deduce that `[U]: 'a` (because // when `T=[U]` it implies that `U: 'a`). diff --git a/tests/ui/typeck/issue-2063-resource.rs b/tests/ui/typeck/issue-2063-resource.rs index 1d0527447ba51..0b34cbb4c5ed8 100644 --- a/tests/ui/typeck/issue-2063-resource.rs +++ b/tests/ui/typeck/issue-2063-resource.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances diff --git a/tests/ui/typeck/issue-2063.rs b/tests/ui/typeck/issue-2063.rs index b00bbc082afc5..52b5f7ab9fc24 100644 --- a/tests/ui/typeck/issue-2063.rs +++ b/tests/ui/typeck/issue-2063.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances // of such a type could ever be constructed. diff --git a/tests/ui/typeck/issue-22375.rs b/tests/ui/typeck/issue-22375.rs index 21a1a4c83800a..ec0e9d6a48c3a 100644 --- a/tests/ui/typeck/issue-22375.rs +++ b/tests/ui/typeck/issue-22375.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A> {} fn main() {} diff --git a/tests/ui/typeck/issue-29181.rs b/tests/ui/typeck/issue-29181.rs index 70e5bc0192086..d068356d47790 100644 --- a/tests/ui/typeck/issue-29181.rs +++ b/tests/ui/typeck/issue-29181.rs @@ -1,4 +1,4 @@ -// aux-build:issue-29181.rs +//@ aux-build:issue-29181.rs extern crate issue_29181 as foo; diff --git a/tests/ui/typeck/issue-36708.rs b/tests/ui/typeck/issue-36708.rs index c9d9f2a6d5015..f65f25d5dfbea 100644 --- a/tests/ui/typeck/issue-36708.rs +++ b/tests/ui/typeck/issue-36708.rs @@ -1,4 +1,4 @@ -// aux-build:issue-36708.rs +//@ aux-build:issue-36708.rs extern crate issue_36708 as lib; diff --git a/tests/ui/typeck/issue-43189.rs b/tests/ui/typeck/issue-43189.rs index ce667a5006e6f..9c8cc70e63a6a 100644 --- a/tests/ui/typeck/issue-43189.rs +++ b/tests/ui/typeck/issue-43189.rs @@ -1,9 +1,9 @@ // Issue 46112: An extern crate pub re-exporting libcore was causing // paths rooted from `std` to be misrendered in the diagnostic output. -// ignore-windows -// aux-build:xcrate-issue-43189-a.rs -// aux-build:xcrate-issue-43189-b.rs +//@ ignore-windows +//@ aux-build:xcrate-issue-43189-a.rs +//@ aux-build:xcrate-issue-43189-b.rs extern crate xcrate_issue_43189_b; fn main() { diff --git a/tests/ui/typeck/issue-46112.rs b/tests/ui/typeck/issue-46112.rs index 0cdd2c27ff73e..4671ddd06c831 100644 --- a/tests/ui/typeck/issue-46112.rs +++ b/tests/ui/typeck/issue-46112.rs @@ -1,8 +1,8 @@ // Issue 46112: An extern crate pub re-exporting libcore was causing // paths rooted from `std` to be misrendered in the diagnostic output. -// ignore-windows -// aux-build:xcrate-issue-46112-rexport-core.rs +//@ ignore-windows +//@ aux-build:xcrate-issue-46112-rexport-core.rs extern crate xcrate_issue_46112_rexport_core; fn test(r: Result, &'static str>) { } diff --git a/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs b/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs index 23ea0ad61a7f7..0d91d0d61311c 100644 --- a/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs +++ b/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#55810: types for a binding in a match arm can be // inferred from arms that come later in the match. diff --git a/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs b/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs index de7d6a0d80c9e..6d00f66a26d44 100644 --- a/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs +++ b/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs @@ -1,11 +1,11 @@ // Issue 61711: A crate pub re-exporting `crate` was causing an // infinite loop. -// edition:2018 -// aux-build:xcrate-issue-61711-b.rs -// compile-flags:--extern xcrate_issue_61711_b +//@ edition:2018 +//@ aux-build:xcrate-issue-61711-b.rs +//@ compile-flags:--extern xcrate_issue_61711_b -// build-pass +//@ build-pass fn f(_: F) { } fn main() { } diff --git a/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs b/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs index e4436260e70a0..b0f01de26b49f 100644 --- a/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs +++ b/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#68590: confusing diagnostics when reborrowing through DerefMut. diff --git a/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs b/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs index 3ea05389f04a0..cd502c82223f8 100644 --- a/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs +++ b/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#72225: confusing diagnostics when calling FnMut through DerefMut. diff --git a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed index 7fdd618c2ecae..07096803c1164 100644 --- a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed +++ b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix // // rust-lang/rust#73592: borrow_mut through Deref should work. // diff --git a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs index 3b399e629d341..cdfdd7e8fae80 100644 --- a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs +++ b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix // // rust-lang/rust#73592: borrow_mut through Deref should work. // diff --git a/tests/ui/typeck/issue-74933.rs b/tests/ui/typeck/issue-74933.rs index 4b6c173b8ce58..a49ef97ac14fa 100644 --- a/tests/ui/typeck/issue-74933.rs +++ b/tests/ui/typeck/issue-74933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // rust-lang/rust#74933: Lifetime error when indexing with borrowed index diff --git a/tests/ui/typeck/issue-80207-unsized-return.rs b/tests/ui/typeck/issue-80207-unsized-return.rs index 75430da148239..a192db0ef3e9d 100644 --- a/tests/ui/typeck/issue-80207-unsized-return.rs +++ b/tests/ui/typeck/issue-80207-unsized-return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { fn do_stuff() -> Self; diff --git a/tests/ui/typeck/issue-81943.rs b/tests/ui/typeck/issue-81943.rs index 18f5970a350a2..9c79aa278757f 100644 --- a/tests/ui/typeck/issue-81943.rs +++ b/tests/ui/typeck/issue-81943.rs @@ -1,4 +1,4 @@ -// aux-build:issue-81943-lib.rs +//@ aux-build:issue-81943-lib.rs extern crate issue_81943_lib as lib; fn f(f: F) { f(0); } diff --git a/tests/ui/typeck/issue-82772.rs b/tests/ui/typeck/issue-82772.rs index 326273bfe9229..b620eee430765 100644 --- a/tests/ui/typeck/issue-82772.rs +++ b/tests/ui/typeck/issue-82772.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { use a::ModPrivateStruct; diff --git a/tests/ui/typeck/issue-86721-return-expr-ice.rs b/tests/ui/typeck/issue-86721-return-expr-ice.rs index 4f882f7a3f1e1..ea3a2f2fbfe6e 100644 --- a/tests/ui/typeck/issue-86721-return-expr-ice.rs +++ b/tests/ui/typeck/issue-86721-return-expr-ice.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #86721. -// revisions: rev1 rev2 +//@ revisions: rev1 rev2 #![cfg_attr(any(), rev1, rev2)] #![crate_type = "lib"] diff --git a/tests/ui/typeck/issue-88609.rs b/tests/ui/typeck/issue-88609.rs index dc459c885fa70..9b74a88edd3d7 100644 --- a/tests/ui/typeck/issue-88609.rs +++ b/tests/ui/typeck/issue-88609.rs @@ -2,7 +2,7 @@ // The return type for `main` is not normalized while checking if it implements // the trait `std::process::Termination`. -// build-pass +//@ build-pass trait Same { type Output; diff --git a/tests/ui/typeck/issue-88803-call-expr-method.fixed b/tests/ui/typeck/issue-88803-call-expr-method.fixed index 19b96ecf3fc3a..2a78276a6fe9c 100644 --- a/tests/ui/typeck/issue-88803-call-expr-method.fixed +++ b/tests/ui/typeck/issue-88803-call-expr-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-88803-call-expr-method.rs b/tests/ui/typeck/issue-88803-call-expr-method.rs index a061994663749..8ddc0340f1821 100644 --- a/tests/ui/typeck/issue-88803-call-expr-method.rs +++ b/tests/ui/typeck/issue-88803-call-expr-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed b/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed index 0a3086a345dda..584bbe8c946c7 100644 --- a/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed +++ b/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89044-wrapped-expr-method.rs b/tests/ui/typeck/issue-89044-wrapped-expr-method.rs index 83617e035e9ef..717231ffc572b 100644 --- a/tests/ui/typeck/issue-89044-wrapped-expr-method.rs +++ b/tests/ui/typeck/issue-89044-wrapped-expr-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89856.fixed b/tests/ui/typeck/issue-89856.fixed index 3e1a006efa069..213a672e397be 100644 --- a/tests/ui/typeck/issue-89856.fixed +++ b/tests/ui/typeck/issue-89856.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn take_str_maybe(_: Option<&str>) { } fn main() { diff --git a/tests/ui/typeck/issue-89856.rs b/tests/ui/typeck/issue-89856.rs index cfe6e19b303f3..83d88ff34cac6 100644 --- a/tests/ui/typeck/issue-89856.rs +++ b/tests/ui/typeck/issue-89856.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn take_str_maybe(_: Option<&str>) { } fn main() { diff --git a/tests/ui/typeck/issue-89935.rs b/tests/ui/typeck/issue-89935.rs index 03f8f09a72201..579a12dac69fe 100644 --- a/tests/ui/typeck/issue-89935.rs +++ b/tests/ui/typeck/issue-89935.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo: Baz {} trait Bar {} diff --git a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs index 8ccb15ca48a4f..0be1237749fcc 100644 --- a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs +++ b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn hello() { //~ HELP try adding a return type 0 diff --git a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs index 74e50d46e8dcf..77a2a5c5aa937 100644 --- a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs +++ b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 mod m { pub struct S { foo: i32 } diff --git a/tests/ui/typeck/issue-91210-ptr-method.fixed b/tests/ui/typeck/issue-91210-ptr-method.fixed index 94200cce73ec0..7fe9bdc6a1bb7 100644 --- a/tests/ui/typeck/issue-91210-ptr-method.fixed +++ b/tests/ui/typeck/issue-91210-ptr-method.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91210. -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/typeck/issue-91210-ptr-method.rs b/tests/ui/typeck/issue-91210-ptr-method.rs index ed0ce6effe7d9..1ae9331e642be 100644 --- a/tests/ui/typeck/issue-91210-ptr-method.rs +++ b/tests/ui/typeck/issue-91210-ptr-method.rs @@ -1,6 +1,6 @@ // Regression test for issue #91210. -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/typeck/issue-91328.fixed b/tests/ui/typeck/issue-91328.fixed index c0384399a92e6..bd646e9f40bfd 100644 --- a/tests/ui/typeck/issue-91328.fixed +++ b/tests/ui/typeck/issue-91328.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91328. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/typeck/issue-91328.rs b/tests/ui/typeck/issue-91328.rs index 63602d26f970d..6d2643dbead93 100644 --- a/tests/ui/typeck/issue-91328.rs +++ b/tests/ui/typeck/issue-91328.rs @@ -1,6 +1,6 @@ // Regression test for issue #91328. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/typeck/issue-91334.rs b/tests/ui/typeck/issue-91334.rs index 1ffc56e66127e..ec0d4ad70f15e 100644 --- a/tests/ui/typeck/issue-91334.rs +++ b/tests/ui/typeck/issue-91334.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in issue #91334. -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter #![feature(coroutines)] diff --git a/tests/ui/typeck/issue-91633.rs b/tests/ui/typeck/issue-91633.rs index 331a798dd7a36..e2a8d5fdd94c0 100644 --- a/tests/ui/typeck/issue-91633.rs +++ b/tests/ui/typeck/issue-91633.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f (it: &[T]) where [T] : std::ops::Index, diff --git a/tests/ui/typeck/issue-92481.rs b/tests/ui/typeck/issue-92481.rs index f752400bbcbb6..e3783ff8cd2a5 100644 --- a/tests/ui/typeck/issue-92481.rs +++ b/tests/ui/typeck/issue-92481.rs @@ -1,4 +1,4 @@ -//check-fail +//@check-fail #![crate_type="lib"] diff --git a/tests/ui/typeck/output-type-mismatch.rs b/tests/ui/typeck/output-type-mismatch.rs index 35097aa9ec61f..d5691c9c3535d 100644 --- a/tests/ui/typeck/output-type-mismatch.rs +++ b/tests/ui/typeck/output-type-mismatch.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn f() { } diff --git a/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs b/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs index 03602144e5001..f3ece563f5403 100644 --- a/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs +++ b/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #85099 +//@ check-pass +//@ known-bug: #85099 // Should fail. Can coerce `Pin` into `Pin` where // `T: Deref` and `U: Deref`, using the diff --git a/tests/ui/typeck/prim-with-args.fixed b/tests/ui/typeck/prim-with-args.fixed index e3f99479a3809..28150e8dac2e4 100644 --- a/tests/ui/typeck/prim-with-args.fixed +++ b/tests/ui/typeck/prim-with-args.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: isize; //~ ERROR type arguments are not allowed on builtin type diff --git a/tests/ui/typeck/prim-with-args.rs b/tests/ui/typeck/prim-with-args.rs index b10471eccee68..c0287b79bc4ba 100644 --- a/tests/ui/typeck/prim-with-args.rs +++ b/tests/ui/typeck/prim-with-args.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: isize; //~ ERROR type arguments are not allowed on builtin type diff --git a/tests/ui/typeck/project-cache-issue-37154.rs b/tests/ui/typeck/project-cache-issue-37154.rs index b10239c22d1f4..0fe0e09b89444 100644 --- a/tests/ui/typeck/project-cache-issue-37154.rs +++ b/tests/ui/typeck/project-cache-issue-37154.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #37154: the problem here was that the cache diff --git a/tests/ui/typeck/ptr-null-mutability-suggestions.fixed b/tests/ui/typeck/ptr-null-mutability-suggestions.fixed index d00536b29cff8..ff8c14793e164 100644 --- a/tests/ui/typeck/ptr-null-mutability-suggestions.fixed +++ b/tests/ui/typeck/ptr-null-mutability-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::ptr; diff --git a/tests/ui/typeck/ptr-null-mutability-suggestions.rs b/tests/ui/typeck/ptr-null-mutability-suggestions.rs index ea3066d2289f5..9fdc7fb8603df 100644 --- a/tests/ui/typeck/ptr-null-mutability-suggestions.rs +++ b/tests/ui/typeck/ptr-null-mutability-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::ptr; diff --git a/tests/ui/typeck/remove-extra-argument.fixed b/tests/ui/typeck/remove-extra-argument.fixed index d09306bf7941f..5fb01c877c41f 100644 --- a/tests/ui/typeck/remove-extra-argument.fixed +++ b/tests/ui/typeck/remove-extra-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())` fn l(_a: Vec) {} diff --git a/tests/ui/typeck/remove-extra-argument.rs b/tests/ui/typeck/remove-extra-argument.rs index 2181c37cee913..7762231714bd0 100644 --- a/tests/ui/typeck/remove-extra-argument.rs +++ b/tests/ui/typeck/remove-extra-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())` fn l(_a: Vec) {} diff --git a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed index ba83e79005b33..cb4a3967741cd 100644 --- a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed +++ b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 2.0e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields diff --git a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs index c102447f60288..e4cafc466c6f5 100644 --- a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs +++ b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 2.e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields diff --git a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed index 9ce46bc1a65b2..f562b24cc4c13 100644 --- a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed +++ b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} struct Struct; impl Trait for Struct {} diff --git a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs index 7f65a3bb59d31..e364e6daa6a01 100644 --- a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs +++ b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} struct Struct; impl Trait for Struct {} 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 2530a1e966d0a..24d1c7be51489 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 +//@ run-pass unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () { func() diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed index a9107f99873e4..b754f64350f7a 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed +++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we do not consider associated types to be sendable without // some applicable trait bound (and we don't ICE). #![allow(dead_code)] diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs index bafc1657737f4..0893533eaa91d 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs +++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we do not consider associated types to be sendable without // some applicable trait bound (and we don't ICE). #![allow(dead_code)] diff --git a/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs b/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs index cc75cd4909a23..3e15e28b8fd61 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs +++ b/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs @@ -1,4 +1,4 @@ -// aux-build:tdticc_coherence_lib.rs +//@ aux-build:tdticc_coherence_lib.rs #![allow(suspicious_auto_trait_impls)] // Test that we do not consider associated types to be sendable without 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 1e954f5690956..3d414aa6f1a37 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 +//@ run-pass // This tests reification from safe function to `unsafe fn` pointer fn do_nothing() -> () {} diff --git a/tests/ui/typeck/typeck_type_placeholder_1.rs b/tests/ui/typeck/typeck_type_placeholder_1.rs index ea7aa5285b09d..d38e5ce16a3d0 100644 --- a/tests/ui/typeck/typeck_type_placeholder_1.rs +++ b/tests/ui/typeck/typeck_type_placeholder_1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test checks that the `_` type placeholder works diff --git a/tests/ui/typeck/ufcs-type-params.rs b/tests/ui/typeck/ufcs-type-params.rs index eee2b55b2a01e..ef8b983b3e929 100644 --- a/tests/ui/typeck/ufcs-type-params.rs +++ b/tests/ui/typeck/ufcs-type-params.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn get(&self) -> T; diff --git a/tests/ui/typeck/unify-return-ty.rs b/tests/ui/typeck/unify-return-ty.rs index da1d82e896ae5..849b72e63e5de 100644 --- a/tests/ui/typeck/unify-return-ty.rs +++ b/tests/ui/typeck/unify-return-ty.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Tests that the tail expr in null() has its type // unified with the type *T, and so the type variable // in that type gets resolved. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem; diff --git a/tests/ui/typeck/while-type-error.rs b/tests/ui/typeck/while-type-error.rs index 8098bfcd8d9dd..ca3b8921f5400 100644 --- a/tests/ui/typeck/while-type-error.rs +++ b/tests/ui/typeck/while-type-error.rs @@ -1,3 +1,3 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn main() { while main { } } diff --git a/tests/ui/typeck/wrong-ret-type.rs b/tests/ui/typeck/wrong-ret-type.rs index cbff8dbae21d1..b83aefad1e9f6 100644 --- a/tests/ui/typeck/wrong-ret-type.rs +++ b/tests/ui/typeck/wrong-ret-type.rs @@ -1,3 +1,3 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn mk_int() -> usize { let i: isize = 3; return i; } fn main() { } diff --git a/tests/ui/typeid-intrinsic.rs b/tests/ui/typeid-intrinsic.rs index 5bc4e0c217f40..7c4fb3f95a94e 100644 --- a/tests/ui/typeid-intrinsic.rs +++ b/tests/ui/typeid-intrinsic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(deprecated)] -// aux-build:typeid-intrinsic-aux1.rs -// aux-build:typeid-intrinsic-aux2.rs +//@ aux-build:typeid-intrinsic-aux1.rs +//@ aux-build:typeid-intrinsic-aux2.rs #![feature(core_intrinsics)] diff --git a/tests/ui/typestate-multi-decl.rs b/tests/ui/typestate-multi-decl.rs index 9f941620559c0..3d0e79632bb33 100644 --- a/tests/ui/typestate-multi-decl.rs +++ b/tests/ui/typestate-multi-decl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let (x, y) = (10, 20); diff --git a/tests/ui/ufcs/ufcs-polymorphic-paths.rs b/tests/ui/ufcs/ufcs-polymorphic-paths.rs index 71b9de8184cd6..6dc97e5edb1cf 100644 --- a/tests/ui/ufcs/ufcs-polymorphic-paths.rs +++ b/tests/ui/ufcs/ufcs-polymorphic-paths.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::borrow::Cow; use std::iter::FromIterator; diff --git a/tests/ui/unboxed-closures/issue-18652.rs b/tests/ui/unboxed-closures/issue-18652.rs index 59aa01568429a..df233b3cc2b35 100644 --- a/tests/ui/unboxed-closures/issue-18652.rs +++ b/tests/ui/unboxed-closures/issue-18652.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests multiple free variables being passed by value into an unboxed // once closure as an optimization by codegen. This used to hit an // incorrect assert. diff --git a/tests/ui/unboxed-closures/issue-18661.rs b/tests/ui/unboxed-closures/issue-18661.rs index e242724323505..44b4c49935214 100644 --- a/tests/ui/unboxed-closures/issue-18661.rs +++ b/tests/ui/unboxed-closures/issue-18661.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that param substitutions from the correct environment are // used when codegenning unboxed closure calls. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn inside(c: F) { c(); diff --git a/tests/ui/unboxed-closures/issue-53448.rs b/tests/ui/unboxed-closures/issue-53448.rs index ea1edf7d45073..356bface2f8e8 100644 --- a/tests/ui/unboxed-closures/issue-53448.rs +++ b/tests/ui/unboxed-closures/issue-53448.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures)] diff --git a/tests/ui/unboxed-closures/type-id-higher-rank.rs b/tests/ui/unboxed-closures/type-id-higher-rank.rs index a9db71a0399bb..bdc73069e897f 100644 --- a/tests/ui/unboxed-closures/type-id-higher-rank.rs +++ b/tests/ui/unboxed-closures/type-id-higher-rank.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that type IDs correctly account for higher-rank lifetimes // Also acts as a regression test for an ICE (issue #19791) diff --git a/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs b/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs index dfccb02009e17..0ca4de56d744c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items)] fn a isize>(f: F) -> isize { diff --git a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs index a1001673506f0..1cf4863bfa999 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that you can supply `&F` where `F: FnMut()`. diff --git a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs index ca1d31ca54470..921bd94ee626c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that you can supply `&F` where `F: Fn()`. diff --git a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs index 53f0523da70cc..3240fe79a23f8 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn make_adder(x: i32) -> Boxi32+'static> { diff --git a/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs b/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs index cf4d4d3e136bd..e43e5285e717c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test by-ref capture of environment in unboxed closure types fn call_fn(f: F) { diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs index e23a75ab334e5..34486c00b4e60 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test that the call operator autoderefs when calling a bounded type parameter. diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs index 8a40c1d47855a..39150ab26a1bb 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the call operator autoderefs when calling a bounded type parameter. fn call_with_2(x: &mut F) -> isize diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs index 2433f0757aa08..42d96d18e4ac6 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the call operator autoderefs when calling to an object type. fn make_adder(x: isize) -> Boxisize + 'static> { diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs index b27d610495940..c6ad829de9b03 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn make_adder(x: isize) -> Boxisize + 'static> { Box::new(move |y| { x + y }) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs index 390386e57fa72..42287ac50701b 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we mutate a counter on the stack only when we expect to. fn call(f: F) where F : FnOnce() { diff --git a/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs b/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs index 39cc260726ddc..7825e86f62948 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Test that unboxed closures work with cross-crate inlining // Acts as a regression test for #16790, #18378 and #18543 -// aux-build:unboxed-closures-cross-crate.rs +//@ aux-build:unboxed-closures-cross-crate.rs extern crate unboxed_closures_cross_crate as ubcc; 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 1c5e74e593cb9..632bffbea18df 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut unboxed = || {}; diff --git a/tests/ui/unboxed-closures/unboxed-closures-drop.rs b/tests/ui/unboxed-closures/unboxed-closures-drop.rs index ba3c61ca22b15..11be305948060 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-drop.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] // A battery of tests to ensure destructors of unboxed closure environments diff --git a/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs b/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs index 3ee1aeb109b18..63366ca6cbf6b 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that higher-ranked extern fn pointers implement the full range of Fn traits. fn square(x: &isize) -> isize { (*x) * (*x) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs index d07e871b10d52..355791cda2643 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that extern fn pointers implement the full range of Fn traits. diff --git a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs index db1bea0e1159a..f61ecdd9ccb25 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that the Fn trait hierarchy rules permit // any Fn trait to be used where Fn is implemented. diff --git a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs index bd577f7c479e5..3d1a06ef66cfe 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that the Fn trait hierarchy rules permit // FnMut or FnOnce to be used where FnMut is implemented. diff --git a/tests/ui/unboxed-closures/unboxed-closures-generic.rs b/tests/ui/unboxed-closures/unboxed-closures-generic.rs index 524e756e69b0c..4419c96b7819e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-generic.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_iti32>(y: i32, mut f: F) -> i32 { f(2, y) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs index e0c9105760d24..c7c50b7b50e20 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs index d2eaee304104a..a54048d25181d 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs index c3abdd8aab09e..8c7b1c7534b0a 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs index 9135c82b4fdf0..fbf287d5fa8b3 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits)] fn main() { diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs index 73f488a4fbbd7..c5d8e7cc9ef6e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs index 7ac1ae30f77cb..b497f2575c8e4 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs index 0fbb504c2ba99..f8708a6231016 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs index 6381386c4cc37..1903c2586542d 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnOnce`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs index 3c8ea7d85100d..26cff438618eb 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnOnce`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs index fc01bd9b6d938..cbc98d9fb173f 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can infer the "kind" of an unboxed closure based on // the expected type. diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs index a0fbbafe25ffb..bd1769af1da73 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, unboxed_closures)] use std::marker::PhantomData; diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs index 6a5e5b9c224b9..a78992f66e076 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the type variable in the type(`Vec<_>`) of a closed over // variable does not interfere with type inference. diff --git a/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs b/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs index df60b42ab126a..2d4e3523b2c43 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] struct S; diff --git a/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs b/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs index 2df360d4a30a4..46fa8995c96b2 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that unboxed closures in contexts with free type parameters // monomorphize correctly (issue #16791) diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs b/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs index 4388e6bcf77f9..105a2a96a889a 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn foo(f: F) diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs index 470904fd3911b..d883053d2763e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(unused_mut)] #![allow(unused_must_use)] diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs b/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs index 2d219643f3e9c..55b42e0103673 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that in a by-ref once closure we move some variables even as // we capture others by mutable reference. diff --git a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs index 89a273b7a43ff..ca0ca66c0353d 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Tests that the re-exports of `FnOnce` et al from the prelude work. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let task: Box isize> = Box::new(|x| x); diff --git a/tests/ui/unboxed-closures/unboxed-closures-simple.rs b/tests/ui/unboxed-closures/unboxed-closures-simple.rs index 1449554024ca1..aa50180725e9a 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-simple.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_imports)] use std::ops::FnMut; diff --git a/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs b/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs index 8ada7494e0283..e9d75386d169c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensures that single-word environments work right in unboxed closures. // These take a different path in codegen. 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 054f284ea2a54..6103dbd99590a 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,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let onetime = |x| x; diff --git a/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs b/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs index 1ca25517c3c5f..56d65367d6352 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test unboxed closure sugar used in object types. #![allow(dead_code)] diff --git a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs index 94bb44d2cf50c..4ba1fd21385cf 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This code used to produce the following ICE: // @@ -9,7 +9,7 @@ // // This is a regression test for issue #17021. // -// compile-flags: -g +//@ compile-flags: -g use std::ptr; diff --git a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs index 6f41c35584e83..81fe12afccf13 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut zero = || {}; diff --git a/tests/ui/underscore-imports/auxiliary/duplicate.rs b/tests/ui/underscore-imports/auxiliary/duplicate.rs index 92d741b6a2663..61613d24b9e92 100644 --- a/tests/ui/underscore-imports/auxiliary/duplicate.rs +++ b/tests/ui/underscore-imports/auxiliary/duplicate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/underscore-imports/basic.rs b/tests/ui/underscore-imports/basic.rs index c021ad5ee0d2b..624ecb47ca681 100644 --- a/tests/ui/underscore-imports/basic.rs +++ b/tests/ui/underscore-imports/basic.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:underscore-imports.rs +//@ check-pass +//@ aux-build:underscore-imports.rs #![warn(unused_imports, unused_extern_crates)] diff --git a/tests/ui/underscore-imports/cycle.rs b/tests/ui/underscore-imports/cycle.rs index c8a293687878f..f4ca2b72aad3b 100644 --- a/tests/ui/underscore-imports/cycle.rs +++ b/tests/ui/underscore-imports/cycle.rs @@ -1,6 +1,6 @@ // Check that cyclic glob imports are allowed with underscore imports -// check-pass +//@ check-pass #![allow(noop_method_call)] diff --git a/tests/ui/underscore-imports/duplicate.rs b/tests/ui/underscore-imports/duplicate.rs index 20bc7848acd66..4afad77ee4f05 100644 --- a/tests/ui/underscore-imports/duplicate.rs +++ b/tests/ui/underscore-imports/duplicate.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:duplicate.rs +//@ check-pass +//@ aux-build:duplicate.rs extern crate duplicate; diff --git a/tests/ui/underscore-imports/hygiene-2.rs b/tests/ui/underscore-imports/hygiene-2.rs index 510d91d0d4624..d05aa0133cb28 100644 --- a/tests/ui/underscore-imports/hygiene-2.rs +++ b/tests/ui/underscore-imports/hygiene-2.rs @@ -1,7 +1,7 @@ // Make sure that underscore imports with different contexts can exist in the // same scope. -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/underscore-imports/hygiene.rs b/tests/ui/underscore-imports/hygiene.rs index 7795ccb797199..3c0654a327e69 100644 --- a/tests/ui/underscore-imports/hygiene.rs +++ b/tests/ui/underscore-imports/hygiene.rs @@ -1,6 +1,6 @@ // Make sure that underscore imports have the same hygiene considerations as other imports. -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(noop_method_call)] diff --git a/tests/ui/underscore-imports/intercrate.rs b/tests/ui/underscore-imports/intercrate.rs index 144f95bace1c0..04de2bcc79ae6 100644 --- a/tests/ui/underscore-imports/intercrate.rs +++ b/tests/ui/underscore-imports/intercrate.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:underscore-imports.rs +//@ check-pass +//@ aux-build:underscore-imports.rs extern crate underscore_imports; diff --git a/tests/ui/underscore-imports/macro-expanded.rs b/tests/ui/underscore-imports/macro-expanded.rs index 43f527bc9a408..dffff5e7710e9 100644 --- a/tests/ui/underscore-imports/macro-expanded.rs +++ b/tests/ui/underscore-imports/macro-expanded.rs @@ -1,6 +1,6 @@ // Check that macro expanded underscore imports behave as expected -// check-pass +//@ check-pass #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/underscore-imports/unused-2018.rs b/tests/ui/underscore-imports/unused-2018.rs index d06a26a5f1166..c1295e18a1266 100644 --- a/tests/ui/underscore-imports/unused-2018.rs +++ b/tests/ui/underscore-imports/unused-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_imports)] diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed index 700e4f2542384..6bc09917bee1b 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs index 66ba9b24dac2f..11c1fd90a4a98 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed index 56682db3b0b43..5222cf797f721 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs index 5302b2f1576b6..f2235843a0648 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs index 38189816da849..578b2a453b5b4 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs @@ -1,5 +1,5 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@ revisions: rust2015 rust2018 +//@[rust2018] edition:2018 trait WithType {} trait WithRegion<'a> { } diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed index f3adc7e7fad32..8d9ec9dd74756 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs index 1e084e9ad41bb..3ea02c9478a44 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed index dd8074abed728..d14ea8ffce8cf 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(dead_code)] diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs index 4fc9c71b17943..18e8591e8b504 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(dead_code)] diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs index 371d2e4ba43ac..3837ab7acd225 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs @@ -1,5 +1,5 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@ revisions: rust2015 rust2018 +//@[rust2018] edition:2018 trait WithType {} trait WithRegion<'a> { } diff --git a/tests/ui/underscore-lifetimes.rs b/tests/ui/underscore-lifetimes.rs index a1593880d84de..6174f8ce036fa 100644 --- a/tests/ui/underscore-lifetimes.rs +++ b/tests/ui/underscore-lifetimes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo<'a>(&'a u8); diff --git a/tests/ui/underscore-method-after-integer.rs b/tests/ui/underscore-method-after-integer.rs index 7fb8607f97da3..d9eb21894e8ca 100644 --- a/tests/ui/underscore-method-after-integer.rs +++ b/tests/ui/underscore-method-after-integer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr : Sized { fn _method_on_numbers(self) {} diff --git a/tests/ui/uniform-paths/auxiliary/issue-53691.rs b/tests/ui/uniform-paths/auxiliary/issue-53691.rs index a46533178609b..6eff37380efeb 100644 --- a/tests/ui/uniform-paths/auxiliary/issue-53691.rs +++ b/tests/ui/uniform-paths/auxiliary/issue-53691.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod m { pub fn f() {} } mod n { pub fn g() {} } diff --git a/tests/ui/uniform-paths/basic-nested.rs b/tests/ui/uniform-paths/basic-nested.rs index dcf0eb646f3b0..2442532b2c044 100644 --- a/tests/ui/uniform-paths/basic-nested.rs +++ b/tests/ui/uniform-paths/basic-nested.rs @@ -1,7 +1,7 @@ // This test is similar to `basic.rs`, but nested in modules. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/uniform-paths/basic.rs b/tests/ui/uniform-paths/basic.rs index ce611a7cacf38..12317be18bf08 100644 --- a/tests/ui/uniform-paths/basic.rs +++ b/tests/ui/uniform-paths/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(unused_imports)] #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/issue-53691.rs b/tests/ui/uniform-paths/issue-53691.rs index 5c5ca5b70bb62..5c87f3c25eff3 100644 --- a/tests/ui/uniform-paths/issue-53691.rs +++ b/tests/ui/uniform-paths/issue-53691.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-53691.rs +//@ run-pass +//@ aux-build:issue-53691.rs extern crate issue_53691; diff --git a/tests/ui/uniform-paths/macros-nested.rs b/tests/ui/uniform-paths/macros-nested.rs index 175ccd34e98d9..7643f06a73f20 100644 --- a/tests/ui/uniform-paths/macros-nested.rs +++ b/tests/ui/uniform-paths/macros-nested.rs @@ -1,7 +1,7 @@ // This test is similar to `macros.rs`, but nested in modules. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/macros.rs b/tests/ui/uniform-paths/macros.rs index bf512b30560eb..f5c794a53736b 100644 --- a/tests/ui/uniform-paths/macros.rs +++ b/tests/ui/uniform-paths/macros.rs @@ -1,7 +1,7 @@ // This test is similar to `basic.rs`, but with macros defining local items. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/same-crate.rs b/tests/ui/uniform-paths/same-crate.rs index ce4cc13d9ecd7..f32b3148593b6 100644 --- a/tests/ui/uniform-paths/same-crate.rs +++ b/tests/ui/uniform-paths/same-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 pub const A: usize = 0; diff --git a/tests/ui/uninhabited/diverging-guard.rs b/tests/ui/uninhabited/diverging-guard.rs index 7d57cd51c2db4..234d630e34505 100644 --- a/tests/ui/uninhabited/diverging-guard.rs +++ b/tests/ui/uninhabited/diverging-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Void {} diff --git a/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs b/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs index b59432078350e..e392d74ea0ff9 100644 --- a/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs +++ b/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exhaustive_patterns)] diff --git a/tests/ui/uninhabited/issue-107505.rs b/tests/ui/uninhabited/issue-107505.rs index 61598541ddf0d..4e895acbb705f 100644 --- a/tests/ui/uninhabited/issue-107505.rs +++ b/tests/ui/uninhabited/issue-107505.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass // Make sure we don't pass inference variables to uninhabitedness checks in borrowck diff --git a/tests/ui/uninhabited/privately-uninhabited-dead-code.rs b/tests/ui/uninhabited/privately-uninhabited-dead-code.rs index f476704cd8af0..27e4d8d20733b 100644 --- a/tests/ui/uninhabited/privately-uninhabited-dead-code.rs +++ b/tests/ui/uninhabited/privately-uninhabited-dead-code.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unused_variables)] diff --git a/tests/ui/uninhabited/projection.rs b/tests/ui/uninhabited/projection.rs index be0d3ff7da78f..395eeb675791e 100644 --- a/tests/ui/uninhabited/projection.rs +++ b/tests/ui/uninhabited/projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(never_type, exhaustive_patterns)] diff --git a/tests/ui/uninhabited/uninhabited-enum-cast.rs b/tests/ui/uninhabited/uninhabited-enum-cast.rs index 5a75c94c42f0b..5199721be0e03 100644 --- a/tests/ui/uninhabited/uninhabited-enum-cast.rs +++ b/tests/ui/uninhabited/uninhabited-enum-cast.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E {} diff --git a/tests/ui/uninhabited/uninhabited-irrefutable.rs b/tests/ui/uninhabited/uninhabited-irrefutable.rs index 2ef3b668cb089..67622a842a5c3 100644 --- a/tests/ui/uninhabited/uninhabited-irrefutable.rs +++ b/tests/ui/uninhabited/uninhabited-irrefutable.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, allow(incomplete_features))] diff --git a/tests/ui/uninit-empty-types.rs b/tests/ui/uninit-empty-types.rs index b21de882b2ceb..a6c11c4999a2d 100644 --- a/tests/ui/uninit-empty-types.rs +++ b/tests/ui/uninit-empty-types.rs @@ -1,7 +1,7 @@ -// build-pass +//@ build-pass // Test the uninit() construct returning various empty types. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem::MaybeUninit; diff --git a/tests/ui/union/issue-99375.rs b/tests/ui/union/issue-99375.rs index 175018a7d71a7..ead083b21b1e9 100644 --- a/tests/ui/union/issue-99375.rs +++ b/tests/ui/union/issue-99375.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union URes { uninit: (), diff --git a/tests/ui/union/projection-as-union-type.rs b/tests/ui/union/projection-as-union-type.rs index 143434c96f88a..79e6b8d706f36 100644 --- a/tests/ui/union/projection-as-union-type.rs +++ b/tests/ui/union/projection-as-union-type.rs @@ -1,5 +1,5 @@ // Ensures that we can use projections as union field's type. -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/union/union-align.rs b/tests/ui/union/union-align.rs index 67ab10fef4bdf..4df61e6d44845 100644 --- a/tests/ui/union/union-align.rs +++ b/tests/ui/union/union-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-backcomp.rs b/tests/ui/union/union-backcomp.rs index 21b9fc50e1d8e..a71813968e841 100644 --- a/tests/ui/union/union-backcomp.rs +++ b/tests/ui/union/union-backcomp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/union/union-basic.rs b/tests/ui/union/union-basic.rs index 1009def7d522b..027f994ab4c94 100644 --- a/tests/ui/union/union-basic.rs +++ b/tests/ui/union/union-basic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:union.rs +//@ aux-build:union.rs extern crate union; use std::mem::{size_of, align_of, zeroed}; diff --git a/tests/ui/union/union-const-codegen.rs b/tests/ui/union/union-const-codegen.rs index d5b3055959563..6d57b85cc117b 100644 --- a/tests/ui/union/union-const-codegen.rs +++ b/tests/ui/union/union-const-codegen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: u64, diff --git a/tests/ui/union/union-const-eval-field.rs b/tests/ui/union/union-const-eval-field.rs index 15a20899a78d1..0c68a98affc52 100644 --- a/tests/ui/union/union-const-eval-field.rs +++ b/tests/ui/union/union-const-eval-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass type Field1 = (i32, u32); type Field2 = f32; diff --git a/tests/ui/union/union-const-eval.rs b/tests/ui/union/union-const-eval.rs index 70a97795b758c..37def9320be63 100644 --- a/tests/ui/union/union-const-eval.rs +++ b/tests/ui/union/union-const-eval.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union U { a: usize, diff --git a/tests/ui/union/union-derive-rpass.rs b/tests/ui/union/union-derive-rpass.rs index 826b9e5a7c6e1..05a4ba1e17c1d 100644 --- a/tests/ui/union/union-derive-rpass.rs +++ b/tests/ui/union/union-derive-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/union/union-drop-assign.rs b/tests/ui/union/union-drop-assign.rs index 215666bdd9d98..e9165fddc51e4 100644 --- a/tests/ui/union/union-drop-assign.rs +++ b/tests/ui/union/union-drop-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] // Drop works for union itself. diff --git a/tests/ui/union/union-drop.rs b/tests/ui/union/union-drop.rs index 41c1e9243f7f8..e467eda293504 100644 --- a/tests/ui/union/union-drop.rs +++ b/tests/ui/union/union-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/union/union-generic-rpass.rs b/tests/ui/union/union-generic-rpass.rs index 69837f31cab27..47fcc2926bc80 100644 --- a/tests/ui/union/union-generic-rpass.rs +++ b/tests/ui/union/union-generic-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::ManuallyDrop; diff --git a/tests/ui/union/union-inherent-method.rs b/tests/ui/union/union-inherent-method.rs index 2e75cce7b108b..a3f962fb87211 100644 --- a/tests/ui/union/union-inherent-method.rs +++ b/tests/ui/union/union-inherent-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: u8, diff --git a/tests/ui/union/union-macro.rs b/tests/ui/union/union-macro.rs index 5ca013a44cd85..01cba85deb3ef 100644 --- a/tests/ui/union/union-macro.rs +++ b/tests/ui/union/union-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/union/union-manuallydrop-rpass.rs b/tests/ui/union/union-manuallydrop-rpass.rs index ba99e7441e6cb..c1be39c20e613 100644 --- a/tests/ui/union/union-manuallydrop-rpass.rs +++ b/tests/ui/union/union-manuallydrop-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::needs_drop; diff --git a/tests/ui/union/union-nodrop.rs b/tests/ui/union/union-nodrop.rs index 7ce17a7c825ff..cfba22c5e3088 100644 --- a/tests/ui/union/union-nodrop.rs +++ b/tests/ui/union/union-nodrop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-nonzero.rs b/tests/ui/union/union-nonzero.rs index e7ab4ebe32385..efa87573e9446 100644 --- a/tests/ui/union/union-nonzero.rs +++ b/tests/ui/union/union-nonzero.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-overwrite.rs b/tests/ui/union/union-overwrite.rs index 399ed9ae458b8..cd9a370ff6663 100644 --- a/tests/ui/union/union-overwrite.rs +++ b/tests/ui/union/union-overwrite.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/union/union-packed.rs b/tests/ui/union/union-packed.rs index 538c337a773c8..b1ab211eae829 100644 --- a/tests/ui/union/union-packed.rs +++ b/tests/ui/union/union-packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/union/union-pat-refutability.rs b/tests/ui/union/union-pat-refutability.rs index edcc1add38fde..826bd42cd2113 100644 --- a/tests/ui/union/union-pat-refutability.rs +++ b/tests/ui/union/union-pat-refutability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-trait-impl.rs b/tests/ui/union/union-trait-impl.rs index 8a7ac81724040..d48ae18dd0e5e 100644 --- a/tests/ui/union/union-trait-impl.rs +++ b/tests/ui/union/union-trait-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/union/union-transmute.rs b/tests/ui/union/union-transmute.rs index be8062f6276fd..72ac4a85d593b 100644 --- a/tests/ui/union/union-transmute.rs +++ b/tests/ui/union/union-transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: (u8, u8), diff --git a/tests/ui/unit.rs b/tests/ui/unit.rs index 4f2dd4194a544..98ac164b1d415 100644 --- a/tests/ui/unit.rs +++ b/tests/ui/unit.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unknown_lints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] #![allow(dead_assignment)] diff --git a/tests/ui/unknown-llvm-arg.rs b/tests/ui/unknown-llvm-arg.rs index 289bae24f810e..935c083dca657 100644 --- a/tests/ui/unknown-llvm-arg.rs +++ b/tests/ui/unknown-llvm-arg.rs @@ -1,6 +1,6 @@ -// compile-flags: -Cllvm-args=-not-a-real-llvm-arg -// normalize-stderr-test "--help" -> "-help" -// normalize-stderr-test "\n(\n|.)*" -> "" +//@ compile-flags: -Cllvm-args=-not-a-real-llvm-arg +//@ normalize-stderr-test "--help" -> "-help" +//@ normalize-stderr-test "\n(\n|.)*" -> "" // I'm seeing "--help" locally, but "-help" in CI, so I'm normalizing it to just "-help". diff --git a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs index 80e30f23993e3..c55a5f92a1409 100644 --- a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs @@ -1,4 +1,4 @@ -// check-pass -// compile-flags: -Aunknown_lints -Atest_unstable_lint +//@ check-pass +//@ compile-flags: -Aunknown_lints -Atest_unstable_lint fn main() {} diff --git a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs index 992472c894a8c..4f5178e479261 100644 --- a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unknown_lints, test_unstable_lint)] diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs index dcc06850de174..7bd4df4722074 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs @@ -1,6 +1,6 @@ -// check-fail -// compile-flags: -Dunknown_lints -Atest_unstable_lint -// error-pattern: unknown lint: `test_unstable_lint` -// error-pattern: the `test_unstable_lint` lint is unstable +//@ check-fail +//@ compile-flags: -Dunknown_lints -Atest_unstable_lint +//@ error-pattern: unknown lint: `test_unstable_lint` +//@ error-pattern: the `test_unstable_lint` lint is unstable fn main() {} diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs index 29c6547abc16a..a13c92151ac9c 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![deny(unknown_lints)] #![allow(test_unstable_lint)] diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs index 3778291ebb447..995f65ef83dae 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Wunknown_lints -Atest_unstable_lint -// error-pattern: unknown lint: `test_unstable_lint` -// error-pattern: the `test_unstable_lint` lint is unstable +//@ check-pass +//@ compile-flags: -Wunknown_lints -Atest_unstable_lint +//@ error-pattern: unknown lint: `test_unstable_lint` +//@ error-pattern: the `test_unstable_lint` lint is unstable fn main() {} diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs index 89db84e69f677..507137e69c41a 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unknown_lints)] #![allow(test_unstable_lint)] diff --git a/tests/ui/unnamed_argument_mode.rs b/tests/ui/unnamed_argument_mode.rs index 5b7b4002f477f..ba6f84c4ddea5 100644 --- a/tests/ui/unnamed_argument_mode.rs +++ b/tests/ui/unnamed_argument_mode.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn good(_a: &isize) { } diff --git a/tests/ui/unpretty/ast-const-trait-bound.rs b/tests/ui/unpretty/ast-const-trait-bound.rs index dbcba7871ec96..f4de86bb0d03a 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.rs +++ b/tests/ui/unpretty/ast-const-trait-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunpretty=normal -// check-pass +//@ compile-flags: -Zunpretty=normal +//@ check-pass fn foo() where T: ~const Bar {} diff --git a/tests/ui/unpretty/ast-const-trait-bound.stdout b/tests/ui/unpretty/ast-const-trait-bound.stdout index dbcba7871ec96..f4de86bb0d03a 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.stdout +++ b/tests/ui/unpretty/ast-const-trait-bound.stdout @@ -1,4 +1,4 @@ -// compile-flags: -Zunpretty=normal -// check-pass +//@ compile-flags: -Zunpretty=normal +//@ check-pass fn foo() where T: ~const Bar {} diff --git a/tests/ui/unpretty/avoid-crash.rs b/tests/ui/unpretty/avoid-crash.rs index fd84b70d944ca..94aa7e77dcb30 100644 --- a/tests/ui/unpretty/avoid-crash.rs +++ b/tests/ui/unpretty/avoid-crash.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "error `.*`" -> "$$ERROR_MESSAGE" -// compile-flags: -o/tmp/ -Zunpretty=ast-tree +//@ normalize-stderr-test "error `.*`" -> "$$ERROR_MESSAGE" +//@ compile-flags: -o/tmp/ -Zunpretty=ast-tree fn main() {} diff --git a/tests/ui/unpretty/bad-literal.rs b/tests/ui/unpretty/bad-literal.rs index 6dcc0da30cc2c..37377898b14f0 100644 --- a/tests/ui/unpretty/bad-literal.rs +++ b/tests/ui/unpretty/bad-literal.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-fail +//@ compile-flags: -Zunpretty=hir +//@ check-fail // In #100948 this caused an ICE with -Zunpretty=hir. fn main() { diff --git a/tests/ui/unpretty/bad-literal.stdout b/tests/ui/unpretty/bad-literal.stdout index 8df9332703316..07ecb99dccc54 100644 --- a/tests/ui/unpretty/bad-literal.stdout +++ b/tests/ui/unpretty/bad-literal.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -// check-fail +//@ compile-flags: -Zunpretty=hir +//@ check-fail // In #100948 this caused an ICE with -Zunpretty=hir. fn main() { diff --git a/tests/ui/unpretty/box.rs b/tests/ui/unpretty/box.rs index 81f5c88d7902f..8972eccf3b8fd 100644 --- a/tests/ui/unpretty/box.rs +++ b/tests/ui/unpretty/box.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass #![feature(stmt_expr_attributes, rustc_attrs)] diff --git a/tests/ui/unpretty/box.stdout b/tests/ui/unpretty/box.stdout index 0c6e012e698f9..0fd51edea241d 100644 --- a/tests/ui/unpretty/box.stdout +++ b/tests/ui/unpretty/box.stdout @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass #![feature(stmt_expr_attributes, rustc_attrs)] #[prelude_import] diff --git a/tests/ui/unpretty/flattened-format-args.rs b/tests/ui/unpretty/flattened-format-args.rs index 705dded169a19..772f44cc268ec 100644 --- a/tests/ui/unpretty/flattened-format-args.rs +++ b/tests/ui/unpretty/flattened-format-args.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -Zflatten-format-args=yes -// check-pass +//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes +//@ check-pass fn main() { let x = 1; diff --git a/tests/ui/unpretty/flattened-format-args.stdout b/tests/ui/unpretty/flattened-format-args.stdout index 7fc5d26605996..275fa104e6676 100644 --- a/tests/ui/unpretty/flattened-format-args.stdout +++ b/tests/ui/unpretty/flattened-format-args.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -Zflatten-format-args=yes -// check-pass +//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes +//@ check-pass fn main() { let x = 1; diff --git a/tests/ui/unpretty/mir-unpretty.rs b/tests/ui/unpretty/mir-unpretty.rs index 30620c69feae3..c58ef3865aa9b 100644 --- a/tests/ui/unpretty/mir-unpretty.rs +++ b/tests/ui/unpretty/mir-unpretty.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=mir +//@ compile-flags: -Z unpretty=mir fn main() { let x: () = 0; //~ ERROR: mismatched types diff --git a/tests/ui/unpretty/pretty-let-else.rs b/tests/ui/unpretty/pretty-let-else.rs index b5ae529699da2..9c231189659af 100644 --- a/tests/ui/unpretty/pretty-let-else.rs +++ b/tests/ui/unpretty/pretty-let-else.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass diff --git a/tests/ui/unpretty/pretty-let-else.stdout b/tests/ui/unpretty/pretty-let-else.stdout index 35ad1cd1b1812..ed55f293876ec 100644 --- a/tests/ui/unpretty/pretty-let-else.stdout +++ b/tests/ui/unpretty/pretty-let-else.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.rs b/tests/ui/unpretty/unpretty-expr-fn-arg.rs index 6e1132a337286..7f496e773c28e 100644 --- a/tests/ui/unpretty/unpretty-expr-fn-arg.rs +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.rs @@ -4,8 +4,8 @@ // for expressions occurring in function signatures, as in the `foo` example // below, leading to an ICE. -// check-pass -// compile-flags: -Zunpretty=hir,typed +//@ check-pass +//@ compile-flags: -Zunpretty=hir,typed #![allow(dead_code)] fn main() {} diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout index b745b98863169..c424b1afa3465 100644 --- a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout @@ -4,8 +4,8 @@ // for expressions occurring in function signatures, as in the `foo` example // below, leading to an ICE. -// check-pass -// compile-flags: -Zunpretty=hir,typed +//@ check-pass +//@ compile-flags: -Zunpretty=hir,typed #![allow(dead_code)] #[prelude_import] use ::std::prelude::rust_2015::*; diff --git a/tests/ui/unreachable-code-1.rs b/tests/ui/unreachable-code-1.rs index ee44f3999455e..9c5f7c8f45190 100644 --- a/tests/ui/unreachable-code-1.rs +++ b/tests/ui/unreachable-code-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unreachable_code)] diff --git a/tests/ui/unreachable-code.rs b/tests/ui/unreachable-code.rs index 64174db7afbd4..0c46a38d73f35 100644 --- a/tests/ui/unreachable-code.rs +++ b/tests/ui/unreachable-code.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs index af8207aaadded..8affd6957be2d 100644 --- a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs +++ b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs @@ -4,8 +4,8 @@ // [^1]: Counterexample: `unresolved-import-suggest-disambiguated-crate-name.rs` #![feature(decl_macro)] // allows us to create items with hygienic names -// aux-crate:library=library.rs -// edition: 2021 +//@ aux-crate:library=library.rs +//@ edition: 2021 mod hygiene { make!(); diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed index 2b20d3f106b9d..38c5db7e7670a 100644 --- a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed +++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed @@ -7,11 +7,11 @@ // For context, when it can be avoided we don't prepend `::` to paths referencing crates // from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`. -// run-rustfix +//@ run-rustfix -// compile-flags: --crate-type=lib -// aux-crate:library=library.rs -// edition: 2021 +//@ compile-flags: --crate-type=lib +//@ aux-crate:library=library.rs +//@ edition: 2021 mod library {} // this module shares the same name as the external crate! diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs index b810a7f52966a..c0083a51b34af 100644 --- a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs +++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs @@ -7,11 +7,11 @@ // For context, when it can be avoided we don't prepend `::` to paths referencing crates // from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`. -// run-rustfix +//@ run-rustfix -// compile-flags: --crate-type=lib -// aux-crate:library=library.rs -// edition: 2021 +//@ compile-flags: --crate-type=lib +//@ aux-crate:library=library.rs +//@ edition: 2021 mod library {} // this module shares the same name as the external crate! diff --git a/tests/ui/unsafe/const_pat_in_layout_restricted.rs b/tests/ui/unsafe/const_pat_in_layout_restricted.rs index 9a085958c1080..2ba173ee49962 100644 --- a/tests/ui/unsafe/const_pat_in_layout_restricted.rs +++ b/tests/ui/unsafe/const_pat_in_layout_restricted.rs @@ -1,6 +1,6 @@ // Check that ref mut patterns within a const pattern don't get considered // unsafe because they're within a pattern for a layout constrained stuct. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![feature(inline_const_pat)] diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs index f84f12c8301d7..f12c38939dd1e 100644 --- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs +++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass #![crate_type = "lib"] #![deny(unused_unsafe)] diff --git a/tests/ui/unsafe/inline_asm.rs b/tests/ui/unsafe/inline_asm.rs index df45b8640c1a4..039160f5e17d8 100644 --- a/tests/ui/unsafe/inline_asm.rs +++ b/tests/ui/unsafe/inline_asm.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/unsafe/issue-106126-good-path-bug.rs b/tests/ui/unsafe/issue-106126-good-path-bug.rs index 93f478ee35802..c1a3e074efebe 100644 --- a/tests/ui/unsafe/issue-106126-good-path-bug.rs +++ b/tests/ui/unsafe/issue-106126-good-path-bug.rs @@ -1,6 +1,6 @@ // Regression test for #106126. -// check-pass -// aux-build:issue-106126.rs +//@ check-pass +//@ aux-build:issue-106126.rs #![deny(unsafe_op_in_unsafe_fn)] diff --git a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs index b0d738855d731..85edf04424131 100644 --- a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs +++ b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is issue #85435. But the real story is reflected in issue #85561, where // a bug in the implementation of feature(capture_disjoint_fields) () was diff --git a/tests/ui/unsafe/issue-87414-query-cycle.rs b/tests/ui/unsafe/issue-87414-query-cycle.rs index a004d73942224..067beacf302db 100644 --- a/tests/ui/unsafe/issue-87414-query-cycle.rs +++ b/tests/ui/unsafe/issue-87414-query-cycle.rs @@ -1,6 +1,6 @@ // Regression test for #87414. -// check-pass +//@ check-pass fn bad() -> Box> { todo!() } diff --git a/tests/ui/unsafe/new-unsafe-pointers.rs b/tests/ui/unsafe/new-unsafe-pointers.rs index d99eb4cbd1c80..39566cda90ac3 100644 --- a/tests/ui/unsafe/new-unsafe-pointers.rs +++ b/tests/ui/unsafe/new-unsafe-pointers.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let _a: *const isize = 3 as *const isize; diff --git a/tests/ui/unsafe/ranged_ints_macro.rs b/tests/ui/unsafe/ranged_ints_macro.rs index 0acc3e0f6b1a8..44a12bbd0a6bd 100644 --- a/tests/ui/unsafe/ranged_ints_macro.rs +++ b/tests/ui/unsafe/ranged_ints_macro.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(rustc_attrs)] diff --git a/tests/ui/unsafe/union-modification.rs b/tests/ui/unsafe/union-modification.rs index fbcb846be9d7e..0f123395680b5 100644 --- a/tests/ui/unsafe/union-modification.rs +++ b/tests/ui/unsafe/union-modification.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union Foo { bar: i8, _blah: isize, diff --git a/tests/ui/unsafe/union_access_through_block.rs b/tests/ui/unsafe/union_access_through_block.rs index 8b28c33650e5d..d440e10a20f44 100644 --- a/tests/ui/unsafe/union_access_through_block.rs +++ b/tests/ui/unsafe/union_access_through_block.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Copy, Clone)] pub struct Foo { a: bool } diff --git a/tests/ui/unsafe/union_destructure.rs b/tests/ui/unsafe/union_destructure.rs index bb75dbf0997ce..e7095926eb164 100644 --- a/tests/ui/unsafe/union_destructure.rs +++ b/tests/ui/unsafe/union_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #[derive(Copy, Clone)] diff --git a/tests/ui/unsafe/union_wild_or_wild.rs b/tests/ui/unsafe/union_wild_or_wild.rs index 935de97f2554d..3f6211ce792fc 100644 --- a/tests/ui/unsafe/union_wild_or_wild.rs +++ b/tests/ui/unsafe/union_wild_or_wild.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union X { a: i8 } fn main() { diff --git a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs index e060c58e408fd..b371a79d1f326 100644 --- a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs +++ b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_unsafe)] 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 3713a7065f5e5..d9f244bc4d207 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // // See also: ui/unsafe/unsafe-fn-called-from-safe.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe fn f() { return; } 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 5e953107686f2..bb7715b7b5cea 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // // See also: ui/unsafe/unsafe-fn-called-from-safe.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe fn f() { return; } diff --git a/tests/ui/unsafe/unsafe-pointer-assignability.rs b/tests/ui/unsafe/unsafe-pointer-assignability.rs index db822bb6a0283..a715c845e903d 100644 --- a/tests/ui/unsafe/unsafe-pointer-assignability.rs +++ b/tests/ui/unsafe/unsafe-pointer-assignability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: *const isize) { unsafe { diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs index 4196b1cae249d..06a46b9812d38 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass // Tests that `unsafe_op_in_unsafe_fn` is warn-by-default in edition 2024 and that the // `unused_unsafe` lint does not consider the inner unsafe block to be unused. diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed index 8f5cc014a3bab..c7291866588b8 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:external_unsafe_macro.rs +//@ run-rustfix +//@ aux-build:external_unsafe_macro.rs #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE #![crate_name = "wrapping_unsafe_block_sugg"] diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs index 90c9e28239693..401fc0bfd3136 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:external_unsafe_macro.rs +//@ run-rustfix +//@ aux-build:external_unsafe_macro.rs #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE #![crate_name = "wrapping_unsafe_block_sugg"] diff --git a/tests/ui/unsized-locals/align.rs b/tests/ui/unsized-locals/align.rs index 01be8f3bb9c90..a3820e3e6dcf3 100644 --- a/tests/ui/unsized-locals/align.rs +++ b/tests/ui/unsized-locals/align.rs @@ -1,6 +1,6 @@ // Test that unsized locals uphold alignment requirements. // Regression test for #71416. -// run-pass +//@ run-pass #![feature(unsized_locals)] #![allow(incomplete_features)] use std::any::Any; diff --git a/tests/ui/unsized-locals/autoderef.rs b/tests/ui/unsized-locals/autoderef.rs index 5dd5898c12e5c..31b58ba4002b4 100644 --- a/tests/ui/unsized-locals/autoderef.rs +++ b/tests/ui/unsized-locals/autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/box-fnonce.rs b/tests/ui/unsized-locals/box-fnonce.rs index 8b2f9b4c9fcd4..7451fd0ce69c7 100644 --- a/tests/ui/unsized-locals/box-fnonce.rs +++ b/tests/ui/unsized-locals/box-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_it(f: Box T>) -> T { f() diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs b/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs index b9881defac39a..7ccea43d182e9 100644 --- a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs +++ b/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs b/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs index 957991f853b2d..1f9b5f11fb507 100644 --- a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs +++ b/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/reference-unsized-locals.rs b/tests/ui/unsized-locals/reference-unsized-locals.rs index 4e887f32753f1..5b5fca22a0124 100644 --- a/tests/ui/unsized-locals/reference-unsized-locals.rs +++ b/tests/ui/unsized-locals/reference-unsized-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/simple-unsized-locals.rs b/tests/ui/unsized-locals/simple-unsized-locals.rs index 02b7c299aa40a..374031b80bd28 100644 --- a/tests/ui/unsized-locals/simple-unsized-locals.rs +++ b/tests/ui/unsized-locals/simple-unsized-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/unsized-exprs-rpass.rs b/tests/ui/unsized-locals/unsized-exprs-rpass.rs index 83d3680f72ff0..a5aada20d3ebe 100644 --- a/tests/ui/unsized-locals/unsized-exprs-rpass.rs +++ b/tests/ui/unsized-locals/unsized-exprs-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features, unused_braces, unused_parens)] #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/unsized-exprs3.rs b/tests/ui/unsized-locals/unsized-exprs3.rs index 2133b01e09480..1314e33d42a62 100644 --- a/tests/ui/unsized-locals/unsized-exprs3.rs +++ b/tests/ui/unsized-locals/unsized-exprs3.rs @@ -1,4 +1,4 @@ -// aux-build:ufuncs.rs +//@ aux-build:ufuncs.rs extern crate ufuncs; diff --git a/tests/ui/unsized-locals/unsized-index.rs b/tests/ui/unsized-locals/unsized-index.rs index e8782e8948153..bd79ca14f435d 100644 --- a/tests/ui/unsized-locals/unsized-index.rs +++ b/tests/ui/unsized-locals/unsized-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_fn_params)] diff --git a/tests/ui/unsized-locals/unsized-parameters.rs b/tests/ui/unsized-locals/unsized-parameters.rs index a1b772a7eb689..df12dac48ef5d 100644 --- a/tests/ui/unsized-locals/unsized-parameters.rs +++ b/tests/ui/unsized-locals/unsized-parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_fn_params)] diff --git a/tests/ui/unsized/issue-115203.rs b/tests/ui/unsized/issue-115203.rs index 5fe7bd64288da..7227a5d967325 100644 --- a/tests/ui/unsized/issue-115203.rs +++ b/tests/ui/unsized/issue-115203.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit link +//@ compile-flags: --emit link fn main() { let a: [i32; 0] = []; diff --git a/tests/ui/unsized/issue-115809.rs b/tests/ui/unsized/issue-115809.rs index ff25365ea50c0..1b1d5234c1298 100644 --- a/tests/ui/unsized/issue-115809.rs +++ b/tests/ui/unsized/issue-115809.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit=link -Zmir-opt-level=2 -Zpolymorphize=on +//@ compile-flags: --emit=link -Zmir-opt-level=2 -Zpolymorphize=on fn foo() { let a: [i32; 0] = []; diff --git a/tests/ui/unsized/issue-40231-1.rs b/tests/ui/unsized/issue-40231-1.rs index 999399ec8d34c..4d0b02d131166 100644 --- a/tests/ui/unsized/issue-40231-1.rs +++ b/tests/ui/unsized/issue-40231-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/unsized/issue-40231-2.rs b/tests/ui/unsized/issue-40231-2.rs index 780433b28c596..d4bb6035dd469 100644 --- a/tests/ui/unsized/issue-40231-2.rs +++ b/tests/ui/unsized/issue-40231-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/unsized/issue-71659.rs b/tests/ui/unsized/issue-71659.rs index 65a867caf8f70..fd0b799d88933 100644 --- a/tests/ui/unsized/issue-71659.rs +++ b/tests/ui/unsized/issue-71659.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(unsize)] diff --git a/tests/ui/unsized/issue-75899-but-gats.rs b/tests/ui/unsized/issue-75899-but-gats.rs index 5716817f43ded..733a150a941d6 100644 --- a/tests/ui/unsized/issue-75899-but-gats.rs +++ b/tests/ui/unsized/issue-75899-but-gats.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/unsized/issue-75899.rs b/tests/ui/unsized/issue-75899.rs index 56c8a72bfcc01..9cfcf0aa13ebf 100644 --- a/tests/ui/unsized/issue-75899.rs +++ b/tests/ui/unsized/issue-75899.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass trait Trait {} impl Trait for T {} diff --git a/tests/ui/unsized/issue-97732.rs b/tests/ui/unsized/issue-97732.rs index 72f765033969a..625ec71a82357 100644 --- a/tests/ui/unsized/issue-97732.rs +++ b/tests/ui/unsized/issue-97732.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coerce_unsized)] diff --git a/tests/ui/unsized/maybe-bounds-where-cpass.rs b/tests/ui/unsized/maybe-bounds-where-cpass.rs index 0e018cdabb23f..6470f1c10f144 100644 --- a/tests/ui/unsized/maybe-bounds-where-cpass.rs +++ b/tests/ui/unsized/maybe-bounds-where-cpass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(*const T) where T: ?Sized; diff --git a/tests/ui/unsized/unchanged-param.rs b/tests/ui/unsized/unchanged-param.rs index 8aa2ed1534450..6abd428db2a32 100644 --- a/tests/ui/unsized/unchanged-param.rs +++ b/tests/ui/unsized/unchanged-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we allow unsizing even if there is an unchanged param in the // field getting unsized. struct A(#[allow(dead_code)] T, B); diff --git a/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs index eba341ff2847f..9028208812dcd 100644 --- a/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs +++ b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo where diff --git a/tests/ui/unsized/unsized-fn-arg.fixed b/tests/ui/unsized/unsized-fn-arg.fixed index fd9b159a48138..41a59c08b909a 100644 --- a/tests/ui/unsized/unsized-fn-arg.fixed +++ b/tests/ui/unsized/unsized-fn-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![crate_type="lib"] #![allow(unused)] diff --git a/tests/ui/unsized/unsized-fn-arg.rs b/tests/ui/unsized/unsized-fn-arg.rs index 9fc08bd6d3e75..b5ec4bda673ab 100644 --- a/tests/ui/unsized/unsized-fn-arg.rs +++ b/tests/ui/unsized/unsized-fn-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![crate_type="lib"] #![allow(unused)] diff --git a/tests/ui/unsized/unsized-tuple-impls.rs b/tests/ui/unsized/unsized-tuple-impls.rs index 5e385f33bee7d..a76e2df575077 100644 --- a/tests/ui/unsized/unsized-tuple-impls.rs +++ b/tests/ui/unsized/unsized-tuple-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/unsized/unsized.rs b/tests/ui/unsized/unsized.rs index 54304834d4b2b..7ae6d611c2970 100644 --- a/tests/ui/unsized/unsized.rs +++ b/tests/ui/unsized/unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![allow(dead_code)] diff --git a/tests/ui/unsized/unsized2.rs b/tests/ui/unsized/unsized2.rs index bbeb00d5fed60..e2692a7a2c0ac 100644 --- a/tests/ui/unsized/unsized2.rs +++ b/tests/ui/unsized/unsized2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unconditional_recursion)] #![allow(dead_code)] diff --git a/tests/ui/unsized/unsized3-rpass.rs b/tests/ui/unsized/unsized3-rpass.rs index a3f92be6cf61f..1b3e932bfe6d8 100644 --- a/tests/ui/unsized/unsized3-rpass.rs +++ b/tests/ui/unsized/unsized3-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test structs with always-unsized fields. #![allow(warnings)] diff --git a/tests/ui/unused-crate-deps/auxiliary/foo.rs b/tests/ui/unused-crate-deps/auxiliary/foo.rs index 0ef03eb9edf0f..6093b221c57c6 100644 --- a/tests/ui/unused-crate-deps/auxiliary/foo.rs +++ b/tests/ui/unused-crate-deps/auxiliary/foo.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ aux-crate:bar=bar.rs pub const FOO: &str = "foo"; pub use bar::BAR; diff --git a/tests/ui/unused-crate-deps/deny-attr.rs b/tests/ui/unused-crate-deps/deny-attr.rs index e9ab18ff63f39..3b2e8b5677e28 100644 --- a/tests/ui/unused-crate-deps/deny-attr.rs +++ b/tests/ui/unused-crate-deps/deny-attr.rs @@ -1,7 +1,7 @@ // Check for unused crate dep, no path -// edition:2018 -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ aux-crate:bar=bar.rs #![deny(unused_crate_dependencies)] //~^ ERROR external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs index fd9a61d6caa25..f0f6d5b704d55 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, json event, deny but we're not reporting that in exit status -// edition:2018 -// check-pass -// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json.rs b/tests/ui/unused-crate-deps/deny-cmdline-json.rs index 2b369dee5a0db..aab53eb37753b 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline-json.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline-json.rs @@ -1,7 +1,7 @@ // Check for unused crate dep, json event, deny, expect compile failure -// edition:2018 -// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/deny-cmdline.rs b/tests/ui/unused-crate-deps/deny-cmdline.rs index 69e28b3319a22..d32e8e205af3e 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, deny, expect failure -// edition:2018 -// compile-flags: -Dunused-crate-dependencies -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ compile-flags: -Dunused-crate-dependencies +//@ aux-crate:bar=bar.rs fn main() {} //~^ ERROR external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/ignore-pathless-extern.rs b/tests/ui/unused-crate-deps/ignore-pathless-extern.rs index 8c273cb534d74..9c720de363490 100644 --- a/tests/ui/unused-crate-deps/ignore-pathless-extern.rs +++ b/tests/ui/unused-crate-deps/ignore-pathless-extern.rs @@ -1,9 +1,9 @@ // Pathless --extern references don't count -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--extern proc_macro +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--extern proc_macro #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/libfib.rs b/tests/ui/unused-crate-deps/libfib.rs index c1545dca99f57..8a5ec758e5609 100644 --- a/tests/ui/unused-crate-deps/libfib.rs +++ b/tests/ui/unused-crate-deps/libfib.rs @@ -1,8 +1,8 @@ // Test warnings for a library crate -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--crate-type lib -Wunused-crate-dependencies +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--crate-type lib -Wunused-crate-dependencies pub fn fib(n: u32) -> Vec { //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/lint-group.rs b/tests/ui/unused-crate-deps/lint-group.rs index e21ffb5dec2de..9d28af42cc920 100644 --- a/tests/ui/unused-crate-deps/lint-group.rs +++ b/tests/ui/unused-crate-deps/lint-group.rs @@ -1,8 +1,8 @@ // `unused_crate_dependencies` is not currently in the `unused` group // due to false positives from Cargo. -// check-pass -// aux-crate:bar=bar.rs +//@ check-pass +//@ aux-crate:bar=bar.rs #![deny(unused)] diff --git a/tests/ui/unused-crate-deps/suppress.rs b/tests/ui/unused-crate-deps/suppress.rs index 8904d04bc14f7..cd7dea4f23bc2 100644 --- a/tests/ui/unused-crate-deps/suppress.rs +++ b/tests/ui/unused-crate-deps/suppress.rs @@ -1,8 +1,8 @@ // Suppress by using crate -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/test-use-ok.rs b/tests/ui/unused-crate-deps/test-use-ok.rs index 66d6440c9cb9f..ef95d0707933f 100644 --- a/tests/ui/unused-crate-deps/test-use-ok.rs +++ b/tests/ui/unused-crate-deps/test-use-ok.rs @@ -1,9 +1,9 @@ // Test-only use OK -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--test +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--test #![deny(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/unused-aliases.rs b/tests/ui/unused-crate-deps/unused-aliases.rs index 1b7cb9b970e49..f86f6bbf35646 100644 --- a/tests/ui/unused-crate-deps/unused-aliases.rs +++ b/tests/ui/unused-crate-deps/unused-aliases.rs @@ -1,9 +1,9 @@ // Warn about unused aliased for the crate -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// aux-crate:barbar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ aux-crate:barbar=bar.rs #![warn(unused_crate_dependencies)] //~^ WARNING external crate `barbar` unused in diff --git a/tests/ui/unused-crate-deps/use_extern_crate_2015.rs b/tests/ui/unused-crate-deps/use_extern_crate_2015.rs index f15c87fa0b249..abc679cf32003 100644 --- a/tests/ui/unused-crate-deps/use_extern_crate_2015.rs +++ b/tests/ui/unused-crate-deps/use_extern_crate_2015.rs @@ -1,8 +1,8 @@ // Suppress by using crate -// edition:2015 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2015 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/warn-attr.rs b/tests/ui/unused-crate-deps/warn-attr.rs index 1acb307ab21b3..b558c0678d6ba 100644 --- a/tests/ui/unused-crate-deps/warn-attr.rs +++ b/tests/ui/unused-crate-deps/warn-attr.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/warn-cmdline-json.rs b/tests/ui/unused-crate-deps/warn-cmdline-json.rs index 4826c0062d0e5..b23a9c8d5fb49 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline-json.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline-json.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, warn, json event, expect pass -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/warn-cmdline-static.rs b/tests/ui/unused-crate-deps/warn-cmdline-static.rs index c609529a6c6fb..ccb404e3033b2 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline-static.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline-static.rs @@ -1,10 +1,10 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -// aux-crate:bar=bar.rs -// no-prefer-dynamic +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies +//@ aux-crate:bar=bar.rs +//@ no-prefer-dynamic fn main() {} //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/warn-cmdline.rs b/tests/ui/unused-crate-deps/warn-cmdline.rs index 3bae61c3ea2cc..8d390e02ca591 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline.rs @@ -1,9 +1,9 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies +//@ aux-crate:bar=bar.rs fn main() {} //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-move-capture.rs b/tests/ui/unused-move-capture.rs index efaf10da4a99f..c295f8d791439 100644 --- a/tests/ui/unused-move-capture.rs +++ b/tests/ui/unused-move-capture.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: Box<_> = Box::new(1); diff --git a/tests/ui/unused-move.rs b/tests/ui/unused-move.rs index 697434d47ebb2..87398652e93c3 100644 --- a/tests/ui/unused-move.rs +++ b/tests/ui/unused-move.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Issue #3878 // Issue Name: Unused move causes a crash // Abstract: zero-fill to block after drop -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(path_statements)] diff --git a/tests/ui/unwind-abis/feature-gate-c_unwind.rs b/tests/ui/unwind-abis/feature-gate-c_unwind.rs index d73fe3e0bdada..28ef7d57788ee 100644 --- a/tests/ui/unwind-abis/feature-gate-c_unwind.rs +++ b/tests/ui/unwind-abis/feature-gate-c_unwind.rs @@ -1,4 +1,4 @@ -// ignore-test +//@ ignore-test // After partial stabilisation, `c_unwind` only contains codegen behaviour changes // and are tested in `src/test/codegen/unwind-abis` diff --git a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs index 8f000737656a2..e05c5ded10d09 100644 --- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs +++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs @@ -1,5 +1,5 @@ -// build-pass -// needs-unwind +//@ build-pass +//@ needs-unwind #![warn(ffi_unwind_calls)] diff --git a/tests/ui/unwind-no-uwtable.rs b/tests/ui/unwind-no-uwtable.rs index 3bc309233a7ac..fb8082e31880a 100644 --- a/tests/ui/unwind-no-uwtable.rs +++ b/tests/ui/unwind-no-uwtable.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// ignore-windows target requires uwtable -// compile-flags: -C panic=unwind -C force-unwind-tables=n +//@ run-pass +//@ needs-unwind +//@ ignore-windows target requires uwtable +//@ compile-flags: -C panic=unwind -C force-unwind-tables=n use std::panic::{self, AssertUnwindSafe}; diff --git a/tests/ui/use-import-export.rs b/tests/ui/use-import-export.rs index 07a6866ba6626..f784194c50590 100644 --- a/tests/ui/use-import-export.rs +++ b/tests/ui/use-import-export.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod foo { pub fn x() -> isize { return 1; } diff --git a/tests/ui/use-keyword-2.rs b/tests/ui/use-keyword-2.rs index ebddb5d1a4830..4f3d1ee500d80 100644 --- a/tests/ui/use-keyword-2.rs +++ b/tests/ui/use-keyword-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub struct A; diff --git a/tests/ui/use-module-level-int-consts.rs b/tests/ui/use-module-level-int-consts.rs index 200f742d771f5..6e8c7053c5760 100644 --- a/tests/ui/use-module-level-int-consts.rs +++ b/tests/ui/use-module-level-int-consts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure the module level constants are still there and accessible even after // the corresponding associated constants have been added, and later stabilized. diff --git a/tests/ui/use-nested-groups.rs b/tests/ui/use-nested-groups.rs index 5c739709e9ea7..c5d66a8693533 100644 --- a/tests/ui/use-nested-groups.rs +++ b/tests/ui/use-nested-groups.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub enum B {} diff --git a/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs b/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs index 3c7756ef7e679..18aa329ae36b8 100644 --- a/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs +++ b/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs @@ -1,3 +1,3 @@ -// compile-flags: --edition=2018 +//@ compile-flags: --edition=2018 pub use u32; diff --git a/tests/ui/use/issue-18986.rs b/tests/ui/use/issue-18986.rs index f0b292f2911c0..62fd4769a0389 100644 --- a/tests/ui/use/issue-18986.rs +++ b/tests/ui/use/issue-18986.rs @@ -1,4 +1,4 @@ -// aux-build:use-from-trait-xc.rs +//@ aux-build:use-from-trait-xc.rs extern crate use_from_trait_xc; pub use use_from_trait_xc::Trait; diff --git a/tests/ui/use/issue-60976-extern-use-primitive-type.rs b/tests/ui/use/issue-60976-extern-use-primitive-type.rs index 4cd458302a498..3e059818ac27f 100644 --- a/tests/ui/use/issue-60976-extern-use-primitive-type.rs +++ b/tests/ui/use/issue-60976-extern-use-primitive-type.rs @@ -1,6 +1,6 @@ // Regression test for #60976: ICE (with <=1.36.0) when another file had `use ;`. -// check-pass -// aux-build:extern-use-primitive-type-lib.rs +//@ check-pass +//@ aux-build:extern-use-primitive-type-lib.rs extern crate extern_use_primitive_type_lib; diff --git a/tests/ui/use/use-from-trait-xc.rs b/tests/ui/use/use-from-trait-xc.rs index 695ed66a1c183..b7b9c834b327d 100644 --- a/tests/ui/use/use-from-trait-xc.rs +++ b/tests/ui/use/use-from-trait-xc.rs @@ -1,4 +1,4 @@ -// aux-build:use-from-trait-xc.rs +//@ aux-build:use-from-trait-xc.rs extern crate use_from_trait_xc; diff --git a/tests/ui/use/use-meta-mismatch.rs b/tests/ui/use/use-meta-mismatch.rs index 975209efb0c1b..2c5ae9cd9a1c5 100644 --- a/tests/ui/use/use-meta-mismatch.rs +++ b/tests/ui/use/use-meta-mismatch.rs @@ -1,4 +1,4 @@ -// error-pattern:can't find crate for `fake_crate` +//@ error-pattern:can't find crate for `fake_crate` extern crate fake_crate as extra; diff --git a/tests/ui/use/use.rs b/tests/ui/use/use.rs index 1beee4a514379..826a049f2bbb5 100644 --- a/tests/ui/use/use.rs +++ b/tests/ui/use/use.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] #![feature(start, no_core, core)] diff --git a/tests/ui/using-target-feature-unstable.rs b/tests/ui/using-target-feature-unstable.rs index c5da45c0854ba..5ec0bda5eef64 100644 --- a/tests/ui/using-target-feature-unstable.rs +++ b/tests/ui/using-target-feature-unstable.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86_64 -// aux-build:using-target-feature-unstable.rs +//@ run-pass +//@ only-x86_64 +//@ aux-build:using-target-feature-unstable.rs extern crate using_target_feature_unstable; diff --git a/tests/ui/utf8-bom.rs b/tests/ui/utf8-bom.rs index a3cb0e9a52a85..e2e4ccd63c164 100644 --- a/tests/ui/utf8-bom.rs +++ b/tests/ui/utf8-bom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // This file has utf-8 BOM, it should be compiled normally without error. diff --git a/tests/ui/utf8_idents.rs b/tests/ui/utf8_idents.rs index 1f6326dd94b5c..0c34529d2de43 100644 --- a/tests/ui/utf8_idents.rs +++ b/tests/ui/utf8_idents.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // #![allow(mixed_script_confusables, non_camel_case_types)] diff --git a/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs index 74707a98d325f..09b530fdc9887 100644 --- a/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs +++ b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Elaborated version of the opening example from RFC 738. This failed // to compile before variance because invariance of `Option` prevented // us from approximating the lifetimes of `field1` and `field2` to a diff --git a/tests/ui/variance/variance-iterators-in-libcore.rs b/tests/ui/variance/variance-iterators-in-libcore.rs index a542e44d517a7..c42c53a96fc7b 100644 --- a/tests/ui/variance/variance-iterators-in-libcore.rs +++ b/tests/ui/variance/variance-iterators-in-libcore.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/variance/variance-use-contravariant-struct-2.rs b/tests/ui/variance/variance-use-contravariant-struct-2.rs index d4b2d08342a9b..ef6264d334811 100644 --- a/tests/ui/variance/variance-use-contravariant-struct-2.rs +++ b/tests/ui/variance/variance-use-contravariant-struct-2.rs @@ -2,7 +2,7 @@ // they permit lifetimes to be approximated as expected. #![allow(dead_code)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(fn(T)); diff --git a/tests/ui/variance/variance-use-covariant-struct-2.rs b/tests/ui/variance/variance-use-covariant-struct-2.rs index ecd2204c991c6..14f5d541c690a 100644 --- a/tests/ui/variance/variance-use-covariant-struct-2.rs +++ b/tests/ui/variance/variance-use-covariant-struct-2.rs @@ -2,7 +2,7 @@ // be shortened. #![allow(dead_code)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(T); diff --git a/tests/ui/variants/variant-namespacing.rs b/tests/ui/variants/variant-namespacing.rs index 975e471fe34fa..c89804e81adf5 100644 --- a/tests/ui/variants/variant-namespacing.rs +++ b/tests/ui/variants/variant-namespacing.rs @@ -1,4 +1,4 @@ -// aux-build:variant-namespacing.rs +//@ aux-build:variant-namespacing.rs pub enum E { Struct { a: u8 }, diff --git a/tests/ui/wait-forked-but-failed-child.rs b/tests/ui/wait-forked-but-failed-child.rs index 82a1dd63713c1..a5a6cca0637b7 100644 --- a/tests/ui/wait-forked-but-failed-child.rs +++ b/tests/ui/wait-forked-but-failed-child.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'ps' -// ignore-fuchsia no 'ps' -// ignore-nto no 'ps' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'ps' +//@ ignore-fuchsia no 'ps' +//@ ignore-nto no 'ps' #![feature(rustc_private)] diff --git a/tests/ui/wasm/simd-to-array-80108.rs b/tests/ui/wasm/simd-to-array-80108.rs index 0576c2e6be164..c7f8585eaa4e0 100644 --- a/tests/ui/wasm/simd-to-array-80108.rs +++ b/tests/ui/wasm/simd-to-array-80108.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags: --crate-type=lib -Copt-level=2 -// build-pass +//@ only-wasm32 +//@ compile-flags: --crate-type=lib -Copt-level=2 +//@ build-pass #![feature(repr_simd)] // Regression test for #80108 diff --git a/tests/ui/wasm/wasm-custom-section-relocations.rs b/tests/ui/wasm/wasm-custom-section-relocations.rs index c3cca3a35ac69..30358c7a8d98f 100644 --- a/tests/ui/wasm/wasm-custom-section-relocations.rs +++ b/tests/ui/wasm/wasm-custom-section-relocations.rs @@ -1,4 +1,4 @@ -// only-wasm32 +//@ only-wasm32 #[link_section = "test"] pub static A: &[u8] = &[1]; //~ ERROR: no extra levels of indirection diff --git a/tests/ui/wasm/wasm-hang-issue-76281.rs b/tests/ui/wasm/wasm-hang-issue-76281.rs index a4adfa6d04461..0e215bdf197f3 100644 --- a/tests/ui/wasm/wasm-hang-issue-76281.rs +++ b/tests/ui/wasm/wasm-hang-issue-76281.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags: -C opt-level=2 -// build-pass +//@ only-wasm32 +//@ compile-flags: -C opt-level=2 +//@ build-pass // Regression test for #76281. // This seems like an issue related to LLVM rather than diff --git a/tests/ui/weak-new-uninhabited-issue-48493.rs b/tests/ui/weak-new-uninhabited-issue-48493.rs index 39fbf3c9eb4e2..ce7d5786b41bb 100644 --- a/tests/ui/weak-new-uninhabited-issue-48493.rs +++ b/tests/ui/weak-new-uninhabited-issue-48493.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { enum Void {} diff --git a/tests/ui/weird-exit-code.rs b/tests/ui/weird-exit-code.rs index a067b7b5b1f2e..e016343f8ba2f 100644 --- a/tests/ui/weird-exit-code.rs +++ b/tests/ui/weird-exit-code.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // On Windows the GetExitCodeProcess API is used to get the exit code of a // process, but it's easy to mistake a process exiting with the code 259 as // "still running" because this is the value of the STILL_ACTIVE constant. Make diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs index 748fe13c1e47a..d856b06e260b8 100644 --- a/tests/ui/weird-exprs.rs +++ b/tests/ui/weird-exprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/wf/hir-wf-canonicalized.rs b/tests/ui/wf/hir-wf-canonicalized.rs index eac238f0fcab1..abdcd1c04ab2a 100644 --- a/tests/ui/wf/hir-wf-canonicalized.rs +++ b/tests/ui/wf/hir-wf-canonicalized.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental trait Foo { type V; diff --git a/tests/ui/wf/hir-wf-check-erase-regions.rs b/tests/ui/wf/hir-wf-check-erase-regions.rs index 2820d5f6d0744..01893044c278d 100644 --- a/tests/ui/wf/hir-wf-check-erase-regions.rs +++ b/tests/ui/wf/hir-wf-check-erase-regions.rs @@ -1,5 +1,5 @@ // Regression test for #87549. -// incremental +//@ incremental pub struct Table([Option; N]); diff --git a/tests/ui/wf/issue-48638.rs b/tests/ui/wf/issue-48638.rs index f078431033216..6a778a4bf214e 100644 --- a/tests/ui/wf/issue-48638.rs +++ b/tests/ui/wf/issue-48638.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait D {} pub struct DT; diff --git a/tests/ui/wf/unnormalized-projection-guides-inference.rs b/tests/ui/wf/unnormalized-projection-guides-inference.rs index ca2d6c2e882d0..e1fc962c00b4b 100644 --- a/tests/ui/wf/unnormalized-projection-guides-inference.rs +++ b/tests/ui/wf/unnormalized-projection-guides-inference.rs @@ -1,6 +1,6 @@ // The WF requirements of the *unnormalized* form of type annotations // can guide inference. -// check-pass +//@ check-pass pub trait EqualTo { type Ty; diff --git a/tests/ui/wf/wf-in-where-clause-static.rs b/tests/ui/wf/wf-in-where-clause-static.rs index 86722afdf9fdd..a3d360e1fb56b 100644 --- a/tests/ui/wf/wf-in-where-clause-static.rs +++ b/tests/ui/wf/wf-in-where-clause-static.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #98117 +//@ check-pass +//@ known-bug: #98117 // Should fail. Functions are responsible for checking the well-formedness of // their own where clauses, so this should fail and require an explicit bound diff --git a/tests/ui/wf/wf-normalization-sized.rs b/tests/ui/wf/wf-normalization-sized.rs index 473fc79a8a39d..e14be6b62bb26 100644 --- a/tests/ui/wf/wf-normalization-sized.rs +++ b/tests/ui/wf/wf-normalization-sized.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #100041 +//@ check-pass +//@ known-bug: #100041 // Should fail. Normalization can bypass well-formedness checking. // `[[[[[[u8]]]]]]` is not a well-formed type since size of type `[u8]` cannot diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs index 5d7308b6c1cdc..7ad7a896e8d38 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.rs +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -1,5 +1,5 @@ -// revisions: quiet verbose -// [verbose]compile-flags: -Zverbose-internals +//@ revisions: quiet verbose +//@ [verbose]compile-flags: -Zverbose-internals #![allow(unused_parens)] diff --git a/tests/ui/where-clauses/issue-50825-1.rs b/tests/ui/where-clauses/issue-50825-1.rs index 2ee34ad714ede..96b48068b0e16 100644 --- a/tests/ui/where-clauses/issue-50825-1.rs +++ b/tests/ui/where-clauses/issue-50825-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for issue #50825 // Make sure that the `impl` bound (): X is preferred over // the (): X bound in the where clause. diff --git a/tests/ui/where-clauses/issue-50825.rs b/tests/ui/where-clauses/issue-50825.rs index 1ece2e9fc8475..4c5c2727824a7 100644 --- a/tests/ui/where-clauses/issue-50825.rs +++ b/tests/ui/where-clauses/issue-50825.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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/self-in-where-clause-allowed.rs b/tests/ui/where-clauses/self-in-where-clause-allowed.rs index 6cf5ed2e46aec..fd2cfe2bf65e4 100644 --- a/tests/ui/where-clauses/self-in-where-clause-allowed.rs +++ b/tests/ui/where-clauses/self-in-where-clause-allowed.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(auto_traits)] #![deny(where_clauses_object_safety)] diff --git a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs index 65fd2f3096c93..be003cbf585e0 100644 --- a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs +++ b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Bound { fn dummy(&self) { } 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 a7ce0590fcd46..67088a9818e08 100644 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs +++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used 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 8f9c6fbff3d8f..ba409182809db 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed index 4e1aa59aac0f0..b53d9d61d67f2 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs index 05b2f8c82a456..18955dd8bcc39 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed index 940e2cc8e9750..719f1d2a4c603 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] #![feature(associated_type_defaults)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs index 7001a9245a5f3..a76787413144c 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] #![feature(associated_type_defaults)] diff --git a/tests/ui/where-clauses/where-clause-placement-type-alias.rs b/tests/ui/where-clauses/where-clause-placement-type-alias.rs index 62e301cb4086f..1f3b044c8119b 100644 --- a/tests/ui/where-clauses/where-clause-placement-type-alias.rs +++ b/tests/ui/where-clauses/where-clause-placement-type-alias.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // Fine, but lints as unused type Foo where u32: Copy = (); diff --git a/tests/ui/where-clauses/where-clause-region-outlives.rs b/tests/ui/where-clauses/where-clause-region-outlives.rs index 84925345de14e..db61638ca2dd7 100644 --- a/tests/ui/where-clauses/where-clause-region-outlives.rs +++ b/tests/ui/where-clauses/where-clause-region-outlives.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A<'a, 'b> where 'a : 'b { x: &'a isize, y: &'b isize } diff --git a/tests/ui/where-clauses/where-clauses-cross-crate.rs b/tests/ui/where-clauses/where-clauses-cross-crate.rs index 9edf0bd5b1d24..713808520b5de 100644 --- a/tests/ui/where-clauses/where-clauses-cross-crate.rs +++ b/tests/ui/where-clauses/where-clauses-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:where_clauses_xc.rs +//@ run-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 4bfd9e6590fba..8e8c73a392511 100644 --- a/tests/ui/where-clauses/where-clauses-lifetimes.rs +++ b/tests/ui/where-clauses/where-clauses-lifetimes.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a, I>(mut it: I) where I: Iterator {} diff --git a/tests/ui/where-clauses/where-clauses-method.rs b/tests/ui/where-clauses/where-clauses-method.rs index feecff4356527..1759c0f234683 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 +//@ run-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 6964cfa2eb044..c2ef65ab0a699 100644 --- a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs +++ b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Bencher; diff --git a/tests/ui/where-clauses/where-clauses.rs b/tests/ui/where-clauses/where-clauses.rs index 905ef7c5e8cc7..f7bf875d4173f 100644 --- a/tests/ui/where-clauses/where-clauses.rs +++ b/tests/ui/where-clauses/where-clauses.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-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-invalid.rs b/tests/ui/windows-subsystem-invalid.rs index 0336678b712eb..c6a6dd00a921a 100644 --- a/tests/ui/windows-subsystem-invalid.rs +++ b/tests/ui/windows-subsystem-invalid.rs @@ -1,4 +1,4 @@ -// error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed +//@ error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed #![windows_subsystem = "wrong"] diff --git a/tests/ui/write-fmt-errors.rs b/tests/ui/write-fmt-errors.rs index 3fcaefaa63ef1..f194e25b5567c 100644 --- a/tests/ui/write-fmt-errors.rs +++ b/tests/ui/write-fmt-errors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(io_error_uncategorized)] diff --git a/tests/ui/wrong-hashset-issue-42918.rs b/tests/ui/wrong-hashset-issue-42918.rs index ef834d915c936..5795cc527cf27 100644 --- a/tests/ui/wrong-hashset-issue-42918.rs +++ b/tests/ui/wrong-hashset-issue-42918.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // #![allow(dead_code)] -// compile-flags: -O +//@ compile-flags: -O use std::collections::HashSet; diff --git a/tests/ui/xcrate/xcrate-private-by-default.rs b/tests/ui/xcrate/xcrate-private-by-default.rs index 299cff54f3469..3a5d813134436 100644 --- a/tests/ui/xcrate/xcrate-private-by-default.rs +++ b/tests/ui/xcrate/xcrate-private-by-default.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/xcrate/xcrate-unit-struct-2.rs b/tests/ui/xcrate/xcrate-unit-struct-2.rs index 7aa3eb0d6c44a..c2e3a7611292f 100644 --- a/tests/ui/xcrate/xcrate-unit-struct-2.rs +++ b/tests/ui/xcrate/xcrate-unit-struct-2.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:xcrate_unit_struct.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:xcrate_unit_struct.rs +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] extern crate xcrate_unit_struct; diff --git a/tests/ui/xcrate/xcrate-unit-struct.rs b/tests/ui/xcrate/xcrate-unit-struct.rs index bc14cd8d4c01c..1517f843eff31 100644 --- a/tests/ui/xcrate/xcrate-unit-struct.rs +++ b/tests/ui/xcrate/xcrate-unit-struct.rs @@ -1,4 +1,4 @@ -// aux-build:xcrate_unit_struct.rs +//@ aux-build:xcrate_unit_struct.rs // Make sure that when we have cross-crate unit structs we don't accidentally // make values out of cross-crate structs that aren't unit. diff --git a/tests/ui/zero-sized/zero-size-type-destructors.rs b/tests/ui/zero-sized/zero-size-type-destructors.rs index fb87d8ea0ba7f..ebd2a12a6c8ff 100644 --- a/tests/ui/zero-sized/zero-size-type-destructors.rs +++ b/tests/ui/zero-sized/zero-size-type-destructors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static mut destructions : isize = 3; diff --git a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs index 14cf6c2036bdc..d35a3cf559e7c 100644 --- a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs +++ b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::collections::BinaryHeap; diff --git a/tests/ui/zero-sized/zero-sized-btreemap-insert.rs b/tests/ui/zero-sized/zero-sized-btreemap-insert.rs index 52edb33d6ad47..be862c85cbb05 100644 --- a/tests/ui/zero-sized/zero-sized-btreemap-insert.rs +++ b/tests/ui/zero-sized/zero-sized-btreemap-insert.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_imports)] use std::cmp::{Ord, Ordering, PartialOrd}; diff --git a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs index 301f03110b74b..c5c5c28eb9e29 100644 --- a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs +++ b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::LinkedList; fn main() { diff --git a/tests/ui/zero-sized/zero-sized-tuple-struct.rs b/tests/ui/zero-sized/zero-sized-tuple-struct.rs index 2208590f7d61b..8eb56071033ec 100644 --- a/tests/ui/zero-sized/zero-sized-tuple-struct.rs +++ b/tests/ui/zero-sized/zero-sized-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(unused_assignments)]