diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index a3783db5f80d..f414ff746bb8 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 dd87a5c4dc38..fada69c4e6df 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 b3d684086c28..65643e93d27c 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 ae4000f02a7d..64469727d0db 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 0f0d828c8fc3..6e846d721f2e 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 819cb5ef137c..476752c7230a 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 eac8cb437794..f162ef831b76 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 e3e48ecb3aa5..4415c51acf68 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 e35b4029b450..75d413dedad3 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 8530bf9e2b36..e4633acd8174 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 450672fb9412..502f0b3fcb51 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 4a6d4fe930cf..c456e40d7c15 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 dbc29e607eff..ddad6683afbd 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 11679ab77e35..2fd34b3c7fc3 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 b2207c3d3106..e72ace8be355 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 08a2e38bfa1b..792e1c9e736a 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,25 +498,38 @@ 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; @@ -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 340a496a6899..b200ecbf73af 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 e33f374c3595..51836063945e 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 43048dc41d3c..96c9e740568c 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 2b799d6f5d3b..b82a9a909e6d 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 52304c72a2f8..15691804a94b 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 b34d3dd90440..50a614a1b027 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 e893a2c78134..ff4208def319 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 e936ebc7185f..eaf75539f59b 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 b0db3545ae7c..b9b257856e67 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 6aedd2a5e334..99875ec54054 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 f1c8f2e2dde5..cbc0ce8c9746 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 488d16f18da9..1410273e3bc9 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 dc391ab5648c..f0f6bfff64aa 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 8884c218d05a..b9052672a26a 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 41420b9caec5..43f0af5bd1da 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 33092825e891..e53f922ad107 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 c4271c66e1c9..27614634c6b3 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 e6319747e782..6bab8f75d248 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 729ce1f00cd8..f39b496154b4 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 c6f6c32fe60c..f49369c5a237 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 7d69e49b209f..24c2e2905348 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 bfc4fc07d4cc..112553b2f703 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 76b9e8de75fb..087c43075f17 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 6ee1d1ca9247..faa35f51cd49 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 5f769e9ad8a5..85f9d3bd63ec 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 7445e2e80b40..da59ffebdc5a 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 2e7130f35657..70ad85989572 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 72e9744295bc..2cfbaff35ef2 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 178bfc3a380c..9df28799f4f7 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 6f908f7752ad..fdb2b4f20241 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 eac78a3cd7c2..9c0e8029571d 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 306bf07a9760..c5f281964df0 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 2aaece1060a1..9c0846e9fb19 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 afb6937b43b9..2f624ab05271 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 9d4ec7d25bb6..125fac48df87 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 ec2af393639c..5be09b06d9e4 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 dabf6297aa9c..e2767ee29895 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 7ac7fa0ac33a..2cdcdcb1492b 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 a7f4e75e2143..5be45c33e112 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 515d564e81db..5d50510338c6 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 84de12b23a06..813a7a64daf0 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 8d8d06b7c0b7..2b34f5daaf63 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 15bddb2a64fb..eea3624898c8 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 09bb06de483a..2addfa37f8b4 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 cbbf3548c07e..1575f31e75e0 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 79bed960b950..2c692c950030 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 d936c64c55cb..73102a5f026d 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 fb174192b849..7f0e6f90dbb1 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 f43b85173d42..a0af902c4e10 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 1c9913fa2036..5593de607844 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 e795537e84ad..7227b185f4d3 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 17ad08b0569b..19272b52b32e 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 0fe5b9c664a3..33116737a420 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 a827717d9bbd..5917d79983d0 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 416f556f57d2..6a959a99e5d4 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 8d7c0ca01449..bf89bc7f7c3c 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 6bd221ff0587..3ea4df1d2a43 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 95833f532f4d..bb822c611a17 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 287e317b10f3..412f7eced433 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 a8b9ff056c25..ef0512bf6862 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 82846e3b4e82..de7e04ba00f8 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 58e1394c0907..c63af90a7f31 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 ea93ac5841fe..743f47603393 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 134aa9efc01b..29c88783357b 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 68b1a0d4e61c..661a444d0499 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 7fa416197b35..5fc93d666ab1 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 a5ef4022d39d..098811195d7c 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 00a101541c58..c89a38062802 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 d9e274df0f5f..692af7c197a3 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 646a2a991e70..5a5e7f70854d 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 7defbb1090ff..5061931afb7b 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 3341b564d1f6..b84273848ee9 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 5dc3c69e4932..07eb91c90059 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 7800560da94f..63d8fe19ac35 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 ca17dab55b02..c4e89a58a05a 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 38a68df79cc7..04bb20e96b79 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 f6fb1f73e5cf..eda2f8bb812b 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 2b22488b8ffc..e3d2cd2a31fb 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 02867789b79d..c29e5565d514 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 5c42912874c6..12bca0b438cc 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 2548d9e24c9d..b19eef8e2558 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 60b5df752ca8..143e277283e2 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 c8259c0024c7..fc6c1eab803d 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; } -#[cfg(bootstrap)] +/// 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 +} + +/// 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 fe25cac280fe..ed06ce6927e0 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 946d0051ccec..8c68ea114dbd 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 4e0e19ddc782..d084bede1eba 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 c748336cd7fa..bcaac2f42cf0 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 3de91267cf5d..1a106ef97942 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 52a5add1132a..6d82d1581f79 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 51bd09b6effe..b35ed8442032 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 92f465ccdb4e..ef46040f0a70 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 882f3e3bc60f..a7f1fde6975c 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 81ac0eaa67e9..64bd5b3e2b66 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 7d6f746845e3..99344a88efc3 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 fd2d830b693d..1c4656a649a3 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 c882c9e7f3f5..6e163e20d8ec 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 bcae73cbe09c..9ad50048c25e 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 4037e2e2839c..cc514bd914f1 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 4aaf7c61f50d..06ab15d5e900 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 635bad199ff9..d261a535b183 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 f5188dd458df..f51a2c39b8e2 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 3a661973e5fe..8001e6e64713 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 80e06066d28f..6870c677b1e0 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 e55d55a6d237..d3f09ab356ad 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 b33400fab476..2e885f06b527 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 0e03d0c2d4e4..68937161e046 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 67051f6e97bd..0168b11c7394 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 db2f8b7ac283..8224e4b12a0e 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 4c8af4eba788..48aae73d928a 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 20dd95a3a462..522e75a5683b 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 e7c1f195aacc..8bdbca120d7f 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 53e9a32e3055..c19b5791562c 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 7aadf06e92fc..b7e778605fc0 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 288ad8e8d878..fe2873261751 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 743799c4b3ed..07ea2e930d57 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 ce176e6fc18f..d2422bb80ae5 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 320cd5eb3b2a..16e903439936 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 1429313c8906..617b385a960c 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 fc6af45fb907..7910981d0f5e 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 73e92ed1dad6..1d8ac6aa0439 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 4d6239e11a39..00b4405faaef 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 ed52de3cbec1..e7773d138c25 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 69511e49acdb..a5dd4e525777 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 ad78a85a88dc..b2429588de12 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 ff57973a62a4..b57d51c077e9 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 f429d90cd7dd..2af7e0c388a3 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 e3e88a84fadf..8d5d06ad9fb3 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 ff6e362b065c..39afa2cbfcaf 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 a6b9f1cb7c88..9af07119a89a 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 4c2d843eaa0d..93ef9c0812b1 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 2fe79650dbfd..fa0e9a979d06 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 20498b16cb22..0f7fde747690 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 8873d26880ce..d728513a4e29 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!( - "-1".parse::().err().map(|e| e.kind().clone()), + "0".parse::>().err().map(|e| e.kind().clone()), + Some(IntErrorKind::Zero) + ); + assert_eq!( + "-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!(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!(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!(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!(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); + 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 = NonZeroU16::new(1).unwrap().leading_zeros(); + 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!(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!(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!(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!(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 << 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 b68f2a50b321..b3f7dfa1fb9c 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 50926da3ce79..6c008ab2cb19 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 bcf7b5e59775..c5743eda3e80 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 c2b046ae41eb..f81f2152cd04 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 b3a763069974..894acae217e4 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 5b1bfb30983b..6d75a5a627c8 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 930c111455df..712f6b454582 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 7c4929417132..d05458a6944a 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 3383a8cfa41e..db8de1b1e3de 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 a238e74ed95c..f842a0b6d554 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 33e9d8efed51..fd7e51688cde 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 a04bc4811460..16eaed15e720 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 3cf63fccf2e7..871a2ccdfa49 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 3384906a15e3..fee80c02d4a6 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 ae0f718535b2..9c1387bf4083 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 09c4ab3d3e90..6762a43b483a 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 10c1456d4fd0..943b771498f8 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 d89de18ca5ff..ebae1cff0ee1 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 7ac9d1d64b42..c797fde7fbdc 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 25eca61d67b6..2d952b7ebbca 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 6c66b93a3e1a..a6c1336109ad 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 1c310648a3db..6ea874e509e2 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 155f333f9061..77f9040ead54 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 ddfc3af2f501..3d8fa27251f0 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 bf1fb3123c4c..a1c0321876fa 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 8f537de7026f..1b6a6bb2c5c7 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 4e41efc90962..823b4a563362 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 9931c2af2f1e..b6a74fb48318 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 94c4c56bd51c..d5a77085725c 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 89a2a0c6e567..33d359d3f841 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 5b4e94d0f1b9..76179e0910d9 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 ba8d31c23a51..97976407bb40 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 a639afcc674e..6a989dd3e76b 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 a8db251de201..cd1ae7f7d11c 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 d7295a799daa..8966e4b80ad3 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 a0eefa8811a3..77d8b4378e7d 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 714b70492279..49f936f14498 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 fbbdbc212659..2ecfe088d107 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 c4495f81a5a3..3f85bb0a099a 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 c34e01e000ac..e37fbe9ef83e 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 7624e746f5c8..fd10df82d8b4 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 9ec775959fd4..6a94d3771403 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 1fe744935193..0f709e2ec7ba 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 0f452e07a5c5..21f5954d6e2d 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 b230fd1a829f..8eae16064850 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 eb837c8f6c63..4f0f010984ab 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 64bef2d30158..9d7f88a9d42b 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 f50026368dab..6d56492e41b5 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 1dbda405128a..0c7e751c8daa 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 b21ffe868e14..2c4013d78bf6 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 4c64850c0e04..05b9c7340181 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 5f1ca5de74af..1dce8d8ac718 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 0e9a9791fb25..121ed88c92fe 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 0d5e2600b73a..ec62f9f1f8c1 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 8fa8f567d7ee..9d07ae6fc67e 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 85e7a915c536..30cadfe7dac6 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 8d5bcd665ad2..47195fcc17b4 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 daec39141458..4ceb8a646e06 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::*; - fn split_flags(flags: &str) -> Vec { - // Individual flags can be single-quoted to preserve spaces; see - // . - flags - .split("'") - .enumerate() - .flat_map( - |(i, f)| { + 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)| { 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); - } - - 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() - }) + if let Some(code) = config + .parse_name_value_directive(ln, FAILURE_STATUS) + .and_then(|code| code.trim().parse::().ok()) { - self.known_bug = true; - } else { + 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, 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; - 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 => {} - } - }; - } - - 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(), - }); + 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; } - } - should_fail |= config.parse_name_directive(ln, "should-fail"); - }); + 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 => {} + } + }; + } + + 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_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"); + }, + ); + + 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 c859e8acadeb..274006ae8c16 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/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 9319877472e2..db4c4a28debb 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 f50aaa292fd7..711323b51c20 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 9a848d50341a..35dcfecbbe33 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 686311903254..956a02ded0f1 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 7825673db00e..d47f446716b7 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 932a35d9bf04..d9b4363d604b 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 adc547aa6cd3..c567949102f6 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 f4d690553446..0645c1f176ef 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 8e46bd7ad48f..0dda5aadce20 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 8b0e80a94b0b..a8aae6f5bc9d 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 1dbd221fde57..5517b9fdcece 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 8f084f6c54bd..95f6466b2548 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 000000000000..c14d0ee78c8d --- /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 c87353b93a7c..04942e984a81 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 39330693677e..d2fb2ae53ac7 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 6c7d60d4cb0b..692cb0850b92 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 33ea79275263..7a728d4b241d 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 5bece0ba2d15..5b9b6e566f9a 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 fb3cb2083e4b..5caa395d7a5f 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 1dbab275225c..612980824490 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 c6bba7186da7..911438e0d540 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 77168be5374b..47402acc93ae 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 05a279a3014b..d1fc3b7c910a 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 77715ee4023b..ceb88d4e9faa 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 4f8cab3bf0ef..6b131227d5ba 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 db5f2ca652fa..0c549e6222b9 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 60e8db1592e9..80c492e30221 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 19b901d49a42..70b6eb085c3e 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 886e8f6be109..3e874e265425 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 ff33cf31af85..873f5d2e7748 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 123ce20ca262..5a4a339882d5 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 cff25511cc95..69afe7b25321 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 03a8ecf241da..ca7630fe4215 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 8bbc987c821b..a8f629f0906d 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 55a53c250bf3..2bf913e4e4f6 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 2b10d26d1ddf..a0ebd43e0767 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 0b556c99e8d0..11e23abb7826 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 ee974f6dbdee..f168f5faa178 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 c9b8d52cf5be..69570fc93581 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 5103129abaa4..43880b96c2d6 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 2551c93a7654..723933cd7e73 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 70a42895d91d..7795e4f04010 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 dd264fb9c196..a980b7f1cdea 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 b60387aed99d..73263a9da048 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 d5b90a3592b3..7f847d55721c 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 3c9f0f583d48..6469f5d2ce72 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 e20ee0da45d9..89bbf4066936 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 3f4f70c99e6a..84e21660f1c7 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 dbd2b4ad8655..5eccfaf204bf 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 4600bd090cc6..34d3b91d404f 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 347a840296dd..2457d1d79579 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 29b2405189cc..21720db5143b 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 fba880d4f9a5..316ac7a4880e 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 cd0b0bb23211..e3caccee62c1 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 b3392b9c6071..ff515b662693 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 0647a18c3c45..f94f838723a5 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 19edf9779f35..26d65e8bbf85 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 cca2e8db74d7..e15b47acf109 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 361ed8f3d910..a09a0edba85b 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 6eaccc436b69..fdd419b4e3c1 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 ab2b30894850..d03cff800987 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 fb4786717549..5451b72d9792 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 e5c7a1a68048..32d4d6cd31e6 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 e94aa816d90a..29332861977b 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 eb732e7c2c31..fdd775da5784 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 1a7984ea5cd1..b00f8d8cc2e7 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 00f04d5b7ff3..508b07a98336 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 a32cc6500f82..376630b8d33f 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 9b99e51905da..cd7e76c7158f 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 1862177005f9..6b42f268bb9e 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 d1cf1319fb09..c1bd35b80d26 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 4d508ecb2422..a61d0cbcfdf0 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 932c93245e6f..3223bac18201 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 cd06423e3a55..a50535ab726f 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 4f76257fc726..4bd4ab4570c4 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 ea9ad39a70d8..f0985d74456f 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 8be09500f4e4..a8a2027cc451 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 a5e96e775018..89e7e779b097 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 b0ec9ab09299..b6835307dec2 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 008fb3501d90..c638546a9475 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 97b86bbc96d0..bfd04e1e0ba2 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 97b86bbc96d0..bfd04e1e0ba2 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 12813a1fc8bd..4a8501aa3d26 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 ea341b1ac14a..f9b1b5237d79 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 10cbc23c427f..97de54dd4d6e 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 9bd8406a2760..9bf04e20f18b 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 2323cf46d6f1..f4825a910b0c 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 488434a9a720..1fa1797bf9cb 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 fae7ab7fe331..1c1f4fe0bf6c 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 6dfefe19c7fa..b3bb4598c778 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 31dea2d4478f..0cb3879666da 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 edd4df75e8b8..5934d7398130 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 d8478fb5eaa4..a48b0beeb07e 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 c05d15643dbb..b5f1ed9b56a9 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 f5facc16b318..ea1c2521103e 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 981cdbb10a91..c67a31d8f071 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 d7241b803649..c9ec4043e374 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 95533cf3dfbf..3602b401f857 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 8ec1d41a7098..2a506d4b3e1c 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 108ba60a02f5..e436760f3145 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 0b69081d4eda..607412f44c4c 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 283656552931..188f5350256d 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 143ddf99586f..5d96f457c883 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 a845c419555c..bb9d37ee0ff9 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 8ee225f5cdfe..30338e0ab87c 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 577853a4e911..4614df44084f 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 2b3ece67b34a..d64df4f7e4d9 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 c0ca45875077..5ca3d60ad1dc 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 2649c2eac33d..950c118c07f6 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 b112dcaef3e4..cb5072564b2e 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 1c607d134261..820a9ea4fff1 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 c6d311148d07..894ca2f93027 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 74d893ee5b28..09eef1dc67fc 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 371d16f093a7..f1281f4e302f 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 91ab280b9c7e..663071bf6133 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 cd2c17220655..6cac3d721f19 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 4bdf2dbdd6e4..0ed9cd1f6f88 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 f73173e84847..64f8480f8af3 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 9e78162c8136..ff314a4ab1d6 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 547c1f5727f1..2a342681e0fc 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 dacffd154fc2..fe9d908a1ff7 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 354c14a756aa..22345718ad8e 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 e22aef96330b..67657859408b 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 75b309a4839b..809c001b0797 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 7afb9d8461f8..ca78db63ce0b 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 98dd46824fa6..870a4f12fecf 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 02a3ccf46f2e..60dbb5e5061a 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 d4a704d767ef..3897a52a1cb1 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 b3ae683a8a61..ce61401aab45 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 454f94be8762..95ff2539a5da 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 17cf7e335b9a..dd767241ddbf 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 4458eb06dd5f..ee6114e0dc79 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 3ae3686e423f..89521eaf3fef 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 83b08a3db4c3..7aa8a251fec5 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 3829078aba59..4436b6338564 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 d83c611d3bb5..4bd139884244 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 a514e2027736..2adcd96f5984 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 4d8022ecba73..1981afa7f059 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 073280d0fab1..31f59f8f7242 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 5a6283e9f13d..273dd500c089 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 0b793fa0120e..4995a8420081 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 867c18a7d5e6..29f85da56e57 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 f66b3d4a8999..82d871cf8754 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 d7e64132f89e..710f7e24aa4a 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 c58ddbc42394..39575fbfa14f 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 908c39c7951c..70ceb7f85bc5 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 5dee36082561..039f3838ec25 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 443895f7c482..76a1b4951d6e 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 bde01037181a..7437de5d805f 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 6c95bd50007f..65ca182b6156 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 f7a51f9c4569..eca4a1cc37fb 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 f839cd62b1a5..b790cc16ec10 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 fdeb7e4fda64..c7fc09ffd2a8 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 998899271e41..a38c16062087 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 ed34f074a929..2493eca2c3aa 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 7009244aa189..ea882518b644 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 bdc7d507d530..10f8350869fb 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 3e0e18873ab0..4af38d9cf328 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 5f1699227d8e..aaeb05e6d77a 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 e2055f551acc..b130c6bc2ffb 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 2e383e1a7c68..037163b4174e 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 feb0cb30ccac..5021a3b677f2 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 6172027a2fa5..33b77367a4fb 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 f71418161f29..1e54b6505db8 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 0b02c99abf66..a1fadb2115ba 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 fa1dd4aef5d1..b221c7c78bc7 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 b2d3fe7d9a73..44a45187d2d5 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 e87a88434991..3d9cf763e4d7 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 308f78908295..b11b2f3c0b9a 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 cfb75078264d..a483008c3649 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 9b8170840bb0..fbb1e08df912 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 dbb6cbb9437b..c635fa6ba700 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 6a6cdb00d517..87c6d5ddfdc4 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 89f2b3bb7d0f..f442ce81476e 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 1c71c1185d46..ba68cdd26d94 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 77524ba7aa5e..3fc8e5060693 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 a14010481fc1..f00b4d4c46fa 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 3eeb76f3d003..f84b9944b366 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 b70da4921c20..41a906e32a4b 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 4e14becf74be..f2cead399b6f 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 caa9b7dbce6a..133d093d200e 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 a8c6c71b805f..6da1b89ed674 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 903b444767f6..3b11e253eda2 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 ac589de2303f..2b0e3628de56 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 e64f5e8af523..b55b1876ac8c 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 5b2e636c29f2..d93de9ee57fa 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 05677912dff4..84425c4a8f64 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 809b0d1555ae..3cbdabf8134f 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 37862cf349cf..5f364a22bc43 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 bb6201861dff..bc3f78155114 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 cfb9fd90a55b..6ac5f059a624 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 744a563d3d14..e2675dc431d9 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 b9479c44bf11..216408b38733 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 c8bee504d02b..93d23885b135 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 044a0e5b9408..745d30e6a84a 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 b18d01730f29..41d6393996d2 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 ea8f560ff5d9..57edd57de998 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 24586b39aacc..2e21d56e3231 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 03fa087ae376..c99715e9f806 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 9e002b1550f3..6f32293511bf 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 983788a93ccd..bdde12af6df3 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 59f7b36afcd8..b18c487fc4b4 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 666d2c677834..0529811d3ba4 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 25cf1c3d730e..1da2c7704f41 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 ab1b5f45e5c8..80ccd127d506 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 ddcd2065bfed..5205a084162b 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 f7c2cd6c5056..a6d5022ecf13 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 e19221bc04e5..d41c46d57bb1 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 f9a2ab6269fa..817a338a5b99 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 c5f14f5f75ce..38a98a30ece2 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 a8dce1f8d712..1f043b964ded 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 a15060857ecc..ea2acd424e2c 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 c05633ae8856..4f349c5b2134 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 67933666eb5d..5d3f417f7337 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 39c645640222..af940f05fead 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 6c22c2f6c946..531e16795dd8 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 c11f0938d0b6..3b2c1edcd478 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 06589431a445..bf241b9771b4 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 1135ad2e1c64..2938bafe5e70 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 93ef4f090622..0a86bd66ccbc 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 14490c3e0f23..820be132ef79 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 80b29ec870fc..c866f9fd8cc4 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 89c849c75234..bd242af3dbc0 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 d0dacda4afb7..f7bf60d04dfd 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 1d579ccc90ee..b5b51f611689 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 715a67687d12..850033d4ce03 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 9db8fb008cf2..002393f5bffb 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 cd025dc8beec..ffde2ccf7863 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 de9008bfcf9e..4ff05112897c 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 9c7884c80734..5b272cfeb0c2 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 5a34bb97ca5d..5dc94b87ff96 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 611639b84be7..a9d7e2f706bc 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 92d9cffecddd..2990e507ab2b 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 ecdc112e02dc..39f5427bf77c 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 18d7a1215588..10b8f8ebada4 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 c6d956dffe1e..e8a313140a3b 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 68eb4e25d331..123650cfd0b3 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 62c1cb983d1b..df297cc390d9 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 d5e9a2bde006..460811353f0e 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 445135aef2b1..3838145e54f6 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 787bee0ff020..ee847dcc1f5c 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 5276869a702e..84cc4dbca9cf 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 d2ccd30a6e2b..3e8f15d41b98 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 36e1e4ecce7c..b7d9f99e2167 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 403cdbd7ff33..6dfdbff85c03 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 a233b09ff89c..2ab0f2df417a 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 ca44c9f45fc7..0fb36f103ee5 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 adf36b1fff26..273db9c74af8 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 8f01bae4fcf7..968eaf3cf14c 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 e4b1c29f371e..2d9af05331d0 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 9ef0003da173..b868ef310041 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 82105f25f924..19ec0a6918ef 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 495dfb338ae3..3dc709cf633a 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 c08e05c8a307..bafaf969fb75 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 aa4882ae5357..efd7e13e4bcd 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 d4af6e864144..938ef83af272 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 f1144db44ca4..4150d39ed564 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 db788fe6e6af..c9044e27e0e7 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 4dc6c2e47a9e..55db10bd0e4a 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 539becfdc7c8..c6cbc69503d8 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 17bcc8fe5768..7945441f1c9e 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 b6993f66fe79..9f3798b27afa 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 152bb7a60a70..ddb9278bafa3 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 7ae425e2aaaf..c634c89a5405 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 33c73c3db897..64168cb8c14f 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 0c2a38b1173d..902094b98628 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 c7f66e645bb5..3159500393e6 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 5b7c00bccba7..9a4e4a3db789 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 83be4f43b5e9..ae2aa9c97ba0 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 9b0fa8dc6f32..5fe7dd8d8999 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 48390b9430b6..b27a16acc4bc 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 f5deec422f59..fdc2a0f64e49 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 a4ac0ecfa4cf..2c6965edc6b6 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 054034b4c289..f520c610685f 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 a73cd1775b46..4a0bab2cb4b8 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 cbe8cce09245..29eef081a327 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 400f4f7de66f..00873ccc8cf4 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 88327f864237..ecfe2ad707f7 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 1180577bd542..f8837b4e13d8 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 50763ecddf99..2380f48dc22e 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 2f7b2551a03e..238550667eda 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 d2efb24c6662..c205cb800d2f 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 7797a2a16a58..a950d1735c6d 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 631340b2b4d9..3ccb7028bb9d 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 997696923423..5ac7e1e58b8b 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 23f715200400..cb738d08a932 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 9c26e339a449..ecc7c657ee0b 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 25b0d5a56bfb..62d3b3d82881 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 dd14e05fd49b..5ccc317562bc 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 b689777685f3..36184e786255 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 5a60b20fdf38..30187625ff3d 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 9c47a003dfd0..4e6d8b9dd0a6 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 49f11140741c..e7e383699689 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 3eb50ab55473..b672cc76a02e 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 1c48aadecceb..edde549bb4b6 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 7bc2970ade9a..dad1f644284d 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 bead85630016..22f1897c07f1 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 f5a9bac6e354..211c67061e66 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 193f2efe1992..b5087acb6b8e 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 3c9f511338f6..8e1897cc3d45 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 434bdbe996c6..6aaa0cc895fe 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 8fa7212d6275..8435cb44a9a4 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 9c4f82ac991c..3b6b557fb113 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 96df13e372a2..4ce714d432f3 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 b1e54ec04493..a79f270da459 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 2bd5f316811d..9e783c4bdcae 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 7ab3836493b0..73c7a1a56777 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 ea7e7c984da9..83cb07d700ac 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 f38ec640e178..22e43ea875e3 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 945d7688ce65..4b8e19904d03 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 813dcd60ad10..bd072f446500 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 bb890f72a32c..748cfbb3d8e7 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 9dd37f98150b..4513f0a0b629 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 d2aa54ab9512..1247f835be97 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 a02208661f1f..a059b940e66b 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 05e4e323d879..ee4de509da6c 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 77e4bd4d6f52..f6d3c1adaf12 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 4f332fa13d02..50a8cd8e04b2 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 7f0647534f26..9755fd01c976 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 d5a29616ac5f..ae38dce1818c 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 3b350e14fd93..11728b879900 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 e6270ec3166c..9a8b77d00b71 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 9129f37e0c6b..0a98f0d2c8d1 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 b3dea8f6eca7..17c3b9580ca8 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 557e63b5f71f..78710621cade 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 2c1ce1c3785a..2c46832cb99a 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 128c7dfdda2e..fadc0960f9b5 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 6b6478419b4c..5e7e2136b950 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 b6f37cb908e4..62b23b5fbab8 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 c82ec01f4d61..bb6a2fd1035f 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 2e97535157fd..06b5489f8535 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 72a6be9ffc38..5b03cdf16011 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 60088e443f30..6ca9f80ccaff 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 b0703a4ee22b..6782d6881262 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 a9d6eed810a6..87b7ba791b38 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 d854dce382fc..ad5c75425daa 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 f74c5ff1eddf..819a7656a442 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 46e5aef04031..8a7ba6f5ebf9 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 db092970f79b..4ce6308c1b06 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 aad8c487c5a0..6d5d403d1064 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 f038c9ce7ba2..2ab94908b604 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 f8f8048fb717..422fd5a0c3a9 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 b7f6721ec4f3..911073a6a32c 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 2e42b3a2a44d..50fbe515101c 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 c54bc3cd6230..ed2cebb5f7e8 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 9f179b6454e5..bed8eeafd065 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 68ee38d16b3f..f18a0aa1a9a7 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 31e073cc7a8b..1c58c8a1a3c2 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 0e9a229a5e59..1a9c0bf31999 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 13f1d27203ad..361b0cfce134 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 70ee60517ae8..d30ea66e9b97 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 1e4c113a5fbe..80a99cce0a34 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 05498ba63e99..9b1f43b53ab2 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 12ca100435a4..e2c13716a694 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 9ffccd3d8ff0..d1ff4b222b78 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 896d67213e9b..19fc51f4a208 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 77ced3c07810..06ece6ce8138 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 c202c376c5fe..1236d770b95c 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 e713db025e8b..bce6148f9e19 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 c5d7ba3a7553..94c9a1ee1e62 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 8f40b94c0999..d0d3878ed06c 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 8fa20cdf4b7a..65e6a094b77d 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 5d6b1b591810..98bbff794ca4 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 05e66a168d9c..225b29d87bb4 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 80ffbf585fb7..fa25c92fde5c 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 9c588a528fe8..6f34f4f9a830 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 0ddd99cbfa83..6f46cb4aafff 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 1f29e9668514..35f7bdc2f67b 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 89efce198340..90106e4c36d1 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 cbec83d45b29..32fe1ca1c00a 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 ce27eac4d0eb..4d177b69bf89 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 7c5528c986ee..720ceaa7f815 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 6a6456cbbecd..63b2a925e9bb 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 440f35c8bdef..90ff170a6a71 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 7c54efb83c26..bd9b91b002ee 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 6612598b1b8b..884b1a17a2cb 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 df0a82ee7ceb..8da60e1d9cba 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 a04525dcd462..ab36240ed636 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 3e12c9228961..3265c2295291 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 bca69a976778..8abef2ef569c 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 1e23dd8890b9..f0a5a11a219e 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 66d8613f184a..0d98af78ef41 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 0a1b29de19e3..d62e72227474 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 fc1dba97dfd9..44fae6000a96 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 353f82e7c6e6..5b5d8881589f 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 e99d0112ec4f..caa7c61365ba 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 e172c6e5611d..22d9cf090905 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 eec95a141f5c..4cf1c256f3d3 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 ead405fcf011..476bf5760f36 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 e9a26e53c3c7..ed8259396d11 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 01f49d52ee21..cf766ffd7f1a 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 7068a754a12c..3ea5f808de14 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 a2d6c9ff5a45..6a287e1792cd 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 1768fd1687b4..f0a343251964 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 c89f6046e6bf..c16bb8651c3c 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 4a490ed0387d..c39e6deaf394 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 b722506dbbf0..dec3a3c92456 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 563d0c118221..6be2fa6f2ab4 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 997a48b0379a..cd4614df3e31 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 2e2dfd80726c..ce821c25cbc9 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 c9b302b96919..a03df341583e 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 c400bf943e18..cac0049c4f97 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 b71b71b25f55..98f5516e8589 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 66f7672aa43d..7b57e4a0ea0f 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 328c8f944e2e..7c91793b520b 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 bdba4c7ff16a..5cdb4a6133c6 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 f2a4c6e42a93..dcfa3532cdfb 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 4e6754c865dc..880d350bdf60 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 e714457ef7b3..e973e58b629f 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 a60ccb6c4b28..bf3aa6149cce 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 964ddc9b625d..83fdfa60d0d7 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 b3e1ec8ad703..12765fc58110 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 f1ea6627aab8..676315579008 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 e043379133ab..4ac642c0e04b 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 aae70bffa383..00b14305244b 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 97c6e5bade23..8f73ea0fb639 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 69315a022100..0646dbf6055e 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 a3bfcd8efe29..5d66494f7969 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 7e6c509a2722..443d759e80b8 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 2b8f1e0d865e..1c2c0811a500 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 e6de292ca5c9..88a0b762c37b 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 5ddf1faefe08..45143be1e74f 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 28f6deb77ce1..a05ffcd6b4c3 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 3d18542acdcb..b163fa692965 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 fbfe4c6f8391..f502915eac3b 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 b79a29730827..d0b6fff7e38b 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 acc28cb430b2..0dcebafd95b0 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 b98cf2166958..f014c6447863 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 8e8ba5dc46c9..6c8339b9c092 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 adf4dd6ce75a..2f65f1c23038 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 fd4ffe5d6e1e..fabcffb5cf06 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 49753e7bf166..acd523f465d4 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 5a7b3459589e..5ce8dfbc4d21 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 3a2c790f8520..854eeea8833f 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 6f8ec700951e..a18ddc2f2071 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 79652dc882b5..7ab82438d07b 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 f745da4a5cb0..7323e1e39ac1 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 ffd90b689839..3955de2b7053 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 210c783de79f..ce0decd066d9 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 2872be6d6c85..4f7dcd250d17 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 bda21eb0e0ac..0edcf1d6e060 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 3d6f11faff78..25f4060fa6f5 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 3701c37d0c86..3022167c2df5 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 d854f6af3ea9..181882f251ec 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 7e898851aa83..c3713106f116 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 52652cedec96..a0036ef860e3 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 fd325ae10086..ae922be25d03 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 52bbd1f5d286..279b942d0e3b 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 5f177333c93d..939a9b2a6ca9 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 c55fc34346cb..8c25ee118f6f 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 d2ef89425304..f99beee7f8f5 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 d43d674e9c3a..7627e34ba714 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 70e30c132d05..ad37c0f82c24 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 b95a4832bb20..8c7dfa5a479e 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 47ee3e7ad70e..f6febf80cf52 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 1a1e98cbac27..1ebcca758c0f 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 c88c76631367..b90982b2d669 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 734bf2768c2a..87fb0caf1d5f 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 bd766752360a..1b29f2cccfa8 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 d07c12349989..33826a24ddb9 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 77712168a0fd..c107a1515aaf 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 1d53bd570316..30cb37b5198e 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 e17b11c5eae1..ad9dc388728f 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 c6920cf8d40c..3122c670b440 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 ca3d66b1c8eb..654c0f6e4b54 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 48de89127f4a..51429f9ee673 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 0e086968b905..efff473c26e4 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 8b3bad707d3f..a2d04c22edb3 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 7cae7c71cd2d..47585a508fde 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 109c2eed27a3..dc686c05b98b 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 3c1cb81f0975..d1c99fd44fa0 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 2f6c2d3aebd0..4828155ba394 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 a5abf1ba99d6..ced2d193e69e 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 abe248e16a19..d33ff57021f2 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 bd9a8fcf4925..f12860fe6db7 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 d8790bb2d12f..50287f9ee9b8 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 f8e3f5b58d1b..35fcf53b6414 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 9c1a488e9517..c501b2f3f245 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 0fd2c707938c..60e5d594202e 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 dff4c9051f47..6a50ee6e76f7 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 bf80a80f4060..7fe2a81bd59b 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 1f93248e10ec..658905995a07 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 12db595ed257..c50149b34436 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 547ff45c2296..cec088496fd3 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 3e68b1401020..614c80de5129 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 db6e7a4cf051..d32cdd246586 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 d7467ac22371..36f79e34f3ea 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 cf6508551a55..f54a0b523e2a 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 b9fc1a88cee1..658e8f9b9073 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 8e08b82b9d3e..28705bfc0c8f 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 a3c7226056b2..a7b4bf8903ae 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 63941a791394..b3b22ab05266 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 bc9d127931d5..0ef7cb7574a9 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 605cfdfe747a..0b926bcb2868 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 ec752c15fa28..d3e47c5579b9 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 2a3e382e1186..1990d0ffe2a3 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 d82fbcdc5505..75ce14a4947c 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 12d66b19e07d..77c00bbdc9f8 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 650e13677bc9..c8dddee6275e 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 897def791fea..5ed65425f34e 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 0e9b25e6d304..9c3b458cd3ad 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 902e033cfe71..dcb710fc97c9 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 e11dfc22213b..2c935f5e1fa8 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 3702915cbadd..1ddc1f8d1c5d 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 26d2ed5a6ef6..5168f3696d7d 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 87e99ddda64b..70450697816f 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 a243d20774d2..2884a20f244e 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 60fea9098010..50bef9cf11d5 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 d98779c6ea32..d6bea5dd103c 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 17b5116cceb0..5b34bfce9618 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 81666cada31c..f877513043db 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 9d231d551765..632f1657436a 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 b8964c571f92..17925fc89ba2 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 943c06295418..0ccd137266d5 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 cc1df5f034ff..562a7271c668 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 4505e6243e96..5322a6d5d7ad 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 90832e1a0745..2e5542207cfb 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 a1c56c5de6af..55e4cedb267a 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 7c61ff2d9bd8..1d9bc1a601bd 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 9ad6be0b6e61..992f033180e3 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 62c28e7e5857..e42d9d6e36ad 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 1e372deb984e..7c3c7337e2ef 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 c8127df625e6..486a07d3dd1a 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 1c369fd7415d..80f8b5aaa206 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 c5453b67ef5b..62b28ec869fe 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 3f1f51c20ca0..7f2fb5a908a2 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 35d9cb15540d..53016854f158 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 fb64bb6db633..b74c23b57c36 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 fee3e27cfb84..b27d0bbd58d7 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 0c1f3636446c..805a123cc1a9 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 3201fb8dbf30..e817a1b518f3 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 6436787b665d..d222ddc081ef 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 fb1844384ae0..b9ae90292bb2 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 97f6696fe143..686addcb1a91 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 aaa0245b9868..1f06bb136502 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 a8fa21e55688..0d22cbd2c073 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 172ede7098a2..e2a183a8c0ba 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 868fb799ae4f..29b6abc814a4 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 c431a362b1ea..e6fb0b46712d 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 56ed2847292d..53009b6e7410 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 299faa0587bd..a632ffa603a1 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 4e5e3ba83e49..47b3b8526cf4 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 7695853000d7..81d774c10dff 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 0b2255266753..75b98b2ce039 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 c21886f26f46..cdb7a4daf571 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 c3f6141b2840..5d11dd232185 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 8383eba89124..5e5ddc4f5940 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 8bf1385b3c5c..e694c5ffc05f 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 117495e130f9..4cb8017c7ee3 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 b3c64895c6dd..d591a5af8218 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 9e78f7c51201..519a1dc220a3 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 7ce52259acac..f4747ec9b8a7 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 ab675d0a1a60..adfc26826c9c 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 b4c899b0d029..58c85761cbcb 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 79f68dd606cd..43c2e571eaba 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 aa09d4bdf088..95ac3abdc3aa 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 e8b18bf37f86..45611eae41f5 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 5d260682f1d8..563e28d34cf5 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 3514cd63df19..3a0abc842633 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 5a4f70cbf443..cde4222ffe39 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 56f4cbbd190f..eecb414716cd 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 5d1aa4d83f38..1a868c72d248 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 500812016671..9a61c9719db8 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 b18635fea397..2993f58378a4 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 ced4434a7a7c..3b16e078d932 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 dd676d5e18c0..c4300163db1a 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 f4757e7cbaeb..8011404ed11b 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 68341a24c4e5..4a87688efff5 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 f2f87a908178..237410e0749a 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 a8e5b38ec1dd..20e71b623a1b 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 ef39033a9d4b..ed8f0599958e 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 c21886f26f46..cdb7a4daf571 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 9817d377a788..ee155bd4105d 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 6c10ead3690b..6767e4baee87 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 15cc9fbc81fb..8b2131d07f78 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 edfecb910369..8174f50cdce6 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 79dedb1ba285..d4897a1caf39 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 cfd68bc0d234..f8afa38a0fd0 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 667b288e676d..465e1d94f39d 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 19315ef19f90..7002836ee47f 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 4887eff7efa2..491f80d062bb 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 9f80b9c6e9f4..e6c295405e2b 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 9059f99ba66a..c9b7bb1be325 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 af77c3463b5d..040c8d9834be 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 d07116b13a2b..15108aa5a33c 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 42247dd14b0d..67817cbfa5f3 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 ae6f766d247e..f3a9239be2bb 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 19315ef19f90..7002836ee47f 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 4887eff7efa2..491f80d062bb 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 c1b7c016d1fc..89ff256da1dd 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 65bb9e88448f..38dfe46c8145 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 b1a382958a15..3769ef60b017 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 00dbdfb2389d..acd9f01640a1 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 bf643c926717..686d955ac7ce 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 1816d842d6c4..a3f0bdc85148 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 93c69b05254d..317c17b9b3e5 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 7e7ff9d8d00e..5fbae22a7714 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 a7da058de308..66d2bf1204bc 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 963b19b34a62..98ae28318436 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 8d89500477bb..1f29c19de20d 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 8c01f1bddefd..9b0ce8663c20 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 c26f6625f009..8d3dbaf6ca1f 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 69871d0dca01..1b1c858f9162 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 ce93bd626081..b4fbcb78c134 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 f7a351efff56..e6c8ccf53efd 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 c6e8f1ae9060..1d9a7640f548 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 78904d87abcd..149a880ad754 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 a32f979df6ba..6cdf0e96edf9 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 8dc0574c757a..aede820f6fd0 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 6004916a4e50..eedc63fa24c6 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 3721b01350d7..81f70afa2a72 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 cb4b871cbe15..d78944553221 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 33eb2b2de131..8f91a4b2f6ab 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 2534c43413ed..ab22e3f1dbf6 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 02dc25aaa16b..2bfd9bb37308 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 57c9b3ae8b3c..ed5789d17a2e 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 444368e21a49..5d5d8783a324 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 5adede5b5cf1..57a0ccb0d18e 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 82c8724ca3e6..a9823327cc07 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 e2fd9f9dfea4..e0901dc6886e 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 ddcb477a1dc4..fd1282908abe 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 3eba5bf757fc..c25835c68dd5 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 ecd5737cf3c2..dab100b2e22d 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 ed626edc4c4c..983d650764e9 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 51fdc2fe8a87..1f7095ae72b5 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 0d8177c8e600..eda4cf5647f9 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 4b615343a05f..aa8667a00ca3 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 221b830fc5fa..fde5f36f39c0 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 1f32cf691ebf..954e9e8bc5d9 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 c6321dfcbe89..ea0646edd17c 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 db2fa3026fcb..5265c4486a17 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 b45d1758da43..df9227029d49 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 898299a7d9d7..5bcbffbea481 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 596aece748dc..2ad43deb687c 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 ccae08accb6f..3a6b9f3760c8 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 9eb396f3202a..0c1b2b70c091 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 5e5375b082bb..8174a803e795 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 2286316dd88c..68be1358f812 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 d23ef093be18..e45fca6de770 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 2b19b24cf7a6..480b5ab5bf92 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 72f02679d771..5fa82163a314 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 affe6cded8f2..c69605b4c22e 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 02bfee1a25f8..0025b9571627 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 f0d750714cd0..a6da3f7c81c2 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 c06f9f005f19..9382c2323643 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 71f3822dfb18..8cdb8887f420 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 055800d23b6c..c74a32e442f3 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 e8be16516d6d..81ffbacc3273 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 fd8482f86b4f..f4bb8884b058 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 86ba7582d383..22e1cea22381 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 1be5d02482e8..289fc5d30f55 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 f30d2a9d81a6..30a08abeb498 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 6a22de2c9435..917eef2e5ced 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 8f0133d97b54..0e8a7b784814 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 3596580763c5..0861fb1f91b8 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 16cf7ad52e4f..ff825180bf89 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 c206f01b98f7..8634d6f7768b 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 cf6e5b4e436f..f78abfd6d0f6 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 9381251ad696..718f0e9efc13 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 bb861cf60b11..5fc2f069a672 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 8e6d070ea3f6..0aaeeb68a52b 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 54059b29f72e..646a664ffc37 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 c5ea2b821ad7..3a1e10cf68e6 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 7769085a0db8..67bb4f468be9 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 0195afe6b392..20a89b5d05c1 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 074d67aa3fb8..c7df8b6de74e 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 359813f63795..3f82cdd09162 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 b652d2391533..e23b38ce8e9f 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 c6faad3aad06..29f1da10deda 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 03dd0340c9d6..ef5760f4846b 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 fbc58697d486..396679885ce7 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 3ab8220b4aff..00f223206d62 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 60717d99346a..822b1bea5b1c 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 bd96a3b709ba..7a7bf2d7b134 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 5093916e73a4..7fe1baef952e 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 fd6089e0c03b..ad44f39ac11c 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 5adc28b203a4..ee3baf4990c3 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 7a67661a0197..167da22b8a8e 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 842115538c9d..608f1e6cce7b 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 4c8209348b37..422248c9eba1 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 019c56eb2fa3..36295a84e7ad 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 81f6961840c1..a74bd9890ca1 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 7695e0325ff3..551cf85047ca 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 2280154c7157..de24fc9fdcb9 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 5bb69a073052..24f3f8bd4632 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 00e098d43e07..a29859b6afe9 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 790f24a230b7..97d2cfed8b1b 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 2d16f1936445..36a12a26a00f 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 7fb0d6c39ff6..c962f968db26 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 70b4ab253762..481bbbab7220 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 c5b9e34edf70..6f38e654a805 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 2e4f3e675c3b..769772c17e7b 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 904d28fb0a78..58509642b10b 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 2d765eb41be0..e5b91420a135 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 452614087be9..527343c192b0 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 587feb6247ce..30a39c894378 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 4d554a0a1d0e..6225eaebd032 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 ac18470c6211..e05de4217fea 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 ba3a1617b9c1..736dbaed7d89 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 317f0317664b..484122a1ddcf 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 05ec013d0afd..b0f5e1f0f0e8 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 b27a79a428bd..062c9d97a757 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 169cc7f9b21e..02e869f4325f 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 680c6e55e566..da11142a3a4a 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 efde4d2864d1..0591ec5dfe82 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 a3a2ebc58961..98da133a0799 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 81ae9553cf01..18c1962669f3 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 e28cbee214e1..531da01934f1 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 50fa1a79b6be..6a4da91b1475 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 1cf388cd8ab6..dd47dad45334 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 bc85a96cea99..7c405e3653b3 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 3a33af2d2eec..da86c0c7b26c 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 a8165ae6c326..452b6794bee0 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 b602ef153e62..a8b063821e4f 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 9ecb3b1295ee..c7f7447b0ea9 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 3b271775a385..07661f4c263c 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 11920b07243e..bae92075dec3 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 4ddebcf20a36..6901bd932ace 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 f60ec04c31eb..c30477fcd30c 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 69bbdd0e83a5..cf8f205a820e 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 ee28a2733adc..4a8b5af5769b 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 c0e34a8df77a..9def3552e677 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 8585a4251110..ec972d6b9185 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 879bc6912fce..c48c847a4e75 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 51d216408d7e..42cad311c086 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 cb7336e61342..f7cba29a7470 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 13c72abb1363..ded535acf070 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 4689ce36a78c..f730f2ea1244 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 aaf28d6c132e..f2c0d1256134 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 32bcbb111169..32026a22a161 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 90b59f96e5f5..85718f411215 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 1a9822e02fa0..13682923a94e 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 58f9dacb3bcf..075dd148a878 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 eef2c1fb20ab..54bd013df899 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 d900f8ed9ba1..73e7e9bc3b9f 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 53ec3b065665..3da415edaaf9 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 5bd52d44a582..c1c62d207d60 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 6d6eff4864ee..257b67521cf4 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 7197a4fb91a0..781f8fe88d4d 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 9ed7a5d210e6..a6e53c06e319 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 51e9a54e48ae..d64184c10125 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 e16b86f95792..7a23457e62af 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 ef6f105f34ab..12d22c330ae6 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 1b0e1c6c9e77..5bf92f966f42 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 b7a976a0af69..7d874398d30d 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 caed762691e4..51e85931dbf2 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 359c75f170c3..73cce38c94a0 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 b7cdf3987f1c..fdffb72f64b0 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 59309a7f2888..b22e078a309f 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 74122cf00a9d..ba4c39105858 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 4303fc7952f2..1326546e930f 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 cc6dc3834690..eb8bf27ff837 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 36f716019852..1aeefa58e020 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 35dce2c62171..40700c610f33 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 d47c2137725d..3943a66c6e71 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 bb14eb74b3a5..0249fd9bbb0f 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 3dbac7945b6e..625079c3fbc2 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 7d04e0e0fad1..a5b03fd3c90e 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 39ea2aae563a..ee817f16ace7 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 7b958b98b414..c7c15e66fc04 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 8258e2eff521..954695d0aa8f 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 3912b854747d..5ff06b1c3c55 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 e788ca5ff49c..f9c062fc3631 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 614f18972912..c53fa2743821 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 e8eb98102f47..c933765c9103 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 7375cb6d3a0d..8a82cc9e220e 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 f1002947fb97..3c6b847caaf4 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 aebc77d265e3..54d55ee67ca4 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 149c020f9cb9..0d7b870d31b9 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 6ed8bef956a5..b578819c67b7 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 fedc814b0418..645a136eeb4e 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 76ed827d5973..aebcf43c4276 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 c9941d1c5a00..c5485ebc9b62 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 b3c59734e036..937a1c4bdf77 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 51c9a42b3f4e..4087b2926481 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 a656332698c4..972aed87d34a 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 c4d81bf83a3c..f5ab5309e2d6 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 1440d918c50e..e9e43b3484aa 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 63e93cdff7e7..92f7d996882e 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 7c6811d81eea..e58d878c3db0 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 1004303d5c13..71b881242197 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 e07fe9e98ecf..177e8625531c 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 815cc916b41f..36b3f2bc9ff6 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 7577aee3fb7d..b355739f70b3 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 7d43b575d2f6..03e808fe7a67 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 00ccde1bf996..b0c8d5f9b998 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 9351ee53f075..c68f8c31ded5 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 ebabc3fbf10f..5e40df271164 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 9fe0869cad6c..b4a102e8efc2 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 93832ef7eddb..5bc1644d74ed 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 07f2130bab56..4090912f528c 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 7533844fb435..e0e59b6c6adb 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 5341c39a975a..0e167b149f38 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 0ceb62d449a1..365ca5740065 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 73c085315990..fa647ea0bc78 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 6025cda2f5d4..ad7ed5b283cf 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 a85596a9fee9..adb286a21d21 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 ac320cfc679c..328cd8d2ad02 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 2ec006da359d..2732fa5d466c 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 febcd0218426..1ec3456a2655 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 faabf6ee3f16..3a448ad411bb 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 796f82e779c2..96996af0bd2d 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 4a3195174df4..e5a3d54c5d03 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 45b18d56b1cf..c377fd2d1450 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 24711b966b5d..900d5ef25504 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 911934a22327..4b88255bc364 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 4e52b8e250b9..c9f3d7e8c226 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 df8290e5fffc..c693a446eed4 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 afaaed2ef6e4..fda848141d34 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 ab2b62aa5aa1..8ca0555e0963 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 93b68f018e4c..71df83fa350d 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 d63d643c4e70..b2639e2533cd 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 ca18cfde4f2f..e8a58df384ed 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 dd5aa0dd077a..ec874e3753f3 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 32cb4f88eaef..b6bd5567fb22 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 6cfd36ba9e84..5d827cf8df1e 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 bf9461600757..8326187838a2 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 89ba26dfd6f4..b9100ecfb676 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 3b0dc096f58f..67c371aeaace 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 6777631484b7..27cf35601fdf 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 e1588aadab62..e0e086ea476a 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 c1f667372f51..8d74d73fe2ec 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 8119df0c40cb..bb2bab8f2678 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 b4eb80bb5164..9db82cec6356 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 027b701e591b..0c8f5f324a3e 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 6aba6b89427e..0ec0cd225969 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 84a5abcf8b4b..65cab297af71 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 492f84f56c3a..5dcb38d7da9d 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 a0ed5fd1c8fa..96f66991e041 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 096ce97ab048..bea5faf7253f 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 f53ac4aee66b..8adb68deb5b4 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 8c6bbe167264..53e3b4524d60 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 7b91c06819f0..bd80d31277c4 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 c6bf6c656027..7fe7fdd97584 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 3065c12749c2..dd408ebb77e4 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 e42edf1d4af5..9af1d318eb06 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 196b5be2dd08..25879d17027b 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 e8fecf825fa8..e4a3de79ec99 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 67439718bd3c..4a7f042c20a6 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 352e91d065f4..a88432ead753 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 be4a10c0ee93..fc05488e44c4 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 0a42a5b5ef16..ccd6c6786601 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 4f864807752c..db3407a7d55f 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 100b4ce9f74f..778e06cb3eff 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 b5adc2e55721..6bbe4a8d0d68 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 6befb9e95659..02a3f48f3b39 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 238c0d57a68d..30f2a9b14306 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 7edfd0337945..f4d7a77cd6ef 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 d12155f6d81f..dd582ab7fba8 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 93f364047e9a..4bbc598fd688 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 e31bc91a00aa..9f91afb59bf8 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 d0bbe76ef3e5..1470e5b691cf 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 ffcdeb52a042..57423ad61b21 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 1021774fc5f3..119a48d5d652 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 6809773237d2..38dd3812d689 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 84988feb6f57..d402d2006177 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 fb383cc57a69..755ecb466ceb 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 a58b178287fb..73ad5d701e18 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 a2ddd5374c08..2183a8c110c6 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 a36f26f02e9f..31dd83ba6883 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 e37fed9faaba..f65952e00f58 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 e209aa132208..c83d7426e47c 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 1e0fbcc1fdf6..22b210eb3fab 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 d63cd9d5dd60..2bfddd449b9f 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 e6e840dcbab6..e806686f965c 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 2482e1878f59..47e2072461e8 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 e5f79d780511..2fa28465bdc3 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 b77f9c342135..1109a82b8d58 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 874f4228277e..b44e2a8cd37c 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 af747cc76e9a..0d4052f73cf0 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 88a5140dc752..dfa048e20584 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 3657e61d4253..ace078bb1d90 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 ed86b31b8bbe..719f660400ee 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 5b7965e9553f..faefdafb4c02 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 841be930b774..d2a217257e5f 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 3bdc248ff0f7..e3fcb530bee6 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 855a82d2f9c8..519ead54de4a 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 553ba69303a6..7f479fa93708 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 f1f4ee28093b..ba8ecc4d83b3 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 c3a2ae679bf7..baca1567e1b0 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 39c261e1162f..1adaf2b0379d 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 e991bcc1a024..4aab2ddc73a0 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 873d2bedd4d3..d540bceff93e 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 ccaa6d8edcf9..b8a8f905e8b5 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 daa8e9f495e0..8080428d5631 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 3844ebcfd30d..9924cd13b0a7 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 84be333beffe..5c138b75de73 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 d6ecd6b654bf..49b31f28f8a0 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 d336dc7c6a08..b71cf38cfe81 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 99b8b7c6012c..84de427a2006 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 96ea115c877f..d2f447a595c9 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 f0a9ebdd08c4..99f3536e533f 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 b271f84e9ce6..1edccf0f0372 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 40df85b1479b..ba80cc49477b 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 f2607eee8158..2e3680b76c86 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 1bbc03e19baf..d41e9a343a5f 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 319b8631e8dd..33fd282d8320 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 d5f94ab54e30..0cdd2754e130 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 0d0dbcaf40f4..48a8c4197241 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 f83def210601..9bdab3ad02c8 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 c5f38d815593..e4c984ec6edd 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 8977ca68efa6..51aa22d1f306 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 530fc676f7ce..975eec42fd05 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 ac31b49a1e99..928f4d012b45 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 4b6b6e072c09..b3adc80cb8e1 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 eec9e1f8b4ae..e22841e76f39 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 575b38fbc951..049beaaf51bf 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 aaf5be8cf748..d9a75c62096d 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 0450fe8abbd1..1c74a6a43b8b 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 130ff3d4465e..33e4d54f5579 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 faeb76496369..ca61fa536dc9 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 eb94ee48f924..010310fed8c8 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 2d75c12140bf..56634544bc9e 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 bcd82c679a57..35cc9463aea2 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 28d57e92c373..495d5ce94958 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 87768c28cf4a..b45c72cd9bdc 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 079cc0a16db9..0cffc35f3444 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 3d7f4695ca86..0485119522b6 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 5aaf4ace3f82..a970cf1980a1 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 048e1e5e9b4b..b8b5844e1fab 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 6ab1f4f47dfb..032106647e0c 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 b85f4a96a6d5..dab71253364e 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 28d7294ebc88..824ac6f5f024 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 571207bd7d6f..ef080c5ff4fb 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 5f7e357eeb2a..21d0aac260de 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 93c08f0b710a..ac07181e0633 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 22782032ebfc..440f2a002dea 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 95b3406f0b57..014247417a6d 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 5c4472c7aea6..4a5b7f1315f6 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 f0c988c01c2b..f66feb4300b8 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 e2623ece84ca..6885cffadc91 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 f035432ec99b..578013469056 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 74ffe2ecdb3a..ab3b018e759a 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 0840cc4404da..1f4521f568e2 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 60f2a4584899..06ac261ec10b 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 6f9a353207fe..4d9e587fdce4 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 c23ff8c94958..c6557cc10d66 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 f7479152ebca..24d7aec00e7b 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 286214eb8ace..9bcef9914d15 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 4ec533677d6c..f9cdaacbe3eb 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 c9c6135e2e66..2c453594905c 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 1fc7ddda023f..f4fb3e46e92f 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 3f56cd4796d8..2e43b702fae9 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 92a3f6e0f7f6..cfef03adaa47 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 7d4a7c708ddd..616de521ed5c 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 19d1cb89d4a3..aebfa0376516 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 f01a3505ee61..478dfb3cf414 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 cb7b93e7cc65..a024e5e585ae 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 19b48579cb43..bf4fb45ed928 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 9075a34d4108..52e2745f2d6e 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 c25639b7213b..f500e05c572a 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 d7afd61bc8e3..ab4814808326 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 ac6a07eabe1c..d211c455e163 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 53784ebb9fcf..204308dc9ec9 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 0ee18ea18de2..0444f487b115 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 c49f3ed61783..8f7dbbd9a084 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 6914a1c6b6d1..c2dfbbddde47 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 507478983f68..02f1945f5718 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 41937a557ef7..95019a6f2227 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 0d750da79e71..a1f939cadca4 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 43740bbcf1d5..b076082a5f41 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 af95eb95df04..83e3d9bd5da7 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 fead2254c75c..f21cc37a35bd 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 58a909641215..d5e1a973ad19 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 064d32a70842..7f8671a5a658 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 1d1dd660e51e..40b7e5b73986 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 29490fd48887..03e688ec50ef 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 7d14c9ad9b73..c4b5824fb0a3 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 268af351d087..757d701c15a7 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 7a3d9d60edaa..7cd3b6ac08fc 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 71e2f07bb6b0..16fc72bbac0c 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 07559e414dcf..943b2cae2534 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 f50632ede9f7..c12c5e4c6277 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 19b3045784f8..7d43b8b5cfba 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 b09d4a22df05..dc2d0496f428 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 810fd2641393..71dc29ada10f 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 9bec898611e4..839e3bb3bdd1 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 71a548502686..f1193568520d 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 c8cdd37dd856..928fc743417f 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 877f0e4140e2..7c47e836275a 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 7835e2c352fa..ad2bb7715afc 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 3f725cddc5b3..0932e9d19592 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 3ac8d57681ac..928c179a8b3c 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 858239bb177c..378ea00ee691 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 2495c8f47e7e..d13737cdc130 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 acac32b8231b..910bab03e1f5 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 9250dbf0c43b..de55334ffc87 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 9102730629b9..48fe449c5b3e 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 187c2983633e..6da9f9593b44 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 2fbd5300dd1a..c80c0c88fcbc 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 586d2568c306..c471c20b0a0f 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 48ee445466e3..18b5906120a6 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 8e20640b58d9..a5ec63587f96 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 3085cce3f3ef..d59e46167fe0 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 49f635e0c11d..b1e70a1c5961 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 41494c7a017e..0b4ed21a12d0 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 44cdfffeeb7a..8dbf62a922e4 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 393ba0a56cbc..d8f7d94ab41a 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 a7abf6087b30..0adbb49b14a3 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 3374a9d78b2d..155482891554 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 4e8510e0de53..b01b7f04ce92 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 b47372c90648..6ad6aa0ccef0 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 14671de7e511..39270d767fe2 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 0b4159479651..c6721fab7105 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 0d1dcfd8bddb..5ac4074b7974 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 6b3abcbc76cc..7f29856194e0 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 63d30c4da896..164760cd7a04 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 f79ff3c6efb6..0779e7f229c2 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 36a769fe5292..80d86c80ff0d 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 b9a731489029..6d65fb61b32a 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 465bef1614d4..aee1108d96d8 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 3ccdc78e60a0..3f9246f68fcd 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 92153124af93..2fadd200e427 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 1f26c7babf21..ca780d5cf26c 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 afd0d3b31e3f..3af125299829 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 f4ca2728bdbe..35b7d04d2ef3 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 a292463b2ac4..e7309b5135f3 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 45da3edb8780..98209f5f3b9f 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 2cc68d2bf3d8..47f757c35add 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 1f136b8b998b..37f634a8e23c 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 000000000000..67af899fdffa --- /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 000000000000..2a6a6dbc64c7 --- /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 4f30ea146702..17993bfc08f4 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 668df9ea7101..9818504f66cf 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 e381384fe65e..0dfced34c7e2 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 e1cf2dc53869..7b0232a9d455 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 050d702b625a..807941d9c854 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 72bf43da95e5..3b7b1089c29e 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 c2d2e02ec156..b7d30134b5a1 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 24efadc30551..3718d7fd23c8 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 5ef282c0ca00..a815253d7147 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 8bf6a2f6db39..17480cdc24d4 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 85481336a305..33c4c04c1063 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 e880f876f91a..421d6a53a17d 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 60128c9419d1..ec01db2948a2 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 ab135194a091..f2a65ac88cf4 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 78e965cc4bc7..d78d8a9d9666 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 126323d8d242..3441ae0e3bba 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 199931d6d1e0..af316c164975 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 625e7c3cad59..e5aaf7d2de74 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 f79a846e70e7..fb26239943a2 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 d0ef2dcdd286..08a7aea16279 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 0aaa4e4c6841..de6ee5983c86 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 4e969f6ed83d..af4fdc48da1c 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 e7a48ebf6ca9..b466654814d0 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 cf6c382a692b..ad98b2db414f 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 f336ac4f994f..2596b321bfbb 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 1e401b7e92e2..a74d3175a380 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 c91b4286b647..ec17a5afbb2a 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 2f6ce430b35e..fc446826c341 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 e3498cef3771..3aef0b897e71 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 0b7551b97af9..8d5ebbc77440 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 5cb8ceaca086..cf734fb6f68d 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 c463c6559386..02c455f01de7 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 93183062d61b..6b20b6e465ab 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 bc2ddf85fb4a..75474af46aea 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 f050bce87406..f5b7e8a74a43 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 96d2663500ef..ab2e43c54d85 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 255b4995b640..fb0016ef94ea 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 d2b0c01545ef..51c0aa28c2f5 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 6e51a2b2e027..7f8927c4fd81 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 1362fd8ce4ce..656547c976ab 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 c4695c942e14..1b058707d35a 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 e89332ae31a5..99f0c83cc87c 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 a8e56f648e2e..a6261a046e6c 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 4367596c6ea8..cfbc39fe9f44 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 6390dc3a91a0..810b9803abd1 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 5f4379325a58..9cdd4c891320 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 8a6dfe76d606..e43201fb10b3 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 bdf7cc57a539..d3190d66bd31 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 c78e94752335..0453a9219539 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 1bf079e24cae..a89cad20f971 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 23ef975cbbca..3ae51a5a977b 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 9acb1ec5e43a..9649f4844713 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 4fad75b9a3d6..59253c98079b 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 031a35e2026d..22d5eb6126da 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 ec16469757a7..7fe18615408b 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 f95c6b03e014..daafba71ece7 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 bdbb52e974f6..8b193430e9e9 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 805c0d00de5d..d952ebe33a59 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 85e0a840a196..397e4199bc05 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 0340f39243fa..3c29bc761553 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 46565f61ca9a..92ac0dc81186 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 d95a40bd4a01..9196789ec633 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 db1f8f8d5884..9dd6e6ee643f 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 22eaa119f246..c7c52f12a4e5 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 4a8831dab956..6eef44d8e590 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 fcd855f862d7..cd5121d7d456 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 139bd9a07397..adf442a266a8 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 cb77f89fb2b1..d83320a2cdb7 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 4653fe7375d3..14ac4a9ff5d0 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 e0f6ab1321f8..b0e0d8aeb563 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 4f560b065f1b..d9aab5eeef50 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 d45aaa843fb6..b0cab97dd2db 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 1e48878f632e..a3ac663c5b5c 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 ca819ba39a20..4ae4b41b7f04 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 8fc963a85664..2209c56048e4 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 20f66b4d45de..da8b0068882b 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 59ddb60c9f23..52a814e96ebc 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 7d5acb95751e..a6848fa8fb24 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 92943f6c9ecb..f6804e6a01e4 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 56ed57a61a0f..b77039f7c566 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 fc8a075540b3..a63fd97eaa81 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 b87ef3baa4aa..800d295a7543 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 f6fbea821b52..eb082d35f289 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 5b21c083816a..d5d6e67cac60 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 f02374d8e11d..90d09db338fd 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 2d0b837a946c..7640898b349f 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 8bf2625de6da..00913988ab6d 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 39bc30bf2945..d46c5abed436 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 a8d5849a31c0..be70f0501110 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 42100edeaa71..ee4e2232c70b 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 1b8caa3f8ac8..5776fc4a2e34 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 b52939ffc119..15be5fb3fac0 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 4544eeb6e196..9dcc02585963 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 81bfdf0fcc76..8a4825e5607d 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 aa40da12b875..891b0bf06509 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 22b80fe2f383..9781f6e527b3 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 f4db5ecafac4..e85b296c983f 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 1a08470064cd..a2027fb8dee9 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 b93292e3589d..ceddf52d292b 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 5b5d86eec2c0..22ed8bd3beef 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 a4b5d18bb33f..3728e9e49294 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 a5ea3b3a7ab2..0a24df08925f 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 27041d55d8fa..f8103228cf81 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 64f956538288..f9e97e73f5c8 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 145893d3343b..be0a6c7b8d43 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 14851d0f6fcf..1e88174a60fd 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 ceeba30a90f2..cff3c372cdb9 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 d13fb7e56793..ba79b12042fb 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 16512b8a3cd8..4197b10eae52 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 276edeccb22a..6f6aab481fa9 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 8b880ff6416c..beee9916fca2 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 67d0842070ff..e6b2501c1ebd 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 994dc823dfc0..07aea5fbff68 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 1242ae307d39..2369c35dac9f 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 0b20e1945e6f..921e7351c0fc 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 6b879af5aecd..147b70d0cfbf 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 53fb71ebed49..4efb0ae28d5a 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 da238205b402..f52e9c2e3fdc 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 27e599c6cd52..f049cde60ccc 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 0463e22b3c2d..ac0d4f6e0997 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 85acafd88f67..8add3a5f2b6f 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 4666b8a33735..1403ede4a717 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 640cadcc8e3d..b8c8bc0c70af 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 86866ac2f7ec..1487cd651459 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 0611fabc15c0..f20f4b98437f 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 b3a882ff089b..d5c7069cfb95 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 e3b1550d60bc..f2899ff3dde0 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 96a3b197f461..f33620a01ef2 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 be1a40cf779d..682a998ae199 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 3c61d0090e42..d3240046b85b 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 965613c114e3..6319aeca370a 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 53f46478be40..cba63aee9b19 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 77c400d17bbe..7c62fbd799ec 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 14603a2c71fc..1326a1510e8f 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 7879c144b109..204eaac4b1d8 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 86232683549b..344c9dc4f6ae 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 b742973ce327..f62984cca660 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 e7685b589ca8..3d37344ae961 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 d4932d8333ab..9dc7fb8dcead 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 d598744f145b..9a2edd806073 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 64147e11f1c0..f751801d8dfd 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 ea6598a7f6b3..336b6f615b42 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 ee05dd5a31d5..1bf3ec0bef40 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 6c31ae99b8ee..cd88cfab4254 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 c566e79620a9..bf3826156b1d 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 5b9576fcc7a5..abb1113ebdc2 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 1d70860c7cec..70aad8cf57d5 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 21187510ff0c..11e94f1576da 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 84a1b2a5b83f..1ff5c9007f4d 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 33a1e9932b5d..aa69a936308d 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 7207ac962953..2ddb3c452cd5 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 2324f1e1a652..f23635e59cd5 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 77b5ead26337..65a9a32b2bb0 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 6d42df218fbf..a57e9b932f11 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 01510200b11b..08d1055c6130 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 b4f3bc4b294b..80bb2b61ff6e 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 773a9bce1adb..a819dc4a5ab6 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 9c4405aa8ac2..ef9c34c41a39 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 6daa06fb12de..2da5ed1b5e91 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 ce52d15ef1ac..40a0f878285c 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 1e8d05e3d269..8c6552ad1635 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 d19605046e1b..ad2390c2ca01 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 1ef09d7195a9..71e99277a752 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 0715d16628f8..86c8cfac8146 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 6e6d7432277d..97b502004f51 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 c0f5d8f90532..1dff5f0bc87a 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 103af8e1f1e0..f86a2a3b7e45 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 40a2718e4e5f..04f7d8f051a8 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 0367c08099a8..284b419f5a1d 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 bb35a9b2d73e..f30fc5c8e64f 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 9c73fd2204c3..85f0fbd5e4f1 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 2e81f898d0c9..4816b5945f12 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 c2474d0e7721..395d06127d65 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 9f8ad9bb0504..f13ca0c4acb3 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 23ddd2cdca25..20474fee4d8d 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 431cc2be5d20..f4ca2d13d09e 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 4f33ff9a8a35..c41ff10fe56a 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 50ecf751a86d..512327c9af45 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 fda825bc65e8..59909d8c0e58 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 16add6ff2f68..507ea045b4f8 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 1f997d37122c..fcb77ab04786 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 8416bb3a3773..5ed2be84a569 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 e936f921a820..407b0b391b41 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 b4555a1809ad..af445e56fa0c 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 7e8820cb2c65..5d699a133857 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 9b80664b04e1..8a2fa4685771 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 50914b1de53f..1354b4ac1881 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 0577acc572ad..15b867dd5e00 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 49d5c0390bc1..f952235be981 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 acd8a25dc533..e41ab2692111 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 a412a58d7c59..a7261ebe9365 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 f60f6f3e8087..e3fd24a088cf 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 e6c57ca3f711..dd4cf54040aa 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 a0a561ab2d21..0575c29bffdb 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 2938c084537d..9bf6532a7d38 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 770f7a31c764..553bf51a53d8 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 b5ceef76ac20..8a677603aa9f 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 f51c5f20f167..1786152699ad 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 33ec2d27610e..6f4edadafee5 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 be6a6bb8b175..410e15d024fa 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 424feeba0c46..f917f93a1c82 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 053ebb621a7f..d82eaa9f8ea9 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 085bb09e631d..d91f9a16a07f 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 218275c4d99a..b9f21792816d 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 9a85a50ebd9b..6256ab17ec6a 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 c79468cadddd..be9e29f21504 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 b5c4a7752966..a0dc4a896668 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 6eb81291abc7..93b584c6d35a 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 04c10a5f79ed..4229199fa43a 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 76301b704c81..e934560ddaba 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 5592e613ac1e..0d525edc1332 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 ff41ce6c79ac..4862d7a4125b 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 fb3503937cb5..c874c649f333 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 24d2dc645519..b04b1e0c3262 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 067c620f5fe8..e06ee94a1e96 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 8e89545b8f40..a5c14be4c29d 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 61794e0bfa90..5b49966d5445 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 1d70f2f84f29..7868b006e27d 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 84c231562f1e..6645f667d7e6 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 c7d196a2aa6e..b90656a0b41f 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 e84300aa331a..07e1c3727f98 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 8b112c7961b8..7cdf2df5c8f6 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 292d97821cdb..c47f4332aa3c 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 071008f9eb6a..a41337a19a37 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 61ad3b8c17ab..2f4881de6723 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 3853b598a7a7..49adfd55c683 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 2de72d54a481..0f1f539ebe3e 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 5bf80bd74b84..1e52922d0793 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 acc570fc8431..5d13337c1c30 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 bca2275b1a95..daacbb2851d1 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 dc95a80915c4..7698b3633357 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 5182cdc8940a..ab3be302e640 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 7824585162e5..e5de95d04e54 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 c959e68acf96..4bd024ef5f40 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 bcb49e513536..17286e219b86 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 0a2bfd5f68b1..cd3375658721 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 4fa831715ede..910f3f8b9ae1 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 45dbbcc10844..f4e2dc092f87 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 f9f4c98102c9..6de5eb5c4c6a 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 9f2fc49423e7..b3b38cfadb55 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 c6ecf4807364..678b32c6a4e8 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 69f4de43186d..f39663adda27 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 911467ee54ea..1d77dba24b1c 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 f89d1edd6586..13b7d4bc5199 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 ad4e47b7b2e0..77dd91d6c282 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 baa161af76ab..75860146e745 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 1f23dadc4322..96e326e02ad4 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 3c4f9a1f5ee2..52ad3e3cc042 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 cfb7a37af011..a7842f16fa7a 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 1629d2e0b673..48258b97ccc4 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 ea26355aca8f..d3999af77663 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 29491e0b39e2..231ad522c8d0 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 df06f655d9af..c77a0c7c97ba 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 bd5c97815f2d..97339a887bf5 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 8542174d0c09..a91068ca05ae 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 a6e68e1b7101..35c5f2ae31cc 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 edde6244ed1a..6caedbe719e5 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 7a0c345b7ca7..eade190a75cc 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 4f7168255cf3..6592d2acb82d 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 80cf75d2770d..8df2bf55264f 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 ad922f8c9088..0b2c1949ca39 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 33073f05f697..54138d158904 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 7e6ba6ae84a8..07462951e1bf 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 956992a1e777..d554c19ef25a 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 806680206995..edfb3705a7dc 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 430d3b89e7ab..5e65caa6aea7 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 60ba6315558d..bdcc202443ba 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 a6c3efee6116..ba30bc1e69b5 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 4f8481315df6..a80f9ec97764 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 86e3cfa1d9bf..9ac96d0b15bf 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 383e830a1b22..8a447ade068d 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 9fc0e28a8fec..5ea9f560ee42 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 54dce0f0de40..a4a10e503be5 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 c082a2f25ace..61ea82871b23 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 957ed43a2e23..6a68020e4182 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 47ac79e0dbff..afe6e0aaffd3 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 32c14703d25b..a0feee4225a3 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 34af54ccf4ae..0c55e35a993f 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 3072deb6c5a3..418c149dcc42 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 38a41f3b8d73..8f5ee8723fd6 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 56340e515b97..09ceda065b9d 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 6cd3781b7605..80c5a8fe0995 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 fe867ce1fbd5..312491fee241 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 429b21e8b8b9..d3cb1db8886b 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 5f02e642defc..f0e20d67fa6c 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 0ee738c2c2f3..799dc8bf0899 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 15711da4b0fb..e9109ddff1a7 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 2e104b599bd7..13fcf77dae67 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 5f244ea89365..90efaea967a3 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 191cb4c7236e..c194cea2e374 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 a7bf9b67d453..ca3540ad20d8 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 d3bde3cea639..3fa28a1c6e92 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 1a800b6b7f28..fa1ddeb0176a 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 9b1825e90428..eb342b303f90 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 e9923a81bf63..e1476e415d95 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 8c1963455a50..6d53a0ac6342 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 2bf127ed5e83..68703333fa87 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 bf36de634a9b..0c006ffdd728 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 bbe3aa31a98d..6e3da1236db6 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 47926e27f0c3..6f973739e667 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 18697a79cffb..5143836ad6b9 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 2f899f8c60aa..0cb0aeb824ed 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 a0b949e1351b..3106c478d00c 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 f97e60daf43a..3abc81e191eb 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 3664d76c2038..aae56e72b050 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 ae416bab65ea..f3ef014b67b8 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 00f50c33e1cc..d10baf59b07e 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 16f7df1b3634..c7a37a818485 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 5ff7b1242db7..8db7742174c5 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 a110fa4e2cb3..746e4cb17094 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 77effcb00658..77e3ffdc47de 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 25ee9a1490e0..27a64232629f 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 f3be542e40d7..2a1713ab8df7 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 aa85b55b15cc..196ef395c403 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 bedb103cc4c7..7791c8f07848 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 3277a83c4e14..8d55260c7c45 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 dc3a57ae793e..4fa6766431aa 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 fa1328013db4..a69f23939f94 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 3399bc0018e5..c550af21f075 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 465c9476ba65..bcd4d1090a41 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 fa73ff23f9cd..1c25449822a2 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 3d5a31e8b8e4..5827eab84cd0 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 c7ee90ea73fd..fe5106c57af6 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 ed2d9a3de00f..881810e9671a 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 695337ea82cf..647005bc1c97 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 26990b4305f8..059c248a3e80 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 bfa3ebcd6d28..11ef92367ca2 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 f0707b51bbb6..0a771466e1e7 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 d26343c33cfb..f79a8f1b5710 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 0cfb1a55bf27..27c1eac88e57 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 58d86283f908..7f833839d566 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 1bb6aa40f06f..8c88a4b82261 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 4e0b18e72338..3bbac007b4f8 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 466e6dbabc50..cb11832d06c8 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 a3b17755facc..9c5f5992adb0 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 bfb487649a3c..0042d51039c7 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 17e38c033b16..e19838995eec 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 fa331707be46..a629a91bb906 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 815fc0a719cf..3b41665cb4a0 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 74506979a28c..e023fc363ddc 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 27e7fabf11ab..da57f3ff9d10 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 0a6d71c68ae8..e3c1aed24cbb 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 106485e04eea..840eda0513f8 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 ae724f9c3cc6..a3b19708899a 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 972c24c23b01..322555827181 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 69cf920de947..377b1ab10c4b 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 c3898afa967f..8dd20fc2a744 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 e8ca5ccdc54b..c1d88cbdf837 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 fb464b7f1e1c..6b452fcdaf11 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 9a6db588c8bf..e9e16ce951b2 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 08cc24b4b3fe..0cb5351f595e 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 2652bf5988e6..a70926678e38 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 2652bf5988e6..a70926678e38 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 d985e3bb9ec7..2784a6036443 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 f95d34eeb299..e5de7ba3c623 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 3f184a67fbac..8b71e5ed1b2a 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 98f8d5d47338..3e72eec4ea8c 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 fce9cac627b5..1bae9f487a17 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 ed8cb042b3ea..64fd2f01a5d6 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 31fe494dc795..8946642892ff 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 0f0c49749229..f50b985298d7 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 ce8b60725957..b87c398da396 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 2237bebd788e..5e763b0239ae 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 ff2244a8e31b..3ff73bf4681c 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 52e96d013a26..21f1a9515a6a 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 7c4e5c0f9a5b..8bbd7fab569c 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 f979db11b7e2..62fe1581bac0 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 8b75e226ab59..35ed8158bc2e 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 16e3cca7b771..5f9e7d295bae 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 7892a72c7652..5743f9984be2 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 f5e99002bd08..2ddd2535c727 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 587d71c40fc6..f46ec4b927ac 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 672aa4be686a..8aa07cd5442a 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 9c751064688c..b53461d14df3 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 39cf82053f7d..8d7224a60c00 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 31e04fa6d5c5..3b7f036dfe7e 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 8a6ecfbb9be8..2d7c26074cb1 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 fff80f9c855f..bcf0ed35137c 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 a7e3ef3b39c9..c481b3d853be 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 a7686f3b08f0..8df0eeb0eb4c 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 5496d0e5fc7e..71b5a48367bf 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 b8e2d6651a7f..2d3db4fde722 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 26c227a1edd3..c30eaf8fb1b4 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 1cae776dd68b..4fc2e6c903a9 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 3ed8587783e4..0dde2b12b879 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 73aca288faa8..be8822121a5c 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 f8752fe1cec0..b0763fd1033c 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 3cb1eb32952d..981fa2d12407 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 0f79b7ae7b8c..56c97d5d8e97 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 81f0328b9ba5..1204ea286575 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 cea02fbe15d3..787cba4b056a 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 5c278bff90bb..4fd70c0bb7eb 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 dacc2c616b8b..6d6779ca6bd2 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 6d4cf6fa553b..671a4dbb0c77 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 b5e97ec1c1b8..1d7dcf2e3c5a 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 20bbe1d89e45..8874fc57eee7 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 e19f5ff1bae4..f0973e435f07 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 1286613cb13b..c32846796f8d 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 c64475fda43d..60190736963f 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 25fbb6cb9069..1fa272117e9b 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 99962053077a..ded9b2355e49 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 f44c2af803bc..0abb6db4694f 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 a386e9f40cca..7a4d7d9a81ec 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 f76965bdd3fc..625a6f9592ab 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 624e0ff22568..683ca886021a 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 bd8addd37812..947de10ee4a5 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 8fc0efb60b75..ac406837f908 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 bc2386e5d23d..9b3f6d046b4c 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 9f0c4d96aa5d..3106908c621d 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 a85335438a9f..4897598fc539 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 a80b40bb4695..d0370d71610c 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 ed222b3148f4..df42b80cfa47 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 f3f44433ccf3..758e5f9d98f6 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 3f7ddf93f069..2af9b8d7088c 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 0206927cc59e..659ee34c6ea5 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 03b70383e541..4b749a705771 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 f21ef43fb7cc..193ed98daa9d 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 dd9d986c2089..03a208b8c265 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 1f87c9b99925..33d43c5f526b 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 12695929fced..9adf20c21d57 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 69d30f369e97..24f4e8e4175a 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 099047251ca5..cf53241407fe 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 bb5c7552fdaa..335fd75d99b7 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 6bfc6c80b788..f1febee43bbe 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 b3c36e7eebb7..072d615cfa9b 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 1148e34ac675..72f6a5501e83 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 c9e4a5903d93..d24649858db0 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 1b0feede34ec..ec43471fe05f 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 50ec1c6148a0..6f1fc4c210d9 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 ce461810ec99..75197bfc67f4 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 3c5fe8a55027..a5fe83a22dcb 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 a6d6125a1b9f..3cf3793a8c93 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 47a8fc0902d3..c790e423a806 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 a02684ee1de1..5407702f7c51 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 1213a883ef0a..dda829d8af42 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 8b18e4ef9e74..910e004ba317 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 0a358bd16438..5be7f184a7a6 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 043bf06a1f52..1378556d4534 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 72e4559d31a7..25636b9063b9 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 5899b703e7c1..732f687309ce 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 acc1c6ae1225..e2141c0dc136 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 51d6ea3f7a8b..d09a744bd7e3 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 cd8dc486906b..72e429f7ec7d 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 ce1f2a036476..c1557dab47ae 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 261bfd60aaea..912fe5ecc5f4 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 d064ebceffd5..682508f92808 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 df03b191a99e..170597b4bd5e 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 0151080eeb44..cc5b10c544d0 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 5cf01ddf5d71..4506a8effaff 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 efe77f90f065..8035adbeb03a 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 74c910ad0bba..6dccf8113d69 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 006e6f490f06..823ceb211a36 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 87cf3a487bf4..23def1c990e1 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 bd1385e5c334..6d68d95f891e 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 860fcc8df210..0c3a88bf8712 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 13b2fe9c3d1a..e0d3633e5c3c 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 8aa9e952b990..3b1032c03a73 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 912c7a3314ac..edff1823d09f 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 d993ad994597..42b4f6522345 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 caf0266cff15..34d49d0e0fec 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 e90c1ee815aa..cd38892a4704 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 4e2e400cec02..37e5359aec9c 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 b6c7659bc724..c74a7128fbfb 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 6c631fabaa25..e24fc6707098 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 dcf7fb2865cc..9b95e2604c15 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 76fe5471a601..83613639cedd 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 f4f1cea6b817..965e183ea165 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 ebd55e0ba02f..cfefa51b93ea 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 b5f0684bae92..13dbc3f67f47 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 fda81b18d1e9..5bf850e3ef30 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 8149474df196..4003f679fa2f 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 dbb06b2ef7a7..52c24a414aca 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 270bf14c35ec..fa74ffc5bec5 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 a4a487c4dc2e..270a004f042d 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 bbc039bdf5c7..364d0858afb9 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 b8112b20a54c..c225a26c065d 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 f32b3709002e..3265cf4146dc 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 6f8bb24aa69e..b47471c6ad7c 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 5591a8a5864b..e197f94096d1 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 39b41dac41f7..e2da3ebb6ae1 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 3783e2794021..87eccb4fc6e3 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 72c14cd7a691..db4f90e9923c 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 24ae76b90299..58db7859438c 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 edc79f8fd94b..f382a3780fcf 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 ce905572f2a8..34b40693ab12 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 c6a686597e9c..18c02a33438b 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 dd64ee75b346..248050adb32e 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 6364630ffa94..333ea289b4ae 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 2307cfb81c7d..51fc4a370e2d 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 8b55f42f3f41..8e55172af6d7 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 fee54fc6206d..e28d5ab114c7 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 cba079b23152..b8de6d3c5c89 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 53f85c63b533..02e5b8ac2ba9 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 6f994a5cb741..fbd9f0dd4fb8 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 8cf6a3137e2d..7723679dab19 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 b64eb4990713..542eea0169b5 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 38dfca347c8c..03ba826b1863 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 8cb28e9f1f66..bc44e579030c 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 b223aff4e949..9bacbaa6edc7 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 8a1f03241b11..304a84255e24 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 047ec155fdca..7d63895c65ba 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 21eb2c9b2f2d..d00bc1ddd5f1 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 1ea32ed2c4fa..6e3c14bc7ad0 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 e45db18e4074..919f1a8120e0 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 a5ffcb3f8549..7d5228f51706 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 09e06f6d6843..abce5f3783c7 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 921136775b7f..8f87727d7f79 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 1dff3ee6011b..85a940f9f74a 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 6abeac0dd2e7..a4e4cf7e896e 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 d14bb42b2fdb..eb53d12e94f3 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 4df9a5270c31..73023e3c669d 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 34582de45cb9..500c806e91d7 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 01c8ab5a839f..96e0cefb9557 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 79b5b33233b3..144e12eed8e0 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 0df0a64ac965..2f0d1d218f31 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 ee6036b4d673..ba124ce21dbf 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 77fdf9998333..2d2d440c4e83 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 dcbcd3762862..c0766df0541b 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 eeb8fe82346c..ebf723be724d 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 95d3935caa9e..b317841ab6e7 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 16efb65acb2b..19a2c036fbcb 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 d5484607c8b5..0605f20e9a32 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 f033e1b5d2b0..139c1d18d2b1 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 64a365229cbb..a4a197b8cd7c 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 c2aaae1c73ec..d8edd8648c48 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 9a5652acf878..3d82692f0b38 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 93cd0bb3e27f..77e1e91bb5fc 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 76cd6793b3c2..7a08e9fdbe5a 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 e6e7c3a51aa0..fc41beb45ccd 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 2635754f14da..0ff73068e59d 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 c03336ea37af..5b6223ca8c86 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 95a7ee8fe0f2..def42d9dc148 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 f1818f9bb5a6..ae4088535aa7 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 45b53300c5b4..5ef9a1088921 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 713e04774a0e..62fff1344f23 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 e14d79d8acae..894728c8109e 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 b658ed1e9ab7..43ba54146598 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 6f95b30be06a..b25ba3758e1f 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 2d5827f476b9..6ff3cbdaf99b 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 78812df870d0..010ce108e4a4 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 416854d66f38..f282b7731442 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 b1f028fbccb9..f076035c3d5a 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 148cf527e7cb..68554781761f 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 e543e1bae923..f636323d6236 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 2478deeab0d4..ca47dba9b383 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 5c3bfee822f1..5c75dd1d2cd6 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 02945e9dade3..0a9ddf5e2d15 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 c6543aaf67d5..57e9f95dcaf3 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 a5dba90be5c5..6822c6c44b78 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 bccbac2ff160..d3253baa96da 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 55fa89d75070..db10b8e654f5 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 bb95c59d183f..b6332a044248 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 86a8d0963b84..af94964762a9 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 588630957c94..bdb76375e012 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 063826f1d541..7e53695f987e 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 dd127bf7f4bf..82afb1b5e84b 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 b97197317488..c391e87bf8d1 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 43a0a5c42777..a406e4408a43 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 386fe40ac3ca..295534849317 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 5368fef76d0b..71d62cf39ef3 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 b04b2a296b5b..ac7b2578d774 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 7b29aade4133..377d750f8baa 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 d5306d59ed5f..d69872ba8cff 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 39ccaa6ac354..a54a8e1dc65f 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 a9e1acc8044a..7fbad5931a8a 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 531977d6dac2..ae1000c6a47c 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 985cfe871613..c06705133c80 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 1ea0ddc7430e..917760b0174a 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 94a7ecbe11f1..3e90b7c7fdd3 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 171b2a32fc53..8b99296d12a4 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 6f5cc9804917..53b0a40fa661 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 4daaed4366f8..620e00cd0572 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 48dffc921a31..4fe23fff12ae 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 1021d87ca1b0..2244c820d036 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 a0dd881d1aaa..a0ddbc36cbbb 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 cd1df53a5288..9a85d8c5a63b 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 8059d23ffd21..f026cf75d0b2 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 cc8c463b8223..6b3a6fbd0450 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 d296a094a370..cca3d0ab36fb 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 082d753debbe..56cb8b0299ff 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 8f1e6558b15e..901d14465e2e 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 32f01f418010..1c9758790d94 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 d5d18217bd6a..aa43cc10a3cf 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 15868ca86861..80a62946f5e8 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 da970572fdee..3e5fceacabf6 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 42b4b1912e22..b8dbe2db5a6c 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 44fc02a5c20e..c5c145be7e54 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 9d1d86883259..6d03801ab9ab 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 b3ed728a81c0..da0cc2d02654 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 47df06bac6c1..d5b9588d6744 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 130cc39d0af8..2abab3312fd9 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 cd9a423f4eca..84b35d20b742 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 21857d7fe66e..1ba983446726 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 92af341ccb52..f10111835bed 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 edee6cd7b6cf..593661c8d766 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 599c804d213d..29575d4192e8 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 7d851b528845..2f45ed432008 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 fe39370c9017..a58c98022402 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 f63e205c9f82..7985781dbf75 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 759ada248f47..662f186340bd 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 ea724ada7025..38bbd3dd3ca6 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 a24038eb2807..d8b2096724e3 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 f4033862a3eb..978099ea689d 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 2e28839c8a41..88ed6ac77d2f 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 217e8aed234b..14087f5c3c7f 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 4c0d46045e95..7f8cb9fcb0eb 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 e79f66c0e132..166fe343d52a 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 0b1413edf378..0a586ba695c8 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 10bdf2db8bbf..983ae336a0b7 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 c3fc0e6b8a7c..faad0700e566 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 04405bc46fbc..d12929244e96 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 bc1e18b657f3..0f66314e884d 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 1e11789ef398..a3286777c4ee 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 99a399ddc632..db09a6434d22 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 bc6595bb3408..3f671a4944e4 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 0476cdaffe77..379beca50aed 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 7b83b048548e..95e3a0a9b839 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 5282de4b2710..8703cc6a8197 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 6f5605a21938..d9616b9adda7 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 99f3ce447604..f1b9a08b44a7 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 81044cd0529a..9d4440ba4866 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 680ba9f2226f..533f0892b98f 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 fc7649085c36..02731052a6a9 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 703f25dd60a6..7c94fd80af2f 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 ec21fdd4e04b..d368b870f25a 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 5bdab87bf4e0..d998731687c4 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 c9e3594cd342..fdda2e0133d0 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 62e69357e3a2..4dd1ee381d55 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 1fec19bbab91..d9b03971b1ca 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 c8ed28be6f0c..de9af310556a 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 f9b88c6459bd..497bfe9a84ae 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 7709bd9c89b6..4dd810cdcfc5 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 9c14eea1be22..9c2b20527d7d 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 eed3a4b5c235..85322ecac4c1 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 63c342b76f18..466e2f1665ec 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 9bb37c2baab8..c23a2d87a695 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 79b5aa3fc620..e9426e5127a0 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 bc59721c0887..2976df3d41e6 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 bcd6b269a382..9c3e82ad762f 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 bb46498f90eb..201a46a166a8 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 0f785b4e5f6d..3dead2f0d19c 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 10a0a568849b..675e9fdfdba7 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 a2d4d398ce1d..00d15977d8f0 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 a43ad19eca7c..79d5ef5ca3c4 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 26d9d84d8f0c..7967002e0210 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 30723518bce9..4d98ea609e9e 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 3df8fe10a836..ac1236c554af 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 73cd42bf3f25..241a247c8413 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 d18e3f453c91..e33cd480ff91 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 38d096b08e14..9c176d5b1b12 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 bbd8d802630a..06085ebfe0ba 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 248fb83a3abc..8a6cf5b8e32b 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 b782a4fd3d1d..53649e35a89c 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 5d06fcdebc6b..7186a165a96f 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 edc33446d79b..3cc5d0bbd3e8 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 e8a909eecc14..2f3483fad086 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 7e321f2f0cd6..f5dbf43feb56 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 aa4e2f5b8936..7a70a0fbd761 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 696a2dd16576..c63edb83700a 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 e2984e3ca97a..b3a19fa62741 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 5a6465bd0646..bb9644d66ce1 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 fc1ba0c8d677..8577312a3c40 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 232df10f1a84..b78a64394b87 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 88e811583161..62920a86c3b3 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 9b11ca67e477..d1da9d189ca1 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 0898ca9cda4d..cd181f4a49f6 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 70e425600667..a0c16bd1f80a 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 96ac7828c5c3..c086b8d8c3f4 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 2adc27eb932e..30402d51852f 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 a939f4510388..6f0bf8cf5fee 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 be3ded7dd8b4..e0ce66eab877 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 149142f63ae1..b4344f1bca5c 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 4a2f16f11333..33f8da25830e 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 a61989a3e9fe..8ab3b101da79 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 898c5bac8507..ae0afc7dfa77 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 7dbeba53afcf..710dbd8e8184 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 2600ec7c444a..72b0db5da841 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 0c7e7cad0359..cfb430ec5b23 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 42ffb71e3d7b..de2c7557a6db 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 29690e2848f2..e222b79c9d87 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 876d8b079a16..424760c2e663 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 c7aded7338a2..d8fc02777595 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 53aa3556362f..76ba7f9b86ea 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 8561cd830130..59be27a065eb 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 ae18bc55c4f2..3bf04a7eb9b3 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 99a7949db173..e357d3c6cb56 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 5b095675c798..5cc6175d1bb7 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 efb718b786fa..00e07761977a 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 af5a6462e8a7..12911c7b7c81 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 d761c0c823bc..3ee43cb4b322 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 55c8381cffeb..778379fa6ea7 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 8750bae00287..7c6c692072de 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 100ab332a40d..bce24059de8e 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 2a04dc313e9b..30c27f3db51c 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 82555084e418..bb11a02de258 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 dc9e722eda84..f40437c9e78f 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 24626a3b68ae..28bac3c01683 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 b4a083636b64..dc28b86ecee2 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 35df3278a6e3..3c1fd09dc0f2 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 294b405e0edf..ac64ff5d14ca 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 9998bb84ca0c..fa907e3cae77 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 c609a7c6f923..768eb6308ce5 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 457e5ae60494..b9e1af3690b8 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 4f343f3f97ea..17b2a709f853 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 a712f691dbe2..b94773562e81 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 0a57352c10da..7ab9e8c34657 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 19a8bb0f4eb2..d0d44f6f96a5 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 df1c99e8671e..2e070329a493 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 3f90d22ae2d2..ec9f35e05130 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 376b18c15b8a..ca5522a2ddf3 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 6b6140e3a730..67b18994785f 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 9d62281178c4..46a714f1883b 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 a6e767489b79..11ee6af24139 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 ffd5eb9d462e..baecead30a16 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 372f0433e951..5495f663e7f5 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 53c9c0ead0f9..baed03d1af46 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 74a663a53ec6..d67b75689541 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 c1a4c3dc3485..6d30943ab7e5 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 9b225b18d730..8b4ee2a00a5e 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 d863d097d5ca..f8af5110d273 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 ff9cebdf7ec9..a850bde4fa1c 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 c5ff86fbfb7f..11f066130225 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 df2f3b7918cf..6267462c518b 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 161bfaab48ad..86a56c1e9e76 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 bb16be9c58c3..ff13034f6e59 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 d8a0e076e0a4..9caeb4856951 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 45611d6bf5f3..ef1eecb59be9 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 f823431e69b9..a6d4b2605cdc 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 64b2acb03629..ee0e1326baa8 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 fc3aa9cbc27c..1583fc4ee6c8 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 88dff9192067..89bcd54c4618 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 91410c4afdf7..03b3bc172b03 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 ebde155f7765..d13b69aa0cfb 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 7f50d4c9f299..50fb4eb6e6c9 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 aebc5975a5a5..5783fc415571 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 65cb0eb14a37..01054fb755eb 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 c1c955d8758a..b1f6707892ce 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 5f0cafe2ef17..1720109c6f48 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 587ad78e2981..fbb30d43a67f 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 aa3307b92e43..f181f5823326 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 25ec523cb548..241b5205f106 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 e202d4e86a28..20bf900d9f3e 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 121138605f1a..f1cd1451700f 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 118da2723acf..c23187598bce 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 dde8eea45257..406efbd0f881 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 6a782d2238c7..ecc8cad2684c 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 a1828727ecdb..39dd6cb031f7 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 750e40313fb5..d22eb34b7a20 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 405664dedc70..191b752066ad 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 7d75af12bdfb..590f9d17e342 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 9ee0e0747c4c..045f0eaf663b 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 bb4924529824..9f1705cfa9b7 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 fd4e5b409eef..76a4b8372c1c 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 5c6c4a8efac1..648c7dcbdced 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 e40c93116af4..4a92de2573dd 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 b72059b5b1c6..aaf63a93d708 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 dc516fb71c4b..ce780143178a 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 d80e18067e23..ed0bb9f72170 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 f0ce093e07a4..d8d97cd098b7 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 d3e53d7a8926..34091badfa7f 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 251160a0f5f2..613ea9da99da 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 23c8d7537521..35b3fe4f4359 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 06f00de13a30..ff578242800f 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 184263f899ab..8df5da483464 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 33ca6dcb3049..fc56742dab68 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 e8f89cb1aa2c..108a630ec70c 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 274caa1e9931..84a1a6161927 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 6597b9f2b3fe..c4d96a362113 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 a6777632254b..747e4eb917f8 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 3bc72fe7faa1..5d2198f50ad9 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 5874625adff6..bfe31b66e5b2 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 1e248411830c..0d3158c242a6 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 91a8a7c4a012..4333ec9f5522 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 dfc69e0b0689..18058b8b83d6 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 b08fffd6922b..304c176e85ae 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 b715e07f8fa0..107466cd1d9c 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 098fa9e0447a..b6b5750a48f4 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 3543960c3ebd..5290d24fc2d8 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 077f77aa0f40..6ff158797adc 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 e4111157ecdb..4fe7f0595327 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 c59d62e576d9..b61d2dc1945a 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 340e35e1c65d..c4523e8a794f 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 cbe4277df568..1a753f1566bd 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 28de4f864671..74942041f680 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 3c866333d609..d754fcdaddc2 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 7120d6ee2518..d0c24579c3ad 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 b8058c252e77..4ebb07e32f11 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 d81cba627540..3bc02f4c6bbf 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 acdc348a385a..82a79b8d930b 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 5572f1f88df4..b7e677a4a1e5 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 66d15cf1215d..a8d2b7d6e49b 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 6f40a9abfa79..b6a6a277843a 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 657fec2e9cb7..c3208786708b 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 7a5aa9e47d49..c3c598ce778c 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 3c59e1b790a1..3e4dd2fd2798 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 d1ab1be04733..61550c03ec6a 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 cd1f7a9da687..859b4c8b1af8 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 77d3c98dab92..fba82c03f11a 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 5f612780f39d..ddb7b5f852e4 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 d08fc5beb75f..8bd7790da2f6 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 0063719b8528..cc1e35cbd186 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 fb2e5590d216..0b2a3a5b4ef2 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 3933ff20a49c..4c56db72898e 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 281b12458e3d..9e6c3a4a40c9 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 cde849d90178..78189c5225cd 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 ebc6fe141232..a5d7acb2c8f9 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 643126a4640a..4b2fa1dac9bd 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 713c5d89a930..cf986f1d09d0 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 83f329d2a2df..6afc2b7fb035 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 67e30232e2fb..5a6565fe2f1e 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 00568a089446..1338f40208c5 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 f797beda8e6c..a6b5eb15d6c1 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 75b57b621bb5..82f7cc1045c0 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 2e9af1bf4f0b..07dfe7d9687d 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 7e5022817e41..18a06179dde1 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 769e3ae6895f..d2269bf39fe9 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 316887e5e7fa..52d1f27459cc 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 18a99398622c..65a634980c06 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 db8dc6ed4434..ea27e5ef3a81 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 1254b4435f73..12c1df0e337d 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 b37b354ae214..e7791ebae86e 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 f4c89f6235a0..6220d681fe15 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 0ba0c5a72efb..4485ea14712a 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 d6574a3aa2f8..dc883eb2c9b6 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 d058b3638509..dff489d466dc 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 b22cab7c7ffa..81be8d5c7d76 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 ae9207cf8555..2f903ea419ef 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 c12fef083cc7..c8eb3deba607 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 9580f8a7fbc5..aff9826079db 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 2ef7cfdbe273..cc9546be2c92 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 7eb2c6a51fcf..4f82cc758d9f 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 10317a1b98fc..1740bcca4ce3 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 40f6f5b8d55c..0ad01d6144d5 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 b4f44dac62d3..a5f515f5ea22 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 d6d0a80ab11c..3613deb9cd73 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 2b8731ba7096..0bcffcafb4fd 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 147a00cb26bf..02e6d27a27e6 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 a28f198e9e09..7e59141eae37 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 4237b3cad8e7..6c9215d78e72 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 8363e5af4b61..cb0cca544a49 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 78baba818ad7..a015b7a965e2 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 f7557cb492c0..e74bcf945a54 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 7036834c4b11..a099c423e6dd 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 f7d239499439..65c8cfe8103d 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 6cfabb65efb2..a0a98103b2cd 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 d862bf24aef7..35126b3f55ad 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 0066490dfa37..8b3c8eea6164 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 beb37e63b5e5..24acd6a8d72b 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 0b9cf40d8555..88fd8b9405c2 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 6192af82afb2..329bf24922e6 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 fa76aeae901d..778e4a31d15f 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 d226551ef8a9..0b5269df85ee 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 8bc35ab3d379..c5b83e9d5298 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 969289b26e80..1b41a8204af5 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 091419f0c52e..113bf94b5cb0 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 a0b3f9122071..8836da84a383 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 69425b25eaee..12127330cac1 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 8b4b276bae0b..5c6377bf94b4 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 de0eb7f509ae..08bf4461d668 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 99f88bc8e105..35ee36359b67 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 cbb4e14eccf7..ce48b3f86a65 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 fd8a393effe7..d0a3a26dced9 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 9a27bf09f881..da9de87d0539 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 ad5710baae2b..0c5e72bb8789 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 4c2741ab4337..d3e57a021a68 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 c3c9141e424d..9e450adf5ee5 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 3ef1ad45edfd..4252bd153251 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 93477be41b59..b2f946288e8c 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 21d6270b1faf..bd8f1fcddb82 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 0027cd46a519..d15ca957cdcd 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 cfd5e784ec40..ec53c538ea23 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 3961941f81fa..4037bd67a282 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 2ec37cc3a1be..dd5e94df665e 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 95e548428747..f69eee643580 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 d458d7b2e871..dd00ac11870d 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 f02ab355f9bb..6f557ca9deb7 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 e4ec6b073761..fdac0974d347 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 75ad4545371a..7f2e14944e29 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 4392d72e5668..8878a4434c46 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 60776a1a985c..a2cea433a44d 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 929300924821..0e0c08146b2e 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 6f0a98ead887..c97b3c59e0e8 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 0cab6e8ebfa8..841ae8670042 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 050dc9bde64b..b980a34b6f48 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 482dbb04daae..ad0eb7e8243e 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 f0d604835cbb..701b3423f319 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 4c9b2d3c634d..5c50951d7334 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 60b2fd37c44f..202fa405eab9 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 cc1f2853fb2a..0a37cebc0230 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 f1f9bd16ebe1..f79676ccee8e 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 7b6fb92bca96..549be1031833 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 83ef09af88e3..2c48dc712077 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 a24596d242e0..4260170d1ac3 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 50dd66da6dbb..bd96690f995c 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 cf08f722fbb8..a27e8d77b64b 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 0b535fd66498..1ba3b6d5347c 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 5289c4e99dd6..dd6bc88ad198 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 a32c1f965f8b..632320fb3c5a 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 d60181a418a1..ab2e0039e708 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 116686abb9e3..fbaf2bcfa7a8 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 647b0eea86da..bcbb26f0d8e6 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 914047236ab5..3c84d3d5cc26 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 e3540f46f1e8..5c65d7af6f74 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 d544d637cc49..d5cbfc9300b1 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 afa5c8fab74e..36482737704e 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 b15b7428cdd0..9c2426c8936c 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 9ced4667d249..73c50b6e41c5 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 8cf786dbe40b..fbbb68a76397 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 422e8de68564..2bd213fc5325 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 443c755c601c..88537f29dfdf 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 b81aa50d9a90..a5d7042dbf16 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 89f01748fc90..629e5d45428e 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 a562bd8cb41c..73c01ce67771 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 538eee337cc6..3521c39fca93 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 9abc72d98e6c..9411be0e620f 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 27e971b5b6f9..ce373a74cf3c 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 8e667aebaadc..ef2cbfa73ada 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 e9d868093e76..a3235e3878ae 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 0c10af6c43f5..aac90e44208a 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 9cd5e3279ffa..dd642f9b3a08 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 57d6941587a4..0256ef732a34 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 13b2cca2f241..a9d2a8a5dd7a 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 9b63f76987a0..b7e8083a8619 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 fa119c59f613..9f8f63eb905d 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 ff95018065a8..a9d106237b39 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 ee4244051a1e..56ddccf219c7 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 e6f8e4ad3b3a..1c1ed41051da 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 2ce6c4a823c3..3f0bd7bf3b2a 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 b24a7afabd90..2794ff3eaa9c 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 b87e3960fc92..1f9c8c5bc75a 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 7a78e0f109ca..3922aa7aa4a1 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 ce9a1a0feb42..7229c2570a75 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 65595f07dab3..b7fcbb3447a6 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 9cc46c769e7c..19d18a2f9d2c 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 24c05d7bea5e..733eeb69fa99 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 90c573ab3658..c6c0047c929b 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 bda59f3ec459..f959f1e2949a 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 2cdef3fb452c..d5ce6be3553a 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 6b443c8bd907..49541233ed1f 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 30560a95b5e1..245fcf5670e2 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 926e807feb0b..419d605d0c87 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 2ae0ae70dd97..2cd6fb53c4a0 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 de608f73e2c0..e69ca47385e0 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 f37b0b10233b..0a336e9a14a5 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 e844148346fb..74ac812f14e5 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 7216b25f0df8..24fc4d4a62da 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 08b6d4bf554a..0b872dc44d99 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 27dd51de2417..ceefe9b87f63 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 b26f551eb867..88cba64356e5 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 cbb6b398e015..a05faf2a8213 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 933ca0276098..3e27dc66a93d 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 c72d9fbec2d8..56b9079ce3ef 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 346ac4b72cc7..fe1471b13752 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 2ef2f066a6f6..f349a88d124f 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 060b899648e6..27c101df107c 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 5e1b8c635372..abba8a326138 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 b755de30b9ce..67e1015fc8bf 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 2d678d0acd3f..88925115fe0f 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 1b13133b5b97..c083b9288b3a 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 3335ab870f49..6ed5fdca30ae 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 fb0d688a8abf..e9765d756975 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 43ef28b268f5..d07accde8fcf 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 c7270e835c5a..d5ce146394bb 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 191caa78f9e3..f3a8c1b942e4 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 c7f74cfac7d6..41f7cec63c15 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 4c1926387b92..45e70ade3241 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 46d57e0dcfca..902549b31425 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 46d57e0dcfca..902549b31425 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 e9f15b401807..da1a4da03889 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 e286aa9a6139..1228b917bb41 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 aa3ca1cf6de7..4a76f6e8ac7e 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 3561338a758c..e5b9966c6093 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 deab67f725a3..85baeedf2215 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 a371aa93c5ee..312b53432b47 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 5f3ec931c82c..4ad1680d2928 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 08932c333fd8..f56003bbb999 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 5bffe0206294..44c8af9ce8a2 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 d533e394c06f..1f28cb3106e1 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 8ab011661e3c..34b662922ae6 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 8cc5b98250b5..33189038a2cf 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 e5525af23f0e..768c9b3171a8 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 5994961b887b..97f894dd9d75 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 2afbf3432fb4..b81f5177e1c7 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 99d1b792fea9..2eba1a5e94e9 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 74baffddd8b4..c6c453e938a7 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 504f27811564..0126f194f697 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 1db53d77193f..b6c28922b227 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 523a9d7ac720..2b04619e23b5 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 b5f1e7f7449a..2c9ad0c925f9 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 6f533919a474..9c963c5322be 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 8cf98e154eaa..8ed5da682208 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 2875135424d2..25cc3db77fd4 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 c725b3238ea6..14d6eee9a2a8 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 67b49b1ba2be..ca56206fbdf6 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 796f9d1b71f7..633a356aa9e9 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 021bcb401022..166a3da1518e 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 ba358628d15d..5820a724d073 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 dee376cc17b4..c385493a65d8 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 78ec8aea7248..40be4d195d4b 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 3145c21acc98..87b34fb88a5b 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 2767f178fb66..c75db459c72c 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 a171567c5d2f..0f0ce40a1edc 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 f4faab1abc28..ef6c50ff5076 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 fc8f480e706b..701cf0910450 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 1952ddb941e5..7a5d9b69ee4a 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 ba162f2a2bad..4eb3c3840ba4 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 89b3a9b744bc..8faddbff30da 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 1c836318d328..36cbdfd4cc7c 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 2f21e8a6dddf..88d2f6172a25 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 d038dfeb419c..546cc313327f 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 cf21c296cf36..23437a997e60 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 123e5cb1b3e6..b0d5e19ad554 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 0ac3830d230c..6094c1700fce 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 7ad883686aeb..ccafbcd541ea 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 a04f4db263bb..e6d6b90290dd 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 c513946d1891..ba77e721c7f7 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 3e52eb50e756..a4576bd1b170 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 07970b457a30..4cb55e3bde6c 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 40c7a7a1da97..326c86f5542c 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 65d02317d34c..89dfbc3cbad2 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 20496f62712c..9bf267b7de9a 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 fd66f5aa64f3..308834bd646e 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 fd66f5aa64f3..308834bd646e 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 e11f69babf79..e5c6bba40cb3 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 735056a0ab0b..682a2dcbbc63 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 65d626c297f0..c739e01a37a6 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 987d9616e915..68efc0c644c1 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 abeb24121eb1..9a4cce97e3ee 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 2b4062fd22bf..b357bab96a4d 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 74e29f813866..8596a2d9df91 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 85e4a72e86d6..bad2752a3afb 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 7ba3d4356504..d486325796fa 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 6060d8e510e8..21a5eb3b64dc 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 936f31954d3d..cfb9994843b8 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 b7e14bfb7658..435d714ad834 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 badf52946543..0284bb9d9eaa 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 399684951441..adcfa7f0fe0e 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 84f4eb8406dc..1e12c69428eb 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 ee88c936188b..60836a2b9986 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 6dfe63d5d001..4512c93dca66 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 0ea79aebce61..165dae6f5ff6 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 e0363166b02a..fe6b54aa7935 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 ef378b5995dd..713209943d3e 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 f93945c6a683..f2363bf03cdc 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 b8aa9a3152fe..dc4453236952 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 3f155340ab59..313d35ff6e09 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 43ffe6570dc8..3ae58dfa7b7c 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 ee3739f9723c..23658fa2155f 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 d2476e493465..6dff2c101a08 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 e7fa10a2a11a..b526ef76eee4 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 db49ec25aaae..67c85d35401d 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 4eaff4947833..53589bfd2ab2 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 45eed9d842a9..d6b6d4278074 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 b3c677c69849..f8a2658f31e6 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 1896eba82f2f..a0f804722dbb 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 b873940c4b3b..87f8b52a650b 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 5d02ce3f21b8..b56b68a57958 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 c1460fdd9eca..deed09e4b2af 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 4702aa2f5f01..31a80e71b7cb 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 1aee6f27e275..c49f6dc6fd6d 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 f9a36d37943f..4580944e1bc5 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 c61239bb677e..822cec2eaa7c 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 ea35f46807ab..24b9b3123e12 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 56ca0aa1f158..12738e59d7f4 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 81f5dde450b4..228efec2879a 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 87b12937dd4f..874200326e80 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 e09258f11206..d3401b36a8d0 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 d91d07827dc0..d03415aa2695 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 6bc5faac532c..0c292ec5af72 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 92193bb33e29..1ba20f908eaf 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 b53c9ac7a2c7..ed483bccc1fa 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 407e69d41a0f..6c4fca356260 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 aac90cd54cc4..345fc096ca15 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 84fb4d2ea870..146a87862e8c 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 e514682af9c2..d758435bb203 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 4758a5a9d561..96be67bd7ca5 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 bc2ea3f18faf..25ffc9cbdba4 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 608e6e112a10..112c7415076f 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 9bdb9929becd..44456f1ce47d 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 bd56f854c8b1..5a0bc5fc28d0 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 723504640919..1b9abec3571e 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 a4cb2e61e5f6..5d99f265e62b 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 e4dcc62302ca..945bf93f8faa 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 b98e76031d4f..74eac963408c 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 a13c27f2e780..a0eccb5d000b 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 2eab93beb201..c2e2de67a651 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 374ed1d93df9..ca26f51f111d 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 8e68e8c91178..5e6ce350e60b 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 850338625bc0..b65cb604a048 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 31c946c3cb76..8d3c15ea002b 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 fa5a493abde2..21bc89c2dda2 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 d2e095072844..5d5fdab790e9 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 ba530438f9a1..c7be311ce6bd 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 abd1d32abe28..8d96d247c199 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 7e235c4911c3..885869bdab32 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 c3216d53d055..95253a0b288f 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 910ca3c4bcbb..6dae6ff1b3d1 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 eb4683e2c308..003b28febff0 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 22da96a3fc1e..02288d8d60ce 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 88ce5b0d895f..bdaa51494b98 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 d3c663c53e90..53b5ab294d7f 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 edda10e6e82e..666bec83f628 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 5e67dc6f6c32..e806d4a32468 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 ae65a5cb8dfc..96903b322e45 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 a2dabde25bc8..c627ad97bb05 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 3472c05d12fa..c0113904edf0 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 1a416dd460d6..990db4b29d7b 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 a30518170ad4..1e91f2c86fdb 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 f7cd04568be3..602ca87d4cf4 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 56a39fc45b0a..6570357063bb 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 214f33dfb36c..42b93383c2b5 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 0b0f361809f2..d87cf6b18d7b 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 7b14a5235434..4ceb3b82ab36 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 d9d0a3aea07b..bf25b52ed66f 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 c11ace612f13..71d450c014fc 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 7d1927253f22..11c3b2fe5603 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 fe4ec4d23d05..229ce9a7df38 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 9e49e3de8bc3..78dcd1c1f42e 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 ebc5543b380a..3800abddd424 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 0eb9ab415d79..cd29c22262b6 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 ceac5987031a..817511180bea 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 3c1baab3e48f..4c90d1c98403 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 dd970a355626..1db9470912d3 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 043870c9c25d..5eb4ad4b47f2 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 a6528ec5fd6a..c4916061f9e5 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 0d2776bc2e3a..f7e229aa9807 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 5f47d1c4f5c3..1c8c048ae28c 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 b423edbdcec8..000000000000 --- 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 b6783175dd37..5fc0674c576c 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 b423edbdcec8..4c50ab5319ef 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 cccb7879fc0f..5628ae1be36a 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 5f7ddf7f758e..e2892722e891 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 37bf24c2fbed..f5f459bbd3e9 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 a9960b4552b6..60b4895f5f97 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 4eaef25059b0..5345a1c4c42e 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 2ce2eafd5450..57f5da8d0afc 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 01f487a7d755..acc438189cb8 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 5bd84330bb79..3cb83823f1ae 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 bb13bebf4e2b..5dd168c565c5 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 fd5e42ef1707..ba8db4c23dc9 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 c77e99abbf6d..febb272869a3 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 e8bd095ed25f..44772fb73136 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 d4da990812e3..25abca0fb43d 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 ea5c9ddc7ced..c775155a96e6 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 002646db92a4..689b8576e4b7 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 ef5598bf9e77..d0edb51cb6ac 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 b831dee580c1..7a9576f1f9d0 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 13867904895a..b307c788a4c5 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 448c4fc04463..309fb79f0608 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 fd4f60cb8899..5403c26b979a 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 e5bf4757e3a7..9c0771bdd0c8 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 82c27b37573a..27ee42460d2e 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 59680e6e4a8e..aa9c478ea633 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 3537a1790cc6..d13a0b00d807 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 6446e94513cd..17fe6513eee2 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 b9096648f923..1c73a76284a1 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 4aaeeaa38853..b1cd9f194907 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 75e77fdf1be1..1eaeffc4a3be 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 30bcb78bcf27..df97f326f890 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 14f34f76cea5..c149794a2bdd 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 7edbdd4cec5a..3e0f0e76e425 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 63c191d42271..04664e573930 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 225d1e9393db..f982e417e5fb 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 6864f7247ad5..16444dfefe2b 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 bd37be215761..42314eed7aad 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 60f60fa40e34..f544b5fa99e4 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 90680c0194c5..27af3cf09156 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 1544d760a133..72de172222fe 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 03b2f9e3c74e..66a4ec50c11d 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 544458dfcd8b..e4a2b78f1152 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 dc04d85770e7..000000000000 --- 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 143d2fb6b9a3..b6a73abb09ca 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 dc04d85770e7..8a1b19baff7c 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 87420a037514..000000000000 --- 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 fc68207512c0..000000000000 --- 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 455b557b97c4..bd4a9863c74b 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 000000000000..a99d15849320 --- /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 bf622e389398..a5300fc2ce3d 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 18bcdfb0130a..ef9b21cc553e 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 1cb56093628a..96a271add1e8 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 b6574dce6ca0..f43e889e601a 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 51349ad31956..64385479cbf5 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 dae5343fe301..3cc0542e5001 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 80f749ed72de..17f7b70dd599 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 67d52ad08246..48ad72df6309 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 fc13bb98bd2c..db319b6ab922 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 0bddaf75de8b..03cc444a86b3 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 10b9ce896a65..84695eb5fa67 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 9b94a2b1121b..0fd8f4292d9d 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 27efb5ba2a2d..9ee73bce56d0 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 0c63dc84a370..37f546446227 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 1f56c8bd8e65..cfb2294c4459 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 cd6781767612..ee9dfca0170b 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 26a008320797..ee97fe3cab94 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 db397a891d68..d11f4ea77c47 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 12a2999d79d4..382c7613c9ea 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 6b7ba8f1e32b..f2d3db9be9c5 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 0144afaaceb3..1670faa70e8a 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 89d57ae4f98e..15ffdd1e83a2 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 1c9e0e8d3c98..096cd1e83847 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 72ce73f745f4..8735f79dda87 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 729ae535ceff..bc79c7db2fc8 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 583074888c9b..c2f41c1850ad 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 50eaeeb46850..c554c3b0ff41 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 6d90b066b74d..a14cb06db615 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 61246e44eba8..5537a8cec900 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 1cdc33b7a34e..4ddc5e8a8d85 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 71fbadfa828b..1f1c6e30b4a0 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 cda811144c76..f27271423232 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 cb735d7b305d..b875b03f00a9 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 7c55f470fdf9..a0bf5e4eae8a 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 80deb0f784d2..49d7af1b460b 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 5e32482b21a5..b0d0bc6b9f4a 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 d22c789609f4..8f705f32ac1d 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 01da57320c28..f96a6088fd31 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 f06149f2cb99..6fc7126af1b8 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 69b4e75c6223..09142c561574 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 69f5e66f5af7..d8df2847c440 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 1d8ecf8ae664..c18a30b3495b 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 ac89b7925ffe..605f4e760cd2 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 aaf1edb6fe6e..9adf02cbfcef 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 355ba63790f3..a21afbe7c0d1 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 4ea9a283618e..92f76322fde1 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 d45c32e170a6..048fca762d5a 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 835f502b4073..4e492fc8ea51 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 515c79d9457b..ae2d532be7b1 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 71d4138104db..a9b0aa5507e3 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 b83acfb73cfc..73580c419c07 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 1c7afe0e3d6c..f239507d2454 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 818819f9ff67..cf2a38bf2136 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 e15f4b804f71..30d839cdc2a8 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 e889abf4abe4..afd67be78057 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 f4661e9e425b..e04cbfc8171a 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 60b06a497d6d..edb0c5090148 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 f5e5ef5f699e..1baa8535b2c0 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 d5bcccf82d59..e001c4d6395b 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 665b876c43e2..363a6da0901c 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 6403fbb17dd5..717889774910 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 1c3baec5d863..2f52b48746f2 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 b418fea617ce..705e208b56d7 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 fcf01d5bc71a..29c967f38a7d 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 0295204c879c..31b2f1b21510 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 02e5501f10cf..c4e32e246f0d 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 41341f3121e2..25afe5d08d97 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 2a6d12768c33..69ecb1176d4c 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 4ecc5ef78dd5..9f42d3351875 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 4320133dfdbc..fbe16f72f434 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 cb66bc75309b..ccf77b411d57 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 8a58d06ac87b..2d1a487ee09d 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 6abe107855f8..4437106edf3f 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 b59be00ffb78..aa0cdc01837e 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 5838dc58a3a1..d648d0486118 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 cc47b5b49c0b..eb49a3dc78fd 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 2fdeae5f1853..91c1c8a9260a 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 9d98d3be8746..7991f119857e 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 f7c70d3978b7..40c66043f9fd 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 39f918379d14..d2b157e03e7c 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 a3296032841f..1ae6f25f7b10 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 e0de705c4884..cb0a0fb0d5b5 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 be11ac7264a1..e9444e5c0948 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 70a5b10e9be9..e88683ca1dcb 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 d1d90df240ca..5316974b80ad 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 b68e442a57c7..2a4343e3eba8 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 4cd7e2717fe4..20ea6a8e9942 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 34e5bb322bef..c6330f4739ea 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 4f67ec979029..20485b90bf7a 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 a31eaf40e0ed..1a92ddf382d2 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 b0565842eb4e..a9059817bcc5 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 7b375dc05667..ed3cd9c4bdfe 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 315b0cf0fd6b..f44abc359d67 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 1615399be32a..7941947f25df 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 645b1c0eb874..305512cc41cc 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 1afde0ebe859..b14f36dd218d 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 0ed81132ec6d..bd62602b6efe 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 5861f2186899..9edff0c4147b 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 c6341d80844b..b6c676886c10 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 1835b177ff36..8a419e8046da 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 44d9748fd2af..02a109cc65cf 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 a47d739c6be9..87d97e436c56 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 4c1411e1ecff..1300c4a78840 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 d4128fa54e3d..1d595f5e9ac4 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 b95930212358..88aff296051a 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 9f85473380f8..143cb58e49ec 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 10e5d1dd0ac1..07c30bcf98df 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 5eff5d1915ba..bdabbad6491f 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 626de269d95c..36a82f5b9501 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 1c6c64eb3168..575cd30e229d 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 6da63664dfa0..7897733c7238 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 a236e4913755..544737765bb7 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 3385e4e6e941..bda5138fcd28 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 3539aa64776a..71e3418f5558 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 613aa121a47b..0355f4e7046e 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 f76106dfff18..e091328d7d76 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 c425a22df917..b31c6354ba43 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 8ea5f6b7a278..a279e786bd7e 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 4d00ac7fd0d5..ddd247cbe25b 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 724eb28291eb..332e5db7a0f2 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 a6ac4d5ca2e6..1b8cb5210cd5 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 a954385da41a..2259872caa6e 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 224503204325..9b1e0ffa7cb6 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 abeaf10f2b52..668f752dacb3 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 32dd909b2e94..a6acfbb8ee6e 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 5c38d7c42f6b..9710d6de838d 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 60e3a02f4ce6..371d89ad32b9 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 8c50cac67f8f..90866ab4ce23 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 fac727d2d7dc..6b4722d349e3 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 5abed374a6d6..5dac2a18b7bb 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 deec44990086..f8ceab339255 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 5c83e6f45c9b..aee06f8eb042 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 02c8b7250324..8bb2d0fe05a2 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 9275a8a072dd..096d29cbe499 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 01bf2a3fa428..1443fcbe1c1c 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 417f69041658..0a87f789e488 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 4971d96476f4..a69ce7f191ad 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 1b4aff43b5bf..f6c8854dc788 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 612b795eb5cd..142c5f65a4e3 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 dd24c2d27e27..39fca4112017 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 4c71a2e02244..e5b0a5639353 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 e5a74f15654c..4a211bb29212 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 858035190ca2..09e5ba74c338 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 b9e96a87f147..cac617fbd547 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 8f21e0648d4c..6a1d57ea67fe 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 c98f199b60e4..d2ba405d669f 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 5b7c7be42cf0..e29e1e2b19cf 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 413c67520798..1c0dc1f87ea1 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 46546eada7aa..35071999111f 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 0a8917812997..285cfe7213ba 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 f00cd9aeffd7..3e4a8b09f895 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 f82ec005a01e..97462a705d5d 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 a3b9510036d0..561c19760511 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 0566b802e75b..ef5178fba951 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 58e0c387ffb9..d98982b4af63 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 95518e1bbdbd..f5471fb74821 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 56747bf5a110..3da4cb73f119 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 f58cdb5945e5..327daad9b323 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 43e562b5a7da..739b97ff708b 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 40cc665fb612..d0782963dfc8 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 78d387386f89..db40e50d4995 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 df44689efed7..c125501f61c5 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 676ac73c64d9..94254fb27f92 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 41b9d95734a8..b975e6ee958d 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 04592feb5054..5e7e1cbe1e5a 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 de9ff730b66f..3484437e5717 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 2358175fe928..00f5c3251e0a 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 14c0a1399a00..24131f7f6ac3 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 36f0ff92104e..25219f4c3352 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 3798332dfd78..a66cb6b66651 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 298ed38d180e..61a22216ae52 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 7da6b7ca285c..e0d1d515deb0 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 95d50171a847..98f230320f62 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 5a68048c4772..49bb15977b85 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 3db19e9cde8f..4280d0745c1a 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 2dbc424d3ba2..a97eeadd92f4 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 d22115755608..8928ad44a70c 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 85802a51490f..8c0a109781f6 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 36c8880093ec..8335375dcfc9 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 cb8f74186bd7..14a995aca31b 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 02c7970deca6..06e7d6f5d70f 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 205f7183b75e..57680479a179 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 7bb0c1b772ad..db37197f1902 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 aad5b34606ee..5490c0963915 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 39cddda2b804..89df4526b077 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 989d3c75cd68..000000000000 --- 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 f8d956b3dd86..31f89030bb34 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 9e76b8738584..df910546d11a 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 200faf355876..000000000000 --- 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 bcd29f8b0344..6ec44aab2c1b 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 db7e8b6847a7..7b22fa4399fc 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 3942e7ef7343..45ade4906b82 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 81176b3d4e99..1a523cc8e312 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 6fd52ceb24ca..8627a6bf8870 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 4e996464705f..a361c504b5e2 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 43b65f459a1e..2075adad6f70 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 231f4af0a204..777813603742 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 44ab60dcabca..d3ffb61af118 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 e59c67252693..6dd8ab11e7cf 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 83e10bf1213e..7f07823bdc64 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 a4033eb56834..4219f6fa683b 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 7319a5135d3a..b0c6c088361c 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 1ac3777f5feb..d45deee18fa8 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 7edcadbf2cbf..4f07cf3e35c5 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 671366c90ec8..fa0f63d8aca8 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 0f668b8d4690..3a8738501ec3 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 b2c663fe617a..2b1db3492859 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 465147041d96..7737b5ab0b8a 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 db28a6c6a2b4..920ecb687cf5 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 370fec6fbd4b..11feca59bb53 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 ef68d9e513aa..09f47a0c4396 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 275cb38693f0..01618dbb779e 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 7cbe3c4e4156..633df2b20679 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 c4841b46f60d..1d3b4857b4c7 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 4eda785bb898..947965ad50c8 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 8995aaacd854..52a421ead702 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 557f6a434f4c..ec8e9143af1d 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 52ef685e8f4f..6f2cd6cc3d63 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 23cae4fb57d5..67bbf3fce616 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 d6e48266fd30..deaa053c4156 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 bb97957179f0..7a65ad86a9ad 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 d57036ae58f3..26ce7321eb6a 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 d103c5a9d236..0bca8a8dca42 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 e379e3aea13d..783ca47d2c62 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 a5b6cd9d2d4c..e142ab3a754a 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 43b9767db164..bbf138023129 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 a6d2934044ac..420e32128a4b 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 06af6a03b8f6..9d5f0d4306d7 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 24a77db9ffc5..2946c9b4a8e9 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 4c62ad444a51..9bffd79709f9 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 9311490020d2..53d32254a684 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 d0af47a8ea85..469e4f385ba7 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 6ce9da436680..446fdc755148 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 20983184a473..e297ce01a882 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 077a33c081ba..16e6ca7df8ae 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 2b67c2f2cffe..98c5c8971380 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 f42e8b705931..e9fd30aa1ed3 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 b2a34f5877b1..245f22a49554 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 4fca38cba30b..a457c45f8573 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 2e4395ccf227..420322486c65 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 9ce050aae218..b23872ed509f 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 ff865da5aa86..d4ebfbbf17a8 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 d49ba478dbc8..1cf72781e458 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 cab60c91e165..0e915760675b 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 2b915fd7cb32..b279bb2261a8 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 495804649b14..710328d6aa79 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 e60a17922fd0..b5110623606b 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 e9af781eb2b8..cf121df0f6c5 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 f19defc64dd7..bdf1aac5df58 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 c9094999ee27..c4fb8bab6636 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 c581ef6b0f7b..f195e067b55e 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 5044d99ec518..f03bdca29cb3 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 936931acbe2c..2ddce483564f 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 ed69f492fb96..352dbeefa8a6 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 1655f0eb8503..8472a09844bb 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 e2ae5a9d53aa..2c996d25e5cc 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 ca6449cce30d..6168268bfedc 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 508ff7e0ae8e..f6ef235dcddf 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 a7bbe4db9929..440d92d09f32 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 b62a74039f6d..baeece40a52b 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 619084eaa517..fb7cd905375a 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 6c94fc7b98b7..35db9152bd55 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 71c1340e5f81..aa5dbdf82335 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 484ec4244355..42ac22840384 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 2a41f708c2b8..1622a199a7a4 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 919a559f85b9..8718e73512f7 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 420454656d45..14905e6b8bf7 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 9ccc8ee41f66..aee920e97737 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 80c0b69a6f7e..62b9bafcd60a 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 20564106f992..9e96ecf3ea69 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 604156b4d373..c4a7629f3148 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 dc0521853409..8af6973134a6 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 215d67691163..ff1e8ed32cd4 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 c1497ad29118..2f0aa62019e8 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 e8e82f1994de..d7ba1143b5c2 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 22a553c83d63..445d155afa90 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 634095c7accb..65d3a9e701ee 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 0cb37524a6c7..9070ba17856c 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 5915f5ad9a96..8445bf7e6352 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 59a3e847838f..f70a732c90f0 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 0cdeb6dd6787..a44d8f74746b 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 38b757fac29a..6e30d76512b7 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 55d08b8d5b52..f4e8eed4f8dc 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 404c043431da..b189ab814995 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 6c5897458ecc..b1a4bd79f31c 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 622765d82aa5..0f94016f11b8 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 852c7c455a69..f6a775aa6619 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 c66ccefba85e..970646ac4700 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 d43eef4a18d7..396d77371325 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 947665197387..a5bb85337192 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 8e72b00d99d5..a9cb5ef3e2c8 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 5c6c8062322d..0327ca75f9e4 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 abbf8132476c..53d0149872a2 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 2da0eb512cc0..ada56a5bd6f7 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 e06629c5dfe5..3228650f4152 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 da01bc96ef45..ae09d678fe32 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 b6a4d71e6cce..517096d092ee 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 ad39b71b0eb0..3d372ac9110c 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 c0326bdae4e3..e18bcc2c996f 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 fed3a5f19b3a..01ed181ab1dc 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 8d651d0e2ce7..826ce6b9d9b3 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 4be8e95f3e74..21b71e228a9a 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 bb267f74ae28..6d55994137ff 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 4f63abbdb107..b83d916932ab 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 e0aeae667350..51b0c8e1de96 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 716e4c67b872..5e479aaa9c1b 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 9c699c7bb829..ce45f22dd6ef 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 cff6c24a83fb..6280b777201f 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 b50e2a45c588..62feb1bf5550 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 7aaa1ee03c4b..09bbf63a986e 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 041985e15a33..fd12414c3d85 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 b5708c4b385d..f5c3805842c5 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 ae8603b7c09f..0c7be8407d0b 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 b7628c44ddcf..bb202ab2d33e 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 87da60700a4b..70a0248eabcc 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 740a446e737e..86c4716c9516 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 1a5b3cdb0268..9ea1deaab362 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 434a2801597a..23937e12c521 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 04f4aa771535..7ff97abf4bb1 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 7ad4c6bc98ac..45b920ab9273 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 238e49bbfdf2..0a108d52897b 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 7c151270bb55..eea8595ed06f 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 e866f216a247..6d026e6edc8a 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 7e37279b9eb8..c99abdc72461 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 9aa427565449..89dd09bf5203 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 a4347f52a707..ba13544712f1 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 e348551a642f..1ee6393d1d83 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 de44d667656c..21aa3c7aafd8 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 f0094aa694bb..73106328618e 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 390bfc542b7e..f9ea68a8cd94 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 49b54a4cd5b0..be6dbad9e1c2 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 e4f717be8b5c..e1f6211baebd 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 1895de1f12b3..4a5842047731 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 acbd8740a359..81f86de641f2 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 22bb469f9411..81e96975c98f 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 935e7d326be4..45851411daaa 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 5f21c8cbf346..5b639eea09aa 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 3543d6293f77..ad2080fd88b9 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 14daa2e9c357..dccd83768c43 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 fa657e3b275e..84cc4319070d 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 752b21ba087a..7d20cd2293d6 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 b74ed26865ff..0ed56982c9b7 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 f9fd65b9793d..9beaef3e4de3 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 0ed849e0e7d1..0d8042ed8526 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 f27183d11db4..63a2b35ef7a9 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 6496d8b86cc5..cf19ccb54d53 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 7eaa15522272..382e7ff38143 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 d9570c2fed8d..79776d653b1f 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 0316385fba93..d7e3c2d37324 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 869b3e4f4334..517c6613e3d8 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 ccf9ce8b49e1..9764b00422d6 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 c6328448868c..2e7de649c721 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 4572d1cfd547..406152a0bf10 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 b22c32ccd92d..b074e2bc9398 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 5a7b3a4feafb..19218926b8a0 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 3595d449823e..271f8362f17e 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 a9575a9e77e2..6f074188728e 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 fce97d9ba237..fbc940aed260 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 bd9c8483ec29..6649ffd7a2d6 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 bd0f08f45b63..63327c776683 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 1226c2fbb461..59ed1836990a 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 e9459ed0719f..cd4fcc4084a7 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 c4541682723b..b63879c063ae 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 b356db4b6fc3..e43cb293a2cb 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 52631de57576..ad227c069d20 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 61a1ee263ede..2fccb744e82c 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 0774c0dfd329..159ce04c3c4a 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 c1f4331438e5..51431c058655 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 0997bee19bb6..0b401add8e49 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 400d9f6e0ba1..ca9501cda3a9 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 55e05cfb203b..870c6851a661 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 ad53a53143ee..8e958aa0eaa3 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 23ad39a6f92d..7651e0f97ebe 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 fee6b5d03a9e..e132be318f43 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 ea699b5f5ac4..99736ad185de 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 b11fb23ebc8a..46433222f6fc 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 8b58d90fe4e2..3ec0120a0c65 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 1c001a2a3720..6e224e05dc3e 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 ffc701678d3b..c23546ffe849 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 92020417ff5a..ac36969083ee 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 3c61afd5becd..8d48a6a52060 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 e8fa8485ab2f..4ff55adb8042 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 82bb95f1ef2b..219957db30a3 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 21c0274b991f..62b47f9c6d23 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 611238f56173..a829668ef6aa 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 8d73f9b666f1..cbc7c26a7efd 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 20fe2053cc7c..e51047537898 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 3881e3352202..640a1789cbe8 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 8c70a1ce477c..6092ff8a40d8 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 0b84e0e6a3f5..fecdf41c2982 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 0b50c41fc5ed..090ad5f810e1 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 33c70650603e..891fe14d9a04 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 0f3e077d1de3..04eb90afae98 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 3c33976568e9..66ac467e9acd 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 1fd7eb878d98..28955e62d958 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 4593fec5196a..dbfcdf8197ad 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 f7d4330ab19a..7ef9bdfb1643 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 4dd91c13ea9c..9d075735393d 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 aee0040ef4de..3fb7de6b26bd 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 6766ec542b1b..7cbc9fd5c8dd 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 8c8188268578..289767b1f698 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 ac850552b5bd..c4773c13264e 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 761539227a79..ac857ff34a4d 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 ff764015dc76..861179650164 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 78bda28485dc..6d70764b9f76 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 fdc088dc0f9a..a84dec10abd1 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 b3f22ecf5115..e082a172e351 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 6c6eb5d4e86b..7b850f32b4b6 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 6018078459cc..988ea9f086e2 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 fc3bbb88efe8..909fa4fefbd2 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 7d1c4f5f8382..54bd5dd5098c 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 2bb109c0e3f0..5a631d068b1a 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 5001d58f0a48..2580a04221fb 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 6f7ae6a3e0b5..e5fbedfaece1 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 3275890616b7..e5e48edad88f 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 60e895a2f9a0..d15b982a621e 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 b665b049f32f..94f3520ed735 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 a601dabcb0b3..287952bf1fcc 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 02c1224f4e14..a0b6c888505a 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 02cff0475e58..97517fcb9e27 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 5c41c2ff49c8..4abcc18b9b2c 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 331e06d9a887..140605a2bc5b 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 826107130eb0..b53e57799246 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 791cc1630ff7..5e8026c55321 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 4ccb81c292aa..1f2edf0dc13f 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 978c1994800c..9525ff2e5ef9 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 4a3a8bb6bf93..e56cd5202e52 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 cbc4def0e03a..7aede27d125c 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 fcf9f6387102..5303c6d2e53b 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 5da8df570646..b3e8e9a512ef 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 0331e75b2fe8..7c612158bf09 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 19002965b937..38cc88e567d8 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 0e1b3db19251..30cef4b27ef0 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 008434696d63..8a67fe6d7271 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 336624320a32..52f09ea73d73 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 701ccf4799a4..be2c32e28141 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 4df9b802d45a..6aaf29b069a6 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 4fb0aeeb573e..8738f744e11d 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 1dcfd36d7d57..c984fa2e8d8f 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 e2957c422f6d..a5e81d305edd 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 4a89b40625e6..4dc19fa6b287 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 fb2a9a401ed2..23c7c3373b37 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 16ed6d4ecd6e..553b1afe45ca 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 e6e1587daeb4..f01fc9244570 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 83056feaf274..dc11a4d56a2d 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 ac771ac81d11..b3d784aec37b 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 3fd434664675..c240a6938fc5 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 a2d0023e3f47..453494cf18bc 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 659b54655222..a419a7f5e826 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 cfc6c4450b4a..690554ffe199 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 d9fa2b56eeef..3bb1d039d11b 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 9dc2eaf25550..a9de9ddfbe98 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 635ceac0b199..1e477ab9c88f 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 249716040a17..d76fb697f406 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 050b847305b1..4f926175bd33 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 97e260d2752b..c93e579bfd80 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 9b4c63b19256..92fdd9003592 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 0d4e08ad9547..b491c517d94f 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 c11df0300250..2259a542706e 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 70345351bd09..0f1c30811a2d 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 cb9dda841592..376d230b2755 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 5f786769fe73..4061c02fcd7f 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 4fa83c490383..0b6ab8b666b3 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 ce80271d274b..5bba29d11339 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 730ea4714c78..ad03b6c2cd27 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 e762ee357caa..4db11d472f8c 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 9078a7ffa4fd..ae338a4c95b0 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 d310e5806c56..d0297054cb2f 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 0306ce717d04..37265c8d1a89 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 3893dc1be079..17c271537659 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 74c73b99cb92..3683ec7ca7c0 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 36763eda169a..7ccfa3d17bfa 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 51f9708d3cd6..498930fc0c66 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 9c6f4d3094b5..a02745279755 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 4b1cbe80c506..22dcd8d7cc03 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 f3e7cf99437d..45fc14420f17 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 4569749df42f..1ee599c8a760 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 09e749740725..59301c1d094b 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 a344d7fc43a2..7f0dd872ffdf 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 4374d1594e46..cbdfa8a7c9a5 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 331d72982169..f0bbce707f30 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 b93cbe5f8b6f..b357aa82a2ac 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 7ad3f0347132..727860465fc4 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 88da4bd066ca..415d9a033eb9 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 eeaf2ff7efac..209806596608 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 538caf439c76..0f68dd48c636 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 79f58d4565ca..30dfe5d17ae4 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 140373e9526a..5ee5fe6cb280 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 099feceae81e..4a00ae81df48 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 b71e11496138..7dffc3e95ccb 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 1c7a501edc70..96eba258c97e 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 1c5979c07475..dfdfef01298b 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 5b4b09836230..9a1b338ccf13 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 16738ec4ae4e..738047da5269 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 07f91d059735..72da2148350f 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 46e8e37838db..e86b40d30dcf 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 ad255be8dab2..07dabd9e9c36 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 f2ff4f535576..34d31d9ef9ee 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 e01b5a26fc70..0b4894e4439e 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 13d124ed4c3c..e03343142812 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 eb3a8948fc80..e4e377dd90d1 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 7fa1a69d7e0a..8d15257116f1 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 6b58fd966220..f844c8243d43 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 2d1ca05f4fcb..acd34f781871 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 c4037dc2714d..ad2a84b6bf92 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 9fb250e84709..43a60013e79e 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 b6e6f136c757..fe382c4e4b90 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 e84906c96bb8..3192b85a37be 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 f4d8b16a02f2..4a5c3453876a 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 a5dec8ee1ab1..79ac0c316754 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 1c30b0b6fba7..c71d553c8927 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 8ce444be13f9..85eae60b2f4e 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 52b4c7898d87..ca0698978781 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 d143926b2819..c81c3359dfce 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 83dcb1406f89..790c72f6d4d0 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 3970a4155e95..daa1a9457494 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 e98d68e0eb20..64cb6597b107 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 754f5032d162..0e847a5b54d4 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 1be1394dfae9..5c2d0abfa8c4 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 e8118f0c6e40..a7b43159f16f 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 2024a55200bd..598d0dc0f165 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 4bb61dbc7f40..a7d6d2628b91 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 79671054ca76..ff1263562274 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 94b3a5ff9a7e..b35f1ad2f1b8 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 762c4b5e8ea4..5af187867968 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 f82e029983b7..43a1173963d7 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 8cceaadd7b92..e021beb6db73 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 2a8584029d0e..9c7ca106d131 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 07b5f7a314e3..431519c4a9d1 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 390f44b8aa51..49444a8b49f6 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 b9f47285c145..c8568eff325a 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 1f04e2aade17..3c74e992395c 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 7e6b71408558..d8cb24898ac3 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 289bfbabd949..a46122ed7835 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 820f1a049e1f..00778872727b 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 0a4b54ebc856..6a54f86dcee5 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 0ae5e19ab2af..150164ba21b4 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 2abb0bcde95e..f75fec1a700f 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 759c32c84533..4edae48923a2 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 08b4d68779c1..9f952bf6c86f 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 d6d1fb014962..2bc58aea8fc2 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 677bd5a7343f..95465701bf85 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 b39375a09f36..7eaff73dca18 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 000000000000..ee4d75615bd0 --- /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 000000000000..797bd1e9e6f1 --- /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 ffc37b260a6b..bd484c633c20 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 f756be615a1b..54bd254c8e40 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 91cdf0eb28f6..c0a04b456ac3 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 95ccf2a4c899..2821d5b9d8b3 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 e566ed488c95..12d1ffb5fc9a 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 1708a80505db..6db0f2a42ac0 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 5079a37f4da7..2427ccaa6f08 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 00660a938d5d..3f1607de053b 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 41bbca661ddf..af4c4ddda69a 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 eebe8d6e3f33..db18cf2ad966 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 aa7510821af9..1217a96112dc 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 a8aae76f4fcb..c55377c593c3 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 2db7c2407521..baf8783b2719 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 01c087dbc9e7..1d832a36ef50 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 2ec1c8bcc9ce..08349ba6747d 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 eb5e8e3e1ab7..6d6884fef040 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 920938c4ad42..76f1c1a72763 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 6e4a39289565..96a5780d971f 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 ae0a84eea4d9..4c7182b2c13c 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 c8db78610681..148b4eaab20a 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 c8a451efeb28..895e81c106e9 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 815567ffec35..1d83a3ed7ffa 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 ba9f05c64e44..aa8eba1191b9 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 46bdfc96dbe2..aa793ebd0178 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 e68b86833764..62591deb8689 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 15aebdf1bc93..9b94e04b118c 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 9c1ac4e0c7ff..9c702b6846b7 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 ef3a90a53a6a..63bc403a7214 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 290e274f3054..f8ce899adf08 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 1aa687770425..07c8950f1b2b 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 d2b77650a9d5..91b5bcdf7301 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 cdefb680c755..20876469e2fd 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 d93f77180911..b160d17cdcb1 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 b3566f68533b..f018ffa09774 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 e5a1a48df561..fbf9eecbb130 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 fb70ad48e88f..68109fac31b1 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 77862762e872..35d05e6cf64a 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 5ce1fd54a9e6..54e9e491f787 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 fecfd5edffb8..86d8a7e83561 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 ff100cd941fd..9d763d155b8c 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 4a56c45aa92b..6b394414baec 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 ff5a52b906bf..2f27b72da5a6 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 6a0fe7784fbc..8acf98a03b51 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 8f1cc6691cd8..e7a32d3c24e9 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 4745cceb5164..f848a1a340b2 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 6401a8d14810..b44710e7c3f2 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 1692470e8d1a..419142545224 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 5f447595662e..01ae998d0906 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 35f9c7e8d9be..454615a5a016 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 c9a729c7b207..f32b129e3592 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 46d6ccd56bdc..101cbbf38e35 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 52603744c45f..f283b33f6458 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 df4f394dc373..028f86ebb3a9 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 70ebce9d35a7..7a6ed6ea2f8d 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 233015378357..3bb4536537cb 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 20d3949a9f99..8fa3ac45d08f 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 291bab2736d3..9cf346b81884 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 004679a6240b..20b2eb3b8218 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 80d815379bec..428a6ca6cd21 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 4e67b35949e2..bfa169fd87d2 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 4395e45e7733..64495da7b9fe 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 57a99b325ad8..8d98ac4df233 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 103e70ef6ee1..d0e3346fd775 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 29070f917e43..9b32d1319c91 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 733c8b0b0859..83dd18a406aa 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 0afb4bb11bc8..b83bee8c1bf8 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 66f267aa7c7d..23169aaf65bd 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 ac916de46469..03f476cff2a1 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 38c717089c46..94b380801892 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 aea4d15ad90e..aa9f68a1b49f 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 416a073c6b90..3ef1400a41e6 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 b8f30355413e..d99134ba7e49 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 2934217df346..0695fc8012ff 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 98e8e88a2599..6f14aa82373b 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 ab6f33c09994..6ddac4d314f4 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 fa446591f3dc..aca8283068d5 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 4d71389351bf..8519bcc99613 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 43c0bfb26cd8..2d2e36d2bc31 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 d2b620f6940b..06aefe73d0f6 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 61d11cf38347..4e5a0e49a8c5 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 e08942da5e47..2538fbe257aa 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 fa23ae8f95be..5a26fe75eb89 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 ec682d96081e..e2aae20db90a 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 d400ae58db4a..bf15b2a71e47 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 87154e25d409..2a21eb66a949 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 d071664abdeb..e96ac6faae47 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 a8f5d2c354bc..97770d22f795 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 d950743b41c0..ec9e354e73df 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 28e329b56caf..f49bf44a0612 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 e303a790bafc..343c7131d1fb 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 1af2fe98e50e..365ec182f53a 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 de6610c3e790..a9b7d689ad42 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 ea801cef64f1..2ed803c1ddad 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 018f4bb7f07b..9841be7365a3 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 4983874729c4..2c75a5ffe6d7 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 ce7fa24a9fe6..fc0b10377776 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 776ecedea7e7..7ebbab470955 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 c815080fc4ab..7af94a64d395 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 6cdc70714942..bfaf351191b1 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 bda2ed17ecfa..36af053f2ff9 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 472f6b5c8e51..7c2b93961085 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 d6a33c08d199..5142e02d7f63 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 23ca36b71e00..65b56b327565 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 bc1bed8a9a4c..f98bf4ef5d17 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 00069a3e7adb..bc59c2ed75e1 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 ee5fee4cfb8b..7dda7167721a 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 59e7f9a6083c..b7cb7ce2fe72 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 79cbaba0c78a..f9ef7063231c 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 8b2f46bd1b24..a7e8e81b6544 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 dffe6ae8a363..ad3391a7ad70 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 5c0a3d256f60..ceedbafd86b0 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 551b072abfab..cbb64261a66c 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 67e3ab7ab35f..036d678dc022 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 151aa9092fbe..e17aef476342 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 c12b16f16055..abc66df8b363 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 1acfe2f2d1c3..ca86f1b5b01f 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 9b27133b4936..a673b2699108 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 1d974b7ecb21..99f673df868c 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 244ecda6626a..4e48d5e2f5df 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 e5255a64ba11..24004335f060 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 5a77640f0d93..0d0855eec7fb 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 4f726b7c6a69..0847597450e5 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 d9470e284177..7af3f9a734bc 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 1e3317777657..c53861065c7d 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 fa3d8d7d5064..47d95d1d643e 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 618c72562b2a..d4983404de2b 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 c667ac143a39..e8e89fc5101b 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 24d83eb5343e..fdc94d4bb867 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 683fa6850fd8..5ec7853a8e82 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 1efdf1de0e61..6b3c85cf83b0 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 1d62f42bd4ac..c2160dbd356e 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 0a350bac14a9..0208ce4430eb 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 6c338e99912e..09c818da63ff 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 8aa65bbfdc9e..2d209ae090d9 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 0a6c49111feb..5e352e930d82 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 0893b02e74e8..c32ee67dab9f 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 6ca07fcf8da3..84af98ac8eef 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 5da9381f8378..a1670223bcda 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 c1e45215ad8c..6ab8829859bf 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 7ac6f03925bb..0b6bb7507e9f 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 26b923f431f9..ad48d88e4807 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 606689da0c26..dc3363b9bde3 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 b0cefe77039d..b4ee0fb4070d 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 604ac5112901..52fc69f7809f 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 2b5df52a51c3..5daf79c214c5 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 c72331ca2e11..f6fa1b2ff763 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 b08dc499a0dd..f53a5d72f58f 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 a4a2b156e139..913cac39d5e5 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 02db38103d2a..6f2f44797384 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 de0444b63e26..d702bfb2f88d 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 8d142cea5de0..5e07417e5aa1 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 5ba45b19dded..5faa78465bc3 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 dcdbf0d050be..ad462a0cf82e 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 3fffb30c612d..8b1ee8df1db8 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 634d3e9a443f..d52aeac13220 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 b2695bea5c39..a72863e1936f 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 3574bc815155..07104bdf217d 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 77a2cb2e6dea..083767e2f024 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 9f34a3887b7f..1478cfdcef8a 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 49f8562a6b19..3c294f95cd26 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 a431a06bd104..26452b53d4b8 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 707d8e95c141..9b423003f69b 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 8472430361fb..591845432740 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 4a02f8671721..4bcb501075e3 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 a8e69fed6959..169a0885889b 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 c0d8927d0597..e3eed775a5fe 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 e72943261375..237203d23b52 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 fcfe493c1a22..b85e70465aba 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 0bae65a9ae53..b346953e187e 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 b3f4446f189d..025b75c1b5c8 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 77d8d1abfaf3..2161b28c58c9 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 925bddd5edd9..45035a42a5f8 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 ad0f22031067..25c36679033b 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 23d09fbf281d..e8d6b2a99640 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 846004e661dd..8f5ea7df3bd1 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 2aab3e7772cc..c10f76b92196 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 9bed93f9c153..44fc00e02276 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 cfe4641f3560..df5a231e2686 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 54d547eefcc9..3f58cc6d78ff 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 47da8a306a4b..56095908fd53 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 8f3688a2a076..c71ea3bdce72 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 44a1e9e3d93b..901cf90a90af 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 fd678a717d04..2b9dfdcb0f17 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 c80e61b45111..9f78714b7694 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 af13762d1185..2517796ad107 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 4fddfc44ac60..abcf2cbc05bf 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 0a115dd3b081..82d81a93d9d9 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 45750072a7f6..7212dd6182c5 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 4762fbb7c59c..d0505aed8650 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 6a566ab3a3d8..392cc6acdcbf 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 83e74a6e685a..effb66d1f53c 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 e7123b344523..778d92fec2a8 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 b939a70dfc56..a3ec1b28e5c7 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 1f6bb0cdc3a6..d481ebafecee 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 2864cd40da0d..0d6b9166c26a 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 71eea4e0f78a..d7d11274de40 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 507c0988fcc1..531eb680a4fa 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 37c6525234d3..79dca59cd74a 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 581db033f925..574a4b3ad5a0 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 0567923b7fc6..e5f0138c95ce 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 b49f2950020a..e92d726be45f 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 40a70c623a74..bad165bf3906 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 8a633a916c83..d200b4410ff9 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 3adac7b72621..e98532c12079 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 5e98eccd9b55..f75f1456fbb9 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 f20607a89038..b1e2b1948f71 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 8d30610504f7..15d227fd826e 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 00021a07b371..075ff7a76761 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 082bd0dcfb22..28b7fa9f7469 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 76ee9c3edb0c..76d60962c38b 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 fec658782106..976a7f0a68cd 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 048913e25cd9..90feadf0a888 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 7f06718c038b..4971d2b30e77 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 46e20d8c61f5..ac6da1fefae5 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 10582a8a5146..55fe8ac25ca0 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 f5035bb2c698..5ca1b80f235d 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 798fcda2a101..146e68df14a8 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 7c51004ffe46..9a6ba2605a78 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 3ff8cb348e76..d70ba7a99c5e 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 388064fb0fae..e1f887139e3d 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 289561bad8a0..0a7188881f60 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 139dc8f94964..22943599804c 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 9ffc42d0c780..ac2ca3770f0f 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 ee8e5e6dffee..d56d4e710a40 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 c906e3c352d9..3a9b93d24303 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 95d7f85f1054..889d9d8be903 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 09ceecd0666c..fd828f39a97a 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 99e454f4d75c..8d3ad0dd5e51 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 fdf896d2dbbb..742062934332 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 d9354efb8fdc..f370b2d7cc2c 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 f839ee783b53..2dd3b16394d5 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 47717fbd508a..4ecf21996ccf 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 d87916198c56..03656d28b2b9 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 a52f81a6c5df..8c79bcf5a672 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 269ffd6320d9..5d38b0459e41 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 47717fbd508a..4ecf21996ccf 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 77d28838a10c..1849fd2d895c 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 fc6255e02744..1b7e0684254a 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 5f85f3935e1a..ceac23574083 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 c0cbbcc9d2dc..3acc983edc4e 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 bd9c8483ec29..6649ffd7a2d6 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 bd0f08f45b63..63327c776683 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 1226c2fbb461..59ed1836990a 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 04e2c59789d0..05a3d011b67f 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 9149e4ce58e7..8e46044d0ae5 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 f578560c552a..7fbc7a5ad599 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 fd61b2b05ff9..34da2fe6b813 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 a06399c34580..fac8f34f59f1 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 f9bb7bf89870..36d4699a3060 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 3f13d6052320..f675a4a3a4fe 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 899e45a306b0..50806df15f7a 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 a1c7af128d2e..dff3d02248b1 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 0ba706b0a8f3..665156027c99 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 71c80063c320..7743e38f50f0 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 e3338c10fd7e..6283a8737ff2 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 d7f15bcae7d2..08c5aa864676 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 5364d92e0c46..1206c4f95ebd 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 40c7e4751048..29c7391521e2 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 51b4389c88fc..9c90d929111e 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 8a3f43d4b92b..1243fba9b588 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 91a4ca608da4..4c4142c79811 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 0656871eb1b3..262dde54c7f6 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 3c71587c8e39..57cb858aa089 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 075d4cbe02b3..bb29e4952420 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 46d952df7719..836cb98b5b34 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 1cac2cac0ac5..1d3689eb4f3d 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 29c7c42219c7..b36bda917d61 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 ff87595c934e..bf626c9ead37 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 1c6ae03810f0..cfe47ff6d939 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 32ed6d9bee0c..ed99ee63a514 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 f915a7d9da06..2ba2a36d165b 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 9976b6814c00..57321ce2aa01 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 658adae193e1..c7940a06a899 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 0f09db530d45..82c27d57aa86 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 7e290661501c..3c6606acdca7 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 1f77a1bb3427..72d83215adea 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 63772d54b531..bab01592c247 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 2cd8731141af..b3dbd53e5798 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 36e49785a49d..4f3d7fd48e36 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 6069cd835e14..faf3cf125507 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 520ee0870ee1..0b43d1d6b006 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 2b8474ff4539..ae869c4b77a3 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 037cd427ccf3..4b400deaca46 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 6593225e7dd9..f3fb3a59ff03 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 bcd114678528..ddb5559ffca7 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 7fdd2be955b9..a21445f188a4 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 06d0bdf456cd..f4121c92d175 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 896072ce728e..3aad21d34a2f 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 d8c262bd6b37..ba828f11e79b 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 b81515cda9ac..47217e05f9df 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 e47ad562fb03..0069e834741a 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 a7a9db7d9775..fcc55f28f012 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 b5690b2eca7c..97639d01f746 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 8014dc87c080..9d85f95ff24b 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 9e4aca888ad7..728ea868441e 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 5bbdf5ec9560..94610d0a328f 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 e65b16543026..a66407953a99 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 8b3b565fe83f..b3497ffbc882 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 051ea214c1bd..18226256b648 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 b0355e073e40..e903eab4e96b 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 a6fb96ac0664..2acfb2e671eb 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 2f4ae7d8e70f..dea68b5b1ad4 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 f56b5378223f..f30bd3b517f0 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 7f351e48b6fa..b846214175e1 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 ec4a85820d12..5231503820fa 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 a26b5dd4635f..c7b5b637217a 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 3dc2f1d73f8e..091064a070c3 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 ce9cbfe1cd27..11d2f91c7bbf 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 5ec75595243a..bed8006542ca 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 e6a150b9e8b9..e4aff216c6b9 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 f69f552b69d8..cc8041b18528 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 cdbf34091007..4af617a1d628 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 2513986bbec7..98f602ab4046 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 a3a81cbf3722..d0de55d9cf50 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 a4091616dd56..44466977c9e7 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 bc87a2b54347..a1c26d90de31 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 3e912d977159..8d8705582ed7 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 66e560501720..c0f770ab9f2f 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 7231a7cde85e..7c533df1986e 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 42693d3a061c..316e8b2fc736 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 248efc93d008..b338a56dd785 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 d3b3bef6dae6..1c552950afbe 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 fc8afc3e1346..9eeea6dc5711 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 7f774c44277f..939090ab5fc8 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 22792c11366b..1e6f6cdad7b7 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 c543394cca05..8700a379d291 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 d7cc4dffb440..c735f6bae7a5 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 ab7c9824af03..dba9689a0755 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 56206425f84c..ced1e5c39153 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 3ba124159e00..949f4c8f2bf2 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 b5627fad960b..5ded76cea7cc 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 0b95045a03eb..80f1e295d4d4 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 7cea8be59215..bacdc7aeecb4 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 c09a774361f3..56ed3328614c 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 c491c156af59..3fa796bdbe85 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 bfbc1e9bffac..e9c4bb7b2304 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 3f09ac7b8c38..a746c74f1102 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 87eb3f622400..2df0cd4c923c 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 de6955bfaaa1..78dbee77b9c4 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 4c4de873b7f0..cc4d34e59fa9 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 b85fc4886abe..8e5911228b2e 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 656101ed535b..44300b105141 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 a283573c9fbd..c0d872bc14be 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 1cd12c2cab33..9691f562d899 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 4439b4685251..0bdcf7c5c587 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 627a8c2384ca..2381f22f162f 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 42ed1ae93b55..4de387e3d661 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 c2c047c79615..bf701a41f941 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 a47b5183f2ba..824a68d59d32 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 389cf108b05e..0a98e85e4844 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 24fc512dfbf0..e9471d207da4 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 3b263e58cbe8..9486b5f1178c 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 +//@ 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 +//@[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 6e4f176de820..ba7b55a450f5 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 3379148ae7bb..ad4e04f7c3a9 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 56afd8b90926..b02435509cc0 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 4014902ffed5..90a01a803139 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 c6c2f57e75c5..e94c12da0134 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 88a609349271..65f9be74c6c3 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 2ce4701a8180..b23759da810a 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 8de390becbe7..2ce1d50fbb0b 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 598773cf3e4c..0abc93994065 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 05461297afd0..f37c5335deb0 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 8b7d8066aa67..b0fb4c414d40 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 7755a46da3b5..29820f8877d3 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 7c3e4d10d990..812ca12c7c37 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 712655f9775d..02568b4778b9 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 d031c2adf50c..aa60434d9fe6 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 e3405641ecd8..83f48430281a 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 78d189d20b64..2d099e24db8f 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 936918a3cfc8..42d5ba69222d 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 53e2a4d132c8..a52fbbe4075e 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 df161b600811..78c1e6c9447c 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 801956c33395..3ab5a500dfdb 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 953b8e3ffceb..1e0106aa7485 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 58a9c84be5ac..93bf83ecf53c 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 2b1067b34891..cbdd0ba9c1d0 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 63159ed05532..bd908676c8bf 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 53b58d486a80..b3df2351b680 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 ff9a0b139c05..d9bfeac36ed0 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 be66560fd921..0473253004a4 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 e0dc3cc579d7..725d968d24c3 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 ebd0f41715ea..78c21843adb0 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 4e296b96ca9c..064a781f6c84 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 dc561234809a..36980fd74c26 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 1db3c2ccdde7..3a50518576d0 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 0648ce0ee20e..03071c351a44 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 5554c8139255..1750fe952f56 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 b8fb4b8dc19d..959c9e6c20d8 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 60ac9f8d4f1a..7ae6cd0234be 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 d01d33de2898..de5f645e6fd0 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 24b8369b3d8f..738c8daa1687 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 3882ba9a2271..8bae9ff32b4c 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 8f68d5d6dd2d..32445c101d79 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 06cadd82c073..f565dd014de8 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 3f49020bbea3..6d17f5e837d9 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 80e51b265db5..c537fc419f68 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 594a2672d435..deb5a2f691b8 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 706780dfd6c5..73a11a842f37 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 222c88daf948..da1d9300a2bd 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 a33bd34508c5..6fe51330118d 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 978a84cf6e5f..12cc17e1cc89 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 1fa315f3d215..141927b4de8c 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 5e1d08dd919d..61cb162e0301 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 de00bc4cbac0..f976e468b027 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 49f1cba7151e..2aa2ed34020c 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 ca4ad2320f65..056c8fb04f45 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 2dd0e10b5216..628374c1f5b9 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 e63aa91577bc..edb9ce380067 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 0c39ade721fa..5c00c9c0800c 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 bf5c0dcb54d3..5afd21a17e55 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 f67edf5e1672..24531e4ece45 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 0fd195416ee5..7c29e37441cb 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 7553fcc4e01c..53910afe28b7 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 b04f80ba4061..2ef81f2cd42f 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 560352b5cb95..8562ae305f82 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 4c716f08c718..d9b96bdece38 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 e484074cc9a5..4622daa5b4a4 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 e4e3093b5900..36e5c23a3945 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 220ebdb18720..49a0f0ffedc7 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 44642a10fc07..b0c0855a8709 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 f7244f6744f3..e13af744ec86 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 ab5f2552bd32..6a875a85848f 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 cedfd1cf2dcc..136b8e6f2da9 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 123b57f97a4e..23946b7533d6 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 253cbfd5d38f..9f87583da403 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 01dcff05881b..c7ad462f1431 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 68a1d0ce9b0b..b80b7eade23d 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 eec7da044c0d..ba6646070aa3 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 45918ae5b610..3edde574c266 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 076be6a35a4b..20dca91fdf41 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 0656023c0f89..43f1712039ff 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 5b83e2620d84..68e66314ef15 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 28cec8050327..42f37e553dfa 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 5d924555625c..e26df7d89ce4 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 888f74cf6b33..9b4a1e64d002 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 d58d25036c5b..96e18a88f4d4 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 7beb91a28d27..ea71f971199d 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 8a21db673335..fe7e3811ca83 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 8fafd41d9bc6..a1ef0ed2c18d 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 d28c8530d58a..4a72da789789 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 750740d94261..b86b2b1c7daf 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 f02ac43c7344..5903986d62d7 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 9fc49fa8181b..1289231fc30f 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 427b1b7a0634..77774792262c 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 afc77355ab00..fef9f24d462d 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 7ca8d4ded25b..e0b082ad0484 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 872ab168bb26..4be82f32e8ad 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 eba385461b95..8a8b609b0755 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 199d4ddb2993..d04e80683a63 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 6a38764a1317..fee28354b13b 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 5abccd2a1412..9205ab4afd0d 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 a3d82ace9e25..ba240f657624 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 65a33c5f16f1..4511146dc75f 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 ac607d6d7315..6c707b062972 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 a1e9b1ed87d0..74ef2090b1f9 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 7de6a4f8acb1..ddeb610d7e41 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 5d690807e050..5afdc257901a 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 9f2ca05cdb61..32f0666926e8 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 78af195bc209..da7e995ca9c5 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 8a95f160a1ac..e4fc815cc833 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 24ecfe9b60d5..8a53b4eeae34 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 bb6edbc0797b..65172cd9d44a 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 3a47fcf34157..fe485f55dd80 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 a8d42a789ba7..9d4b6dc9eaa0 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 de5a6d359258..cdd4c806358d 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 ad54107423d6..f516523199c9 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 15571e8bf5b2..ec8f29b73649 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 942b99b742bc..16132ce7c28d 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 10992c50597b..92242c50f45a 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 4dacc57574f1..0dfbdc02f5b5 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 3c573db1d776..4699e11608ac 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 11b6971656f0..be6dc33c8bea 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 60a63bccb106..57eb13f256b9 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 ce73d6335cb2..0ae92a78a04d 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 529cca7b7316..6db06baa8738 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 f207746f0852..236248790d51 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 92d5a32c62b8..04b083ec162c 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 65207fb7fb54..f46524b6d278 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 f657bf9e0b3b..fdf46387795f 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 9bedde67b788..e3dfbe65d8cf 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 cc8f826983b6..0ab07ffd7e22 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 1b5db20129d8..531c3dc377d7 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 73324a3e1bdc..a913b2554d23 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 a864e8ef70a1..1640b7e1803b 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 1748964a7b2a..9148b42a6061 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 5abc41daf94b..b0a1eea1b17d 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 b9a49b47c8ff..23abad5d2da8 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 b9d70ff0b9dc..d3a36be37437 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 3c5cdf06cd85..654f6769902b 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 947a70e1dd20..1fca90f01932 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 a9d52dda544e..56f3bb682984 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 90f718a34839..e0fb73196305 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 8ae9494faf8b..77d7039fa15e 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 d1d6e703e3dd..42876937a839 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 2d01d3204256..d20a4c96ea0e 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 cf484878b071..591fb7bfaf5f 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 7d79c30f4690..2cc0a4f60183 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 19f9e4e339e7..62a11d74fe8b 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 47016ad6ce72..92a127e8cccf 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 c61c2b587b65..52906223b055 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 df431f2999c8..9379a0b4bd6f 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 a84065e02186..7f1625c9265a 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 fce603c801f2..c76d082ee9fe 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 f3be948781be..355278d99da5 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 c9b7651bfda0..27c31f48a006 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 49da3d83f4a2..7919be07f7e4 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 855749c14b9c..2e1c863e0f4c 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 de394ca9ad6d..54e76189ec65 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 104ac4d222eb..4887ba5efa77 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 8e1c68fd77da..bf8ae119142d 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 bcde504635d9..b666884f64ac 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 206b3d7b6137..6839d99ba278 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 1e725d8056d1..586592bda10c 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 ccb2e201d7d1..4f38ea02d9cc 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 6d5a9876c373..09675d493939 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 e97785b5cacd..47835ad84429 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 e9964531c3c0..c72036e33f2d 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 8665cfc21a76..34c94cd78640 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 428fc6bdef36..0bda017de5a5 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 1877414f0994..b7ffbfdb87fc 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 4ce132e86caa..8db7016be6d9 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 0bb6159ff4aa..3277b7bff47b 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 17db81687ab2..c4ec792c1022 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 87ba488b5aef..4b66294ea7b4 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 e7a9383950ff..b8a11ef5a00e 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 72da02421b72..313d39eac3d6 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 ac3a4be3346e..d33158e89175 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 f5dab3c84021..d09e0a3bd925 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 922e016ddc80..18015a41564e 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 a6e6495a40a8..a0856463bc26 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 2ba56eaaed4c..75725832365c 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 0d46fe220876..902e5702fbf6 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 38bde7b9e8fb..dd7be374c842 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 4d50ea97b8bc..ccd3364aaf5a 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 7a096764e45f..e858f9e9e196 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 bd9f1ed663d5..11f817da7aa8 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 01079eea457c..aa080f6b985f 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 fe6567f22b50..b1624e476ef1 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 4ac07123d9dd..dfcbc037412e 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 87dacfba25b1..2cafe1b7aba8 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 79759daba501..1842ac4db606 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 656a95f120a4..aaf6a31eb3fe 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 eb7a12412c6b..37267329ac4d 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 e2d51c6649ab..fade3c441abe 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 5101de19d3cb..b2d654b0689b 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 3174227a7a1e..b0212414b5a3 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 b13b730d5d8b..994f41e9f86b 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 d6e18010f3b2..a14496280c76 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 80737a79899b..e864ad7c815d 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 cda722d2f0c7..493a400b9823 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 56237e387ef3..63773894a97c 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 8f8cc4523a20..4147d8e5344f 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 3d2b225f0cd0..50a2bacb070d 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 99397744fa65..e2a42aefdd2d 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 8f2cc45509ff..b4799eb12f46 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 15f429afb027..7239d226927d 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 c5f9a25a6ea9..3c71c87bb456 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 cd7941ed9af7..cd8ca7bb39f2 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 db61fc08005b..6464e16492ad 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 5cb07f558834..74ac8313cadf 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 8934a07fd4e3..84b903aa6aec 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 8bec78d6ecd7..7cd32413001e 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 eb9c0456a1ee..f4b0dae0a91c 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 b43f982283b8..b0f189ca2ba9 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 c1ce7d69f10f..7eb0aabb3333 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 fdc5a72671ca..08b0877be867 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 5ef9437c9687..8315e98524a3 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 88f829ea25a5..b6ea754a6527 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 bb6369d7f8ff..58518f3f59ab 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 6c72563322f5..809b2ad07fe8 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 625ccfe89e09..a1c3b35c2e7c 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 c1140bff82ba..b8b8168e4df9 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 b6c7c70cd831..24cce228ed37 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 66ce3e807a15..1596f401bbcb 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 0df41bab3272..9e0d46f87652 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 772743877954..9e4384b1a54b 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 170b87cf2528..318eafe74f7f 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 0edff5e4e339..fc88682c3c66 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 9556ec6da253..d610aa075ae2 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 2457a05a0672..cf26b65c85f2 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 ead78453ecfe..1274ad23be01 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 fd3b967d9d77..1c94067029da 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 327b0c14ae86..ce4c040644a2 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 a52dd792dda2..bf61dcaee3a5 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 44831a995c66..db169c8be0ad 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 0d19a75bb7ff..f1108e8bc434 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 2ef990a7a907..ed3d564c9488 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 d281ed9eedbc..293ce7b816a6 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 8a5e4a0f3cc3..7066e0a211fc 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 397a0f2c6490..dba9a498a1d6 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 70267637ae9d..82ef17ca6c9e 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 5edd0a9f02f4..88cdd472696b 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 feb43ee5aa4a..31d6d6e554b0 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 2006f9bc74df..db4af2f7ed3d 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 6e31f1b21e5c..87e91162a863 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 56394823cc51..ccb43fc88f3a 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 6cbe3d902233..384b0ae40e3f 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 b35657989efb..927083605294 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 82188493d52b..5d64ad8eeae0 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 6fb1e2559c0a..2ebc459f1974 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 c8f07955b612..011061dd8613 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 8dad6a89fd05..ec775c6748fa 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 07d7bc06d08e..776e0f95d09c 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 94b07e674e82..30457f2ed159 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 1896d0c87f4c..5e65d0888d32 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 1ce5cd319876..69738aac0a5c 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 7fb14eddc2c4..4ba32011c0d6 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 c4d762796e2d..6a66a0c60c6d 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 bcec2e32121d..7e9980a1be4f 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 e285af6660ec..a34c41795849 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 9284beea33e5..8a7eba0d2de3 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 22ce8f9fe3b8..926ebd897eb6 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 48c78b9c0676..9472402bce3a 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 a7bcd111dfff..c4a6f0dbaa07 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 4662fda537b5..783f8c06ebfd 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 737b2bbdb245..234ce8349ce1 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 d4422d5d1d72..86aa016c4040 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 30956655ad40..a0e6ef3818dd 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 8ad351bd343c..980070e580d6 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 054adbffbeaf..703d3c1e0fb1 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 ffafff5e9f58..f40b42288731 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 35d573d81884..b9266f6f8327 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 de9cad308014..c8a924663110 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 767098835c48..5ba42be35831 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 6628aac37430..913eceec0dac 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 80827cd567b4..17c2b249e152 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 0ea81b5aecb9..699b3a8c5092 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 656fb743ee43..619bffb112e5 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 674bee919bfe..277ffcc1f0dd 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 0e9dbb8b1bec..c575e99449f0 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 785d3aa5018c..3c727097e2b1 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 73bfa803acd2..31a404bac88d 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 04c3f3eb4340..34be9fe60140 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 cdcfcf9188a6..1a858f419992 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 bff470c28832..078df15a5b70 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 b14c6d594a52..f742738a3048 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 3266b37d3809..8244772168b3 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 70606a2a200d..7b691f0b69c8 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 403fd73d7df9..3543e3dae42c 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 fc138398634d..571907ea411a 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 f798901132be..7da61572501a 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 afdd301fde99..10f6c667fda0 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 c643496fa7f6..94a84f7bd3ed 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 10d87f9f43d0..e5e3e24ae947 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 985a6f39cd7a..80bb3217b5bb 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 9ba4224732b4..a335fbd32899 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 2f25fc24ced0..f9e08401c6d4 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 7e246bce9a10..695ffdfd618e 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 8038fabc1ced..55abea62e3b7 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 7a1d10a646df..1150b7f1c835 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 92523b76f98d..a1d539c8c22e 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 f51040358c0b..f20ea0edaa69 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 02015331c571..2288b5bbe70d 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 851424a11b5c..ec04722f9c9f 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 3c5cc84c6a6a..ccc871327325 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 5490822975a7..b5c3f6c2de8a 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 b39fa081a65c..8d902cc4b1bb 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 ae20a94d9fde..78fdfe4ac7f2 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 121ec74f8b72..e7c394efa092 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 09ed6a808e6c..dd0291e9d873 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 230f477b6e9a..dace5ab34655 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 9e844c72552b..cb46c3155a30 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 b63b534d03f1..6b3d258a2d29 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 79ebd648cd45..905c88442025 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 4f181fbcc7e3..879bd91cab50 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 aa46db07eee8..3640fb891de8 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 2f34712ecfbf..0976d7f1518d 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 3ba7bb217084..bf35b28bd4ef 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 6b932d01d55d..3874a4d0c5eb 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 1b54401097ea..b7685ac73360 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 0753aaa07978..9f6d84a55f89 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 de8f47d4cff8..ad0b545250f1 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 a4c7d4ff2626..f7e670865e30 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 4ddb3a7e9f86..7ecf510334b0 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 893bac0d5e8d..686725dfe3ba 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 608b4a20fbc8..0c5bffd97463 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 da7efd576d1c..f294ae1d6ac9 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 a0b1e886ca26..cd9286011e5e 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 0e3083484ff1..9dd12e3a0cae 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 a8128207c808..f7dbd7890793 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 a1316688075d..56155ae2bd5f 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 53475d280479..e98f7bbb66bc 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 944eee5afc30..33b56bca940a 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 4b7eee134e40..fe2db67013ec 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 d5af7bea5438..03ff706fe6ae 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 9a73e89063f3..98e8b2b04620 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 11c4ab9c5fc7..95aae25ada89 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 e6d5e64a15b7..7a82f9ce89a8 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 6e7df3094912..62e67530fc7b 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 2988af06556d..91aebc3bbba8 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 bd364b349e26..0b1e09f53446 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 c66b7c60fb4e..d23cbb611571 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 39cb74b709b7..1b687eb13734 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 5b36902ffdfe..46a0dccb441e 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 c770e0de85c0..ed9fe2d60282 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 061e66e54d2f..ff7028ce9b0b 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 6455854f34db..f1534274c86f 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 8cdfe247e025..3a440bf15ebc 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 41f24dde01ad..e015db1eb641 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 baeb56e5d78c..9ee012c05d9d 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 d34b7a29623c..a884c94734a7 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 cc766c0605c9..5dec55d56122 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 8431226a3ece..f28b0776fdaf 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 f95496a6c3cc..230a0524df4d 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 ff84ad9d2988..4c0fe17035ae 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 afab9986ce2a..84af57fb2156 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 04519f116003..84e44f272270 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 1fab9758c5c8..0edddf9423e4 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 42247798f661..b49c69d90cf5 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 6834c392d4e9..d50fd8cb8f33 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 b97fdf4df508..4a0b8362d4b0 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 d8c726cdd71e..756b821eeac6 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 41ebb3f5a14a..255e5d68e50f 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 88d396101dba..b89d07ec9caf 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 a4a8a5ac6ccb..403c8b806015 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 2db7f8a354cf..f405abfb2a2e 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 952b81584f30..b4ef75319e5c 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 4a6399c8f624..ffb2b306ae76 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 968cf08916fd..5e1795a1e6a1 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 01515fdc9d2b..94acd9223732 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 cedcf7c361c3..339df5688b0b 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 392e7233b567..087b5cea4187 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 05315b3f9f5e..ce1554b3290f 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 571b8531757c..0ca8387776a4 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 92b7c5deb812..b2917be40384 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 b151a9d3ab65..669e789caf92 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 af4946a187f1..53b28c2bea45 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 027644a280b0..d1ca6834551e 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 f255eac0c4b2..b4f2da3ae2da 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 4d38cb19e9bf..00a1c4429698 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 c6f29fa59085..c368f2650629 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 002054732919..af086750840a 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 8c2a59868ca5..5b4c561b5fe7 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 03f257a029c1..796ca7de790c 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 0ea736deeaa8..09fbaf24b8e5 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 3ced40230f01..b5edc7e646d9 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 1d90226a3f48..4bd3b96e4758 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 93ccb42684c5..44f071d33821 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 583470080a2f..fe3fdab617d9 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 00a866f220b2..7e78138a75b9 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 6316ceea156b..7018c240a27a 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 f6ab9c203b5c..ced73a40d5d8 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 f7e467b3786d..d85c6999e26f 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 effc329456d4..04f7ef7f0919 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 628b5cba1042..b3feda4a531f 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 ffd6857d84a6..61cc82558e84 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 7072f41066b3..7bd4e2c9d544 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 58ca5b0c1874..e1aa1babdbb1 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 a78612749329..5e42e27062fb 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 f7e9b8013188..41c4b871e736 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 7730f91bd6a0..b6192d653f56 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 af6b1334387e..9bd7ecf6849e 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 62b1820235c7..00d0faae8df1 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 1bcd64573ac6..2bdedb0cf91c 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 de5576682a6b..81cc6927c1d2 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 0e6f57c33f64..fead9b16168b 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 8f118782f231..7826d743ba56 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 3eacd775c9e5..2eae000b045e 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 dd76ecc5762f..586e7647df74 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 3cb06b4bad87..e42c5e3de064 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 efc73a21f16f..9634cd5fdb7b 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 eb176fed87c0..c08976c9260c 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 220e5526745c..e8f8a9417979 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 6f3215dd697f..9208d30d026c 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 40c5eacee3ba..aaf831d1983e 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 f3fa2dddaefe..be3102aeab07 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 d74889b95cc1..ff08aecfd9eb 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 b42152955f77..def9be3a1b64 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 c26cf5fdb5b0..01b346a03af6 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 69e47e82ba5e..0a3aebd63b26 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 fb351cf0faf6..a937e11eef66 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 8cf66f31a0a1..14848ca382be 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 6a7d81f045bf..5084338f8df6 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 2de62f6aff77..eacd3874c47a 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 4b8319a8304f..ebb1a234051a 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 3470a7e09ad8..53833e855e50 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 54ec44a1cf4e..8027e2c3bcf0 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 087b40ad6cdf..c12214be06e1 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 5e03bdb8c5be..021d340bacf7 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 3f1b7397301c..e12b174f82fa 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 c8b5c36767cf..8d11d3b9ce29 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 3634ee004f7f..040fcacd71b5 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 2af60ff6f53b..102112381d39 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 a7ed749f526e..6600b35ac31c 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 bf06765e5dd4..ff0c6e08a499 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 4d150baf5d49..277650b54506 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 81de974c2035..eb9d5dbe42a7 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 71ffcac40d38..cb3dbda63dbd 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 09070f0f561a..96b6303012af 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 e475b5728a09..3eb4a8946fe3 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 e8703bc77ee8..6ec4043a6e2d 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 83ca28167a46..015bff870908 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 0fe9ae56c656..9e793ec7c6d9 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 5cf169dfb141..a98960d74b01 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 51e7bed6580b..a27c375369bc 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 58fc74d65a54..07680a7b9b22 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 b8c4c1b0d587..a3bd36877cf8 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 c8c5c72bf95c..f08693f22189 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 721bb7281c0f..e392c5611ba2 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 e5ed09c600bf..bee9908bbbc2 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 cd9122656cd2..d070d678bedb 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 548bb226b713..2f391f1062e3 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 bfa1713e4edd..b8f67decd181 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 6e936bb3d830..20c909b1cbee 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 3d686f95df9e..cab3fe2f29b1 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 f6b48156888c..6412117b2a6c 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 6366bebb52f3..3567a4848e47 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 74f3c887f027..76a3b2563ca8 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 3b02c5a5ad15..fb5c61260526 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 c088c82791b4..2b1c967ed1e0 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 1389b1121886..99dda0dab340 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 9af98f870d2d..bf119ffe7edb 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 929b82bfc432..1568eddd3081 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 6301ac4a323f..fb5f9b0aeee5 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 9d7b2f2d088c..da071cfcefbd 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 f39ba5733840..7098f82f33ff 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 5be04d08a09e..33808b2077be 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 3e13b0426ecc..1b90583a5cb5 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 be524f87c9fb..41ab865892a1 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 97caf9083877..7fc927b1d64f 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 c9f7f09c7bd0..1a2af8098f59 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 0908a0bf39df..843dfcee420f 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 8173f8df11b0..151d183669c1 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 b5ea90bb0c7c..b310998dfdca 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 f5981261c383..a0c2cef0fcf2 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 60975439a33e..0fb355c52337 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 e4226b200748..0f089c5adbd7 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 9976a018b46d..55ba3e0d14e6 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 48ff8be6549f..afab4e980a8b 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 fe99fe3f3406..1792d8cef9f5 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 566a4a7adccb..f6e5e6c17aa5 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 5613c1916c6c..801187b6f5e0 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 89b0e3c55f9e..452e99b80ae2 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 7ae1ac4f5767..1f8bdbc5054d 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 9dab334a217c..9f6092211b92 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 3cfce459e37d..b522e0a816c6 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 3593a1d5c8d1..7c0382ebf450 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 e1071b08c55e..bed08a6c4186 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 7a51aac44e2e..4e452994f72e 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 1744046ddbb7..8d3b38eb9c78 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 f76724c8ab11..5b31ded791db 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 211f7972dbca..c243299a5169 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 3b7141573847..138aadc411ce 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 e8da52aad0ea..494e38c1e6ae 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 aad9d89fe243..2dc19b9ad688 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 8d34c1b6c2af..662f5389eac9 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 a08c2c8765ba..1caded0592a2 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 a6dbf3f08f2a..8c48307e4329 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 31ab94f624e5..6a32f4bec76d 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 607b4a49661c..da750f4ef1ba 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 0458b56f95f7..c73f4fc1f65c 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 da45f0d133de..1dadc5dfcb3e 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 1e6ebc52365d..1581137b02cb 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 1aa23c608234..9a5eb74bd62c 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 99e0931ab950..a48e870e982d 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 987df4997342..9218ebf86df8 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 cd4f2610d3f0..886fc1d00580 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 024b703e6f23..f3271993867c 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 d82237ccecc7..dab3df592f2f 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 1e6eb5bb3558..a2f05a47a254 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 7555df1b2c70..9746777ccf34 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 e1aba8eda1bf..41c5b9f5074d 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 55d69069afb5..582386aa7596 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 72b4028d854f..3111a21e2096 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 2d99cdd4f506..cd322fea6612 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 2e0acbae68b8..6bac99231b83 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 dfac9c0f1ef8..5441a015ac0a 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 71a8f9c77960..ad37a9680576 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 8bfb16760c91..986620b101bd 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 01ba902ef0c0..f309ea516835 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 73ae20495d57..bbc0a94d7277 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 8e4384adaa4c..c0a4472f416e 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 82a9a30a6236..17233f7efc2a 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 8e3269726fc4..925abe997e1e 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 229a918cdd2e..365955166e64 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 09fbef2ec07b..a3c4beeb4697 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 afb9992de498..869d44d9e3b7 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 af6ffe833945..e991b74a0f81 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 87eb7beb1ee1..a82727bff96a 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 8c992743862f..3978b909ed53 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 29bcbe16d835..9cfac8954305 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 1d1f555080c9..508826e2f77a 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 ff70f1e232d0..631ee2b08434 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 ca41eb8bc71f..282064dae2a1 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 8ab2e2797f1a..0615e5b3a15e 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 c4996674dd1c..21d629b3ca7f 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 4df26b0f2979..8c6a0fdb813f 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 ecb5e62c433a..600dba03b74b 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 6285d7786d56..e28bc9e00cbb 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 83dd6cfce53c..eb9cac228bd0 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 600a21b07be5..2e2a38a29b2b 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 4073ef8ac192..e0d4f461974f 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 99ace66facb5..e6ab932e18e8 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 b97fd7d1ffe9..3a173efb32db 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 58b79c991559..b19f378cdc16 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 1a23493a94d6..2bd8ea646a18 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 3edd588a1b39..b0279168fde7 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 63e56051d1a8..f0feea21f84a 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 317ff7fe8538..7fbdf2e9b16a 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 33d3487030e4..f7546a05bfdb 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 cc78ce8fea2d..a63e7c457d4b 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 d85ee5fc7046..7a74281b1f29 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 053866327586..3ef6735de804 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 eb2349feb29e..750804f79206 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 ecc8488a1529..6764ab002a9d 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 860fea07df96..99a8bfe79fd2 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 aabb6f830ed9..39a647580ef9 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 f7f4980b730b..e502f67c2b7e 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 fc541c696292..ed693c824ad5 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 3bbdf35af8f9..c04dbf475999 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 14c813cf00fd..75333af58eca 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 b43ac45075e2..72729e851e36 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 043ae67f2e15..62741a7454ce 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 91ea2e9fb850..caf080245687 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 953fffc4898f..624bb79006ea 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 99ae633dd0e7..6682a953fa0b 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 3611a956836c..0acb293384cb 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 c8c172f0e2f7..82275bf12b46 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 98de014e90be..4b2f186e38ad 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 fb328d67b75a..82556cc242c1 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 52a2b25539d7..ddba905835f8 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 8a96fdc5c63d..caca5c69a4ae 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 7490a1308006..3f931027d9a3 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 6dd1648c9b84..af6182d546b7 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 01a7af0aee40..ce653ee058f4 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 0e88b363338a..acbf3e3e2a02 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 75af60491e43..ed4786ae8d81 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 4324a0229a6f..a7858740f09f 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 7a9826a8dff9..088d7815f701 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 06dc2d4c8d34..e3488140dcc7 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 efc1f975d16e..348f75b2fb6d 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 e4472fcc1609..faf039fc352a 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 5afd380dd4f2..2504308bb468 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 7b9c2c53aad4..bb248ef71773 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 0c34c97e2584..c8ac477632cd 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 c4f738a34b6f..3567e2368e22 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 af65b79d3e83..4a9b7f74dd6f 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 d29710b6f54c..b77f993effce 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 cf5361e1e602..26181b612ed2 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 75ccc8d8e8a9..5518c2cf12a3 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 4e699e7f3026..705c2c4dc5e1 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 0786e66ca8b0..cde0b8611603 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 297b012d90a7..ae6e198c2ad4 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 d685a6f12010..4304e3bc1b4e 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 4a89238d07e6..5ecb6984cfe7 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 6924931cda5d..6576af0ef531 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 ce6ae3786e16..6c3310a883d9 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 f853117a9c6e..93a4801fa40e 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 834f2dc6cb5b..facf2f75bc4d 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 a2dd0a9308d3..d208f828694e 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 5251eeee8bb2..c43bf53634dc 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 5407fb6dd280..1e949dee16f7 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 0bddce49b403..fd4679b39326 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 e363fdb36e3a..6f90160866ba 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 0f21dd5ffe50..04d7723747cd 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 13ad1f7215f3..8acbc3130b9f 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 c6eea5323fd8..0f85eec75747 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 adcbca2a438b..ef1b31f1d580 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 c4bcfe5b2813..d2342ec1abdb 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 7d7a084b8904..86ce2a06cc00 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 089018a1cdf0..7cb98cfe0601 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 b7fee1d91d16..574602079d43 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 eed5c271f88e..e34297317825 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 e1d5511379e7..f43ac23b5ed9 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 3a97e35b4c40..05759fb26979 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 5b6f78a98968..927fa8d596b9 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 394d8f581102..5b3b2d2e1986 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 74b4dae22ebf..a5b15dfc9e5a 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 cec70bb1a0d9..ab21166d94ed 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 287a030cf876..5bc0c0d4b7ab 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 27bdd5fa483b..27f572e8b1d5 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 c8abc2d8f8ee..6fc96f27a671 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 1025c2c7e8ad..4fa4402db055 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 dd03fd3f754d..ccd073b80709 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 439973950f39..2a9719cfb5a4 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 3e3bc09a62aa..c1a4d2df2844 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 92268f1861d6..fa0926ee8bff 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 b33802e2bc8d..d966ef335d51 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 7bd5cff31bbd..d7c326b9e1c2 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 d7b68144ff6b..3f759837cbf4 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 3f677986c137..a42ae68f28e9 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 99b6be3358fc..31d22970e048 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 540a280f0a31..1d82f89d7a1a 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 01c933473ea7..b369544782c7 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 9f63a8617bab..0b31adac3665 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 79319dfe796a..0518e1c69469 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 6d3c0692970d..b287cacd4055 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 7b2ca9c33f6d..996f0bb8bbf2 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 a4e603de1ac2..73c8a6c0aed9 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 6207381c7452..00583a06c4c4 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 91a0e0d48299..b6395258c892 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 8dcbbfd6e649..ee9853b47880 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 7bc22ea416f0..0458e4520bfa 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 6a9e33500e51..0c3376b413f6 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 b2f768f4dcd7..229a74119516 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 55def937f486..a596860e176d 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 e4b2e4124202..c418351b1290 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 91be4efd56a1..926998315809 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 d446512ffc28..e9ab9f2cf18a 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 76b9a62ca133..7e65650277a4 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 30c8d291f6ad..2ac5dd7cfb2d 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 07ff5d23e0ca..11088c206fb4 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 a3829133dfaa..751700e5331d 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 e98912d95a50..7cead0fb7952 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 23c217a8f8b7..0ab04ebc6731 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 40c1405c39be..006923653d04 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 4a5831c5b73d..2306f079e5da 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 86da1908509f..72b4a831badc 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 8638fc2e7757..695e910ef3ef 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 fe106ff05578..62921fcb0c65 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 2b1fc97e3217..18ef20e78e0f 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 2e3d4e6a7c66..e36be26d003f 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 cd5500cb458f..368fb1979098 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 69847d6a8bb5..0963053f5780 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 9e1e3feaeec9..f69d4a4bf867 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 9b793642d07c..48d9e290ffb5 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 86b10a56c9de..739f2081132f 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 1f5562497c12..f3401f34eec7 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 511a9ad9a2a2..451ab44b1137 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 025e5176ff7e..524f6fa9b3fe 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 976054facee5..125d31c5f9aa 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 e0df96b0de8e..0ddb5497811b 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 8dcc35a281a7..0088bf0c3254 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 108fef8a15fb..cbcde9834fbd 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 e52c8356b52b..fecac9ec63af 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 6ceb13e94731..4527e33a291b 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 5350dcbb2331..a9dfa69cfd6a 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 557c171e515a..712c8ce945df 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 f776fc98a9ed..656e18c7e5b4 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 5f9ab66d3c89..c6596eff0132 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 2c9815864f01..d175444c0f24 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 5078b734b472..7c14e3343eb7 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 0565b9d22acd..897b990c1681 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 6259c13572c7..a033b51f7097 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 82f933c49ac2..1ea04e05d57f 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 5e880b48c36f..30d14be9d0ef 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 8c75c393a416..b9e8f020d43a 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 e51e30e3ed50..ed30c9d241a7 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 7d01404ce07a..28c9c1cc8648 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 2918feb05910..087431485ad6 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 61a5b6b83fbb..aa98ffe395e2 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 02546768e0e5..a045ab3d8a59 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 1e8f5be5a882..fcb7b5c66719 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 56092246ab3a..28447e10d1b6 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 ba2623bf48a6..955cdc3854fc 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 d44cd9587acf..3e5131cc3ed4 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 9da2467ad9d2..97321512df0e 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 bbb19f5ec651..e947985c0f6c 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 9dbefdd531be..0c01aed74066 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 2e95480ad412..917380164ec6 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 a3278007c119..32125e898135 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 d76c0da4bd8e..10845f32aa29 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 4df807ea4c93..0133e8a94b51 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 02bdbe8afff0..b52e952f33c4 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 79683522888c..30b98739db70 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 244293be7263..a1feaf2e1615 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 009a92e87764..0b082971b80e 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 9cebb622eeda..0cd2a0815615 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 8198c1816a14..b57dd02cd80c 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 30d87f90b30a..c3ad9c42ac3a 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 cfae08fccaa4..346d63dabe7e 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 feb1ab09dc9e..2f018851d193 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 c87d58f63e25..cab33735ba69 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 6ff3ab73639c..666b9f279ae5 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 9e69a27d7c4c..02e730e65331 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 42c3c20686b3..6d96c3fbeaea 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 b7c9cccdb640..dcab2bcc18ea 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 44a9a2a00a45..c65fedbe2c1d 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 7b53f0c536ad..d13a380a7ee8 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 832e6c888a64..5f0433d13fcf 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 6ba71ad30ac5..b764685dd579 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 535d87d8ea28..7797b5b7c069 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 f354cc885d00..066aa3b53ea8 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 ef06cc570d55..b625543da81f 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 d7a8aaf2f2e2..ff21e21b629d 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 b3520c42dfc5..eb04936a5feb 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 2b81dfc236a5..897c3001cc92 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 f92e8c12fca8..894423815287 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 fd640002c3ed..016d897732d9 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 4d461a0e20c3..0af312f375ef 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 ff773fc82720..f0b5fbf02d90 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 3babe1470fc1..0043e9016a01 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 fc0a232a93cc..4181c414dd89 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 ba28b6deac7c..b9c1790c5fb6 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 bff8efebca62..73dce5985a84 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 0402dfdfda70..da31f12a268d 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 e11d65effdf7..f48be1371145 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 deee42c3b84e..5caac06e7b98 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 aac5a15d3e6b..2f3b38d5f752 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 b76c1680bba8..c0196aef702f 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 64a4deca8c35..3234cf304f74 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 2817977b3939..c5ff4b3abc61 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 9c6a87279a2d..b29d7bceac80 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 fcc0b63f101d..510f38145678 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 501392b7829d..0a2ca6ef2c31 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 19703904ece9..c17e2cffa51b 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 14a85dd083c0..d9a56cb13784 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 b48783401455..1ba9e0900334 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 d770bb0da804..e80f8fa9d04e 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 9ad2b34b8376..a53766b660c9 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 de8bf6261141..97c64fd9c632 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 f65c5c866a3b..3803b56487f8 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 7b70f799ebf9..7a01d8a4b493 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 17797aed3591..4e555aa2783d 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 2c6ac9a00e10..71eea0ebb266 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 4fda5386112c..6b30fe5b977d 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 ba3b7fbf5355..8d727ced8907 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 be2a55c2d41e..96d6c62d48a5 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 e11b28531f94..8632c21e5f7e 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 aca7fbdc4f5d..ee1ce1a5d3e1 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 87f0986bae43..f4a588a2d74d 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 acb2b32b59d5..a770103c212c 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 694cb494a15d..9d657a873810 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 449a074f4b5d..a38bd59b4397 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 491105e62efe..e99bcf77ab62 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 0f658bfe1597..6dc4df17a2da 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 97615c104104..32c2ca7b2609 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 eb5ac10495be..7c6132ebd6ff 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 29a7d9e94264..d47b9f8a4e85 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 0b4dc3f4654b..79615eba532e 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 36420ec142ea..97c0bc83ad58 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 819a20ddbda9..de1000c1badc 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 ab7b0d81605f..03702426e0c5 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 b287283df538..eeba7cb3f2f1 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 0f18772bf1b2..de4d2250db3a 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 d369f1e71d06..2fd9210806b6 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 f06c6499eb0f..603d4e0d65da 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 a1ba53f91917..9c96ceb0f037 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 707e71b11249..f6ce052a2c70 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 0cecdf7a0ec7..70d3a327c1af 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 36adb5289aca..ebf0477e8cb5 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 4ed06bff8034..8c528bc0a1eb 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 27f1b8964e2a..d586ac0738c7 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 5a7f234d5fa2..868f3fe46044 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 04313872d271..4aff642ea958 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 b463848ae94a..bc5b72c3f729 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 1b491ac7efe0..5ac7407371d5 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 aef7aa35cf5a..936dfbc67d08 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 0da8b826c902..a57bac6e8412 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 7dbda69322e7..c82a091981b3 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 0cf3a77fd7c1..42e1ed6b6328 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 68fbee37d010..1a72b1b5e3f0 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 cbe1d0d32c64..746a74658ddc 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 12f9bba18d81..130223558cb8 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 e694b5c9b154..9faef1703ac2 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 cd4b40629ab7..e5fcdf979410 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 7b4cc176806a..28cfa59dd3ba 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 2df328cca893..51dfd45e7a3d 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 ec5747b4bca8..4e7e7ac67c57 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 363781f2daff..4beb0fbf6d0c 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 90b74eb46477..d97a74291d39 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 91b3ddcd84d5..5f7a496117a6 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 01184eea9b49..eb5569e003da 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 e775678fc605..6d90d23cd652 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 d55241091449..321c3a9218d6 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 0e60c73b67a4..0108f762400f 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 031443a1f5df..a8ff3645329f 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 6bf228b23aad..51ccd3f8c48d 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 f7199f1497ab..a52370e0eb08 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 b52ddaf89549..e809e5e4d899 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 d5efbdf78af0..581bab467f56 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 8eeb1cf07bb1..39d0169dd799 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 cc584e05a6bf..916442a7c4ea 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 f2a22ad620b1..7f479571e5ee 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 28991bde829f..c0d7964ea71e 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 69aba3ae9b4e..cde9f7d8edb6 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 b6fd22f5d3ff..6374ba00bb4d 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 1247055af606..04ec679c4d70 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 639ab1a0f3ac..3e41f12fa2d8 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 806d854ec890..d848f8260aad 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 02c27d5ce333..5a1490674080 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 c38fb17b9764..09a01643c5e0 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 5c194d18aca3..96508fa3ea2b 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 c31f0f9796ec..b04bec07d182 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 039f59a8838a..0902e7cc55ce 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 84da2e70878f..065079b21e52 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 3fd950e0dbfc..423dde94f4f5 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 0fe0e17be669..002ea792fbfd 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 1eb7dd0aa3e7..189dac4feedb 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 889f08e606ec..d503d137e553 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 f49efa2cf8a8..893024492b17 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 0f7282bec5c0..22ca93c0b206 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 62c249e58822..a55317041ccb 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 2652f00211df..02d8b853734e 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 413b1877a29f..31b71e49bd6f 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 b5152d04f695..e4ab8f90e4bd 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 1621a279f03f..de27417a78df 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 2903142f1599..456729a8308a 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 0c0a3171ee9a..05b18ca104cf 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 6662e46b1c7e..6a67cf593a56 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 ad76499591c1..5a5ac66310d6 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 792b29aaadc0..dd8b8d6a470d 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 649b3ed2a6f8..f12db6f0164c 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 804db985ae14..b9c84220764b 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 ec33d1f8b84e..c4409a243125 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 872822dbd0f6..3f1528088469 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 8eee1c33b0e6..6cc1c12a56fc 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 d90498e96ea7..326859c9d039 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 c96c32d5c0a0..7e4d45ec4a04 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 69ade1a7515c..71e095cc6fc0 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 49c9978fe155..e54da78614fd 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 902f8fdde58e..859e5dcfe0c6 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 c9e117089f57..8660b62016fc 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 9b629838ffdf..893b62e967dd 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 abe31a05f226..cad8b02910b1 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 f07c041717f3..1b4496566345 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 561e4fdec7c6..e933299f386f 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 911b067c4d19..2032723f9de8 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 832bc871a9e3..7680bce03b8b 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 6bf3c61ada84..8dae835a9dba 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 45356f359ced..7821780a9a1e 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 cbbe1f81df86..d6956e694570 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 9b9f332ca86d..ed6fe693ebf4 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 90c941c634e0..91cfe89e28a4 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 71ab4a33013f..ff270f3bf8cc 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 d52e6e7e9eb8..7cd3ff3d629e 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 3c2b7ee023b5..491f18dc4c63 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 42ed5d19deb8..a2970cb5c805 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 450e6d4202c0..85565a221ac2 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 6f2801197e90..326539436981 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 e29fa04bbd50..e4ae8145d712 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 8a92cdbc0f98..075c27c1cc92 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 dac46fe25ecf..6a19cc656d02 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 4e8879af54af..3c4bbcb3dc9a 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 3207bfa0e89e..e634e1d4a47f 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 0d5892a74d95..f3b97d3430ef 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 d883deb2845d..5dac17645d7a 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 041f3e15a29b..bf3cb3c3320f 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 a54d879f69d7..b3753b0d371a 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 c595824833f5..3d3533839bc7 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 595741b101e9..f909e68e7be5 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 0f9372c537f8..7f51815cb779 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 fc4d37714585..1580ef258129 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 5661db4a2530..a1c3c61484ae 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 2370c58a7120..f9d1450503e2 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 391872476fcc..07a1c9a10f5c 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 bc739785c8bb..17208a230883 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 3fcc621c9469..582900e7aa01 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 e7393166d8df..ba75a28f7362 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 5a90920ef3cf..4b05f3a1cddd 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 0483410662bf..3de0ab2a0c06 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 75ff4c87dc61..731ac0dddca6 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 636e8c4885e6..1c94169a2e51 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 363f753e2487..111f2cab857f 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 adba299ebe22..9455ec5712fe 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 1925c36aa537..344173852916 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 0f9a0c47425d..bd13e5d7495a 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 cc54c71c656f..36643c40525e 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 c16bcd0bf6d1..ea2279aaf0cd 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 4dd43439eb7c..91032662e6b2 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 7310aa0a0d28..dd4deaad326b 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 b97f0dd8a072..ab9b7666430f 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 407f3e2aa5da..41e4f267b471 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 75b210a6547e..ba5ea28d40b7 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 e6bdd23e8fc3..cdae26f993d3 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 99f99ffcd359..c1532aa9d57e 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 7783dc40fcf2..16c350287b22 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 f478b73329eb..a428611caaa4 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 6ce67dcaf1d9..d2e0e272025f 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 616f6668d02c..9d925c861226 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 b9194c6b3705..351ba03b1b77 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 a4445fefef57..35a2941633a4 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 22951147d7d8..0afd8353455f 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 24b6da16096e..32468f99197f 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 f36a5f1acc15..a9c92f23cdd0 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 1164a3a5b018..1707ed3f1bd8 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 ef1c7c4195b9..d6b1c865bdfc 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 f3924acf0fa8..5ba7a443d0bb 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 9ff20d3fbdd9..353105cb0a16 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 6f9df64417e8..69ccab201e6f 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 3c9d70cb556b..38ff8e31b334 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 ce3fa7b0c05e..612a21a47cf4 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 b17f4347be31..4ad267e3ddb3 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 7b1d1eeaadbd..990ecfc2b70d 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 32841f5318f8..47b4e20dfbb7 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 73dd71d482ff..f43437198763 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 7b2c825a2084..245a716d55ce 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 88bf42b685f4..bfd7e4714fef 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 aea9fde69155..4b1a1e871dad 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 08ba9ce7ecb2..6795f5d65b27 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 85ea81ba6796..2d1d08820849 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 6db2ebb9754b..2420aec50588 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 b0688e530ae7..fcd6612f1259 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 b6961275e188..0b579121ac18 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 1d7ec5cba17c..c0a4bcac11bd 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 7bbf47a38395..872b1b673ad5 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 86e40c178540..77e73bf5f8a5 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 456bc47d359e..855aa8581223 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 15a88ebdb118..6a4ecb9d8397 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 f925905de361..f4be36e08f09 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 ee28f5eb6d66..ddb46e597111 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 150723898bd7..16e5619e8e49 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 a2d405936875..f68744a13c15 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 6ec81a943067..3a80934b8657 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 f6360db9b5f4..1abe07972033 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 3397202bef2f..6174fa9324b1 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 d8b3914d0d4f..77e1ae697c57 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 c611c33affd7..94d89f88f470 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 2082ae7a9915..3e2c37ee8aa9 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 45f0bd5b6796..4f7b299b12f5 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 a7fc9da63396..d674ebb5eaf1 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 5ed973164a1c..1103fcb1f0b2 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 a3dcd92012ee..7998f1870b8f 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 a3dcd92012ee..7998f1870b8f 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 927134a588c1..7130234f41e2 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 30de74006000..42e13ad69082 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 39c261e1162f..1adaf2b0379d 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 954a1e554dab..b2e3ac9400e7 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 053c5ada5eef..caa2c707b560 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 54747b45f523..802f5ab3899b 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 e957be9c1c1b..032d7d5de348 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 d360ae0ca7e3..16300b0f5d53 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 ebf8b436f132..7934afc7b9b3 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 d16ea3dc344c..082216d557cf 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 a7a20bad5175..672aa2464dc1 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 9f8d25955208..a43cc5d36f1e 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 e359669c00da..f82023f2da55 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 5eabc3bfb138..40cb83fcabc0 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 dcb221f8c577..675a8323fc42 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 a1de0cfe6ca6..5d3cf2621acd 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 723e6ed22dde..8daa401748c7 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 5670cd458f39..7d74f1e90172 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 99e1a92dfcc2..eca701ce98c9 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 2f1d7bb5aaf3..731edc8335d6 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 3dcabf9b1653..0b0bcb710ade 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 162482d49abd..72f08ec3f948 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 7a4acea45375..6e1b2856afcd 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 47c03238b55f..c4a9f5f69bdb 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 ce0951eafdd3..f21a52050ffd 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 e1c1df99aca9..3a504604b6a9 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 848ed6ac7a8f..036ad1d54edc 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 42a7a0d04a10..18c8c756f32e 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 0105b4d223e4..0d1cce71958e 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 49868b73efa2..e7ed7a9f15f1 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 9a6cc8e9fe88..db7ff85d46b0 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 9fb9f3d2e3f3..d4784e53e6b4 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 a4611f2f90ec..cb1a92e809a9 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 be18c736f148..32e129b2c01d 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 bfa8f5c5a1b4..9f3dfebcc812 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 2d6956649a28..8a11074eca8e 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 c3badfd9b490..c6099c2a0c04 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 dc6349b10ee5..372ce2c2a161 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 b300f4593a7c..606a0c7b9d9f 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 a7af01e25b4e..9185c5158af6 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 9dc7573c9d36..0bf6490bafed 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 96ad5abd5483..dc3f7f33da14 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 02fec65c2ed5..55742a1b3838 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 988b61e3bafa..572337679af2 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 24ac5d2fbbf9..fe199147128b 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 d254f6941a33..0ffe7422fb31 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 44c492b43f0a..997c10ae5cf8 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 d0e4c17d4fac..dbc2dbc85276 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 e26c2d7cde23..3222fbe00ea2 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 aa0b04af28e2..43e692b895ad 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 e2756ec970c3..eaf92d413d57 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 01b642cdfccc..255f66707937 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 a68d73a004f5..3af8c07d7a76 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 a0cfea055be2..7f453e499d48 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 ac0d1f11bd78..fbd1d75067b5 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 15a98c779833..1ef9a6b7e33c 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 747f652d4af0..3cf8367a6780 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 16debb5b6c4a..89205fc7fd1a 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 3d6aba8455a9..01362f6fe61d 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 0cf8d0675e6a..7144094d8c25 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 740e7780de67..803cda091b9b 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 691bb63a2feb..bf4ec388c4fd 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 71e14d4dab5a..8f334404f9ab 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 732172b23ed1..b2b26ab39c57 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 1b7d3e20173a..caf7b6323933 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 b5b81dea73e8..619e9d748efb 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 63f3589c6cc6..afd88a148815 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 3c3c19df75d6..0225114e6c38 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 a3843c65034b..3d5cffa98552 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 424c99974b3e..9748ab3719ef 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 dd5f6dbc9dcb..3044c671169c 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 f5977effc409..1d7a40b72d33 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 9f9db067bf4b..91b771c6a68c 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 9510aae77534..ad7d6d663935 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 aade6b8367c0..5589d2d4f68c 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 52b8c86802f0..116002415dfa 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 477a2c650533..eb6324da3b6e 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 6f9308376415..9175ac8f92e0 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 e067bcdf34ad..724be160d06f 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 0844fc72045e..f6461c834a5e 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 33b1df827d35..17863c7809ea 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 b5c2362f05c4..74d938783aef 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 df635407af6e..b7e64d6dca6a 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 0c6c4d8dc6bd..cb768f63baaa 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 c59bd87065f2..4acbce66b6f1 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 b9e2065d0146..ed9e72390c55 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 ad8928b2043a..735b766bd0cf 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 e663f7fd4c9b..c201f026bca3 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 00b2e3607fcb..b11a885b3a03 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 56e78e78f185..e0f8bfe94285 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 fca3309155d5..235d255716f3 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 5319abbdf0e5..ddc12b9ef3c9 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 943615433549..8a8324e57eab 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 e31a9431558f..401bd82ded35 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 53748be8a02f..b00c878086dc 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 4082675129dc..969dbe5fad29 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 47b207ea9cbf..e68c94c370ed 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 522d0209c295..e2ddb989072e 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 7b137b4af56a..3bc612be2795 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 a9c884bdcfd8..4dbe2179dd9c 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 e94afee96341..a9a33bd5de45 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 05414f1db72b..7214a4fb1d51 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 220a34b9b0f3..9fc2e51c6ab6 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 dc0ecd365226..faa46cd5ece5 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 5f228b2863e4..cf17113a2826 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 a8733d7f157f..bb61c2462764 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 77517f618139..b8d0b088a894 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 f9ba34405f69..f5b3803f1553 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 ae0863615e2c..0ebadd80541f 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 ed2235758b9d..383003b2dd78 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 769012b1ba7a..af92e9dfa4c1 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 e3e3c293d7a7..2d4aac01fbe8 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 48a14b2af7c9..20a3b5a04da2 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 eec23437bcb0..f5873331c2d2 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 2f47b694ae91..0d3b4a90ce72 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 bafa204e06b2..21608cf04c31 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 faf9edd3b264..07dbf4729e6f 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 7fa808237bf0..cfdba5fda351 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 25817a2a63d6..a24c6f09d39c 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 d5fffc7ef9bc..37b536e644d8 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 e7a096302511..51441e8e782a 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 aa60a8d8a969..a114a9083134 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 c74a554af2e4..e00978ce66aa 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 539f015fa281..7f3d3217bee0 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 92efb42fe309..2b2370b0e2b4 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 eff8e275bb58..f7f4f4348afa 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 2cf8a60697dd..7741f828c474 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 b21ea4bcd786..39cc1b78fcee 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 e9137df0f1e8..99c85bcffcf8 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 2b308ef76e43..bef7f0f975cf 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 4af4031d278b..a69ecb353bb3 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 cc0200904e51..320695118d5f 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 c3c6ff304888..6cce4179b7cd 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 b5d77df3a186..08002ad3c58b 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 8d3074bcee9c..fa3988e09994 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 fe2c1a34bb4a..af565da3366b 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 1e7b9f015b96..0a788b317cdb 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 05baa1bffdd8..31b16ef3a2f7 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 cf7a2f1b0631..c499cc5281f3 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 b4fc40c3f2b7..71ff38a01453 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 97782ff9f0ef..8ce2caaeaa57 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 12bb8a73b7bd..15bff07f6e54 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 e97fc3afd1cc..8e85f0791d67 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 1ac0af1754ba..d8b20169ee0c 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 9a92c06e1593..6c966b5319cd 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 6c62010f1762..ade6335055ac 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 a2683808b523..e75613e04d33 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 8f63d5baef87..4bf7ee286e15 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 ba8d6c21ca85..984adeece6de 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 bab64a4b5ae0..231fcb41a113 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 2f6464668c2c..d7c0ea3eb2a6 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 7ca47d50335f..da28a14685f6 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 126e01de5ee3..7df0fffa41c8 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 6873c7ccb7f1..dbb560a199bf 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 c3f504ac1b9d..5eaa306e80ef 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 83cea8b43958..6238379b5a04 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 c557b5a6512b..ba198884c639 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 41c29e77da5c..8ab9be195312 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 010efee9f8ab..a9f20e827fbe 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 ce166724affe..b99e6aea6bd7 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 7e6f6ef0f390..5ace22311928 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 5d93ed0646ca..8b6aa82ea8c0 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 3d15c9980c35..a9c0b3bcdbd5 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 26b607f4081f..0ab3f1454572 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 85422d4d2611..d403487c001f 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 14d2d0a6c8df..995064719839 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 0ca23074c552..559428d4d08d 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 48e7f07418f4..89f58d3988d9 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 745df26e3209..eaf8294aa478 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 bfe24b663f60..cea60e6f4f25 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 435841877525..c62f83004ae5 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 bcc1ec03f262..d3e0965e5454 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 2a5721b7295e..87762406da60 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 47c3f13d23ca..d83fe697470b 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 cc5b4a64c6d2..d3ef6abc8bdc 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 83fab4b5e8fe..c9dc175b10a8 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 c4575bce925f..854b7ed62f05 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 976a9f49b9d0..95ad8073955e 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 27fae6d7757d..7f9137d95c24 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 56378b59e364..9fdafb1ff4a9 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 708965d81d8d..9dffe5640809 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 76c380c2fc97..51aebf88c95f 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 74623da14547..961ef69a3b96 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 2f4b0d575bb3..a329ba6f073e 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 3d05f11b6971..97e8ca17de1e 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 029855de2dea..1162490048cd 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 bd9e4ea5b601..fefed0daa72b 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 c847ac9e4359..dd0526592e48 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 03a9691018ae..65340b413e9c 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 991d79d41594..6562c54b0b7c 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 84540a3ff5fe..42288511ab58 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 26553f56b840..763d07db2cde 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 8d4a5f66310b..b5a90b2c8e8b 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 520db50f94ae..372c8b1511c4 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 b6e9e3d065a4..7a971a59c3d8 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 e3cc2daae9b9..c1ba0d23b6ff 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 a222e9e46210..dd1bda78a979 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 0699533e72b7..ce8451dd2de1 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 a9d0acaa26f4..751fffb17448 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 f1cf1feb0054..ff9bb1f2e037 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 70bfe7213f2c..2818be310be0 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 d09056ce3de4..0bd70865211a 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 176e6ba41067..e97819e4122d 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 897fd172b29f..f0002be4bea0 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 71e874100874..9c8fb500ba35 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 694e6dcd15a9..a20df9c9d4cd 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 203976079fb8..53e25112ecc4 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 74a54a6029e1..ea67b2541de8 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 a2c50bc022de..7be77b88494b 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 4a578c398a82..5e8ba2d4881f 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 12419c109c5d..4bace6d734ff 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 f289e58c50e6..ed884d128342 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 36f597450adb..43f1f43ba278 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 1246c80651f6..2663bcfb4f72 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 4ed5a97c172d..7b49fe8c7b47 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 54d68f100521..79dad71844f6 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 591f3659e98f..66ba97b1074f 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 9bc3efcc1c4b..7d3b49ee25f4 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 4a34f8b385f0..46a06bb8e3c7 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 4de22f0c9177..0f602b32fabe 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 2496e342a2fb..ea086c2fbebb 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 cfd8b2191ac3..ff84023ebf27 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 46cae33f102e..e56f2ffa371a 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 0f4d314f166c..2aaae17294d3 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 0ca67d9dc710..f8ff8b7d23d9 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 a3a9ea7405f2..f71e1a5ba8f9 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 2bc5034960a1..b3319950b42a 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 a6bea3858047..ebf0de4348ca 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 858d313fc323..ea2e696767da 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 aa5bed209eed..149bfcb8c99a 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 ef0e72571efb..3d3160c6e85d 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 f657cf6cdd72..47bf52b31a02 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 03e632263e67..364b07bf6922 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 4ec7e3195ebe..936e7aec52d1 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 2e10418178c4..377a3d9ea304 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 91f72eb369bc..4ddc7a1db580 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 01de901112ec..fbae052d0180 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 c90f91f6a699..06f3ceaac350 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 2c5f1394449b..66f6ef3b83fb 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 c8e55a0cc20a..f25ebf718b16 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 b351e22d862d..357d5520028f 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 b06a475e4df4..bf42e70a5bc0 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 c970e77abb72..6f0bafc3b1b0 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 caa99a159826..7dc531e9c2bd 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 4a85158d97a4..2c4bbe3d3175 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 d140b6162cee..28d1e1a0d773 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 2d4cddac9117..8dbc2c21ba95 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 2731bfd767f3..270a893474ad 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 d1cd4ec7b8a0..1068b28b3383 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 a89579706c8d..9e3586afbbc9 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 38103ff4f9c8..a349253063c0 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 576f0253e63e..1feb0daa2d17 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 e67a924b9eed..5b2890c89fbc 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 6a6cdcfee159..bbf654cb2088 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 9727b2efe9a9..6404ab8b7aa0 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 004255822669..b537ce8c2721 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 30da2130a313..befdf7ead06d 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 1994c3515ab3..3c4589842044 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 93ead5818d59..a1eb8ba14ca9 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 5f6d9dcc9ae4..42280a7ddb63 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 47fad3bb909e..6b0024ee0ee6 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 8d8559094351..89c956913f93 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 adf060a8292b..d5254528a128 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 69879ab7fdf1..a983fec05c86 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 8aca21bf10fe..09857c95e1ba 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 a83e291f999a..63d5e3b2ae6c 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 7beeb126ee45..0a75d3dd1520 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 67fd147ae23c..3e04eb41b98d 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 4b9b4d6b23da..019c45dbadc8 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 486683d12d60..56b385a16919 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 d644cec4d566..36314afd6222 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 cef407537668..95ebe6baaa38 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 4079adfc8b62..95ddeb15b57d 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 6f2c958341b5..281dce913ad2 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 0fad5433d6ca..3d88a2a50b46 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 4aa9e3e086b0..1b702f4f509c 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 6fd690a4d956..f424cca79d3c 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 93c1db914ea4..e8fc680f0422 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 3c9aa2669790..8f1f5a5048a3 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 042af40eda69..c2edb4286585 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 292a0ae298dc..3bc15cc948ad 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 d67f184720e6..5186fccd042b 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 760d4edaa98d..5a0b49a501fc 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 21ff19f7f031..dc2fb394f83c 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 8a94bcbd4cc1..ecd296aac7a1 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 338789c2e871..2880b9564170 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 d975aa695c83..52e2995ec587 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 e21f86351eee..69f141e8bf87 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 1805c1c19b90..6b80646704a7 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 6376fdb65450..17eb79e93d2a 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 62c96840b3bc..e827fa1670fb 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 cd71d7eed897..e71c2af0c85d 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 c291d8a5eaf3..90de1276cc6b 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 8b7c2eef2fc1..31783842dac0 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 d00d5d6f944e..819f0feb6147 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 d4fbbde62ffa..831cdc0e4672 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 d1e4317e5b46..883c5bb511ae 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 1ce05ba390d7..fa69a1d76268 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 07ed0f1b00df..530f0558b6c9 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 efd831123530..0a2dfa4257a0 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 9cce9a0a98b6..0cc25596ab68 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 b967e6aecdd4..980a2c01f23a 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 fc0c9a605fa8..1c4252b40c6c 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 ce7d8e3a7554..4a953de1768d 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 8f61c71d6eb7..524055d99b47 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 952548837e41..6dde2dfd9300 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 d708c7b4213b..722b463de09f 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 b10682521a4b..6af0bd422e3a 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 06e61ce680b3..eecbaa2562e8 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 73467f715cb8..131139470f9f 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 3de365675ad2..0d8fd7ea4eba 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 7e90d7586007..2f1fb42a2779 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 1ff44bd7f2da..08a99d357bc4 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 54622afbcfc1..4d2e6a7b23b3 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 f6fe9798067a..1437a4199dc2 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 f4cdd982ac64..974add438616 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 12816c235f8d..acc82bdabb5e 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 94b830de3e67..9cb02460f35b 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 40950938fc71..976d901ccbfa 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 f78255b7e2bc..369fc238d117 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 7cc7611769ad..95bb2af9b25c 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 4c1bfc03c9a2..4cf1f8b50f7c 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 f369eae3af34..8f52c0f47a59 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 5730ce165748..da82a489c1e5 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 8592bf430721..497a72da6c27 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 6b03e14f961e..e08e06a88b84 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 d24a47c53d9e..7650da845e34 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 773792c7a3f1..d1ab717264b4 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 f0e8e185e563..241bc8fda9c2 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 c790bc2d0954..afebc7b16e5c 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 f1283d0dcf5b..f371828606c4 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 fe12dad74f53..6cdb9f2afe25 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 cf3834952c6a..5d8044b0a1a0 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 23705b4c9e7c..c607cb7ec89d 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 0177dd4eae5a..fe16e29d70f3 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 63151002438c..d857099e7b9c 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 c7063b24608c..ea9ab290904c 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 f5ae28fbbab1..7edaa91d4a0c 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 29dc07f49142..339aca037546 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 383c9a1e9c4a..ee54a21694e6 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 f3fdc0bd377f..62e687f7f3fa 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 fdc516d3761a..7d85a122e173 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 95a0bd9155d9..878f24886776 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 2f0ae19fcb15..689c9f33af02 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 31ac5f0f34b4..1ba5a0ef697a 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 25f5ab90f7fd..58dcf416dbeb 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 04ec66b80d7b..4fc5ba1f7b28 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 e7b9ea3acfc0..5eaea683e212 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 25a2da707dc0..1eec15a4aa28 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 5f5a0f4d2671..f4bbb41469e1 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 8415eba887b0..75da3becb543 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 9af0ba100e84..3f4a2247edf2 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 bc2f4a7c1b71..f8cdc980daa4 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 ec1864d7deb5..dc9c2ffaa6fa 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 f32216f32548..aa60e8afbef5 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 638f8f571876..34c617dc495a 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 a95a748e091a..c95ebae33fa9 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 b76f1ba51a4c..45f50efdccbd 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 f93869352ea6..225cfb4876aa 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 f5f39ded021e..de1846e3e017 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 c7f6728e3f2c..fb2ecd74a659 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 95c5632258ea..d7d97b847999 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 71cc90e8bd17..2103b354977f 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 3b40b3dd8f07..c7053505567a 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 b8ebbdc5abc3..576c7545924b 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 3256b71660fe..983bcbea9273 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 86e4bd7e8f8f..b1789b1a91fc 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 cb386c908a48..7f1858fdb7d0 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 8a8186de5cc8..5c31bd656288 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 307a67160980..62fcc617b46a 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 bcf8a6731910..cf75908570ac 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 3653e62732d4..5441dc68bae6 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 c6f925de5d7a..96b0edf838eb 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 4e53b9d145f0..68ac4bc343c3 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 3339af364a00..3308f3e8e010 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 1910561d0ba4..731e521f26f8 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 b518e58d1947..60d98a6725e1 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 161e2d4d204e..e8704d215e88 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 717d8b2c2aa3..e76fd135dcd2 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 ab54af29bd6b..b89497241e09 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 ce31f6bea4bd..ff6704e393b5 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 01411a51c137..2a34b43f58d2 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 3ba098abbe65..b44a24e09f25 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 945fbad91f65..95edcb8695e2 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 12af8a8e875a..87ee190c01c4 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 233670681f37..4b4d2d28575f 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 623416a5d003..8737f03db1a5 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 e905da72aad7..e10c60085072 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 dd74cf752493..85317cec061a 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 c46e131c6ac5..e1cb5ba1c882 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 bab5df122c87..23814b284e90 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 37234699893c..813cd8645f92 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 ab0b71960821..98514b116367 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 ce49cf1ff991..f606d2489484 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 95583f80515a..31c7057d06f8 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 beb12c36dcaf..f9b0ceb22fc6 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 52db0d5fd84a..a5427b94a57c 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 15a6a63d5ef0..2f25bf8c734f 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 1f426b7185e8..f67e11e36946 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 03968809eb72..b5d7385cf28f 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 c086f412a288..76b0fa2d6e08 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 da9e92c0c804..96503f0711d2 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 d8c08996bc3a..6301a8637534 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 3db26a1ee5ff..5273dab16c16 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 cec3e25da868..572a0beff61f 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 723e358407f6..c92853fb5dc2 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 155ed144b3a3..0e03d8e20ae7 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 73aa78f09b9e..1ae3a8ad656e 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 039f072f107b..d379b67251c3 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 34c4a0f8f3e4..3b61dc115221 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 f27bf0261db5..cad776b98422 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 8bdacf2cebb2..ab83914d5e80 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 f20d2a424b05..a5b2f4884f6e 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 439f8bb5308f..7ac6a98e8e1f 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 f554c4d16c7d..a3da9be3a3b6 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 02b69565953c..9b05e6de671a 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 37f8181991c4..bcc25f6187b5 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 f8785a632179..dbc37506a17f 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 8d58ee6d92c4..56865d0e5db1 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 6779d508dd6c..52fd5ba8839d 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 3d2de5ef63a8..2a39ef28bdbb 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 c0de20822bac..6bfeae8559dc 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 e2e89a8bfa3f..ed512f14f4ce 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 3d6c27bcda14..76b942932963 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 bc98d389c6e1..906ffe9e77b6 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 20398890baf7..e26e2c882dc3 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 250cd7e1b25e..8e522a748219 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 54be3afb59d0..508009337a5a 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 6f4c5f45d0d9..9d4c9b2935a2 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 a95867514073..fc35d1906368 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 3ed701480b5e..77e1f6807d9b 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 cba3055a2211..f5482d7c741d 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 e7fca96ed9ec..538e89f22469 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 7d32c51f5699..913f92fa8e20 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 705355d91bf3..f6511b5f290d 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 4619a3fe7871..9d1c0f5a3412 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 43c8a0a23fb5..a070578969cb 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 ff4d32c28407..166f4b91cbc3 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 eea548c482ff..d3ac5fd9587d 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 48b329c5de14..534bb3423d0f 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 4f0eeac8f71e..0d918bc3dd54 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 ee2456da3e21..4aa785e797f3 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 111fb8aa506a..2c00e6d67688 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 c718449d84ee..6157e593ea32 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 836db951bb78..d103776406c5 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 30f55e0bd640..25b7165d0116 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 0c0a412420aa..a4f9b3718446 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 bd807cad753f..89beaa222273 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 4bf5b9b60a80..aa150f11cf40 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 4db7445b025e..5e9fffb195c6 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 c6e93533e7c5..ef7a5002bf16 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 50843c89eb4a..d6081bb87439 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 e3c422cb97c7..b01b73bf373e 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 33d97fe7c834..2995c96ebb91 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 6ab3bc846a3e..b0abd5996b1e 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 5b24eead3450..1cf01f7f04ec 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 c86623ce2898..632defbcf273 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 6c2e206796fc..9075085bab74 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 4fc5f64ff9a4..abcef9fcbd9d 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 3c4859f07a2e..920ec3484192 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 cee0e5929765..db406a4c3ac1 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 39e9df4224e7..74242931b4e7 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 7dc672edb54b..62a979b47c7f 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 99b865391de5..2181dff505ac 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 2df547b2e0c9..50ecfe993d43 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 555f6abd791a..6e4a7661a237 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 cc94cc819d66..683c4874e8c2 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 808b40f71b39..45a882850c00 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 b12b929f8fcf..6711a8f9fe58 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 23c19473903b..717c00a248ad 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 7014d517f181..50c432288ce1 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 8db9e0058856..6a039527b3b3 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 11b89ae1b47b..3fef98606afa 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 5f9f1e4a7421..1c497876a90d 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 b3f873057815..4d0f757b7a59 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 499fa7c1f27a..5d323612e411 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 4e01d4d3061f..0de05c6687af 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 ac802ed86dc6..a5693b3aca8e 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 f3c99015b6d8..b4290955be5f 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 294a07229fb9..4e73a2cf0015 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 e3b6dcf55a74..0ad7cbe8efc4 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 a6b137ba6459..d1c62c830a93 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 ca7d7b49a042..9b3dee11d9b7 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 43d75a6525f9..4d1a65214203 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 9d94c3ff61c4..38ea7df1aa03 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 6132f744b50a..0dcefb019359 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 a14b5b9e278b..519e839ad5f4 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 ee5b22778117..ab844b0bb906 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 d2c95d990ecd..68d84bae3d85 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 1f68560509e8..25b2e7fbe160 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 c392f59d8da4..1242a9e2b5c0 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 6309c0a02572..1e842049b14c 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 fbedad35b864..ee5cc0750dce 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 88d5c50a27d2..1a417b348306 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 8ffed827e908..73edba5817af 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 7b39cc16cab4..038707ef1ecc 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 140c24b9395c..2a6e0829bc0f 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 f66efec45e54..bd8220200654 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 202ffcc1d0d6..c43d35fea783 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 3c1934ade355..72fd46e0a4a1 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 9d498584a9d1..ffb937cf5d25 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 f0bab6010d72..40df0b6dfd89 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 6346b82167cb..a28198e7dbf6 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 eb967577ffb1..36c1e2ad93ee 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 05fd1b15d43d..1a09d8041e45 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 aa6f74cb5d45..8249da4a01d1 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 64d92bf8c3ca..32e8af65c7d1 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 022f9a5d556f..63f9927c6782 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 bc5bdc3ff9ef..a563332ad78e 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 57ff12a08ce3..a226e5b01362 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 c7c70c7afe74..2313e189aff7 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 d96dc80ea719..265b0d2f8021 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 5f476932018c..3f2ca7a24606 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 3a3e6f47067d..6e275b03a702 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 f51197b01c7e..d5aa24e71492 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 90ee5b3cd4b2..ddfa1829e3af 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 4a9f94306d5b..ff3b782ade92 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 a95781c6edc8..bf100755b906 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 8aa0897ecb4d..375178172bb0 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 34bbb66d979a..8fcd0c3f41c9 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 e5341ba7dbed..de7b0e18d521 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 54690b43c46e..d15a9c7abe15 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 ca3d66b1c8eb..654c0f6e4b54 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 f2dfaf3dd367..afeba012fa0d 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 486a422b754c..4fbac0021267 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 56ff9926ef11..411e99b603da 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 f48d549b3eb2..bb79e3a7f938 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 9cae6cf5e766..fa9cc5964fe1 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 1e57d5f95e8d..5276266523d8 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 ac2d1d1ed8b7..3ea14672e239 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 6fb6b50da203..86571353295c 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 c109be005238..1646f16e1ece 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 07741914f802..575445661afb 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 2081c9f7e26e..62a90c5604bd 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 dc9e42bad97d..a243ceab83eb 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 458e999c3faa..a3832c2e5888 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 81ff478aabc6..db74b1f02598 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 ba58e9e9d897..5a72f2fc74c2 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 1c6df0da60c0..28b4527ebb9a 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 e211e2c3336e..fff42e9fc3c9 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 0da8b7900a8a..0395aea63ee9 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 3bb4c7b980ca..539d7f2ed3be 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 3213e3618a88..d8bd9d64a7c6 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 82d4a4e325ac..a51ee78eb76f 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 e14121690654..2cb1a9561919 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 16e0b00b39a8..73aaab418369 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 63fd9db08ff2..b04558707e14 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 2d418b652699..6d9c5f30e06f 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 f9553d88d241..737f2c69e1ed 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 a966cf217e16..05cd648dcfe9 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 124e4d6fd419..86c1d10e903b 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 d1ef914bdecc..c06d20961c2a 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 308bdd6e28cc..3f80beb53f35 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 c560ca60dd3b..6bd173d48785 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 cb4e1b0d409d..713fd5027918 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 c7d4f8bd3206..b00b84238023 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 3866e0651c30..ddba8052b5ed 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 039b47ae7807..dd16d4da1bdd 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 304e37bf3d6b..e46114154f9d 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 69ef2700ef36..df3286721f51 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 4ec128a4586d..620090bc3ecd 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 519de1cad6ef..12f6137dd2af 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 fcb1f55c32f9..7660405929bf 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 72949d8c757a..238df225f0f3 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 a47013673738..99e3d9b4bcdf 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 782c668c843b..e3248c9e9ac7 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 4851eddf5335..97bddb9250a0 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 1c9ae26cab22..eff5d69bf84b 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 29d3fc2d5602..d5ccebdc85d1 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 0f799c3503f3..2bdbb2f229e1 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 dc534c64c604..c75421fb82f1 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 a39a8519aa98..50d74f27b635 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 81acc41cb833..a1c1c5821813 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 3ae84be05783..9ce54862265d 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 48bb8d36f555..771502894f13 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 305a9c3292a4..ff376b5a52c5 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 43460ec1535c..28c12aec665a 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 8a4aef46dd51..a4646d67c684 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 49171eba6b3c..e99fe76c0852 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 967edfd44157..f46bf6b4aa16 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 5c91bf71102d..97f80a99a832 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 1f4da46f8944..255bbfe90a15 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 a1b4de39bee4..600811071234 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 6daaf440e4b7..c8ebad6c5e07 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 ad918ecddebb..57f36b27d3c2 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 d19926a541af..8f57515415c6 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 11a1cc25b712..3cd16a2a598b 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 92159824eb0e..255e4243e011 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 d8a6f4c8d9d0..34518d906a67 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 afddbc799b77..211d1176363f 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 d094f71942fb..0b01efe7a7b1 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 dcdd1c21ee52..af360d958077 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 af081083a35e..1da844ab4bf0 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 32df520f2794..12d617bafc39 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 3d678ba041b4..2a2b88410959 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 7696a3108d1d..303bf7a57513 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 a477e476eb9f..b8ea7e871a73 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 3b01811a9e80..1691bec980b2 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 cb8c0d6edb6e..f2c4e484e5b3 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 318e3099f98b..cec32c97375e 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 491000b6510a..8ae8a84dac97 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 92fefceabc13..9ed9080e8a92 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 afa1bcd13fc8..6e0f294d802e 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 9b82121baa28..1939ad15f143 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 50d28a2f0c60..998cde44be01 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 e6b3f9ffab73..a124ca84f3c3 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 4ce52af434c0..4dd1fe461f1b 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 f47d5a347bb1..9f54d4258bf1 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 52b629e35c8b..e3fea3c94260 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 3df319b683f4..9b45e1665bea 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 474c9765595b..fd20bac80407 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 76dd1c2eb581..2c62671d0c71 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 a9999c226519..abd1f56d4223 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 8c8cccfb2bb8..7d90715bcc34 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 dd42c1e3cb83..ed07314531c3 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 84592f16a4ca..1299c4fcc3a8 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 d8c877329303..041147dc49dd 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 ad35a668554b..4cd46b6ca602 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 a4903ed2cb42..12e4f018466f 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 78cfecf2f32f..1db0adedcf51 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 7e9a3f802ec8..207f72fade81 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 e40f80d449d9..2457d2aaa044 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 2c5a000fab69..7e33f2279337 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 e6c29cee97d2..5466726fc9d4 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 482ed194c7a1..b07c3f6dbeff 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 3544880fade1..1ddd5a6dc0b3 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 7ac107150a03..a2d6ed718c29 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 0493811b279a..0c2af7e9f2f6 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 23daaeb0f008..d5fe4f6746d9 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 e7f26d021515..cf6208478c46 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 2386561c39d2..bd63246fa33a 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 10ce374eadad..fad8284caf5b 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 86fcf9af21fc..6a2f04e4511a 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 9e104ce6c4f3..d73218a38592 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 ac700fbd0464..8dcdd3a541ce 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 eabb5a5cecf8..08f6c8046dce 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 b45f1170b86c..53e555996896 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 db6d1d8fa2a9..653924077684 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 d20c07276a8c..8e483d08cb51 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 f80ea932001f..adfb567d7dd3 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 8668d8acd5b3..d8402cdf07e3 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 c8494612ca34..0e04680911c8 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 aa6378f8594b..acea242046fd 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 28fa92f2091e..6a29d91df738 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 abed9687b499..99f1ccbc5758 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 29c965d7ff53..938d7064789d 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 3ea4b01cd2bb..1223e15b2d9e 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 b524354d9a19..b657b3d3bde9 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 96fae0fecd9e..7368a7b2f845 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 e5b9e2ed5743..49fe5f927594 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 a1ed3c365440..e5a51ce0c06f 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 b5f0febfbeea..d395ac677e75 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 61d684c2a81b..9913d1fefe08 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 bad187ead81d..17a0da8c5f8e 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 38be6f5d2a98..deece3009871 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 5645a634343f..da08b8addda9 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 cfef270e5a67..e48146d07bc1 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 f564aefe78ce..d8d7167a4ce8 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 fc8f31fb1ef3..2060e708e272 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 a8553bd6bf3d..364def61da84 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 8d361314f73a..3b09331873cc 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 cb340f848978..0440789a480a 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 6e58fa12ca70..b10b5b90fd73 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 ed356275fc13..bb052501f8b1 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 155fd0d24ebe..f17891c45013 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 4e56cca33d6a..3b62cc73f93d 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 0e1db00a34ce..b5a3f07dd4b8 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 f2f3ebff2db1..c2f160bd6d4c 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 af421c52fb0e..c8f7c8ea32fe 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 4b0aeaab4101..7304903b9544 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 cd728b15256e..7fbbadac1e2b 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 151b9fe442c0..5f6211eb149d 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 25c7dde7a5fb..70c764f33ddf 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 7278c392d545..1d8bad20377c 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 1e7b7794929e..9ac0a297fef3 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 13c830cd0d4b..37ed729be816 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 6fe13e3f707d..97a042d3ec1f 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 5857a081596c..47d07f0df014 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 1bf494ba8f97..6911bfa0265e 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 2a20e50fa454..aaf1c17f59b5 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 1e20a5460695..c68b6d193547 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 16dfac53ad1b..b951388594f0 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 628d7876965d..d7761b50b4c4 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 36fd90dabedc..05f71623d141 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 b075809e93ac..f4d59f39952e 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 9378f4357134..bf3f629df497 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 e2f835c19973..8911e7a733b1 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 c877fb8aef19..eda48aa5cf47 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 aeac4340455b..a7c76e68d3a3 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 7eea1726cf36..dc22b01ff844 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 b501c6e1853c..8239b06404a4 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 8efe216989ad..95a3d43105c7 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 90bb8ca7537d..92bd9a279ad8 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 5c5ce6c987ad..66452c367767 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 81d075a98a90..64a48b9e8423 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 64aa2836a7dd..cb35a641c5e3 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 5ae6fb2d4724..13c35c8fdaad 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 ccc9971f93c5..468b7d8075fe 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 892ec66afecf..55d41f2005d2 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 49ae444f97e4..9862d4ced12c 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 77b5010f7767..364965228c60 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 f305b370ce62..d4b0b1e332bd 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 ec38dc40e610..4ca7d1d81b62 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 412028bdcdcb..70d0bee73326 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 199d69b45404..5f65e5451820 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 15355d30db6a..75b1824f0b38 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 97ed9ef309d5..4e1049f02fbc 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 cafdbc399616..45896ae81284 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 4adff2b4544c..5a6862b6530b 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 f7cb296d3b8b..54894cdede02 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 6ea24747b396..e967590c6505 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 afe333ed709d..532d1b4092e7 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 175dc879dda7..8a4c867f5851 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 10b50943c23a..cc170f60250f 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 ca1d0d4310ae..daffe806a900 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 9e5897b98925..1c6dd72ed2de 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 534b85acec82..3c0a235f3ec2 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 810895b1b1bc..76e2f8229a0f 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 137a0ede0b33..fc6deedd029f 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 b6e364c2f409..a7db1dfb15f6 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 8fc77abdbf58..9664567ec9ea 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 6fe9943d3689..ce9ef78ffcd9 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 9f5ec9f27715..12251509abd2 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 650700602872..5e62d0eb010b 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 f29a1e2a060d..c30061298d17 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 3857def9824f..06f30603c316 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 f74222e3e51d..20d081ecb3ce 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 c7fe40e7b506..bcf1b18a9ff4 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 b9eaf0be7fb3..dad16dd39e23 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 d90816635aba..2b61da02c304 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 4cae080033ca..1823f0d3d4cc 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 e2658295af79..47ab91177e05 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 f5015aaf5d81..7f0d2eda9bb8 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 4695497c3a18..f266db603bf1 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 6da6f398dfcc..769a1176edd3 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 0db1ccf76d99..23021207ae19 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 9573c9b703aa..6e4b909bc383 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 991c52321bfe..17cb4133632a 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 a7dc0eff43a2..986a8233ef2a 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 a2b11764a2fc..5692afe811e8 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 6ab7081cf884..8e91b1052a2d 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 c0e8837749eb..e9634ad9fd8f 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 492a9d5723a8..a0822459ad14 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 7b55d0f17e69..954ba9176261 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 3742f31abade..de349f43f464 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 303fb4fbc941..801a5edca08f 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 145e3a7928d2..7ed8819f3220 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 5235d53d84a1..4fa99d955c93 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 a33ea6869477..c675a8a41dd0 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 680449c9ef3e..ff5e109ea7c8 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 25f026f214bf..cd78c85d94b5 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 fe934bdeb603..40ad6a8d76a0 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 e5f245f6fb80..3b17754ffdc3 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 a7b6a2e2d667..1e1bdfa17bed 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 4505a34c716c..9251e274383d 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 0bc66e06e673..bc98dbf8520f 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 9e787f638a99..e55353810067 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 8c39ea531d24..e148c8aeeb2b 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 757e9608f1a1..89ebb0610dd3 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 8460b359ae38..41f81323e6fb 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 ec1997ccd5d6..26466bf838c4 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 3277df69c028..167c92f004e1 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 2b12a62d0eb2..2368cccef0d8 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 a361461a4ce3..aff00cf60bac 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 1c1e92c5bbcb..2d639a62d45a 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 44fd4bd07350..cc0fe35fc883 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 6f1e1f97708e..3aa66882c192 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 83f9b16c4086..9c60affbccd5 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 86459dc904a6..869742393389 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 90eba1706956..69b881e2a43b 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 3561f4012773..3793ee7f58b7 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 8930c15f57ed..e7b485503979 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 cbc0e8c061b8..8b473de4ac2e 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 6e87c7174c63..38d23fb84287 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 30aa736cdc61..153ce2cf0571 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 54ff89355ff3..ce3463069b88 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 92fd1f73a937..2a9cd9423915 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 309176fb0c55..99b780bcf5c4 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 aa796bcf5a0f..6d091a910819 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 cc7be9c95aef..89075b756249 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 35346199add9..6d5eec2365e5 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 f1727d0c1aef..9503037723e5 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 45f2601d307c..88c182c44da5 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 daa7cfcf9a10..741d9e476b3f 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 36e9932602fb..c0ffed27e6fb 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 7d838cbb09b7..2b5f1b7f1695 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 c62405554b4d..9ee8857b9996 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 aed7ddbcb8c9..1672bf0b4c33 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 0074f660c4ef..8b1fdf6c851e 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 34d5293799aa..279e860459d2 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 420a0ffd3cc4..654f26bf298d 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 8103a7ca47d4..6fde4e390fa1 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 730332853c12..30a8535faf5c 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 ad0b8ecff39e..4b0f7d84b75e 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 b15e215db0f0..ad52ea211270 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 c089c3308398..742152b6c816 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 0e835d49c6d5..98d79b5da656 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 01dca1ae16c7..3be38f8f721d 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 4907b43b9a98..6ce9dd1c2c57 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 0ed154bf4d80..14edc065d0e6 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 b7323f09daff..90b88ae57276 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 b5c3001599ad..bec2a82910cf 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 fb631f83697e..a2aee240da7a 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 114574b9009d..11da4df5285f 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 858f98b654d3..b965e0bbb107 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 1cad59f1062c..c3d33a1b4f8b 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 452288db08bd..27db73aaa2c8 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 505e7b84b5cd..88d56185f6bd 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 8938b8a6f2c5..ee9721c2493d 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 94b1a5203b47..c34575df368c 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 d09dff3a6970..67a42619316c 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 2802bea7fe02..f790e1a2155d 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 8e4fb6eae9df..6c941133a152 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 1a90369659bd..20698eed18b7 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 0ef39b6a6b32..6f91b1dbb28a 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 1257bab6c0cd..b72616bb28f2 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 e6241b761099..92904e2198f6 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 cc32b89234f2..48abd7efc7b9 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 15fbd4465a01..78ce85787d5c 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 092105df24e2..7fe7a4aa579f 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 2346ef5a950d..e081d7a54152 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 d16d40676730..081c45d6151d 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 a9b8126618fe..4ef660003748 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 c14e52dfe4cf..a0da8a740ac3 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 cfffd9eb0182..a7c96b69b189 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 555a38637a43..1dadba307c0b 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 b89a80c1307c..67e9a276ae48 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 31d5ff86e7c8..4447704f059c 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 fa8d75aec7a3..97733588d514 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 cbf3c92d0332..9aeda7d5b1b9 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 8c21d06c4776..e554a8c8ff29 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 5d623ed540f7..3856cd133e85 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 f028a4a3c6a6..0566302c4811 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 4b5c451e853e..e177c5978005 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 34e61fdf68bc..df2f90a0f16b 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 59fdb466285b..34ae944d1d86 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 caaba668ad7a..893d01637de3 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 d838edbdd661..c45288f7d65e 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 d07aeb6c029f..cb37d25273f4 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 413d5bf04785..f2e5fdafd9cb 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 65718343fc6a..4b37e5b381f5 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 e200840d2905..a6ea91e8785d 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 e8c3c9c194a3..e48c020328a8 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 7d3e05678471..a8a17e58dd6f 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 5d2c822a5767..33152a5d077f 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 a2870cf0f6eb..b425df4975f1 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 63ad7040d676..017e833aefb2 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 f4880446526e..76c909033066 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 5db3f74efaa3..42a65c701f76 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 3ab90d99af9c..5ceea056634a 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 3bddca43daaf..687b47fbe71a 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 c8a302a2c5b9..54aa470e59ea 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 037540a3e89e..1ec1032940ad 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 5985c74e11fd..c83c5889967c 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 60995170a516..d23544052362 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 158317efe478..1bda0ebf6cb8 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 5b91aaf9ea55..be754a28ffa9 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 25b0cef73d77..e4dddb325cd3 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 9151172fd15e..b550dc27f5c6 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 513b5bd13d83..81e532a89235 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 79b861702c78..06b493d58898 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 8e9cc84ec033..9904eddb598c 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 898e33719715..10f955881188 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 8e59c11e9dcc..333d3f258adb 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 dcaaff671b25..a4d5db2221d2 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 8ce4fcd87317..6444fb9dada9 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 7a871e744c98..f27f2233c409 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 e610c35599c4..f15cd9ec2a27 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 993d93790e03..9594729c06cf 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 6aa349ebed29..f72e389f551c 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 33e708769bad..509b532aaa20 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 24c764ff9587..32efc925a454 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 69f4744cc2a1..821425ea84e4 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 be45c075d733..8fffd19e2bea 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 911da7429572..bdef21f3dd66 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 64dee3e3c8b2..6f8ca7173fe2 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 6f8326fe247b..e5f44cedc80e 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 6e2d73c76b7c..0a00106f726e 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 991ea1d85d2c..94b1e188ced9 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 9290e010403a..ae608770aae3 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 0c6c654d60a1..2ed26f9a8a57 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 be5b7dd2a86a..4a309128199f 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 31dbacb59e1e..b5e6f658616c 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 54d0dd1849a3..a0d1db76d97a 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 fb126339dc21..296a60d24537 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 8b6ba131eb00..33df25e27b6a 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 7414a55869c6..1b8f0b463668 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 a18bceaa6cf1..a3d579cadccf 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 87d47556bdd2..c785736f42e4 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 136037a7acf7..d557f949c763 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 4b620864aabf..d5e076ddf50f 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 70227d869337..b7e7fd47c27f 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 fb75276b4f4d..a22f7a776102 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 3cbf41380e6c..a9194c9221d1 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 9cc466b28ec5..f30832044dcf 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 f88d23544145..2b68fef87c0a 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 400ac310b964..aff57df7ece9 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 4e26343242e0..8762594202a1 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 7f8933ac2ad6..495daf08dd22 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 4a0302bcb152..5bb99e2adc88 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 3052b7bb5637..4717304c5c6b 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 1ab847dcd8af..4a166b97bda4 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 98d43463287a..23c263c98058 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 1055fe7995ba..6e07895f1d30 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 4154c2792432..4c2f15d2e95f 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 e56a34218e23..76364f0911ca 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 7db56f1dce86..23ab15c31160 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 789443515408..94a68c7a1a6c 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 91839673c1f7..719913a44d86 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 be017a3f94fb..bc8eca5b9b24 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 af8191a9cb91..cd90771a9c22 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 65f2f3b89af1..b917cceafd50 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 7ac2eaa8600c..bde8450b9d56 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 4c58537e309e..e3a5c53671d4 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 ebc4b9e98b7a..7f065759b7a6 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 e59e063df99b..f7669100095e 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 7a54e28b3503..e33141f14c89 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 65845d2c9fec..b6450395ac6b 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 af5f5885d67c..3acacc4559c1 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 ae1e6b012c39..3889a423906e 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 85685058e49f..3c930def43b2 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 e74cf5a952b2..484490a5f780 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 972579ea8be0..1cf560b68325 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 3b43b1b83fa6..57a9a2d81370 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 cf41ac872c21..76703100145a 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 e87c402f8f96..b3158839de0d 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 74aa47fe4054..12f519ff2ca5 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 23bbbfbfc588..095afc4337a5 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 0b44a70a569f..f9dbeb68959a 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 04218f5643d1..467400f1c244 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 80aba0ba04d8..3f8567c3057a 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 d07d732c7857..353b67a382b0 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 f75a88aa8f06..a7a17d38c962 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 f8291112739c..17adbd2630ce 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 8d03b5158d66..acc306ec698a 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 cf7cd5d26ca2..519335605990 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 6b3d9ff4cdec..e14da32e1166 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 007101498238..9f786ff4b543 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 ec9a67399756..42adfd274a3d 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 6d18e9eca62f..d9b7dff26647 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 07389961c4c6..efd776391984 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 31a19161b6c9..07490ad45e00 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 c08e45975de1..804801ed591b 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 07ebc09b30ee..885556c1efe7 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 4a6542934720..a0a09a2a08ee 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 d0abd3ebf24b..f42ed64684f7 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 f83215856b85..dae2069502a2 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 a3921b8033fc..802558719f6d 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 f5f9b2f5f063..c90b7958ba04 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 7369b4938eed..d94410e10a8d 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 5b164f347e7d..244d946392fc 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 b0a6264a10d4..2a2f4c84eead 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 53ac398b8f52..0ce4bdef031f 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 20e558ca909c..0c8a4e45eb5c 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 f88179a940b5..7aa585ad8998 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 2d85e3878cc9..75e8f455982c 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 5c3375b3f286..d238cb7231e5 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 60fdf825a336..ac0af172ede0 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 e91e5de84e4b..062d56659b52 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 f4b338eb0af9..f9675ff5938e 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 08c07dd1a43a..4f59824396ef 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 62fc65731cd2..b37825bc5673 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 a0fb6c683f8c..e0a1cd75fd7a 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 ee378abcf2ba..ee82e45dc986 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 6b4642d2f985..32fb8509a475 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 c23eaa997fe4..7fa2f4afc315 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 3505533e63f1..01a92e435871 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 5b528d6e1e14..f615ae7e95b7 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 9ba01540aaf2..b355997a4b37 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 04904958a6ca..f858369f7ce7 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 05e3763e9d10..da41e17c4173 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 0335f72b7846..35ef6fc019dd 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 45f5e4ae129a..c54d3effffe5 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 9eff618c734d..2feb8a880b1d 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 69a7b61bab41..a6dc50a54ce5 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 c1425fa4243d..00730615ed62 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 9c9965d8fb8b..f821b83f37ae 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 ff84d2511496..4011f6c9687c 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 b9d2711fd9cb..7797ed13b002 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 aa3bce2945b6..2ceaaf0339d9 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 20c88ec69813..e7d427517b5f 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 5d5429ec895b..a1d5488bbbd1 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 f6ed9c82e915..ef64e1e65416 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 6427a50bb87e..f37765ffafa1 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 277ce8a77e97..177da01b154b 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 f46c6b6f21e8..858fa19a0295 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 dc5dc4f13c0b..def88453b6c2 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 aa42d4a7c41f..b835b08d31e9 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 8d88264353a7..b921aabf89da 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 41116d4ea617..285d192b44c7 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 17445341eb68..345f77850608 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 b9aab27142e3..1dbe4f35ca88 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 348586fa26bc..ab6581686150 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 782c38200a06..03913869503c 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 9366e94c90ff..3a45ec8143a7 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 8072691ae3c9..aa4cde885713 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 e130561e4667..d20c84dae3f7 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 c496a3556c84..466bcdc6be0f 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 7f0ea730dd37..a47e71afcf0b 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 604687ce7112..4e093bb2e17d 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 1912fa59b799..cc59f14e6a83 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 b315ef051907..3f83b0c1cd3c 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 bd85da1a7638..1963b8bd907b 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 3c495368bbc3..c32f4d5c8beb 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 2e8807fe639a..5df69cff3be7 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 b7ccac1ee521..0452472b3e2b 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 0d030370527b..98bc673be256 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 f3f1f2016f23..2d1b963d8d02 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 7c4154904391..d3616c0b1750 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 d6ce112ec93d..8d8946007676 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 f25b8887402e..6ff981cd160a 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 c5778c428ae6..13b284503bf5 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 811cf25dd768..97cfd1ff8fb2 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 dd4bae60d3e0..a6e6c5b73bee 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 904e2774b199..c9fd56b3a578 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 3254cb2c5bbf..d1d1c3391813 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 272e8800d686..7e6200882a96 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 6b37d6f0551e..5df8c48c7ec0 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 c1c54646db87..1372433e11a5 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 1c7facb045d4..17b3ad8b01e2 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 2560ffe168be..9c150c119d06 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 06c209c078f1..b294b147a91a 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 48efb07ff48b..9299b4d08b23 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 0a296f0b2ef4..49a46b202e4b 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 ce8d9848e425..61eb4fb66b57 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 90c2b612f22d..acf720bc97a1 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 0df5d842cb2a..58d5b5ead573 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 254091ff2508..7b936bc43b1a 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 9be72f559a9c..def63233e941 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 3a0910658b7a..b43df6341121 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 c1df9ccef227..df952504eef7 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 f754ddc6e08f..838d1fc29a23 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 deab7a251cbd..2edb80bf1b02 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 aa42874f7ba8..b1e64dabac7f 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 cac10af6338d..f95e5eecc48f 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 c2c16b28bff1..82d9dff38741 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 8156b6ef617e..86b63bb31e3c 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 77b792f98d5b..4b63452bf5d4 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 61d27f1eff19..c8cf65ce93a9 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 9d0e3068aed7..7ee4a4e4fde6 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 c995038e5a8a..ed69d26a9cb1 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 c995038e5a8a..ed69d26a9cb1 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 e65c8319d1ad..aab3f723796d 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 8bc8aca20490..193f967671db 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 c38105870e4c..c0c45a21421b 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 ab0fd0a2e708..40bef400594f 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 eeb2b8eae256..862e649b474c 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 9740742fbbb0..ce027c825545 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 a0e853fc3848..4b3fd0d9c01c 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 a9e4e4a60179..007f8dd8732a 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 21c0df0288fa..e9e57a5e7bee 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 da999f33e200..1e9cc4faaff7 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 4e5c2aca5e0d..667566bd2c6a 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 f4536f9c9e21..9807e95dd805 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 d6e95fd3ec40..60480718219a 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 59fc02000950..b4e9a067fe29 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 69d455f3b60e..f22a8f8408b7 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 b71bcd0fab54..37c78bc68ed0 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 f8a5d31a0f24..d2ead24b57ca 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 24fafa3d1b80..323bb06b681c 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 4d7fdddf246e..e2d8c90edcca 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 25106a66e7e3..542a64afbf2d 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 5c96e4d0ecb9..f2e48a58166e 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 15b04496ba7b..4d69f26b55c3 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 91c97232eedb..9499ffdecd74 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 c55634405ed7..c89ec44aebbf 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 966d6412870b..e3dcaca57788 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 7ee6b5d72889..88ed111c5560 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 f0639931c84f..5db873589941 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 d6969321cad4..84f2c9fc74ee 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 d75a8e2dd41a..cba951eef729 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 d3582961b3e3..0ef123efc240 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 ae81a2524396..61babdeb28b5 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 ea7ce98d8841..072a899e1bdb 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 92e389a938ab..ba0365b194fe 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 b6c593f316f0..f34d9245809a 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 5dd6f93fd031..3760bf9c0df1 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 3a9061340eb8..c955146d60ab 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 147ec7b9e2e6..8164948ef965 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 2412222d6d16..ef1291325aff 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 bb02cb75a901..7f0e7c3e35b7 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 9a0ec253322e..b12b4064990b 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 aa6a973d7bd8..bb554eb1309e 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 4ea89d5adff9..3ecc01b045c4 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 f23c7cb0dca1..1e1f8f9e1b6a 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 638fbf521c45..1d74a311ab7c 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 b4e9da0fc840..be18ffedabb1 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 43d71c2e808a..52c3b8f2aae5 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 b56471a756d1..f5059793eddf 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 d03e858438b6..092340d57bab 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 0199381fcbb5..9dbd9b6e5266 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 b24ab822d930..f0c9663c0d3a 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 257df13efe09..24631bdd6394 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 0d4b468c2b33..2eb5bfe80cfa 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 9b1edba41aaf..1d4fe7a3f0a5 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 06b372867767..e8194d7caf97 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 9609ea994312..a4492494489c 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 e65f156bfdc9..5a9d29c520d1 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 c2e9377e9085..c4a2da03facd 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 4b95f4d2dfbb..658f6a7266b6 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 9736027452a8..2f7f64be0569 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 99cad614c25c..818d021e60f9 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 f0aacd773401..358a7a32cfe0 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 47a480ad7083..7da0960068f2 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 d1d4f5602f27..944070527a15 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 224c7bcd5f63..c0bf0bf05ef5 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 bd51e9800315..ecfa23ee4970 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 05213f4ed4bc..918d72e28a91 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 6ccd670294c6..741c863db235 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 f33a5cab6ba0..bf29b9577db5 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 c5f477cc4500..e0c8da661084 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 bee5d4ae4b1b..1c47673cfc3e 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 d98c10c26c7c..e6e8c1c9532c 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 dc0bb8ac2659..90303a1fc3d1 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 e536e1164fce..b93a20a52bbd 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 feafc6c1b8c1..46b2d4e9c3f5 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 ad5eb66e5f17..558b433d794a 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 d7e793ca5830..202a5e27e8e4 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 43ceffb71e50..e87afe9094ca 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 98f82b792fcc..6a31ac17d96f 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 1381d4f17272..ab5d8587ccb9 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 5bcc8950adaf..37cc3f8cc25b 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 5a987423e5b9..72b4b667783a 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 c2ba939e13c6..8333a5b9a71d 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 74b5aa06e355..4371336188c0 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 cc81a64f2177..c9170f32373f 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 2d298aff9db8..3cfe94bbd222 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 4ae0cbd92ff1..1c4166136e34 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 5ad489073eea..d12cc81d09c1 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 383d7bc4cf31..1a3c1ff15bad 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 d9f0868b7659..d6c1b9b296db 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 559edf0e4f23..631816ca7596 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 84598dcd2581..1f575cfaca55 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 a83bc4150021..73c63cde2baa 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 caac0c504141..386aeeb6ad01 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 1f32d10b644a..0680fe6f8b6f 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 f0f4eccc676a..24e8062b1f37 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 5b9faca4911e..ade4e630fb2f 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 f0d710123cd7..064fc7c4ad69 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 0a951cfa91c5..41cf6184929d 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 f30d7e2edcc8..8e74531e7762 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 b2bf87358a4d..64e6dafd9417 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 d825cb180086..6c0b54d74ec5 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 0cf4b8068e46..ed0fbc87bfbd 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 b4fc3317487d..37d961293171 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 0e9f54088b8e..dbee924d26e7 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 5b910f1d8df9..80decd8e7369 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 f02aa9040ebc..623d6488aadc 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 4262a28799db..d134650f221d 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 0141c5a252f6..409824cc9406 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 3a6ab452840a..f691d6b5a928 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 425e2703c94c..583dc9e21517 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 80806dcbd280..dadbfa3ee9d6 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 bb25e10056fa..0bb2b93d53b7 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 866a4d10ff5a..dfa0b8015d03 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 ee204bf7af17..5222e833bcc8 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 a69ff356c6b4..28c358bdbf08 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 b7a70dfdda0e..1f582c21dfbd 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 359705bfc03e..73ec08fa23a7 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 8e15b4da35a4..b885352dfd94 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 a31b18ed5946..58988ec05d79 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 df7e60e39409..51d81e68043f 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 d9c28dd0aa6e..e3806082ee1b 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 461b923ccd47..4f67a76f68f3 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 4bf5e0a9e212..d51d3c394937 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 4f733b5bb16f..d5acdc45f92e 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 ac4ff1ae2dfd..3dd196a40944 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 ebab41d143e6..e4cfa54c8d8b 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 cf416c3fe8b1..0ca91ef294f0 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 6c72bd691b17..37099c1313ad 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 5b48fa9b7376..c5f2318ef0af 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 a00d1a75aec2..68eeb67deeae 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 293ffd5c28e1..a2562e3b4213 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 048c1aff8a9b..ea9d5ce6781f 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 07a32904a5e6..eb110869e44e 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 7419d3458009..25445c32f123 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 32a92e09b14a..8a4eb449d3c8 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 15ceb6195710..d76d02762c0e 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 63204c725c3d..121843214b13 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 488d268eee81..16853a315053 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 4fb8605b4522..51dbf19c72f3 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 22034472c71d..30662f072d3e 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 734b63324af2..bdeacac4957b 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 462c9670f435..7ea89433a18f 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 984f7edebd1d..ae10de7b2641 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 80ec3b9ee345..aa5aefe272ae 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 79f7d1206df2..d5335cef47bc 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 720f4b453abf..7b3b4b26b01b 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 d085db43aa94..6e1c81238369 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 051a905aed64..d688dfe95eec 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 b59f2212f51b..0b7c99e50121 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 2b1a52f25be8..e31c70472384 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 b832e4bcd622..30091253f4d5 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 1b763a9d868d..b4b816a5a577 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 9f0c87dcaa61..a43d2974ff3f 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 985166e095df..96d8030d574a 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 67e8ec8f13b4..0f2ff00c0cfd 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 30e2ed8b7a62..b76879ccbb80 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 2df6d08e7aeb..c2ac9ec11cd4 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 c14493013623..18d69ef1b53a 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 80904303559d..8cf3425db2f2 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 8cf91cf60eb1..e56a95d292a4 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 34373df3a9c6..3c9d3eb8e7ba 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 01629aaca80d..13500d006f86 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 fba7c33311df..7adea98a609f 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 7cd5717bc5aa..d87af58a0757 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 22de9c325459..bfe4241b6ba5 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 94a8d08c8fe9..644b12670a6c 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 80bc85ff557f..b6288619a430 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 a5511966d7e7..8feead7f1932 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 51990b6eef16..6ac6798cdb19 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 d0f0e9f80712..eaf9796df6a3 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 9ae23dac61be..254ec8f9bee1 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 4452846ec0a9..3c5652ae0304 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 2b140f86964c..4c4cbda7517b 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 3f90119cd895..4f268296fd98 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 ceecf9ab30bb..1a08d75aba68 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 9b1eb510bbd8..f007b45b8479 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 348cd2801397..63abd8b3b6f7 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 f260fc32303c..63eeb3374d22 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 84a2e5a4b354..c1614e0f7ac6 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 1af8d4ff8420..188617467974 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 c7f8d434c040..68c5e3b1a3a0 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 31bc20473566..c92c3999ce90 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 81539cb6dc15..202c617235fa 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 b17914da6e6a..973bbd70f257 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 4cbd6562cd39..40cd61fcc2c0 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 71dec40ea44f..6e16a796ff19 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 1e8b6788a60b..49e83bae6421 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 b29d2209fa9f..7860f54e7f32 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 2d5e90720ef2..16f448674b29 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 1f823fc559d4..661bacf45855 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 867bdf2ec12b..0fc8868e013e 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 1554408c174c..d22a3ef70c82 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 fe8192b0eaa7..3c618f0a3dc5 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 b3effa020c48..b9b9ae8caa21 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 8714be6449f9..9274bafa4159 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 acdb36fcdabf..99a548130720 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 7bb895e7d364..d14f7130b4cf 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 5aa1abb14d3f..7a42a2bba03b 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 3b6ef39c9fe0..5cd433b41c3a 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 5b1fa5e27211..a04f6a4cfb43 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 6c911cb4b0f0..534fb9bfd18f 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 af4a76caa4e1..e62c153df57e 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 2d5dd01e5bff..64432e4460ae 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 4d9834f7df62..279dc8a3cd0c 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 6242a00e0334..447a4c62410b 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 de120b6e084b..8e79c6da1527 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 ba330258d111..a2edf6bba018 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 4925019be1e1..19d328856fd1 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 7b286eb1d18e..7366a03232f3 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 947099fdd13e..0b08e7571db0 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 da1c740c4a34..4c2f92af1c70 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 5a94ccd74680..2a58af0fedcc 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 08a5c6c2b634..33c7e26ba472 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 e31d14c55963..d42aa1d613ff 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 e5d84e464fdc..d6897ab7b141 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 01cd32536728..ff448763f865 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 912e831d88a7..e94755618cf4 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 6b255b799b7e..ce4b89f5d999 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 9f591ba98523..8f2550651257 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 b95815bc50b9..7bfb84c88269 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 07c60fa0c325..e6f7471b93ce 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 dc9a719a3f7e..1534d5f862cd 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 5fdb710416f0..d066a2b6ba6b 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 82ca49461ed2..7a57ab0f9818 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 d38e65533869..577c6855fbe8 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 1e2ff12a2062..44a715e4cdca 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 77cb5e88bf71..7c0ecd190101 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 b4183d982118..29e60a265da4 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 a3c3933d7003..efe921b76af3 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 080e300232b0..2751f5d8303f 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 6624b930e5e7..545939b13698 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 5d928b3cab3f..9431655c41d3 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 98080b4e8224..f02dfdcea305 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 2b6c3c6a1fdf..613335193841 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 0ee3a03c3884..6a6b4dcff92e 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 0cade7fef02f..7b60b55eb612 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 f62c8a19031d..858d75f7a543 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 130abe4253a1..0d38c94ac055 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 374506366f80..6dd9d3d4dee2 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 fff380934e8e..33efdb3f08d3 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 2c63311e6597..05fbfec2ae57 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 761be61fa07f..d77ffbcbfa3d 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 35851690b738..b017438a8bdc 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 be6f0d6b30fe..2419686a8793 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 2583e431ec17..12d92ad2ec68 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 d419cc6fa455..13b7f44f0b40 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 f781fab2212c..881301c8ef61 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 6234b794c1f4..7239e1c98376 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 b655a2a8f63a..3a97e2112a14 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 011fabfbbe94..56e0cf68d8a8 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 7286121a4048..737bd5cd0f47 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 20bf0d7af03c..399359c32070 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 a5111c00a3ec..f917bff6d602 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 af2bd84bd53b..6ca3b96758f1 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 eedd877fe784..0a699a9ff40b 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 a50467ce82da..22c091e112be 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 26871c98dbef..6849e9170c15 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 a1bd7b413198..6392849f9159 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 ac547293c583..44a5f4fb44e6 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 c2efbf507fec..5cea9086d12d 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 cebb9b4090ce..62490604d83e 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 f773f09c3821..e2751eb60d69 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 89ca16fe003e..69b697978ed5 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 597d312fa5ec..5749fef46908 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 c17e532c17f2..29a3e1b4f14a 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 8af9e6f3d950..f794ebdefec7 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 4822a9b2c7ff..10a69ff61800 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 1350b7ca6996..4af596dd7ebb 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 7b3392b609a0..a96b777b1dae 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 9c52ca5577e4..7cf4aa6cdd49 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 196ecf0c1bb8..013255dc2139 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 22e42295eedf..817dfe821149 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 24d77e36d94f..71c4b660604a 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 aac918f2bc81..8d64222e1b0b 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 78296f4258d7..d90e57972eeb 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 ce3d15ac183f..30f5dcf2615d 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 4c0930f967d8..dbd633041d43 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 79df58b70424..58ce3a4f55c7 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 92ce103586c2..d64facb50d3b 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 70736ce216e5..6333dca34da4 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 5334ab5824d7..f0c7dff666e2 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 621c6ef84140..84c26c334f0a 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 642012812bd2..ab9c88a9981d 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 e0a680aa07d0..93ea3a13f4d2 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 9ea7726894cb..1bc773225138 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 21a110585621..a1d8ad47bbf8 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 60f877aa8b30..f61cf0fcfcb4 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 37dc519a2040..57e5da0a4720 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 46f00c06bf1c..ed9658e5b95e 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 6355f47f037c..a288e96d5309 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 692617eacfbf..407af40654e8 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 12ee8b3a9bb8..9106edee6538 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 c21f18015c11..e8b6dd864034 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 3119d83a0ebf..f46c76b3f597 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 7e76ab073b48..81aa41cda074 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 e691fb37e6c4..73658a4a939d 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 0d260d2cbc93..87134c73a2c0 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 583506f891d0..b545f1bb7bb5 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 b7c529d73b94..499602182dee 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 bfee95378bff..d0b42a12ff5c 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 7aa4d4959e7a..afa946976f8c 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 87a5392fd30f..4839e975e91c 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 b73197ef1bd0..89fd0d866149 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 4339655cf9d5..4526084196c7 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 88f6be4236b2..1f4928cd464c 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 bc03faf3fce6..630b25d192a4 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 39d7a1127b64..e2774d5d7e5d 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 2748bd3f73df..b3ac87178dbc 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 80371c1594f7..9268fc1abc44 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 3cb2c90d0d34..e5a22a22291a 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 007b0799bbb0..a0b9ac1078d2 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 511d9d263cf8..a767ef7a7724 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 6b1e018d2dc3..28d1fea98b58 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 bd9e51b6f594..3d3fe2579b54 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 0fb60840f8ad..7c8db6453610 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 c97a3d34163c..fd08fcc3773e 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 53315dcf638a..88d3ee75a3f2 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 6a947f143028..1a797c71bf4b 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 b3c973680b7f..16fb1682d4a6 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 15d8b09d2ecf..e3952dd00492 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 2435be623f31..dc78aeb51ed8 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 961b998c9566..37807776d2f1 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 e44c94b3219a..7e5c2d8548b5 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 ea5f033cb864..7169292b7baf 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 b463f4368d11..298181e5529d 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 8fe2453ca229..40d30fb9113a 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 1921d0d72bc7..99eb249d00d7 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 17158dfbc6cc..7898b9788823 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 c0e04d2c9734..1bb97758782b 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 cf2876b6eee8..cb82cb4878a1 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 14e1b40e1684..64994a558174 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 6d16819ceb0f..75ef0a274ee4 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 308101115e52..34a9a57bfed0 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 5156999f4db9..04784cac8f2f 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 6e030f1cc487..881c9e88c468 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 7f43e4d1a51f..9a85d1b01eb4 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 974c63cea85e..634acab8d47c 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 6a151fa49f88..2a73e49e1720 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 2aa34c8b3352..9408f6b9b4ab 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 e910b2a9f961..ceabf9f05dff 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 dd471154b4ff..ff7a42d8797b 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 e8b7f8f9f473..f4c8d0b6065c 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 ec6d05603578..7b518d466aff 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 ec6d05603578..7b518d466aff 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 d24375b2d0a6..cc5665a52a1d 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 933af050a6a2..55e349d32031 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 5fd3f1996ddf..aae450f41ed1 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 9d17c35dafc2..716ec2ed9802 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 e4beee9e737b..f189a1df0567 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 9e0782b590ef..51f1ac4ab14e 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 c8d8095a265d..73d6801a25ac 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 eeb511962362..29ec5b9bf964 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 0d9f0bec00fd..2cc70964b4cb 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 e11cdc82f32c..914b0b73e474 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 f381240e70a4..f742cd78697f 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 e540094a3ece..679d44baae78 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 f0f461ffec81..fb6636fb8151 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 a7d9d5024d31..9b8592b47d22 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 bf1f5e2b2635..1d063f146cbd 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 6ef1d4540b8d..18e937cb29a6 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 635ad783b315..a93d7cf35cc7 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 4d54ce32fb56..a38d0e2b2e3c 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 5498afb29373..5125dbafe4a4 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 e00c5caf97c6..4ffd850a5235 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 dca7918077ec..eeaae5c4c257 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 1eb29657c70d..735557ab491c 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 163a3870248f..00e10b97d60c 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 8700a88a36ea..aae1c917d129 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 f9d07e79fdab..a3a5b47e7e0f 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 fbf4aee02045..97062ec91af5 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 589119abb9b7..7a49d624a054 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 9940c40da813..0efbbc3ef651 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 6cee3b4cd96d..e39cecb5938b 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 23c054808133..391b056292f8 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 3d921f400725..39eeefeeef90 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 6745290cbfcf..22c3a8a634f4 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 57858b348379..490cd9315b6e 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 00823216bf6f..243f04b67d78 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 c7f05d763b7a..e0830660dd76 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 1974ec9d6db8..424d566e4393 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 3d1a9a6b1ad1..167581d2525e 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 ceec53ceb9f5..475544303796 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 fb4b389b80b8..46a59db1390c 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 fccc3259281f..7d9e345d516a 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 7af6a0778433..efa4121da923 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 adda0af88f28..0a578e1baf93 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 d977473a2ded..9cf5f05e9f18 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 89b3a4c9d6a4..4078bb070044 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 e8a86e3da068..9938ac9d65b2 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 da725e19e2ad..16f68dfcf9b6 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 a314db907b8a..4a8ea816747a 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 bb3a5c94d419..b745599ffd44 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 26d4c96d5243..1596f890bbba 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 a05b8d54dc10..10f474bd1b39 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 9e190b542db4..9ee9a2f50394 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 0497e4ae07d9..6574bf184fb7 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 2f69cbc94508..de2efdfecf14 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 c107ddd5d03b..3cad1f9aa77a 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 7654d8c44039..26f889910501 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 819b8b1e8abe..29ccb79a64f8 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 2083f9ba3dc3..4612ef424878 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 eb1872cc7f09..f20ca00b804e 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 fd8f99417ec9..36227a712cc0 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 0c30a39d6a25..3fbc80e0e99e 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 8665da89758c..2b726378fba5 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 ed67142ce3de..cd4e791d2f99 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 ebbce528a18f..e5456bdfca0f 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 c4b5f68ddf9f..fb92dd66e3dc 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 588fbe61b0e7..484eed3d720f 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 2a726efe8225..b717eed3fb43 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 9de39e9b56c9..577f1afa0df4 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 5242f7830bbd..b8a59339896a 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 35f0f429059a..c75782128f42 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 040894712a8c..f5388e09c74a 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 d959329b9fce..741844409ac0 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 339ccbc33ac9..b4c1e212221f 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 1ff6e3f80d6d..ad9792bc796c 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 e5ff425041a9..b30de7b7ee68 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 aa6380bd24dc..ddeeb982f64c 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 84d8b69603b6..e8ad9746b02c 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 0f4c29ec0145..c501f5d97ca5 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 6e50afa07598..b1bcc535d74a 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 e797aff94d2f..6387fd424352 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 84af3a651137..cc6c751813b3 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 d98c5912af2e..e08bd6e393bd 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 8f7b27cb9a05..efb61e9ed684 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 65b29bba8c81..3ed47b6a8948 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 c1dc80eb7c59..aaffbb081e22 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 d02725505ac1..6702f4249aa1 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 571028c5e400..0b6f9487ece2 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 0d6669146a62..8d7e305f1e35 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 157c58c459d6..fbc2ea50097d 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 9ec9d48d18b5..e25ddfce6f2d 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 397751e4ec37..5405ec3fb3d5 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 9b22aaef289a..faa4c6581af7 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 c9713c157981..d90294acd251 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 bccfdc611460..69162da12ac9 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 a73054c92570..acfc36e2bff2 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 5f9b0e31da5c..91362946f845 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 21b2e68264a1..a6e2840c7f84 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 c4760bc029b6..bca71e7e5c79 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 f178cd30cb49..b1a09e83ee98 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 ebeb3fe07adb..fd45f53cbd41 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 6af5b1868064..acc068cde7e9 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 24da2620c2ea..0e6e445fd108 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 ec12f8c5cb44..4433005b85f1 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 9900b8fd5092..11fcd3eff725 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 2a4e97f0ef5f..908669d337b5 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 407094d55ffe..35ffe3dfbfda 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 e76b09d4bb94..8c3eb523ec51 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 7b32a33ea4f1..b161f1eb39d2 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 c376f2067045..faf608bd7826 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 9d1fae7a234f..bdb9f8734102 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 602eb5974287..0fe0036765ff 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 d26200295cdc..edf9c5612fb0 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 c5f7f7235878..61ae1739095b 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 53f134c265fd..a1b146e23b6a 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 b556b24d6aa6..5d24ad2dcad9 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 ea7525d4477d..afde304e821b 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 a40e2c5f9705..797634356443 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 14e2f66068b0..abf58fdcbc81 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 ec55a262509a..48b405264fef 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 faacfe5f8952..4a398d15997f 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 f1daaeb743e8..ff27717bcfa7 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 a2fe402bccf8..ab003413b589 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 905c14dc5fd2..f2bdc346496a 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 c260148c148d..2faf39749c46 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 e46e22f001fe..37157706212f 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 2c3b099afdea..4f45605d6afb 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 8fe6fc41d10b..b489efe9ce93 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 40d26d08cba1..7ea9974564af 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 f3be9c6285d6..06cd07362c93 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 e7cf608765b0..619d265420f9 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 9e0e1b80ee59..7da49b2a6063 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 eebcfc2efecc..716bb99979c7 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 f8e847563915..66dce057d0f5 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 2d78ae6f9083..85a65300eaf6 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 a315981b6a69..f28a567cd4eb 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 6781c9a9ed4e..e0542edc2a52 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 66597c0acf62..c7a22c8b518b 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 f68100d4557d..8f2531a25aea 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 b37f3853016a..0ca7e984c881 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 886a25bbcbcb..7f43055ded6f 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 f01e5c44a67a..be682b38865d 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 d382e8b71971..57ba0d3bf56b 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 a6c9dd6e187e..fef4116e3add 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 8406b4e78f6b..14ac1dd42124 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 27d50ff3d57e..f00d4d3e8584 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 2f08ad3c343a..724bd5af2dcf 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 514b33e38978..f15394df3576 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 67899556f8ad..79d57bb9dac9 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 87bd397f0652..53e0b771f4a9 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 4b1056fc7251..f4930e3a55ce 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 5c37cac96860..f0a5b957b77f 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 e13d8e1fc849..1ac466ba1ea4 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 716a8ced5bb7..4921cdd5371d 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 89f222b0530b..8b532e19196b 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 a7f327cf53b1..27560849c681 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 fcc64cc0670d..47740e26fb6f 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 ff5a5793b209..81c8d3383b57 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 a003bff3c04d..fd6f28a0c76d 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 2e4c4c7f8a99..926d84c93e58 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 20da58a7e8ed..69fcb090959c 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 1f23e90b65cd..6eccc90dc67e 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 eeb1ddd84ae5..0f8f26b88c28 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 ca93655631f7..835088792253 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 71d59d8d31bb..f4756d42088a 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 f22caf2793fd..f4d04ca37bf5 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 1a056e582ff4..8921a0563772 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 d354fe4a7dbf..2ffa6b2e4572 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 ad6f04009b6c..9423d2c49493 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 8f9dcb94794b..08fe2c928302 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 ea3f74c9adab..438301ecbb99 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 59017da3b696..3b51b8050b34 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 8552c4b81633..a1faa512514e 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 5931fe009077..9690f40b2c3a 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 3c2e71f9c43f..a3bdc6a2bf7d 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 bc6938d4a6c9..c519403c9c14 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 4cbc252aebfe..10c57fba2448 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 342fad5f62e8..a35eeb257dfb 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 c1e6ba746477..b77c51e055bf 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 3b6dfd9bc5e0..c746d1bc5188 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 9b6cd191640a..bca0e005083d 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 a83c5b2e44fe..27e803ed61b1 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 f1433cbf4f91..291ae58c243a 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 5d4758a0c7be..054aa3cb2930 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 36aa74f08253..7a6bc6a8d73d 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 ec551d6cdbcd..4b96b5b77653 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 b0d56e9bb1ef..c16190c399ae 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 9e24b5106b8b..ef0ffb99c1a6 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 ce2911de986d..6dcb841fec15 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 8e02789fdd8d..830cc7c0860d 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 79c68fd25413..072d079fecba 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 f5a97eca21bd..154d6e339a7f 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 54bd13d7ebce..d584e919a2a0 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 baf816e53ea6..5c826f84be64 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 b4be03aaddd5..c7dc5d53a986 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 7cf346286ead..3499a80e956d 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 d7181200085c..f18d4db3ad4b 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 6c011c897da5..f8c45439d11e 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 7b02a70be094..538f55cc98d2 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 2ba61acadcb8..dd7b10f6322a 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 874c94d08e06..4a054686d776 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 8f0f4fd4a0d4..3661744284ee 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 b2a639218b99..bbb1054421dc 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 7f956dd7d10f..710e83dfb3b9 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 2d02b95288df..25a69a5fc4cf 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 ed7618a672be..a909b14f47b1 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 a643e50e9955..2fa20972f2a9 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 c9a0b879a0ff..fcbd50687a78 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 528d0b28bf6d..8b634b4aa540 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 67238df85245..b4ab486b2369 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 2ee41b0880e1..004be966cb49 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 c8bd44008b08..f1acff484038 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 48c7b77e5793..a7fd3dfa5ce6 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 ed5d1312f966..e49f346c8e3e 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 f74795e68dc1..2b048651cccc 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 5e58fc9c1ede..d078caa7fd1f 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 ae3054e7b829..8e903927565c 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 d142b5800034..b3c11e77d3b1 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 4e943b224cd8..cfd5691fe94b 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 78c408102070..3ff260252063 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 f7d87434dedd..febfa7241f21 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 2901a74f612b..5353405ca578 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 568ae3a8539a..363ff5df64a8 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 ab14c35893d0..20e6d7050035 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 99a2f940176b..da733e7b74cb 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 b1aa3298bfa5..b7e492444509 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 8393f15fc52f..452363997e73 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 e7c3462867b5..21f417d0e633 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 21aa81e80926..b4ce5328e62c 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 ada643c7ac04..be0f5921598a 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 bf4fddea14ba..b604339be9b3 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 1cb1fdcb8c96..3c433a4e27c9 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 a0d1a973764a..3d26d4f2c911 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 d914df380629..aa7a7453aa76 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 db65601fb73e..6a0d71c9797e 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 10810388d203..bbb9b0270f26 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 622818a926f4..c1b7789d6de5 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 66f9cdc5567c..ce2b041c26eb 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 d07681453a23..b05d8539d584 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 bc918c7a4dc2..c4f9acc637d3 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 5dd2619330c4..dc50d8b9dd86 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 b1db05afd080..de7dbb9052ed 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 fcf4f367d042..1600fd0af3f3 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 c8408d16fbb0..37d94830db2c 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 0e3c14a5770e..6e5f8d6cd12d 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 0d2518dc2531..86cc7adb90de 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 57b79a56b7bf..cf47a1e67aed 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 66321bc35f01..8065d0dff8fc 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 1b8ce10ccce7..3a14e0c64fd1 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 ed94c27cf05c..9b8e3216a686 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 950e70153ba9..6464fd6f2fd2 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 04924f0efa6f..787b927c449b 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 e0bb4d98525b..67f6b6ad1cda 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 f83ace8fadae..60afc3b44506 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 570191d2c90a..82e05a7e0e2a 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 8cef833f48d2..492bd2450b1b 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 2e929fc1dfa8..56d869f3dc12 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 aa894c83910c..a16ebdc75042 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 576120811dbc..ecc6aabe8caf 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 00eb7593799e..ec1ce1a1f925 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 824c77d9de52..b579143583eb 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 07022bb01e3f..8bb3c9da3051 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 946b5bd5d933..b36aca1576f5 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 dd3ad2ef0ac0..4d1001baf59f 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 f2b089b74b50..bdd4b058381c 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 e7169903f8ea..d3bff8ca10ba 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 16f9139e6479..048f5d68d342 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 4024bd20b791..1f0d00734865 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 eb17ed92711c..b16394a1920e 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 ff059ad9e15a..449c6bca16bc 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 04a31fc1ba37..5f8a0e9cdffa 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 55e2102e2cc6..7909bcb76242 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 55edf3af7d9e..3e917897da45 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 55e2102e2cc6..7909bcb76242 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 06464ab0bc94..1d15b8386af9 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 09e071ec4542..baabe0e90c45 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 4003ee37ca1e..da56fe03184a 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 bc9b6be02942..0f5723adec98 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 c50a6c034b59..d070faa65745 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 0fe23b02aa9e..c9ced4734fc0 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 57c5966e9604..06fd76f68df1 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 b8ec575a455f..b5b9e3e65777 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 0af706615e31..2846f540b240 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 1e413120a371..a9f0cdae1f6c 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 b9f1de7ec13a..84297de364bb 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 f7654458feb0..467f002699bc 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 97a814f51eec..b69b893ecc4f 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 a114fafb6473..834b2fefaa80 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 ea471717e883..82991d20df88 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 53f8a8bd30dd..e332ba83b914 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 3a1c341f3ee5..7e3b930d6e85 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 10a4bb673878..13efdf4ef5bd 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 46c69d5ba9c7..b2febe292105 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 da7a8b65b97b..2b139829510b 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 cc17d9ecf05c..475f473b1c59 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 c41e808e170c..4c913d4ba3cf 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 6815c87edd83..8dba1a6c6001 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 b5f3d0f74bc9..daba393a3fa3 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 a3e26a41232c..b1a81fcf2092 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 9ea4545268b4..c4dfffa1c9ee 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 9630e9a03270..b0b9000d92b9 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 9c8a97e7e6b2..8d741927a41b 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 46a0bd35d6ad..d41ed43a65f1 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 2a8b4bb49227..4809bda85810 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 72731cbb177d..135955cecfbf 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 c13cace76008..5bae1d7f2667 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 a3095f0be83c..d49727146084 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 d26d883040b4..6f9527fb337b 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 ffe730743241..8a23d906757d 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 423481fd5f02..785307df6138 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 e4a6f6d6fe44..a155b5fb3f27 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 18cfd5e23950..fdb98a0accb8 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 8da6a9ed2049..f8514568d157 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 53e9ea9a5775..855686f55c32 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 52120360be71..90784a4f4b65 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 43f6e4913ac7..4fddee6666ea 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 f162dd60f503..25ff0942833f 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 caa6d184a92d..dbd952252cee 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 f9a39e486da2..338a3156a9a9 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 5ca54633f219..e57c83d007e0 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 b3644d8d5943..882ed43c3699 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 26798c3dfc29..33837337c151 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 c30d4fe0a13c..de2762994829 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 763ea740a274..919caf9428f7 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 37ddbe99a9f0..c5193b19d9e4 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 bbeae41b8bb9..c1387f7d18e0 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 7d4e005be10c..971f29116bc1 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 fe4275f5367a..1643b6bfa181 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 81a99ca010e5..265ef93425a2 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 006e315b02c6..d058c2da6f28 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 852747d06b55..a9d2bb6df8e7 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 8df58a3486eb..9f323a8f77d2 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 f2ace32c6b63..8721dd85ac78 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 5a46cf35dec0..08ad6483d089 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 +//@ 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 +//@[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 00fe32b7c152..10d7c8cfda06 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 daff037b27bd..c3454b38b45f 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 9c0b952849ea..b3979e75b612 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 f42b72e9f9c1..4d7d86bd354f 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 787191a26fbe..b2765c4764a0 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 21d983f192ab..1e1090d69553 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 e7e83cbec775..09bbfffcd553 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 79b70a17ca18..a0c0a4e05410 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 16487b54f174..d8b0d847d74a 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 ffa7a552b25a..63594380753e 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 f738fa19c852..d26b9663fd02 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 d1bee676c2f5..f22e93ec245c 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 b768620cd3a5..9130caccdf72 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 d6076126732b..a022fae922e9 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 2fd6c3bfab86..373439d25595 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 01692abf9b6f..c9855b63d1ab 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 018f0ef9ac56..8d9b8d8bbf49 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 f3423e97a8a0..ed6638ed82ba 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 74ba1fde6499..379f61ae818f 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 97644ba8e094..5f484b8b3be3 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 8534bc71a3a2..ca63a4711cda 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 754698591e33..fe8ecc668b86 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 fdd4864250ac..d3717db77c78 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 b4be7a50f61d..792666b54b11 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 29af21dffc19..68bf45c6e70f 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 90f4df739f12..74bab91f6dcf 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 1787f80c07e5..8f1a3ec8fb59 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 04f410b77a3b..0dba5784daa5 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 37fd22a9dd2d..b2287d94add3 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 b5d6add043cb..16b8c8354b0d 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 179af6170906..cd25a576a50c 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 178c7916bc59..c5dbc4ebeb89 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 cadfb3b66f29..beb7a7928c69 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 1f61a5dcfbe6..8ef0b86a26b4 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 72ceefa4f4a4..d66d5c5ba506 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 57828feef2d6..e7a8fb652689 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 621ba566ee38..c088d0178d00 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 14a45687875f..4d0d2801ee98 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 517a172089fe..0dc6e5afb559 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 5e3361cef6e3..b1778954f74d 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 73f3405e3ad7..7dda1771b395 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 e9dfc2840e59..4e4fbf50ceb1 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 fc85b25519ab..34b9f9791f39 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 fd9d6b46dd44..681d23ced708 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 878ad4e475a1..cc92e75c6a80 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 5f9eb2bf437f..411b978aec66 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 71150a80bc0a..94b774758341 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 1ff6b4d628c8..0aeb9edb292e 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 550bd452a809..5638449b684b 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 3749d5ebf81b..0ed4d4723731 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 1e99faaded4e..610622f0c31a 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 03622358ae1c..06d210e01033 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 cb56eaa0b13d..e2ec4076b499 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 a8741befb0cf..2bbd09161300 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 18473e79e86a..d8a42e8fe028 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 e635caca9fdf..15b1f7fa6b75 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 1d4ec11762af..df315b17200d 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 a6a576220054..ef8e3c80db81 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 0c37346eaf80..bbda9976c157 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 e58ba50a9e58..31dd23ffa835 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 acf4c20542d7..4a5fdc653301 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 a0d1f5a780e0..74c980002cd9 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 96b63e93a9ab..05e8bdc84724 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 cb507eefebbe..afd05f477e59 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 ca3d66b1c8eb..654c0f6e4b54 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 1c675788ee93..59459c672281 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 d39ae6ebf1da..ff305ff4962a 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 f25afd5602d3..04c98ae4d7ed 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 0e4a11467dc8..806d09cda851 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 df38e901e732..eb806378fe54 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 246a0b34e5db..42dd1b963dc1 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 f34a2c7de37f..5dea1cb3567e 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 7f5700fc897a..b6281d4b2a8e 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 f3731996cf29..9029ff6499b0 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 e36e8bd746d9..60f13b96ee2b 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 fa0f9c2da413..580accabef42 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 f67b07354816..8d283e27dca2 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 04a23212e7b9..5c7cd834c2bf 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 09b1279ef34e..7ccafde76b88 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 7c135250940d..7e2c0a9df6f1 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 ef05ff9ce03b..e47fe482b3cb 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 cb208401313e..0b9e37740eaa 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 0d3fbfe5d1a0..fce6d1d174f6 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 8b3cb703dc0d..d8b05950c55d 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 e2620682679b..2f916701d463 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 bdd9321afd7e..8895ab126bb1 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 9fb5896de6b2..87b471806af5 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 9e04d6019872..b36a2c385d0f 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 799bf7f3a12a..16572daccde8 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 44454f8f4170..2b7893b318d0 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 a0e615a7387f..95800c68ec24 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 04570055763a..a06b9efa4fcf 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 7103533e1da9..d88f4d504b72 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 9dc0acfbfda4..7a5b2182e26d 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 4574dbd8529a..eebc6c03f448 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 38e443d8e39f..a6a56810e450 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 03d3aa5ade63..7385029ba45f 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 9c340e4e0366..07d3b86e4a53 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 6a5a4dace649..b0749f565da0 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 b562f9308141..5c3c8b999b2d 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 e9446da9e391..e3cb9a96de0d 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 736d580e2da1..c62527f01d38 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 19dba497001c..b0675a6a5a0c 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 5c1f1c3b7013..23421545c0e6 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 90bdd6b4bd71..122397766b65 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 5e2f10cefe92..bf01edcbaa84 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 afdcd36f4bc3..90312268f268 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 c092a6c31b2d..db0d05f63713 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 7d761181d808..bfb47d9cfa36 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 f3dcc6b85fd9..11230c3fbb7e 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 25d2202b909d..acc09caa4f7a 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 b66a85d07d3b..4a22b3cfd23b 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 ee9d73451f45..4c7d72d319da 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 136c03cd9f1b..fd156562b49c 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 75f5b171af35..21d1054c4222 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 0d00426d6d2d..ec846fc241b2 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 2b33b616600b..ffb8cc26100e 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 c883efdabc3f..dc71f414673d 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 2bcd9fac55cd..fe84502ef1dc 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 a696471c3615..6dc3f8bc39bb 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 0c07fba6e945..f2dd9e6fe406 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 d865c3499b27..ff6a0d70881f 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 092299880e2d..dd65f4f62a01 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 6d769b6b23a8..3afc2f0b32e6 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 a9e850570153..6e7c1c83536f 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 4f5cab59bfc6..4012864c6ce6 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 6471553e93fd..5cbfdf2e35a7 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 65e4ed041bb4..76531f0ee216 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 d41a7f4a1db4..925e1e6ab3d4 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 2e7fbeee5da6..35f217fceba6 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 0098584dd261..8210dd024629 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 22d1ccb6c6e0..2ad4e6a39a23 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 e141aa03aa98..a5a48587e3bb 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 c5b57f52743a..fc23c8c3631e 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 5a22a0420c51..a21c2076e174 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 d471b8f149d8..ddddd65ee6b6 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 26d026bdfdd6..54c31f1efc50 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 845dc4c0444f..cf13d70216a5 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 d257affc2681..5f53803d4464 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 a1fb0a7db17d..1e4092070f30 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 bcaf8468857f..a04e5001f3cd 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 d631c33d61f8..d30f4775c72c 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 534f1c465bb8..82654c8c0b55 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 f8a83249225c..9b2c78c737f1 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 7eedc325d60f..4ef73f35f876 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 45b5308c0938..7d4d7103a46d 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 3bb732ad3f77..0a548ae8e584 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 5b2fbb0b0469..e77867ddfd42 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 cd6c5bf27193..44b7fae351cd 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 3852daf245eb..be2f5dd322fb 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 a14ab44257fa..744e71e99b10 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 e80d09bc90a5..5bf6b03c9e94 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 2a74668370d4..b5bf2604cce6 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 eaaf7eb3ecd0..23031bdc5d26 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 9698cc29ffd4..67d431a5ca23 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 efba0543b483..7d11fab85b3f 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 3ddb93d12f7d..2f81f0a2851d 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 6315fcca2b8b..e6e3e1551e95 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 c12c5362efcf..64e815606d42 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 d84bdbedaf65..cdbbdd1bf441 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 f2ba610e2d1f..dca917e3ba1e 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 b8ddebf6fb63..8316ab28b8b7 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 6eb6df13a028..30cce11a5c81 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 15d4e393874e..07caf832b252 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 8e811caa3bdc..6a8729e93c71 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 0e20835bef05..0bc04b4bb812 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 fb9e4c173e7a..cd320fd61f26 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 e1f929e61703..52b59cef9f03 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 956936c925ba..62b2eefa46af 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 f3f560fe530a..51f73551d187 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 14020e872ff0..1810dc2f86f1 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 d50acd1ac62d..fea048eb3885 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 1a77f6876922..4195bad34277 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 56f93cfbfdcb..cf923362ad81 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 0c33f99a42e8..dc556f6576ae 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 f30feaed0557..e15782659097 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 2bd8146e289d..fb920f3f9443 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 b8eeb3d5cae0..2a69461d3788 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 54a13c67350d..7af59f530e4b 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 08174d8d8d53..6be68bb26df1 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 2cb394386b8a..e2d13bbe2f6f 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 d57badcfd8cf..f23468abcb0a 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 9c88969c5cff..a51d2540b4cc 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 6b24375e4150..c6c22a4db8b6 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 df47be070c9e..06d60cbeae65 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 2dc509f2c632..3a65e657d0bc 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 f091082f35f7..fe8539d3a5ae 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 54dab4e9750d..e14e22d51609 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 c2a6914abc9e..2f43e9780060 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 d494c4471a31..a761c9a5ffd2 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 6ad54453309e..3cafca09afb3 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 6a171753d9e2..defd8a3bb78a 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 ccad861c0371..3abc0706887b 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 4f41316c8f78..dd3e970b8c6e 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 df60629eca16..9d46e9bdd0c3 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 71b84cd30d6f..af5758d79858 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 c8e5a059810a..60ffc479ada4 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 93050c8919a9..645d47cee64a 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 db2b303668b7..462071b7b126 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 7eac90f4d9b6..b99d7bcc755b 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 4f1eb85e4cc4..035cbfa28227 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 72db8e44be31..1704d8e4a17b 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 b4f8f1c84547..6bfef3d54a15 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 56980c01049b..2f4fb8afa666 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 1c111294a337..eda94c8725b6 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 56f26139828f..a5894e2196a0 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 56f15b1d6105..edc76355f0cc 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 f96b546aa2f7..84728a7ed757 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 4f1eb85e4cc4..035cbfa28227 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 7b56b99eb3ac..421b7b0659d2 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 6d052272eb3b..f37296b3af0b 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 e739366954eb..4a7e96fa4054 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 49d2b3d4b851..29ca2d29c4a4 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 e2aad480e3db..c5bb68f4fdf4 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 5828718cddce..d9bcfffca468 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 f62cd2a9eb4e..c36043686fcf 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 07cea9b2b05a..a602b81b319b 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 98f42c5cdb12..77390da75f8f 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 3bf9609f4edc..e00b5629c083 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 3bf9609f4edc..e00b5629c083 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 a8d8bd1d5fd0..62df1aca357d 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 e88ca6079ece..85b1853c23b8 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 ba277c4a9c49..740cda470d91 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 b3fc1a56f882..5032b46c2906 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 f135ad3836ea..995fd920da79 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 14dd01766aa4..747b15b4e02e 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 f98d075d18bb..c97bfaaaf1a5 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 8fda3c1c86c6..2204ea95741d 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 5e010087465d..05abf5002b77 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 8e5df2c3ff9f..e806be8d8f2c 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 24aec7ea62c8..09e0f11a8b44 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 63aa031a66e6..dead612358d0 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 9622c83750d3..d9a03be0ed2d 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 77ee06e192e7..77839c11c074 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 5942cd89fd9e..3a7cbb4c0f6d 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 14c9262c74d1..8c7bcf395e7a 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 4166d8dc8e91..f4a0693daafb 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 98bfeb1bc054..e8cf5632b322 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 4a6a4ed281d4..baf52ffb5154 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 419718175e98..43ea15d1b63f 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 8116008ffe3c..ca57478ba98e 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 0b9a3bae9619..82b1ae57d99d 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 0e952b06ee11..df75a8b89d5c 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 e808186d7d44..f703cedd6c10 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 fee6236ebb4d..fcb9a9b95e64 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 a4e219e1c9bf..b3eae0b22b64 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 efe035ebae04..2ae037d4d81e 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 0c4a94d77e4b..59276a7b96d4 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 25dd9f006f9e..0b3c5e283d2c 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 45acf5beb121..e726c8145c3b 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 0a43dd1a9a38..ee08ce0fa5ba 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 f668b0b06824..15d799085fec 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 7e3a577f9f2c..d585a791fb9c 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 01aaac282325..bf86250c1f89 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 1e682fc4b66c..01c264fce038 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 419d580419f4..bd570a74e0e3 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 86b0f1d840ef..dc6d216f8d9b 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 310351f50cbc..541d27d5de40 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 c5b30f148bd5..44790b83d6e8 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 feb94b681849..6b92f4101948 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 18937856d20d..d9b8d8a7f7d6 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 851eb63fcd8b..16cb3b917e4b 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 e041650d024f..4defb108178b 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 333f6786b0fb..a462a741ac61 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 b28c53c6b0a5..d05735ad6162 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 42cdb5004adc..cd2d003664ac 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 19b9a17705b9..776e3bf12ad2 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 abf988a7c1ed..328181fb5cbf 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 dfa70e56db73..7ed106e4ab43 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 f8dfb5fa8ca7..07414345c38e 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 303273618e18..f84ab40dd1d4 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 25bac1ba24bd..b7cedf97c910 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 0d7d2c0ed3fa..aa7ee9ef7ab1 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 42ede708e66d..8a2b9a145866 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 9d355817ee80..d37f0888b2f0 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 0139ebe4640b..34314fcebab0 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 d30ffcd3846e..f4e5273b33a7 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 764f58ce9e80..d3c32b57519f 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 9f6cfc7999a6..e209a9908850 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 03478e19ddcd..425437da2077 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 26c8175be638..aeb6ee6e26ef 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 2e23fa182809..3c53ac319b4a 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 ce8ffaf94d06..5d315934e004 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 5c8ce48cbb0b..dcf38e03a137 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 f88355bb285f..27020289c683 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 9423f08858b9..0da79a712d2b 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 cc9520c1b24c..ce06f8f7817f 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 699e480dfe7e..820d1af37bf6 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 98d6e1a14cb3..65617e36c6d6 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 39df7de5a7fb..2c99d3086fba 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 3bb917c93163..f7b88f604f26 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 97fac59149b9..26d194144f6b 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 35af37910ef3..bdd06ec5bd13 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 13cd59e6aa9f..10023cf41999 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 df546c4717eb..094d8919c2a1 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 9ccc73dbf92d..d3f6f628e1a7 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 fc6fe6eb5cc0..636757c70ec5 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 105c38635331..e07b0c13eb8b 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 fce3ced9aac7..b1fcffcb3b7e 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 d615940eff1f..559b7d0e985e 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 50451576f9c9..acde524e98f5 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 e1f2bea9afab..124d604e6a87 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 f132ed57ce93..547900fab612 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 82ed7b55740f..e33a2da38785 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 850b0de44b7e..867a50da081c 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 90de53856c0d..75e851fb73a2 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 a6a725211ade..146d49fdf681 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 f02b66f450f3..8a07c67eb4f9 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 24eaa8a23883..991f9c3e45ce 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 42e28b9674b3..9917fc2c86e5 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 8eb544e8ab9d..fd49b2322657 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 2dacb26b6eba..53e26633dce4 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 56e01f7b7764..a9cf3777a27d 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 260c16c17d4a..96b5c521b1be 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 d643a1b2a0d7..e44ea5b6209d 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 7b1e6e9c820a..e90bffd2fd6f 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 b104bc2479e8..8f0f129db017 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 97c2d7dc291f..05b1121b2912 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 a83ebc21f5f8..02fae7639a6d 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 31f537d19d29..5d21fa100a43 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 295b9cb77551..1c27e38f8321 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 e27a7d591e78..50eb60ecef35 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 f11dc769a03d..25e212a72256 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 5e5aa3a3cce7..cda7b22362f3 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 83cb37516deb..e7e2f157604b 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 5a25e29816d7..4422c6311ee5 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 0fb57d47d2d1..4ac5076d3f9b 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 3bdd923543ef..2cb6ceb0c3b9 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 5fe2f46ee79e..2fffc17904a7 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 6e7db4578a07..35f2a0619844 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 c1b9e249c09c..559771241a50 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 1d31c9cb5a5d..19a76b4d743d 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 4e57fef167a9..f0a0139ef0cd 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 0277715b5907..7e88dc656c57 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 d8772e86894d..52a58ae44fd7 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 fce6f2fee7fd..a760de48a217 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 55905850f0c9..788d3b229e5e 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 b5a95c170099..256951d00c13 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 47f0eadf99c4..9791ec7a92b9 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 0483b8858bac..ff94a3d54b76 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 b5531c29b989..2c5e393c3b9c 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 20d6e47f7530..93f1226965fe 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 d126a455daeb..ad18375f047a 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 b04e39542492..786ba98508fb 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 e4c954eeb33d..117e1d91e341 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 0ae0ed3d87fc..7a510c5ad9d8 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 fc4a6845a4fa..80478db215a8 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 666f89f356d0..ce6f9b5f296d 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 3f2ece1cf6c9..b7242290e99e 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 ccfc8937fd72..4e4278820f1a 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 84c94c7c9058..cdf0bd3647d9 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 38850cd3fdf1..5c643a221e8d 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 a8a8e6930267..9298ff9658c4 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 227888d17d32..32f801a74f7d 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 b3f655628ba9..68f8749d0b93 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 39f1607a36b8..5ede76ef87bb 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 637cf278f840..9d9fecbb9f85 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 0a4c20d15159..417d9cab657a 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 521643c664de..20be566e4760 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 9f4d57111bbe..b8a435f37ed1 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 280bf081138c..5d7500407a88 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 a9fe3521d5ac..263fdce60982 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 f81203dc4129..c8f775ed20b8 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 3f8587eed41b..e781cfb13921 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 bd11aaf14297..3a4a27855d99 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 dd0afbbdfc6f..d238aa8b9eb2 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 2458b171e645..59103afa2261 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 9c3e24de46ef..b8ef3ab1475b 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 77a944a7b7e2..f2501fdbab40 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 591d49584ee9..8b9fc9d67986 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 3d6bc82f115a..16772516a1e4 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 5991c1104c8a..fabee5b0d972 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 a2bcb91acf29..3ee2d358d604 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 530d1a61b317..c5f466a306db 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 d19a9a0327cf..e7c97c854af4 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 941c9eeb411d..e954a2c5ff53 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 35860ba9c21b..882ce9e1c313 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 348b48dbabb5..4286273a76d4 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 aab2dc267d59..3fe6db97e0b2 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 20f18dc465d3..413ff8978771 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 75ba48271746..3ecd0b2e93db 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 8aaa19813608..35e51073d0d0 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 b8979624e50e..23b7f0f41c35 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 b9d336ec395a..6aa60b465053 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 32e45184a919..f91427a8945e 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 77d67b07a40b..862be8c120dc 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 095bef03f7cb..e5fc1d154640 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 63e00c1722e4..5ea9d531e243 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 3b64996c27b0..9c09bd6f1d18 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 484c12879d33..80546cde2e95 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 1a2a3ca56c8d..0c7366643c93 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 6cc4340bbd73..d058abd0772f 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 2d1d5cb26d32..8fc17a470ad2 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 32e07cd148f5..fcbe1eb8150d 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 52ea0f28d69f..09138095523c 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 f4aca69e19fd..4fbffeb4b2ae 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 ceb417f84f3d..d676c967f30f 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 4be0f02acf2a..4633ad682302 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 94acdccfcf25..9c69c6bdc367 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 eb46b30b6b94..262adaeaa26c 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 bb6d981e0133..f7636f3ad099 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 696bf61cefde..182262e5c4b9 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 7ec3b9049fd5..fb6c95695254 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 f430e9211e76..c02293c9a78a 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 648280a1dcdf..af791f7e24dd 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 ec17e0b093b3..73626271b290 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 c165e7a1d1a5..c828a37521e0 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 5fabf31cecd3..cb56c8f6deb4 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 c4344af7175a..ea5cdb263f5d 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 669e077dea41..89cf919bb48e 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 f223ab177b54..3c1af1983cfd 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 84ac9bbd0ddc..f2f1770718e9 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 be141339a3f2..8ca2a627eccf 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 3b06b0db3706..0d210c024c78 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 e5a8e1e5c2fc..dee95f2ef2d8 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 e59303d1f788..f2c51b84394b 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 ba89fa19ca6e..1926515ce188 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 7891bab092b4..d2672072cd5c 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 92730341c111..039ca1fb58d4 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 2e9eff59386d..637c2af6183d 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 05e2ea047f65..1b2c359afc90 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 73361a0d3192..9013dc77cc12 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 7f40e93cd87a..f7e2a67356ca 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 c5f9d4406e20..a4e6b2d18a3b 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 1ca4cf3a775c..1ad005e1af33 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 faab2cf8bcbe..57e2eb24cc17 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 2c2eb703a153..49c4e34c43a2 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 a5201d4bbe83..7672ef80a176 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 5109a0e4a683..5a5c9cf1c766 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 e1a3bc3c4ebc..5f96b86c464d 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 722d6747102f..74c80c04a993 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 59854fe6d8af..7d983adfe889 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 f908381d4ac0..16efe1a4a9a9 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 1a40d3b4c2f2..ad8cdd37baf1 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 56485593c923..0583fc72eaf8 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 9695400c4009..9c0785cc9640 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 9e69792d724e..8f415a5fd7b5 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 145ae0d735b6..520be5b91ec2 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 5632de1cd34d..827a90d646fb 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 c849ac8c79e4..d63823ae1f74 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 5db02c46ec36..ba79085ae866 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 4dbd3fd8d81e..ef2300b99b0c 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 b27429f4d190..0c6e0140d7a6 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 36a16c8dcc68..9a6587a9a74a 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 086b2d2f6fcf..40e705ac5384 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 ff5b2244e483..433fa51fe092 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 147413663897..70ffb474041b 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 29969c7b4c6c..094f8da2452a 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 be23c3b74785..dddba2265c61 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 fa52e6d857f6..716211e43718 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 8bfc272d4ba0..574ae5650ff2 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 c18760b53cff..ebe12b248e85 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 df905c8786a1..4ce68902d5dc 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 1f7c060386bd..9e4234a701d7 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 0a4ed7e0a402..f06b40a9a96f 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 3f0b075778bd..aafb170c7e1a 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 9374f546ac90..d6d2ba604458 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 b08e63dc7cfe..2f55365bdd0f 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 15df6d25c5da..e1d5e9c5268b 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 ce1c871f6a69..5c8a0e6c0b8d 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 7a9dfd7a48d9..74c80d75c3e1 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 d473ad6c9c93..6b4402a81f00 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 ddaaee436ae2..8089f5e2218a 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 5191f1877a9e..fa9a1ad89bdd 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 d0d06b797759..451a0c76018c 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 5bf35fbf7fb0..b215e5f09e93 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 04585f918fd1..89f86a58e4ad 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 4d8eb350bd20..cc6a1edafb40 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 04585f918fd1..89f86a58e4ad 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 04585f918fd1..89f86a58e4ad 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 4d8eb350bd20..cc6a1edafb40 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 04585f918fd1..89f86a58e4ad 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 4d8eb350bd20..cc6a1edafb40 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 04585f918fd1..89f86a58e4ad 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 04585f918fd1..89f86a58e4ad 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 4d8eb350bd20..cc6a1edafb40 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 c8efa66d6657..9ba6566688d6 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 b3fa390087f5..acc326dd0e0f 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 7d5d5b9e5ca9..6ac58eae5e17 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 04585f918fd1..89f86a58e4ad 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 4d8eb350bd20..cc6a1edafb40 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 af6585aadae6..047a2e23e07e 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 a39a7c6d9b3e..c4548d39fad8 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 e8442a47f2c7..ec7b7de78d8b 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 0a4b98469b2b..f6154222ca22 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 59fcf09666b2..71e7c43a1db0 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 11b6e9fe3764..eb83f440d3e0 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 3f3a962664e4..fa837dab51b6 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 0384553b6993..aabdfa140dff 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 64ff1f8b1d2d..50e8974fd7c3 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 ad57d9f86453..5a285ceca32d 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 acb92a7df73b..ee654e00463a 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 30e0e6c1bdd4..626daf9771de 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 260281d75a44..b61ca0549543 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 c4645e4f8ff1..a643be3f0c1d 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 0cc6473e5c48..7d1af0155da5 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 d47280ea2e7c..a68a1d6e6f37 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 d55c05857b6f..0b33a0e9f6c0 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 b1bcf8da5a32..1b7add01cc63 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 a2902ee56087..2c7d8ab255a8 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 07049af315b0..21f19b69c49e 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 d61a1ab03b6b..890701fdd318 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 56df772b4e18..c2aed62c9661 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 718d259f735f..a0f1becce2ea 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 d63ba8cb03e9..e91141380482 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 b496a70a6fea..edc7f7294440 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 8f61ea17a12a..ebccb023e600 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 80248dc223dc..406ed4704581 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 bec718a3c6ae..8d49b21861f0 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 d177ced1a696..97c10bc3c560 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 5466f8e18d47..f942cf1283d0 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 02e7567dafab..223c05d72d60 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 77368b87e961..9d3044a7ca02 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 2c4bdad3e919..654e54a15915 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 085623c9bf76..65452e2c2c29 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 21b5e7a8110b..8bce8ded5da6 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 7d045fc56027..180f72eb6f46 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 88d602e4b6d9..bc4377eb6798 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 4397adb75d1f..2f176013db2f 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 b042751ded9a..33de927b0342 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 6dd58874874b..8d93406ba509 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 5b92ada2e0b0..1bc1a9b2d66c 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 2d77cb8f55ea..911b2815a00a 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 083716394124..f3cc7c9fc88f 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 0e487a700b80..ef5db4995fb5 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 982cd97c50ab..f4cd8d0d63df 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 43b1059f944e..0e649fd2d70a 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 5798c2591a0f..780814941db9 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 318be2a6401b..fae5c689031b 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 0367d980a64c..0af3868929a8 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 c45b44966edb..16583f6eb749 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 7f8b0c877600..0d300709be21 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 76718ecd1fa7..6d7be30d3027 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 b2bdd09bffb9..65f536f627d4 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 1042bfcb34d3..f1943c0f439b 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 ec5279d321cd..59575d2e86e0 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 dabb0d50cbb5..dc3b6c280f34 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 530243753934..ab49662b98f9 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 c2c8cad5f0b7..69e22c2262a3 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 4a0f9abd982e..f980033c480e 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 80593c8656f5..20971e4807e1 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 917352bfce41..c9829ad27938 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 1e052990a763..e2de731e9abd 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 be918becd3a3..9efa1164012c 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 f75e779ed158..8088ee58ea82 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 119d80748027..44aadf6b3e70 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 ba168f773d85..96c5f3b87e18 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 76279e91308e..7004c9a36650 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 088b2fcdd144..4b176ef5caa6 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 cad05917391b..8f1fe59ddc59 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 cc248a9bea08..3a1af09d2d42 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 55006a113429..5cca31af0e38 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 473bda3d76e0..f046820ad900 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 2fc77928ef17..beb4f2938115 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 6d0462b460e4..dda54e2a579b 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 9278262a6ffe..da5f396a72c0 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 59e67f8d33e0..4e95ca4b51ed 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 839ce932d9e7..88579f507eb7 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 d7e28055b215..81451df6a726 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 d9e097818771..2f68cf6f9616 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 b16ec011d06b..a3b86c531f3e 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 5242acf5b98c..dd5d1680fac5 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 d219eae8f333..c64361c2726c 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 a4d0a849484e..5e753fd257f3 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 edb085e71d32..ca776d1b13df 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 c1ed8de8ad8c..498d486eb6f9 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 cf0560a10777..d5d25bbb57c1 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 7bddfc509053..5a799f617e4a 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 6e8c54df4b60..e3b613cc3f64 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 b47b0ed02e7c..3b384e763107 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 03821cd44705..0fcda6c1f806 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 629fe7e742c3..9c912bc38dad 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 faed65ca410e..23e7cf780e9a 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 df0b4cb62043..5d6fd4d932ac 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 5955829e72c2..2dd7d9aabdb5 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 5c303036a79b..46bbb0331854 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 4623c211c1c0..2dea195f0981 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 3e9995c7496a..6fca089b07d4 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 6cb5243ca84d..63422c305d35 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 a2304ba26c68..4d20e4fc8431 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 69934db217b6..270afb639575 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 dabf43f82046..05be58e335bc 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 1b1c837ec504..8ddf01f73b4d 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 233d553da658..ae423eec5934 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 467767ae59d7..edbd9f35d4df 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 339f3356bd71..8defe20f5f41 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 e1a865fa5039..986fc8367993 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 b61083078ccd..3c88f2b9f376 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 a09fc03ab9b4..412695f70867 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 d3e92e162469..591f843a284a 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 5093b1c27d0e..bc47b8d46a11 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 8a1156b8fc8a..53b9c4886450 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 bfa21fd9aeac..32c4de1981b2 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 87d1f06f0363..1272a735e83d 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 52046a8ab693..88697bad4d75 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 96620c0abda3..944b296aa4d3 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 6d10ceeb1b4c..7535871afe51 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 34daa81e48ea..711bed808cc8 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 eabfd31dda66..db2f4aea05b5 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 40563e233dec..38bee8142bb9 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 5192da94216e..b90d8911d500 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 301c36c61913..aee05f5e5121 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 64586b77b8c2..e927b510b9da 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 21dda7b8c9bd..b84458491698 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 ed0bee5d37e7..576f73e08bcf 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 843391cffb27..aa678fea1762 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 64bf59e5d3aa..78bae5681619 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 622f3a0f92e7..a090214bbb40 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 c74a4d1cbbbf..0d20032327ca 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 4528b4ea6e0d..f005a689ac45 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 91582aa6a048..1311faf97bc3 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 abfaa11c9e47..4f4e03d734e8 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 3ffeb81c1cbe..1019c24859fb 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 607b7c68f7f3..cfb5d588d70d 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 ab7aa57611d6..f4d6c945b33d 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 704d77480b85..e122bb993806 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 e4b092fcedf3..f0c242891d8f 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 212176b24271..4a58b7167cb7 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 b70529ed7b85..5a84adcb9e51 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 be275564a0a4..c9d4f30e99a2 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 da0882abd228..ab6f89ce52a5 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 bdc80c5b357e..65a6a8e44b4b 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 21a8fb2b22be..be5e63d430b7 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 96853854d6cc..73788da92321 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 9737be97fa37..956ea0684fa7 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 77c727ad0f7b..cbcb1d329a3c 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 8b3d139201ee..97edb0bd2595 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 8fd30466f43c..ebcf3b40ab25 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 674fbc3cc99f..479cddbe142c 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 adb902caf011..e4efef597300 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 3406d5197c49..7bb34f72ecca 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 5b9bb748c7ce..657d7f1ed189 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 73051401c181..6a3d048f8a6c 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 ecae1d8a2732..75cc24e33361 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 ca512ac71190..92894aa4d171 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 a52e08c507d8..a80c6bdec20b 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 b9490aaf9de0..7b0bbd04d978 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 8e703d274c78..dadbb8a906a7 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 11b61cb69f1d..4fa8b766521f 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 92a1bb256668..609c59f4a3e0 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 f4cf4b0c1889..ceb0a8b3f796 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 73931def8958..256366e97a83 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 7339a7e23f9e..54970e5c34c5 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 408ac24f39a4..fc6f9abc4ac8 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 8a3c640b10de..7d62364a6aee 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 97207e83e2e6..f6ec0363311c 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 20d8f84c2474..f5988e0b00d9 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 d1cb73aafa0c..1751a9e7be89 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 20844c17ec1a..8d1aef5d1fcc 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 d9911cda1b68..4577cba7a7d6 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 df6aab0e6a88..3ca4d50be313 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 a624cbc899ff..7a94c96b79d8 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 c0d148d92042..040f03c08b4f 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 92750bec8b20..6a8d0a5adb49 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 b1cd0a94437f..8f7aab6a4991 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 dc12382aa3a2..2aeeb0e979f6 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 d98606deda57..a760112f1d42 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 ed5eace0b7e6..464d0b2ddda9 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 7de690d2d816..13a3c0ee0e3f 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 c8803b9ae5d8..4b6557fc9c8e 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 958183ec0d73..b0d7a3a9c07a 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 b28a09101797..0dfaa19fadb0 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 7c20a2b2f94e..c545b2504cb8 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 cc808147600b..016a667e9378 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 6b2fd72b8955..2879554bb94b 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 80abf5e4e768..3df4732d9ada 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 d58deda09f70..495ea08f0772 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 1c8c7cca93cd..0c93d19dca4f 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 f48bae55f5f1..2ab016a1f56c 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 f8e6d12088f9..198993e6d754 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 d065e825cc38..82e1c07718a5 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 cae3ec906211..a7a07449ca89 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 1afab9a1ffbe..0685adb4f835 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 38087bc8710f..6a3f7d2da550 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 9a7bfaa9bf4f..e5f1895b49dc 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 74ee1c17614e..7b89b45eb9b9 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 8fed18b8e29c..34b674357d89 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 b12373067900..79391125a4fb 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 d2482b125005..a51de1bccbd1 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 b08d8f3f767f..f1ff16f328f2 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 eb027afeacde..986acb54e3c7 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 41f9efa8c161..ab49826e9dfc 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 0dc45ea8ca2b..825e964b8807 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 5ad6d2e70040..98025e60dd7d 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 c87ba6a023b7..c564165141cd 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 61edd2ace3a1..143a9ec04476 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 bb73c26c18a0..0c946ca47945 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 679d9d754e33..83bace96aac2 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 cd17f7679470..906b3a9f976e 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 fb1c9fb78f36..e38b445107ba 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 d86698cbf384..3fc27d4a96a7 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 63315ea66737..81eac07eaa89 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 6cbeca44bbcb..24dadbcec7ca 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 ddfc86f74d3c..037b8cb78b72 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 e064eede4ced..c420d0685068 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 7c93e46c30c2..c1cdbd1a5ce3 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 c6264b6d2b32..ed655a1d483d 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 d49c222e6483..8b14351c08af 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 9a572ced717f..5a6f7da3cb72 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 c3540f7619b1..e76620c630d7 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 46112d51d839..a9c95d73d561 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 c832c7cfad5c..98167fc33fad 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 a7d284025d7a..cf7c1f2b7cd5 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 18676cfc22e2..cc0c3b989996 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 879553142da3..447639b38726 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 f7a3c903fca2..48358513586b 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 659864c1d9b5..e726734d04a0 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 0348b3a2d760..8dacc87b08d5 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 7a698cf76ae5..d457e0681c15 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 ae27db7a8352..8f42f3a8897f 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 3c3f1513f6fe..79ad4598e10c 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 9e17e32fbb4c..1c6e2e2ff492 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 8240ab083262..8fc5b3240140 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 97307d1b2a46..d7ee8f25b114 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 bd99af999c79..c0a7d6aa6d72 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 6bb062ba657a..09fbd9a69cfd 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 b59023b50e1e..0b8308ba753a 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 6183c886cfac..91b3997819ce 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 05bef66d849a..2d95a5028bf6 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 8ea0275d7e99..3dfdd2847bf4 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 dca591018056..fc3ef401e3db 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 2cc5f23b45eb..2acaff3ab712 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 296a2c1514f1..605e1bdd94b7 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 58a90a592c4c..2939835b0f41 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 566626513ef2..4f8efd6d6885 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 dcc4061fde7a..810e13c97628 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 e9bc2f4893e3..7a35619b6813 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 c0e05740542d..1648d10e5aa2 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 8fad49b5e9d3..21f862e4b431 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 3f030c169f64..fbafee0c2417 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 ba917b52d9a9..d0d20b267d4b 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 c92015eeebcc..36db32f281a4 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 b9ef2f329414..938f6bcb906b 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 2f7aed9248a0..aea42d1f103f 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 2f7aed9248a0..aea42d1f103f 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 3c0d2d6588ec..cfefb0502800 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 d5f0102196f4..bae2740d306d 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 1ac6a3423ff8..82b7c2f723b4 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 c79701c83f3f..3875325deae2 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 026364a2058f..4cbcfec11c96 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 422206c574d0..2a7052616f2c 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 59036ca99bd9..848b27e3fcc5 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 5cc4c0132353..1d2aed12b9bd 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 24048ebe008f..5eab2bd56ed1 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 e92400931d23..74b7edd968fa 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 6752ecf90d2f..6bc41509b6b2 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 d57f1643e98a..d0a82bd8507d 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 0e74e300f00f..15557d35bc5c 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 7ec658ebcf2e..3608dca2124c 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 a8b3f3493097..e5505cd893a1 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 a9b7ee8ec7d4..d4b53c887681 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 a130f9e879f2..6ac9a5a58054 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 5a90b314a6ed..5c6ec19c16d0 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 d66e39110eac..a6cd59690ca9 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 e33c3bcc3f02..ad9fa52f3d44 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 438f1d85a281..d63161db55cb 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 b6174dc4efee..93342a09182b 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 b54babbeffa3..ee3f221d09c6 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 3abedf2a764e..6505a69fef7c 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 b96125aa9526..b161859bf9c5 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 ff31fc243174..4929cdab1c2f 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 7636025c25b8..091ced9b4791 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 b40203c339d0..e0e99a028957 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 c1fcc875c361..51945ea708c2 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 9d8035787348..ef0c5b39f099 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 27c73d3493cb..34e952ef68f9 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 6211bf961b3b..0e922afbee91 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 87fb2e6dd54b..032f65cb2e4b 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 58d0fa62c34e..97d2e22574af 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 7cf1bb09c92f..3951b2826794 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 9bcbf01d1c6f..987aa745c85d 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 25df092e1fb9..412517722a8e 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 7b609145bad7..0a04f1ee759e 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 5955d9a25ae7..4398e5e0b04a 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 023ab4701259..b69f1656ca49 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 d43886e80957..23e4e5face9a 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 e606612e1086..399709d5276d 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 f7c2dbb096f2..10be6d5ff6ce 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 4dd08ba4ad4e..1f8fe30cfd8c 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 73d6e790dff5..eb23849f3ac8 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 679dc7de87ab..768c9d4c4c5e 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 274453020902..902e48b65414 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 84880f1881ca..c3639c7034eb 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 c0963aa3114d..4d18dc0e0591 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 d9f1fcee8554..6f54acb3e045 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 1815a0d2c10f..7c6790e35fd1 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 1bc3c336c3f3..75397333fa4a 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 b5b6c7675ac3..2c7b84d99fea 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 0796d33eae0c..1a63a06c75ad 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 522c87e1c314..1878f3d52abd 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 06ec5b0ad307..018166e60cfa 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 87df7688f0b4..d71fca0754e9 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 59ab54446496..271d0363cab8 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 e110d94b6561..f8be86be19db 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 3c00183e253d..39286ca865ba 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 91f69f0a69e3..02f1599338b6 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 be83eb748433..70c4a5aaf2b9 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 d14a3244e610..89e1d234df13 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 3fb0f3412f6b..7eb974bde4c5 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 d5274ebbc4b4..9a680676dc0f 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 b6227a582ce0..b9721ac8230f 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 461f30b9134b..d7f6dfe8406d 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 882340e495c1..b0991321ee46 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 751959f55bb6..15843fa6626f 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 134e13233da5..204780459b38 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 85c9279cdf27..29a3c4e9c9f1 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 701f26776485..9d8084053cc3 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 a82c4e1440aa..4f39412af5f9 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 13f67a41cdd5..8bbcbe9fa594 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 ae7911e59438..63ff38b6d128 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 2c05eb389ccf..bddcd5d50ce4 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 3c6ee8fa3155..2961e8599c35 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 148a59240f99..b23cb9ce917b 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 8240b249018e..024df7287369 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 691c36cfc9ec..3ccc1ea5f106 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 53e95c890ef5..56698fe24897 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 1907348cf09d..ea8ecb678591 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 b0173cf98e0a..c6c3a6be1ef7 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 60da408c8115..6c0453791916 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 5914805e5c1c..246546ac0342 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 3d35aad74558..aee2af41d62a 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 96015fd5d82d..8604bd383a18 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 c7c45bafb0d1..d59f90aed5d1 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 261ed3913afd..001ac1135f6e 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 6cdf22f7ec0e..636508b5615a 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 75af015c9fee..9b9a9f784035 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 ad8e718cf88a..558a27cd4562 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 c04813dadff7..9750f480935f 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 9b42716924d3..59432a1d9a5b 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 218cd7678594..23abceaf4937 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 510e08ba091a..7ea0049f8f8c 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 7ceea676d3a3..45d4d82344be 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 8a6599488b1e..e90a34104e8f 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 8c446d27d0a9..eea4bccdc09c 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 bd5f6105f51a..a1971fa3146d 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 088562325216..9aeaa2de93fe 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 3e5587e9f9c9..1c952f4b5f4c 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 6968ca97b821..eb0284d8b410 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 d4b47efe6815..d5cdff34a264 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 f2f85d0265a8..152fe09b51c0 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 d8346653c25a..6566d8a11154 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 4b3ecccf66c3..7deaee3d9d8d 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 73d08f51c669..5a0ee263871d 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 44cb464fc0c9..abb328399be2 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 dca67c89cc03..1f57fa832819 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 b06f62794c4e..0a4d62a4a0c8 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 b39d2b88647c..99c85e65baa5 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 8f5d7f4f7f8f..a4e9134218ce 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 fad855a21f6b..cad7943ed625 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 87bd31aabb67..f7bc71e34dbf 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 7d2bbfe8a016..d3e2ba0e2d3f 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 6a54ac7f4a52..7c7769075b65 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 1e9319fd27d4..d8ee59bca82b 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 f9dbebf0bea1..140471dfc774 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 21da34c47c9f..7a040d5de72c 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 4f74605043e1..b90452e3c6b4 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 2dce96fdce07..a7b66c28541c 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 fd8782728e2b..6ea12514c47a 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 f01e1c2277c6..25d7c3f35fca 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 68f1f7901bb7..065ded31b073 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 15590e324861..e19108bb2ca9 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 599496346173..a76b9bab4911 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 a746de1f14f4..50bb68cd83be 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 78dc4186b3a5..740640f43a44 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 4063a3370840..01d8f62ddfb1 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 0bb88c55936f..566efbdf9f0a 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 6c0986fe1ba5..048bc03b91a3 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 d1124561374a..8ebdf633b5b9 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 16b09d64e8c1..5a593fe1d124 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 74a9c6ab7e8a..039825bcc538 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 d1f0a02041be..d7c4989b6e4c 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 3fce08259fca..54349d4971ef 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 27425a3c99a3..f6a4bb55553c 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 de4c07aa7bb6..cb854de0cff6 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 b9b753dcd70a..899818b15b6f 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 580ebaf5dbb1..7d40add9a30d 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 ebe5fa6ca1e7..27cd8fb0b1c3 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 7a426badfc2d..1d2800574d8a 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 d38603697a7a..4b36e2c546a0 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 8dba6b362cdf..0c6f710b1cfb 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 44773095b871..f63d57472cf1 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 1036b9daf648..3a457659aac2 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 e5604b816b5e..44697afcfed6 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 5a8956222000..a7af3cb1500c 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 71103813a6ed..38ed287d14d6 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 1dfeae22aea2..92c2b7c470f9 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 ea7051d69a4c..21d377384d3f 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 9989ad81524e..cbcbeb171af5 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 8b0e8bee1799..edfcbbf8e8ff 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 6a9fb991097f..9b63bf206a06 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 bf79e10103e1..a44a7410aaf3 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 be33213f3cbc..6b0928229e91 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 3386fac17dfd..09f2627f8167 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 30628ae31c3b..7f46c12ccf26 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 6146b795de19..f4e331523bf4 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 ad26643c3279..7157b647524d 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 311b6a60f1a2..dc3cb8b343d3 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 579aa6e5bfb1..477807aed7ce 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 80d8ef65a695..7200ea1f1dd1 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 b80984fcdb02..b72b02ce3a9b 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 b819aa810cb7..bddc4719ea32 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 01efe728081f..32257bb4b5a8 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 eaae288864a3..2c776f414e04 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 ea5c71150e83..c45541e08b23 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 5e73d8e38de8..a4fdf5567f7a 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 27ca192e5226..70c355b16105 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 1103251c1403..70e5003c63af 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 3421333b8a07..7edc4ec5aee6 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 afc4959f1752..59d4eab06d6f 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 d5a5f445d5bd..e24faeb7d547 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 020fb41c2273..6f77d4bb086f 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 19eaffc3edd4..81112808b21e 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 b028fcae0775..27248179ef4a 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 71fc82172a54..d1661be51939 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 465dca2ff822..6f055cd4f7e9 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 e5d5622e6fc0..14f8a401647e 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 2f76fb99b220..f6ce6222d4a3 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 c1c847d92d04..316c612940c9 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 2cb5a4996ee2..0165f66a4eac 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 84cad38c5ecb..eec478ce164d 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 8592f8a72871..27099f543cca 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 ebdc70a04df9..0f2b4427383f 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 b66e09620f4e..54adfce93a4b 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 87c19a32d4c0..921eb4ef685b 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 8610dc2f72ec..269f11fa4a84 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 8a682ef0a116..e80cb55eaeb7 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 a91c4fe43ea4..63ca4c651920 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 3639aac87ee7..0f3d9232ca1e 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 84ab6866cf13..47ae6b9ebc5f 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 f1d685041788..94037c82e4ec 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 4a432206d51e..a6a6493b43a7 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 7a62785e32f1..0ed52c576fe7 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 3fab21db2d06..0321a32ee39f 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 5cafbf439be2..459e82dd2aa1 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 b694642a9c5d..3f1b7cda9316 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 a2ea8ad368ba..7952d29c2602 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 dd86fc9a7f85..a219f662cf78 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 4b463a17333a..9f196e4b0d61 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 4dfa406ea2d8..5b1627a25537 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 22d754577022..5c666d802fe4 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 b6e5091b6217..d1a5f32b9546 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 6b9d9cdbeb1f..3be9606b4edb 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 58721495dcd1..46d42fcaa4b2 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 2e679db54647..b7eb76a41475 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 fb18f4cd62ec..6f6b34f4f486 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 0857676e4ed5..d36285324e00 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 84ee3dd21123..497e269d634e 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 f1e06e4ad89e..27594a85312e 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 3c789fdcd022..45d53c639332 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 d3815a52346e..c3431e3567bf 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 daa1d120795f..6e3039c22289 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 785a79a79a2e..206cc3e6660b 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 2d7a30b8361a..779b4042cf49 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 521b9c64b1c5..d78761df18eb 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 ebc4752a1429..7c9e6e905825 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 91defd12a578..a2bd345fc050 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 6ddbedfa0bc0..d22ef9b09e61 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 962eb69bd83f..bced05e684a7 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 e677abde5f63..560475bd32c3 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 53f071db7819..63c4515985da 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 db0edf4529c7..9a743b188c3f 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 099178a7d50f..694729376ba8 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 479426626858..40f993eafbb1 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 867f71c12040..c260c7213467 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 9a7f28210f93..bdfe248693ec 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 8305ff4f6238..34b687a0f526 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 25b7c340f600..d991d46c0976 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 11b2e9d60165..bcdf28cdb1a0 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 b3d66d46b1d4..a18bd0aeee68 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 9341415b2d9d..ecc50481f65d 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 0c040ddea44d..c31858d4a89b 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 d95f666d797b..b93820715fe7 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 fe67d9822fc9..51bb04dba192 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 4b4a416b1ac8..37fa7fa54b6b 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 9cc886641293..8df82be0aba5 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 64ab6f62b77f..0c8b36f6f2e8 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 50520971ffb3..55cabf533ace 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 7b73dfb02df8..64c06d608df8 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 92143fcf3f76..8ef31b230a32 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 acfdd3c363f2..4edbee54de67 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 db0039204d87..df5192645e11 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 58fc926d08f3..80de3cfc668d 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 4b99537fbf7f..f5afa482712f 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 b11ec93754fc..ea224e08a008 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 4fa37bdb057b..27452f4d45e8 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 7062557d7312..8b4a89442766 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 e9e85339affa..16d23672ca3c 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 93f7f97b04fb..83eff697f894 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 2adbceae5d3c..16e46cd4d6c4 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 482b7704695c..e9b6ab54b1f7 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 21c8b0a7f88b..158c5ccdcdf1 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 016b434a6124..9b070f201b57 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 533511ecf5aa..ccdcf013cd25 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 fe062d62e5aa..494e58c1ca51 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 423147b27aa0..bee49af9c95d 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 fcba5d0447e0..063f534197f3 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 9a92e67da4db..9c57b0ebcfc3 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 cc6d30c9cac1..bbf4519a713e 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 62be913d85f0..7471a5641c28 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 4290e6e5e4cb..8f63f37d3d38 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 7b079eb02dcf..80a17163087c 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 5db21e2bbc78..88780c0c24e9 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 9450d89e5f51..e2854f3cc8d9 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 f2d2df0af29d..b8610c4e1905 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 4f40c80bc4c7..e6082d22cc37 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 913fcd920bdb..f1823ce96b93 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 aeb2ba4faa54..6ef439d48378 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 555cd68c3a76..0b1c3186a4f5 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 a8f3debd3d63..8bf2a9aa4490 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 a4fa68ba5cc2..dfbd14bb5758 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 43565c9b1d25..a783a348be00 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 14f620f41e8c..dd85df4009da 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 ee27cb1a1a8b..d79647ced6fe 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 01db609990e3..69203c4afcf3 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 18e0fd3af1ce..9507477fcd3e 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 404d2f7762df..1cfd8db62457 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 2f4b2ed348b9..7aec515cc3d7 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 fe23880d1d48..3f466f0cf105 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 bc6d2413d262..00ded0d07929 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 db241ed0ccd7..14dd6488ff26 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 462c2279f5c1..fc3c34cc1dd5 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 25af8772cedb..2d8a3858aa60 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 6afc2d993551..7d0566632d22 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 b1716900c49d..a8bad49fffc2 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 c2e76444d115..d8ebe0869f8f 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 fc11c646a8c6..062e39643cac 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 acb846373cbb..6f85452c6fb9 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 ef6cfe3c4ed7..f75945b55c2b 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 6b9b7fa882a0..7e0194d5115b 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 f523581e2da1..d208bc7150d6 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 159d995b8dad..f003550cbc22 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 56034de68449..2b864f16b841 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 a09ff3e5417e..a851300a9828 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 e86f2a8acb83..10f435859f15 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 09d1304b7754..8aec8c4cc435 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 1f5061b02c70..b77880e37553 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 d7bb7863c07d..c7fdc5297164 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 14efb6100b0a..1eeb04b88337 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 931c94c7fba0..bb083610e551 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 ca8fb0830ffb..aed633d3ef1e 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 61b89c655a3f..a66c10db5321 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 2b1ab0c574d2..37bcac8b29ee 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 e38cc637e945..bb0df599783e 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 0978b759d2a6..cc58eed8b8ab 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 b406cc3aa13c..eb814c6af247 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 e480d3da3fc8..e59d4074ddf9 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 f3a6a668372f..facfa8bb8529 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 6ebc61dae783..977aa7c8766f 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 1b4669a439ff..8909d8ae0eb6 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 28191b82621f..be6ed053c6e3 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 924cb08a990a..7900d397a5de 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 a799ec8ca2ea..38ae446166a1 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 bfc78e15b5b0..f8eac6251e2c 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 bbee60e28173..ced01e08621a 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 4229135ebb23..de7f2cbaaba5 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 0cf695bd40af..6d0244130a9b 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 81ee6cdf0a72..e8785eea307e 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 c8f525fc4f0a..c5d7fa6412e4 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 a06b58b2740f..219e2ae28b23 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 f601ca2aef54..382769b84c80 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 3332118a1e76..cd9b70323ff2 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 5a2289c5c5ae..e456347d01e4 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 84bf64bd63cf..311be359fe93 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 d0684397e744..9af1206a24b4 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 cbfd5f2d39c0..8d319f7e612f 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 b207cf70d858..c8503473b562 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 fec05bdeca15..65d26601e101 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 6b80150d5465..013ba6e3ce50 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 a471a078af14..1a848ccf7f26 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 55355f451f9f..a6b843c6cf6d 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 a97b9e66d0b2..7aa223f21251 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 17e200536fa3..db0d8dd22b1b 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 400649bcf752..ef9bdadb2825 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 6ea24484e033..47ae66ac677e 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 b1c508365cff..4432ec9380cc 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 a6318bd99e2f..c636342f6ca4 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 240ae3084d68..84cd16c27968 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 6ca6774507b8..2824da50d0f8 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 2a9652f2e6dc..bc52dcd0e01d 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 f21316205378..d9c936186ea0 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 26ef5ffa11a8..9e31890151cc 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 d331522c04cb..d886e5b26a56 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 fcfe95b26f96..6679651fe47e 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 22aa19717873..68e89bc7c223 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 3c1049929e11..bdf4860d016f 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 206744a58fde..f485f1573286 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 3875d6af1371..da81f1362160 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 928955630e9f..440b22edd7d5 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 d05c75fe8d8e..7eaacd6bba78 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 4c137de82d07..cd6962ac3e0c 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 cb40c4f6fbf9..23ea84bc33fb 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 253b2d889010..3d26b5e87d93 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 43b53b7cf1f1..d06733bb3442 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 1df51c0edd91..1572747aaf82 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 df213f688c28..1dda9e6a9b20 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 9db37253c536..57110b0439a8 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 fe7d1eba1d9f..b445e8516340 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 f06563d56cb0..25537f0dd19d 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 383e377a5ebb..f6c285634c07 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 d315f7ee3b68..82e3f596e3ef 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 fcc361489994..360ba9d1ad2e 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 4f4c96e450b6..aa03269b53fb 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 b1517de6b679..c49f599bc9bf 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 5980e1a857f2..80f016b8cec7 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 cf6c2a24fdf5..e28208fc3b45 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 98772c1188ed..59bc598a1978 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 ff065882d96e..a1838c0c997b 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 926fa94800eb..dcbe2198ec60 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 9b27a61ffd06..82c6e6cfac39 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 590430a78431..7adbd384c708 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 1024ff05578e..6ed0476183ec 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 70177c5ed0d3..da9720b422c5 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 f87147a5d88e..f76f6b622225 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 f3366704e63a..2da2163726da 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 4dd6981d448e..0cc550bea9c3 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 8a0f51d0b84b..fd1d5fb6c477 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 d1aa56b915ba..50c3f2afe32d 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 bfd4c1232083..38399a18793d 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 269ec3c7abe9..7f998d7f2160 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 139f027cb903..371d6037fef2 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 bc66cbb77c0c..c1b839c89b5d 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 27db7d8c7ab9..ce8087204116 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 204cd3e66576..72674eb40ff0 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 ff7b625a68e4..b229480971d0 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 80effc497ed9..64b6e8f2dcaa 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 4de1f653db03..875fe9dba898 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 5f04fc83d37a..2a0649ba4789 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 5dc1ae2feb5f..1bb6d8e15e14 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 1d6d9acead1d..62d31f54f844 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 552342a1d384..dde44dfee9c3 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 b63da4e154f7..5a1f0432368f 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 8825744a08b1..96b91bca63b1 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 f3fcf0ceacf0..29bf95d48b08 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 4da5a2db7674..1de29e69b054 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 a32b5de72920..f436ea481041 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 f94a3dcfe0a6..fdead488ea11 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 077e0a139544..32b01c5572d6 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 b469fade3ea5..db09fd1c0328 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 42493a632717..7e4b60f8ff28 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 247b7f21f686..c951cb567fcb 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 abfacf3936b6..69f161856765 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 06c832ca46a6..79a1d6e3ed7f 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 4163b87dc859..549e0d1af558 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 5d4181a30f05..56842917f500 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 c30cdfc2e4fe..ea797bc7dd5a 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 20ab702c9c89..9b22b47a12b1 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 c66fd1edc19e..170a663e754b 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 37fcb4b4af9f..7c9ea341ddb2 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 3778dede721f..40f086dcc71c 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 d400ef0bbd64..ef90e0e6ea76 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 dd8f03b6dbd5..b4e72c0aa2ac 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 39ad2d4abf3c..984feef5f47e 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 ab16614fd308..c8342295b919 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 5b0482de2200..e5adf1539654 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 54dfa889ee35..ebe6ce0629e6 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 ffcfd4ad83e1..e7a36ba3463e 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 e2ff9ac87ef5..1db5dff3bf82 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 058f41967984..96ff8ff36cd1 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 2879caf2c4c7..4b05a2cad81d 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 aac7d7d5385a..e963d65d6c70 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 948c99f9ce98..9b04e766be81 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 67a9aa2e9161..95b18e774fbd 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 8b2294f84327..51b05c9a1116 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 3a8a74d1fd65..0c512e404321 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 cbf64e2c53d0..63ae2c3d2fc2 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 5f64dd3fecc9..589c7767ad24 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 90f40a8d6296..61b202b77f61 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 03db01160dda..5ceffbf09236 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 5622808d4c7d..ff7aeb263e4d 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 2b473ae989bb..e6a4494867a0 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 7046555e0d2f..e6db495a1494 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 4aeb6a643d95..17fe7fa07384 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 59774bc753dc..8a0244e8145a 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 e1030858814e..87f7bc9562be 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 62164ff94850..0f49c0426eec 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 7a364882fb8f..85c7ce2ce272 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 27d59ec88998..b008fc49af46 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 2f41beeb9691..8bdb7381454e 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 cbc1b63fbc4e..6535e3f081d8 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 3f28e89e36c6..a989947f7873 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 5f10d5e831cd..e51765bf432e 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 283b8da13294..331451e1a15f 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 8b0c00b13551..3ed030b5778c 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 4c532f451e37..b06b5fdb004e 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 f26df45230a5..5f8aa13d61d9 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 d732b1071d8a..c8a5b3e92953 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 6a5fc2e33de6..1ba68f2698e3 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 2cd02673442f..8c2ed6212493 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 d2d0f3368124..aaae7064f377 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 bbd991e36cca..2ac06d5a139a 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 a56a8e70e4c5..057daf4e7575 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 6277a902fa21..183837f99610 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 ec6244630fd1..db160c336e0b 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 07ab1355a47c..552c5cb89806 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 aad957e1dd36..548993fbca97 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 b803fec2ccfd..749e21f4e5b3 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 c961c8003523..d105154ecd88 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 1e67e7f5fb1d..4347b85875d7 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 1366ba28f1c9..7956d5e87432 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 4f1c456ace35..d988e2ed14fc 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 f68de00b9b59..fd7e568bea7a 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 cfa9aec80685..e676a9ad1afb 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 2b008ca3b3a9..a3a322280880 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 f38a6e674da9..805bccbcf638 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 aae72e0f37ec..61488c51f053 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 78fe75cdeb9e..4b9f67a79997 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 05097087d5a8..af26dc690d27 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 915903892471..bbb16687f6a8 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 feb9643850d0..da11f0c01217 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 2ec5d9e64bfb..0903fd6fa9a4 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 5ddfe4bf4dbb..888fa41a7597 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 f41c677dc6c0..81a5c7863102 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 0bd11ebc9584..1b9a22dcef7a 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 6b103776a30d..f82dfcb7cfc5 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 86fab7b500af..7cb3e5b33fa5 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 5a3020520265..0d0e8a0773bb 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 09415824d5df..b3c4b684c6e8 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 9c99cca9ae6e..625c4a743363 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 6f71cc2ba357..1ad90b1cfad8 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 0ec15d68ed39..aa8012faf1e9 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 390764588fc8..da345ba20720 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 21f7828fc844..c1b43c5290fe 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 8bf034e8203c..fc7174bb2011 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 d8284ef29970..5d2a417dccfb 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 e010bc9f536b..7a7440a790b8 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 6ab3a60df874..85a5fec16172 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 59ebc4f54eed..27b2551f1712 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 36ce5fd3b3e6..857d73abdde4 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 fdfc5907c167..a4781e496175 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 49559152b6fd..dac72b367361 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 d0aab528ed48..ebefde18f1f4 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 5d6a6b64ed36..f4c4973f61ba 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 c32e3f17880d..10d5e7222177 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 b3ec3af04ace..df642a57372e 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 4e54780dad2b..10bc2492bc80 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 212bc003e075..33292a65c5d8 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 3466f5bb1d20..fb1f432410dd 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 3dc26b1955cd..048189c3433d 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 96a007a64f63..956912249bf4 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 98e32ee0745b..526cb788a12c 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 5c9ecd13b097..529a8f8970f4 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 3fb543e96241..fd0e07fb9b49 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 7b8e0fbe6b64..ee101b312726 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 1c4c52bea289..f9cdfe23cab2 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 cdbdcf60b2c5..7bf6bea4b0f6 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 4da44e0682be..7a11ab5ad55e 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 726944fb2512..2ec29327d462 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 301cd37b76cd..fa4a4c5c6a51 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 9f55127fd168..2e8be28d76eb 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 dbbbe4e3b7d8..b6c18bd1ee7c 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 ec8666f93f09..f26dbb47ba5e 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 e25aa93a02e6..348e8d10735a 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 e8a6e8cf182d..96c650d0c684 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 f163619e7cb5..12b16c8cec8e 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 1babe011996b..6ad95a77f454 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 240ce1e2b03b..7060db0092fe 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 80a7e6ad0a7e..fa8371436b5b 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 954169a9ffb5..e4f290dec4ac 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 a8c269378c2e..e1d87cfcd88c 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 6de7b865a991..1553d689a1c2 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 bf07d666dff8..37eed341be1d 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 78e335b3db1c..29dcde88ab48 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 b65c801d10e6..c9f04757b2fe 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 fea7c462a8e0..1ad6be5c197b 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 d5e797b52b30..1ebc396cdf5b 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 f05994646b3c..33747c63fa4b 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 f11b251082bf..7976076217e7 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 ff2897a5e868..7780c39f0c14 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 25243aeef3b4..c5e3ffa1672a 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 ce327901b1a2..8dede3f50b59 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 6a47e50f62db..3f191cba7458 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 695ea69c8e65..c82663541a79 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 1afc3501a327..0fdaf01357c7 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 894a06dd5f66..7081660bc29f 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 a49384013484..f5163e965a03 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 764f507abfc6..ed7e96bcc89c 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 2aed9e2e814d..4679807ad79a 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 47734c94fe29..7baf469d7d0f 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 9dcffc3405ea..3d8806ee8003 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 e0edee630a4a..659b461f7593 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 16b8fabfc3f7..18e477f01296 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 0403684cda00..f33c686f284c 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 0f0f27bff97b..3120b23e97ee 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 c01fce90593b..946b16a0c80e 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 aaa6c07dddbb..5e81a9c70116 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 9e40e4d9ba63..30ed8ff82479 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 95e8e10a3ece..47fd21fdd249 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 c0733c8b416b..187d1be23640 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 6c30e8f4f955..9b2eb703eacc 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 6c73b0bf19c7..26c8d8e113b5 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 741e64875b64..23a86e76ef9b 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 1a82119ae95e..c1ab0477ba2a 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 5a533b9e17e1..199d097336af 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 b032b1337592..30657d2738e1 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 8126470ece9d..8935ce2bc0ae 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 5f76a4484e1a..1fac41c37217 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 2f0054cc14aa..3645128b5090 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 3787b8eeccc4..c4581359da12 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 76346d9a172c..c8b7aa412b52 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 0af628884498..888aab848d47 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 4d3279584c4b..d06903c27089 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 a5eb40b28dca..cc29818380b6 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 93a339840d62..c7e6e681da30 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 ff0002282180..361643aa8e5e 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 fcaaba6023d1..3df2676ddab7 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 6edafae39851..bd634b4f41cd 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 2f484809a5c9..8864de17ed3b 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 e64a5a3438a7..ce0fc70c1a6c 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 8d3c4ec239a1..c6cdc8ce8baf 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 3a656d6485e1..86c27f2d818b 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 41f73f5963a1..eab7d903e91c 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 3b7811748edf..88800596ce56 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 cd2be5fd84d4..50e963a0a416 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 e78e5bb8f4c7..8a1f81450fa8 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 e7e9634e0bd1..b9c0b5e6f776 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 3e6af67a9f41..82f0b4f19eda 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 e7ab6c0729fb..0b2cf31b0591 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 90bb9b1baf2b..3fd2bfc4b63a 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 4a35c9d0dbbd..83bcc5b08be8 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 dbf44ed1b053..78b1b8615b0b 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 3ea027d4f532..5c63c3937e4b 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 370a1a2794dc..d09ff6cadc57 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 41d3a184640a..d1f5b67cf85b 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 b6d1e133af73..adf9b4e83fdf 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 ce7a50d2381c..bfdd71e9a15f 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 a6f0eec126a0..24a88dceb4b5 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 d950e1e773c7..8bf7041ebad2 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 eac21b04983c..f80a2cfdd992 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 2ccd3f88200e..c92df49191b6 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 99eb4e375467..ffde0bce2451 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 b8f82b46f094..bcbb1c7474c8 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 ce7e60356f27..da6584e31e5f 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 27c59b805e21..c33736a74a70 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 1cf7534b2896..c502cd921cc8 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 58bcb08bf069..da9aaa5cb562 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 1d6ef8a13610..68d0843be5ab 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 5155a4b85586..9096fd713975 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 a8a478ffc74c..80236b8905b6 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 6331608fbe54..c8c1defa9f10 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 d1a1c584f8b8..fb05c97833c3 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 548fefe76f57..9d6767dc11f5 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 d4b67d6b0b07..d2f82c52c589 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 3f3e12eed6c6..855084be84d3 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 e950f7d62d64..2ef1faffaa66 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 2bd4d33360f8..e324e3f31296 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 518dfd0d688d..19b3632dc3fd 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 03f5265e376f..f1d0e3c78f5b 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 0de59d005731..55d0d76ad184 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 b27d3fd2fbda..5662277acce5 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 029b58c6d0c1..f662f623b190 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 f3a19081c475..e2bba3e13d10 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 e7af66da7975..b1659d6168e6 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 dae05204b8b7..ed5ba5303410 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 f5fe8cabbcec..9ecbb383d4be 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 f72024948a9d..e9ad86005339 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 d9ee77067ecb..40ba0063e439 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 6217f1c7e61d..d224dcda5901 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 d6c031d7d4f7..bd553b7ab846 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 e586980f0ad8..7b24e5a2ef22 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 69cf5904f90d..4326712458bc 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 1d6ef3914a91..6e8e2d1f7802 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 958a8bed9e2d..a638a33cf257 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 4e5d22e6e3ec..4f605ed07b35 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 212164dd2c90..79885a92f684 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 4ca3a0faa27b..501a03985cb3 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 3c851b6de2a1..a0db47885a10 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 0a9b9887d955..cbe882c173f6 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 c2a498700486..c143e2d40f3c 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 cc582c1522c0..174c588e8bf2 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 e3f6607b2ae8..84a826cf1f6a 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 c05d15643dbb..b5f1ed9b56a9 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 8b89f2e37316..43355bfd20bb 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 ea5ff466570e..48ae36001923 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 e6c09f7628eb..5f94805361a6 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 594f10883328..3ec92d713325 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 3a5767edb153..6d25f1f8471a 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 fc15bb9c59db..cfd6464661ef 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 9daee21aa17d..1fec61797568 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 e8e9c9d3ecb9..a886015a031d 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 d4494a5aff2e..7db29035f714 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 db660824fbb0..032d41688aff 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 ad1e770a4dcb..16640a32098a 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 49292acfea74..fdcca29e177b 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 f92adc040238..69a9c8a9fa84 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 7a46aee462b7..69a89e94cd6f 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 e740e86e5d0a..f0ff0437a8b4 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 338e436df500..f401f7d55baa 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 c3ac624b6004..e633191bd310 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 92810791314d..03d4174d652b 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 59dc3b5043cd..ae90e04e0812 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 cb634671bd4f..1779e33f3b1b 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 12c77250c0e7..31fa78902d5d 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 de008a3708ae..71a290c1fc06 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 727b779776b9..32286ed084c2 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 5fd3ca0d163b..d0a6c1afa230 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 fa6d015e48eb..bbf11949e7e3 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 2cb871844889..e58c36e047db 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 29a0eca41728..24f46b0a2fab 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 c0518e4b08cc..7388ca683580 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 78592f82709d..546d30dbad74 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 901394384d54..2616c122a659 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 56ad0612f74b..2d7bff836815 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 102bd6b7b175..d4d9199bf3b0 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 0ed36b690f49..7a5cc979df9b 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 db422b6012ae..6aefacacd002 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 b2184eae33e1..27767cda3065 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 3947746286da..162be0754d91 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 a026c2bd77a6..6cbe1fd0a3f8 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 92d35f5371ab..c8f3a77ea4c5 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 0cf1ceb91dea..75981f16a7fd 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 243cf685e814..74d5d827f166 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 ca904900da0b..ff09095a60f9 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 b484b42e5667..2b5bb905e830 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 ac14ece69184..9b2a4ab6bc74 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 5204d72b980c..dc35dd05498b 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 4f25b4b0dca5..1c66a60b294b 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 98836bcb8937..feae7adda68f 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 96e9d93fe128..3bd70f1090d0 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 23578aa0e9fb..641be4dee544 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 528b0f22a81e..432476d1ebb1 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 3f8d6f0716b3..bce7badeffe1 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 b81e38432e83..246588527d9b 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 08225b8e3f22..911160976658 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 e83eee0936ad..d1e65bf45957 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 50f04b1eae15..b8bc2953576a 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 ed8ca99bd2c9..f0891e7d6a74 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 fc1acfd32d2f..fd5768dc7d1c 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 27bfa099f211..d4540643e029 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 d828fb9fd805..ee2e0c3973dc 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 ac27dfa1aeb4..a487e77a8331 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 1a9d4601acaf..0f302708537e 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 765673531987..de05868ebf93 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 3e54c9feebc6..ba4de590e636 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 719555c092a7..4e432934e3cd 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 c0edda4f7df2..85bcf4521fe6 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 89cd1d767a5d..5f7375d7450d 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 ff2876e8471f..0b603cd4bccb 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 0825c1a8ecbc..c4eaba6bba23 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 042a28365951..fcaafbbc1490 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 ad69fe5eed20..e6001d06f0f3 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 a40c15908bc6..ebe73e27ca80 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 d4067a335927..0b34b07edbee 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 ddd59b583a81..e11d2c0715cb 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 38f61c36c8c6..7a5f53416620 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 588bd2b76c10..d65efb5c4647 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 195bda82e9ce..2bfbf9dcccaa 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 13ad27f93725..5f2cfc70d8ec 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 b838be9fb9f2..c087a206566f 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 471f317edf96..ab93666f28af 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 40c42d82f68d..03bb04b77860 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 344323122dc2..03c307834114 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 346ed1207cde..6c3e1067436d 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 d1b1ff350695..53dc0f4cbedc 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 f80796756411..bca4df960406 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 30c2666df470..df006a4d7a93 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 c448294e0f64..45bb4d3c5bfe 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 5e49e330cacf..d84572a6afe7 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 f2a0bc3b1aaf..1bccd8806be9 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 6bbe022c690f..a70c73e9b8f2 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 9a1802737722..b0f163adc02e 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 afb6985e4582..b1f7f570d3f1 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 ff83695c5624..7698d2c4b394 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 2d2774bd194c..042fe6c600da 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 b32bb61b495d..36fd44b266f7 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 1e387326b2e6..8567d812e4fb 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 bc5b44963f72..01bf3615acfe 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 732bf19c1736..770b19e81721 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 03cdfa05e6b2..eb019d1e1740 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 73b1f0d58c83..c32ab6b8116e 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 24e88ed93caa..54d5d1038a62 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 69bfb4f3cbfb..687aefbc068a 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 e8f445aaaf72..27cb2f73d562 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 01c6b80b46ca..34999bb50702 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 ce0e0839f1d1..5456eddb78d0 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 922e60a4c4fa..636b8e0c0ae5 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 a4161d4fc3dc..24e3be0ed2e4 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 2a67aeab44e3..3ca064768b2d 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 a573c6e1c0b8..8f07cd34cc9e 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 8cd981e03f11..5e39c01ab5e2 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 faa93787d138..ab0f4f72e62d 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 b07cde0fabd7..f0a1940cb5c1 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 1e37b40c9540..f480de24e3e4 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 7d31de1d22df..dc40a1715a68 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 5aefec3ece03..001a09fc5523 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 478809324ee6..d3716b22729f 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 3f01187a8bff..96ee5e033e16 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 b68f19c5dd21..d0c14d8b5d09 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 f628469ce3a6..f846bb404864 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 86865af0b529..59244e12eb8d 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 ea27d54ee414..ab47c9df0817 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 027389556fe2..f3c307318a0b 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 693f1f7dc39f..7a61a31952f4 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 2b1aec4df0be..ea8a334f57c5 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 426a5fa723fc..367ad66a1a62 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 31e3f3c85923..c49619ef2ac7 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 a61c868ed0a1..9845bf8f2b65 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 403f4470de77..edc3ab9736da 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 f48c8bf72d72..b69fce4cf773 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 64c203e54807..f3e3eafcd8d1 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 0bf889a855d0..ced7fad47b92 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 a1d33ddca700..a6b1f46a5d1a 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 5605696715e3..0c5d3e2f72fa 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 377a1f25b635..13ae7239a143 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 eb009036a9a8..e87315fe1449 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 ec6427545f45..c3114265e0a8 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 bcdcb704a753..56ef4e9e0884 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 6ce88c400e0f..50475a34226b 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 5ce0e65452e9..44fcdb056dd6 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 aa0046f45822..91bd652d37b8 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 ec57dec14ed2..26a2d1592aba 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 470b22b48749..79f591d8cb61 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 60d379e41ad9..26eb94d800c3 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 48307f4d9ae6..3658e2a28f2a 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 a221b9578af3..68026a60be68 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 e0c40bbc7344..4023a9a044aa 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 d275fb6a804f..fe071b263838 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 e3174fd446a1..f8ccba6b0941 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 57e2066d83c5..82ab7b506bab 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 19ed58eceb96..4db7cf273f70 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 964291bc6784..1afba1fd3434 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 72fd88e119fd..9dac1030b9c7 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 3672a3590fd7..8697ba58a390 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 dbac90382d1d..abe63c60fb8d 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 0083846568e2..bab76a8c4331 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 ea9bf837c247..86a7d6a7772a 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 a750083c607f..210c05988bf2 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 0b2604f95b6c..8a4ca92e44b6 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 e9e0349f2c2d..60f67c8c67c0 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 2ed3cbc08cd5..32408e0d9367 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 53cfbb7c98fc..696a5024ec2a 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 63da170d0bbb..c19af0f9796a 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 25ffcfad7c7e..bb25b97df506 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 04d34e21cdc7..6e28cabd2fe6 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 a8a8fa4e19a4..ae507a31ba78 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 4e5208e50580..e04d45bbd0df 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 e1e8218582f6..124af9bea756 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 ec3019902814..f13d97aaff57 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 a7c4ac00a448..da3cd83f0fda 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 e6215587153c..96ea4aef85b4 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 79c4ad4cd2a2..7d922bafdcdb 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 1e9e90a6b6f0..d1e42509584b 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 cf9addb8a947..2078e59b8b4b 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 30da2811ed4d..16b89bc6e819 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 658ed6c18e05..2a4fb16a09ad 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 a750083c607f..210c05988bf2 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 ad312a875e39..40d8aec5ef69 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 354657db4db3..12a1ab1a43d5 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 f53e8fe8252f..26db43341ab7 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 24a389c450ea..1b6794ae6986 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 889f399a7f25..f89098f3a5ec 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 889f399a7f25..f89098f3a5ec 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 889f399a7f25..f89098f3a5ec 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 ffe2a7415515..e3240e27c2a0 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 93a613e8b8fc..188912bed92e 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 8d96381b9bdf..6d5e7b67c782 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 f1144a4a55b1..5e06a1c6cf8b 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 e2cf4e739875..585d9a3c9be3 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 38fbd4733d5c..76d8036d8a44 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 54cf333a45b1..32e4999a71bc 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 e0304a01405a..f1593b505f9a 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 9f64a1e06b9d..51f34423366f 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 03cb4571496e..2ea2d3079dc0 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 c5e71a87dfbe..0cbb0c06096d 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 ad8a5bbb0f9f..2670d8884ae7 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 b785573f2031..2f906d91e6b2 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 61959594c798..22aecb7c05fc 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 fb48f748ce00..e24e7c90d371 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 d294b1591279..4e3cb090cdc4 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 ca2509ed84b5..0c9b3e6bde77 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 7b4982a6178f..6e2e8561a835 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 04625559b919..dc32adb2e27a 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 6d70fe611c47..ddbc5902d6b0 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 7493f9cdb3de..1e00f3ad7ac6 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 ecff2d725879..9d851d62d126 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 0c7358655582..25a44505c772 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 460f4d9f726f..b2c3dd49de94 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 a4187f9e7c20..78804cba342d 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 c13f384fa3ae..3b3565c25b27 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 2ec620720202..9e76deab9ce4 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 21b137c99a74..d16fc55656ce 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 4f61de47d854..875225c15cae 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 6b8df78a061c..389bb5b6a92f 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 80bfd357f073..432b0a601b22 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 39cbf7d3b72f..491c5c71d76c 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 7bdfa93c21fc..b863b0fc1140 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 8ff6e352c53d..00ea388af932 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 a73430db2c19..7b8579890b8f 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 b9a7e08f9937..b17b90742b50 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 7ba3f98a7a9a..8b35898a4d20 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 b2dab5c93814..c21edff25cf7 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 8f2e5b94c3a6..63eb2c747068 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 d0e97bf01f38..42bb35edf3ba 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 4482b7032a75..a5ede2ee04da 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 b10f6d57255d..06aad569169d 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 52a56eb77f78..9146588aa4bc 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 98a4af0c467a..3c8de7cfcccc 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 5cf3fd949282..484c3ea41166 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 86cc79d6b424..27986277fad4 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 c240dc18fd36..e8aa7f59f853 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 68e6fa838b4e..86e177617e59 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 3ddf8d6ef240..dafc982607c1 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 47c590ce2f01..bfbea280f0bc 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 f3a469791427..6f8a591b7d46 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 d193e073e7f0..7cf1f2bccc39 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 7c2fc296bb02..0115dbd27ef6 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 ad027d68588f..abacccf5a8a4 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 4f4db1191159..64d0bbc2b41f 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 9dd608986df1..2f45dace2f9c 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 16dba6292db9..26b3899df968 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 7719dd9ad855..210968a6ce54 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 0f05f916cb93..5efef8a61217 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 144eeca23184..cd6bda276468 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 6296e5042d28..5a81c7708fea 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 692197210b15..948ce63c76c2 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 07fb6abaeace..29c278171a61 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 1c3ce33039e1..5d9b907f0e4a 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 8a4ff16694bd..70c27c42adf8 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 c13ce3c9cd2c..c9b1af5540a1 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 7930964c83bf..9eb8857e5e9f 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 afd75a41f7b0..d9da7374e620 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 e7b86a9098d1..4aeb72aef8c5 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 e510ace5fc14..2c0d8849cdd6 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 63e6eca15160..8cdc152f163a 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 65ed8c7b4dd7..d2aea4e0690d 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 2fe4d34fb228..899ea82ccb7e 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 71c6f0a69942..5fedbb724374 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 971f39a8ce13..5c721c25a781 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 58cde8fd6e0c..3f0610cd765c 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 3930e556e9a9..6d06c406f6c7 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 e600c1c08e5c..29514b58e242 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 34f4aaedb326..05873ef13d76 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 2f1cffa2fa90..cbf278861faf 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 b3ba0ec3a2a0..074e9ed6947a 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 0e17f2251181..26d15fb04734 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 01a2aaffb9ef..5032d0c9db3b 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 77bd81856760..3887972a5162 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 2582975e219a..f79828fc7d66 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 5489533972e7..fd73e480865a 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 8e6b8224b318..3748ee2b8cc8 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 7f416262dcb8..64909b329199 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 fd71248d9cb4..db2b38334b5d 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 9f7f1cc6fc7d..b95229ffa4a0 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 ab4ac7237c78..4f92109ab90a 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 86e94beb7e25..a45ea9a87a7b 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 7d2d75bf2e87..0fa40709a7b9 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 c60e06c3ceb3..5fd1e90ebfd9 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 d48022c09fee..8b6dfb0ed40e 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 c511d45f02de..a346903d6525 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 a8f7a41c4428..601ef577079c 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 b7a44ed86239..03a8c14e1a62 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 b7340b79d682..c27d3ccbb9d1 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 642dbd7f821c..d31b847997eb 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 2efa8cc02f42..d97e2f2d239b 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 7f32b8b91a6f..7cda692772df 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 72d82da45344..eec81921f1ce 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 68056370c448..e3c1f0efaf00 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 c8288b5923cf..9ab46a775789 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 ddf3be690dd7..11e3c8a1a332 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 0536fa2a20f4..ddeeec902f10 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 4221ebfdffb2..bd3d4a1acdc4 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 e5dcd6db033f..bf95709848fb 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 cbb7d1726d9e..1b7fdf112515 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 1458787ea65a..9ffc66d284d2 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 152abe109bca..66b56a6aee50 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 ed828312b46d..67e2c509f535 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 bbf7ba79e2a6..f1679a5ea66a 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 adc6b1939da7..7c56828bf687 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 580162936401..f8fb995c83e2 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 2c7503799332..f4f27a4456df 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 3815498f86fb..1bc2b7dd03ef 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 c014b2ccf1e4..33026803c817 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 48aad9481bbe..8662fa381c43 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 43640079777a..7465f7424e38 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 7b16fb1a8e08..b81344cceecb 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 ad3d9748bf0a..55793fb62029 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 0b5510489fb4..04bedf18ef08 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 a6cb56e3156d..12fc38a02f72 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 246dbb5563c1..ccbb1219ce27 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 4c5b35ec4559..3672b99151d3 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 94e3df4b3f1e..f3127abafb7a 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 fe50a7dd1be3..1b6c3c933771 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 a28bd14ba88f..6d77d323b800 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 a778dae1ed31..3510d4ce939c 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 6ccc99e845db..693d6b71b27e 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 d58c17ad9c8d..24e5404c2970 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 65f4c1b6a648..95cdb2de8d53 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 f7315d628a57..812201d7e52a 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 83949ddba3d1..f5332ac12809 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 de14d5ba82a1..dda1f129a335 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 9570359c69e3..7e264eb03d83 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 46462c432a8c..f6a628e97f56 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 a481a9cc5fe8..6a15d3206eee 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 a627cbbd88f1..a183639ac3a5 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 5158c2893404..cd8fe6b7042b 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 5d8ad932ed61..c46396dfbd6a 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 349b5204434d..0f0c2f6cd652 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 dca26742dacc..5134256a893f 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 b4a050bf1ede..2f25d0010833 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 a288d2e4d6e0..4f3ec222c825 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 248f9e923d32..ad48f3aa93a3 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 fbd89501559b..1b9379fd8c86 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 31a48b4adcfa..f5d28a281541 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 6aa5d8217a46..165a246935f9 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 39501e2d697a..9a130808ae8d 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 198b71466478..54beed9b3ac2 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 0858833678bf..e3bf7b31205c 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 3852a14d9f98..ee29f44ecc99 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 2c455fc35634..68daf2893efa 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 231407b226ee..5fed86d50487 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 96c71b084b13..d20bc7394067 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 d5c93f81fd84..4cdbc680e6fc 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 7b6ede19341b..e4779a1853da 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 aafab5d86b86..2c02ce670b94 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 a455d4efd71b..e53d7e9da60e 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 82470af82faf..8fe0a97c61c8 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 15deaba5638a..3d4a30507884 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 7767c13c825b..2e0d1b36ca59 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 37415994210c..baf7874bc1a6 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 2e7f198d8c7c..b8392c967b10 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 45155c721660..6a50248cb70b 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 bba8b2445249..17564bcbf269 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 220d2e83cc0a..33961de7d6a4 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 9ddcdb649d8d..c5238086fc05 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 5f9700df1cbd..0fd634125d51 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 5c37a585a40b..a67fe8c2d500 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 ce34ffcc8581..9e507eaf4dc5 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 04f3b8eaf57f..46d5ac21b360 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 948b11e0f302..d2f35973511a 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 ca52659c4db1..5e69396aa37f 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 39ad0c53f1e9..29eb5161a6c3 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 b1bdb813ac6a..8218af6bcffd 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 2dc91ec84f55..f46d926bcf49 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 2beb20add32e..01ce04b63d06 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 80b88568e42a..2a31a5f904c8 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 c2e4b2ff10df..ff924b2866d8 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 fff1b47f53fd..fdf827956667 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 e2ebb394d0ad..27da42882f3a 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 09cd56220323..b2b998a4c36b 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 b6dab1c32e8b..af6203262f22 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 e2520d978908..30932239d8a2 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 e6377867018c..b177f3a01104 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 c5c80ce54f12..bd5959df2e1e 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 5ae5ebb450e8..9a61bc8ed6d6 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 0c1e93144416..2e112099a50d 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 7c4dd3ec84f6..caa265b4ea28 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 9eb2f724017e..00398d272bee 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 8dbd0395b97b..477161fba804 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 465e1360c2ad..0b819482c710 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 8197713b97ed..eb47b5f462f9 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 0b8953793307..b6e619788849 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 987fd455fcc0..2509416ad87d 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 659ef88fce69..4d17d1e8816f 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 1ddf127172e6..276d8f0783aa 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 27840b5f835d..09c808a041df 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 59ca22e9728c..d40fcadf57b1 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 6b7799297e89..3aff84a91f71 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 a4dd45c63f56..d512308377d7 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 84dd3f49239f..9894b89e8e41 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 fdd14fc2dbe7..0a2a77f75ff1 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 3bfe81ae8d03..d88bc4b47e20 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 e5914cd676e7..d8aaa5a6cc12 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 df436fb99297..e5c1486d8ae7 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 83fd2544fc8d..ccd98b6ef062 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 b04569c9d722..84d1832be607 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 62f12fd1a6d6..849b84cb1ab7 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 942aeb6fdf40..f3e60893669c 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 36d8ab151e4f..9869881db9a4 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 4a39054967b4..416496f3219e 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 bc86f94e921c..e161b33dc253 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 7ebd259189d6..fad1add40afa 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 90cbd903ad67..f4fbb1d2c7c1 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 7cecdd9e38e7..126f5ae107ff 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 4c890e3ae699..5f764d3ceef8 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 61e4329bbb34..0e964d20f9c0 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 dfc16d6ce443..7797086d4a08 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 afd48acb6bb3..26e3044d8df0 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 9d4daf4cd795..6de33b7e1915 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 7d387025ad44..c0716f1ebf56 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 b5f1d5d35b2d..3ce928745a96 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 e5647d72cba3..c9a64de7f6bb 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 102b56562452..65e248e4bd29 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 3e5544296e46..97815793d298 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 fd67ccab6fa7..994fc86778e0 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 acea37b358b2..68fc8573dde3 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 36f3081211d2..740037fe4342 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 892697493b7a..4bb68e6fe68b 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 2b2f5f1ad8d0..a8db78a378c7 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 a7ab88fe9935..8a67b20eec11 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 05936b191ffe..528edb331cf5 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 83349dd3350b..a74e542592fb 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 048aaf65fbfa..608edb82f025 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 1d3aa49eac67..da83222b11a6 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 f0c0a9fd61a1..26a7a9efd0ba 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 88d5bd06ca5c..85321de579a8 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 d48f00d5acac..a971ce12362e 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 0ebaea08e189..f261de5f4025 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 6211de427178..fd08c360d362 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 261742a26cbf..ac8e5e0187df 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 6ac49be141ca..b9b6b6956c53 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 976238cc3bd0..d55ae4b57854 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 927ecd9aee03..d2bb0dc76312 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 4795ed062c8f..4dc61c320adc 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 337ec307ef32..54db03f774ee 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 3215e0cd3460..809e9f6f6c4b 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 fba4ffa1c6ed..f405ab5c59dd 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 5b59e9b4eb38..57770a745e88 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 487d41649f4c..e5be5edc2166 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 f6c4ed5794c9..0dd0a6f7e351 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 0ffa5eb89404..91ef4de956de 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 0eecc7f8cc5d..da0e9f2fc046 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 e429513b51d3..2ebf2a194b81 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 43853117af69..53af6aea1f64 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 54e01608498f..4821aef1bbd6 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 f16e8c075538..101a7cd15156 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 5f3473e9feb7..f7bb117c88fc 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 0ee0d0efad6c..a5aad3c669cc 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 e36fffd97d1b..c23d6788eefe 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 fc68884fe9c6..d05c0f058069 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 38a1095703b6..0be2e558e42c 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 971993332f54..bde375a2c490 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 0d4b9007c7b5..6935f611b361 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 f6722e96537c..b3fe04ff0ea4 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 d1686f7fd2b9..de7f946d1d9f 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 5be91f27092f..f761e9715a02 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 0e1142db37d2..17e5fec4701b 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 c1de139a9a95..078824cea1ba 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 c4756a21a001..cbb17bb6ba61 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 6618992e0361..f0d529ad6a69 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 86c02bf38e6f..1d039ffe18c2 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 4fc937f96a1f..403eae260dc1 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 ff2b02f73ea6..1dfc0fc0f3d6 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 e905d712f622..6b1b8a4b738a 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 2046d6680dd2..37dee1c19db8 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 9150c831c896..3d92b9dcde4c 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 3783100b5028..102539ed9d93 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 3c04b4517cb7..27d113c18a3d 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 72ee4d24bb62..e8bfa9245f59 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 0374cbdbc1fd..4d20c67cf0f8 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 1e086160f3f3..c925018bcc24 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 3161d6fbbe64..27f569580448 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 b716fc870e07..ab99deb6cb47 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 7dd65701f125..4944de0b82f3 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 c454dfa4eb93..1edd51dd23c6 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 c95777b0ef19..22ea6f7534a7 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 3f663fd09f88..cd513d2aff4d 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 56b7988e0e4e..9595d00876bc 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 3ebe3225437a..9dce827a57cb 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 dca8aaef1500..98bfda9bddb0 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 7a853631d43b..b64fbd9d49a1 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 3093f227e6f7..be37217a7d45 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 2b6ec850241c..e26234bd4553 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 5738d14d97bd..729f411a0215 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 024226a01167..839e90854409 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 e591b2a93e12..25434e0050f0 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 374e5d5acd08..81618b3b791e 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 b05b8c8da1f3..634aaf8115f2 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 7ba0f3a9e8dd..ad4e0d070da3 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 50f91420ce2f..5307f6677927 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 17174e22c743..7250da54c6c7 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 405a69c94bf0..b297ec1b4e24 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 adaf25c6bbff..d85b83284fdd 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 014ccac31b7a..e31516a6480b 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 b46d85160d1e..d54b428bf22f 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 106f196b4555..ec1a246245e3 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 30f4db7180ec..2a13d22e22ae 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 9356c4129923..39205a11dd73 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 329fadb150fc..d3b441fbe88f 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 4c4816c2fbc8..d5f6628e0dbc 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 10dc6115dcb2..fb6718e55b28 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 e98582cbce34..fd343eaeea95 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 bac695d4e794..016bccc056c3 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 6d4c1562053b..836370329b65 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 c06a135dcbc2..f41684aaa989 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 faf2526c8d8f..91be3afbe225 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 6a625fb05e8f..f1d972b3c550 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 b0e932e1fe03..8a5b962e6819 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 30f36c24489c..ce29a8239e87 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 94f16c6fd021..acf3da2d55f3 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 f0591c38c007..829e4f8ee440 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 96808a3ed914..9ede4031bb8e 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 43888cecedab..7de55d5f6752 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 193a523aed24..7c9a4167bfb5 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 0d1cded36b62..de8afd95a84a 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 d5bca6a24741..4b9fe71a88fa 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 52fbb90ed541..24f0867d095d 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 a5a24a806340..56c881826af6 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 0207f607be8e..3090f68c72b7 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 9379753598eb..e267f858eaa8 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 f8abd1b96d80..8795adcdd420 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 b74e45c9328d..bc3e790aaaeb 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 3b9d07610d29..1d9bd4d16fc9 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 33229a205f4d..c0b036b1c4de 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 5a00e5b68235..8585d688a082 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 0cf9ba1b4ca9..aadc750e14ed 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 4c22aa2d7181..9ad95e274b7e 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 b9ff24c7624d..b2ebab382bd9 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 2ad92b794449..d616f5e5e89a 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 5dce8180f592..fccfe53f40d3 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 9d2855f5c616..ad3a90ddeb5d 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 54e42917f52d..2a89eefd4613 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 15c0c695fcab..7a9b465bb56f 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 fe4ae345d85f..cf5ab5123f67 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 33f9f56a5bbc..6a76db9b1d63 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 a6c1dc53f8b2..5809e56fb7b4 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 1828fdef9013..6d3072f3ddd7 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 07e093c152d6..b3953c2e8d02 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 5f76b0cb2f4b..9982e88874c0 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 80b9dc4c1c33..4804d34a920c 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 98a7fdbc5049..c7a7c927c0c2 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 be86519ecb15..b4c26ed910a5 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 60289aa78037..246443f029fa 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 230ac75298e7..fd77fab8738d 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 e54098d4d48b..c330f3aa05c4 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 900dfff652ea..22cffc537bd5 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 de5530485f3e..ac346bc83614 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 221b5cf6bfad..21aa562365af 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 bc346aea51cf..fb9f8603e756 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 dacaf489a908..0a18b0d6de5d 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 5f2816ec6210..7630f2753d9d 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 fa04f4b12d5f..d4337dcb1654 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 c8eee9835fed..ba09550aad56 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 df97d2c13278..cbf76a6830b8 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 a8814ce28528..70cefbe29c16 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 a3bed707eccd..2ae8eb9c56d2 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 e5754d355d9c..e8c69f635fa2 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 6e15cf3fe8ad..2c699437c830 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 6681119557d7..4f21814bb23e 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 351438a54707..6eaa7d4d9bc9 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 23d2a4b0a99c..7a4cef1c2edf 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 6ca09fac819d..f003e40fa55f 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 a2e8eb27edea..d553be2c0b6c 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 1b13ea3e93c8..63d06d42b1ac 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 f11456250d87..bd62a6447851 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 9d28eb9de095..ef4701335dda 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 5115f687c263..ee8be90d14d9 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 86bcf1f6f8d9..d5c8a529e1e3 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 65881257815a..b6e6ea8dd110 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 8bb4dd288f05..5505b78f17c2 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 4db4c29e53d5..d5b33bfc3b1c 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 06883a857900..843434bfa6ea 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 c712f15e3246..fea6f91ff2bd 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 180f5ac6cdc4..c6ce001806d1 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 9c0e0bef480d..60b5ded8c092 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 def60feb5a6e..6bbfb69800e1 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 486159c0e4aa..846345c84685 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 acb4bbebe7f5..7233ca69e2ed 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 72e50d78bc25..d73558d8271d 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 0deb8c7f119e..0c0181de0357 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 f2fe59668da9..2757f5057ac3 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 4665225178c4..5173b5ec88e3 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 0ab7e17f87b5..58a6f2952830 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 22f04c58f3b3..57f0f848b77b 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 5c42c0d8bec2..e5078bacb932 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 9bb25a66f092..801329bcc5af 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 9e6e23e8882c..0578b827a47a 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 aa2154e3e9e2..09dc4bfde35f 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 349a24579a47..c13804e4534e 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 071b86e2e149..73bee8a6c68e 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 d91b3a358da1..e836b0b88ffc 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 a303a0d1fcee..e8a74a4ac34b 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 9a3520661a6f..56a6fb5bfa3f 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 86a170141f8a..00eb952635a9 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 37fe610637e9..1a36bc5b372f 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 dba292ef9e21..32a223c91595 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 ef7a772e6c51..9d20709ee9ba 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 1ec20c50034b..8f2cdcb6e1a3 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 762dfbe48439..30ef39038a06 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 542be3942b7e..9f4e50679ffb 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 58a2c271ecfb..674cf930c0a6 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 fefe100ba0ee..122ef542e7d6 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 975d7a1f694c..2add6b2e1865 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 3ecea5c53139..364b4d358127 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 a032a2ca0523..3c370a1b8f32 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 0d59e50264e1..a1c118478677 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 221c0416dbf7..6aa8f6fd821e 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 115f00b3f4e1..6bd810b0956d 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 033dcdfc08db..57dac2e4adb7 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 788c79adc1fd..c73b8d7e4d29 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 9108f27b5f7f..df575b0f6b63 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 6d7bca4da24d..c765ca6abb43 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 1023fee37d5d..b0a3f2340eb4 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 94327846d616..d7ce32cde4bb 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 e1d836b7c3e3..ba7124fae390 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 d851fac8e644..e1edde6de19c 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 69bc189dd357..8d7826463336 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 e737ef26e9b3..1c103f03c354 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 2c0571a7bdd3..392d29a5bfcd 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 9afb6853b362..bd4df337614a 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 3eb8a9ad0602..0234eef0cd00 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 6b7d88356508..59c81d053bc7 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 7c7e31f4db40..ea4b34eacba5 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 bd81ce0b19c0..77756d0bee06 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 6b91c455e0e9..f23702d1d8cb 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 fcc09b159ec2..59a29446f8f0 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 e061174f667d..6d307be90c12 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 75e48bf4a482..02915a5dc372 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 3dfbef0ee90f..15907bc2ddbf 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 b62cf31205fd..93c2901fe66c 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 67de50a1d922..c427cf7af6d6 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 670303906d24..17b59009bb84 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 a6f693bd5b5f..af13a46564ec 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 2de37c859c97..e35f743d96aa 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 14539d4b6d8f..babeaf67eb2e 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 1183ac65b9a7..6ed2d4fad0ee 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 54f2f451bbe5..c1e6a92e3174 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 880907b24b46..5ff3cd25e67b 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 7bc44d65be9e..50ad8a173adc 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 b96f61a26da8..cf456b9b2614 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 067e82a17fdc..b3859ba1ce60 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 34e907bde839..3ead5cb1fd7a 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 346ea18a8f8e..ab0dcda64e63 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 a07be9d92b4e..ac6a2998a476 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 8842cb944045..f5fb1649cdc4 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 b4173f3b60bc..bf3c5e4d435d 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 d4c6658a3302..3b982857db8d 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 2f5a23e47a74..48af6b009d3f 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 d8573d3af014..6b55e82629bb 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 2190fa337b49..8213dae13695 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 ae0c2e6bcfa4..b854b422b3a9 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 50c46579086c..b63458b39e95 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 0df370bff8da..37b2de0fd2d4 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 b0d5d0685152..ea8fd0055619 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 e197c8b73c53..9dbc2b956268 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 abd5d2fdb393..55d8afa8d47c 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 e85976b7e1dc..1150d7e1059f 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 9ba19e800dd6..6b96fcf0ae31 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 15f062edf0ed..b1b0e68b90db 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 b4cc7a9e17e6..8c6286426d32 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 fd9f287250d2..ebee4daefbea 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 1fe4044d5279..98f8d039cd64 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 7f89c12804b6..b0790f86ef54 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 747ccbf0fabc..17817a460d79 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 1c37648ff1cb..a9640816b893 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 75797b1cbfee..4ab1704a9fbb 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 f3480fcc9eed..f6bba19a19ea 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 fc3a83876c5b..bd6f476f8792 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 9d579e67a4be..91f1b90bdc04 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 a00a6d481050..79719dae44f7 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 1ebebe632c70..cf452cf85268 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 ce39045d71b3..5896091f8c47 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 42d7283699fa..cb649b1ec797 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 b479c967b0da..0eb422728c63 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 34a0ba1e271e..54e5c95c259f 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 95edbdc0efa1..587dd70c18b2 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 f5644c8883d8..b534d23b1076 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 13881e042a32..8b264ebd0e42 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 5a0db816a2bc..8b51f65fd04f 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 3c39c53de5f0..443b63857357 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 7d811a2cc1f3..a1c0425b24e3 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 e216f6879133..d35e9bb7f1ef 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 da2778f61018..aa75aa9c989d 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 17f203e1565e..502062a559c1 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 1954d2942e0b..53f8e3c56d76 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 2f474d978d3b..85aabe46640e 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 d6a82ca3a08b..5ee38078a295 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 8e4850197de5..97052a1d09a4 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 e22eed3e0ef5..0592ac2e0e70 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 015d90aaf21f..c36ec3538c36 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 60790e297466..61826e9977e8 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 d665c4479c9a..620e3259917e 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 ae81421e9e19..c6fab4aabb6b 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 f8ac793e4c12..5ead1353bcd9 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 9f3f38ad4bc6..2a40a1b86ca2 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 df242721bc31..e5394ddd688e 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 d81724a3685a..c032cc7a6880 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 5127ec069be9..08739de83138 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 fdb422201d20..64fa32156c39 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 4d3469653948..825ddb6a5cdb 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 d06d0d6dd108..73f8af86bd05 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 2304a766aaff..820d3d63b62d 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 9105cb6b0438..99806922ba55 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 817e9ee5257d..9d65a2ac3026 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 0b423b340226..d43fabcedec5 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 dff8a244453a..8f11c8a6e557 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 234b0dd00638..fe4df09342f7 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 b6cb24d15fe0..6153e2770a4b 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 2aac0a2b4d11..bc45a70777ca 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 92d8be6bb166..d80370aee820 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 51bfaf73b57b..d97469edaf97 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 84c7926f4152..fc8fc3f2a1d9 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 e0c20b819e84..5218ea925661 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 fc0d82727b55..c4ecb8f67a18 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 2468d51cfdd1..31ca9419589c 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 4520a36960c7..062067f8e850 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 e9e5e0235df3..a9e2ff06290a 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 120399f0c787..6d57a4f5798f 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 745668c4dd43..1e02a1351001 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 b3853def7213..0bbf2dabffe5 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 92becf7c4aff..0515380564d4 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 7ac2458e3992..1064713ac592 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 a848b6d2fc9f..ad0f10f7ee83 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 bfd9fe42e67a..5c8f5f4db3b5 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 9b3c2cf2a3b0..496f97b5e24a 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 4c383fe15067..b40067830829 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 06e4ede8b5e7..c3f9f8e67648 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 aa3b09ec9662..f41e70c99ff8 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 7d7cb967c661..8a901cc60fd4 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 94be3ff46acf..364ddfcc8ddd 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 5439f859a03e..65e605a4a2fe 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 c578813b8468..18d0267fed36 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 0907061d64a1..e7c560a2c351 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 5609dc51a67e..5908887c4c7a 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 2a4cd6004260..a503f2bf7a82 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 b3557c71b744..57c1ba055608 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 2f9ca09f3a5d..a082521f4b5b 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 8a5f514db7f6..4b18fa397436 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 6d4350495272..f26a97e2ebe7 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 984a7fabb663..693f406683db 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 334c7cc5b810..b39b7cb0daca 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 c503005f16ba..7d2e1b87215f 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 fdd0516e4d65..386fea5556c6 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 4f0db23f47dd..34b9166a9841 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 430c1f06f43a..d41eb95ba3fb 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 63ed236505e2..4d8cff8e60e8 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 fa6826450c96..1be4ee8de793 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 839f350d7413..0dfafffe770e 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 fe57910530f8..aa3183885bfc 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 1411bcf89e87..24180ed21966 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 5d233b38dbe2..49f153fabdac 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 f17c9fa6ca93..f0ed7d97b2ca 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 ff45ace7857a..e8e0e847a8eb 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 755d3df42dee..bd3624a8aee3 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 c321e86dc182..8430e826dc37 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 37c602ae0b03..3b7bb0d505d3 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 a6cf812ca644..8549f5d8eb6d 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 8efcfbb70742..342fafc67e20 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 e909c79070ca..4e31f674435b 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 2bfbc3871d12..4c5134a29232 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 7472443dcee9..d8e5eb884cfc 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 044824cbbd36..e0233382e85e 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 5989cfa1c799..876e83b5e89e 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 377c85fef490..6ffc3f8d3793 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 3bfa6d2c2541..fbe415e2e10c 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 14039626545c..72a212453cdb 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 8cdb08e81b90..38d8a36bcdfa 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 647906c2dc22..60eedf7b069a 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 5058d61b5880..c4948051c18e 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 3f63cb8e9003..c80e91ca12cb 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 fd23e9f5562b..7ec421099c7a 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 f3fb012a5842..135908c8aef9 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 0e47e70bb02a..742732ebc494 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 d261c10e36db..861ca521bb7b 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 2005d8f4d794..bd304b9ad62e 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 5057453c9269..014bf91886f7 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 2c4a070ce839..0ecd090c1dff 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 950ad1f50468..2f50c68c55b9 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 e51ce5d1d5b8..fcab56ac819d 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 debbf085d618..717e1a039825 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 6a0639099b14..9d7492fd1d0d 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 6a0639099b14..9d7492fd1d0d 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 c4a3dd9415c2..8be9c004952d 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 c4a3dd9415c2..8be9c004952d 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 5e2bf64a2e28..36b528029903 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 290fcd6b7db7..725e3aaa0726 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 dd31710414cd..dc864d870392 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 cb0cd7a83313..f15bc6bced8c 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 2c388cf3713b..77c704dfedae 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 67dfbf646013..8ecbd6f9d37f 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 f9e4bc14ec82..e04e6cf30b8f 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 1c0426808c70..ce9a5edf007f 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 6f929731c767..277f658026b8 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 d592438009a4..2625cdc8b489 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 a948baee53c4..eff03c6fbe63 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 32e9c0c33661..378b112c40cb 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 5eafbb2c2fc6..bdf83ad8b8ff 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 72f2868e0bfd..1e78acf201da 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 37e00a3936e7..ce29fc51a4fd 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 209b91af1ddf..f025ccfeaeb3 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 ef3c2db696af..0312964d5f6f 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 d9e39a3b748a..f94bf2d66d38 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 d9e39a3b748a..f94bf2d66d38 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 900b3d09334d..5a5eeacedfcc 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 985348665c90..b1c446e10226 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 2c02b75960ec..8e62f698e252 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 3308870f654c..98c48d6b96f6 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 69e87a1ff621..99480b2a3ec1 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 678b4774dba1..f864779d9e5a 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 56ea726d73eb..afa7f632945e 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 0ef580d7aa53..adff2bf63f51 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 890e8b7b3c03..241bb1f25aca 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 4aa5d1870000..90a084965996 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 4cba0949802a..e0702cfe1592 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 c902d133e7ce..1ea1ee053236 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 0ca7fa37a309..de03866219cf 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 2427bde6d18b..4011ba3ee282 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 c6525869b021..49b920907223 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 9af520a07693..9dcdbb0bce94 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 7db469945e08..c6a1da9250f2 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 0af17a89b17b..350ab324682b 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 9ea7e496d2b4..d349e620efb4 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 ec5bb656ad4e..c1b5d9fad727 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 70a641d8a47a..d24d4b8b4820 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 1084f5e8b344..72a1a4116a6b 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 44da71de085b..e26807daec9c 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 48c33d720dca..ae2606102bc1 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 65763614ce02..20195541e38c 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 fd7fc7fbd41b..c7eca0c9e00f 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 ad1064570c77..809f1dbc6d27 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 76f661baed75..2d5aeb266c15 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 83fbf8f6c218..b2fe27e064a5 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 eb301e5e1be3..1273969c4af3 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 691bfdc15c3a..b68701a51652 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 a1b6f5b16baf..ea104011873c 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 142ba552002f..ce7dd2fdac76 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 1bb9ba377740..3546b1aef6ca 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 d7f8affc61ad..1ae5e8fce23c 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 15ccff7496e0..e69896ed569e 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 cdffcaf75454..4c29031b8355 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 a97dc176e1b8..f5a548a2501b 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 82484b5b3688..46265356f461 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 27891a8d11db..556d646e0131 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 3e76fced774d..591fa32efab0 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 abb292ef9928..a7033ab87c9c 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 247d5884b868..b97dc1bc0424 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 43b0ec1c3e6a..37c56400c3ee 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 4c7a47ffbe28..067c62f4d9ed 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 feba7d19b661..a0a53e92d26b 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 335e7e520a49..16c3967287d2 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 5789a90393ba..f5702613af03 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 a3893c033e94..0bcb34e5708b 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 507105207d69..1dad62eb13ca 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 394fc3c8f825..77221bfa34e4 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 a63b6fcf2627..274b6437efa8 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 eed2f313abe6..399ff1c75ba8 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 0565db793df6..5adb9a00e3a2 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 74f20660613a..b64761b55e98 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 110b6d64ccc6..85f894d7f797 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 1994f25b6a51..aa76f0e0dad5 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 52e7dcf4499a..299b6c40a563 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 c7783aae5ea6..7bbfb72900a5 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 7884addd15fe..f0120b7c2d0b 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 d431f9e899c0..beb7628b5e09 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 1faab1fd2fce..7a5e767687cf 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 4a230e11d957..ecbb58eba00d 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 fb9a6f549ce0..394bf2165810 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 761c646ec884..942141bd3fe3 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 7a6b9eda3fa1..c24faeca3dc8 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 f9b37a155aad..e5939eb734b6 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 bcafc2891fda..d000abb26ac7 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 52dc55781803..d92daee3026a 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 dffb739f2032..e5b1e0322575 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 8f870be13725..b1b7487fa2a4 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 3d9c51daa650..aa0c19db9a12 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 cbb44ae8acd6..65915ec24b72 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 0e992b4a5ebb..9e7889fa1bc0 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 6d9b70ad6b1c..c8ab64bfaf83 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 1a9ac3a4f3c3..bd2d67717495 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 052a40598a85..b7dd4a437821 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 462a3f661efb..10c5bf6ea5e1 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 5b8de5c219e1..d46002c69fda 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 f31b8bde7aeb..8ba13bd3639b 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 fe044f50a216..7ef6bd2f0acc 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 9a5b0f389904..c628709d7a1c 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 4972ccf31678..24c2c2c13da7 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 b25a60d3494b..a7ecefbf7efb 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 e9a49dd3ff11..5a34f696e054 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 a13c12c17878..954e4ec3b853 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 3c497260e85c..35e610f03076 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 c70cf5accc07..9d9ad6ee5186 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 9f29c76353ba..7c7dc24b5d9a 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 de63eea194ba..4d7f6f6c2f2b 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 004445dc3272..99977ed9b8c5 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 40e8df3395f6..0053eb5f7394 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 6a94b85b9ba5..1d80f5397739 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 fa480b1f72b2..a9930da204df 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 a400a1672a43..8064ff2f20b9 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 d15676a623d3..dce5ab8e0882 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 680196fbb92f..4ec3d4038e37 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 f3474bc1f9f8..67d092791da1 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 300201388124..8fbfecb8e6b1 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 a1e7f4aa875e..43ad360e1967 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 a2b7f0805683..b5a8992542bf 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 91aacedfc577..d7149002e7bc 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 0eab7617f7a7..1f45d91847f9 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 0a9370e6f5ac..43f596659b9c 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 fb5f9012b186..94726bd69cc5 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 29563fbbd867..4b8a21f76485 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 905ad83b659d..b9769622a331 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 c4651ec71778..83d39d0beb4f 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 d43f3132890b..d6e1e78c8276 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 c56542bb4684..d8e98c9c1423 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 267afd1dcad7..fd7b0a8e21f1 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 7c0dd068623f..fbdc8b9023aa 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 0c801d702321..6041c7cbf363 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 363b7fc2aaeb..0fb4eb898dee 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 fa39a2b478b1..72237d7f52aa 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 3a6f8471e664..fb3bc573ae1b 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 bbba88e4e5bb..85958182cb65 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 0d3ff630d14e..180998a166a3 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 8f3543135365..31868d9ce5e6 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 a2325ba7fa6c..8eb4a48a9c93 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 4cedaf79da3a..bdb0e80784e6 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 cf74f892b8fc..f9a288b09558 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 abbee7fdfcb8..ffce3029fc77 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 799c6c079b34..c0fc45c1b8b7 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 be073c6edbad..fb77f91396ca 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 f39613d0c900..01d6bb47c045 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 15f16525b6b1..ac0abb89bcf5 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 341f5b52df0a..c8552c4a06d6 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 ad10d8ba4f4e..2af4f13a41b3 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 2f02cb5f3c8a..8dc78d31d39e 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 2c3f971d26e8..4de52fa96a3f 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 ce1ab3ffccab..026a96bf29fc 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 e07bc85643c4..3c80951a6663 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 392bf1d6be38..24a95672795f 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 b0133ec1b615..1f3e670d3d1d 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 0be748745150..b3317bc5522e 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 eb01cfc9768e..244ad5edfcc5 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 574b7e7c9b3d..d8c20c7e3818 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 e018e0daf962..708ddabc39fa 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 d1ac99d13be7..fd3c9b2dea86 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 b409dfd7a1e0..ea85caa22cea 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 8f6bed3b0cd6..b4ef8b2a29ab 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 250ea12e57c8..fc43a35f271e 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 873c3621a3bc..f85fe739b9f9 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 c3796f73ab5f..f9daf91bdfa5 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 66032780b812..94310382dd0b 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 43b1d8b9149a..d902812eb9a6 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 e0b0526a3338..7a2ebd2cb793 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 222c75439456..9fc3f8567722 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 15677a5185c2..8d9dda126d57 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 0ae7f8da4b4b..0594e87a0a46 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 7eed3f056a25..8c09f1ef7569 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 45e122c8d77a..4aab19d28f4f 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 60865304f1c9..79d7b4df63f4 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 81e557d53a66..786f176c019b 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 9595ebf9601f..a66dedb587b1 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 1d60c6c22768..85574daad5fd 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 5eb8c3622e4b..0b123de2531a 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 c3c6e56582d9..7d6eb3f5eaf0 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 f04bd83ab6e4..3f655b960b16 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 e63dc0090cb7..dea81392d793 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 d83af14d354f..5e6e2d2c93c8 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 71e57d8c1fa1..6d087b7356fb 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 76c592dc49b7..9b4e83256645 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 1536228c265b..59efb3f790b8 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 02bbab30e9c6..66b0edda9a9a 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 6323bf664fc2..6acd3a1eede3 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 f56769e2b8c6..35326d19d6e3 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 a432c89606e3..399193e69b65 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 164ae79c254f..2166a8fd031f 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 728dc078b7ed..70948e6d6437 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 5457c8a0ae97..580bb628da68 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 a59e25a273e7..6a40b5ccc124 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 f290a329eaac..8cba2c1710b4 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 350fbfeaeb5b..66181267f98a 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 800735cf3a76..ef90937b2217 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 f9160143a041..1edb69c3f2bb 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 d71e3218f53b..b907fd3bbc75 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 9bc252ea628a..f9ebef68f5a1 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 acba4674a4d6..719870a04fb9 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 27a7df17d666..bf1e219460f4 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 7d66395a3c80..c9f5ed0d0313 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 fa9d35ee4df8..9b54de809ed1 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 7a4f7466559f..c1ba50a910b1 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 968b074b6ef1..a773c79dbe9d 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 62fb5238bbd0..b337a77c24c3 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 f021ee4710a9..fa54228bbcfb 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 9736d1b964da..b31a604cb14c 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 c11d14b99d48..1a4ba3659c1d 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 a975190a2faf..807cd927734d 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 8c436841b44e..3063a0a4a3af 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 9a23dae77b96..f1bda34a85ed 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 13fc942c25a3..d86db6601b23 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 89436c83e25e..24ec910f5343 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 b9382310deb2..ade52086bc42 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 4f4fa06b0023..9488d9a42ab7 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 103132c18ae2..083236387e47 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 3cd38042f0f2..710e660d9cbb 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 905c3b8d3cca..e3b527fa4fe4 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 6ba93e46f75e..a8ee4cf39657 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 7d4b3dbd7b41..ca9e9de2afa1 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 4a54afee8075..4928ea7bac73 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 ede4b26d19c2..5e3debb411e4 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 b850cf9750a1..df8a89e26c9f 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 248e82ea21cf..ab963ed942f7 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 9611780ac079..db814f02c8b3 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 5ca684a9d783..5b49f4f7203c 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 5633ad70cd31..3d6284ef1c6b 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 1d13720bcd31..109e1d0039a6 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 35ca76e989b9..3eb137e4ee7d 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 8d70dacdc901..abfc1c25ffb7 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 b07def21e88b..bccca25c52b1 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 8cf841f93712..ea6e893b79d9 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 6fe415545f80..96ac76f0590e 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 cd24d6675b2f..f34242e7bf89 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 78bd0c14022e..520b7d09ae96 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 9b79b3bd6eaf..7b414dfcc932 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 d4b35e211c86..a86979d8faf6 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 74ee652ec6e0..b2f5490727fd 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 db7953f06dd4..052f0eec472d 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 df2d59a58b88..395751e86f11 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 18939bcc5b4b..158e9956435d 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 838e31f8e415..5022afc5b496 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 14ee2e741bdf..a3717c9e21ae 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 0afa4947225d..ff23ea5980ba 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 5dd163715eb4..7148fc509de0 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 2bf6641e9c91..38c5581105d0 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 ae321c974b9d..dbe2d9ddd54a 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 0bc73b155801..a2f6998c6d93 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 a7dc482f3cb1..53f66f1d596f 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 9b645d363e93..26269335bc47 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 3e02b08ce5da..564118e9b134 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 12f9d65d77af..90ddd1dde0fd 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 88f62a07ea0d..41d9fac26ad4 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 88f92fce2b2f..f713f0307f80 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 c3b2f2e0bc4d..9b193b3e44ce 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 e5bdfc55dd67..e9a3e91554ad 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 1ade01eed36e..818705c9bf5e 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 9cad942e7a2e..1c46e37099fa 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 f80f3f63c66d..93575dccd4d3 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 51724ebf8988..38d7fb0657c6 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 125a395db3be..6be28e6c9a84 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 16431a39fd0e..1f0da77baee8 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 0f26a975a370..22f16296412d 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 7f9504fe5a90..d6950b7e1b41 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 319b8026954b..f1635531e4ec 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 2abf0a1e0c2c..48f870de9ae7 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 cdf70920f009..ad284f724c4b 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 7bcd0f1fdaf6..3c1ee557af77 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 43a5a28f710a..277dd8c878aa 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 7d95417a6ffd..52de04afd66d 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 a1b654637316..7bd87ae06c5e 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 cd6805967e52..bffca39ffcbb 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 51f65e5345d2..9521a53e6bca 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 7b09fad927fd..1002e20987c5 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 f20024e759aa..4522a6270531 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 943f7f0eb192..6919c95058fa 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 e6d1a4dd3280..4a86769cc79e 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 916ce4b1edb2..753961d7186b 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 2b7349c5503e..a0d355133947 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 fd53121204c7..53d1e3eed820 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 8014f3796250..f186e0526a42 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 94bdd1140071..f008b0abe9fd 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 66973c58d35c..e6fcfa4c7090 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 3ce7f2ce35da..3bfb8f89affc 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 2d46f74ad9bc..deaf0738e241 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 af4834503cd5..8a075850063a 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 bec8cc187b4a..083b03028f08 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 b1ec58c3df31..d842601a6b7b 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 fc28d0c815eb..c9204461e206 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 bb3b735caa31..083aedece51a 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 3624a0f160c5..0ceba2dc4977 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 5d67160eb96a..697a62ca547f 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 94b3905178fa..2274946df697 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 46f54c466a83..da466e6671c9 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 f19c55b043b4..7a77c76a5ac5 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 89fef5b5ef96..eb4ecf24a300 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 cc35213b93d6..786f22967ebd 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 89350602f365..5ed0c1aaf20d 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 9ed0b240d0a0..da276031378d 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 72630ee9c705..5b9b012e6653 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 9805933553dd..61b8c4cd2958 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 a1e3f998b237..fb9a581369e6 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 832d734d9450..233583bd89bf 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 29fc12066e87..c379825feda9 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 10f185c33514..3314b4e20f90 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 d41b5355c2cd..fb82b0db09b5 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 8f3677d97698..efc509c5eac0 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 723ed71c3e95..efc8491de312 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 98d7f9194351..403ab182674f 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 e17e9dd5f133..f579cd02ad6e 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 377889e2ccad..f6cf6b21b0fa 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 c4960b0c28e7..20a5a7476c76 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 4219bd13b181..f7bc057d3ba8 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 abbab5c23dbb..4d67f0a30e9a 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 923dec892e08..e53cdfdf7059 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 b9e80a48d33d..7fd0d386a74c 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 5d67160eb96a..697a62ca547f 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 cbfcb4719f6a..75f0b0d24850 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 721c934dbfab..dc320b2b91fc 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 f744b16de7a2..ec14c75f790d 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 4b2ac07378d8..6daf48b6d9b5 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 87eb5d90def7..fad041f2ee10 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 dcf68afa945b..7058c039e465 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 be8dcc4232e7..876439ca0a7d 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 66e6c3c9eab3..4f4d40f43d4b 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 cd21eab24c0b..66951b9d50c6 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 f1f0b47bb650..73d6115af00b 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 78afe7a94954..b3efa6f39ddd 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 d0c9dbb1d401..cb4cfef4bdd1 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 f06afc8ba414..75d9a0d8ad05 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 62d63590a668..330f51877aba 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 a9753376135e..01c7619b065c 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 499334d983b1..a896c14e6370 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 172f4079821a..fa6d79713b4b 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 937913954a79..d2f1593c31a9 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 ff0228e4da6a..6bce5c87ddbd 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 47e8d2b3609c..2ff5ec6f2253 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 ffaa171d8a5f..bc15710b025a 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 2061c5c75bd8..b06a64715870 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 fcab0cb10994..db6df9a79d87 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 d1a3597687d7..584516668596 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 bdc7522f48dd..6fdf1052e5be 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 b29d45256bf3..ab30bd7b73b4 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 d436088e4265..ba8ee143d4a3 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 142de12e1529..f8a2fb4873aa 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 300cc34d63df..abd45b651ee7 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 6d052779c6d3..52880a43bcc3 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 6b4ea46f361b..8fc2ffe3dc9a 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 7ba993501214..2f61146f6e39 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 b9eee9922661..b76603740ff9 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 947f9f73eff1..47f885a43d6a 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 1a2d8e271de0..447ae744b530 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 3c73c5abf3b5..7f380bc54404 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 810fbef7b381..532e888b045b 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 cda1aff133f9..2d25c0c8bd72 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 f61acc8aac5d..e7d3b67506a7 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 226367c39929..d10845d49a3f 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 99839166e302..e330a4853ce0 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 6394edcbb784..9b27a56dab10 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 6df5d3cd5ae1..9205d4052ad4 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 41f368f46d66..f36f87c5736a 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 0b3397e210d7..3ed2403aba6a 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 6dce556e9e38..e3faa567b2a4 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 2fe00aede007..6793d8eae1b2 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 90f1980f8580..4285b4cc0a99 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 5cb1a03bef51..d113d0ee48d2 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 6b1e77850e50..8f3b3eb77453 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 01a3b1fbd9b5..166303f0257f 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 1c0662e0a6ce..8aa0b47a3116 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 6fa4c4aaca57..f46a79228292 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 4fa48fa133be..8b022a5c31c3 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 bbbdb253b1e1..f6b05366a954 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 3943b2608540..80f93dea0544 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 14422329b7dc..71eeb2a6d261 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 54a12fdf8e82..199bafdc7fe9 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 65a8713ba056..82d5ec8db46c 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 194ce1dca778..030ddbc563a2 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 c6268dba567f..014e877558ee 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 2ff954d15cab..9198cf853802 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 7e3083909d52..43e9d0c50913 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 a400b9c8d566..fe230f04d3d9 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 1d3126128c92..78810eb5645c 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 2d063a751ca4..4f03592cd6b8 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 6c52dfecdec9..d42c9c467bfb 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 9e2db7e0caf5..37f3cd131333 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 cd3ccfee06f0..374964d08138 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 1d1cb3810953..a1d40f24e374 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 ff76d4e4a20e..87f274b9de85 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 2c43ff6a788c..dbb7120d543d 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 2fc265e02eaa..75a4faed83d4 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 b9eff469177e..24f5df091d3c 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 216beb0206d9..f504e2a79f00 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 9bb87026b641..249413d80e82 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 2d38e0882866..5176dd0f4673 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 59574b471dda..141847d958dc 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 fdf1150f8d25..838df40c32d7 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 e9e1bfb8db30..44f2d7a9478b 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 fef9f27fcdff..f3d2cec2d0b2 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 4b67dbf79e00..438fb06c426e 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 0874d5bc3903..47c00ede0e97 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 69d83f496b39..4a991624e349 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 6facf0b2dd57..0e04f1e21b8b 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 219b47789b89..f6298919425d 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 c5a40edbeef7..8f351b2b40b6 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 9143a8cdd59b..78c8be732136 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 7fbffb8fa98e..bf42347df0bf 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 4a8289cb2428..51876d0bf154 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 4078326b559c..1be0569e17c0 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 f73e7e1c3912..ef227a9134dd 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 42bbef839178..b85f86e06157 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 09b9dfc590db..b815083fada7 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 89a821710639..6902fe50662c 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 a3ec8941322d..b8e245475da9 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 11a5bd07c3b5..9a7cd81ee045 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 159e21d28635..f32cbb7aaae9 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 fa872caa3b47..ff80a19211cd 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 54092542f98f..3d8dad6e324e 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 b1d8f91646bd..6db583b09a1a 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 989f0a275f7d..d4caa19135e8 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 ca35a615d214..658e9d2117dc 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 1019bb30015a..bbbde34ec096 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 583a5e240985..ee6220b6fa45 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 ee20887cbfb8..53d0e3db6f5f 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 5e7830296da9..0b37192fc3b3 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 31b79517566c..7a5969451cb5 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 732aa146ce44..04a7b706edbc 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 519f0685fdf1..f73999a24501 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 c342af31351e..b2c48248a671 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 83f4a5fd39e4..b0dbbbec5224 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 0307ba78d026..dc99de95456f 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 da2870b58a4c..28374a68ad43 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 3d6da1cc2802..2768e284c173 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 a3dc66aab129..a33a635344ea 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 4b2d4b12ec9c..01cfa47024f1 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 ca362c7a7d85..0160d3fd85c0 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 27d6ebf2c2a3..35696a9cff9e 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 6ff0970c0f0d..1548f768b6f3 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 f3d98337dba2..562fd5909815 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 568fbb29f0dc..d870a3101f1a 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 51d84b9091d8..d1c1922f4b54 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 8aa087c018b6..7fe5367f358e 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 84f953b1f8ea..243cb4a21f5e 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 eabffc16170c..e66042ec83cb 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 e17025e9e88c..1d3a8cd6b9e4 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 0663687c958c..0449fb51af5b 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 271ab72c74fc..5c3e6717306d 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 108dfe2e62d5..bb779b1e0cdd 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 e2b2b43dee32..39b349030908 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 bdd6df82d0f6..51c3e9ec27cf 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 f68fdda6053d..a6ade028f0c1 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 c8b362c99176..e41ff78cb652 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 9c4c61e684b9..51cabd10e308 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 f278ae2d0a8a..98948f8b3df4 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 ef1333e0eeb4..f889460e5e22 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 6a36a004a7c9..5bb689260c2c 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 05d297906c31..56055e952ce4 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 7d15d607dd60..142d0ee32872 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 fc9efdeca7d1..15c9784dbb9a 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 f9e96c1a0f4a..64338b2aba76 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 21564eeec29e..6f8c81689682 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 1d52d44d1696..e76afa49f5e6 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 4bd7ee45dfee..be8e00fa1bbe 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 20231dc83db9..d8343704f12b 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 1e0f67887782..b77b66b4f589 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 9ac5aae726a0..1f5206b8de5d 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 42ee8ba971eb..2fa77ec6ecda 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 76ac73321d3c..ff36fa959033 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 52e0aba0979a..bd762a0166e4 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 e62d47c6f5d0..c9fc682ab01b 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 f0e8d8972743..3ebd8321846a 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 a75a742d90f2..b496dcc6e3a1 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 00a23b354a97..4f2e413ab40c 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 68ff73a08059..4128db0ab9ed 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 49fe32c71091..074d7519392a 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 729079e05011..fe23d2d51914 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 bae32a77765c..7888e082240a 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 fdb31fc44a19..5ed70dbbb7f1 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 209c1e1279b5..c00ef6d5f74c 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 c39368a2bb83..9185a0cbb6e9 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 57be37cdf2bb..b90acb1b98c0 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 4be503a0ef49..1528db126ae5 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 30cf645821d2..ea56faef09cd 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 f6c395059ede..4a6352b328a1 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 d2ccadea0077..4e58c1f717ff 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 f36ac69dc088..d02ee5a122da 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 5e10c3ec1d0f..b5655e68a47e 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 6a2602501a54..1ce9319b8ec8 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 111b9ba94773..e24073c38e9a 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 0754f3187018..8df34de3d845 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 f73b492dfcfc..19672e41c9a3 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 40837321be2c..e83025346d75 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 0c6466d97fc9..6f90cfe8e4af 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 15b571be5637..40abcdc78e5d 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 6ff3afc38704..3b610f4aaef7 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 b3c323d2a29f..9cd2a988871e 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 de008bcc01d2..e4b02fa0c58b 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 c2ef13ede4cf..bf2e37a189bc 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 4c91cd1850e3..2141523ce9e6 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 b85d28fdf03f..941733056eb1 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 82c84ebd6ff8..734bd523497e 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 1acaf2a32c21..1959f9bc3204 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 267ad6b4a867..0614b6c36220 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 dbd2834d4685..59521a446f4f 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 762fd49ad247..47a2d1054e02 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 306129479636..6ffd0f101cdb 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 565ec1bd45dc..d38fb5165e00 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 ffe7b22f8097..fc9ce1a10155 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 b7aeed7bc390..6b5f55a9d16e 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 19e0a0bbdd2e..df740bdb310c 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 ed650c68364c..7d78bccc0aef 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 60fc7ce394c0..5a49d715b21f 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 ade1a697037c..9af0c1053949 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 f19604e951cd..0eb716da4f06 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 6d1b1dfb9b6c..30b1f1139389 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 641fc3c58670..1f776b40f52c 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 f3fe9953856c..25cdabcc03c3 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 a4e0edc97c60..eb425e62d8ea 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 60887f8d05af..d0ce498ac4fa 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 547df6318469..0ad22296ba60 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 c15701593887..9494922b7d73 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 4315e5c29f34..2c29f528554f 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 2235dfe4b843..158c2ed7ddae 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 e7a59858f570..0906b4f32402 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 89361bf24551..96325fc3c14f 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 7896c829a6e1..02d1ceb05132 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 9c8d1a69a3e9..4723f2291856 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 5358d13faa99..b802034ef6dc 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 3f7a5e3e5110..5e7d918b4fbc 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 4d075b04c97a..c0574f3354e6 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 ce5995823781..6e62250e0d57 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 684b27cd0303..8ab9f242822c 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 51052626c30a..996b87c4a3a7 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 1bcb7d35da38..a01b951e675a 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 03d4dd9b0abc..944a611c71a1 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 3f59db383107..9205ac81650e 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 297d85c58867..bd34c3a1eb5a 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 5fcd64b7cd10..16e6b2341cf6 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 dc7cbaffddb4..4243bccb4eb7 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 23f065163231..18a59841e9fa 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 dff87ead0337..5213052dd7a4 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 432be1d1f7a0..a5436624c658 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 c8651fd29ded..329f80a462ed 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 490d6a2f9189..92060e3cade3 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 15f2fc424bb8..97bc7d8414e7 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 1e9c269a4d37..02d14265f3ef 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 636ec9926671..8a2f500676e6 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 31fa610a69d9..8ca86fa35ee8 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 7f850a94e893..c78b62596678 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 c48e7c08ed2d..fde5c16a0680 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 c804cf57abaa..2f40f960975f 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 db2e7cb3d05e..5982cea93f55 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 898ca475cb17..d70dd5c70050 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 a28179ba2416..800128f503bd 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 b6d6c9b8f876..b9d8c9eb3034 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 d93a62185b3f..251123807041 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 f0fd1c94e9ab..9c4be68153a7 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 763ab952738b..729ce11f4427 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 8267a82fe2ae..b3bae58a6e41 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 40f900c7d30c..55c90859c83e 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 19b595bf769e..f4f1269d512d 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 04d265865f0f..44fa80f63389 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 6d80db522ebc..3d5c23e0f23a 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 f913995d7e28..7d38e62e89fb 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 1c65407b3955..026d6464955d 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 156162c9027c..11ed167b44ab 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 6c2df7e84e07..33e5f9db2c38 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 e86f1610ab0d..bfea8061c4b3 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 5683c45adf26..cf1d33c3a56d 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 d71747f9687e..aebc5a6aaa9b 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 ef61fb9ad325..565cd26b649d 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 6d17fae6a088..fb547c27e1d1 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 d49819fcb14c..2d45f1b6a51a 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 4f9e93a47ed1..b9fc798949cc 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 89b077d671a5..d5222be0d20f 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 f7360efe4c52..d32747bf2cc7 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 799100669b65..3fa537a305d5 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 4cecf9e26f9e..b6228ebd25ed 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 a79928c50d56..f88d430351d1 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 b7fe5af7bf8a..2cf1983858a6 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 b12ad495e9fd..dbc0605c76bc 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 a74487019adf..4dc362f94787 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 99956ed9879d..b3635000f165 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 38dabc9d71ff..cec66214978b 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 4d96d6c16cba..1c752755777c 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 779a0c43c02b..281975dcc2f3 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 948aa2b94d96..80bb15441d45 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 6499c92bc6f1..611be9911d97 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 18ea8ed8a58f..e183ebd25f2a 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 7e9c5492d1a6..495a62d4fddb 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 ed9aef6e3744..e2ef2493a7b0 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 d80488e8a45f..d189ba6d2ddc 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 4303e5c54056..156f37f9e69b 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 fcf00a17002d..18494d2fd864 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 715bcf71d472..ef0b52c9aa3a 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 4f2007befffa..f266e80bcfa6 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 55fc7ad4e373..6aee44bb982a 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 a4eefb41508f..0c1da6560550 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 1dc44838e8bb..c594fcb11865 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 6dc0263ec9f2..34815f9d5b90 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 afde5ee97d78..735efe89cba5 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 b03d61614936..12dc0e8216b7 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 5109511f95a6..232d1dd8138b 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 cd05b7738619..ab25b362fedb 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 7af7391ca851..cfea66b57ec1 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 4aca50716258..5fedf3f256e3 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 88c716cc86ce..96290be96488 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 2715f1027082..46017286c305 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 ebd73b2dc149..7e78b53b80c3 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 1f8e9776759a..a2bc6169a5e6 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 36917cf33954..a4047def341e 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 25a8e0c45e82..9d02f570c84c 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 78e48364bba0..434cc8470e5c 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 6d8a9ffc12d3..90d5f3c5c5f1 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 a6449cd44d0f..0b7b8bc65bfc 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 9d15c4a8fcb9..acc18185c146 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 bda39085d4db..54b6a5213bdb 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 57387936a4ca..e072c476c6bc 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 8a1939bcfe93..889951414263 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 614fc27b7718..a53e2a044e93 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 2d87029b6eb1..73a1cfa9c1d5 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 74c30e0cc1fb..6feba3dc6c16 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 43ad82d484a6..a10d6ef6da4d 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 514690de4d04..4c4593cf3b92 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 17cd9224c57e..605775fe0be4 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 35a677b47618..b6cb95047ccc 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 6f6707be5f65..e11317b2cf36 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 ee999d83ec2e..a6e129961258 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 644d2a4e41ba..61a9a4a68aa7 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 8e8ff8372e80..cb0daecccacb 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 6e9d74344bc8..597ee9fe2933 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 695fe73418a4..5c5e38766306 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 d31ed01b1916..de82700d7e4b 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 63f12a912824..c295a72c7bdd 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 c54be7f5dff0..b9b93f22d9cf 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 3cd6d336e134..3c1ad85911d6 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 0b9b7aefe735..3971aa9fe841 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 d72de982bf98..1eacb2f92473 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 c068f6d22b47..d68b8ed28a49 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 dd093a7a0e31..b9a622c62f6d 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 1d56ecee868a..b10dcf96eda9 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 e0d4ee29ebf8..f0ff26c44665 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 68d50c1775c7..b51f3aa189f4 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 b1a7e6e96651..8c18a8792389 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 03ed28ede21d..e1c4750761bd 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 1e36b2fabf2c..f78d4e355456 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 85667bb849bd..ab9acf7b4b24 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 9f0a047c6e9a..11fdc7a55ed2 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 1e7569fa4510..255910487d4b 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 2abf2af33845..a7772a9bf9a7 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 c42bdfff5f9e..6347ef1ba849 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 5dfee6cac609..2be27aaf1739 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 a2717fd9206d..b6fd9e7c23fe 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 de04050d5931..443537ba39d1 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 91f574f35b80..ecafdd6303d5 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 f7e977b918d7..0dd61ea7aaaf 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 c89c1052ed92..621571aa40e5 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 c92114e18125..ad8f2e7f1046 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 bbd0f097f840..d7d164b2a2e6 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 474986283fc4..9e88814d939a 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 99c8e9626af7..366e4f8eb8ae 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 3c06f4f88c1f..7ad2d60a6849 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 110468cbbc52..2274c78f1148 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 84315ad91732..3187b27634bd 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 fa7e72ff2a73..1ffeda67f8a7 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 d4a8381fcb14..2c1e3ad005cf 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 dc43e2df6ddb..3840a4536614 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 e30c556457e5..862659ee44b0 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 85f08808b731..2d41235c73e7 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 11463c453d40..f7a2a7436bb4 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 13601eef6c25..7b1c2b4740f3 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 fdcd6425d32d..a4c07d1bb7d5 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 11e0c9a3a72a..ebe7e4574ca4 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 4954a8a6965b..be8f4e565b83 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 269ebd2b75ad..99433f733204 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 e9455f918bca..c0777e0817f0 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 8a91e2d5f0d0..6da3e351ffbd 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 c10f9d46010a..8550a4d72476 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 90bc10d34c61..00ca0c41654b 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 34673852a9b5..cdd92e3001d1 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 ff84e42c9470..0382358fbbe3 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 35d0a9dda791..10c5a0d084b9 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 2a8b4c3c0447..f36a6567e423 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 85dd6a5635a2..3fa7f75f8621 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 df355f0b0076..82c284a54c28 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 12ef3d33e5f4..2e38381d1080 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 ded4ec197606..b79a7a51f07d 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 de8974037ac9..43111c01c755 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 be4394031047..3763ce53007a 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 d444998d35bf..1d4f9bf94c88 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 e52714cf97fe..54949fb6a098 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 d88b66e679e5..8b460b523b32 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 bb93ef4549dc..a86811891767 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 e58b4e6ca4d6..2b4ecbf0ca5c 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 7e273ac23d8c..8638e50f479f 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 dbdfde6dd506..37afab6b643c 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 a598e883f3fd..4ab10f40eb68 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 69487c565c93..fd9b78934c7d 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 38d9aea16ebf..e4aa0d892391 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 570d91d949bf..226e408f5453 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 93e8c0af0323..be382d61d38b 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 5e1147403143..e9dbceae6c64 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 5e79cf71d823..fbed486cef7c 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 58efbe71f278..90d05c743997 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 f8144641f3c3..b49c33e0b708 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 444687c85789..2c4b115973fe 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 1cc4d2a4d066..47e1859cd2b0 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 3267527ecf2a..0594d4f4c9cf 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 576561c315ce..2d339898a48a 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 62389ba61208..e9b67b1df26c 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 a5a7efe5e76e..c0aea0a78a66 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 c36040eeca30..d46546cd1040 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 c0d4feb03309..06d56ae206b1 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 740ac77ee0c6..87db01a3b230 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 6bf12879e6f2..01cc58bf784c 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 e0f9e31bef31..aa688c88250a 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 6cadd5a93a75..ea49834b9e8f 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 6a4ee39b16d8..556bfbca58df 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 c137f0594186..7b93bf187b87 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 cf381d9da8be..f701c4037994 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 540ced91fc95..d97467e4d3e3 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 e9b8a9caa484..3b739312942a 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 5fae21cccef2..7fc870946b93 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 8d96cf590c39..782822fff546 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 186901f75a84..e9856e808c50 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 86ac07a93a36..b4d7c6054fae 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 9a57ffb77405..d99386336af8 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 02dd0715c801..9518a203d02c 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 1d0ca8e780ab..a84dc5e7797e 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 61f06d802b68..3ce9aff92fcc 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 07e614f0c15e..cd27ce9fe860 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 14fef1b52489..76300c6a3f42 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 3de02cd0bd48..7cd62c431834 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 e680a61db3b1..c31320c54859 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 46683aa09535..25cb4dc74b11 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 e19670a50184..9a8d6498fb14 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 dd4ae4eb14c3..2460d5427647 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 82ebacc49f23..42abb5537c5a 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 07ba3aa911f4..18511bda4d8f 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 6e24b425e956..4189aa71b06e 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 abb9ef917743..0b0eaa1959b1 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 d2a79c386941..38707887f0ee 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 4f2fd5ba6001..3ab3d0a6828d 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 a266e360edba..81411b46be0d 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 76dc1dad80a9..80b9333827ec 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 f1edf65a7261..22560083d34c 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 556c95438817..fe445410c648 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 b9d49a074ead..1f8bd9ae4d8f 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 496c305bc2af..046fe4803eca 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 730f5fa1b5e3..e5084e541152 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 4dc12da03dd0..d056f9e1f367 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 c2d385cbdc37..258c183950fe 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 a39e0fbd1190..ff136fbeebae 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 6f767f2c170e..61e0792f4cfc 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 0f9c3abfe8ee..c5289a5ba4cc 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 6c94b12d2090..a5b8943cf108 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 3148fcbe5dae..49798baf9282 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 0622adada0c6..5a4c6adc6765 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 dd63d2159724..562bd3ff3371 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 3c3d9b1b3f98..ac5b13ffad35 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 9f59f9c199a3..f426a372e5a6 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 d56aa0c9ca47..367a366b80e7 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 0a08383317f7..8945697a646c 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 5c8f185bd4b0..2b70cdd524ee 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 5c55566ffe92..99f6b080fead 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 91971cba3e86..1fdf640b8bfb 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 05b7ec263798..6418e8265d13 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 9f3659aac163..478f8c69edd1 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 102c5c1868fb..ebbb854175bd 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 5abc016deb07..06aab63d6885 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 03c7ed347bdd..c4384bce3a9b 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 70c4b210d3a7..c4a24ffee93c 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 8ef7e34ab305..47f542d12e2f 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 7bd38d0d45d9..245902dad264 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 1b7289b229b5..dc1bde082c4f 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 e3d03b6f22ad..6a4f23b78207 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 6e1c86f96711..0a753bf2eef9 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 02e316b264e8..1ad7a9f6e618 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 6f893ee89b2c..1984c1b19046 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 4cec58be856f..d432c5db6836 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 5695d5a7f725..1f4352277fd3 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 04cb20686246..ae46e809abe3 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 2cce69bfec8f..07e17f812867 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 91758c0b2188..135eb41c2032 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 9d3a17a72b21..f398d18a0e14 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 1defa1cef286..e5f22369b941 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 18e93cb96cd9..24f0698f176e 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 344ee71c1bcc..b2c6aa4ee060 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 afe74cff2e92..d15aee004846 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 b30ddb3af07b..7724718ee791 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 37335da060e4..74949495cc32 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 aab20d2e90a3..74e9edafe816 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 cb42ff2c6443..ce7283eee034 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 86c720288c35..5d2ea92e921c 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 d7d037f0b32b..75ef82d0fa3e 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 66298e06ed62..78075a5c75fa 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 ea500711bb76..6ecdd9f2c084 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 ff919ea83d53..c03560ee5112 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 a4ba06eaf2ee..4bbbf45a8866 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 d1651814bf66..cdc5cf24272f 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 a4be50a64335..f2a579fab630 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 c470761be195..489923ddecf5 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 e144fdffb522..8ac4cc426054 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 d87114748dd8..b104c3ade42d 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 85b357e0c024..f7720e0470d7 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 7623857d49e8..f6fa5c85f338 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 dac9bb18d1c3..c766ad039776 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 42750a64574d..d5af8542996b 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 65a63262810f..dfcac21ccd6e 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 4a04eca67fd3..86f24f6af6ad 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 619b34f2559a..871f3694e00c 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 947fddf3f31b..6c79ed7314cf 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 1242126e0cce..712c2a7249d1 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 8f5b07769caf..2a9aadfcb83b 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 629c2f33ddcc..fa4be88f68ff 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 81aba403d0ba..8d103fab43ba 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 65b6825a8325..194416cdb70c 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 ab0a3a7df1d1..9f1f007a0fac 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 4a1f5a21263d..a6aef3ddd7df 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 932057b65908..f23ff2eff04c 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 5bcbc08413fe..d3fa40d1f391 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 475e8d89abff..b121408c843b 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 2aa43e876274..7aee558a4b6b 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 43c086dc6bc1..2375e3e2f70a 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 2d6710af3927..cdd572b50fcc 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 53e68c2ac6af..7e22116b955d 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 0d0c6188ad11..1a64cf1933de 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 a60944b632d2..003fb212fcb7 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 f186683ea668..6305e9ecdbcf 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 37a7694c8fa7..feef58a33886 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 3878806fd027..51fc11b2f0ef 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 5fbd5e8a28d9..4cf9112810cc 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 d6a191d7850b..af47e84672ff 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 7c5941f5bae8..2f951c4a00a9 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 131687289027..19f4bc6e7244 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 efee65929234..eb3e93c2ef7f 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 5a71b2166c3a..b4a391e184e8 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 1708a71a9812..877d1b7d882e 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 4e4e2160cac5..242d472b794e 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 72b7e3da5309..1168245461fd 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 15f01505eba8..e36649d8eb1a 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 bd0d72938f4d..c74c5ad5d779 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 4b868684a520..32838477608e 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 2bb133e8bfd4..8c20d464139e 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 fcbe9f49e556..8418b010c5b9 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 f5b347937948..c9237bf2d4d0 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 21fe5bc53b75..3cabf451c663 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 9f808dac3627..a26a65d8d440 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 9df965315ab3..d2a4202d7bdd 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 2bdd08575c41..64b44f60e80d 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 35769bfc1177..28cea142882c 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 9e209d5d33a6..a5a924786074 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 ab568fd01efc..feb6556b60a1 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 7531f3621f50..aca012f4af09 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 09f7a8c51312..02e95669d32a 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 e573038980d9..06b9270cc333 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 f533a3ef885d..fc73eb519d21 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 2481919b616e..1a4dfda09097 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 831372d4506b..ff47b1de177c 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 04dd83b7fd0f..0347ce457ae6 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 02fee1a00da6..423b5c03b466 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 9e86e9209e32..0f43245be6f6 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 0b2a9a3541b3..1bed915a1b6a 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 30a9c85e3d2a..c90dbddb83b8 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 a460480afb15..deba26f24ca7 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 fa67a784de47..fbe3d7d5d18d 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 c7415818e10f..03c175a2a49f 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 d80e2435614d..77efaf05bbc0 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" +//@ 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 +//@ 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 033c8beb475d..a50a15fbe5af 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 578aa4b1760c..614678e2353c 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 f65f0003022a..afd715322ac4 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 346aa868eb46..ef4ef69c6615 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 0de1d64f0fcc..811f16940e72 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 56212bb6f4b7..444ac237cfa3 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 83519c4524a6..bf277a343de2 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 b71878406d76..df2893b63edb 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 53acca34133a..d770964125fb 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 2b57eb8aae19..58e5f7e33cb7 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 d6d44a6b4461..8f75ff309e0e 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 cd1cd33c2840..d7d9e61103c9 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 4190885b6b21..faa7306eee5e 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 d5df4b57b059..86e871448b93 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 5247f1f8f174..7512e5465042 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 5afc2746fe4e..b735a82c1662 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 7835f71759cb..b8e7b12b2842 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 2cd87a5cbb2a..02a353c44353 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 8fa95ce62b5e..dc0e45e5a1c5 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 a5511ec95437..c62463b45f47 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 32df7905adba..7f9880cc4e9c 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 20bc998ec11d..42bbfc46154c 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 dcff9183ad95..fba7b680679b 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 219108c77f7e..db430a3229c7 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 c282e2185bca..094ce2994b89 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 a2c1954881f8..a1b72323f710 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 12c46113cead..53b01674d77a 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 f03bd3f991bd..17096319d237 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 e3a39a44bb82..2fb4a6f637a2 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 9fc661b14777..58529e4a7887 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 aa86e174d446..589859e60a66 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 f5243077384a..3ff9fb10f241 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 6694bac0dc73..17e027520c15 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 3c9a6a80dbf0..c848e7b50bb7 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 e9653dbe5c22..5a9ee015cb9d 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 671b45e777f8..12207f4e6aa0 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 948f2a7bdf31..b5e3a20ccde1 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 27d0326891b5..0f3bf65c441f 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 95be7616a4f5..b7deef0f34dd 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 3e7e9a51cdd3..6228f4ba706b 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 c2e1912deb7a..68c401512817 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 dbe465551011..b943b0c433da 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 023a84d6b6ec..32910c5f7d17 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 0d9af7512b46..287b3d567aec 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 7d4cca8ad746..9cbb0bed4473 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 4d4631745905..cc1f560f69b2 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 7facf245bde4..3ee1b60a04a9 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 62807d8941af..f01b440424aa 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 1e598b9e7097..5306d69a7d2c 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 1243bb2579f8..863c22f70d6b 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 1bead6e1bb14..9c1b6550d9b1 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 b1dcc9417fb0..2c06fc2837f3 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 83e066aef962..cfe907ea6d9a 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 9d3487ffb295..58f1743527c8 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 bc64c8162433..a443785a678c 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 6b260311a50a..f64506af0a3f 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 6d1fba64e421..375e884877ab 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 61f54ac4e0bd..3b8fdb60acf5 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 2f6d35f01be6..4c77b5d2ad88 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 2b9a50e4d41b..06ce739b8e59 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 68ca62909bf9..77ca940e947b 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 4cac0dc90cf9..6f043b64a092 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 8541e143fb97..51f134344354 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 613a5cee58b3..cb1fb774f107 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 327eaaf8fa12..6b5384e3f08a 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 88d6b090268e..65cc750a7c39 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 adb14abdce9d..844a18b61589 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 d808fd9aceb3..3b0fec11acd1 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 722497870937..14ef4dd3edec 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 570ae0a82ff1..1f2a6406d79b 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 b259d69d15d4..1210cee55821 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 cdedf034ac36..e07aa18c24df 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 990205ad3345..6a7dea63993d 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 0b9673e00338..f6e77986e16c 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 5ed33012100f..f8fe680e5e01 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 a93ddff43dcf..cfbe05327a82 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 785cff9a0f30..a4652197afc7 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 e5b899e0af96..2c957878c95f 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 a63903778026..442955421d83 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 68d226ffbaee..0f215a2b763a 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 175663643403..488cab401408 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 6411421429c4..4b38b9ce2c9b 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 a2dda31aa553..ca66f8ad1d36 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 2f4805e4731c..2cf91f0c1f78 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 e3da83aa12ba..7b7e52abab45 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 8baef4334100..66fd6169db0e 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 193c18151059..ba5e4698e63d 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 f36ab4e4f9c5..d9af1caf7411 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 5831e867be57..816573736438 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 6950a9c40d27..ea9e0c7514ce 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 e83ba556078a..4d89b10af957 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 002e590550c3..b003a70f47ee 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 376faab0c48f..9502f0d33da5 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 b32a66b16be1..241b69adb8c1 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 c1a236ed1cc3..f210c89c2990 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 e2cf9508757b..5061bcb9e444 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 e467d34376f7..458eca19ed6c 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 e467d34376f7..458eca19ed6c 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 08f926610d7c..4b984171480e 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 dc105c61d723..00a17ccb2910 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 0699239503a9..2d0efdc839f9 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 35eec799bba9..788c999e0527 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 c41d9424e85a..28df72915cfb 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 fc6f5f23d92f..7b0dd7a37a7a 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 310913985088..95a8b366ad9d 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 367eac7182a2..8f4bc79f1f39 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 f4d21a160b69..ba2b2f7f7b3b 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 58e892079e65..7937ce9eadf2 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 e131902346f1..b6a180a1579c 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 e4e998b5d0bb..e8062faebfac 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 b3f5ad52db59..b8dedd7e11cd 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 213abda77829..cb41e9abcd1a 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 39e90d7a3f78..e6aac1708cef 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 ee6ed0cae671..d5c557dc9c7d 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 342841b48385..9d3168f5acd6 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 9a494402260b..342fb4416adc 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 d8168f2990c4..b1283d272951 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 7b1920bc8f27..30ee5794bc43 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 8919c643400a..207216f73bf9 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 868585cd0978..65e7c90965b8 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 802a8f15698f..9469490ca2bf 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 9b41a8096c4e..1f686d0b9e00 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 5e27ed3c6460..91c04c28e9cd 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 6b955a752479..dcb3c5ff6e91 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 e49125d10249..8b3e504ac455 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 f9a7f36de43f..0e81d4c3aacd 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 284baa481497..9fdeb714d5e7 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 1440f02df1df..3abffd22d142 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 12177cd827fd..30626909faea 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 33be20054b5d..51c3a5aa7732 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 8a94abaeb074..aa5ec17a28d7 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 40c678c281f4..5ed8bc84e0da 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 50c77d33c6bc..bced5f165cbc 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 eb503dcf3b63..66677bb0a093 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 ede01afae029..6a348874b4cf 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 b4930295499f..8a6a8389cf12 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 a8547c1d2710..ce4d9ca5161c 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 7d6a754cc5ab..8ea1f1709533 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 1422dda276b9..6eaab6e59477 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 6c3125a9fc5f..6fa2265e611c 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 7dd95de73ba4..48c1c2858cf9 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 cc8f9dc51908..1d45028657e0 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 75168c4f1e54..37fe42ce1c60 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 8c8a7eb7d9da..85157fdbf62f 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 2484c5a88fb3..6099c38ff8ee 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 a59662c2797f..68b64de3e96d 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 a1492c0b9823..40a6115e8381 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 868b334070bd..385fa8851c12 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 4c2e6f0852b6..07b866cb4a65 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 4dc4fecc91fc..25e1b6b4bc35 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 94316d240405..2a32e6dbab8a 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 5ef35b513e0f..5240b76158a2 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 767040dff3f7..1d9832ac917d 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 8d646a414599..06d79a0c8b8d 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 f53a17361274..4b8135fcbbc2 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 156ff2ee82f4..bd4e126c2200 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 15676e4554ae..e0c309ed97d2 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 bf4dda495191..92678dc35f12 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 e62742bac5c7..b93c86527965 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 41e6a5560744..26f7673e6165 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 dd882dce6663..434b629818b2 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 ba88670032c9..604f9b24cb90 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 4f25e57be566..4550778e4735 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 b899083747af..1e7d2d9c691a 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 9abfdfab9d06..3a8bf8c420e1 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 77685c26da24..dec51ef35bc0 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 c62d01403c7f..f1125c9274aa 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 9792338204c7..aa185d560f21 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 6a5d5c8ba2d7..2a3eece7a82e 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 78eabba2d232..e9437e426708 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 dd39dec4b634..6223f8d9e225 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 6bc4cf0ef805..3cb0966e8c78 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 0855a9db8511..1e806a3e4a34 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 2b50ee9b4221..5f80a73dc566 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 3294b96561fd..fd8b788035f8 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 cdf4d1e148c8..8b2e422ad30d 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 939ad51355e7..f61b526a7987 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 dc41938ec899..38f7388c676d 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 1de61dcf8968..f8274da83bb8 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 76a1573d6c76..bbf4db034109 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 d0eb6382e411..8e4e44f6a671 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 10e69105ceda..4fb7aea5cbab 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 f4b69c140956..f2dd2b8a6609 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 03aef0184bad..c4f38a90692e 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 3413db6a6845..b41d719d0ec4 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 b7876b9bd515..edf734597f50 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 80efe1c9375d..81167272b65d 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 9b3b9c8cddf1..45361cc44600 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 804ffec12c2b..6cc702800e39 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 2ce0b6b0df8f..af44243ac5cb 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 fac2bcce2481..03c1ec8a53b2 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 f03e730d091e..29aa073341e4 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 c0d3af11443d..e091a01949f1 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 7bec1b6c9ff4..348096f37f7b 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 c3325fd80ca0..07a8ff66fb64 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 9544b4f2088e..83eb9bcb62d7 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 f632ae8a9aca..d5179e943f48 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 f2130228d51d..1dac885f6590 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 3d5ae182af11..817f4a8f645a 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 0be67a55eba9..99086f00641a 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 5bfa60b1aece..d9ef5f59220d 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 37c2ff63c6ab..980325de6bdf 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 8576d29f251b..4a03316a749c 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 25159c1adb6f..97295636da81 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 9070b9d1f560..8b8c8eb5ff3a 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 99fbb5c6148d..29796c7a0e63 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 512c928ca8fa..51a371c7c5b7 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 32ad0fb4d410..a2b0a5e77ae8 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 77ecbd8eb17b..37cbb865011d 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 8ff5ba541853..9119726f6aa9 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 3d63d78cabb4..339ff04ff530 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 c9c73ee00e60..a2ebc5c62d78 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 663dd3a5eafd..9fa2cde6d222 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 b713c66a37cd..0531cae5eac7 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 c40be6f83545..bb0c23386375 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 f478618f7b59..b38fb441cff4 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 800d7bc6b1fe..5f0dd291b809 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 08778061ba1c..356b6c7d8660 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 f126847da09c..0366ed1f5476 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 cb2581ffa99a..bcd1a8fb3574 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 e8a2bd791a5e..d71b7b45ca3f 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 5f2559f48eb3..73a608f28097 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 ca3a284e5974..cc7fe1744e45 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 16218fbd2361..95ebe83f9a29 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 bc78e1e2328a..ea1325958902 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 b2b6503666e4..556a8b9544c8 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 ccc9628c7778..345e08eea5bd 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 6ad864926748..3bcaa53212bb 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 cd3eea09b997..8a905488a508 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 dcc27f1f03ae..9f8ee8e5e4d7 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 fe1cfb3dffa9..611d0e00aba5 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 605fee510b10..120f611ccb69 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 bdbfee799f17..b0b584bd49da 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 bc08ca0a2ba6..aaf1b05b6e56 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 c5f471f23c2e..ff6b377c4a57 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 24c2b2ad6607..cb05a5dfb6b8 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 a9f0095d2e24..e873a3b35c0f 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 1eaa5bf0c679..a42a747b2d32 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 bedd87cc4cc7..0d532fbeb9bc 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 f0b472e2fe82..bd513b749bff 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 b12c450c937f..535d492109a8 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 4d76df1e8d5b..f3525bd13c4f 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 132044cfd6dc..22679b20d160 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 98433e806e37..1a754dab5ada 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 c886f4b0a2d6..5f11928b3173 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 fc869ae4fec2..851036beede2 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 d72598d5d594..58a15f702ee6 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 0952843e60a1..7c12e4a49366 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 8b68f314c04d..e33099821bda 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 0cb04dcb22a5..455f831a0f84 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 fca9f1f13c9d..de767b24af9f 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 f5fa0de809a1..95b61549b5ef 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 acf48da1543a..0f6b40dc0c04 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 ce42c8b01cc3..dc9fe361019a 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 7ff54539adc5..147f1dcc8a90 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 3286de9d5b8e..b9b11d638333 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 b6c3bb222876..41ecd9119335 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 2331dda91680..57d7899f6dd3 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 c72a2aef4900..11425199c071 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 37bae2e90a59..4530f9cc4564 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 1494001564fe..c0a6b8d0daca 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 75483a810949..931879a67226 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 170f69915e2a..52d2ab91a69f 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 b739dc46e4e8..ad6185a879b5 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 543c9f197e1b..c5e146c81cbb 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 e08ab53fbb05..247cc78979a9 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 312d5d08c7df..ddbbcdd05296 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 bb3700a2b5e9..e1358157cfb7 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 cc0dd4fc14a0..9eb5c63d337a 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 9d40d254ad91..1c91dfeeff7f 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 41a20b899599..31b7e79c575d 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 3c5314af73e2..8de78c71fe9e 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 a571d48d97a2..f38a12dd9883 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 213605b51142..7d4749f3b7a9 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 54bf872d0287..6866c7313fcb 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 8adb06ba3d04..e4c69744cd73 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 5d0612cf8dc8..376fe56cb178 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 bc314a39d8ea..35d6dddfa30d 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 e9ae8ab012a0..daefdcff5a55 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 a3653dea2cbd..f73792a2b280 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 f2469e1490eb..b8265ec384a2 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 21aa13fd4875..69ca012456a7 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 01a98a308950..05b167326d4c 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 bb2e861a1a77..d714d781c882 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 a66bc4a60a08..1a0ab274df9f 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 ce770376c0b2..dd2f6f279534 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 05345d3432b6..2d376a9b0562 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 474e0381799b..3d766cc785d5 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 01829e413011..bb2856ae7e7c 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 c1f96ab8c149..30b82f1f3f71 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 1c6e12096105..99008bddf4ff 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 a520bf6c25b0..a5bd3e7afa84 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 aa7c94791a73..65d55bac968e 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 04d1b949692c..1903f87f35a9 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 48157192a10b..f45ee58fcc44 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 21ad1a4fa3c2..48c4826ffc70 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 4717aa80499a..1365db4869b9 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 91cfda37adf6..554ec8b560e1 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 88bbd13f9a2d..633092023c17 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 915643f1d2a8..cb9fe176ac95 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 871e8e1e9fcb..8d92c88ae725 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 2629a124c3a9..c813f94a9046 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 f7f23a024dd0..fb77990392bb 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 6bfbce7d433d..63dbd8255391 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 99a368a746f7..e4332ced5214 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 4401abd07834..b50577485df2 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 1edc1a8c58c7..03d03e4a91d9 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 5833c052234b..129e4cfaa028 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 d4010a55244f..c82c17931194 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 25f1445941b1..1de13d7fd78c 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 eab25214d635..ccb10bab6c1b 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 ea2740523c9b..6c07817ff032 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 b1e4a9e58cfb..2f9e919da2e0 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 4a13ba37303b..6d0f09bb9be6 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 406b4dc1211f..4edcc97d09e3 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 8175b92f882b..4ee58a4ad0c7 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 8fece7ba91f1..4b438e673a80 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 355fc790229d..00f8a21eb2fd 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 cc9ee58f27fd..f0f2974e2608 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 bcb48b5acc74..cc78dc20eafc 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 600e63d4d445..64b223822c6e 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 d7a2c8e7a928..66409f171e6e 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 e6ffb55b4416..aa1c20f5b8e9 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 d16f9d22ce08..f85b865952ef 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 90de6b847d08..98fd98ac2825 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 c22bc54cfcab..3dd5cd1f5dd7 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 727e23568596..2b5bf01cefd7 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 947b52da7c20..bb168e2cd7ae 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 a3c07b98722d..7eea81ce03c6 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 0f19bc2c5922..0d3872142087 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 f6c75317a34e..f7ed0e100c46 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 fdc7afea378f..b0c778e7f574 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 d6d9762bb73d..edcf2e5472b4 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 a32f7a13a03a..527ca812efb8 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 efeb8d0231e2..9cbcc5a3cdf2 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 f2f6e009d541..78683372580b 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 9ff362ec882f..c6ec4fd39de1 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 424508dd9d92..6d75d2418643 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 300f30ecad2f..c939a6e5ef2f 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 ab7c4c7601b1..b005b909aedb 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 0f3b84ce5200..683a4fe48317 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 f9f5a1dc24d4..a0fe7f0d0a5b 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 b627fd720e31..ea187b506acf 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 dd406333f279..6efc1aad20d2 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 5093344e4b6b..f595cb30db84 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 da07869f3b63..12fb3d0d9e14 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 9123871db979..31517f6655f0 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 1e1ef8c23a2f..cbe489a0430a 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 a85098a95ad6..207797faa144 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 fd1682cd61ac..2f7ea3bb0954 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 b089f0df3c78..904bc1794959 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 9720a653e2bc..10b746cc9895 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 bb1c24a001fb..a63fe729fd68 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 0f1f6c0445c1..c9edf37b7db0 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 37730d38c7a6..362f911c1442 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 63742d0d1a1e..ce2d6304875b 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 b0ef0d44baf8..583d3c18fafa 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 807e19a4a586..da6f2908ab1f 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 af2c44ea2339..e66d1c485f89 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 5989e605bd9a..ce7a380f07a6 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 e7c80cfd797d..317eb65745a6 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 77bedc351e75..fd4d95b1b71d 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 90d75bacbf41..2d86fc9bdc0b 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 cd2ae1f6fb2a..e9d332455c04 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 1e3d8a21c7cc..6d6ae9260b0f 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 4a70bd5f8154..afef0e5537c7 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 70758e7deaac..4de5eda3a798 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 e51508d684f9..78fbe4415278 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 b87210d7fb39..306eaddae1bc 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 26ba7f8e511e..2459b3678dd5 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 d8b963f20084..9c9a91a53ae6 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 c50276c78b4f..8667b3fe466c 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 f948831ad52c..d111c1c687db 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 f9e73a93c271..62803b39f779 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 b85f9d9736c5..51b7f57f7e60 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 5fb4832dd08c..0d4f128cc773 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 16e95e94ce5d..74164ad2aa2d 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 8522f034d87d..511111af83f3 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 5436b02c3ded..d98cd1147efe 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 2e3de0ac66d0..5aa887c171f3 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 94c6c2856806..b0695f6afec1 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 b58db2be841c..8cdde4f4d51d 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 92d4051378b8..6f5fdd561f4e 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 9da1f8dbec1d..bc387ff6d1cd 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 e15e1155a1a0..9d895df5d3ee 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 d49f74922971..b28fe5c3bd89 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 b95454306cd6..bbb66574ea3f 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 d308b1695f53..8e6c68666357 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 d189e4893a32..7bf3274f9c63 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 7477c56cd548..6f2756d85244 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 f50eb6326e23..6c633b58aedd 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 08bb0cf42e80..dc5912b123a4 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 0fffe7b4369a..d82e0b8d43ff 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 6e709d9ae8ec..11a2617ad427 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 cfa53948b97f..c9b3b1566a4b 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 d852332d0e59..b1d89e326712 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 a465bcecfe07..186d0e8be56e 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 fe4032ca62ea..5c5f8e1d1a27 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 03ef93dc233d..dee5500aaddb 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 52a17a142813..fb668f83b018 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 983a0fec6534..0f01a453b332 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 40e2aa9e63f3..f435b48737e2 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 c66b0b9f45f8..310ee45c7634 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 a56df549a8d3..a861ce825162 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 f6cc718c6e21..bdcad4d4c5eb 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 a47f819f1928..11ee6aa8b22a 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 f8c0223e1876..ca98eee1981c 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 bf557f8633a0..8d62937e07b5 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 b337c0673742..6ca8982c4fa4 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 db8dc1eb9bed..874372918de1 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 1edc9f1e8e95..9416f734b2d2 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 9b35a2677438..41c903220113 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 950fb1512bc2..f4046fba20b2 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 f5bf985cdb2d..4ca523ebc567 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 b247e237534a..21700bc3a00f 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 8e0378e94f04..ee6a7a0986dd 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 92b0b5978810..b39bc247aab1 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 d25e372b5d89..40d68dbaffdf 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 77a169d48dea..8ed903f89253 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 f66bf0b87ec8..89e3600bbbea 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 8217701b9f8e..c55632174ec4 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 04ebe66f21c2..4456e4f21884 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 b8bfa0353888..32a510d16543 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 5b4f6d4be0ca..bbb8a039aa7f 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 0cd253007fc5..473977c527c8 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 d70a91596116..ec0351f404d7 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 996cd295dc4c..26cf6105c50d 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 a797aae65dba..7e45b76434a3 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 2535eb99c59b..b73b34549adf 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 b999f251d333..8202cf1e6eeb 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 c65b5ea9ba49..db8f3de2149d 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 8df240c2082b..5f8e31446f52 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 9830241c3770..e776d5f2f21a 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 c501e057e283..4d1cacb18908 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 ae6866511e27..e87863ab2512 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 ba55ab071852..e4c3b4d2c788 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 53957914e3ab..37bb3cea34e6 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 bbf1a1f72db6..0749cbe1140c 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 5e28a2ba8b9b..333f4f803864 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 021a93eacff1..1ab2b8ecfc10 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 86a2094eee09..28f994205d60 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 39d25eb7fe05..732a504e750b 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 3146764927cd..4f2e74cc1b0d 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 4c1df38058da..b5d11955f1a5 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 55726a5ae455..1e45f9535532 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 f83cb75c7f29..4fbeaa757cac 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 3abd3bbfccf1..1f3432aecb87 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 e2e70d43ab84..462b0bc5bb77 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 8abd92da362d..00ef6430d638 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 33757cb7c0ab..867ee08f48ca 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 f510608537ab..684458d079e5 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 05aab5e3b085..9053d2f74943 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 d1b7bf6c2d76..30909e7493ca 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 39e817168f61..2d8230973325 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 fce1341fc741..ec1c58222732 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 7ce638832b06..48e2d5e03867 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 00823d13b369..c05e5fddae63 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 832d4f6c89f0..2de9bf3d04cc 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 82e3aa1ae892..541daf230878 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 2e75933aca0c..3edb010a827b 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 28bc1da964db..92a83f40b184 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 e0da0fc38613..e33b2b2f2bc9 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 5fe01efa4f88..e56f23ab5a20 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 17a2e05e99f2..98e9509645d9 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 e88f21ecfe80..3af5fbc7ea76 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 0456ca931156..718950388a20 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 cdea162d64a4..558793c25f3c 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 10aad3605ea3..b470a2815c0c 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 9a3c2b4f991e..32d610bf915a 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 2d945f6adebd..cf68c1b2e96d 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 099ba80e5b51..fe65ea9d2d7c 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 d456a78b64dc..432ffb403621 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 6f125e5f9502..9099cf24a167 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 5449f5f00d52..f644728ee114 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 f669ffae6bb5..7a2a51a4b995 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 f0c2c1082b09..c3db2eb83515 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 a1abf668b8b6..0e37a2f73a17 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 90d097105edc..71ddad93a933 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 406caaa007fd..0f011638ead0 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 53846be73063..4367bd1aecaf 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 b7160b75c605..acc55caabd6e 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 9ac55177ffad..f2ea61145614 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 d03d733c76d0..eecd52304ff6 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 9d9ffb3f55ef..d58193f12138 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 ea3d1bf853a4..03cc6580d5e7 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 9eda68027b23..9397f46a4345 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 6bbb6a95d7d5..f401a3012da1 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 e862c0e976b3..f3cf4a16df13 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 c809f9e89f93..80ad40bad807 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 9670edbfa2bd..683edf055515 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 7e242ed91260..5983b13185fc 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 570ec5160bfe..9b9669565bac 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 eae5cf8d58d0..7f4343dbd2f1 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 a4f81c464b40..303c99b67bd0 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 58e72d9d7ef5..214293b08402 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 ffed8beb4484..2f15d343f9f7 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 b672963ae988..ef3d366c3813 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 31ea2fb353cd..174be31d139c 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 6486ec3891c6..ab006f8bedce 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 8a90a09ff041..8e62c4b95b06 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 2e53a00a90e9..754437a3bec7 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 24da1ec5dfb5..e4b65740ca4e 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 5ef65786bb70..4829e3c5c124 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 a3e41696956c..39da20259a04 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 54c3c5e0c28f..0246b7d05666 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 948f058e5287..40850b45a002 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 714f643bc994..e027016d0b8d 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 518f159c1fb6..595f273df6b4 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 f982ad6a0ddc..baa759e460c6 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 4400301e61ed..0fb5d25d6dd9 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 700488c22d67..7a41937753eb 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 a8367573fbdf..061897dc02c9 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 32e32850925f..95b48cdf379e 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 e52dc53fbab7..fb7e540db187 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 f435ff09dc3a..88a2e342adf7 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 1e6e30870276..8a9e7a006cf5 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 dc3c17ac3144..2cfa86c526de 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 ebd55bcf39b1..bedbf84d3039 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 7a0111c5ef25..beaaf4db6b1c 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 7661bb574613..f98af0f23b73 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 a64796358345..26de3f606210 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 e90c8763d651..b8f2aae89663 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 7cfee27efb32..074c27036c2e 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 31f73d79cc7f..2bc00b683663 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 a3e3b31df922..fe83a48af8dc 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 0225c4230dc4..0e62dc632bf5 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 e693a09570f3..076b7c8999be 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 7f6090a6e4db..2bb6bfeeaae1 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 62dc672eacb9..d97a55f730cd 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 353797d0c4bb..44a60360014c 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 b00e5c7e4008..bb78cd82a343 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 1335cc9d2b17..6146e37e54e8 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 358733b9832c..6485ed8aab7f 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 ce926b399963..1baf117518bc 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 6ee168d1a718..0a74aba8f63a 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 ac4024b7f333..b7dc309e469c 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 1afc7d677ee5..8baa4b05216e 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 5ea96cf8ba7a..77240dd340b9 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 a6e2889d3f23..8e005d83a45e 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 709d8cdc762e..6dd498636090 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 e8582d2fd021..bac174014ee3 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 090c1fea6dbd..9556a0e76c75 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 8b37492bd6b1..bf11372f9cb5 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 04a7e16d7ccc..5c0db04c2e63 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 eff516e9a969..ccc401042af3 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 ea9bf2a237ed..ca18e0f1543e 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 17dc995fcd96..dcd4e5b80ebf 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 28724562bad2..bda5bfb89a27 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 e469c497353b..9ab5f2be59ae 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 09c13cc4dc75..652158ecf521 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 24c2abd698e7..173fec9ff0cc 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 1007fdd79542..82cf3aba8a74 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 8a41669c65e7..fa5569325b3a 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 dd57b877d78c..8ff8e2de0e61 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 ebce8ce87dfd..b9cf66ec3109 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 b61291633330..a56145f59d83 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 5a0df09d4926..22392c53905e 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 0f69630cc64f..876db7c65895 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 e7742058c57f..8b6db9ff150d 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 662c32af17aa..9b7b940ca691 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 d1b593b7f0a7..526f4ebbffa3 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 cf77c113f4c6..f5ddf0cfa330 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 943191551396..0114e6205bb3 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 da4a0a660c8c..e4a5f9103cd7 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 690decf63928..4fe79b9fa4e2 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 7c1beffd14ed..7043e53dbff7 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 df422bda166c..617e707cda91 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 74992497dab2..02eea0604949 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 c7d480a773d5..0b75bb23faff 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 1ea14aee6c45..7e5a221b6d85 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 ab6677e911b2..602582310ad9 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 69eee66e64d8..59824873ef5d 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 f98c3164d7eb..df3b70dcc7f8 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 b13956673d23..6213017d5c9e 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 bfa083655c4f..bc7ec1f68721 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 9efa22b10717..a08f37c5035f 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 7148f5d6da05..90699e6830a8 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 f5feeea7cd41..a69c94aae00d 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 4653a8df802d..701e2f6166f3 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 2cf2ade65e91..e9e0e767efa2 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 d9524e99f9ad..bfff757a2df6 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 30ae96763c0e..71eb832dd4eb 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 d165015611d0..c3aa442ba663 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 009642973080..423269df12d6 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 ea004ebe29f9..cecbf724916c 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 cd0b967e79d0..5c62f41efdba 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 a15bfeef1c12..ee5ca696b6d6 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 69793df525e7..88a97136c594 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 cd2ddf63a2f0..52ec0c44a059 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 f4f45abcc75b..fbe7f90d0303 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 fe1993a37f64..79cdb7a2e48d 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 e1d82ea360dc..62c74b76d59c 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 756081738c3d..348eb8f79656 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 ce087fb351d6..f119e1074f6e 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 c29ccc704277..7520cbaad378 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 90f56d5fa71d..54bd049442fc 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 6ee4a4cf3192..66a78b3f842f 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 0b24b4305acc..20538e094c6d 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 516ae4c4090d..b99782045575 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 cf09838b304b..2854a160069e 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 7ffa0de6c0fc..60942d1c4f7e 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 45636a7fcedd..ab0772dd228b 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 d42e51c7405b..c349db6e16d8 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 753fbc1dee7d..a83107d004e3 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 b7b113797cde..67e1b1a23592 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 d87ce526357e..2678ae322e91 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 53b025c9135b..2faf71cb01d3 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 bef4a69ab23c..8b548ef05243 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 a3232d6fc361..fc967873d351 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 00fbadce1ac8..a9723029e5db 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 160477b0b0a6..7bc316e7bd0b 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 5dda1ed975cc..0dbdacde60ac 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 3e1d92b42aac..c98eb42af452 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 c432e5b54810..068a42606c2f 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 d869794ec0ac..b28b9e52dd20 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 5e105b20a892..5d612925ec8a 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 9c9eaab8da32..c03052b5733c 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 66fb8dd0deaf..b38fb7fef77f 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 39677733d524..b8b7f56e3789 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 185207b9800b..9e4a8bb8dda4 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 703e3e8693e8..761402582e24 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 e385fe045fc9..3591773209ac 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 81dacbcfb7ec..e5b987f94857 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 42f07d49ffe2..a1185cd5ba88 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 58eaa9c2c426..40689406cfe6 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 d9f7c7809b98..a03a146d0418 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 444a4e6957fa..726b523606e6 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 b9b50f0b77aa..74012e34e921 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 dc05b70c5cc9..8e24a937d1d4 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 b68e798fb7c9..1b0ec3f7c408 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 243f9cd6d4f4..eb5ab9d67f72 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 1dd5c3e40cda..329596b19e9b 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 04e2323ec4ae..fa0514c34a09 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 7d8193b26ccc..e78c7c16c8e6 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 53974dbb36bd..430b444aae18 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 1700c800e313..641c0fac17a6 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 a63e0a1ee6f7..c1958e4f246d 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 1ec8877eaeba..2d7de1add490 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 e78f178e464e..694c70f57a3f 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 c30608176aad..a249c17d7d37 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 3a7e490260f3..1f4f3880203a 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 c5ef75fee61a..50777e571124 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 31fea42fa5d8..4f3f6d37eff4 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 b929122a6c23..cad1cbf61a29 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 f6affbf17599..6afc30b72f41 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 44158349fdd6..7e743fc09dd5 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 5a421ea1dc02..d97a3010a17a 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 4d84b2cbbe9a..3e7bc32640f5 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 7c2d68cceb8f..eadf21c9138c 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 8568b26bea2a..17d8a44430d9 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 b752e58380a8..5122522dca65 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 8549687ea781..c39cc192dc74 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 51d287049725..b1658b166f33 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 4c56fe2d1dce..b1d5961067bd 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 97f8c799fc56..f0674fb0c97e 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 d99ed58127bd..24e430afac3a 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 56323216effa..36d1dcd00ad1 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 c17d595dbb3a..439214911eb9 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 feebf81eef2a..adc912294fdf 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 e109c38c9869..b9b34f55e7e2 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 58778702de66..7b59b369d009 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 db1a3a1c7a9d..e43f53e40578 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 f011e5b21481..1022e5c4eced 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 6edfccaf7d17..e0bb1e2d02fc 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 0efbd1c2bd5f..91610c92d227 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 9f32c5d888b5..bce5ba7c91c3 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 dfcf73365337..7db64f3bf335 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 b4c4c013cd25..effedb954c35 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 e39c613281dc..5e399c3d06c5 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 b6a7264a529f..bc9d760cd297 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 06c119287d74..4a9f162823e3 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 e7b23d5f8a1c..1aa64810d190 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 f564f4fa702c..1c5261b7a791 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 0d3bace4db1f..4679d025fce0 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 1fbec47b14bc..51f30779cd94 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 b89c3e4590f2..ae463b6ef5b8 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 ad1ede9c3e48..cd14bc1fd098 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 af0780ab0b99..e54dd01122e0 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 3bdb3bf1d530..43b72b8e549d 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 3917bb3b6cfb..eedf7f4a8442 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 841bac5f6a0f..e046c73948e8 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 bc6a34392127..78a1d5116bed 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 a1cf23dab7b6..9d74c0687fe6 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 68d85ed6b0f9..51d8595adf19 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 e4ba7f8e2a62..fb92b1274365 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 7303cbab4a81..8a9e586eb25b 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 c4687c29de8e..f215d1bc69ed 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 b9faa668b80e..35d96e52fd61 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 5b3d7375de0e..e643dba12453 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 0245eab79694..8434dcba19df 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 ddea7aeb6cda..38abc3ec7e85 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 7066a0535e18..0c977b309949 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 28f4a85c9f29..51f95637969a 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 7b3e9e12405c..61251d7f6da9 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 82cc823e494c..c81650876c8a 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 d97270c3124d..0e3d01c2d618 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 cd219328a995..c320b0db31bb 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 a6916eda8b09..8e631fd1b6a3 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 a9bd6daf2acf..18bc4cf91787 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 828c871143ad..9389517e37bd 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 b6906f68ded5..f072bb88792e 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 c51dfb6782b7..d1328be84751 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 2ba4befea2a3..2a39da1176c3 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 80a74eb63a83..987fad2efead 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 de070fc9debd..f734c518dd21 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 f0ba9fa7cec2..608f2ec3d867 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 1f8c789267d1..2d08b7ba4c11 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 5bd854be8c6a..7097123d608c 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 d07fc9822a02..9231e82d9f43 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 55994d6a3259..d7033bf61a7f 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 f5c2abc0efa2..27440c2fdd76 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 83fd9a1da450..40c00e553a6d 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 9e6268e63cde..f474e30b9806 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 1ccd1b0cbad4..4eb16727ba81 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 11b659eec973..518417954084 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 5f3dbaa17989..ad25f06dc1ec 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 362f3d53e88b..1d6a5d978ee3 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 d2091ca96ea0..08acfea00045 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 fed5ac07c901..590107d10384 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 7c62002b931b..605799260385 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 371cac6da7cd..e78e6cf7690e 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 d98e83ff6dd0..bd45d8cddae9 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 18f173a693d2..7b5444ae0d34 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 5aef04ff19c0..e3698b23be86 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 b8fac45b76db..0ae2c9600ce3 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 3efbfaf09167..a5386bbec0d2 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 1b02fce2ad9b..88a8f6e11a53 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 +//@ 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" -> "" +//@[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 9d7e647dd943..9cb0316b7a38 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 3a765a2e3ef8..abba5b3a203d 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 922ac6620718..b33051da2d77 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 caa9e33bad04..29b5a042b7df 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 0900d7279ca6..3090f7733d24 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 65659a0f3b13..eed13933a037 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 748a279e4398..dad515aaa7bd 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 39f0b9a02eea..9901c8fe25d4 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 26d94dbb42a3..38e09b6087b6 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 f6a830296706..66a6c0a35b50 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 fddecfcacf68..e46d2bd559cf 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 5630e036be34..6b37552fed14 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 4e7388517a5e..bd580a78984a 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 c5e8068e5c8e..188b23732f91 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 1a4064055db6..1340a4214ee5 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 7bf899a96be1..8d0456e587cb 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 70c2ee4278ca..0fe653ac471a 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 67f56bcde939..65e2feaf7954 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 fd954801dc04..af575a4ff36b 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 0f4dac6c6833..48fcac92bec7 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 f43ad7dce1d4..03afec859d27 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 ad5e4918ccac..b675bc2e6225 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 faad5ee956a1..29d4faa7ba90 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 3b8470e4ae62..1484d9fd0734 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 b92e15aad561..bca146ffd117 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 22e2b0efd1f3..c20be3125bc7 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 2f90c4e00e38..1fc93a3cd279 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 bd95332cabae..ddad6071017c 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 b3a870d505a2..28875c97f2df 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 5391c849dad9..4a76b737e8c4 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 f93408a43db5..b7cae32ee32f 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 5d0e456d9ddc..d4bf3cc5cdb7 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 3cc0bc447a5b..31dc684a214a 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 3d87a089fca3..a5c36af63fa7 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 ca2f24d379bc..fdb56feab82a 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 7c2438d38bdd..8f3868fc609c 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 7315cd2feeaa..916a77d99348 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 027c692f9003..5facc83bc63a 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 e2f5d03ef742..a529b00b4809 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 48622663b4d5..cf65d08e2fb7 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 9e71d2af1d32..b087870abb52 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 016ad4a7e6a6..8cce8e96c741 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 972bf2827f97..048423289cc2 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 68aadcf60538..5ee3c027f404 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 274ea839e8bd..16d5b2411456 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 7c765d6d8104..3c0dc72f234d 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 d64013c8c838..f4e34c739c5e 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 f95f7bef2158..bb813acbc689 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 4301fed2312e..81eda1a1c0b4 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 c0f91d98ff31..215df6e4c55a 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 beda232ea8b3..e17114a36476 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 e49731725d51..6d63c0c7e1bd 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 c36f9904e5dc..3f8a6ff10165 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 847f33099732..2b85427f91e3 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 1db48b0adc43..645f6c4536b5 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 e4a4c89d057f..76d6d923affc 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 8a05407070da..4fcfe5c38389 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 442203addb78..79aa8817c809 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 15a3b580568d..ce572c346b3b 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 a48c4f9862f7..9089cc59e554 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 f41fbe59fba6..915f63c70801 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 6419e42e70d1..e4893eb8534f 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 2a59bd994508..da7661652382 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 7fbbb50dc115..0c05d48c76b2 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 4ebd5cdccfcf..7ee69d99566f 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 b3c12747414e..c60f1be06c67 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 0c23199af227..6ecec574f2ec 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 ec1882f5271b..ac1be913e2a9 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 10c7b9dbfb33..5733e74b613e 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 bceff0ef09d1..d2f1253eb0cc 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 88a040529e70..4285ebb7b6cd 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 a5f68beb1d52..4af32cfa3f1a 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 7efb9ac62404..46ec1dea0c03 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 ac9e4c716962..5876a34ef55c 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 157bdf07e382..627af1fe9523 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 6fbac2ee9758..3c3ae8ee5525 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 b101cf1dcf57..ff3f392e777d 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 cfde912d8961..7659d6734cae 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 29b6b8b868f5..dcb256de18f1 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 bd731e02bd1e..58cd6cbf20c5 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 bdb884f54312..144f6f7a0ff0 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 cf68850cc4de..5e259ab3566b 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 88c3f7866082..6cbe56b2f926 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 57e56d832c6b..e65aab553fdc 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 1d0527447ba5..0b34cbb4c5ed 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 b00bbc082afc..52b5f7ab9fc2 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 21a1a4c83800..ec0e9d6a48c3 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 70e5bc019208..d068356d4779 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 c9d9f2a6d501..f65f25d5dfbe 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 ce667a5006e6..9c8cc70e63a6 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 0cdd2c27ff73..4671ddd06c83 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 23ea0ad61a7f..0d91d0d61311 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 de7d6a0d80c9..6d00f66a26d4 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 e4436260e70a..b0f01de26b49 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 3ea05389f04a..cd502c82223f 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 7fdd618c2eca..07096803c116 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 3b399e629d34..cdfdd7e8fae8 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 4b6c173b8ce5..a49ef97ac14f 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 75430da14823..a192db0ef3e9 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 18f5970a350a..9c79aa278757 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 326273bfe922..b620eee43076 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 4f882f7a3f1e..ea3a2f2fbfe6 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 dc459c885fa7..9b74a88edd3d 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 19b96ecf3fc3..2a78276a6fe9 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 a06199466374..8ddc0340f182 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 0a3086a345dd..584bbe8c946c 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 83617e035e9e..717231ffc572 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 3e1a006efa06..213a672e397b 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 cfe6e19b303f..83d88ff34cac 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 03f8f09a7220..579a12dac69f 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 8ccb15ca48a4..0be1237749fc 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 74e50d46e8dc..77a2a5c5aa93 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 94200cce73ec..7fe9bdc6a1bb 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 ed0ce6effe7d..1ae9331e642b 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 c0384399a92e..bd646e9f40bf 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 63602d26f970..6d2643dbead9 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 1ffc56e66127..ec0d4ad70f15 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 331a798dd7a3..e2a8d5fdd94c 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 f752400bbcbb..e3783ff8cd2a 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 35097aa9ec61..d5691c9c3535 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 03602144e500..f3ece563f540 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 e3f99479a380..28150e8dac2e 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 b10471eccee6..c0287b79bc4b 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 b10239c22d1f..0fe0e09b8944 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 d00536b29cff..ff8c14793e16 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 ea3066d2289f..9fdc7fb8603d 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 d09306bf7941..5fb01c877c41 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 2181c37cee91..7762231714bd 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 ba83e79005b3..cb4a3967741c 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 c102447f6028..e4cafc466c6f 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 9ce46bc1a65b..f562b24cc4c1 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 7f65a3bb59d3..e364e6daa6a0 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 2530a1e966d0..24d1c7be5148 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 a9107f99873e..b754f64350f7 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 bafc1657737f..0893533eaa91 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 cc75cd4909a2..3e15e28b8fd6 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 1e954f569095..3d414aa6f1a3 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 ea7aa5285b09..d38e5ce16a3d 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 eee2b55b2a01..ef8b983b3e92 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 da1d82e896ae..849b72e63e5d 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 8098bfcd8d9d..ca3b8921f540 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 cbff8dbae21d..b83aefad1e9f 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 5bc4e0c217f4..7c4fb3f95a94 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 9f941620559c..3d0e79632bb3 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 71b9de8184cd..6dc97e5edb1c 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 59aa01568429..df233b3cc2b3 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 e24272432350..44b4c4993521 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 ea1edf7d4507..356bface2f8e 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 a9db71a0399b..bdc73069e897 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 dfccb02009e1..0ca4de56d744 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 a1001673506f..1cf4863bfa99 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 ca1d31ca5447..921bd94ee626 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 53f0523da70c..3240fe79a23f 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 cf4d4d3e136b..e43e5285e717 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 e23a75ab334e..34486c00b4e6 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 8a40c1d47855..39150ab26a1b 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 2433f0757aa0..42d96d18e4ac 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 b27d61049594..c6ad829de9b0 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 390386e57fa7..42287ac50701 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 39cc260726dd..7825e86f6294 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 1c5e74e593cb..632bffbea18d 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 ba3c61ca22b1..11be30594806 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 3ee1aeb109b1..63366ca6cbf6 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 d07e871b10d5..355791cda264 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 db1bea0e1159..f61ecdd9ccb2 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 bd577f7c479e..3d1a06ef66cf 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 524e756e69b0..4419c96b7819 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 e0c9105760d2..c7c50b7b50e2 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 d2eaee304104..a54048d25181 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 c3abdd8aab09..8c7b1c7534b0 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 9135c82b4fdf..fbf287d5fa8b 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 73f488a4fbbd..c5d8e7cc9ef6 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 7ac1ae30f77c..b497f2575c8e 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 0fbb504c2ba9..f8708a623101 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 6381386c4cc3..1903c2586542 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 3c8ea7d85100..26cff438618e 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 fc01bd9b6d93..cbc98d9fb173 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 a0fbbafe25ff..bd1769af1da7 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 6a5e5b9c224b..a78992f66e07 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 df60b42ab126..2d4e3523b2c4 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 2df360d4a30a..46fa8995c96b 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 4388e6bcf77f..105a2a96a889 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 470904fd3911..d883053d2763 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 2d219643f3e9..55b42e010367 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 89a273b7a43f..ca0ca66c0353 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 1449554024ca..aa50180725e9 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 8ada7494e028..e9d75386d169 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 054f284ea2a5..6103dbd99590 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 1ca25517c3c5..56d65367d635 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 94bb44d2cf50..4ba1fd21385c 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 6f41c35584e8..81fe12afccf1 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 92d741b6a266..61613d24b9e9 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 c021ad5ee0d2..624ecb47ca68 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 c8a293687878..f4ca2b72aad3 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 20bc7848acd6..4afad77ee4f0 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 510d91d0d462..d05aa0133cb2 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 7795ccb79719..3c0654a327e6 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 144f95bace1c..04de2bcc79ae 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 43f527bc9a40..dffff5e7710e 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 d06a26a5f116..c1295e18a126 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 700e4f254238..6bc09917bee1 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 66ba9b24dac2..11c1fd90a4a9 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 56682db3b0b4..5222cf797f72 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 5302b2f1576b..f2235843a064 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 38189816da84..578b2a453b5b 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 f3adc7e7fad3..8d9ec9dd7475 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 1e084e9ad41b..3ea02c9478a4 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 dd8074abed72..d14ea8ffce8c 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 4fc9c71b1794..18e8591e8b50 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 371d2e4ba43a..3837ab7acd22 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 a1593880d84d..6174f8ce036f 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 7fb8607f97da..d9eb21894e8c 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 a46533178609..6eff37380efe 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 dcf0eb646f3b..2442532b2c04 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 ce611a7cacf3..12317be18bf0 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 5c5ca5b70bb6..5c87f3c25eff 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 175ccd34e98d..7643f06a73f2 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 bf512b30560e..f5c794a53736 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 ce4cc13d9ecd..f32b3148593b 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 7d57cd51c2db..234d630e3450 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 b59432078350..e392d74ea0ff 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 61598541ddf0..4e895acbb705 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 f476704cd8af..27e4d8d20733 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 be0d3ff7da78..395eeb675791 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 5a75c94c42f0..5199721be0e0 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 2ef3b668cb08..67622a842a5c 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 b21de882b2ce..a6c11c4999a2 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 175018a7d71a..ead083b21b1e 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 143434c96f88..79e6b8d706f3 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 67ab10fef4bd..4df61e6d4484 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 21b9fc50e1d8..a71813968e84 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 1009def7d522..027f994ab4c9 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 d5b305595956..6d57b85cc117 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 15a20899a78d..0c68a98affc5 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 70a97795b758..37def9320be6 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 826b9e5a7c6e..05a4ba1e17c1 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 215666bdd9d9..e9165fddc51e 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 41c1e9243f7f..e467eda29350 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 69837f31cab2..47fcc2926bc8 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 2e75cce7b108..a3f962fb8721 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 5ca013a44cd8..01cba85deb3e 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 ba99e7441e6c..c1be39c20e61 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 7ce17a7c825f..cfba22c5e308 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 e7ab4ebe3238..efa87573e944 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 399ed9ae458b..cd9a370ff666 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 538c337a773c..b1ab211eae82 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 edcc1add38fd..826bd42cd211 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 8a7ac8172404..d48ae18dd0e5 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 be8062f6276f..72ac4a85d593 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 4f2dd4194a54..98ac164b1d41 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 289bae24f810..935c083dca65 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 80e30f23993e..c55a5f92a140 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 992472c894a8..4f5178e47926 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 dcc06850de17..7bd4df472207 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 29c6547abc16..a13c92151ac9 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 3778291ebb44..995f65ef83da 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 89db84e69f67..507137e69c41 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 5b7b4002f477..ba6f84c4ddea 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 dbcba7871ec9..f4de86bb0d03 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 dbcba7871ec9..f4de86bb0d03 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 fd84b70d944c..94aa7e77dcb3 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 6dcc0da30cc2..37377898b14f 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 8df933270331..07ecb99dccc5 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 81f5c88d7902..8972eccf3b8f 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 0c6e012e698f..0fd51edea241 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 705dded169a1..772f44cc268e 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 7fc5d2660599..275fa104e667 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 30620c69feae..c58ef3865aa9 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 b5ae529699da..9c231189659a 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 35ad1cd1b181..ed55f293876e 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 6e1132a33728..7f496e773c28 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 b745b9886316..c424b1afa346 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 ee44f3999455..9c5f7c8f4519 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 64174db7afbd..0c46a38d73f3 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 af8207aaadde..8affd6957be2 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 2b20d3f106b9..38c5db7e7670 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 b810a7f52966..c0083a51b34a 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 9a085958c108..2ba173ee4996 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 f84f12c8301d..f12c38939dd1 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 df45b8640c1a..039160f5e17d 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 93f478ee3580..c1a3e074efeb 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 b0d738855d73..85edf0442413 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 a004d7394222..067beacf302d 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 d99eb4cbd1c8..39566cda90ac 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 0acc3e0f6b1a..44a12bbd0a6b 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 fbcb846be9d7..0f123395680b 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 8b28c33650e5..d440e10a20f4 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 bb75dbf0997c..e7095926eb16 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 935de97f2554..3f6211ce792f 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 e060c58e408f..b371a79d1f32 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 3713a7065f5e..d9f244bc4d20 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 5e953107686f..bb7715b7b5ce 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 db822bb6a028..a715c845e903 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 4196b1cae249..06a46b9812d3 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 8f5cc014a3ba..c7291866588b 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 90c9e2823969..401fc0bfd313 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 01be8f3bb9c9..a3820e3e6dcf 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 5dd5898c12e5..31b58ba4002b 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 8b2f9b4c9fcd..7451fd0ce69c 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 b9881defac39..7ccea43d182e 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 957991f853b2..1f9b5f11fb50 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 4e887f32753f..5b5fca22a012 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 02b7c299aa40..374031b80bd2 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 83d3680f72ff..a5aada20d3eb 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 2133b01e0948..1314e33d42a6 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 e8782e894815..bd79ca14f435 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 a1b772a7eb68..df12dac48ef5 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 5fe7bd64288d..7227a5d96732 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 ff25365ea50c..1b1d5234c129 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 999399ec8d34..4d0b02d13116 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 780433b28c59..d4bb6035dd46 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 65a867caf8f7..fd0b799d8893 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 5716817f43de..733a150a941d 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 56c8a72bfcc0..9cfcf0aa13eb 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 72f765033969..625ec71a8235 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 0e018cdabb23..6470f1c10f14 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 8aa2ed153445..6abd428db2a3 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 eba341ff2847..9028208812dc 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 fd9b159a4813..41a59c08b909 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 9fc08bd6d3e7..b5ec4bda673a 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 5e385f33bee7..a76e2df57507 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 54304834d4b2..7ae6d611c297 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 bbeb00d5fed6..e2692a7a2c0a 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 a3f92be6cf61..1b3e932bfe6d 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 0ef03eb9edf0..6093b221c57c 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 e9ab18ff63f3..3b2e8b5677e2 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 fd9a61d6caa2..f0f6d5b704d5 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 2b369dee5a0d..aab53eb37753 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 69e28b3319a2..d32e8e205af3 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 8c273cb534d7..9c720de36349 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 c1545dca99f5..8a5ec758e560 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 e21ffb5dec2d..9d28af42cc92 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 8904d04bc14f..cd7dea4f23bc 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 66d6440c9cb9..ef95d0707933 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 1b7cb9b970e4..f86f6bbf3564 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 f15c87fa0b24..abc679cf3200 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 1acb307ab21b..b558c0678d6b 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 4826c0062d0e..b23a9c8d5fb4 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 c609529a6c6f..ccb404e3033b 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 3bae61c3ea2c..8d390e02ca59 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 efaf10da4a99..c295f8d79143 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 697434d47ebb..87398652e93c 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 d73fe3e0bdad..28ef7d57788e 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 8f000737656a..e05c5ded10d0 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 3bc309233a7a..fb8082e31880 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 07a6866ba662..f784194c5059 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 ebddb5d1a483..4f3d1ee500d8 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 200f742d771f..6e8c7053c576 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 5c739709e9ea..c5d66a869353 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 3c7756ef7e67..18aa329ae36b 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 f0b292f2911c..62fd4769a038 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 4cd458302a49..3e059818ac27 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 695ed66a1c18..b7b9c834b327 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 975209efb0c1..2c5ae9cd9a1c 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 1beee4a51437..826a049f2bbb 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 c5da45c0854b..5ec0bda5eef6 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 a3cb0e9a52a8..e2e4ccd63c16 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 1f6326dd94b5..0c34529d2de4 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 74707a98d325..09b530fdc988 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 a542e44d517a..c42c53a96fc7 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 d4b2d08342a9..ef6264d33481 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 ecd2204c991c..14f5d541c690 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 975e471fe34f..c89804e81adf 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 82a1dd63713c..a5a6cca0637b 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 0576c2e6be16..c7f8585eaa4e 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 c3cca3a35ac6..30358c7a8d98 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 a4adfa6d0446..0e215bdf197f 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 39fbf3c9eb4e..ce7d5786b41b 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 a067b7b5b1f2..e016343f8ba2 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 748fe13c1e47..d856b06e260b 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 eac238f0fcab..abdcd1c04ab2 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 2820d5f6d074..01893044c278 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 f07843103321..6a778a4bf214 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 ca2d6c2e882d..e1fc962c00b4 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 86722afdf9fd..a3d360e1fb56 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 473fc79a8a39..e14be6b62bb2 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 5d7308b6c1cd..7ad7a896e8d3 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 2ee34ad714ed..96b48068b0e1 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 1ece2e9fc847..4c5c2727824a 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 6cf5ed2e46ae..fd2cfe2bf65e 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 65fd2f3096c9..be003cbf585e 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 a7ce0590fcd4..67088a9818e0 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 8f9c6fbff3d8..ba409182809d 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 4e1aa59aac0f..b53d9d61d67f 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 05b2f8c82a45..18955dd8bcc3 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 940e2cc8e975..719f1d2a4c60 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 7001a9245a5f..a76787413144 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 62e301cb4086..1f3b044c8119 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 84925345de14..db61638ca2dd 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 9edf0bd5b1d2..713808520b5d 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 4bfd9e6590fb..8e8c73a39251 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 feecff435652..1759c0f23468 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 6964cfa2eb04..c2ef65ab0a69 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 905ef7c5e8cc..f7bf875d4173 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 0336678b712e..c6a6dd00a921 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 3fcaefaa63ef..f194e25b5567 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 ef834d915c93..5795cc527cf2 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 299cff54f346..3a5d81313443 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 7aa3eb0d6c44..c2e3a7611292 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 bc14cd8d4c01..1517f843eff3 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 fb87d8ea0ba7..ebd2a12a6c8f 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 14cf6c2036bd..d35a3cf559e7 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 52edb33d6ad4..be862c85cbb0 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 301f03110b74..c5c5c28eb9e2 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 2208590f7d61..8eb56071033e 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)]