From fc918a395a0b8fa251f85fa85992ee8a0b0ed5e8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 27 Jun 2019 11:36:01 +0200 Subject: [PATCH 01/31] rename InterpretCx -> InterpCx That's more consistent with InterpResult and InterpError. --- src/librustc/mir/interpret/error.rs | 2 +- src/librustc_mir/const_eval.rs | 28 +++++++++++----------- src/librustc_mir/interpret/cast.rs | 4 ++-- src/librustc_mir/interpret/eval_context.rs | 14 +++++------ src/librustc_mir/interpret/intrinsics.rs | 4 ++-- src/librustc_mir/interpret/machine.rs | 20 ++++++++-------- src/librustc_mir/interpret/mod.rs | 2 +- src/librustc_mir/interpret/operand.rs | 4 ++-- src/librustc_mir/interpret/operator.rs | 6 ++--- src/librustc_mir/interpret/place.rs | 6 ++--- src/librustc_mir/interpret/step.rs | 6 ++--- src/librustc_mir/interpret/terminator.rs | 4 ++-- src/librustc_mir/interpret/traits.rs | 4 ++-- src/librustc_mir/interpret/validity.rs | 8 +++---- src/librustc_mir/interpret/visitor.rs | 24 +++++++++---------- src/librustc_mir/transform/const_prop.rs | 6 ++--- 16 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index e8113b4516cda..8494f8a7fb516 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -178,7 +178,7 @@ pub fn struct_error<'tcx>(tcx: TyCtxtAt<'tcx>, msg: &str) -> DiagnosticBuilder<' /// up with a Rust-level backtrace of where the error occured. /// Thsese should always be constructed by calling `.into()` on /// a `InterpError`. In `librustc_mir::interpret`, we have the `err!` -/// macro for this +/// macro for this. #[derive(Debug, Clone)] pub struct InterpErrorInfo<'tcx> { pub kind: InterpError<'tcx, u64>, diff --git a/src/librustc_mir/const_eval.rs b/src/librustc_mir/const_eval.rs index 887ef4b520ea3..aa264bbd4bb5c 100644 --- a/src/librustc_mir/const_eval.rs +++ b/src/librustc_mir/const_eval.rs @@ -22,7 +22,7 @@ use syntax::source_map::{Span, DUMMY_SP}; use crate::interpret::{self, PlaceTy, MPlaceTy, OpTy, ImmTy, Immediate, Scalar, RawConst, ConstValue, - InterpResult, InterpErrorInfo, InterpError, GlobalId, InterpretCx, StackPopCleanup, + InterpResult, InterpErrorInfo, InterpError, GlobalId, InterpCx, StackPopCleanup, Allocation, AllocId, MemoryKind, Memory, snapshot, RefTracking, intern_const_alloc_recursive, }; @@ -34,7 +34,7 @@ const STEPS_UNTIL_DETECTOR_ENABLED: isize = 1_000_000; /// Should be a power of two for performance reasons. const DETECTOR_SNAPSHOT_PERIOD: isize = 256; -/// The `InterpretCx` is only meant to be used to do field and index projections into constants for +/// The `InterpCx` is only meant to be used to do field and index projections into constants for /// `simd_shuffle` and const patterns in match arms. /// /// The function containing the `match` that is currently being analyzed may have generic bounds @@ -47,7 +47,7 @@ pub(crate) fn mk_eval_cx<'mir, 'tcx>( param_env: ty::ParamEnv<'tcx>, ) -> CompileTimeEvalContext<'mir, 'tcx> { debug!("mk_eval_cx: {:?}", param_env); - InterpretCx::new(tcx.at(span), param_env, CompileTimeInterpreter::new()) + InterpCx::new(tcx.at(span), param_env, CompileTimeInterpreter::new()) } pub(crate) fn eval_promoted<'mir, 'tcx>( @@ -303,7 +303,7 @@ impl interpret::AllocMap for FxHashMap { } crate type CompileTimeEvalContext<'mir, 'tcx> = - InterpretCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>; + InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>; impl interpret::MayLeak for ! { #[inline(always)] @@ -326,12 +326,12 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, const STATIC_KIND: Option = None; // no copying of statics allowed #[inline(always)] - fn enforce_validity(_ecx: &InterpretCx<'mir, 'tcx, Self>) -> bool { + fn enforce_validity(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool { false // for now, we don't enforce validity } fn find_fn( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, instance: ty::Instance<'tcx>, args: &[OpTy<'tcx>], dest: Option>, @@ -371,7 +371,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, } fn call_intrinsic( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, instance: ty::Instance<'tcx>, args: &[OpTy<'tcx>], dest: PlaceTy<'tcx>, @@ -387,7 +387,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, } fn ptr_op( - _ecx: &InterpretCx<'mir, 'tcx, Self>, + _ecx: &InterpCx<'mir, 'tcx, Self>, _bin_op: mir::BinOp, _left: ImmTy<'tcx>, _right: ImmTy<'tcx>, @@ -424,7 +424,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, } fn box_alloc( - _ecx: &mut InterpretCx<'mir, 'tcx, Self>, + _ecx: &mut InterpCx<'mir, 'tcx, Self>, _dest: PlaceTy<'tcx>, ) -> InterpResult<'tcx> { Err( @@ -432,7 +432,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, ) } - fn before_terminator(ecx: &mut InterpretCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> { + fn before_terminator(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> { { let steps = &mut ecx.machine.steps_since_detector_enabled; @@ -457,13 +457,13 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, } #[inline(always)] - fn stack_push(_ecx: &mut InterpretCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> { + fn stack_push(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> { Ok(()) } /// Called immediately before a stack frame gets popped. #[inline(always)] - fn stack_pop(_ecx: &mut InterpretCx<'mir, 'tcx, Self>, _extra: ()) -> InterpResult<'tcx> { + fn stack_pop(_ecx: &mut InterpCx<'mir, 'tcx, Self>, _extra: ()) -> InterpResult<'tcx> { Ok(()) } } @@ -508,7 +508,7 @@ pub fn const_variant_index<'tcx>( } pub fn error_to_const_error<'mir, 'tcx>( - ecx: &InterpretCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>, + ecx: &InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>, mut error: InterpErrorInfo<'tcx>, ) -> ConstEvalErr<'tcx> { error.print_backtrace(); @@ -632,7 +632,7 @@ pub fn const_eval_raw_provider<'tcx>( } let span = tcx.def_span(cid.instance.def_id()); - let mut ecx = InterpretCx::new(tcx.at(span), key.param_env, CompileTimeInterpreter::new()); + let mut ecx = InterpCx::new(tcx.at(span), key.param_env, CompileTimeInterpreter::new()); let res = ecx.load_mir(cid.instance.def); res.map(|body| { diff --git a/src/librustc_mir/interpret/cast.rs b/src/librustc_mir/interpret/cast.rs index fbacdf6cd93bb..59f1e461e94c6 100644 --- a/src/librustc_mir/interpret/cast.rs +++ b/src/librustc_mir/interpret/cast.rs @@ -11,9 +11,9 @@ use rustc::mir::interpret::{ }; use rustc::mir::CastKind; -use super::{InterpretCx, Machine, PlaceTy, OpTy, Immediate}; +use super::{InterpCx, Machine, PlaceTy, OpTy, Immediate}; -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { fn type_is_fat_ptr(&self, ty: Ty<'tcx>) -> bool { match ty.sty { ty::RawPtr(ty::TypeAndMut { ty, .. }) | diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index c6e762bddd4d9..e24fa6351e5df 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -26,7 +26,7 @@ use super::{ Memory, Machine }; -pub struct InterpretCx<'mir, 'tcx, M: Machine<'mir, 'tcx>> { +pub struct InterpCx<'mir, 'tcx, M: Machine<'mir, 'tcx>> { /// Stores the `Machine` instance. pub machine: M, @@ -158,14 +158,14 @@ impl<'tcx, Tag: Copy + 'static> LocalState<'tcx, Tag> { } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for InterpCx<'mir, 'tcx, M> { #[inline] fn data_layout(&self) -> &layout::TargetDataLayout { &self.tcx.data_layout } } -impl<'mir, 'tcx, M> layout::HasTyCtxt<'tcx> for InterpretCx<'mir, 'tcx, M> +impl<'mir, 'tcx, M> layout::HasTyCtxt<'tcx> for InterpCx<'mir, 'tcx, M> where M: Machine<'mir, 'tcx>, { @@ -175,7 +175,7 @@ where } } -impl<'mir, 'tcx, M> layout::HasParamEnv<'tcx> for InterpretCx<'mir, 'tcx, M> +impl<'mir, 'tcx, M> layout::HasParamEnv<'tcx> for InterpCx<'mir, 'tcx, M> where M: Machine<'mir, 'tcx>, { @@ -184,7 +184,7 @@ where } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf for InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf for InterpCx<'mir, 'tcx, M> { type Ty = Ty<'tcx>; type TyLayout = InterpResult<'tcx, TyLayout<'tcx>>; @@ -195,9 +195,9 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf for InterpretCx<'mir, 'tcx, M> } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { pub fn new(tcx: TyCtxtAt<'tcx>, param_env: ty::ParamEnv<'tcx>, machine: M) -> Self { - InterpretCx { + InterpCx { machine, tcx, param_env, diff --git a/src/librustc_mir/interpret/intrinsics.rs b/src/librustc_mir/interpret/intrinsics.rs index beb5049307117..cf36c10a614e5 100644 --- a/src/librustc_mir/interpret/intrinsics.rs +++ b/src/librustc_mir/interpret/intrinsics.rs @@ -11,7 +11,7 @@ use rustc::mir::interpret::{ }; use super::{ - Machine, PlaceTy, OpTy, InterpretCx, Immediate, + Machine, PlaceTy, OpTy, InterpCx, Immediate, }; mod type_name; @@ -39,7 +39,7 @@ fn numeric_intrinsic<'tcx, Tag>( Ok(Scalar::from_uint(bits_out, size)) } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Returns `true` if emulation happened. pub fn emulate_intrinsic( &mut self, diff --git a/src/librustc_mir/interpret/machine.rs b/src/librustc_mir/interpret/machine.rs index 4eb95f20d9354..f16c21857b987 100644 --- a/src/librustc_mir/interpret/machine.rs +++ b/src/librustc_mir/interpret/machine.rs @@ -11,7 +11,7 @@ use rustc::ty::{self, query::TyCtxtAt}; use super::{ Allocation, AllocId, InterpResult, Scalar, AllocationExtra, - InterpretCx, PlaceTy, OpTy, ImmTy, MemoryKind, Pointer, Memory + InterpCx, PlaceTy, OpTy, ImmTy, MemoryKind, Pointer, Memory }; /// Whether this kind of memory is allowed to leak @@ -95,11 +95,11 @@ pub trait Machine<'mir, 'tcx>: Sized { const STATIC_KIND: Option; /// Whether to enforce the validity invariant - fn enforce_validity(ecx: &InterpretCx<'mir, 'tcx, Self>) -> bool; + fn enforce_validity(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool; /// Called before a basic block terminator is executed. /// You can use this to detect endlessly running programs. - fn before_terminator(ecx: &mut InterpretCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>; + fn before_terminator(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>; /// Entry point to all function calls. /// @@ -112,7 +112,7 @@ pub trait Machine<'mir, 'tcx>: Sized { /// Passing `dest`and `ret` in the same `Option` proved very annoying when only one of them /// was used. fn find_fn( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, instance: ty::Instance<'tcx>, args: &[OpTy<'tcx, Self::PointerTag>], dest: Option>, @@ -122,7 +122,7 @@ pub trait Machine<'mir, 'tcx>: Sized { /// Directly process an intrinsic without pushing a stack frame. /// If this returns successfully, the engine will take care of jumping to the next block. fn call_intrinsic( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, instance: ty::Instance<'tcx>, args: &[OpTy<'tcx, Self::PointerTag>], dest: PlaceTy<'tcx, Self::PointerTag>, @@ -145,7 +145,7 @@ pub trait Machine<'mir, 'tcx>: Sized { /// /// Returns a (value, overflowed) pair if the operation succeeded fn ptr_op( - ecx: &InterpretCx<'mir, 'tcx, Self>, + ecx: &InterpCx<'mir, 'tcx, Self>, bin_op: mir::BinOp, left: ImmTy<'tcx, Self::PointerTag>, right: ImmTy<'tcx, Self::PointerTag>, @@ -153,7 +153,7 @@ pub trait Machine<'mir, 'tcx>: Sized { /// Heap allocations via the `box` keyword. fn box_alloc( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, dest: PlaceTy<'tcx, Self::PointerTag>, ) -> InterpResult<'tcx>; @@ -193,7 +193,7 @@ pub trait Machine<'mir, 'tcx>: Sized { /// Executes a retagging operation #[inline] fn retag( - _ecx: &mut InterpretCx<'mir, 'tcx, Self>, + _ecx: &mut InterpCx<'mir, 'tcx, Self>, _kind: mir::RetagKind, _place: PlaceTy<'tcx, Self::PointerTag>, ) -> InterpResult<'tcx> { @@ -201,11 +201,11 @@ pub trait Machine<'mir, 'tcx>: Sized { } /// Called immediately before a new stack frame got pushed - fn stack_push(ecx: &mut InterpretCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, Self::FrameExtra>; + fn stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, Self::FrameExtra>; /// Called immediately after a stack frame gets popped fn stack_pop( - ecx: &mut InterpretCx<'mir, 'tcx, Self>, + ecx: &mut InterpCx<'mir, 'tcx, Self>, extra: Self::FrameExtra, ) -> InterpResult<'tcx>; diff --git a/src/librustc_mir/interpret/mod.rs b/src/librustc_mir/interpret/mod.rs index 259bd6af0d5d4..2b20f9df53837 100644 --- a/src/librustc_mir/interpret/mod.rs +++ b/src/librustc_mir/interpret/mod.rs @@ -19,7 +19,7 @@ mod intern; pub use rustc::mir::interpret::*; // have all the `interpret` symbols in one place: here pub use self::eval_context::{ - InterpretCx, Frame, StackPopCleanup, LocalState, LocalValue, + InterpCx, Frame, StackPopCleanup, LocalState, LocalValue, }; pub use self::place::{Place, PlaceTy, MemPlace, MPlaceTy}; diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index c72078fa89cd2..68c9047f7b708 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -15,7 +15,7 @@ use rustc::mir::interpret::{ sign_extend, truncate, }; use super::{ - InterpretCx, Machine, + InterpCx, Machine, MemPlace, MPlaceTy, PlaceTy, Place, }; pub use rustc::mir::interpret::ScalarMaybeUndef; @@ -213,7 +213,7 @@ pub(super) fn from_known_layout<'tcx>( } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Try reading an immediate in memory; this is interesting particularly for `ScalarPair`. /// Returns `None` if the layout does not permit loading this as a value. fn try_read_immediate_from_mplace( diff --git a/src/librustc_mir/interpret/operator.rs b/src/librustc_mir/interpret/operator.rs index 029a440f34e72..20180c9cba542 100644 --- a/src/librustc_mir/interpret/operator.rs +++ b/src/librustc_mir/interpret/operator.rs @@ -4,10 +4,10 @@ use syntax::ast::FloatTy; use rustc_apfloat::Float; use rustc::mir::interpret::{InterpResult, Scalar}; -use super::{InterpretCx, PlaceTy, Immediate, Machine, ImmTy}; +use super::{InterpCx, PlaceTy, Immediate, Machine, ImmTy}; -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Applies the binary operation `op` to the two operands and writes a tuple of the result /// and a boolean signifying the potential overflow to the destination. pub fn binop_with_overflow( @@ -36,7 +36,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { fn binary_char_op( &self, bin_op: mir::BinOp, diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs index 1351b5bb8bd88..4f3727fbd8d9a 100644 --- a/src/librustc_mir/interpret/place.rs +++ b/src/librustc_mir/interpret/place.rs @@ -13,7 +13,7 @@ use rustc::ty::TypeFoldable; use super::{ GlobalId, AllocId, Allocation, Scalar, InterpResult, Pointer, PointerArithmetic, - InterpretCx, Machine, AllocMap, AllocationExtra, + InterpCx, Machine, AllocMap, AllocationExtra, RawConst, Immediate, ImmTy, ScalarMaybeUndef, Operand, OpTy, MemoryKind, LocalValue }; @@ -290,7 +290,7 @@ impl<'tcx, Tag: ::std::fmt::Debug> PlaceTy<'tcx, Tag> { } // separating the pointer tag for `impl Trait`, see https://github.com/rust-lang/rust/issues/54385 -impl<'mir, 'tcx, Tag, M> InterpretCx<'mir, 'tcx, M> +impl<'mir, 'tcx, Tag, M> InterpCx<'mir, 'tcx, M> where // FIXME: Working around https://github.com/rust-lang/rust/issues/54385 Tag: ::std::fmt::Debug + Copy + Eq + Hash + 'static, @@ -583,7 +583,7 @@ where // global table but not in its local memory: It calls back into tcx through // a query, triggering the CTFE machinery to actually turn this lazy reference // into a bunch of bytes. IOW, statics are evaluated with CTFE even when - // this InterpretCx uses another Machine (e.g., in miri). This is what we + // this InterpCx uses another Machine (e.g., in miri). This is what we // want! This way, computing statics works consistently between codegen // and miri: They use the same query to eventually obtain a `ty::Const` // and use that for further computation. diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs index 2f99973b90d4a..dc5302eb18fc4 100644 --- a/src/librustc_mir/interpret/step.rs +++ b/src/librustc_mir/interpret/step.rs @@ -1,4 +1,4 @@ -//! This module contains the `InterpretCx` methods for executing a single step of the interpreter. +//! This module contains the `InterpCx` methods for executing a single step of the interpreter. //! //! The main entry point is the `step` method. @@ -6,7 +6,7 @@ use rustc::mir; use rustc::ty::layout::LayoutOf; use rustc::mir::interpret::{InterpResult, Scalar, PointerArithmetic}; -use super::{InterpretCx, Machine}; +use super::{InterpCx, Machine}; /// Classify whether an operator is "left-homogeneous", i.e., the LHS has the /// same type as the result. @@ -35,7 +35,7 @@ fn binop_right_homogeneous(op: mir::BinOp) -> bool { } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { pub fn run(&mut self) -> InterpResult<'tcx> { while self.step()? {} Ok(()) diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index 13baf245d10fb..d6f3de02ec918 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -8,10 +8,10 @@ use rustc_target::spec::abi::Abi; use rustc::mir::interpret::{InterpResult, PointerArithmetic, InterpError, Scalar}; use super::{ - InterpretCx, Machine, Immediate, OpTy, ImmTy, PlaceTy, MPlaceTy, StackPopCleanup + InterpCx, Machine, Immediate, OpTy, ImmTy, PlaceTy, MPlaceTy, StackPopCleanup }; -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { #[inline] pub fn goto_block(&mut self, target: Option) -> InterpResult<'tcx> { if let Some(target) = target { diff --git a/src/librustc_mir/interpret/traits.rs b/src/librustc_mir/interpret/traits.rs index 5d2f268d26639..27d127514229c 100644 --- a/src/librustc_mir/interpret/traits.rs +++ b/src/librustc_mir/interpret/traits.rs @@ -2,9 +2,9 @@ use rustc::ty::{self, Ty, Instance}; use rustc::ty::layout::{Size, Align, LayoutOf}; use rustc::mir::interpret::{Scalar, Pointer, InterpResult, PointerArithmetic}; -use super::{InterpretCx, InterpError, Machine, MemoryKind}; +use super::{InterpCx, InterpError, Machine, MemoryKind}; -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Creates a dynamic vtable for the given type and vtable origin. This is used only for /// objects. /// diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index b2a159fef59c6..374f42261bf62 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -13,7 +13,7 @@ use rustc::mir::interpret::{ use std::hash::Hash; use super::{ - OpTy, Machine, InterpretCx, ValueVisitor, MPlaceTy, + OpTy, Machine, InterpCx, ValueVisitor, MPlaceTy, }; macro_rules! validation_failure { @@ -174,7 +174,7 @@ struct ValidityVisitor<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> { MPlaceTy<'tcx, M::PointerTag>, Vec, >>, - ecx: &'rt InterpretCx<'mir, 'tcx, M>, + ecx: &'rt InterpCx<'mir, 'tcx, M>, } impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M> { @@ -259,7 +259,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> type V = OpTy<'tcx, M::PointerTag>; #[inline(always)] - fn ecx(&self) -> &InterpretCx<'mir, 'tcx, M> { + fn ecx(&self) -> &InterpCx<'mir, 'tcx, M> { &self.ecx } @@ -628,7 +628,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> } } -impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> { +impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// This function checks the data at `op`. `op` is assumed to cover valid memory if it /// is an indirect operand. /// It will error if the bits at the destination do not match the ones described by the layout. diff --git a/src/librustc_mir/interpret/visitor.rs b/src/librustc_mir/interpret/visitor.rs index d04dc3ab37ed3..783d252263735 100644 --- a/src/librustc_mir/interpret/visitor.rs +++ b/src/librustc_mir/interpret/visitor.rs @@ -8,7 +8,7 @@ use rustc::mir::interpret::{ }; use super::{ - Machine, InterpretCx, MPlaceTy, OpTy, + Machine, InterpCx, MPlaceTy, OpTy, }; // A thing that we can project into, and that has a layout. @@ -21,7 +21,7 @@ pub trait Value<'mir, 'tcx, M: Machine<'mir, 'tcx>>: Copy { /// Makes this into an `OpTy`. fn to_op( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, ) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>; /// Creates this from an `MPlaceTy`. @@ -30,14 +30,14 @@ pub trait Value<'mir, 'tcx, M: Machine<'mir, 'tcx>>: Copy { /// Projects to the given enum variant. fn project_downcast( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, variant: VariantIdx, ) -> InterpResult<'tcx, Self>; /// Projects to the n-th field. fn project_field( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, field: u64, ) -> InterpResult<'tcx, Self>; } @@ -53,7 +53,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M:: #[inline(always)] fn to_op( self, - _ecx: &InterpretCx<'mir, 'tcx, M>, + _ecx: &InterpCx<'mir, 'tcx, M>, ) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>> { Ok(self) } @@ -66,7 +66,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M:: #[inline(always)] fn project_downcast( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, variant: VariantIdx, ) -> InterpResult<'tcx, Self> { ecx.operand_downcast(self, variant) @@ -75,7 +75,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M:: #[inline(always)] fn project_field( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, field: u64, ) -> InterpResult<'tcx, Self> { ecx.operand_field(self, field) @@ -91,7 +91,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, #[inline(always)] fn to_op( self, - _ecx: &InterpretCx<'mir, 'tcx, M>, + _ecx: &InterpCx<'mir, 'tcx, M>, ) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>> { Ok(self.into()) } @@ -104,7 +104,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, #[inline(always)] fn project_downcast( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, variant: VariantIdx, ) -> InterpResult<'tcx, Self> { ecx.mplace_downcast(self, variant) @@ -113,7 +113,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, #[inline(always)] fn project_field( self, - ecx: &InterpretCx<'mir, 'tcx, M>, + ecx: &InterpCx<'mir, 'tcx, M>, field: u64, ) -> InterpResult<'tcx, Self> { ecx.mplace_field(self, field) @@ -126,9 +126,9 @@ macro_rules! make_value_visitor { pub trait $visitor_trait_name<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>>: Sized { type V: Value<'mir, 'tcx, M>; - /// The visitor must have an `InterpretCx` in it. + /// The visitor must have an `InterpCx` in it. fn ecx(&$($mutability)? self) - -> &$($mutability)? InterpretCx<'mir, 'tcx, M>; + -> &$($mutability)? InterpCx<'mir, 'tcx, M>; // Recursive actions, ready to be overloaded. /// Visits the given value, dispatching as appropriate to more specialized visitors. diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index c7a2fdd93830f..29480f88fcedc 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -23,7 +23,7 @@ use rustc::ty::layout::{ }; use crate::interpret::{ - self, InterpretCx, ScalarMaybeUndef, Immediate, OpTy, + self, InterpCx, ScalarMaybeUndef, Immediate, OpTy, ImmTy, MemoryKind, StackPopCleanup, LocalValue, LocalState, }; use crate::const_eval::{ @@ -117,7 +117,7 @@ type Const<'tcx> = OpTy<'tcx>; /// Finds optimization opportunities on the MIR. struct ConstPropagator<'mir, 'tcx> { - ecx: InterpretCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>, + ecx: InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, can_const_prop: IndexVec, @@ -202,7 +202,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { // If the local is `Unitialized` or `Dead` then we haven't propagated a value into it. // - // `InterpretCx::access_local()` mostly takes care of this for us however, for ZSTs, + // `InterpCx::access_local()` mostly takes care of this for us however, for ZSTs, // it will synthesize a value for us. In doing so, that will cause the // `get_const(l).is_empty()` assert right before we call `set_const()` in `visit_statement` // to fail. From a02d4364e47724ee342c2fdac09a38877c20a984 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Sat, 29 Jun 2019 23:05:58 +0300 Subject: [PATCH 02/31] wfcheck: resolve the type-vars in `AdtField` types Normalization can leave some type-vars unresolved in its return type. Make sure to resolve them so we have an infcx-independent type that can be used with `needs_drop`. Fixes #61402. --- src/librustc_typeck/check/wfcheck.rs | 2 ++ .../packed-with-inference-vars-issue-61402.rs | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/test/run-pass/packed/packed-with-inference-vars-issue-61402.rs diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 034ff5f834767..ac35312e2159c 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -1103,6 +1103,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let field_ty = self.tcx.type_of(self.tcx.hir().local_def_id_from_hir_id(field.hir_id)); let field_ty = self.normalize_associated_types_in(field.span, &field_ty); + let field_ty = self.resolve_vars_if_possible(&field_ty); + debug!("non_enum_variant: type of field {:?} is {:?}", field, field_ty); AdtField { ty: field_ty, span: field.span } }) .collect(); diff --git a/src/test/run-pass/packed/packed-with-inference-vars-issue-61402.rs b/src/test/run-pass/packed/packed-with-inference-vars-issue-61402.rs new file mode 100644 index 0000000000000..6028b8f5ab491 --- /dev/null +++ b/src/test/run-pass/packed/packed-with-inference-vars-issue-61402.rs @@ -0,0 +1,21 @@ +// 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). +// +// This is checked by the compiler during wfcheck. That check used +// to have problems with associated types in the last field - test +// that this doesn't ICE. + +#![allow(unused_imports, dead_code)] + +pub struct S; + +pub trait Trait { type Assoc; } + +impl Trait for S { type Assoc = X; } + +#[repr(C, packed)] +struct PackedAssocSized { + pos: Box<>::Assoc>, +} + +fn main() { println!("Hello, world!"); } From f7061db7e96bb88f85ed0e85175f4f338ed86b15 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sun, 30 Jun 2019 12:27:32 -0700 Subject: [PATCH 03/31] Update mem::replace example to not be identical to mem::take This also adds assertions that the operations work as expected. --- src/libcore/mem/mod.rs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs index e110e93a95412..b31522db474b7 100644 --- a/src/libcore/mem/mod.rs +++ b/src/libcore/mem/mod.rs @@ -552,6 +552,12 @@ pub fn swap(x: &mut T, y: &mut T) { /// mem::take(&mut self.buf) /// } /// } +/// +/// let mut buffer = Buffer { buf: vec![0, 1] }; +/// assert_eq!(buffer.buf.len(), 2); +/// +/// assert_eq!(buffer.get_and_reset(), vec![0, 1]); +/// assert_eq!(buffer.buf.len(), 0); /// ``` /// /// [`Clone`]: ../../std/clone/trait.Clone.html @@ -586,17 +592,17 @@ pub fn take(dest: &mut T) -> T { /// struct Buffer { buf: Vec } /// /// impl Buffer { -/// fn get_and_reset(&mut self) -> Vec { +/// fn replace_index(&mut self, i: usize, v: T) -> T { /// // error: cannot move out of dereference of `&mut`-pointer -/// let buf = self.buf; -/// self.buf = Vec::new(); -/// buf +/// let t = self.buf[i]; +/// self.buf[i] = v; +/// t /// } /// } /// ``` /// -/// Note that `T` does not necessarily implement [`Clone`], so it can't even clone and reset -/// `self.buf`. But `replace` can be used to disassociate the original value of `self.buf` from +/// Note that `T` does not necessarily implement [`Clone`], so we can't even clone `self.buf[i]` to +/// avoid the move. But `replace` can be used to disassociate the original value at that index from /// `self`, allowing it to be returned: /// /// ``` @@ -605,10 +611,16 @@ pub fn take(dest: &mut T) -> T { /// /// # struct Buffer { buf: Vec } /// impl Buffer { -/// fn get_and_reset(&mut self) -> Vec { -/// mem::replace(&mut self.buf, Vec::new()) +/// fn replace_index(&mut self, i: usize, v: T) -> T { +/// mem::replace(&mut self.buf[i], v) /// } /// } +/// +/// let mut buffer = Buffer { buf: vec![0, 1] }; +/// assert_eq!(buffer.buf[0], 0); +/// +/// assert_eq!(buffer.replace_index(0, 2), 0); +/// assert_eq!(buffer.buf[0], 2); /// ``` /// /// [`Clone`]: ../../std/clone/trait.Clone.html From 3f39dc1b9095bf3808e45a8ff9afc6b9a4d8e9a3 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 1 Jul 2019 01:08:49 +0300 Subject: [PATCH 04/31] syntax: Unsupport `foo! bar { ... }` macros in the parser Unreserve `macro_rules` as a macro name --- src/librustc_plugin/registry.rs | 5 +- src/librustc_resolve/macros.rs | 3 - src/libsyntax/ext/expand.rs | 45 ++---- src/libsyntax/parse/parser.rs | 129 +++++------------- .../rfcs/rfc-2151-raw-identifiers/macros.rs | 2 +- src/test/ui/issues/issue-10536.rs | 8 +- src/test/ui/issues/issue-10536.stderr | 38 +----- .../ui/parser/macro-bad-delimiter-ident.rs | 2 +- .../parser/macro-bad-delimiter-ident.stderr | 6 +- src/test/ui/user-defined-macro-rules.rs | 10 +- src/test/ui/user-defined-macro-rules.stderr | 8 -- 11 files changed, 70 insertions(+), 186 deletions(-) delete mode 100644 src/test/ui/user-defined-macro-rules.stderr diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin/registry.rs index 16d484e2a98f2..640662d7733e7 100644 --- a/src/librustc_plugin/registry.rs +++ b/src/librustc_plugin/registry.rs @@ -6,7 +6,7 @@ use rustc::util::nodemap::FxHashMap; use syntax::ext::base::{SyntaxExtension, SyntaxExtensionKind, NamedSyntaxExtension}; use syntax::ext::base::MacroExpanderFn; -use syntax::symbol::{Symbol, sym}; +use syntax::symbol::Symbol; use syntax::ast; use syntax::feature_gate::AttributeType; use syntax_pos::Span; @@ -85,9 +85,6 @@ impl<'a> Registry<'a> { /// /// This is the most general hook into `libsyntax`'s expansion behavior. pub fn register_syntax_extension(&mut self, name: ast::Name, mut extension: SyntaxExtension) { - if name == sym::macro_rules { - panic!("user-defined macros may not be named `macro_rules`"); - } if extension.def_info.is_none() { extension.def_info = Some((ast::CRATE_NODE_ID, self.krate_span)); } diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs index 392a46a262f50..68e842c5e5495 100644 --- a/src/librustc_resolve/macros.rs +++ b/src/librustc_resolve/macros.rs @@ -1109,9 +1109,6 @@ impl<'a> Resolver<'a> { current_legacy_scope: &mut LegacyScope<'a>) { self.local_macro_def_scopes.insert(item.id, self.current_module); let ident = item.ident; - if ident.name == sym::macro_rules { - self.session.span_err(item.span, "user-defined macros may not be named `macro_rules`"); - } let def_id = self.definitions.local_def_id(item.id); let ext = Lrc::new(macro_rules::compile(&self.session.parse_sess, diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 5473f55aa3370..f7a4ae98d674d 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -13,8 +13,7 @@ use crate::parse::{DirectoryOwnership, PResult, ParseSess}; use crate::parse::token; use crate::parse::parser::Parser; use crate::ptr::P; -use crate::symbol::Symbol; -use crate::symbol::{kw, sym}; +use crate::symbol::{sym, Symbol}; use crate::tokenstream::{TokenStream, TokenTree}; use crate::visit::{self, Visitor}; use crate::util::map_in_place::MapInPlace; @@ -197,7 +196,6 @@ pub struct Invocation { pub enum InvocationKind { Bang { mac: ast::Mac, - ident: Option, span: Span, }, Attr { @@ -664,13 +662,12 @@ impl<'a, 'b> MacroExpander<'a, 'b> { ext: &SyntaxExtension) -> Option { let kind = invoc.fragment_kind; - let (mac, ident, span) = match invoc.kind { - InvocationKind::Bang { mac, ident, span } => (mac, ident, span), + let (mac, span) = match invoc.kind { + InvocationKind::Bang { mac, span } => (mac, span), _ => unreachable!(), }; let path = &mac.node.path; - let ident = ident.unwrap_or_else(|| Ident::invalid()); let validate = |this: &mut Self| { // feature-gate the macro invocation if let Some((feature, issue)) = ext.unstable_feature { @@ -690,12 +687,6 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } } - if ident.name != kw::Invalid { - let msg = format!("macro {}! expects no ident argument, given '{}'", path, ident); - this.cx.span_err(path.span, &msg); - this.cx.trace_macros_diag(); - return Err(kind.dummy(span)); - } Ok(()) }; @@ -729,19 +720,11 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } SyntaxExtensionKind::Bang(expander) => { - if ident.name != kw::Invalid { - let msg = - format!("macro {}! expects no ident argument, given '{}'", path, ident); - self.cx.span_err(path.span, &msg); - self.cx.trace_macros_diag(); - kind.dummy(span) - } else { - self.gate_proc_macro_expansion_kind(span, kind); - let tok_result = expander.expand(self.cx, span, mac.node.stream()); - let result = self.parse_ast_fragment(tok_result, kind, path, span); - self.gate_proc_macro_expansion(span, &result); - result - } + self.gate_proc_macro_expansion_kind(span, kind); + let tok_result = expander.expand(self.cx, span, mac.node.stream()); + let result = self.parse_ast_fragment(tok_result, kind, path, span); + self.gate_proc_macro_expansion(span, &result); + result } }; @@ -944,7 +927,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> { } fn collect_bang(&mut self, mac: ast::Mac, span: Span, kind: AstFragmentKind) -> AstFragment { - self.collect(kind, InvocationKind::Bang { mac, ident: None, span }) + self.collect(kind, InvocationKind::Bang { mac, span }) } fn collect_attr(&mut self, @@ -1179,13 +1162,9 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { ast::ItemKind::Mac(..) => { self.check_attributes(&item.attrs); item.and_then(|item| match item.node { - ItemKind::Mac(mac) => { - self.collect(AstFragmentKind::Items, InvocationKind::Bang { - mac, - ident: Some(item.ident), - span: item.span, - }).make_items() - } + ItemKind::Mac(mac) => self.collect( + AstFragmentKind::Items, InvocationKind::Bang { mac, span: item.span } + ).make_items(), _ => unreachable!(), }) } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index fc206580e3811..cbecdb0738b39 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4353,8 +4353,9 @@ impl<'a> Parser<'a> { (ident, ast::MacroDef { tokens: tokens.into(), legacy: false }) } - token::Ident(name, _) if name == sym::macro_rules && - self.look_ahead(1, |t| *t == token::Not) => { + token::Ident(name, false) if name == sym::macro_rules && + self.look_ahead(1, |t| *t == token::Not) && + self.look_ahead(2, |t| t.is_ident()) => { let prev_span = self.prev_span; self.complain_if_pub_macro(&vis.node, prev_span); self.bump(); @@ -4434,34 +4435,6 @@ impl<'a> Parser<'a> { })); } - // it's a macro invocation - let id = match self.token.kind { - token::OpenDelim(_) => Ident::invalid(), // no special identifier - _ => self.parse_ident()?, - }; - - // check that we're pointing at delimiters (need to check - // again after the `if`, because of `parse_ident` - // consuming more tokens). - match self.token.kind { - token::OpenDelim(_) => {} - _ => { - // we only expect an ident if we didn't parse one - // above. - let ident_str = if id.name == kw::Invalid { - "identifier, " - } else { - "" - }; - let tok_str = self.this_token_descr(); - let mut err = self.fatal(&format!("expected {}`(` or `{{`, found {}", - ident_str, - tok_str)); - err.span_label(self.token.span, format!("expected {}`(` or `{{`", ident_str)); - return Err(err) - }, - } - let (delim, tts) = self.expect_delimited_token_tree()?; let hi = self.prev_span; @@ -4471,59 +4444,38 @@ impl<'a> Parser<'a> { MacStmtStyle::NoBraces }; - if id.name == kw::Invalid { - let mac = respan(lo.to(hi), Mac_ { path: pth, tts, delim }); - let node = if delim == MacDelimiter::Brace || - self.token == token::Semi || self.token == token::Eof { - StmtKind::Mac(P((mac, style, attrs.into()))) - } - // We used to incorrectly stop parsing macro-expanded statements here. - // If the next token will be an error anyway but could have parsed with the - // earlier behavior, stop parsing here and emit a warning to avoid breakage. - else if macro_legacy_warnings && - self.token.can_begin_expr() && - match self.token.kind { - // These can continue an expression, so we can't stop parsing and warn. - token::OpenDelim(token::Paren) | token::OpenDelim(token::Bracket) | - token::BinOp(token::Minus) | token::BinOp(token::Star) | - token::BinOp(token::And) | token::BinOp(token::Or) | - token::AndAnd | token::OrOr | - token::DotDot | token::DotDotDot | token::DotDotEq => false, - _ => true, - } { - self.warn_missing_semicolon(); - StmtKind::Mac(P((mac, style, attrs.into()))) - } else { - let e = self.mk_expr(mac.span, ExprKind::Mac(mac), ThinVec::new()); - let e = self.maybe_recover_from_bad_qpath(e, true)?; - let e = self.parse_dot_or_call_expr_with(e, lo, attrs.into())?; - let e = self.parse_assoc_expr_with(0, LhsExpr::AlreadyParsed(e))?; - StmtKind::Expr(e) - }; - Stmt { - id: ast::DUMMY_NODE_ID, - span: lo.to(hi), - node, - } + let mac = respan(lo.to(hi), Mac_ { path: pth, tts, delim }); + let node = if delim == MacDelimiter::Brace || + self.token == token::Semi || self.token == token::Eof { + StmtKind::Mac(P((mac, style, attrs.into()))) + } + // We used to incorrectly stop parsing macro-expanded statements here. + // If the next token will be an error anyway but could have parsed with the + // earlier behavior, stop parsing here and emit a warning to avoid breakage. + else if macro_legacy_warnings && + self.token.can_begin_expr() && + match self.token.kind { + // These can continue an expression, so we can't stop parsing and warn. + token::OpenDelim(token::Paren) | token::OpenDelim(token::Bracket) | + token::BinOp(token::Minus) | token::BinOp(token::Star) | + token::BinOp(token::And) | token::BinOp(token::Or) | + token::AndAnd | token::OrOr | + token::DotDot | token::DotDotDot | token::DotDotEq => false, + _ => true, + } { + self.warn_missing_semicolon(); + StmtKind::Mac(P((mac, style, attrs.into()))) } else { - // if it has a special ident, it's definitely an item - // - // Require a semicolon or braces. - if style != MacStmtStyle::Braces && !self.eat(&token::Semi) { - self.report_invalid_macro_expansion_item(); - } - let span = lo.to(hi); - Stmt { - id: ast::DUMMY_NODE_ID, - span, - node: StmtKind::Item({ - self.mk_item( - span, id /*id is good here*/, - ItemKind::Mac(respan(span, Mac_ { path: pth, tts, delim })), - respan(lo, VisibilityKind::Inherited), - attrs) - }), - } + let e = self.mk_expr(mac.span, ExprKind::Mac(mac), ThinVec::new()); + let e = self.maybe_recover_from_bad_qpath(e, true)?; + let e = self.parse_dot_or_call_expr_with(e, lo, attrs.into())?; + let e = self.parse_assoc_expr_with(0, LhsExpr::AlreadyParsed(e))?; + StmtKind::Expr(e) + }; + Stmt { + id: ast::DUMMY_NODE_ID, + span: lo.to(hi), + node, } } else { // FIXME: Bad copy of attrs @@ -7611,16 +7563,6 @@ impl<'a> Parser<'a> { // item macro. let pth = self.parse_path(PathStyle::Mod)?; self.expect(&token::Not)?; - - // a 'special' identifier (like what `macro_rules!` uses) - // is optional. We should eventually unify invoc syntax - // and remove this. - let id = if self.token.is_ident() { - self.parse_ident()? - } else { - Ident::invalid() // no special identifier - }; - // eat a matched-delimiter token tree: let (delim, tts) = self.expect_delimited_token_tree()?; if delim != MacDelimiter::Brace && !self.eat(&token::Semi) { self.report_invalid_macro_expansion_item(); @@ -7628,7 +7570,8 @@ impl<'a> Parser<'a> { let hi = self.prev_span; let mac = respan(mac_lo.to(hi), Mac_ { path: pth, tts, delim }); - let item = self.mk_item(lo.to(hi), id, ItemKind::Mac(mac), visibility, attrs); + let item = + self.mk_item(lo.to(hi), Ident::invalid(), ItemKind::Mac(mac), visibility, attrs); return Ok(Some(item)); } diff --git a/src/test/run-pass/rfcs/rfc-2151-raw-identifiers/macros.rs b/src/test/run-pass/rfcs/rfc-2151-raw-identifiers/macros.rs index 51a3b46d4619b..0ab7e17f87b5a 100644 --- a/src/test/run-pass/rfcs/rfc-2151-raw-identifiers/macros.rs +++ b/src/test/run-pass/rfcs/rfc-2151-raw-identifiers/macros.rs @@ -1,7 +1,7 @@ // run-pass #![feature(decl_macro)] -r#macro_rules! r#struct { +macro_rules! r#struct { ($r#struct:expr) => { $r#struct } } diff --git a/src/test/ui/issues/issue-10536.rs b/src/test/ui/issues/issue-10536.rs index ceb44ecf7f583..111078abb3700 100644 --- a/src/test/ui/issues/issue-10536.rs +++ b/src/test/ui/issues/issue-10536.rs @@ -11,13 +11,9 @@ macro_rules! foo{ pub fn main() { foo!(); - assert!({one! two()}); - //~^ ERROR macros that expand to items - //~| ERROR cannot find macro `one!` in this scope - //~| ERROR mismatched types + assert!({one! two()}); //~ ERROR expected open delimiter // regardless of whether nested macro_rules works, the following should at // least throw a conventional error. - assert!({one! two}); - //~^ ERROR expected `(` or `{`, found `}` + assert!({one! two}); //~ ERROR expected open delimiter } diff --git a/src/test/ui/issues/issue-10536.stderr b/src/test/ui/issues/issue-10536.stderr index 584cdf43a8f4b..73f948107f185 100644 --- a/src/test/ui/issues/issue-10536.stderr +++ b/src/test/ui/issues/issue-10536.stderr @@ -1,38 +1,14 @@ -error: macros that expand to items must be delimited with braces or followed by a semicolon - --> $DIR/issue-10536.rs:14:22 +error: expected open delimiter + --> $DIR/issue-10536.rs:14:19 | LL | assert!({one! two()}); - | ^^ -help: change the delimiters to curly braces - | -LL | assert!({one! two {}}); - | ^^ -help: add a semicolon - | -LL | assert!({one! two();}); - | ^ + | ^^^ expected open delimiter -error: expected `(` or `{`, found `}` - --> $DIR/issue-10536.rs:21:22 +error: expected open delimiter + --> $DIR/issue-10536.rs:18:19 | LL | assert!({one! two}); - | ^ expected `(` or `{` - -error: cannot find macro `one!` in this scope - --> $DIR/issue-10536.rs:14:14 - | -LL | assert!({one! two()}); - | ^^^ - -error[E0308]: mismatched types - --> $DIR/issue-10536.rs:14:13 - | -LL | assert!({one! two()}); - | ^^^^^^^^^^^^ expected bool, found () - | - = note: expected type `bool` - found type `()` + | ^^^ expected open delimiter -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/macro-bad-delimiter-ident.rs b/src/test/ui/parser/macro-bad-delimiter-ident.rs index 987c955d1dc38..13dec95435be0 100644 --- a/src/test/ui/parser/macro-bad-delimiter-ident.rs +++ b/src/test/ui/parser/macro-bad-delimiter-ident.rs @@ -1,3 +1,3 @@ fn main() { - foo! bar < //~ ERROR expected `(` or `{`, found `<` + foo! bar < //~ ERROR expected open delimiter } diff --git a/src/test/ui/parser/macro-bad-delimiter-ident.stderr b/src/test/ui/parser/macro-bad-delimiter-ident.stderr index 6a17d39e8bfec..e97839a4f4a52 100644 --- a/src/test/ui/parser/macro-bad-delimiter-ident.stderr +++ b/src/test/ui/parser/macro-bad-delimiter-ident.stderr @@ -1,8 +1,8 @@ -error: expected `(` or `{`, found `<` - --> $DIR/macro-bad-delimiter-ident.rs:2:14 +error: expected open delimiter + --> $DIR/macro-bad-delimiter-ident.rs:2:10 | LL | foo! bar < - | ^ expected `(` or `{` + | ^^^ expected open delimiter error: aborting due to previous error diff --git a/src/test/ui/user-defined-macro-rules.rs b/src/test/ui/user-defined-macro-rules.rs index 31bfdd025d99d..09e071ec45420 100644 --- a/src/test/ui/user-defined-macro-rules.rs +++ b/src/test/ui/user-defined-macro-rules.rs @@ -1,5 +1,9 @@ -#![allow(unused_macros)] +// check-pass -macro_rules! macro_rules { () => {} } //~ ERROR user-defined macros may not be named `macro_rules` +macro_rules! macro_rules { () => { struct S; } } // OK -fn main() {} +macro_rules! {} // OK, calls the macro defined above + +fn main() { + let s = S; +} diff --git a/src/test/ui/user-defined-macro-rules.stderr b/src/test/ui/user-defined-macro-rules.stderr deleted file mode 100644 index 057515228e0d1..0000000000000 --- a/src/test/ui/user-defined-macro-rules.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: user-defined macros may not be named `macro_rules` - --> $DIR/user-defined-macro-rules.rs:3:1 - | -LL | macro_rules! macro_rules { () => {} } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - From d0dc41a2bdd45531e9d5ef9364027763158b4b85 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 1 Jul 2019 12:20:44 +0300 Subject: [PATCH 05/31] Address review comments --- src/libsyntax/parse/parser.rs | 93 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index cbecdb0738b39..01b642fc96f7e 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4324,52 +4324,49 @@ impl<'a> Parser<'a> { fn eat_macro_def(&mut self, attrs: &[Attribute], vis: &Visibility, lo: Span) -> PResult<'a, Option>> { let token_lo = self.token.span; - let (ident, def) = match self.token.kind { - token::Ident(name, false) if name == kw::Macro => { - self.bump(); - let ident = self.parse_ident()?; - let tokens = if self.check(&token::OpenDelim(token::Brace)) { - match self.parse_token_tree() { - TokenTree::Delimited(_, _, tts) => tts, - _ => unreachable!(), - } - } else if self.check(&token::OpenDelim(token::Paren)) { - let args = self.parse_token_tree(); - let body = if self.check(&token::OpenDelim(token::Brace)) { - self.parse_token_tree() - } else { - self.unexpected()?; - unreachable!() - }; - TokenStream::new(vec![ - args.into(), - TokenTree::token(token::FatArrow, token_lo.to(self.prev_span)).into(), - body.into(), - ]) + let (ident, def) = if self.eat_keyword(kw::Macro) { + let ident = self.parse_ident()?; + let tokens = if self.check(&token::OpenDelim(token::Brace)) { + match self.parse_token_tree() { + TokenTree::Delimited(_, _, tts) => tts, + _ => unreachable!(), + } + } else if self.check(&token::OpenDelim(token::Paren)) { + let args = self.parse_token_tree(); + let body = if self.check(&token::OpenDelim(token::Brace)) { + self.parse_token_tree() } else { self.unexpected()?; unreachable!() }; + TokenStream::new(vec![ + args.into(), + TokenTree::token(token::FatArrow, token_lo.to(self.prev_span)).into(), + body.into(), + ]) + } else { + self.unexpected()?; + unreachable!() + }; - (ident, ast::MacroDef { tokens: tokens.into(), legacy: false }) - } - token::Ident(name, false) if name == sym::macro_rules && - self.look_ahead(1, |t| *t == token::Not) && - self.look_ahead(2, |t| t.is_ident()) => { - let prev_span = self.prev_span; - self.complain_if_pub_macro(&vis.node, prev_span); - self.bump(); - self.bump(); - - let ident = self.parse_ident()?; - let (delim, tokens) = self.expect_delimited_token_tree()?; - if delim != MacDelimiter::Brace && !self.eat(&token::Semi) { - self.report_invalid_macro_expansion_item(); - } + (ident, ast::MacroDef { tokens: tokens.into(), legacy: false }) + } else if self.check_keyword(sym::macro_rules) && + self.look_ahead(1, |t| *t == token::Not) && + self.look_ahead(2, |t| t.is_ident()) { + let prev_span = self.prev_span; + self.complain_if_pub_macro(&vis.node, prev_span); + self.bump(); + self.bump(); - (ident, ast::MacroDef { tokens, legacy: true }) + let ident = self.parse_ident()?; + let (delim, tokens) = self.expect_delimited_token_tree()?; + if delim != MacDelimiter::Brace && !self.eat(&token::Semi) { + self.report_invalid_macro_expansion_item(); } - _ => return Ok(None), + + (ident, ast::MacroDef { tokens, legacy: true }) + } else { + return Ok(None); }; let span = lo.to(self.prev_span); @@ -4413,14 +4410,14 @@ impl<'a> Parser<'a> { !self.is_existential_type_decl() && !self.is_auto_trait_item() && !self.is_async_fn() { - let pth = self.parse_path(PathStyle::Expr)?; + let path = self.parse_path(PathStyle::Expr)?; if !self.eat(&token::Not) { let expr = if self.check(&token::OpenDelim(token::Brace)) { - self.parse_struct_expr(lo, pth, ThinVec::new())? + self.parse_struct_expr(lo, path, ThinVec::new())? } else { let hi = self.prev_span; - self.mk_expr(lo.to(hi), ExprKind::Path(None, pth), ThinVec::new()) + self.mk_expr(lo.to(hi), ExprKind::Path(None, path), ThinVec::new()) }; let expr = self.with_res(Restrictions::STMT_EXPR, |this| { @@ -4444,7 +4441,7 @@ impl<'a> Parser<'a> { MacStmtStyle::NoBraces }; - let mac = respan(lo.to(hi), Mac_ { path: pth, tts, delim }); + let mac = respan(lo.to(hi), Mac_ { path, tts, delim }); let node = if delim == MacDelimiter::Brace || self.token == token::Semi || self.token == token::Eof { StmtKind::Mac(P((mac, style, attrs.into()))) @@ -7561,7 +7558,7 @@ impl<'a> Parser<'a> { let mac_lo = self.token.span; // item macro. - let pth = self.parse_path(PathStyle::Mod)?; + let path = self.parse_path(PathStyle::Mod)?; self.expect(&token::Not)?; let (delim, tts) = self.expect_delimited_token_tree()?; if delim != MacDelimiter::Brace && !self.eat(&token::Semi) { @@ -7569,7 +7566,7 @@ impl<'a> Parser<'a> { } let hi = self.prev_span; - let mac = respan(mac_lo.to(hi), Mac_ { path: pth, tts, delim }); + let mac = respan(mac_lo.to(hi), Mac_ { path, tts, delim }); let item = self.mk_item(lo.to(hi), Ident::invalid(), ItemKind::Mac(mac), visibility, attrs); return Ok(Some(item)); @@ -7597,9 +7594,9 @@ impl<'a> Parser<'a> { !(self.is_async_fn() && self.token.span.rust_2015()) { let prev_span = self.prev_span; let lo = self.token.span; - let pth = self.parse_path(PathStyle::Mod)?; + let path = self.parse_path(PathStyle::Mod)?; - if pth.segments.len() == 1 { + if path.segments.len() == 1 { if !self.eat(&token::Not) { return Err(self.missing_assoc_item_kind_err(item_kind, prev_span)); } @@ -7619,7 +7616,7 @@ impl<'a> Parser<'a> { self.expect(&token::Semi)?; } - Ok(Some(respan(lo.to(self.prev_span), Mac_ { path: pth, tts, delim }))) + Ok(Some(respan(lo.to(self.prev_span), Mac_ { path, tts, delim }))) } else { Ok(None) } From 8d6b1d10d48c3d189718c46c3b6441c2b7a0598b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 16 Apr 2019 10:45:01 +0200 Subject: [PATCH 06/31] Clean up inherent_impls --- .../coherence/inherent_impls.rs | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/librustc_typeck/coherence/inherent_impls.rs b/src/librustc_typeck/coherence/inherent_impls.rs index 6088c03fc0681..0b04160522047 100644 --- a/src/librustc_typeck/coherence/inherent_impls.rs +++ b/src/librustc_typeck/coherence/inherent_impls.rs @@ -7,7 +7,6 @@ //! `tcx.inherent_impls(def_id)`). That value, however, //! is computed by selecting an idea from this table. -use rustc::dep_graph::DepKind; use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; use rustc::hir; use rustc::hir::itemlikevisit::ItemLikeVisitor; @@ -36,35 +35,11 @@ pub fn crate_inherent_impls<'tcx>( pub fn inherent_impls<'tcx>(tcx: TyCtxt<'tcx>, ty_def_id: DefId) -> &'tcx [DefId] { assert!(ty_def_id.is_local()); - // NB. Until we adopt the red-green dep-tracking algorithm (see - // [the plan] for details on that), we do some hackery here to get - // the dependencies correct. Basically, we use a `with_ignore` to - // read the result we want. If we didn't have the `with_ignore`, - // we would wind up with a dependency on the entire crate, which - // we don't want. Then we go and add dependencies on all the impls - // in the result (which is what we wanted). - // - // The result is a graph with an edge from `Hir(I)` for every impl - // `I` defined on some type `T` to `CoherentInherentImpls(T)`, - // thus ensuring that if any of those impls change, the set of - // inherent impls is considered dirty. - // - // [the plan]: https://github.com/rust-lang/rust-roadmap/issues/4 - - let result = tcx.dep_graph.with_ignore(|| { - let crate_map = tcx.crate_inherent_impls(ty_def_id.krate); - match crate_map.inherent_impls.get(&ty_def_id) { - Some(v) => &v[..], - None => &[], - } - }); - - for &impl_def_id in &result[..] { - let def_path_hash = tcx.def_path_hash(impl_def_id); - tcx.dep_graph.read(def_path_hash.to_dep_node(DepKind::Hir)); + let crate_map = tcx.crate_inherent_impls(ty_def_id.krate); + match crate_map.inherent_impls.get(&ty_def_id) { + Some(v) => &v[..], + None => &[], } - - result } struct InherentCollect<'tcx> { From b49fb76dba02daaac3c6a1133c9bedd0f20f43dc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 1 Jul 2019 23:48:58 +0200 Subject: [PATCH 07/31] miri realloc: do not require giving old size+align --- src/librustc_mir/interpret/memory.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index c3eec677a4850..5b177d05bb862 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -158,8 +158,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> { pub fn reallocate( &mut self, ptr: Pointer, - old_size: Size, - old_align: Align, + old_size_and_align: Option<(Size, Align)>, new_size: Size, new_align: Align, kind: MemoryKind, @@ -171,15 +170,19 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> { // For simplicities' sake, we implement reallocate as "alloc, copy, dealloc". // This happens so rarely, the perf advantage is outweighed by the maintenance cost. let new_ptr = self.allocate(new_size, new_align, kind); + let old_size = match old_size_and_align { + Some((size, _align)) => size, + None => Size::from_bytes(self.get(ptr.alloc_id)?.bytes.len() as u64), + }; self.copy( ptr.into(), - old_align, + Align::from_bytes(1).unwrap(), // old_align anyway gets checked below by `deallocate` new_ptr.into(), new_align, old_size.min(new_size), /*nonoverlapping*/ true, )?; - self.deallocate(ptr, Some((old_size, old_align)), kind)?; + self.deallocate(ptr, old_size_and_align, kind)?; Ok(new_ptr) } @@ -198,7 +201,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> { pub fn deallocate( &mut self, ptr: Pointer, - size_and_align: Option<(Size, Align)>, + old_size_and_align: Option<(Size, Align)>, kind: MemoryKind, ) -> InterpResult<'tcx> { trace!("deallocating: {}", ptr.alloc_id); @@ -232,7 +235,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> { format!("{:?}", kind), )); } - if let Some((size, align)) = size_and_align { + if let Some((size, align)) = old_size_and_align { if size.bytes() != alloc.bytes.len() as u64 || align != alloc.align { let bytes = Size::from_bytes(alloc.bytes.len() as u64); return err!(IncorrectAllocationInformation(size, From 8a3797b73618fb6d7591d194dac22c377b4cd371 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sun, 30 Jun 2019 11:13:41 -0700 Subject: [PATCH 08/31] Use mem::take instead of mem::replace with default --- src/libcore/option.rs | 2 +- src/libproc_macro/bridge/buffer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index eec4b149ddc78..a2eff0200b777 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -845,7 +845,7 @@ impl Option { #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn take(&mut self) -> Option { - mem::replace(self, None) + mem::take(self) } /// Replaces the actual value in the option by the value given in parameter, diff --git a/src/libproc_macro/bridge/buffer.rs b/src/libproc_macro/bridge/buffer.rs index 0d8cc552d61ab..a51e3a9a33d7b 100644 --- a/src/libproc_macro/bridge/buffer.rs +++ b/src/libproc_macro/bridge/buffer.rs @@ -78,7 +78,7 @@ impl Buffer { } pub(super) fn take(&mut self) -> Self { - mem::replace(self, Self::default()) + mem::take(self) } pub(super) fn extend_from_slice(&mut self, xs: &[T]) { From 636f5e6d1120c2bfc264687fbe1e77312c8d2979 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sun, 30 Jun 2019 11:30:01 -0700 Subject: [PATCH 09/31] Convert more usages over --- src/liballoc/collections/btree/map.rs | 4 ++-- src/liballoc/collections/linked_list.rs | 2 +- src/liballoc/str.rs | 2 +- src/librustc/hir/lowering.rs | 4 ++-- src/librustc/infer/nll_relate/mod.rs | 2 +- src/librustc/infer/outlives/obligations.rs | 2 +- src/librustc/infer/region_constraints/mod.rs | 2 +- src/librustc/middle/region.rs | 2 +- src/librustc/middle/resolve_lifetime.rs | 9 ++++----- src/librustc_codegen_llvm/back/archive.rs | 4 ++-- src/librustc_codegen_ssa/back/command.rs | 2 +- src/librustc_codegen_ssa/back/write.rs | 9 +++------ src/librustc_mir/borrow_check/mod.rs | 2 +- src/librustc_mir/build/matches/simplify.rs | 2 +- src/librustc_mir/util/def_use.rs | 2 +- src/librustc_resolve/macros.rs | 6 +++--- src/librustc_resolve/resolve_imports.rs | 2 +- src/librustc_typeck/check/method/probe.rs | 4 ++-- src/librustdoc/clean/mod.rs | 2 +- src/librustdoc/clean/simplify.rs | 2 +- src/librustdoc/html/render.rs | 2 +- src/librustdoc/passes/collapse_docs.rs | 2 +- src/libstd/panicking.rs | 2 +- src/libstd/sync/mpsc/sync.rs | 2 +- src/libstd/sys/windows/pipe.rs | 2 +- src/libsyntax/ext/expand.rs | 2 +- src/libsyntax/ext/tt/transcribe.rs | 2 +- src/libsyntax/parse/parser.rs | 4 ++-- src/libsyntax/test.rs | 4 ++-- src/tools/compiletest/src/runtest.rs | 4 ++-- 30 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 6b079fc87cc78..d9ebc40aa2cb9 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -770,8 +770,8 @@ impl BTreeMap { } // First, we merge `self` and `other` into a sorted sequence in linear time. - let self_iter = mem::replace(self, BTreeMap::new()).into_iter(); - let other_iter = mem::replace(other, BTreeMap::new()).into_iter(); + let self_iter = mem::take(self).into_iter(); + let other_iter = mem::take(other).into_iter(); let iter = MergeIter { left: self_iter.peekable(), right: other_iter.peekable(), diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 40a82d6feaa98..ca9e78bb459ac 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -708,7 +708,7 @@ impl LinkedList { let len = self.len(); assert!(at <= len, "Cannot split off at a nonexistent index"); if at == 0 { - return mem::replace(self, Self::new()); + return mem::take(self); } else if at == len { return Self::new(); } diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index 40104554fe574..70a93157c9ee2 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -203,7 +203,7 @@ impl ToOwned for str { } fn clone_into(&self, target: &mut String) { - let mut b = mem::replace(target, String::new()).into_bytes(); + let mut b = mem::take(target).into_bytes(); self.as_bytes().clone_into(&mut b); *target = unsafe { String::from_utf8_unchecked(b) } } diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 9c4a208f0f9fc..2e7a934a7692c 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1278,8 +1278,8 @@ impl<'a> LoweringContext<'a> { let was_in_loop_condition = self.is_in_loop_condition; self.is_in_loop_condition = false; - let catch_scopes = mem::replace(&mut self.catch_scopes, Vec::new()); - let loop_scopes = mem::replace(&mut self.loop_scopes, Vec::new()); + let catch_scopes = mem::take(&mut self.catch_scopes); + let loop_scopes = mem::take(&mut self.loop_scopes); let ret = f(self); self.catch_scopes = catch_scopes; self.loop_scopes = loop_scopes; diff --git a/src/librustc/infer/nll_relate/mod.rs b/src/librustc/infer/nll_relate/mod.rs index a1a93eb552138..a0621af053783 100644 --- a/src/librustc/infer/nll_relate/mod.rs +++ b/src/librustc/infer/nll_relate/mod.rs @@ -364,7 +364,7 @@ where // been fully instantiated and hence the set of scopes we have // doesn't matter -- just to be sure, put an empty vector // in there. - let old_a_scopes = ::std::mem::replace(pair.vid_scopes(self), vec![]); + let old_a_scopes = ::std::mem::take(pair.vid_scopes(self)); // Relate the generalized kind to the original one. let result = pair.relate_generalized_ty(self, generalized_ty); diff --git a/src/librustc/infer/outlives/obligations.rs b/src/librustc/infer/outlives/obligations.rs index 0ae4446ee63fa..e1470e4ef0232 100644 --- a/src/librustc/infer/outlives/obligations.rs +++ b/src/librustc/infer/outlives/obligations.rs @@ -112,7 +112,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> { /// Trait queries just want to pass back type obligations "as is" pub fn take_registered_region_obligations(&self) -> Vec<(hir::HirId, RegionObligation<'tcx>)> { - ::std::mem::replace(&mut *self.region_obligations.borrow_mut(), vec![]) + ::std::mem::take(&mut *self.region_obligations.borrow_mut()) } /// Process the region obligations that must be proven (during diff --git a/src/librustc/infer/region_constraints/mod.rs b/src/librustc/infer/region_constraints/mod.rs index f2235fe8d6d12..b27c39c4f71b6 100644 --- a/src/librustc/infer/region_constraints/mod.rs +++ b/src/librustc/infer/region_constraints/mod.rs @@ -410,7 +410,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> { *any_unifications = false; } - mem::replace(data, RegionConstraintData::default()) + mem::take(data) } pub fn data(&self) -> &RegionConstraintData<'tcx> { diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 114684b152402..1a188bad11bd5 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -1375,7 +1375,7 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> { let outer_ec = mem::replace(&mut self.expr_and_pat_count, 0); let outer_cx = self.cx; - let outer_ts = mem::replace(&mut self.terminating_scopes, FxHashSet::default()); + let outer_ts = mem::take(&mut self.terminating_scopes); self.terminating_scopes.insert(body.value.hir_id.local_id); if let Some(root_id) = self.cx.root_id { diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index 412346bab257e..dada3a87be514 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -18,7 +18,7 @@ use errors::{Applicability, DiagnosticBuilder}; use rustc_macros::HashStable; use std::borrow::Cow; use std::cell::Cell; -use std::mem::replace; +use std::mem::{replace, take}; use syntax::ast; use syntax::attr; use syntax::ptr::P; @@ -441,7 +441,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> { fn visit_nested_body(&mut self, body: hir::BodyId) { // Each body has their own set of labels, save labels. - let saved = replace(&mut self.labels_in_fn, vec![]); + let saved = take(&mut self.labels_in_fn); let body = self.tcx.hir().body(body); extract_labels(self, body); self.with( @@ -1405,9 +1405,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> { lifetime_uses, .. } = self; - let labels_in_fn = replace(&mut self.labels_in_fn, vec![]); - let xcrate_object_lifetime_defaults = - replace(&mut self.xcrate_object_lifetime_defaults, DefIdMap::default()); + let labels_in_fn = take(&mut self.labels_in_fn); + let xcrate_object_lifetime_defaults = take(&mut self.xcrate_object_lifetime_defaults); let mut this = LifetimeContext { tcx: *tcx, map: map, diff --git a/src/librustc_codegen_llvm/back/archive.rs b/src/librustc_codegen_llvm/back/archive.rs index e0e26e9af2537..ca3b2b84655e2 100644 --- a/src/librustc_codegen_llvm/back/archive.rs +++ b/src/librustc_codegen_llvm/back/archive.rs @@ -205,8 +205,8 @@ impl<'a> LlvmArchiveBuilder<'a> { } fn build_with_llvm(&mut self, kind: ArchiveKind) -> io::Result<()> { - let removals = mem::replace(&mut self.removals, Vec::new()); - let mut additions = mem::replace(&mut self.additions, Vec::new()); + let removals = mem::take(&mut self.removals); + let mut additions = mem::take(&mut self.additions); let mut strings = Vec::new(); let mut members = Vec::new(); diff --git a/src/librustc_codegen_ssa/back/command.rs b/src/librustc_codegen_ssa/back/command.rs index 78570cce57dd9..d610805b5bbd0 100644 --- a/src/librustc_codegen_ssa/back/command.rs +++ b/src/librustc_codegen_ssa/back/command.rs @@ -110,7 +110,7 @@ impl Command { } pub fn take_args(&mut self) -> Vec { - mem::replace(&mut self.args, Vec::new()) + mem::take(&mut self.args) } /// Returns a `true` if we're pretty sure that this'll blow OS spawn limits, diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs index 309187ca2eaa3..5ca38273269f3 100644 --- a/src/librustc_codegen_ssa/back/write.rs +++ b/src/librustc_codegen_ssa/back/write.rs @@ -1345,12 +1345,9 @@ fn start_executing_work( assert!(!started_lto); started_lto = true; - let needs_fat_lto = - mem::replace(&mut needs_fat_lto, Vec::new()); - let needs_thin_lto = - mem::replace(&mut needs_thin_lto, Vec::new()); - let import_only_modules = - mem::replace(&mut lto_import_only_modules, Vec::new()); + let needs_fat_lto = mem::take(&mut needs_fat_lto); + let needs_thin_lto = mem::take(&mut needs_thin_lto); + let import_only_modules = mem::take(&mut lto_import_only_modules); for (work, cost) in generate_lto_work(&cgcx, needs_fat_lto, needs_thin_lto, import_only_modules) { diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 4872440f5bd4a..58009167e3c3f 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -275,7 +275,7 @@ fn do_mir_borrowck<'a, 'tcx>( mbcx.analyze_results(&mut state); // entry point for DataflowResultsConsumer // Convert any reservation warnings into lints. - let reservation_warnings = mem::replace(&mut mbcx.reservation_warnings, Default::default()); + let reservation_warnings = mem::take(&mut mbcx.reservation_warnings); for (_, (place, span, location, bk, borrow)) in reservation_warnings { let mut initial_diag = mbcx.report_conflicting_borrow(location, (&place, span), bk, &borrow); diff --git a/src/librustc_mir/build/matches/simplify.rs b/src/librustc_mir/build/matches/simplify.rs index b1b5233fbc875..7125eb6850bb6 100644 --- a/src/librustc_mir/build/matches/simplify.rs +++ b/src/librustc_mir/build/matches/simplify.rs @@ -28,7 +28,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { candidate: &mut Candidate<'pat, 'tcx>) { // repeatedly simplify match pairs until fixed point is reached loop { - let match_pairs = mem::replace(&mut candidate.match_pairs, vec![]); + let match_pairs = mem::take(&mut candidate.match_pairs); let mut changed = false; for match_pair in match_pairs { match self.simplify_match_pair(match_pair, candidate) { diff --git a/src/librustc_mir/util/def_use.rs b/src/librustc_mir/util/def_use.rs index fac752dbf023e..59821440c6619 100644 --- a/src/librustc_mir/util/def_use.rs +++ b/src/librustc_mir/util/def_use.rs @@ -31,7 +31,7 @@ impl DefUseAnalysis { self.clear(); let mut finder = DefUseFinder { - info: mem::replace(&mut self.info, IndexVec::new()), + info: mem::take(&mut self.info), }; finder.visit_body(body); self.info = finder.info diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs index 392a46a262f50..c544b3f46030b 100644 --- a/src/librustc_resolve/macros.rs +++ b/src/librustc_resolve/macros.rs @@ -946,7 +946,7 @@ impl<'a> Resolver<'a> { }; let macro_resolutions = - mem::replace(&mut *module.multi_segment_macro_resolutions.borrow_mut(), Vec::new()); + mem::take(&mut *module.multi_segment_macro_resolutions.borrow_mut()); for (mut path, path_span, kind, parent_scope, initial_res) in macro_resolutions { // FIXME: Path resolution will ICE if segment IDs present. for seg in &mut path { seg.id = None; } @@ -973,7 +973,7 @@ impl<'a> Resolver<'a> { } let macro_resolutions = - mem::replace(&mut *module.single_segment_macro_resolutions.borrow_mut(), Vec::new()); + mem::take(&mut *module.single_segment_macro_resolutions.borrow_mut()); for (ident, kind, parent_scope, initial_binding) in macro_resolutions { match self.early_resolve_ident_in_lexical_scope(ident, ScopeSet::Macro(kind), &parent_scope, true, true, ident.span) { @@ -998,7 +998,7 @@ impl<'a> Resolver<'a> { } } - let builtin_attrs = mem::replace(&mut *module.builtin_attrs.borrow_mut(), Vec::new()); + let builtin_attrs = mem::take(&mut *module.builtin_attrs.borrow_mut()); for (ident, parent_scope) in builtin_attrs { let _ = self.early_resolve_ident_in_lexical_scope( ident, ScopeSet::Macro(MacroKind::Attr), &parent_scope, true, true, ident.span diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index f69849bb4a9ee..404d728d8808c 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -682,7 +682,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> { let mut prev_num_indeterminates = self.indeterminate_imports.len() + 1; while self.indeterminate_imports.len() < prev_num_indeterminates { prev_num_indeterminates = self.indeterminate_imports.len(); - for import in mem::replace(&mut self.indeterminate_imports, Vec::new()) { + for import in mem::take(&mut self.indeterminate_imports) { match self.resolve_import(&import) { true => self.determined_imports.push(import), false => self.indeterminate_imports.push(import), diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index 661883f2ac11d..bd4cf9d208684 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -970,9 +970,9 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> { debug!("pick: actual search failed, assemble diagnotics"); - let static_candidates = mem::replace(&mut self.static_candidates, vec![]); + let static_candidates = mem::take(&mut self.static_candidates); let private_candidate = self.private_candidate.take(); - let unsatisfied_predicates = mem::replace(&mut self.unsatisfied_predicates, vec![]); + let unsatisfied_predicates = mem::take(&mut self.unsatisfied_predicates); // things failed, so lets look at all traits, for diagnostic purposes now: self.reset(); diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 3fe048a6986bb..8fec433e56de6 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -4408,7 +4408,7 @@ pub fn enter_impl_trait(cx: &DocContext<'_>, f: F) -> R where F: FnOnce() -> R, { - let old_bounds = mem::replace(&mut *cx.impl_trait_bounds.borrow_mut(), Default::default()); + let old_bounds = mem::take(&mut *cx.impl_trait_bounds.borrow_mut()); let r = f(); assert!(cx.impl_trait_bounds.borrow().is_empty()); *cx.impl_trait_bounds.borrow_mut() = old_bounds; diff --git a/src/librustdoc/clean/simplify.rs b/src/librustdoc/clean/simplify.rs index 36e6a6003df09..e4fba73b8205a 100644 --- a/src/librustdoc/clean/simplify.rs +++ b/src/librustdoc/clean/simplify.rs @@ -131,7 +131,7 @@ pub fn ty_params(mut params: Vec) -> Vec { - *bounds = ty_bounds(mem::replace(bounds, Vec::new())); + *bounds = ty_bounds(mem::take(bounds)); } _ => panic!("expected only type parameters"), } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2080637ecb402..2d6503c944560 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -660,7 +660,7 @@ pub fn run(mut krate: clean::Crate, deref_trait_did, deref_mut_trait_did, owned_box_did, - masked_crates: mem::replace(&mut krate.masked_crates, Default::default()), + masked_crates: mem::take(&mut krate.masked_crates), param_names: external_param_names, aliases: Default::default(), }; diff --git a/src/librustdoc/passes/collapse_docs.rs b/src/librustdoc/passes/collapse_docs.rs index 8666ba357b832..e15a95e2e1a32 100644 --- a/src/librustdoc/passes/collapse_docs.rs +++ b/src/librustdoc/passes/collapse_docs.rs @@ -46,7 +46,7 @@ fn collapse(doc_strings: &mut Vec) { let mut docs = vec![]; let mut last_frag: Option = None; - for frag in replace(doc_strings, vec![]) { + for frag in take(doc_strings) { if let Some(mut curr_frag) = last_frag.take() { let curr_kind = curr_frag.kind(); let new_kind = frag.kind(); diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 797d85e941d96..952fd9ebfdf07 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -364,7 +364,7 @@ fn continue_panic_fmt(info: &PanicInfo<'_>) -> ! { unsafe impl<'a> BoxMeUp for PanicPayload<'a> { fn box_me_up(&mut self) -> *mut (dyn Any + Send) { - let contents = mem::replace(self.fill(), String::new()); + let contents = mem::take(self.fill()); Box::into_raw(Box::new(contents)) } diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index 3c4f8e077c922..f8fcd3ff5a5bc 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -383,7 +383,7 @@ impl Packet { // needs to be careful to destroy the data *outside* of the lock to // prevent deadlock. let _data = if guard.cap != 0 { - mem::replace(&mut guard.buf.buf, Vec::new()) + mem::take(&mut guard.buf.buf) } else { Vec::new() }; diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs index 493ee8a9a2d7c..c77f30dfc7109 100644 --- a/src/libstd/sys/windows/pipe.rs +++ b/src/libstd/sys/windows/pipe.rs @@ -342,7 +342,7 @@ impl<'a> Drop for AsyncPipe<'a> { // If anything here fails, there's not really much we can do, so we leak // the buffer/OVERLAPPED pointers to ensure we're at least memory safe. if self.pipe.cancel_io().is_err() || self.result().is_err() { - let buf = mem::replace(self.dst, Vec::new()); + let buf = mem::take(self.dst); let overlapped = Box::new(unsafe { mem::zeroed() }); let overlapped = mem::replace(&mut self.overlapped, overlapped); mem::forget((buf, overlapped)); diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 5473f55aa3370..c0f721b466e91 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -307,7 +307,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } else { self.resolve_imports(); if undetermined_invocations.is_empty() { break } - invocations = mem::replace(&mut undetermined_invocations, Vec::new()); + invocations = mem::take(&mut undetermined_invocations); force = !mem::replace(&mut progress, false); continue }; diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index ea7f8e356aa63..e04fd2ddc05bc 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -249,7 +249,7 @@ pub fn transcribe( quoted::TokenTree::Delimited(mut span, delimited) => { span = span.apply_mark(cx.current_expansion.mark); stack.push(Frame::Delimited { forest: delimited, idx: 0, span }); - result_stack.push(mem::replace(&mut result, Vec::new())); + result_stack.push(mem::take(&mut result)); } // Nothing much to do here. Just push the token to the result, being careful to diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 696b5f48385e7..8ac20f33908b8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -7699,7 +7699,7 @@ impl<'a> Parser<'a> { let mut tokens = Vec::new(); let prev_collecting = match self.token_cursor.frame.last_token { LastToken::Collecting(ref mut list) => { - Some(mem::replace(list, Vec::new())) + Some(mem::take(list)) } LastToken::Was(ref mut last) => { tokens.extend(last.take()); @@ -7717,7 +7717,7 @@ impl<'a> Parser<'a> { // Pull out the tokens that we've collected from the call to `f` above. let mut collected_tokens = match *last_token { - LastToken::Collecting(ref mut v) => mem::replace(v, Vec::new()), + LastToken::Collecting(ref mut v) => mem::take(v), LastToken::Was(_) => panic!("our vector went away?"), }; diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index f90b76721ee16..156fab8834ca4 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -120,8 +120,8 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> { // We don't want to recurse into anything other than mods, since // mods or tests inside of functions will break things if let ast::ItemKind::Mod(mut module) = item.node { - let tests = mem::replace(&mut self.tests, Vec::new()); - let tested_submods = mem::replace(&mut self.tested_submods, Vec::new()); + let tests = mem::take(&mut self.tests); + let tested_submods = mem::take(&mut self.tested_submods); noop_visit_mod(&mut module, self); let tests = mem::replace(&mut self.tests, tests); let tested_submods = mem::replace(&mut self.tested_submods, tested_submods); diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 35caf82dd7128..6053b538ff322 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3608,7 +3608,7 @@ fn nocomment_mir_line(line: &str) -> &str { fn read2_abbreviated(mut child: Child) -> io::Result { use crate::read2::read2; - use std::mem::replace; + use std::mem::take; const HEAD_LEN: usize = 160 * 1024; const TAIL_LEN: usize = 256 * 1024; @@ -3632,7 +3632,7 @@ fn read2_abbreviated(mut child: Child) -> io::Result { return; } let tail = bytes.split_off(new_len - TAIL_LEN).into_boxed_slice(); - let head = replace(bytes, Vec::new()); + let head = take(bytes); let skipped = new_len - HEAD_LEN - TAIL_LEN; ProcOutput::Abbreviated { head, From b0c199a9697e79c70976cf4fe4fe9e0e6cc81a5c Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sun, 30 Jun 2019 11:38:06 -0700 Subject: [PATCH 10/31] Enable mem_take feature in relevant crates --- src/liballoc/lib.rs | 1 + src/libcore/lib.rs | 1 + src/libproc_macro/lib.rs | 1 + src/librustc/lib.rs | 1 + src/librustc_codegen_llvm/lib.rs | 1 + src/librustc_codegen_ssa/lib.rs | 1 + src/librustc_mir/lib.rs | 1 + src/librustc_resolve/lib.rs | 1 + src/librustc_typeck/lib.rs | 1 + src/librustdoc/lib.rs | 1 + src/libstd/lib.rs | 1 + src/libsyntax/lib.rs | 1 + src/tools/compiletest/src/main.rs | 1 + 13 files changed, 13 insertions(+) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 5fc58c8ab5a7b..bfe7d12d9d0ba 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -112,6 +112,7 @@ #![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_array)] #![feature(alloc_layout_extra)] #![feature(try_trait)] +#![feature(mem_take)] // Allow testing this library diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 04c50329de3d0..d2d08a075b92c 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -126,6 +126,7 @@ #![feature(adx_target_feature)] #![feature(maybe_uninit_slice, maybe_uninit_array)] #![feature(external_doc)] +#![feature(mem_take)] #[prelude_import] #[allow(unused)] diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 1e0f1ed578aae..2c097238b95b2 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -25,6 +25,7 @@ #![feature(extern_types)] #![feature(in_band_lifetimes)] #![feature(optin_builtin_traits)] +#![feature(mem_take)] #![feature(non_exhaustive)] #![feature(specialization)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 257d5159f1131..390ad09a40406 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -65,6 +65,7 @@ #![feature(crate_visibility_modifier)] #![feature(proc_macro_hygiene)] #![feature(log_syntax)] +#![feature(mem_take)] #![recursion_limit="512"] diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 7283aa95b3027..f6d8b41f71062 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -21,6 +21,7 @@ #![feature(link_args)] #![feature(static_nobundle)] #![feature(trusted_len)] +#![feature(mem_take)] #![deny(rust_2018_idioms)] #![deny(internal)] #![deny(unused_lifetimes)] diff --git a/src/librustc_codegen_ssa/lib.rs b/src/librustc_codegen_ssa/lib.rs index b76f098773f0b..3c1ab600040a1 100644 --- a/src/librustc_codegen_ssa/lib.rs +++ b/src/librustc_codegen_ssa/lib.rs @@ -10,6 +10,7 @@ #![feature(in_band_lifetimes)] #![feature(nll)] #![feature(trusted_len)] +#![feature(mem_take)] #![allow(unused_attributes)] #![allow(dead_code)] #![deny(rust_2018_idioms)] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index cb02e1a778c93..b85149cf55676 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -24,6 +24,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![feature(slice_concat_ext)] #![feature(trusted_len)] #![feature(try_blocks)] +#![feature(mem_take)] #![recursion_limit="256"] diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index f4c23a023b104..3bc4da78e18af 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -4,6 +4,7 @@ #![feature(crate_visibility_modifier)] #![feature(label_break_value)] +#![feature(mem_take)] #![feature(nll)] #![feature(rustc_diagnostic_macros)] #![cfg_attr(bootstrap, feature(type_alias_enum_variants))] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 85ae55b2dd946..2b9ee0a746dce 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -69,6 +69,7 @@ This API is completely unstable and subject to change. #![feature(slice_patterns)] #![feature(never_type)] #![feature(inner_deref)] +#![feature(mem_take)] #![recursion_limit="256"] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index ba423300e0277..342264db43c79 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -21,6 +21,7 @@ #![feature(drain_filter)] #![feature(inner_deref)] #![feature(never_type)] +#![feature(mem_take)] #![recursion_limit="256"] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 60e06139eba99..fb9a228880eb7 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -272,6 +272,7 @@ #![feature(libc)] #![feature(link_args)] #![feature(linkage)] +#![feature(mem_take)] #![feature(needs_panic_runtime)] #![feature(never_type)] #![feature(nll)] diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 337b84247361d..72b5f8c9f3f8b 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -16,6 +16,7 @@ #![feature(const_transmute)] #![feature(crate_visibility_modifier)] #![feature(label_break_value)] +#![feature(mem_take)] #![feature(nll)] #![feature(rustc_attrs)] #![feature(rustc_diagnostic_macros)] diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 597fdf2d95e30..517f2a362f554 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,4 +1,5 @@ #![crate_name = "compiletest"] +#![feature(mem_take)] #![feature(test)] #![feature(vec_remove_item)] #![deny(warnings, rust_2018_idioms)] From 1443abcdefc53dac3d5041d7362da3e13ae787d0 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sun, 30 Jun 2019 14:51:14 -0700 Subject: [PATCH 11/31] Revert change in compiletest --- src/tools/compiletest/src/main.rs | 1 - src/tools/compiletest/src/runtest.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 517f2a362f554..597fdf2d95e30 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,5 +1,4 @@ #![crate_name = "compiletest"] -#![feature(mem_take)] #![feature(test)] #![feature(vec_remove_item)] #![deny(warnings, rust_2018_idioms)] diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 6053b538ff322..35caf82dd7128 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3608,7 +3608,7 @@ fn nocomment_mir_line(line: &str) -> &str { fn read2_abbreviated(mut child: Child) -> io::Result { use crate::read2::read2; - use std::mem::take; + use std::mem::replace; const HEAD_LEN: usize = 160 * 1024; const TAIL_LEN: usize = 256 * 1024; @@ -3632,7 +3632,7 @@ fn read2_abbreviated(mut child: Child) -> io::Result { return; } let tail = bytes.split_off(new_len - TAIL_LEN).into_boxed_slice(); - let head = take(bytes); + let head = replace(bytes, Vec::new()); let skipped = new_len - HEAD_LEN - TAIL_LEN; ProcOutput::Abbreviated { head, From eddfad31400b9c6cba6eda95cadd96c455504898 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Mon, 1 Jul 2019 20:19:13 -0700 Subject: [PATCH 12/31] Fix import of take in collapse_docs.rs --- src/librustdoc/passes/collapse_docs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/passes/collapse_docs.rs b/src/librustdoc/passes/collapse_docs.rs index e15a95e2e1a32..144ff226c4283 100644 --- a/src/librustdoc/passes/collapse_docs.rs +++ b/src/librustdoc/passes/collapse_docs.rs @@ -4,7 +4,7 @@ use crate::fold; use crate::fold::{DocFolder}; use crate::passes::Pass; -use std::mem::replace; +use std::mem::take; pub const COLLAPSE_DOCS: Pass = Pass { name: "collapse-docs", From dc088b26ce39d8a4632d73e62e5440ae474a8cb5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Jul 2019 11:06:01 +0300 Subject: [PATCH 13/31] refactor check_for_substitution No behavior change, just flatter and simpler code --- src/libsyntax/parse/lexer/mod.rs | 22 ---- src/libsyntax/parse/lexer/unicode_chars.rs | 117 +++++++++++++-------- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index ead5d543bec7d..2309ead55b296 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -84,28 +84,6 @@ impl<'a> StringReader<'a> { Ok(ret_val) } - /// Immutably extract string if found at current position with given delimiters - fn peek_delimited(&self, from_ch: char, to_ch: char) -> Option { - let mut pos = self.pos; - let mut idx = self.src_index(pos); - let mut ch = char_at(&self.src, idx); - if ch != from_ch { - return None; - } - pos = pos + Pos::from_usize(ch.len_utf8()); - let start_pos = pos; - idx = self.src_index(pos); - while idx < self.end_src_index { - ch = char_at(&self.src, idx); - if ch == to_ch { - return Some(self.src[self.src_index(start_pos)..self.src_index(pos)].to_string()); - } - pos = pos + Pos::from_usize(ch.len_utf8()); - idx = self.src_index(pos); - } - return None; - } - fn try_real_token(&mut self) -> Result { let mut t = self.try_next_token()?; loop { diff --git a/src/libsyntax/parse/lexer/unicode_chars.rs b/src/libsyntax/parse/lexer/unicode_chars.rs index 94ce6297fbefb..6a870685938a0 100644 --- a/src/libsyntax/parse/lexer/unicode_chars.rs +++ b/src/libsyntax/parse/lexer/unicode_chars.rs @@ -1,10 +1,11 @@ // Characters and their corresponding confusables were collected from // http://www.unicode.org/Public/security/10.0.0/confusables.txt -use syntax_pos::{Span, Pos, NO_EXPANSION}; -use errors::{Applicability, DiagnosticBuilder}; use super::StringReader; +use errors::{Applicability, DiagnosticBuilder}; +use syntax_pos::{Pos, Span, NO_EXPANSION}; +#[rustfmt::skip] // for line breaks const UNICODE_ARRAY: &[(char, &str, char)] = &[ ('
', "Line Separator", ' '), ('
', "Paragraph Separator", ' '), @@ -293,8 +294,8 @@ const UNICODE_ARRAY: &[(char, &str, char)] = &[ ('〉', "Right-Pointing Angle Bracket", '>'), ('〉', "Right Angle Bracket", '>'), ('》', "Right Double Angle Bracket", '>'), - ('>', "Fullwidth Greater-Than Sign", '>'), ]; - + ('>', "Fullwidth Greater-Than Sign", '>'), +]; const ASCII_ARRAY: &[(char, &str)] = &[ (' ', "Space"), @@ -321,46 +322,72 @@ const ASCII_ARRAY: &[(char, &str)] = &[ ('+', "Plus Sign"), ('<', "Less-Than Sign"), ('=', "Equals Sign"), - ('>', "Greater-Than Sign"), ]; - -crate fn check_for_substitution<'a>(reader: &StringReader<'a>, - ch: char, - err: &mut DiagnosticBuilder<'a>) -> bool { - UNICODE_ARRAY - .iter() - .find(|&&(c, _, _)| c == ch) - .map(|&(_, u_name, ascii_char)| { - let span = Span::new(reader.pos, reader.next_pos, NO_EXPANSION); - match ASCII_ARRAY.iter().find(|&&(c, _)| c == ascii_char) { - Some(&(ascii_char, ascii_name)) => { - // special help suggestion for "directed" double quotes - if let Some(s) = reader.peek_delimited('“', '”') { - let msg = format!("Unicode characters '“' (Left Double Quotation Mark) and \ - '”' (Right Double Quotation Mark) look like '{}' ({}), but are not", - ascii_char, ascii_name); - err.span_suggestion( - Span::new(reader.pos, reader.next_pos + Pos::from_usize(s.len()) + - Pos::from_usize('”'.len_utf8()), NO_EXPANSION), - &msg, - format!("\"{}\"", s), - Applicability::MaybeIncorrect); - } else { - let msg = - format!("Unicode character '{}' ({}) looks like '{}' ({}), but it is not", - ch, u_name, ascii_char, ascii_name); - err.span_suggestion( - span, - &msg, - ascii_char.to_string(), - Applicability::MaybeIncorrect); - } - true - }, - None => { - let msg = format!("substitution character not found for '{}'", ch); - reader.sess.span_diagnostic.span_bug_no_panic(span, &msg); - false - } + ('>', "Greater-Than Sign"), +]; + +crate fn check_for_substitution<'a>( + reader: &StringReader<'a>, + ch: char, + err: &mut DiagnosticBuilder<'a>, +) -> bool { + let (u_name, ascii_char) = match UNICODE_ARRAY.iter().find(|&&(c, _, _)| c == ch) { + Some(&(_u_char, u_name, ascii_char)) => (u_name, ascii_char), + None => return false, + }; + + let span = Span::new(reader.pos, reader.next_pos, NO_EXPANSION); + + let ascii_name = match ASCII_ARRAY.iter().find(|&&(c, _)| c == ascii_char) { + Some((_ascii_char, ascii_name)) => ascii_name, + None => { + let msg = format!("substitution character not found for '{}'", ch); + reader.sess.span_diagnostic.span_bug_no_panic(span, &msg); + return false + }, + }; + + // special help suggestion for "directed" double quotes + if let Some(s) = reader.peek_delimited('“', '”') { + let msg = format!( + "Unicode characters '“' (Left Double Quotation Mark) and \ + '”' (Right Double Quotation Mark) look like '{}' ({}), but are not", + ascii_char, ascii_name + ); + err.span_suggestion( + Span::new( + reader.pos, + reader.next_pos + Pos::from_usize(s.len()) + Pos::from_usize('”'.len_utf8()), + NO_EXPANSION, + ), + &msg, + format!("\"{}\"", s), + Applicability::MaybeIncorrect, + ); + } else { + let msg = format!( + "Unicode character '{}' ({}) looks like '{}' ({}), but it is not", + ch, u_name, ascii_char, ascii_name + ); + err.span_suggestion( + span, + &msg, + ascii_char.to_string(), + Applicability::MaybeIncorrect, + ); + } + true +} + +impl StringReader<'_> { + /// Immutably extract string if found at current position with given delimiters + fn peek_delimited(&self, from_ch: char, to_ch: char) -> Option<&str> { + let tail = &self.src[self.src_index(self.pos)..]; + let mut chars = tail.chars(); + let first_char = chars.next()?; + if first_char != from_ch { + return None; } - }).unwrap_or(false) + let last_char_idx = chars.as_str().find(to_ch)?; + Some(&chars.as_str()[..last_char_idx]) + } } From db16e1721264dc06ac926a642deb4c7633a4b54d Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Tue, 2 Jul 2019 13:45:29 -0700 Subject: [PATCH 14/31] When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore. Provided that the iterator has finite length and does not trigger user-provided code, this is safe. What follows is a full list of the DoubleEndedIterators in liballoc/libcore and whether this optimization is safe, and if not, why not. src/liballoc/boxed.rs Box: Pass through to avoid defeating optimization of the underlying DoubleIterator implementation. This has no correctness impact. src/liballoc/collections/binary_heap.rs Iter: Pass through to avoid defeating optimizations on slice::Iter IntoIter: Not safe, changes Drop order Drain: Not safe, changes Drop order src/liballoc/collections/btree/map.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order Keys: Safe to call next_back, invokes no user defined code. Values: ditto ValuesMut: ditto Range: ditto RangeMut: ditto src/liballoc/collections/btree/set.rs Iter: Safe to call next_back, invokes no user defined code. IntoIter: Not safe, changes Drop order Range: Safe to call next_back, invokes no user defined code. src/liballoc/collections/linked_list.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order src/liballoc/collections/vec_deque.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order Drain: ditto src/liballoc/string.rs Drain: Safe because return type is a primitive (char) src/liballoc/vec.rs IntoIter: Not safe, changes Drop order Drain: ditto Splice: ditto src/libcore/ascii.rs EscapeDefault: Safe because return type is a primitive (u8) src/libcore/iter/adapters/chain.rs Chain: Not safe, invokes user defined code (Iterator impl) src/libcore/iter/adapters/flatten.rs FlatMap: Not safe, invokes user defined code (Iterator impl) Flatten: ditto FlattenCompat: ditto src/libcore/iter/adapters/mod.rs Rev: Not safe, invokes user defined code (Iterator impl) Copied: ditto Cloned: Not safe, invokes user defined code (Iterator impl and T::clone) Map: Not safe, invokes user defined code (Iterator impl + closure) Filter: ditto FilterMap: ditto Enumerate: Not safe, invokes user defined code (Iterator impl) Skip: ditto Fuse: ditto Inspect: ditto src/libcore/iter/adapters/zip.rs Zip: Not safe, invokes user defined code (Iterator impl) src/libcore/iter/range.rs ops::Range: Not safe, changes Drop order, but ALREADY HAS SPECIALIZATION ops::RangeInclusive: ditto src/libcore/iter/sources.rs Repeat: Not safe, calling last should iloop. Empty: No point, iterator is at most one item long. Once: ditto OnceWith: ditto src/libcore/option.rs Item: No point, iterator is at most one item long. Iter: ditto IterMut: ditto IntoIter: ditto src/libcore/result.rs Iter: No point, iterator is at most one item long IterMut: ditto IntoIter: ditto src/libcore/slice/mod.rs Split: Not safe, invokes user defined closure SplitMut: ditto RSplit: ditto RSplitMut: ditto Windows: Safe, already has specialization Chunks: ditto ChunksMut: ditto ChunksExact: ditto ChunksExactMut: ditto RChunks: ditto RChunksMut: ditto RChunksExact: ditto RChunksExactMut: ditto src/libcore/str/mod.rs Chars: Safe, already has specialization CharIndices: ditto Bytes: ditto Lines: Safe to call next_back, invokes no user defined code. LinesAny: Deprecated Everything that is generic over P: Pattern: Not safe because Pattern invokes user defined code. SplitWhitespace: Safe to call next_back, invokes no user defined code. SplitAsciiWhitespace: ditto --- src/liballoc/boxed.rs | 8 +++++++ src/liballoc/collections/binary_heap.rs | 5 +++++ src/liballoc/collections/btree/map.rs | 28 +++++++++++++++++++++++++ src/liballoc/collections/btree/set.rs | 7 +++++++ src/liballoc/collections/linked_list.rs | 10 +++++++++ src/liballoc/collections/vec_deque.rs | 10 +++++++++ src/liballoc/string.rs | 5 +++++ src/libcore/ascii.rs | 1 + src/libcore/str/mod.rs | 15 +++++++++++++ 9 files changed, 89 insertions(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 9109a730cce2d..570e657b1015b 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -716,6 +716,14 @@ impl Iterator for Box { (**self).nth(n) } } + +#[stable(feature = "rust1", since = "1.0.0")] +impl Iterator for Box { + fn last(self) -> Option where I: Sized { + (*self).last() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl DoubleEndedIterator for Box { fn next_back(&mut self) -> Option { diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs index c898f064fd09f..9f531f5b83c75 100644 --- a/src/liballoc/collections/binary_heap.rs +++ b/src/liballoc/collections/binary_heap.rs @@ -1035,6 +1035,11 @@ impl<'a, T> Iterator for Iter<'a, T> { fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } + + #[inline] + fn last(self) -> Option<&'a T> { + self.iter.last() + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 6b079fc87cc78..8e1c870cf6b05 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -1193,6 +1193,10 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> { fn size_hint(&self) -> (usize, Option) { (self.length, Some(self.length)) } + + fn last(mut self) -> Option<(&'a K, &'a V)> { + self.next_back() + } } #[stable(feature = "fused", since = "1.26.0")] @@ -1253,6 +1257,10 @@ impl<'a, K: 'a, V: 'a> Iterator for IterMut<'a, K, V> { fn size_hint(&self) -> (usize, Option) { (self.length, Some(self.length)) } + + fn last(mut self) -> Option<(&'a K, &'a mut V)> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -1421,6 +1429,10 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> { fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } + + fn last(mut self) -> Option<&'a K> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -1458,6 +1470,10 @@ impl<'a, K, V> Iterator for Values<'a, K, V> { fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } + + fn last(mut self) -> Option<&'a V> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -1495,6 +1511,10 @@ impl<'a, K, V> Iterator for Range<'a, K, V> { unsafe { Some(self.next_unchecked()) } } } + + fn last(mut self) -> Option<(&'a K, &'a V)> { + self.next_back() + } } #[stable(feature = "map_values_mut", since = "1.10.0")] @@ -1508,6 +1528,10 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> { fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } + + fn last(mut self) -> Option<&'a mut V> { + self.next_back() + } } #[stable(feature = "map_values_mut", since = "1.10.0")] @@ -1626,6 +1650,10 @@ impl<'a, K, V> Iterator for RangeMut<'a, K, V> { unsafe { Some(self.next_unchecked()) } } } + + fn last(mut self) -> Option<(&'a K, &'a mut V)> { + self.next_back() + } } impl<'a, K, V> RangeMut<'a, K, V> { diff --git a/src/liballoc/collections/btree/set.rs b/src/liballoc/collections/btree/set.rs index 16a96ca19b824..d3af910a82c27 100644 --- a/src/liballoc/collections/btree/set.rs +++ b/src/liballoc/collections/btree/set.rs @@ -1019,6 +1019,9 @@ impl<'a, T> Iterator for Iter<'a, T> { fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } + fn last(mut self) -> Option<&'a T> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> DoubleEndedIterator for Iter<'a, T> { @@ -1073,6 +1076,10 @@ impl<'a, T> Iterator for Range<'a, T> { fn next(&mut self) -> Option<&'a T> { self.iter.next().map(|(k, _)| k) } + + fn last(mut self) -> Option<&'a T> { + self.next_back() + } } #[stable(feature = "btree_range", since = "1.17.0")] diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 40a82d6feaa98..b5dbbe8fe2d01 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -832,6 +832,11 @@ impl<'a, T> Iterator for Iter<'a, T> { fn size_hint(&self) -> (usize, Option) { (self.len, Some(self.len)) } + + #[inline] + fn last(mut self) -> Option<&'a T> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -881,6 +886,11 @@ impl<'a, T> Iterator for IterMut<'a, T> { fn size_hint(&self) -> (usize, Option) { (self.len, Some(self.len)) } + + #[inline] + fn last(mut self) -> Option<&'a mut T> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 71faf672962b3..573dd86b23aeb 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -2206,6 +2206,11 @@ impl<'a, T> Iterator for Iter<'a, T> { self.tail = self.head - iter.len(); final_res } + + #[inline] + fn last(mut self) -> Option<&'a T> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -2319,6 +2324,11 @@ impl<'a, T> Iterator for IterMut<'a, T> { accum = front.iter_mut().fold(accum, &mut f); back.iter_mut().fold(accum, &mut f) } + + #[inline] + fn last(mut self) -> Option<&'a mut T> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 7f7722548f581..1b0d3c1969274 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2385,6 +2385,11 @@ impl Iterator for Drain<'_> { fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } + + #[inline] + fn last(mut self) -> Option { + self.next_back() + } } #[stable(feature = "drain", since = "1.6.0")] diff --git a/src/libcore/ascii.rs b/src/libcore/ascii.rs index c0ab364380fbd..e6a6fdde54042 100644 --- a/src/libcore/ascii.rs +++ b/src/libcore/ascii.rs @@ -117,6 +117,7 @@ impl Iterator for EscapeDefault { type Item = u8; fn next(&mut self) -> Option { self.range.next().map(|i| self.data[i]) } fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } + fn last(mut self) -> Option { self.next_back() } } #[stable(feature = "rust1", since = "1.0.0")] impl DoubleEndedIterator for EscapeDefault { diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 34f2d8917ea47..f3fbf35181718 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1333,6 +1333,11 @@ impl<'a> Iterator for Lines<'a> { fn size_hint(&self) -> (usize, Option) { self.0.size_hint() } + + #[inline] + fn last(mut self) -> Option<&'a str> { + self.next_back() + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -4241,6 +4246,11 @@ impl<'a> Iterator for SplitWhitespace<'a> { fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } + + #[inline] + fn last(mut self) -> Option<&'a str> { + self.next_back() + } } #[stable(feature = "split_whitespace", since = "1.1.0")] @@ -4267,6 +4277,11 @@ impl<'a> Iterator for SplitAsciiWhitespace<'a> { fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } + + #[inline] + fn last(mut self) -> Option<&'a str> { + self.next_back() + } } #[stable(feature = "split_ascii_whitespace", since = "1.34.0")] From c004451a209dce4960fc295ff799e17f2630a00c Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 3 Jul 2019 06:30:28 +0900 Subject: [PATCH 15/31] Migrate compile-pass annotations to build-pass --- .../add_private_fn_at_krate_root_cc/struct_point.rs | 2 +- .../incremental/change_add_field/struct_point.rs | 2 +- src/test/incremental/change_crate_dep_kind.rs | 2 +- .../incremental/change_private_fn/struct_point.rs | 2 +- .../incremental/change_private_fn_cc/struct_point.rs | 2 +- .../change_private_impl_method/struct_point.rs | 2 +- .../change_private_impl_method_cc/struct_point.rs | 2 +- .../change_pub_inherent_method_body/struct_point.rs | 2 +- .../change_pub_inherent_method_sig/struct_point.rs | 2 +- src/test/incremental/hashes/call_expressions.rs | 2 +- src/test/incremental/hashes/closure_expressions.rs | 2 +- src/test/incremental/hashes/consts.rs | 2 +- src/test/incremental/hashes/enum_constructors.rs | 2 +- src/test/incremental/hashes/enum_defs.rs | 2 +- src/test/incremental/hashes/exported_vs_not.rs | 2 +- src/test/incremental/hashes/extern_mods.rs | 2 +- src/test/incremental/hashes/for_loops.rs | 2 +- src/test/incremental/hashes/function_interfaces.rs | 2 +- src/test/incremental/hashes/if_expressions.rs | 2 +- src/test/incremental/hashes/indexing_expressions.rs | 2 +- src/test/incremental/hashes/inherent_impls.rs | 2 +- src/test/incremental/hashes/inline_asm.rs | 2 +- src/test/incremental/hashes/let_expressions.rs | 2 +- src/test/incremental/hashes/loop_expressions.rs | 2 +- src/test/incremental/hashes/match_expressions.rs | 2 +- src/test/incremental/hashes/panic_exprs.rs | 2 +- src/test/incremental/hashes/statics.rs | 2 +- src/test/incremental/hashes/struct_constructors.rs | 2 +- src/test/incremental/hashes/struct_defs.rs | 2 +- src/test/incremental/hashes/trait_defs.rs | 2 +- src/test/incremental/hashes/trait_impls.rs | 2 +- src/test/incremental/hashes/type_defs.rs | 2 +- .../incremental/hashes/unary_and_binary_exprs.rs | 2 +- src/test/incremental/hashes/while_let_loops.rs | 2 +- src/test/incremental/hashes/while_loops.rs | 2 +- src/test/incremental/ich_nested_items.rs | 2 +- src/test/incremental/incremental_proc_macro.rs | 2 +- src/test/incremental/issue-42602.rs | 2 +- src/test/incremental/issue-49595/issue-49595.rs | 2 +- .../issue-59523-on-implemented-is-not-unused.rs | 2 +- ...-59524-layout-scalar-valid-range-is-not-unused.rs | 2 +- src/test/incremental/krate-inherent.rs | 2 +- src/test/incremental/macro_export.rs | 2 +- src/test/incremental/remove_source_file/main.rs | 2 +- src/test/incremental/string_constant.rs | 2 +- .../thinlto/cgu_invalidated_via_import.rs | 2 +- .../independent_cgus_dont_affect_each_other.rs | 2 +- src/test/incremental/warnings-reemitted.rs | 2 +- src/test/rustdoc-ui/cfg-test.rs | 2 +- src/test/rustdoc-ui/coverage/basic.rs | 2 +- src/test/rustdoc-ui/coverage/empty.rs | 2 +- src/test/rustdoc-ui/coverage/enums.rs | 2 +- src/test/rustdoc-ui/coverage/exotic.rs | 2 +- src/test/rustdoc-ui/coverage/private.rs | 2 +- src/test/rustdoc-ui/coverage/statics-consts.rs | 2 +- src/test/rustdoc-ui/coverage/traits.rs | 2 +- src/test/rustdoc-ui/deprecated-attrs.rs | 2 +- src/test/rustdoc-ui/intra-links-warning-crlf.rs | 2 +- src/test/rustdoc-ui/intra-links-warning.rs | 2 +- src/test/rustdoc-ui/invalid-syntax.rs | 2 +- src/test/rustdoc-ui/issue-58473-2.rs | 2 +- src/test/rustdoc-ui/issue-58473.rs | 2 +- src/test/rustdoc-ui/unused.rs | 2 +- src/test/ui/anon-params-deprecated.fixed | 2 +- src/test/ui/anon-params-deprecated.rs | 2 +- .../associated-const/associated-const-trait-bound.rs | 2 +- .../entails-sized-object-safety.rs | 2 +- src/test/ui/associated-type-bounds/trait-params.rs | 2 +- src/test/ui/associated-type-bounds/type-alias.rs | 2 +- .../ui/async-await/async-fn-send-uses-nonsend.rs | 2 +- src/test/ui/async-await/async-matches-expr.rs | 2 +- src/test/ui/async-await/async-with-closure.rs | 2 +- src/test/ui/async-await/generics-and-bounds.rs | 2 +- src/test/ui/async-await/issue-61793.rs | 2 +- src/test/ui/async-await/issues/issue-53249.rs | 2 +- src/test/ui/async-await/issues/issue-54974.rs | 2 +- src/test/ui/async-await/issues/issue-55324.rs | 2 +- src/test/ui/async-await/issues/issue-58885.rs | 2 +- src/test/ui/async-await/issues/issue-59001.rs | 2 +- src/test/ui/async-await/issues/issue-60518.rs | 2 +- .../issues/issue-60655-latebound-regions.rs | 2 +- src/test/ui/async-await/issues/issue-60674.rs | 2 +- src/test/ui/async-await/issues/issue-61986.rs | 2 +- src/test/ui/attributes/attr-before-view-item.rs | 2 +- src/test/ui/attributes/attr-before-view-item2.rs | 2 +- src/test/ui/attributes/attr-mix-new.rs | 2 +- src/test/ui/attributes/class-attributes-1.rs | 2 +- src/test/ui/attributes/class-attributes-2.rs | 2 +- src/test/ui/attributes/item-attributes.rs | 2 +- src/test/ui/attributes/method-attributes.rs | 2 +- src/test/ui/attributes/variant-attributes.rs | 2 +- src/test/ui/bastion-of-the-turbofish.rs | 2 +- ...e-55552-ascribe-wildcard-to-structured-pattern.rs | 2 +- src/test/ui/check_match/issue-43253.rs | 2 +- .../expect-fn-supply-fn-multiple.rs | 2 +- .../expect-infer-var-supply-ty-with-bound-region.rs | 2 +- .../expect-infer-var-supply-ty-with-free-region.rs | 2 +- src/test/ui/closure-expected-type/issue-24421.rs | 2 +- src/test/ui/closure_promotion.rs | 2 +- src/test/ui/codemap_tests/unicode_3.rs | 2 +- src/test/ui/coercion/coerce-issue-49593-box-never.rs | 2 +- src/test/ui/coherence/coherence-subtyping.rs | 2 +- .../coherence_copy_like_err_fundamental_struct.rs | 2 +- .../conditional-compilation/cfg-attr-multi-false.rs | 2 +- .../conditional-compilation/cfg-attr-multi-true.rs | 2 +- .../cannot-infer-type-for-const-param.rs | 2 +- .../issue-60818-struct-constructors.rs | 2 +- src/test/ui/consts/const-block-non-item-statement.rs | 2 +- src/test/ui/consts/const-eval/const_prop_errors.rs | 2 +- src/test/ui/consts/const-eval/const_signed_pat.rs | 2 +- src/test/ui/consts/const-eval/double_check.rs | 2 +- src/test/ui/consts/const-eval/double_promotion.rs | 2 +- src/test/ui/consts/const-eval/duration_conversion.rs | 2 +- src/test/ui/consts/const-eval/extern_fat_pointer.rs | 2 +- .../ui/consts/const-eval/ice-generic-assoc-const.rs | 2 +- src/test/ui/consts/const-eval/ice-packed.rs | 2 +- src/test/ui/consts/const-eval/issue-47971.rs | 2 +- src/test/ui/consts/const-eval/issue-50706.rs | 2 +- src/test/ui/consts/const-eval/issue-51300.rs | 2 +- src/test/ui/consts/const-eval/issue-53157.rs | 2 +- src/test/ui/consts/const-eval/issue-53401.rs | 2 +- src/test/ui/consts/const-eval/issue-55541.rs | 2 +- .../const-eval/no_lint_for_statically_known_error.rs | 2 +- .../const-eval/promote_mutable_zst_mir_borrowck.rs | 2 +- src/test/ui/consts/const-eval/pub_const_err.rs | 2 +- src/test/ui/consts/const-eval/pub_const_err_bin.rs | 2 +- src/test/ui/consts/const-eval/simple_with_undef.rs | 2 +- src/test/ui/consts/const-eval/valid-const.rs | 2 +- src/test/ui/consts/const-eval/zst_operand_eval.rs | 2 +- src/test/ui/consts/const-expr-addr-operator.rs | 2 +- src/test/ui/consts/const-fn-destructuring-arg.rs | 2 +- src/test/ui/consts/const-nonzero.rs | 2 +- .../ui/consts/const-pattern-not-const-evaluable.rs | 2 +- src/test/ui/consts/const-validation-fail-55455.rs | 2 +- src/test/ui/consts/const_fn_return_nested_fn_ptr.rs | 2 +- src/test/ui/consts/const_let_assign.rs | 2 +- src/test/ui/consts/const_let_assign2.rs | 2 +- src/test/ui/consts/const_let_eq_float.rs | 2 +- src/test/ui/consts/const_let_irrefutable.rs | 2 +- src/test/ui/consts/drop_none.rs | 2 +- src/test/ui/consts/int_ptr_for_zst_slices.rs | 2 +- src/test/ui/consts/invalid_promotion.rs | 2 +- src/test/ui/consts/issue-62045.rs | 2 +- .../ui/consts/min_const_fn/min_const_fn_libstd.rs | 2 +- .../ui/consts/promote_evaluation_unused_result.rs | 2 +- src/test/ui/consts/promote_fn_calls.rs | 2 +- src/test/ui/consts/promote_fn_calls_std.rs | 2 +- src/test/ui/consts/promoted-validation-55454.rs | 2 +- src/test/ui/consts/promoted_regression.rs | 2 +- src/test/ui/consts/static_mut_containing_mut_ref.rs | 2 +- src/test/ui/consts/std/slice.rs | 2 +- src/test/ui/consts/underscore_const_names.rs | 2 +- src/test/ui/consts/union_constant.rs | 2 +- src/test/ui/dead-code-tuple-struct-field.rs | 2 +- src/test/ui/deprecation/atomic_initializers.fixed | 2 +- src/test/ui/deprecation/atomic_initializers.rs | 2 +- src/test/ui/deprecation/derive_on_deprecated.rs | 2 +- .../ui/deprecation/derive_on_deprecated_forbidden.rs | 2 +- src/test/ui/derive-uninhabited-enum-38885.rs | 2 +- .../dyn-2015-idents-in-decl-macros-unlinted.rs | 2 +- .../dyn-2015-idents-in-macros-unlinted.rs | 2 +- .../dyn-2015-no-warnings-without-lints.rs | 2 +- .../issue-56327-dyn-trait-in-macro-is-okay.rs | 2 +- src/test/ui/editions/edition-extern-crate-allowed.rs | 2 +- src/test/ui/editions/edition-feature-ok.rs | 2 +- src/test/ui/editions/edition-feature-redundant.rs | 2 +- .../edition-imports-virtual-2015-ambiguity.rs | 2 +- .../editions/edition-keywords-2015-2015-expansion.rs | 2 +- .../editions/edition-keywords-2018-2015-expansion.rs | 2 +- src/test/ui/emit-artifact-notifications.rs | 2 +- src/test/ui/error-codes/E0705.rs | 2 +- src/test/ui/existential_types/bound_reduction.rs | 2 +- src/test/ui/existential_types/cross_crate_ice.rs | 2 +- src/test/ui/existential_types/cross_crate_ice2.rs | 2 +- .../different_defining_uses_never_type2.rs | 2 +- .../existential_types/existential-associated-type.rs | 2 +- .../generic_duplicate_param_use10.rs | 2 +- .../generic_duplicate_param_use7.rs | 2 +- .../ui/existential_types/generic_lifetime_param.rs | 2 +- .../ui/existential_types/nested_existential_types.rs | 2 +- src/test/ui/existential_types/private_unused.rs | 2 +- src/test/ui/explain.rs | 2 +- src/test/ui/extern-prelude.rs | 2 +- .../issue-43106-gating-of-macro_escape.rs | 2 +- .../ui/feature-gates/feature-gate-const-indexing.rs | 2 +- src/test/ui/fn_must_use.rs | 2 +- src/test/ui/generator/issue-53548-1.rs | 2 +- src/test/ui/generator/issue-53548.rs | 2 +- src/test/ui/generic/generic-param-attrs.rs | 2 +- src/test/ui/hello_world/main.rs | 2 +- src/test/ui/hygiene/dollar-crate-modern.rs | 2 +- src/test/ui/hygiene/local_inner_macros.rs | 2 +- src/test/ui/hygiene/transparent-basic.rs | 2 +- src/test/ui/if/if-let.rs | 2 +- .../ui/impl-header-lifetime-elision/inherent-impl.rs | 2 +- .../associated-existential-type-generic-trait.rs | 2 +- .../associated-existential-type-trivial.rs | 2 +- .../ui/impl-trait/associated-existential-type.rs | 2 +- .../impl-trait/can-return-unconstrained-closure.rs | 2 +- src/test/ui/impl-trait/deprecated_annotation.rs | 2 +- src/test/ui/impl-trait/existential-minimal.rs | 2 +- .../ui/impl-trait/existential_type_in_fn_body.rs | 2 +- src/test/ui/impl-trait/issues/issue-42479.rs | 2 +- src/test/ui/impl-trait/issues/issue-49376.rs | 2 +- src/test/ui/impl-trait/issues/issue-52128.rs | 2 +- .../issues/issue-55608-captures-empty-region.rs | 2 +- .../issues/issue-57464-unexpected-regions.rs | 2 +- src/test/ui/impl-trait/multiple-lifetimes.rs | 2 +- .../extern-crate-self-macro-item.rs | 2 +- .../extern-crate-self/extern-crate-self-pass.rs | 2 +- .../extern-prelude-extern-crate-absolute-expanded.rs | 2 +- .../ui/imports/extern-prelude-extern-crate-cfg.rs | 2 +- .../ui/imports/extern-prelude-extern-crate-pass.rs | 2 +- .../imports/extern-prelude-extern-crate-shadowing.rs | 2 +- src/test/ui/imports/gensymed.rs | 2 +- src/test/ui/imports/issue-53140.rs | 2 +- src/test/ui/imports/issue-55811.rs | 2 +- src/test/ui/imports/issue-56263.rs | 2 +- src/test/ui/imports/local-modularized-tricky-pass.rs | 2 +- src/test/ui/imports/local-modularized.rs | 2 +- .../inference-variable-behind-raw-pointer.rs | 2 +- src/test/ui/issue-53912.rs | 2 +- src/test/ui/issues/issue-10396.rs | 2 +- src/test/ui/issues/issue-10456.rs | 2 +- src/test/ui/issues/issue-10763.rs | 2 +- src/test/ui/issues/issue-10853.rs | 2 +- src/test/ui/issues/issue-10902.rs | 2 +- src/test/ui/issues/issue-11384.rs | 2 +- src/test/ui/issues/issue-11592.rs | 2 +- src/test/ui/issues/issue-11612.rs | 2 +- src/test/ui/issues/issue-11869.rs | 2 +- src/test/ui/issues/issue-1251.rs | 2 +- src/test/ui/issues/issue-12729.rs | 2 +- src/test/ui/issues/issue-13105.rs | 2 +- src/test/ui/issues/issue-13167.rs | 2 +- src/test/ui/issues/issue-13214.rs | 2 +- src/test/ui/issues/issue-13405.rs | 2 +- src/test/ui/issues/issue-13703.rs | 2 +- src/test/ui/issues/issue-13775.rs | 2 +- src/test/ui/issues/issue-13837.rs | 2 +- src/test/ui/issues/issue-14082.rs | 2 +- src/test/ui/issues/issue-14254.rs | 2 +- src/test/ui/issues/issue-14330.rs | 2 +- src/test/ui/issues/issue-14837.rs | 2 +- src/test/ui/issues/issue-14901.rs | 2 +- src/test/ui/issues/issue-14933.rs | 2 +- src/test/ui/issues/issue-14936.rs | 2 +- src/test/ui/issues/issue-14959.rs | 2 +- src/test/ui/issues/issue-15108.rs | 2 +- src/test/ui/issues/issue-15261.rs | 2 +- src/test/ui/issues/issue-15689-2.rs | 2 +- src/test/ui/issues/issue-15735.rs | 2 +- src/test/ui/issues/issue-16596.rs | 2 +- src/test/ui/issues/issue-16668.rs | 2 +- src/test/ui/issues/issue-17121.rs | 2 +- src/test/ui/issues/issue-17263.rs | 2 +- src/test/ui/issues/issue-17336.rs | 2 +- src/test/ui/issues/issue-17450.rs | 2 +- src/test/ui/issues/issue-17718-const-destructors.rs | 2 +- src/test/ui/issues/issue-17732.rs | 2 +- src/test/ui/issues/issue-17746.rs | 2 +- src/test/ui/issues/issue-17904.rs | 2 +- src/test/ui/issues/issue-18083.rs | 2 +- src/test/ui/issues/issue-18088.rs | 2 +- src/test/ui/issues/issue-18188.rs | 2 +- src/test/ui/issues/issue-1821.rs | 2 +- src/test/ui/issues/issue-18446-2.rs | 2 +- src/test/ui/issues/issue-1866.rs | 2 +- src/test/ui/issues/issue-18738.rs | 2 +- src/test/ui/issues/issue-18809.rs | 2 +- src/test/ui/issues/issue-18906.rs | 2 +- src/test/ui/issues/issue-18988.rs | 2 +- src/test/ui/issues/issue-19037.rs | 2 +- src/test/ui/issues/issue-19081.rs | 2 +- src/test/ui/issues/issue-19097.rs | 2 +- src/test/ui/issues/issue-19098.rs | 2 +- src/test/ui/issues/issue-19102.rs | 2 +- src/test/ui/issues/issue-19129-1.rs | 2 +- src/test/ui/issues/issue-19129-2.rs | 2 +- src/test/ui/issues/issue-19398.rs | 2 +- src/test/ui/issues/issue-19404.rs | 2 +- src/test/ui/issues/issue-19479.rs | 2 +- src/test/ui/issues/issue-19631.rs | 2 +- src/test/ui/issues/issue-19632.rs | 2 +- src/test/ui/issues/issue-19850.rs | 2 +- src/test/ui/issues/issue-19982.rs | 2 +- src/test/ui/issues/issue-20009.rs | 2 +- src/test/ui/issues/issue-20091.rs | 2 +- src/test/ui/issues/issue-20186.rs | 2 +- src/test/ui/issues/issue-20396.rs | 2 +- src/test/ui/issues/issue-20414.rs | 2 +- src/test/ui/issues/issue-20454.rs | 2 +- src/test/ui/issues/issue-2063-resource.rs | 2 +- src/test/ui/issues/issue-20644.rs | 2 +- src/test/ui/issues/issue-20763-1.rs | 2 +- src/test/ui/issues/issue-20763-2.rs | 2 +- src/test/ui/issues/issue-20797.rs | 2 +- src/test/ui/issues/issue-20825-2.rs | 2 +- src/test/ui/issues/issue-21140.rs | 2 +- src/test/ui/issues/issue-21174-2.rs | 2 +- src/test/ui/issues/issue-21245.rs | 2 +- src/test/ui/issues/issue-21363.rs | 2 +- src/test/ui/issues/issue-21402.rs | 2 +- src/test/ui/issues/issue-21520.rs | 2 +- src/test/ui/issues/issue-21562.rs | 2 +- src/test/ui/issues/issue-21622.rs | 2 +- src/test/ui/issues/issue-21634.rs | 2 +- src/test/ui/issues/issue-21726.rs | 2 +- src/test/ui/issues/issue-21891.rs | 2 +- src/test/ui/issues/issue-22066.rs | 2 +- src/test/ui/issues/issue-22356.rs | 2 +- src/test/ui/issues/issue-22375.rs | 2 +- src/test/ui/issues/issue-22471.rs | 2 +- src/test/ui/issues/issue-22777.rs | 2 +- src/test/ui/issues/issue-22781.rs | 2 +- src/test/ui/issues/issue-22814.rs | 2 +- src/test/ui/issues/issue-22894.rs | 2 +- src/test/ui/issues/issue-2311-2.rs | 2 +- src/test/ui/issues/issue-2311.rs | 2 +- src/test/ui/issues/issue-2312.rs | 2 +- src/test/ui/issues/issue-23406.rs | 2 +- src/test/ui/issues/issue-23442.rs | 2 +- src/test/ui/issues/issue-23477.rs | 2 +- src/test/ui/issues/issue-23550.rs | 2 +- src/test/ui/issues/issue-23649-3.rs | 2 +- src/test/ui/issues/issue-24085.rs | 2 +- src/test/ui/issues/issue-24161.rs | 2 +- src/test/ui/issues/issue-24227.rs | 2 +- src/test/ui/issues/issue-24338.rs | 2 +- src/test/ui/issues/issue-24389.rs | 2 +- src/test/ui/issues/issue-24434.rs | 2 +- src/test/ui/issues/issue-2487-a.rs | 2 +- src/test/ui/issues/issue-2502.rs | 2 +- src/test/ui/issues/issue-25180.rs | 2 +- src/test/ui/issues/issue-25394.rs | 2 +- src/test/ui/issues/issue-25579.rs | 2 +- src/test/ui/issues/issue-26095.rs | 2 +- src/test/ui/issues/issue-2611-3.rs | 2 +- src/test/ui/issues/issue-26205.rs | 2 +- src/test/ui/issues/issue-26646.rs | 2 +- src/test/ui/issues/issue-26997.rs | 2 +- src/test/ui/issues/issue-27105.rs | 2 +- src/test/ui/issues/issue-27281.rs | 2 +- src/test/ui/issues/issue-2748-a.rs | 2 +- src/test/ui/issues/issue-27583.rs | 2 +- src/test/ui/issues/issue-27889.rs | 2 +- src/test/ui/issues/issue-2804-2.rs | 2 +- src/test/ui/issues/issue-28279.rs | 2 +- src/test/ui/issues/issue-28561.rs | 2 +- src/test/ui/issues/issue-28600.rs | 2 +- src/test/ui/issues/issue-28822.rs | 2 +- src/test/ui/issues/issue-28871.rs | 2 +- src/test/ui/issues/issue-28936.rs | 2 +- src/test/ui/issues/issue-28999.rs | 2 +- src/test/ui/issues/issue-29030.rs | 2 +- src/test/ui/issues/issue-29037.rs | 2 +- src/test/ui/issues/issue-2904.rs | 2 +- src/test/ui/issues/issue-29048.rs | 2 +- src/test/ui/issues/issue-29071.rs | 2 +- src/test/ui/issues/issue-29276.rs | 2 +- src/test/ui/issues/issue-29516.rs | 2 +- src/test/ui/issues/issue-29540.rs | 2 +- src/test/ui/issues/issue-29710.rs | 2 +- src/test/ui/issues/issue-29740.rs | 2 +- src/test/ui/issues/issue-29743.rs | 2 +- src/test/ui/issues/issue-31260.rs | 2 +- src/test/ui/issues/issue-3149.rs | 2 +- src/test/ui/issues/issue-31597.rs | 2 +- src/test/ui/issues/issue-32324.rs | 2 +- src/test/ui/issues/issue-33140-traitobject-crate.rs | 2 +- src/test/ui/issues/issue-33264.rs | 2 +- src/test/ui/issues/issue-33287.rs | 2 +- src/test/ui/issues/issue-33903.rs | 2 +- src/test/ui/issues/issue-34194.rs | 2 +- src/test/ui/issues/issue-3424.rs | 2 +- src/test/ui/issues/issue-34751.rs | 2 +- src/test/ui/issues/issue-34780.rs | 2 +- src/test/ui/issues/issue-35376.rs | 2 +- src/test/ui/issues/issue-35546.rs | 2 +- src/test/ui/issues/issue-3563-2.rs | 2 +- src/test/ui/issues/issue-36075.rs | 2 +- src/test/ui/issues/issue-3609.rs | 2 +- src/test/ui/issues/issue-36744-without-calls.rs | 2 +- src/test/ui/issues/issue-37323.rs | 2 +- src/test/ui/issues/issue-37598.rs | 2 +- src/test/ui/issues/issue-37655.rs | 2 +- src/test/ui/issues/issue-37725.rs | 2 +- src/test/ui/issues/issue-37733.rs | 2 +- src/test/ui/issues/issue-38727.rs | 2 +- src/test/ui/issues/issue-3874.rs | 2 +- src/test/ui/issues/issue-38875/issue-38875.rs | 2 +- src/test/ui/issues/issue-3888-2.rs | 2 +- src/test/ui/issues/issue-39089.rs | 2 +- src/test/ui/issues/issue-39467.rs | 2 +- src/test/ui/issues/issue-3979-2.rs | 2 +- src/test/ui/issues/issue-3991.rs | 2 +- src/test/ui/issues/issue-39984.rs | 2 +- src/test/ui/issues/issue-40136.rs | 2 +- src/test/ui/issues/issue-4025.rs | 2 +- src/test/ui/issues/issue-40510-2.rs | 2 +- src/test/ui/issues/issue-40510-4.rs | 2 +- src/test/ui/issues/issue-40962.rs | 2 +- src/test/ui/issues/issue-41272.rs | 2 +- src/test/ui/issues/issue-41298.rs | 2 +- src/test/ui/issues/issue-41628.rs | 2 +- .../issue-41936-variance-coerce-unsized-cycle.rs | 2 +- src/test/ui/issues/issue-41998.rs | 2 +- src/test/ui/issues/issue-42467.rs | 2 +- src/test/ui/issues/issue-42956.rs | 2 +- src/test/ui/issues/issue-43057.rs | 2 +- src/test/ui/issues/issue-43357.rs | 2 +- src/test/ui/issues/issue-43483.rs | 2 +- src/test/ui/issues/issue-44005.rs | 2 +- src/test/ui/issues/issue-44056.rs | 2 +- src/test/ui/issues/issue-44247.rs | 2 +- src/test/ui/issues/issue-44373-2.rs | 2 +- src/test/ui/issues/issue-44402.rs | 2 +- src/test/ui/issues/issue-4464.rs | 2 +- src/test/ui/issues/issue-44730.rs | 2 +- src/test/ui/issues/issue-44851.rs | 2 +- src/test/ui/issues/issue-45425.rs | 2 +- src/test/ui/issues/issue-46959.rs | 2 +- src/test/ui/issues/issue-46964.rs | 2 +- src/test/ui/issues/issue-47094.rs | 2 +- src/test/ui/issues/issue-47309.rs | 2 +- src/test/ui/issues/issue-47673.rs | 2 +- src/test/ui/issues/issue-47703-1.rs | 2 +- src/test/ui/issues/issue-47703-tuple.rs | 2 +- src/test/ui/issues/issue-47703.rs | 2 +- src/test/ui/issues/issue-47722.rs | 2 +- src/test/ui/issues/issue-47789.rs | 2 +- src/test/ui/issues/issue-4830.rs | 2 +- src/test/ui/issues/issue-48551.rs | 2 +- src/test/ui/issues/issue-49556.rs | 2 +- src/test/ui/issues/issue-49579.rs | 2 +- src/test/ui/issues/issue-49934.rs | 2 +- src/test/ui/issues/issue-50187.rs | 2 +- src/test/ui/issues/issue-50411.rs | 2 +- src/test/ui/issues/issue-50471.rs | 2 +- src/test/ui/issues/issue-50518.rs | 2 +- src/test/ui/issues/issue-50761.rs | 2 +- src/test/ui/issues/issue-50993.rs | 2 +- src/test/ui/issues/issue-51655.rs | 2 +- src/test/ui/issues/issue-51947.rs | 2 +- src/test/ui/issues/issue-52992.rs | 2 +- src/test/ui/issues/issue-53419.rs | 2 +- src/test/ui/issues/issue-5353.rs | 2 +- src/test/ui/issues/issue-53568.rs | 2 +- .../ui/issues/issue-53675-a-test-called-panic.rs | 2 +- src/test/ui/issues/issue-54387.rs | 2 +- src/test/ui/issues/issue-54521-1.rs | 2 +- src/test/ui/issues/issue-54943-1.rs | 2 +- src/test/ui/issues/issue-54943-2.rs | 2 +- src/test/ui/issues/issue-54943-3.rs | 2 +- src/test/ui/issues/issue-5500-1.rs | 2 +- src/test/ui/issues/issue-5572.rs | 2 +- src/test/ui/issues/issue-56128.rs | 2 +- src/test/ui/issues/issue-56202.rs | 2 +- src/test/ui/issues/issue-56411-aux.rs | 2 +- src/test/ui/issues/issue-57156.rs | 2 +- src/test/ui/issues/issue-57162.rs | 2 +- src/test/ui/issues/issue-57410-1.rs | 2 +- src/test/ui/issues/issue-57410.rs | 2 +- src/test/ui/issues/issue-5754.rs | 2 +- src/test/ui/issues/issue-5884.rs | 2 +- src/test/ui/issues/issue-5900.rs | 2 +- src/test/ui/issues/issue-5950.rs | 2 +- src/test/ui/issues/issue-60662.rs | 2 +- src/test/ui/issues/issue-60662.stdout | 2 +- src/test/ui/issues/issue-6341.rs | 2 +- src/test/ui/issues/issue-6470.rs | 2 +- src/test/ui/issues/issue-6557.rs | 2 +- src/test/ui/issues/issue-6898.rs | 2 +- src/test/ui/issues/issue-6991.rs | 2 +- src/test/ui/issues/issue-7268.rs | 2 +- src/test/ui/issues/issue-7607-2.rs | 2 +- .../issue-7673-cast-generically-implemented-trait.rs | 2 +- ...8171-default-method-self-inherit-builtin-trait.rs | 2 +- src/test/ui/issues/issue-8398.rs | 2 +- src/test/ui/issues/issue-8521.rs | 2 +- src/test/ui/issues/issue-8578.rs | 2 +- src/test/ui/issues/issue-9110.rs | 2 +- src/test/ui/issues/issue-9243.rs | 2 +- src/test/ui/issues/issue-9249.rs | 2 +- src/test/ui/issues/issue-9719.rs | 2 +- src/test/ui/lint/command-line-lint-group-allow.rs | 2 +- src/test/ui/lint/command-line-lint-group-warn.rs | 2 +- .../ui/lint/inclusive-range-pattern-syntax.fixed | 2 +- src/test/ui/lint/inclusive-range-pattern-syntax.rs | 2 +- .../issue-47390-unused-variable-in-struct-pattern.rs | 2 +- ...ssue-47775-nested-macro-unnecessary-parens-arg.rs | 2 +- .../lint/issue-54099-camel-case-underscore-types.rs | 2 +- src/test/ui/lint/issue-54538-unused-parens-lint.rs | 2 +- .../lint-lowercase-static-const-pattern-rename.rs | 2 +- src/test/ui/lint/lint-non-camel-case-variant.rs | 2 +- .../lint-non-camel-case-with-trailing-underscores.rs | 2 +- .../lint-non-snake-case-no-lowercase-equivalent.rs | 2 +- src/test/ui/lint/lint-nonstandard-style-unicode.rs | 2 +- src/test/ui/lint/lint-output-format-2.rs | 2 +- src/test/ui/lint/lint-stability-deprecated.rs | 2 +- src/test/ui/lint/lint-unknown-feature-default.rs | 2 +- src/test/ui/lint/lint-unknown-feature.rs | 2 +- src/test/ui/lint/lints-in-foreign-macros.rs | 2 +- src/test/ui/lint/must-use-ops.rs | 2 +- src/test/ui/lint/not_found.rs | 2 +- src/test/ui/lint/reasons.rs | 2 +- src/test/ui/lint/type-overflow.rs | 2 +- src/test/ui/lint/unreachable_pub-pub_crate.rs | 2 +- src/test/ui/lint/unreachable_pub.rs | 2 +- .../ui/lint/unused_import_warning_issue_45268.rs | 2 +- src/test/ui/lint/unused_labels.rs | 2 +- src/test/ui/lint/unused_parens_json_suggestion.rs | 2 +- .../ui/lint/unused_parens_json_suggestion.stderr | 12 ++++++------ src/test/ui/lint/use-redundant.rs | 2 +- src/test/ui/loops/loops-reject-duplicate-labels-2.rs | 2 +- src/test/ui/loops/loops-reject-duplicate-labels.rs | 2 +- .../loops/loops-reject-labels-shadowing-lifetimes.rs | 2 +- .../loops/loops-reject-lifetime-shadowing-label.rs | 2 +- src/test/ui/macros/macro-expanded-include/test.rs | 2 +- src/test/ui/macros/macro-path-prelude-pass.rs | 2 +- src/test/ui/macros/macro-shadowing-relaxed.rs | 2 +- src/test/ui/macros/macro-stmt-matchers.rs | 2 +- src/test/ui/macros/macro-tt-matchers.rs | 2 +- src/test/ui/macros/macro-use-scope.rs | 2 +- src/test/ui/macros/must-use-in-macro-55516.rs | 2 +- src/test/ui/macros/trace-macro.rs | 2 +- src/test/ui/malformed/malformed-regressions.rs | 2 +- src/test/ui/maybe-bounds-where-cpass.rs | 2 +- .../methods/method-call-lifetime-args-subst-index.rs | 2 +- src/test/ui/methods/method-trait-object-with-hrtb.rs | 2 +- src/test/ui/missing/missing-semicolon-warning.rs | 2 +- src/test/ui/never-assign-dead-code.rs | 2 +- src/test/ui/never_transmute_never.rs | 2 +- .../issue-58127-mutliple-requirements.rs | 2 +- .../propagate-despite-same-free-region.rs | 2 +- src/test/ui/nll/constant.rs | 2 +- src/test/ui/nll/drop-may-dangle.rs | 2 +- src/test/ui/nll/empty-type-predicate.rs | 2 +- src/test/ui/nll/extra-unused-mut.rs | 2 +- src/test/ui/nll/generator-distinct-lifetime.rs | 2 +- src/test/ui/nll/issue-16223.rs | 2 +- src/test/ui/nll/issue-21114-ebfull.rs | 2 +- src/test/ui/nll/issue-21114-kixunil.rs | 2 +- src/test/ui/nll/issue-22323-temp-destruction.rs | 2 +- src/test/ui/nll/issue-30104.rs | 2 +- .../issue-32382-index-assoc-type-with-lifetime.rs | 2 +- src/test/ui/nll/issue-43058.rs | 2 +- src/test/ui/nll/issue-47022.rs | 2 +- src/test/ui/nll/issue-50716-1.rs | 2 +- src/test/ui/nll/issue-51351.rs | 2 +- src/test/ui/nll/issue-52078.rs | 2 +- src/test/ui/nll/issue-53119.rs | 2 +- src/test/ui/nll/issue-53570.rs | 2 +- src/test/ui/nll/issue-55344.rs | 2 +- src/test/ui/nll/issue-55651.rs | 2 +- src/test/ui/nll/issue-57280-1.rs | 2 +- src/test/ui/nll/issue-57280.rs | 2 +- src/test/ui/nll/issue-61311-normalize.rs | 2 +- src/test/ui/nll/issue-61320-normalize.rs | 2 +- .../ui/nll/maybe-initialized-drop-uninitialized.rs | 2 +- src/test/ui/nll/projection-return.rs | 2 +- src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs | 2 +- src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs | 2 +- src/test/ui/nll/relate_tys/issue-48071.rs | 2 +- src/test/ui/nll/ty-outlives/issue-53789-1.rs | 2 +- src/test/ui/nll/ty-outlives/issue-53789-2.rs | 2 +- src/test/ui/nll/ty-outlives/issue-55756.rs | 2 +- src/test/ui/nll/ty-outlives/projection-body.rs | 2 +- ...ojection-one-region-trait-bound-static-closure.rs | 2 +- .../nll/ty-outlives/projection-where-clause-env.rs | 2 +- .../nll/ty-outlives/projection-where-clause-trait.rs | 2 +- .../ui/nll/ty-outlives/ty-param-implied-bounds.rs | 2 +- src/test/ui/nll/user-annotations/downcast-infer.rs | 2 +- .../user-annotations/issue-54570-bootstrapping.rs | 2 +- src/test/ui/no-warn-on-field-replace-issue-34101.rs | 2 +- .../non_modrs_mods_and_inline_mods.rs | 2 +- .../ui/object-safety/object-safety-by-value-self.rs | 2 +- .../ui/object-safety/object-safety-phantom-fn.rs | 2 +- src/test/ui/panic_implementation-closures.rs | 2 +- src/test/ui/parser/bounds-obj-parens.rs | 2 +- src/test/ui/parser/impl-qpath.rs | 2 +- src/test/ui/parser/trailing-plus-in-bounds.rs | 2 +- src/test/ui/parser/trait-plusequal-splitting.rs | 2 +- src/test/ui/parser/underscore-suffix-for-string.rs | 2 +- src/test/ui/print-fuel/print-fuel.rs | 2 +- src/test/ui/print_type_sizes/anonymous.rs | 2 +- src/test/ui/print_type_sizes/generics.rs | 2 +- src/test/ui/print_type_sizes/multiple_types.rs | 2 +- src/test/ui/print_type_sizes/niche-filling.rs | 2 +- src/test/ui/print_type_sizes/no_duplicates.rs | 2 +- src/test/ui/print_type_sizes/packed.rs | 2 +- src/test/ui/print_type_sizes/padding.rs | 2 +- src/test/ui/print_type_sizes/repr-align.rs | 2 +- src/test/ui/print_type_sizes/repr_int_c.rs | 2 +- src/test/ui/print_type_sizes/uninhabited.rs | 2 +- src/test/ui/print_type_sizes/variants.rs | 2 +- src/test/ui/privacy/issue-57264-1.rs | 2 +- src/test/ui/privacy/issue-57264-2.rs | 2 +- src/test/ui/privacy/private-in-public-existential.rs | 2 +- src/test/ui/privacy/private-in-public-expr-pat.rs | 2 +- .../ui/privacy/restricted/lookup-ignores-private.rs | 2 +- src/test/ui/proc-macro/attributes-included.rs | 2 +- src/test/ui/proc-macro/derive-helper-shadowed.rs | 2 +- src/test/ui/proc-macro/derive-in-mod.rs | 2 +- src/test/ui/proc-macro/dollar-crate-issue-57089.rs | 2 +- src/test/ui/proc-macro/edition-imports-2018.rs | 2 +- .../extern-prelude-extern-crate-proc-macro.rs | 2 +- .../ui/proc-macro/helper-attr-blocked-by-import.rs | 2 +- src/test/ui/proc-macro/issue-53481.rs | 2 +- src/test/ui/proc-macro/macro-use-attr.rs | 2 +- src/test/ui/proc-macro/macro-use-bang.rs | 2 +- src/test/ui/proc-macro/no-missing-docs.rs | 2 +- src/test/ui/range/range_traits-4.rs | 2 +- src/test/ui/range/range_traits-5.rs | 2 +- src/test/ui/range/range_traits-7.rs | 2 +- src/test/ui/reachable/expr_andand.rs | 2 +- src/test/ui/reachable/expr_oror.rs | 2 +- ...issue-56537-closure-uses-region-from-container.rs | 2 +- .../region-bound-extra-bound-in-inherent-impl.rs | 2 +- .../region-bound-same-bounds-in-trait-and-impl.rs | 2 +- src/test/ui/regions/region-object-lifetime-1.rs | 2 +- src/test/ui/regions/region-object-lifetime-3.rs | 2 +- .../regions-implied-bounds-projection-gap-2.rs | 2 +- .../regions-implied-bounds-projection-gap-3.rs | 2 +- .../regions-implied-bounds-projection-gap-4.rs | 2 +- .../regions-outlives-nominal-type-enum-region-rev.rs | 2 +- .../regions-outlives-nominal-type-enum-region.rs | 2 +- .../regions-outlives-nominal-type-enum-type-rev.rs | 2 +- .../regions-outlives-nominal-type-enum-type.rs | 2 +- ...egions-outlives-nominal-type-struct-region-rev.rs | 2 +- .../regions-outlives-nominal-type-struct-region.rs | 2 +- .../regions-outlives-nominal-type-struct-type-rev.rs | 2 +- .../regions-outlives-nominal-type-struct-type.rs | 2 +- .../ui/regions/regions-outlives-projection-hrtype.rs | 2 +- .../regions/regions-outlives-projection-trait-def.rs | 2 +- src/test/ui/regions/regions-outlives-scalar.rs | 2 +- src/test/ui/removing-extern-crate.fixed | 2 +- src/test/ui/removing-extern-crate.rs | 2 +- src/test/ui/resolve/issue-57523.rs | 2 +- .../bind-by-move-no-guards.rs | 2 +- .../rfc-basic-examples.rs | 2 +- .../rfc-2008-non-exhaustive/uninhabited/patterns.rs | 2 +- .../variants_fictive_visibility.rs | 2 +- src/test/ui/rfc-2093-infer-outlives/issue-54467.rs | 2 +- src/test/ui/rfc-2166-underscore-imports/basic.rs | 2 +- src/test/ui/rfc-2166-underscore-imports/duplicate.rs | 2 +- .../ui/rfc-2166-underscore-imports/intercrate.rs | 2 +- src/test/ui/rfc-2306/convert-id-const-with-gate.rs | 2 +- .../ui/rfc-2497-if-let-chains/ast-pretty-check.rs | 2 +- .../rfc-2497-if-let-chains/ast-pretty-check.stdout | 2 +- .../ui/rfc-2565-param-attrs/param-attrs-allowed.rs | 2 +- .../parse/in-trait-impl.rs | 2 +- .../parse/in-trait.rs | 2 +- .../ui/rfc1598-generic-associated-types/shadowing.rs | 2 +- src/test/ui/rmeta-lib-pass.rs | 2 +- src/test/ui/rmeta-pass.rs | 2 +- src/test/ui/rmeta-priv-warn.rs | 2 +- src/test/ui/rust-2018/edition-lint-paths-2018.rs | 2 +- .../rust-2018/edition-lint-uninferable-outlives.rs | 2 +- src/test/ui/rust-2018/macro-use-warned-against.rs | 2 +- src/test/ui/rust-2018/proc-macro-crate-in-paths.rs | 2 +- src/test/ui/rust-2018/remove-extern-crate.fixed | 2 +- src/test/ui/rust-2018/remove-extern-crate.rs | 2 +- .../suggestions-not-always-applicable.fixed | 2 +- .../rust-2018/suggestions-not-always-applicable.rs | 2 +- src/test/ui/rust-2018/try-ident.fixed | 2 +- src/test/ui/rust-2018/try-ident.rs | 2 +- src/test/ui/rust-2018/try-macro.fixed | 2 +- src/test/ui/rust-2018/try-macro.rs | 2 +- src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs | 2 +- .../ui/rust-2018/uniform-paths/from-decl-macro.rs | 2 +- src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs | 2 +- src/test/ui/rust-2018/uniform-paths/prelude.rs | 2 +- src/test/ui/save-analysis/emit-notifications.rs | 2 +- src/test/ui/self/explicit-self-closures.rs | 2 +- src/test/ui/self/self-in-typedefs.rs | 2 +- src/test/ui/self/self-type-param.rs | 2 +- .../ui/single-use-lifetime/one-use-in-fn-return.rs | 2 +- src/test/ui/single-use-lifetime/one-use-in-struct.rs | 2 +- .../two-uses-in-fn-argument-and-return.rs | 2 +- .../single-use-lifetime/two-uses-in-fn-arguments.rs | 2 +- .../two-uses-in-inherent-impl-header.rs | 2 +- .../ui/single-use-lifetime/two-uses-in-trait-impl.rs | 2 +- src/test/ui/span/issue-24690.rs | 2 +- src/test/ui/span/macro-span-replacement.rs | 2 +- src/test/ui/span/multispan-import-lint.rs | 2 +- src/test/ui/static/static-extern-type.rs | 2 +- src/test/ui/static_sized_requirement.rs | 2 +- src/test/ui/suggestions/issue-57672.rs | 2 +- src/test/ui/test-on-macro.rs | 2 +- src/test/ui/test-shadowing/test-cant-be-shadowed.rs | 2 +- src/test/ui/test-should-panic-attr.rs | 2 +- src/test/ui/traits/conservative_impl_trait.rs | 2 +- .../ui/traits/trait-alias/trait-alias-maybe-bound.rs | 2 +- ...ait-object-with-self-in-projection-output-good.rs | 2 +- ...-self-in-projection-output-repeated-supertrait.rs | 2 +- src/test/ui/traits/trait-privacy.rs | 2 +- src/test/ui/traits/trait-with-dst.rs | 2 +- src/test/ui/traits/traits-issue-23003-overflow.rs | 2 +- src/test/ui/try-poll.rs | 2 +- src/test/ui/type-alias-enum-variants/issue-57866.rs | 2 +- .../issue-61801-path-pattern-can-infer.rs | 2 +- src/test/ui/type/type-alias-bounds.rs | 2 +- ...sue-55810-must-typeck-match-pats-before-guards.rs | 2 +- .../uninhabited/privately-uninhabited-dead-code.rs | 2 +- src/test/ui/union/union-const-eval.rs | 2 +- src/test/ui/unreachable/unreachable-try-pattern.rs | 2 +- src/test/ui/unrestricted-attribute-tokens.rs | 2 +- src/test/ui/unsized-locals/unsized-index.rs | 2 +- .../variance/variance-use-contravariant-struct-2.rs | 2 +- .../ui/variance/variance-use-covariant-struct-2.rs | 2 +- 711 files changed, 716 insertions(+), 716 deletions(-) diff --git a/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs b/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs index 13daa72a4d1f4..34f30548c5a81 100644 --- a/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs +++ b/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs @@ -5,7 +5,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph // aux-build:point.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/src/test/incremental/change_add_field/struct_point.rs b/src/test/incremental/change_add_field/struct_point.rs index 9e34aedbed307..662aa53533134 100644 --- a/src/test/incremental/change_add_field/struct_point.rs +++ b/src/test/incremental/change_add_field/struct_point.rs @@ -5,7 +5,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/src/test/incremental/change_crate_dep_kind.rs b/src/test/incremental/change_crate_dep_kind.rs index 04a41d71cc945..f5d1acb621be3 100644 --- a/src/test/incremental/change_crate_dep_kind.rs +++ b/src/test/incremental/change_crate_dep_kind.rs @@ -3,7 +3,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -Cpanic=unwind -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(panic_unwind)] diff --git a/src/test/incremental/change_private_fn/struct_point.rs b/src/test/incremental/change_private_fn/struct_point.rs index be287b86bbcba..722e62ef11ded 100644 --- a/src/test/incremental/change_private_fn/struct_point.rs +++ b/src/test/incremental/change_private_fn/struct_point.rs @@ -3,7 +3,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/src/test/incremental/change_private_fn_cc/struct_point.rs b/src/test/incremental/change_private_fn_cc/struct_point.rs index 521fe99ebc2eb..384441d6d0c71 100644 --- a/src/test/incremental/change_private_fn_cc/struct_point.rs +++ b/src/test/incremental/change_private_fn_cc/struct_point.rs @@ -4,7 +4,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph // aux-build:point.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/src/test/incremental/change_private_impl_method/struct_point.rs b/src/test/incremental/change_private_impl_method/struct_point.rs index c2796b5e3c90a..ec5899f3119d8 100644 --- a/src/test/incremental/change_private_impl_method/struct_point.rs +++ b/src/test/incremental/change_private_impl_method/struct_point.rs @@ -3,7 +3,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/src/test/incremental/change_private_impl_method_cc/struct_point.rs b/src/test/incremental/change_private_impl_method_cc/struct_point.rs index 731dcdf78c933..f0e78f8d0a483 100644 --- a/src/test/incremental/change_private_impl_method_cc/struct_point.rs +++ b/src/test/incremental/change_private_impl_method_cc/struct_point.rs @@ -4,7 +4,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph // aux-build:point.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs index 76dcff848caf7..641d20ed6cc8a 100644 --- a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs +++ b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs @@ -2,7 +2,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs index 9c95d4cc2a9a5..9b8f9517bf149 100644 --- a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs +++ b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs @@ -2,7 +2,7 @@ // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/call_expressions.rs b/src/test/incremental/hashes/call_expressions.rs index 55dd37451235a..d859cbef39f09 100644 --- a/src/test/incremental/hashes/call_expressions.rs +++ b/src/test/incremental/hashes/call_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/closure_expressions.rs b/src/test/incremental/hashes/closure_expressions.rs index 5165f9821fd88..24ab6b8e18455 100644 --- a/src/test/incremental/hashes/closure_expressions.rs +++ b/src/test/incremental/hashes/closure_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/consts.rs b/src/test/incremental/hashes/consts.rs index 516276a49ea8f..8e713a1d99237 100644 --- a/src/test/incremental/hashes/consts.rs +++ b/src/test/incremental/hashes/consts.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/enum_constructors.rs b/src/test/incremental/hashes/enum_constructors.rs index f553b2d1b5123..575b2e92966ea 100644 --- a/src/test/incremental/hashes/enum_constructors.rs +++ b/src/test/incremental/hashes/enum_constructors.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/enum_defs.rs b/src/test/incremental/hashes/enum_defs.rs index aa2dc798b81c8..7256c1aa15326 100644 --- a/src/test/incremental/hashes/enum_defs.rs +++ b/src/test/incremental/hashes/enum_defs.rs @@ -10,7 +10,7 @@ // results in a change of the ICH for the enum's metadata, and that it stays // the same between rev2 and rev3. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/exported_vs_not.rs b/src/test/incremental/hashes/exported_vs_not.rs index 5a29afa17d3c2..ef275cabeaff9 100644 --- a/src/test/incremental/hashes/exported_vs_not.rs +++ b/src/test/incremental/hashes/exported_vs_not.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/extern_mods.rs b/src/test/incremental/hashes/extern_mods.rs index e6423ebad128c..0b9a0fd79451a 100644 --- a/src/test/incremental/hashes/extern_mods.rs +++ b/src/test/incremental/hashes/extern_mods.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/for_loops.rs b/src/test/incremental/hashes/for_loops.rs index 503cb8732ef70..ca45d36a6b0e4 100644 --- a/src/test/incremental/hashes/for_loops.rs +++ b/src/test/incremental/hashes/for_loops.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/function_interfaces.rs b/src/test/incremental/hashes/function_interfaces.rs index 7850291fc565a..84680a52ff3ce 100644 --- a/src/test/incremental/hashes/function_interfaces.rs +++ b/src/test/incremental/hashes/function_interfaces.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/if_expressions.rs b/src/test/incremental/hashes/if_expressions.rs index 6bc7d286e3adb..b84c393573b91 100644 --- a/src/test/incremental/hashes/if_expressions.rs +++ b/src/test/incremental/hashes/if_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/indexing_expressions.rs b/src/test/incremental/hashes/indexing_expressions.rs index eb0c33f7766b4..4d39ed68701dd 100644 --- a/src/test/incremental/hashes/indexing_expressions.rs +++ b/src/test/incremental/hashes/indexing_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/inherent_impls.rs b/src/test/incremental/hashes/inherent_impls.rs index 268c37508a73c..882383e841957 100644 --- a/src/test/incremental/hashes/inherent_impls.rs +++ b/src/test/incremental/hashes/inherent_impls.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs index 53e77a370a334..deb1c45a52885 100644 --- a/src/test/incremental/hashes/inline_asm.rs +++ b/src/test/incremental/hashes/inline_asm.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/let_expressions.rs b/src/test/incremental/hashes/let_expressions.rs index e016b92a9ebdf..68545b7daaa5c 100644 --- a/src/test/incremental/hashes/let_expressions.rs +++ b/src/test/incremental/hashes/let_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/loop_expressions.rs b/src/test/incremental/hashes/loop_expressions.rs index c04bdd43a9528..6222d948c98e9 100644 --- a/src/test/incremental/hashes/loop_expressions.rs +++ b/src/test/incremental/hashes/loop_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/match_expressions.rs b/src/test/incremental/hashes/match_expressions.rs index 02f2cd6634daf..840b2222d90a1 100644 --- a/src/test/incremental/hashes/match_expressions.rs +++ b/src/test/incremental/hashes/match_expressions.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/panic_exprs.rs b/src/test/incremental/hashes/panic_exprs.rs index 0803f4e01d63b..b370fcce8efda 100644 --- a/src/test/incremental/hashes/panic_exprs.rs +++ b/src/test/incremental/hashes/panic_exprs.rs @@ -8,7 +8,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -C debug-assertions diff --git a/src/test/incremental/hashes/statics.rs b/src/test/incremental/hashes/statics.rs index 3bee2aca5b6c2..6f74e0fdbc06e 100644 --- a/src/test/incremental/hashes/statics.rs +++ b/src/test/incremental/hashes/statics.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/struct_constructors.rs b/src/test/incremental/hashes/struct_constructors.rs index e478ff96c3276..b708b99eabc99 100644 --- a/src/test/incremental/hashes/struct_constructors.rs +++ b/src/test/incremental/hashes/struct_constructors.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/struct_defs.rs b/src/test/incremental/hashes/struct_defs.rs index 8d32e33054ccc..e0c5696483158 100644 --- a/src/test/incremental/hashes/struct_defs.rs +++ b/src/test/incremental/hashes/struct_defs.rs @@ -10,7 +10,7 @@ // results in a change of the ICH for the struct's metadata, and that it stays // the same between rev2 and rev3. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/trait_defs.rs b/src/test/incremental/hashes/trait_defs.rs index da57b485beb8a..30b4e306820ed 100644 --- a/src/test/incremental/hashes/trait_defs.rs +++ b/src/test/incremental/hashes/trait_defs.rs @@ -10,7 +10,7 @@ // results in a change of the ICH for the trait's metadata, and that it stays // the same between rev2 and rev3. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/trait_impls.rs b/src/test/incremental/hashes/trait_impls.rs index 1487129d09ea6..fa28b2ebedd13 100644 --- a/src/test/incremental/hashes/trait_impls.rs +++ b/src/test/incremental/hashes/trait_impls.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/type_defs.rs b/src/test/incremental/hashes/type_defs.rs index 4ffa0d9bb7ba7..264e8f926ffe5 100644 --- a/src/test/incremental/hashes/type_defs.rs +++ b/src/test/incremental/hashes/type_defs.rs @@ -10,7 +10,7 @@ // results in a change of the ICH for the enum's metadata, and that it stays // the same between rev2 and rev3. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/unary_and_binary_exprs.rs b/src/test/incremental/hashes/unary_and_binary_exprs.rs index 8c53ae6a03854..776a0273ca7b6 100644 --- a/src/test/incremental/hashes/unary_and_binary_exprs.rs +++ b/src/test/incremental/hashes/unary_and_binary_exprs.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/while_let_loops.rs b/src/test/incremental/hashes/while_let_loops.rs index 2d48707561c29..af2066b90f1d8 100644 --- a/src/test/incremental/hashes/while_let_loops.rs +++ b/src/test/incremental/hashes/while_let_loops.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/hashes/while_loops.rs b/src/test/incremental/hashes/while_loops.rs index 79a3bc9b20504..d8ec76d76aa31 100644 --- a/src/test/incremental/hashes/while_loops.rs +++ b/src/test/incremental/hashes/while_loops.rs @@ -5,7 +5,7 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans diff --git a/src/test/incremental/ich_nested_items.rs b/src/test/incremental/ich_nested_items.rs index 3c2ce765c4805..b2b7e663151e2 100644 --- a/src/test/incremental/ich_nested_items.rs +++ b/src/test/incremental/ich_nested_items.rs @@ -2,7 +2,7 @@ // the nested items (or even added new ones). // revisions: cfail1 cfail2 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/src/test/incremental/incremental_proc_macro.rs b/src/test/incremental/incremental_proc_macro.rs index b0e9b1f9180f6..becc1538fb225 100644 --- a/src/test/incremental/incremental_proc_macro.rs +++ b/src/test/incremental/incremental_proc_macro.rs @@ -1,6 +1,6 @@ // aux-build:incremental_proc_macro_aux.rs // revisions: cfail1 cfail2 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test makes sure that we still find the proc-macro registrar function // when we compile proc-macros incrementally (see #47292). diff --git a/src/test/incremental/issue-42602.rs b/src/test/incremental/issue-42602.rs index 17e1b82187881..b8d5303fb4734 100644 --- a/src/test/incremental/issue-42602.rs +++ b/src/test/incremental/issue-42602.rs @@ -8,7 +8,7 @@ // revisions:cfail1 cfail2 cfail3 // compile-flags:-Zquery-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/incremental/issue-49595/issue-49595.rs b/src/test/incremental/issue-49595/issue-49595.rs index ada93f79b261d..ab4d76eef364c 100644 --- a/src/test/incremental/issue-49595/issue-49595.rs +++ b/src/test/incremental/issue-49595/issue-49595.rs @@ -1,6 +1,6 @@ // revisions:cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph --test -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![crate_type = "rlib"] diff --git a/src/test/incremental/issue-59523-on-implemented-is-not-unused.rs b/src/test/incremental/issue-59523-on-implemented-is-not-unused.rs index afc086213403c..709e9be663efa 100644 --- a/src/test/incremental/issue-59523-on-implemented-is-not-unused.rs +++ b/src/test/incremental/issue-59523-on-implemented-is-not-unused.rs @@ -3,7 +3,7 @@ // subsequent runs) if incremental compilation is enabled. // revisions: cfail1 cfail2 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(on_unimplemented)] #![deny(unused_attributes)] diff --git a/src/test/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs b/src/test/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs index 37bd8d0641fb9..bfb5e539cc18c 100644 --- a/src/test/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs +++ b/src/test/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs @@ -4,7 +4,7 @@ // enabled. // revisions: cfail1 cfail2 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![deny(unused_attributes)] diff --git a/src/test/incremental/krate-inherent.rs b/src/test/incremental/krate-inherent.rs index 3e8d8fb1f94f1..6e791eacdf37a 100644 --- a/src/test/incremental/krate-inherent.rs +++ b/src/test/incremental/krate-inherent.rs @@ -1,6 +1,6 @@ // revisions: cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/macro_export.rs b/src/test/incremental/macro_export.rs index d1966646867a9..044d63fd2a9f1 100644 --- a/src/test/incremental/macro_export.rs +++ b/src/test/incremental/macro_export.rs @@ -1,5 +1,5 @@ // revisions: cfail1 cfail2 cfail3 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test case makes sure that we can compile with incremental compilation // enabled when there are macros exported from this crate. (See #37756) diff --git a/src/test/incremental/remove_source_file/main.rs b/src/test/incremental/remove_source_file/main.rs index 3af9c0518924a..b2411c0946fd4 100644 --- a/src/test/incremental/remove_source_file/main.rs +++ b/src/test/incremental/remove_source_file/main.rs @@ -6,7 +6,7 @@ // Note that we specify -g so that the SourceFiles actually get referenced by the // incr. comp. cache: // compile-flags: -Z query-dep-graph -g -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type= "rlib"] diff --git a/src/test/incremental/string_constant.rs b/src/test/incremental/string_constant.rs index c39d4145b586f..b88acd2af75ab 100644 --- a/src/test/incremental/string_constant.rs +++ b/src/test/incremental/string_constant.rs @@ -1,6 +1,6 @@ // revisions: cfail1 cfail2 // compile-flags: -Z query-dep-graph -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/thinlto/cgu_invalidated_via_import.rs b/src/test/incremental/thinlto/cgu_invalidated_via_import.rs index 09c429f0ad8b6..8160f8f3a99f9 100644 --- a/src/test/incremental/thinlto/cgu_invalidated_via_import.rs +++ b/src/test/incremental/thinlto/cgu_invalidated_via_import.rs @@ -4,7 +4,7 @@ // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -O -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![crate_type="rlib"] diff --git a/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs b/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs index da6aa79b9d35d..24e5d2438bd0a 100644 --- a/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs +++ b/src/test/incremental/thinlto/independent_cgus_dont_affect_each_other.rs @@ -3,7 +3,7 @@ // revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -O -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![crate_type="rlib"] diff --git a/src/test/incremental/warnings-reemitted.rs b/src/test/incremental/warnings-reemitted.rs index f2acaa0121bb2..a1d11f8aa5bbe 100644 --- a/src/test/incremental/warnings-reemitted.rs +++ b/src/test/incremental/warnings-reemitted.rs @@ -1,6 +1,6 @@ // revisions: cfail1 cfail2 cfail3 // compile-flags: -Coverflow-checks=on -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![warn(const_err)] diff --git a/src/test/rustdoc-ui/cfg-test.rs b/src/test/rustdoc-ui/cfg-test.rs index 6112e9b30e837..4dcf512d286ff 100644 --- a/src/test/rustdoc-ui/cfg-test.rs +++ b/src/test/rustdoc-ui/cfg-test.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:--test // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" diff --git a/src/test/rustdoc-ui/coverage/basic.rs b/src/test/rustdoc-ui/coverage/basic.rs index 4247fdf989556..d25ac633d7bf2 100644 --- a/src/test/rustdoc-ui/coverage/basic.rs +++ b/src/test/rustdoc-ui/coverage/basic.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(extern_types)] diff --git a/src/test/rustdoc-ui/coverage/empty.rs b/src/test/rustdoc-ui/coverage/empty.rs index 463617a1143df..27bcf6f39383a 100644 --- a/src/test/rustdoc-ui/coverage/empty.rs +++ b/src/test/rustdoc-ui/coverage/empty.rs @@ -1,4 +1,4 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // an empty crate still has one item to document: the crate root diff --git a/src/test/rustdoc-ui/coverage/enums.rs b/src/test/rustdoc-ui/coverage/enums.rs index 5cd7f490d1a9a..e4171d7cfb250 100644 --- a/src/test/rustdoc-ui/coverage/enums.rs +++ b/src/test/rustdoc-ui/coverage/enums.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) //! (remember the crate root is still a module) diff --git a/src/test/rustdoc-ui/coverage/exotic.rs b/src/test/rustdoc-ui/coverage/exotic.rs index b4adf45b90b8a..414d6f8405816 100644 --- a/src/test/rustdoc-ui/coverage/exotic.rs +++ b/src/test/rustdoc-ui/coverage/exotic.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(doc_keyword)] diff --git a/src/test/rustdoc-ui/coverage/private.rs b/src/test/rustdoc-ui/coverage/private.rs index 9024185856daa..6ff1bfa7275de 100644 --- a/src/test/rustdoc-ui/coverage/private.rs +++ b/src/test/rustdoc-ui/coverage/private.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage --document-private-items -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] diff --git a/src/test/rustdoc-ui/coverage/statics-consts.rs b/src/test/rustdoc-ui/coverage/statics-consts.rs index 3c1dd35dfe1ab..b7d2b1dc10c62 100644 --- a/src/test/rustdoc-ui/coverage/statics-consts.rs +++ b/src/test/rustdoc-ui/coverage/statics-consts.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) //! gotta make sure we can count statics and consts correctly, too diff --git a/src/test/rustdoc-ui/coverage/traits.rs b/src/test/rustdoc-ui/coverage/traits.rs index 5f32d5b0cccc7..40d68423f1bc6 100644 --- a/src/test/rustdoc-ui/coverage/traits.rs +++ b/src/test/rustdoc-ui/coverage/traits.rs @@ -1,5 +1,5 @@ // compile-flags:-Z unstable-options --show-coverage -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(trait_alias)] diff --git a/src/test/rustdoc-ui/deprecated-attrs.rs b/src/test/rustdoc-ui/deprecated-attrs.rs index 6f6d5b8b654da..21169eeb8c83e 100644 --- a/src/test/rustdoc-ui/deprecated-attrs.rs +++ b/src/test/rustdoc-ui/deprecated-attrs.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![doc(no_default_passes, passes = "collapse-docs unindent-comments")] diff --git a/src/test/rustdoc-ui/intra-links-warning-crlf.rs b/src/test/rustdoc-ui/intra-links-warning-crlf.rs index 20f761fcf4f3b..67bd9f73eeb5b 100644 --- a/src/test/rustdoc-ui/intra-links-warning-crlf.rs +++ b/src/test/rustdoc-ui/intra-links-warning-crlf.rs @@ -1,6 +1,6 @@ // ignore-tidy-cr -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This file checks the spans of intra-link warnings in a file with CRLF line endings. The // .gitattributes file in this directory should enforce it. diff --git a/src/test/rustdoc-ui/intra-links-warning.rs b/src/test/rustdoc-ui/intra-links-warning.rs index 26d4598f7ad1e..20770efa95315 100644 --- a/src/test/rustdoc-ui/intra-links-warning.rs +++ b/src/test/rustdoc-ui/intra-links-warning.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) //! Test with [Foo::baz], [Bar::foo], ... //! , [Uniooon::X] and [Qux::Z]. diff --git a/src/test/rustdoc-ui/invalid-syntax.rs b/src/test/rustdoc-ui/invalid-syntax.rs index 924e0386d3191..2b02d47d4b851 100644 --- a/src/test/rustdoc-ui/invalid-syntax.rs +++ b/src/test/rustdoc-ui/invalid-syntax.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) /// ``` /// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/ diff --git a/src/test/rustdoc-ui/issue-58473-2.rs b/src/test/rustdoc-ui/issue-58473-2.rs index 5e5ddebe10884..1bb19353ba2f7 100644 --- a/src/test/rustdoc-ui/issue-58473-2.rs +++ b/src/test/rustdoc-ui/issue-58473-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(private_doc_tests)] diff --git a/src/test/rustdoc-ui/issue-58473.rs b/src/test/rustdoc-ui/issue-58473.rs index 0e5be3292c053..6756d3b5a6051 100644 --- a/src/test/rustdoc-ui/issue-58473.rs +++ b/src/test/rustdoc-ui/issue-58473.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Foo { /** diff --git a/src/test/rustdoc-ui/unused.rs b/src/test/rustdoc-ui/unused.rs index e82a41b7a7b81..ffa421d4f7f2d 100644 --- a/src/test/rustdoc-ui/unused.rs +++ b/src/test/rustdoc-ui/unused.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test purpose is to check that unused_imports lint isn't fired // by rustdoc. Why would it? Because when rustdoc is running, it uses diff --git a/src/test/ui/anon-params-deprecated.fixed b/src/test/ui/anon-params-deprecated.fixed index 7eee47dcb5fc7..fe42113eb2ee9 100644 --- a/src/test/ui/anon-params-deprecated.fixed +++ b/src/test/ui/anon-params-deprecated.fixed @@ -1,7 +1,7 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2015 // run-rustfix diff --git a/src/test/ui/anon-params-deprecated.rs b/src/test/ui/anon-params-deprecated.rs index 74de0c0b83407..dc0357721ec73 100644 --- a/src/test/ui/anon-params-deprecated.rs +++ b/src/test/ui/anon-params-deprecated.rs @@ -1,7 +1,7 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2015 // run-rustfix diff --git a/src/test/ui/associated-const/associated-const-trait-bound.rs b/src/test/ui/associated-const/associated-const-trait-bound.rs index 0ce46d312afef..403cdbd7ff330 100644 --- a/src/test/ui/associated-const/associated-const-trait-bound.rs +++ b/src/test/ui/associated-const/associated-const-trait-bound.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait ConstDefault { const DEFAULT: Self; diff --git a/src/test/ui/associated-type-bounds/entails-sized-object-safety.rs b/src/test/ui/associated-type-bounds/entails-sized-object-safety.rs index 1b3e978594d69..f5a9bac6e3549 100644 --- a/src/test/ui/associated-type-bounds/entails-sized-object-safety.rs +++ b/src/test/ui/associated-type-bounds/entails-sized-object-safety.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/src/test/ui/associated-type-bounds/trait-params.rs b/src/test/ui/associated-type-bounds/trait-params.rs index a9081d50cfc5d..b0703a4ee22b3 100644 --- a/src/test/ui/associated-type-bounds/trait-params.rs +++ b/src/test/ui/associated-type-bounds/trait-params.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/src/test/ui/associated-type-bounds/type-alias.rs b/src/test/ui/associated-type-bounds/type-alias.rs index 1602fdd275a2e..34bc0c9acbf4c 100644 --- a/src/test/ui/associated-type-bounds/type-alias.rs +++ b/src/test/ui/associated-type-bounds/type-alias.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/src/test/ui/async-await/async-fn-send-uses-nonsend.rs b/src/test/ui/async-await/async-fn-send-uses-nonsend.rs index f07fc2fceb5b6..5e1b8c6280b81 100644 --- a/src/test/ui/async-await/async-fn-send-uses-nonsend.rs +++ b/src/test/ui/async-await/async-fn-send-uses-nonsend.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags: --crate-type lib diff --git a/src/test/ui/async-await/async-matches-expr.rs b/src/test/ui/async-await/async-matches-expr.rs index f375d58d98495..e41a568ad2982 100644 --- a/src/test/ui/async-await/async-matches-expr.rs +++ b/src/test/ui/async-await/async-matches-expr.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/async-with-closure.rs b/src/test/ui/async-await/async-with-closure.rs index e94a5f0853d72..2b69c9b701a42 100644 --- a/src/test/ui/async-await/async-with-closure.rs +++ b/src/test/ui/async-await/async-with-closure.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/generics-and-bounds.rs b/src/test/ui/async-await/generics-and-bounds.rs index 913f1435c6adf..8b60f2f82f1d6 100644 --- a/src/test/ui/async-await/generics-and-bounds.rs +++ b/src/test/ui/async-await/generics-and-bounds.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags: --crate-type lib diff --git a/src/test/ui/async-await/issue-61793.rs b/src/test/ui/async-await/issue-61793.rs index bccdf0113ff69..a18fad8bb9150 100644 --- a/src/test/ui/async-await/issue-61793.rs +++ b/src/test/ui/async-await/issue-61793.rs @@ -3,7 +3,7 @@ // while those two fields were at the same offset (which is impossible). // That is, memory ordering of `(X, ())`, but offsets of `((), X)`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await)] diff --git a/src/test/ui/async-await/issues/issue-53249.rs b/src/test/ui/async-await/issues/issue-53249.rs index 2157cf7d4f7ab..c493878e4c2dd 100644 --- a/src/test/ui/async-await/issues/issue-53249.rs +++ b/src/test/ui/async-await/issues/issue-53249.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(arbitrary_self_types, async_await, await_macro)] diff --git a/src/test/ui/async-await/issues/issue-54974.rs b/src/test/ui/async-await/issues/issue-54974.rs index ad18f41187569..0cfe859b13b27 100644 --- a/src/test/ui/async-await/issues/issue-54974.rs +++ b/src/test/ui/async-await/issues/issue-54974.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/issues/issue-55324.rs b/src/test/ui/async-await/issues/issue-55324.rs index 4572e543f22de..deaba6904f446 100644 --- a/src/test/ui/async-await/issues/issue-55324.rs +++ b/src/test/ui/async-await/issues/issue-55324.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/issues/issue-58885.rs b/src/test/ui/async-await/issues/issue-58885.rs index 99d87b2273c2f..5868e022861a2 100644 --- a/src/test/ui/async-await/issues/issue-58885.rs +++ b/src/test/ui/async-await/issues/issue-58885.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/issues/issue-59001.rs b/src/test/ui/async-await/issues/issue-59001.rs index c758244002ff6..ffa70d3b43cb4 100644 --- a/src/test/ui/async-await/issues/issue-59001.rs +++ b/src/test/ui/async-await/issues/issue-59001.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, await_macro)] diff --git a/src/test/ui/async-await/issues/issue-60518.rs b/src/test/ui/async-await/issues/issue-60518.rs index f603c5bd3f946..e4bdc96511e3c 100644 --- a/src/test/ui/async-await/issues/issue-60518.rs +++ b/src/test/ui/async-await/issues/issue-60518.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await)] diff --git a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs index a4fe86501299f..2328ceb144f20 100644 --- a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -1,6 +1,6 @@ // Test that existential types are allowed to contain late-bound regions. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await, existential_type)] diff --git a/src/test/ui/async-await/issues/issue-60674.rs b/src/test/ui/async-await/issues/issue-60674.rs index ecb80803383b4..99cdcbafc766f 100644 --- a/src/test/ui/async-await/issues/issue-60674.rs +++ b/src/test/ui/async-await/issues/issue-60674.rs @@ -1,5 +1,5 @@ // aux-build:issue-60674.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(async_await)] diff --git a/src/test/ui/async-await/issues/issue-61986.rs b/src/test/ui/async-await/issues/issue-61986.rs index da8b22bc104bf..77ecc47dfef12 100644 --- a/src/test/ui/async-await/issues/issue-61986.rs +++ b/src/test/ui/async-await/issues/issue-61986.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // // Tests that we properly handle StorageDead/StorageLives for temporaries diff --git a/src/test/ui/attributes/attr-before-view-item.rs b/src/test/ui/attributes/attr-before-view-item.rs index fc040bd1a5d10..e1588aadab62c 100644 --- a/src/test/ui/attributes/attr-before-view-item.rs +++ b/src/test/ui/attributes/attr-before-view-item.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/attr-before-view-item2.rs b/src/test/ui/attributes/attr-before-view-item2.rs index c7fad3802e9d6..c1f667372f515 100644 --- a/src/test/ui/attributes/attr-before-view-item2.rs +++ b/src/test/ui/attributes/attr-before-view-item2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/attr-mix-new.rs b/src/test/ui/attributes/attr-mix-new.rs index d9cb551096092..8119df0c40cb0 100644 --- a/src/test/ui/attributes/attr-mix-new.rs +++ b/src/test/ui/attributes/attr-mix-new.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/class-attributes-1.rs b/src/test/ui/attributes/class-attributes-1.rs index 7808367f2c10f..027b701e591ba 100644 --- a/src/test/ui/attributes/class-attributes-1.rs +++ b/src/test/ui/attributes/class-attributes-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pp-exact - Make sure we actually print the attributes #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/class-attributes-2.rs b/src/test/ui/attributes/class-attributes-2.rs index 348c70f35c328..6aba6b89427e4 100644 --- a/src/test/ui/attributes/class-attributes-2.rs +++ b/src/test/ui/attributes/class-attributes-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/item-attributes.rs b/src/test/ui/attributes/item-attributes.rs index 72c9a35dc07f0..c760a28ecf0ba 100644 --- a/src/test/ui/attributes/item-attributes.rs +++ b/src/test/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 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/ui/attributes/method-attributes.rs b/src/test/ui/attributes/method-attributes.rs index 2d608acc71f71..67439718bd3cc 100644 --- a/src/test/ui/attributes/method-attributes.rs +++ b/src/test/ui/attributes/method-attributes.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pp-exact - Make sure we print all the attributes // pretty-expanded FIXME #23616 diff --git a/src/test/ui/attributes/variant-attributes.rs b/src/test/ui/attributes/variant-attributes.rs index a910340f4a06d..ffcdeb52a042f 100644 --- a/src/test/ui/attributes/variant-attributes.rs +++ b/src/test/ui/attributes/variant-attributes.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pp-exact - Make sure we actually print the attributes // pretty-expanded FIXME #23616 diff --git a/src/test/ui/bastion-of-the-turbofish.rs b/src/test/ui/bastion-of-the-turbofish.rs index 0716fcf7f26a8..cc43210d8e3b9 100644 --- a/src/test/ui/bastion-of-the-turbofish.rs +++ b/src/test/ui/bastion-of-the-turbofish.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Bastion of the Turbofish // ------------------------ diff --git a/src/test/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs b/src/test/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs index 6d91fd3508a86..1d98067ce738c 100644 --- a/src/test/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs +++ b/src/test/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/check_match/issue-43253.rs b/src/test/ui/check_match/issue-43253.rs index 5d084248a7f99..a4d6e9b777f02 100644 --- a/src/test/ui/check_match/issue-43253.rs +++ b/src/test/ui/check_match/issue-43253.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(exclusive_range_pattern)] #![warn(unreachable_patterns)] diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs b/src/test/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs index 1bfaecd16c0b6..5f02e642defca 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] diff --git a/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs b/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs index 3e42284b72c3f..0ee738c2c2f39 100644 --- a/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs +++ b/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs b/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs index cf417d7c2a8e8..15711da4b0fbb 100644 --- a/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs +++ b/src/test/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/src/test/ui/closure-expected-type/issue-24421.rs b/src/test/ui/closure-expected-type/issue-24421.rs index 477eb40c57e1f..f7b4f2b24549e 100644 --- a/src/test/ui/closure-expected-type/issue-24421.rs +++ b/src/test/ui/closure-expected-type/issue-24421.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn test(f: F) {} diff --git a/src/test/ui/closure_promotion.rs b/src/test/ui/closure_promotion.rs index db9c0a6ef3be4..db36985afe7a8 100644 --- a/src/test/ui/closure_promotion.rs +++ b/src/test/ui/closure_promotion.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(const_err)] diff --git a/src/test/ui/codemap_tests/unicode_3.rs b/src/test/ui/codemap_tests/unicode_3.rs index ff6d54468b8ec..b9bcc1b88a336 100644 --- a/src/test/ui/codemap_tests/unicode_3.rs +++ b/src/test/ui/codemap_tests/unicode_3.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } diff --git a/src/test/ui/coercion/coerce-issue-49593-box-never.rs b/src/test/ui/coercion/coerce-issue-49593-box-never.rs index 81723bb15b774..f005245e6dcb9 100644 --- a/src/test/ui/coercion/coerce-issue-49593-box-never.rs +++ b/src/test/ui/coercion/coerce-issue-49593-box-never.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(never_type)] #![allow(unreachable_code)] diff --git a/src/test/ui/coherence/coherence-subtyping.rs b/src/test/ui/coherence/coherence-subtyping.rs index e74067578069e..a0ff580671a20 100644 --- a/src/test/ui/coherence/coherence-subtyping.rs +++ b/src/test/ui/coherence/coherence-subtyping.rs @@ -5,7 +5,7 @@ // universe transition (#56105) may eventually become an error. // revisions: old re -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![cfg_attr(re, feature(re_rebalance_coherence))] diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index a030314262270..22517f9da2e30 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -2,7 +2,7 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // skip-codgen // revisions: old re diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-false.rs b/src/test/ui/conditional-compilation/cfg-attr-multi-false.rs index f1ab2f0f9461f..0c7e7cad0359f 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-false.rs +++ b/src/test/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` -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-true.rs b/src/test/ui/conditional-compilation/cfg-attr-multi-true.rs index 86524e8bd28ff..645e4e71dfe9a 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-true.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs index f592e486be951..cb40734c1d257 100644 --- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/const-generics/issue-60818-struct-constructors.rs b/src/test/ui/const-generics/issue-60818-struct-constructors.rs index 0b4aeae7a4a39..b810efe73847e 100644 --- a/src/test/ui/const-generics/issue-60818-struct-constructors.rs +++ b/src/test/ui/const-generics/issue-60818-struct-constructors.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/consts/const-block-non-item-statement.rs b/src/test/ui/consts/const-block-non-item-statement.rs index 5ecf9a049842d..9aec85526955e 100644 --- a/src/test/ui/consts/const-block-non-item-statement.rs +++ b/src/test/ui/consts/const-block-non-item-statement.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) enum Foo { Bar = { let x = 1; 3 } diff --git a/src/test/ui/consts/const-eval/const_prop_errors.rs b/src/test/ui/consts/const-eval/const_prop_errors.rs index 51b50b2e75f4f..48cfea82bd65e 100644 --- a/src/test/ui/consts/const-eval/const_prop_errors.rs +++ b/src/test/ui/consts/const-eval/const_prop_errors.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Foo { fn foo(self) -> u32; diff --git a/src/test/ui/consts/const-eval/const_signed_pat.rs b/src/test/ui/consts/const-eval/const_signed_pat.rs index cb4fb46bd055c..d209e60448687 100644 --- a/src/test/ui/consts/const-eval/const_signed_pat.rs +++ b/src/test/ui/consts/const-eval/const_signed_pat.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { const MIN: i8 = -5; diff --git a/src/test/ui/consts/const-eval/double_check.rs b/src/test/ui/consts/const-eval/double_check.rs index 9ac511767c0f7..2cf6a5494dd8d 100644 --- a/src/test/ui/consts/const-eval/double_check.rs +++ b/src/test/ui/consts/const-eval/double_check.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) enum Foo { A = 5, diff --git a/src/test/ui/consts/const-eval/double_promotion.rs b/src/test/ui/consts/const-eval/double_promotion.rs index 0e75ea8e66b3c..a9a3f071bf89f 100644 --- a/src/test/ui/consts/const-eval/double_promotion.rs +++ b/src/test/ui/consts/const-eval/double_promotion.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_fn, rustc_attrs)] diff --git a/src/test/ui/consts/const-eval/duration_conversion.rs b/src/test/ui/consts/const-eval/duration_conversion.rs index 854f97d4754df..029d4e5e3732e 100644 --- a/src/test/ui/consts/const-eval/duration_conversion.rs +++ b/src/test/ui/consts/const-eval/duration_conversion.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::time::Duration; diff --git a/src/test/ui/consts/const-eval/extern_fat_pointer.rs b/src/test/ui/consts/const-eval/extern_fat_pointer.rs index f8e6fd09c7e0a..e2b3bc83c3f01 100644 --- a/src/test/ui/consts/const-eval/extern_fat_pointer.rs +++ b/src/test/ui/consts/const-eval/extern_fat_pointer.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(extern_types)] diff --git a/src/test/ui/consts/const-eval/ice-generic-assoc-const.rs b/src/test/ui/consts/const-eval/ice-generic-assoc-const.rs index 2ad1a633d125f..ce0e11f29f442 100644 --- a/src/test/ui/consts/const-eval/ice-generic-assoc-const.rs +++ b/src/test/ui/consts/const-eval/ice-generic-assoc-const.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Nullable { const NULL: Self; diff --git a/src/test/ui/consts/const-eval/ice-packed.rs b/src/test/ui/consts/const-eval/ice-packed.rs index b9fe4eadd4132..250bf954e9ac2 100644 --- a/src/test/ui/consts/const-eval/ice-packed.rs +++ b/src/test/ui/consts/const-eval/ice-packed.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(Copy, Clone, PartialEq, Eq)] #[repr(packed)] pub struct Num(u64); diff --git a/src/test/ui/consts/const-eval/issue-47971.rs b/src/test/ui/consts/const-eval/issue-47971.rs index 9d7b05cd232b5..9de150bd0528d 100644 --- a/src/test/ui/consts/const-eval/issue-47971.rs +++ b/src/test/ui/consts/const-eval/issue-47971.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct S(pub &'static u32, pub u32); diff --git a/src/test/ui/consts/const-eval/issue-50706.rs b/src/test/ui/consts/const-eval/issue-50706.rs index cb45b86cd7ba3..bf69bc28da41a 100644 --- a/src/test/ui/consts/const-eval/issue-50706.rs +++ b/src/test/ui/consts/const-eval/issue-50706.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct Stats; diff --git a/src/test/ui/consts/const-eval/issue-51300.rs b/src/test/ui/consts/const-eval/issue-51300.rs index 72a6072e4b7b4..4753bf0f7b174 100644 --- a/src/test/ui/consts/const-eval/issue-51300.rs +++ b/src/test/ui/consts/const-eval/issue-51300.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // https://github.com/rust-lang/rust/issues/51300 #[derive(PartialEq, Eq, Clone, Copy)] diff --git a/src/test/ui/consts/const-eval/issue-53157.rs b/src/test/ui/consts/const-eval/issue-53157.rs index b9958609971a7..ac0940b33e47a 100644 --- a/src/test/ui/consts/const-eval/issue-53157.rs +++ b/src/test/ui/consts/const-eval/issue-53157.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) macro_rules! m { () => {{ diff --git a/src/test/ui/consts/const-eval/issue-53401.rs b/src/test/ui/consts/const-eval/issue-53401.rs index e8ac5a90880ce..d300e0b5125da 100644 --- a/src/test/ui/consts/const-eval/issue-53401.rs +++ b/src/test/ui/consts/const-eval/issue-53401.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub const STATIC_TRAIT: &dyn Test = &(); diff --git a/src/test/ui/consts/const-eval/issue-55541.rs b/src/test/ui/consts/const-eval/issue-55541.rs index 611fb89341de4..d04570c67ff2e 100644 --- a/src/test/ui/consts/const-eval/issue-55541.rs +++ b/src/test/ui/consts/const-eval/issue-55541.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Test that we can handle newtypes wrapping extern types diff --git a/src/test/ui/consts/const-eval/no_lint_for_statically_known_error.rs b/src/test/ui/consts/const-eval/no_lint_for_statically_known_error.rs index 0d14cf0f6d951..cea367528c975 100644 --- a/src/test/ui/consts/const-eval/no_lint_for_statically_known_error.rs +++ b/src/test/ui/consts/const-eval/no_lint_for_statically_known_error.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs b/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs index 34f61ed5a3474..ca75d65a39a92 100644 --- a/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs +++ b/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub fn main() { let y: &'static mut [u8; 0] = &mut []; diff --git a/src/test/ui/consts/const-eval/pub_const_err.rs b/src/test/ui/consts/const-eval/pub_const_err.rs index d882dad295b16..4ff140fee7a71 100644 --- a/src/test/ui/consts/const-eval/pub_const_err.rs +++ b/src/test/ui/consts/const-eval/pub_const_err.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(const_err)] #![crate_type = "lib"] diff --git a/src/test/ui/consts/const-eval/pub_const_err_bin.rs b/src/test/ui/consts/const-eval/pub_const_err_bin.rs index dee09b70d9334..7f1586336e721 100644 --- a/src/test/ui/consts/const-eval/pub_const_err_bin.rs +++ b/src/test/ui/consts/const-eval/pub_const_err_bin.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(const_err)] pub const Z: u32 = 0 - 1; diff --git a/src/test/ui/consts/const-eval/simple_with_undef.rs b/src/test/ui/consts/const-eval/simple_with_undef.rs index 61398f3a375c2..8a9f3fe974d91 100644 --- a/src/test/ui/consts/const-eval/simple_with_undef.rs +++ b/src/test/ui/consts/const-eval/simple_with_undef.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) const PARSE_BOOL: Option<&'static str> = None; static FOO: (Option<&str>, u32) = (PARSE_BOOL, 42); diff --git a/src/test/ui/consts/const-eval/valid-const.rs b/src/test/ui/consts/const-eval/valid-const.rs index a195e12defcea..30bd47219239e 100644 --- a/src/test/ui/consts/const-eval/valid-const.rs +++ b/src/test/ui/consts/const-eval/valid-const.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Some constants that *are* valid #![feature(const_transmute)] diff --git a/src/test/ui/consts/const-eval/zst_operand_eval.rs b/src/test/ui/consts/const-eval/zst_operand_eval.rs index d837da1066daa..7edb6bd03dabf 100644 --- a/src/test/ui/consts/const-eval/zst_operand_eval.rs +++ b/src/test/ui/consts/const-eval/zst_operand_eval.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) static ASSERT: () = [()][!(std::mem::size_of::() == 4) as usize]; diff --git a/src/test/ui/consts/const-expr-addr-operator.rs b/src/test/ui/consts/const-expr-addr-operator.rs index dc9f292c2b8ad..37bf24c2fbed1 100644 --- a/src/test/ui/consts/const-expr-addr-operator.rs +++ b/src/test/ui/consts/const-expr-addr-operator.rs @@ -1,5 +1,5 @@ // Encountered while testing #44614. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub fn main() { // Constant of generic type (int) diff --git a/src/test/ui/consts/const-fn-destructuring-arg.rs b/src/test/ui/consts/const-fn-destructuring-arg.rs index dcf89f90e31da..d2c89cb54a0eb 100644 --- a/src/test/ui/consts/const-fn-destructuring-arg.rs +++ b/src/test/ui/consts/const-fn-destructuring-arg.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) const fn i((a, b): (u32, u32)) -> u32 { a + b diff --git a/src/test/ui/consts/const-nonzero.rs b/src/test/ui/consts/const-nonzero.rs index c06ab227f6463..6db3d1b3331fa 100644 --- a/src/test/ui/consts/const-nonzero.rs +++ b/src/test/ui/consts/const-nonzero.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::num::NonZeroU8; diff --git a/src/test/ui/consts/const-pattern-not-const-evaluable.rs b/src/test/ui/consts/const-pattern-not-const-evaluable.rs index 8dd78ca0ba495..dae5343fe3011 100644 --- a/src/test/ui/consts/const-pattern-not-const-evaluable.rs +++ b/src/test/ui/consts/const-pattern-not-const-evaluable.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq, Eq)] enum Cake { diff --git a/src/test/ui/consts/const-validation-fail-55455.rs b/src/test/ui/consts/const-validation-fail-55455.rs index def4062339f96..583074888c9b6 100644 --- a/src/test/ui/consts/const-validation-fail-55455.rs +++ b/src/test/ui/consts/const-validation-fail-55455.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct This(T); diff --git a/src/test/ui/consts/const_fn_return_nested_fn_ptr.rs b/src/test/ui/consts/const_fn_return_nested_fn_ptr.rs index c7617c9c7ad03..d22c789609f4d 100644 --- a/src/test/ui/consts/const_fn_return_nested_fn_ptr.rs +++ b/src/test/ui/consts/const_fn_return_nested_fn_ptr.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/src/test/ui/consts/const_let_assign.rs b/src/test/ui/consts/const_let_assign.rs index 0b09b8469fd75..343fcb4859b37 100644 --- a/src/test/ui/consts/const_let_assign.rs +++ b/src/test/ui/consts/const_let_assign.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct S(i32); diff --git a/src/test/ui/consts/const_let_assign2.rs b/src/test/ui/consts/const_let_assign2.rs index 1c44237e49b7a..4787c1750d291 100644 --- a/src/test/ui/consts/const_let_assign2.rs +++ b/src/test/ui/consts/const_let_assign2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct AA { pub data: [u8; 10], diff --git a/src/test/ui/consts/const_let_eq_float.rs b/src/test/ui/consts/const_let_eq_float.rs index c48f54e567b2c..0c927a0484d9d 100644 --- a/src/test/ui/consts/const_let_eq_float.rs +++ b/src/test/ui/consts/const_let_eq_float.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_fn)] diff --git a/src/test/ui/consts/const_let_irrefutable.rs b/src/test/ui/consts/const_let_irrefutable.rs index 424a16f7ed39b..e889abf4abe4a 100644 --- a/src/test/ui/consts/const_let_irrefutable.rs +++ b/src/test/ui/consts/const_let_irrefutable.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/src/test/ui/consts/drop_none.rs b/src/test/ui/consts/drop_none.rs index 86a197ffb993e..9d98d3be87464 100644 --- a/src/test/ui/consts/drop_none.rs +++ b/src/test/ui/consts/drop_none.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A; impl Drop for A { diff --git a/src/test/ui/consts/int_ptr_for_zst_slices.rs b/src/test/ui/consts/int_ptr_for_zst_slices.rs index afa2c6a5b9e1c..34dafd00d28dc 100644 --- a/src/test/ui/consts/int_ptr_for_zst_slices.rs +++ b/src/test/ui/consts/int_ptr_for_zst_slices.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_raw_ptr_deref)] diff --git a/src/test/ui/consts/invalid_promotion.rs b/src/test/ui/consts/invalid_promotion.rs index f98406e50e9ae..a31eaf40e0ede 100644 --- a/src/test/ui/consts/invalid_promotion.rs +++ b/src/test/ui/consts/invalid_promotion.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // note this was only reproducible with lib crates // compile-flags: --crate-type=lib diff --git a/src/test/ui/consts/issue-62045.rs b/src/test/ui/consts/issue-62045.rs index 9f41ed9a24523..efeb9fc551cc9 100644 --- a/src/test/ui/consts/issue-62045.rs +++ b/src/test/ui/consts/issue-62045.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { assert_eq!(&mut [0; 1][..], &mut []); diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd.rs b/src/test/ui/consts/min_const_fn/min_const_fn_libstd.rs index 23bd73325472e..cb8f74186bd74 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn_libstd.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::cell::UnsafeCell; use std::sync::atomic::AtomicU32; diff --git a/src/test/ui/consts/promote_evaluation_unused_result.rs b/src/test/ui/consts/promote_evaluation_unused_result.rs index dc21b9fe8cd1b..4eda785bb8989 100644 --- a/src/test/ui/consts/promote_evaluation_unused_result.rs +++ b/src/test/ui/consts/promote_evaluation_unused_result.rs @@ -1,4 +1,4 @@ -//compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/src/test/ui/consts/promote_fn_calls.rs b/src/test/ui/consts/promote_fn_calls.rs index 6b6eea36361bf..8995aaacd8549 100644 --- a/src/test/ui/consts/promote_fn_calls.rs +++ b/src/test/ui/consts/promote_fn_calls.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:promotable_const_fn_lib.rs extern crate promotable_const_fn_lib; diff --git a/src/test/ui/consts/promote_fn_calls_std.rs b/src/test/ui/consts/promote_fn_calls_std.rs index d982f350208e2..bdb472f3a9cce 100644 --- a/src/test/ui/consts/promote_fn_calls_std.rs +++ b/src/test/ui/consts/promote_fn_calls_std.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let x: &'static u8 = &u8::max_value(); diff --git a/src/test/ui/consts/promoted-validation-55454.rs b/src/test/ui/consts/promoted-validation-55454.rs index 5e193b1b7de0b..23cae4fb57d57 100644 --- a/src/test/ui/consts/promoted-validation-55454.rs +++ b/src/test/ui/consts/promoted-validation-55454.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq)] struct This(T); diff --git a/src/test/ui/consts/promoted_regression.rs b/src/test/ui/consts/promoted_regression.rs index 68b9a20ecf90b..d57036ae58f35 100644 --- a/src/test/ui/consts/promoted_regression.rs +++ b/src/test/ui/consts/promoted_regression.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _ = &[("", ""); 3]; diff --git a/src/test/ui/consts/static_mut_containing_mut_ref.rs b/src/test/ui/consts/static_mut_containing_mut_ref.rs index 27e1a111163b1..df09c76c5584d 100644 --- a/src/test/ui/consts/static_mut_containing_mut_ref.rs +++ b/src/test/ui/consts/static_mut_containing_mut_ref.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) static mut STDERR_BUFFER_SPACE: [u8; 42] = [0u8; 42]; diff --git a/src/test/ui/consts/std/slice.rs b/src/test/ui/consts/std/slice.rs index ad38105b6aa0e..f19defc64dd71 100644 --- a/src/test/ui/consts/std/slice.rs +++ b/src/test/ui/consts/std/slice.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Wrap(T); unsafe impl Send for Wrap {} diff --git a/src/test/ui/consts/underscore_const_names.rs b/src/test/ui/consts/underscore_const_names.rs index 8d57e5074f1b1..d0e625bf1997a 100644 --- a/src/test/ui/consts/underscore_const_names.rs +++ b/src/test/ui/consts/underscore_const_names.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unused)] diff --git a/src/test/ui/consts/union_constant.rs b/src/test/ui/consts/union_constant.rs index 16b05310b9fcb..508ff7e0ae8e6 100644 --- a/src/test/ui/consts/union_constant.rs +++ b/src/test/ui/consts/union_constant.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) union Uninit { _never_use: *const u8, diff --git a/src/test/ui/dead-code-tuple-struct-field.rs b/src/test/ui/dead-code-tuple-struct-field.rs index 496ce4fb378ae..92a67950986b0 100644 --- a/src/test/ui/dead-code-tuple-struct-field.rs +++ b/src/test/ui/dead-code-tuple-struct-field.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(dead_code)] diff --git a/src/test/ui/deprecation/atomic_initializers.fixed b/src/test/ui/deprecation/atomic_initializers.fixed index dee1d979cff1d..363bda75f1695 100644 --- a/src/test/ui/deprecation/atomic_initializers.fixed +++ b/src/test/ui/deprecation/atomic_initializers.fixed @@ -1,5 +1,5 @@ // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/src/test/ui/deprecation/atomic_initializers.rs b/src/test/ui/deprecation/atomic_initializers.rs index b9e25e817bce4..00c5f7b0b1257 100644 --- a/src/test/ui/deprecation/atomic_initializers.rs +++ b/src/test/ui/deprecation/atomic_initializers.rs @@ -1,5 +1,5 @@ // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/src/test/ui/deprecation/derive_on_deprecated.rs b/src/test/ui/deprecation/derive_on_deprecated.rs index 4980a7f5aa31c..ed4055ecdd38c 100644 --- a/src/test/ui/deprecation/derive_on_deprecated.rs +++ b/src/test/ui/deprecation/derive_on_deprecated.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(deprecated)] diff --git a/src/test/ui/deprecation/derive_on_deprecated_forbidden.rs b/src/test/ui/deprecation/derive_on_deprecated_forbidden.rs index 235146bad9c85..3fd4346646756 100644 --- a/src/test/ui/deprecation/derive_on_deprecated_forbidden.rs +++ b/src/test/ui/deprecation/derive_on_deprecated_forbidden.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![forbid(deprecated)] diff --git a/src/test/ui/derive-uninhabited-enum-38885.rs b/src/test/ui/derive-uninhabited-enum-38885.rs index b314eacc92e0e..2c4d64e4e6063 100644 --- a/src/test/ui/derive-uninhabited-enum-38885.rs +++ b/src/test/ui/derive-uninhabited-enum-38885.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Wunused // ensure there are no special warnings about uninhabited types diff --git a/src/test/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs b/src/test/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs index f535791d7fbe4..cf14aef7900a7 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs +++ b/src/test/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Under the 2015 edition with the keyword_idents lint, `dyn` is // not entirely acceptable as an identifier. diff --git a/src/test/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs b/src/test/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs index 27e490558689f..0d85b87dee5a1 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs +++ b/src/test/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Under the 2015 edition with the keyword_idents lint, `dyn` is // not entirely acceptable as an identifier. diff --git a/src/test/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs b/src/test/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs index 8cef5c2b34947..2a8b6b24831c0 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs +++ b/src/test/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs @@ -1,7 +1,7 @@ // Under the 2015 edition without the keyword_idents lint, `dyn` is // entirely acceptable as an identifier. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(non_camel_case_types)] diff --git a/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs b/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs index ff3830d61755a..2718e89a3f214 100644 --- a/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs +++ b/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // 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/src/test/ui/editions/edition-extern-crate-allowed.rs b/src/test/ui/editions/edition-extern-crate-allowed.rs index 6361fff6ff43c..93fe69e0af217 100644 --- a/src/test/ui/editions/edition-extern-crate-allowed.rs +++ b/src/test/ui/editions/edition-extern-crate-allowed.rs @@ -1,6 +1,6 @@ // aux-build:edition-extern-crate-allowed.rs // edition:2015 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_idioms)] diff --git a/src/test/ui/editions/edition-feature-ok.rs b/src/test/ui/editions/edition-feature-ok.rs index c2468df49398a..126421326949b 100644 --- a/src/test/ui/editions/edition-feature-ok.rs +++ b/src/test/ui/editions/edition-feature-ok.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rust_2018_preview)] diff --git a/src/test/ui/editions/edition-feature-redundant.rs b/src/test/ui/editions/edition-feature-redundant.rs index 87a2a22105f4e..4309a777d33f7 100644 --- a/src/test/ui/editions/edition-feature-redundant.rs +++ b/src/test/ui/editions/edition-feature-redundant.rs @@ -1,5 +1,5 @@ // edition:2018 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rust_2018_preview)] //~^ WARN the feature `rust_2018_preview` is included in the Rust 2018 edition diff --git a/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.rs b/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.rs index 940b0c3c63db0..310bff21d1851 100644 --- a/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.rs +++ b/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags:--extern edition_imports_2015 // aux-build:edition-imports-2015.rs diff --git a/src/test/ui/editions/edition-keywords-2015-2015-expansion.rs b/src/test/ui/editions/edition-keywords-2015-2015-expansion.rs index c3757ab193485..9c3beb1ce58c1 100644 --- a/src/test/ui/editions/edition-keywords-2015-2015-expansion.rs +++ b/src/test/ui/editions/edition-keywords-2015-2015-expansion.rs @@ -1,6 +1,6 @@ // edition:2015 // aux-build:edition-kw-macro-2015.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(keyword_idents)] diff --git a/src/test/ui/editions/edition-keywords-2018-2015-expansion.rs b/src/test/ui/editions/edition-keywords-2018-2015-expansion.rs index 6a30c49821904..619e6424db441 100644 --- a/src/test/ui/editions/edition-keywords-2018-2015-expansion.rs +++ b/src/test/ui/editions/edition-keywords-2018-2015-expansion.rs @@ -1,6 +1,6 @@ // edition:2018 // aux-build:edition-kw-macro-2015.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(keyword_idents)] diff --git a/src/test/ui/emit-artifact-notifications.rs b/src/test/ui/emit-artifact-notifications.rs index 2f17f95b7a3be..d309485f05311 100644 --- a/src/test/ui/emit-artifact-notifications.rs +++ b/src/test/ui/emit-artifact-notifications.rs @@ -1,5 +1,5 @@ // compile-flags:--emit=metadata --error-format=json -Z emit-artifact-notifications -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // ignore-pass // ^-- needed because `--pass check` does not emit the output needed. diff --git a/src/test/ui/error-codes/E0705.rs b/src/test/ui/error-codes/E0705.rs index cc2b8f64d9fa8..4e32ef355606c 100644 --- a/src/test/ui/error-codes/E0705.rs +++ b/src/test/ui/error-codes/E0705.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This is a stub feature that doesn't control anything, so to make tidy happy, // gate-test-test_2018_feature diff --git a/src/test/ui/existential_types/bound_reduction.rs b/src/test/ui/existential_types/bound_reduction.rs index c1c0c60d59ee0..46bc17293bc90 100644 --- a/src/test/ui/existential_types/bound_reduction.rs +++ b/src/test/ui/existential_types/bound_reduction.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] diff --git a/src/test/ui/existential_types/cross_crate_ice.rs b/src/test/ui/existential_types/cross_crate_ice.rs index c5d5ca916a48a..c30608176aada 100644 --- a/src/test/ui/existential_types/cross_crate_ice.rs +++ b/src/test/ui/existential_types/cross_crate_ice.rs @@ -1,5 +1,5 @@ // aux-build:cross_crate_ice.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice; diff --git a/src/test/ui/existential_types/cross_crate_ice2.rs b/src/test/ui/existential_types/cross_crate_ice2.rs index a0f3933ce33b2..3a7e490260f3f 100644 --- a/src/test/ui/existential_types/cross_crate_ice2.rs +++ b/src/test/ui/existential_types/cross_crate_ice2.rs @@ -1,5 +1,5 @@ // aux-build:cross_crate_ice2.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice2; diff --git a/src/test/ui/existential_types/different_defining_uses_never_type2.rs b/src/test/ui/existential_types/different_defining_uses_never_type2.rs index 2953f1745ee5b..0f02cfaad7e06 100644 --- a/src/test/ui/existential_types/different_defining_uses_never_type2.rs +++ b/src/test/ui/existential_types/different_defining_uses_never_type2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] diff --git a/src/test/ui/existential_types/existential-associated-type.rs b/src/test/ui/existential_types/existential-associated-type.rs index 299ae91b84386..bfb91f68ffdd1 100644 --- a/src/test/ui/existential_types/existential-associated-type.rs +++ b/src/test/ui/existential_types/existential-associated-type.rs @@ -1,5 +1,5 @@ #![feature(existential_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/src/test/ui/existential_types/generic_duplicate_param_use10.rs b/src/test/ui/existential_types/generic_duplicate_param_use10.rs index 10f2c630582fc..0d9c7cdfe71c3 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use10.rs +++ b/src/test/ui/existential_types/generic_duplicate_param_use10.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] use std::fmt::Debug; diff --git a/src/test/ui/existential_types/generic_duplicate_param_use7.rs b/src/test/ui/existential_types/generic_duplicate_param_use7.rs index 5d8d05c308780..56e1528c213ef 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use7.rs +++ b/src/test/ui/existential_types/generic_duplicate_param_use7.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] use std::fmt::Debug; diff --git a/src/test/ui/existential_types/generic_lifetime_param.rs b/src/test/ui/existential_types/generic_lifetime_param.rs index a8bb0229f0e8d..1ea01f17b70a3 100644 --- a/src/test/ui/existential_types/generic_lifetime_param.rs +++ b/src/test/ui/existential_types/generic_lifetime_param.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] diff --git a/src/test/ui/existential_types/nested_existential_types.rs b/src/test/ui/existential_types/nested_existential_types.rs index 6d2a12da7e443..de52e88bae209 100644 --- a/src/test/ui/existential_types/nested_existential_types.rs +++ b/src/test/ui/existential_types/nested_existential_types.rs @@ -1,5 +1,5 @@ #![feature(existential_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod my_mod { use std::fmt::Debug; diff --git a/src/test/ui/existential_types/private_unused.rs b/src/test/ui/existential_types/private_unused.rs index 736d812bc0aff..92268f1861d63 100644 --- a/src/test/ui/existential_types/private_unused.rs +++ b/src/test/ui/existential_types/private_unused.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/src/test/ui/explain.rs b/src/test/ui/explain.rs index 3622ba7764530..28973d6756482 100644 --- a/src/test/ui/explain.rs +++ b/src/test/ui/explain.rs @@ -1,2 +1,2 @@ // compile-flags: --explain E0591 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) diff --git a/src/test/ui/extern-prelude.rs b/src/test/ui/extern-prelude.rs index 0e52f2c5158d4..50fed6034aa02 100644 --- a/src/test/ui/extern-prelude.rs +++ b/src/test/ui/extern-prelude.rs @@ -1,4 +1,4 @@ -// compile-pass +// 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 diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs index 98ca3444c91bd..dab946bb81810 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs +++ b/src/test/ui/feature-gate/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![macro_escape] //~^ WARN macro_escape is a deprecated synonym for macro_use diff --git a/src/test/ui/feature-gates/feature-gate-const-indexing.rs b/src/test/ui/feature-gates/feature-gate-const-indexing.rs index 4df1c7d6ed237..2b1067b34891c 100644 --- a/src/test/ui/feature-gates/feature-gate-const-indexing.rs +++ b/src/test/ui/feature-gates/feature-gate-const-indexing.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47]; diff --git a/src/test/ui/fn_must_use.rs b/src/test/ui/fn_must_use.rs index 8519cf741a320..e411854661603 100644 --- a/src/test/ui/fn_must_use.rs +++ b/src/test/ui/fn_must_use.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/src/test/ui/generator/issue-53548-1.rs b/src/test/ui/generator/issue-53548-1.rs index df11800731c72..395456ce7c65b 100644 --- a/src/test/ui/generator/issue-53548-1.rs +++ b/src/test/ui/generator/issue-53548-1.rs @@ -2,7 +2,7 @@ // but which encountered the same ICE/error. See `issue-53548.rs` // for details. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::cell::RefCell; use std::rc::Rc; diff --git a/src/test/ui/generator/issue-53548.rs b/src/test/ui/generator/issue-53548.rs index 73a2bcdd55538..8136c65923b79 100644 --- a/src/test/ui/generator/issue-53548.rs +++ b/src/test/ui/generator/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). // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(generators)] diff --git a/src/test/ui/generic/generic-param-attrs.rs b/src/test/ui/generic/generic-param-attrs.rs index 601d2a9e0a31f..39a600339aa90 100644 --- a/src/test/ui/generic/generic-param-attrs.rs +++ b/src/test/ui/generic/generic-param-attrs.rs @@ -6,7 +6,7 @@ // using `rustc_attrs` feature. There is a separate compile-fail/ test // ensuring that the attribute feature-gating works in this context.) -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/hello_world/main.rs b/src/test/ui/hello_world/main.rs index f790af64b4df0..22ce47414b28d 100644 --- a/src/test/ui/hello_world/main.rs +++ b/src/test/ui/hello_world/main.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Test that compiling hello world succeeds with no output of any kind. diff --git a/src/test/ui/hygiene/dollar-crate-modern.rs b/src/test/ui/hygiene/dollar-crate-modern.rs index 380ad20486ec4..9c25e138d2c28 100644 --- a/src/test/ui/hygiene/dollar-crate-modern.rs +++ b/src/test/ui/hygiene/dollar-crate-modern.rs @@ -1,6 +1,6 @@ // Make sure `$crate` and `crate` work in for basic cases of nested macros. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:intercrate.rs #![feature(decl_macro, crate_in_paths)] diff --git a/src/test/ui/hygiene/local_inner_macros.rs b/src/test/ui/hygiene/local_inner_macros.rs index f4c1a931f68ad..f361e3d5d4963 100644 --- a/src/test/ui/hygiene/local_inner_macros.rs +++ b/src/test/ui/hygiene/local_inner_macros.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:local_inner_macros.rs extern crate local_inner_macros; diff --git a/src/test/ui/hygiene/transparent-basic.rs b/src/test/ui/hygiene/transparent-basic.rs index 0a86234fdba1f..23ee558cc17b0 100644 --- a/src/test/ui/hygiene/transparent-basic.rs +++ b/src/test/ui/hygiene/transparent-basic.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:transparent-basic.rs #![feature(decl_macro, rustc_attrs)] diff --git a/src/test/ui/if/if-let.rs b/src/test/ui/if/if-let.rs index 741685fe9b649..3447f358d85f1 100644 --- a/src/test/ui/if/if-let.rs +++ b/src/test/ui/if/if-let.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn macros() { macro_rules! foo{ diff --git a/src/test/ui/impl-header-lifetime-elision/inherent-impl.rs b/src/test/ui/impl-header-lifetime-elision/inherent-impl.rs index 20d778d20aef9..9d7b2f2d088cc 100644 --- a/src/test/ui/impl-header-lifetime-elision/inherent-impl.rs +++ b/src/test/ui/impl-header-lifetime-elision/inherent-impl.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Foo<'a>(&'a u8); diff --git a/src/test/ui/impl-trait/associated-existential-type-generic-trait.rs b/src/test/ui/impl-trait/associated-existential-type-generic-trait.rs index 26bd435cbac96..130de9ccf621d 100644 --- a/src/test/ui/impl-trait/associated-existential-type-generic-trait.rs +++ b/src/test/ui/impl-trait/associated-existential-type-generic-trait.rs @@ -1,5 +1,5 @@ #![feature(existential_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy(U); diff --git a/src/test/ui/impl-trait/associated-existential-type-trivial.rs b/src/test/ui/impl-trait/associated-existential-type-trivial.rs index cc974ffea7bbc..0e83b4084b6ac 100644 --- a/src/test/ui/impl-trait/associated-existential-type-trivial.rs +++ b/src/test/ui/impl-trait/associated-existential-type-trivial.rs @@ -1,5 +1,5 @@ #![feature(existential_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/src/test/ui/impl-trait/associated-existential-type.rs b/src/test/ui/impl-trait/associated-existential-type.rs index 38511bd062c85..58966aefe1c32 100644 --- a/src/test/ui/impl-trait/associated-existential-type.rs +++ b/src/test/ui/impl-trait/associated-existential-type.rs @@ -1,5 +1,5 @@ #![feature(existential_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/src/test/ui/impl-trait/can-return-unconstrained-closure.rs b/src/test/ui/impl-trait/can-return-unconstrained-closure.rs index 90a7519074b53..7ae1ac4f5767c 100644 --- a/src/test/ui/impl-trait/can-return-unconstrained-closure.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn make_identity() -> impl Sized { |x: &'static i32| x diff --git a/src/test/ui/impl-trait/deprecated_annotation.rs b/src/test/ui/impl-trait/deprecated_annotation.rs index dd9f5fd4647e0..f76724c8ab11d 100644 --- a/src/test/ui/impl-trait/deprecated_annotation.rs +++ b/src/test/ui/impl-trait/deprecated_annotation.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(warnings)] diff --git a/src/test/ui/impl-trait/existential-minimal.rs b/src/test/ui/impl-trait/existential-minimal.rs index c93c6a499bc75..6d3c0692970dc 100644 --- a/src/test/ui/impl-trait/existential-minimal.rs +++ b/src/test/ui/impl-trait/existential-minimal.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/src/test/ui/impl-trait/existential_type_in_fn_body.rs b/src/test/ui/impl-trait/existential_type_in_fn_body.rs index b29ae064b76c4..32fc4a97ef44d 100644 --- a/src/test/ui/impl-trait/existential_type_in_fn_body.rs +++ b/src/test/ui/impl-trait/existential_type_in_fn_body.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] diff --git a/src/test/ui/impl-trait/issues/issue-42479.rs b/src/test/ui/impl-trait/issues/issue-42479.rs index 2da15ac5b6e7e..7d69cd0a3038f 100644 --- a/src/test/ui/impl-trait/issues/issue-42479.rs +++ b/src/test/ui/impl-trait/issues/issue-42479.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::iter::once; diff --git a/src/test/ui/impl-trait/issues/issue-49376.rs b/src/test/ui/impl-trait/issues/issue-49376.rs index 13671b8dbf448..12e69b16adf0b 100644 --- a/src/test/ui/impl-trait/issues/issue-49376.rs +++ b/src/test/ui/impl-trait/issues/issue-49376.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Tests for nested self-reference which caused a stack overflow. diff --git a/src/test/ui/impl-trait/issues/issue-52128.rs b/src/test/ui/impl-trait/issues/issue-52128.rs index eb4456a0d592e..ac26c10e55d83 100644 --- a/src/test/ui/impl-trait/issues/issue-52128.rs +++ b/src/test/ui/impl-trait/issues/issue-52128.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(warnings)] diff --git a/src/test/ui/impl-trait/issues/issue-55608-captures-empty-region.rs b/src/test/ui/impl-trait/issues/issue-55608-captures-empty-region.rs index 50646edd61a85..0c07101bb7ba0 100644 --- a/src/test/ui/impl-trait/issues/issue-55608-captures-empty-region.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") diff --git a/src/test/ui/impl-trait/issues/issue-57464-unexpected-regions.rs b/src/test/ui/impl-trait/issues/issue-57464-unexpected-regions.rs index 11f1a392239dc..ed066ce19243e 100644 --- a/src/test/ui/impl-trait/issues/issue-57464-unexpected-regions.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct A(F); diff --git a/src/test/ui/impl-trait/multiple-lifetimes.rs b/src/test/ui/impl-trait/multiple-lifetimes.rs index 8346542135bec..92e5ea2f49df8 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes.rs @@ -1,5 +1,5 @@ // Test that multiple liftimes are allowed in impl trait types. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait X<'x>: Sized {} diff --git a/src/test/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs b/src/test/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs index 9c9397999ff67..244293be72636 100644 --- a/src/test/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs +++ b/src/test/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs @@ -1,4 +1,4 @@ -// compile-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/src/test/ui/imports/extern-crate-self/extern-crate-self-pass.rs b/src/test/ui/imports/extern-crate-self/extern-crate-self-pass.rs index 6f6343a614886..9cebb622eeda3 100644 --- a/src/test/ui/imports/extern-crate-self/extern-crate-self-pass.rs +++ b/src/test/ui/imports/extern-crate-self/extern-crate-self-pass.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) extern crate self as foo; diff --git a/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs b/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs index cf91a9714ade0..30d87f90b30a5 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs +++ b/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 macro_rules! define_iso { () => { diff --git a/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs b/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs index 6117e5f6f3cd7..cfae08fccaa4b 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs +++ b/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:--cfg my_feature #![no_std] diff --git a/src/test/ui/imports/extern-prelude-extern-crate-pass.rs b/src/test/ui/imports/extern-prelude-extern-crate-pass.rs index bb4cf6ca99c75..c87d58f63e257 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-pass.rs +++ b/src/test/ui/imports/extern-prelude-extern-crate-pass.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:two_macros.rs extern crate two_macros; diff --git a/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs b/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs index c5adeaf17fa92..9e69a27d7c4ce 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs +++ b/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:two_macros.rs extern crate two_macros as core; diff --git a/src/test/ui/imports/gensymed.rs b/src/test/ui/imports/gensymed.rs index 317441079ff87..613ccc0b24234 100644 --- a/src/test/ui/imports/gensymed.rs +++ b/src/test/ui/imports/gensymed.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // aux-build:gensymed.rs diff --git a/src/test/ui/imports/issue-53140.rs b/src/test/ui/imports/issue-53140.rs index dbfba2c94339a..1854ddf96b8db 100644 --- a/src/test/ui/imports/issue-53140.rs +++ b/src/test/ui/imports/issue-53140.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod m { pub struct S(u8); diff --git a/src/test/ui/imports/issue-55811.rs b/src/test/ui/imports/issue-55811.rs index 95316777fabf6..8cb602d868cd4 100644 --- a/src/test/ui/imports/issue-55811.rs +++ b/src/test/ui/imports/issue-55811.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:issue-55811.rs extern crate issue_55811; diff --git a/src/test/ui/imports/issue-56263.rs b/src/test/ui/imports/issue-56263.rs index 4113d4390c3c9..4763ae4be9995 100644 --- a/src/test/ui/imports/issue-56263.rs +++ b/src/test/ui/imports/issue-56263.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 use ::std; diff --git a/src/test/ui/imports/local-modularized-tricky-pass.rs b/src/test/ui/imports/local-modularized-tricky-pass.rs index 59aac952b9299..b52ddaf89549e 100644 --- a/src/test/ui/imports/local-modularized-tricky-pass.rs +++ b/src/test/ui/imports/local-modularized-tricky-pass.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) macro_rules! define_exported { () => { #[macro_export] diff --git a/src/test/ui/imports/local-modularized.rs b/src/test/ui/imports/local-modularized.rs index a073fe26eb619..8eeb1cf07bb1a 100644 --- a/src/test/ui/imports/local-modularized.rs +++ b/src/test/ui/imports/local-modularized.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[macro_export(local_inner_macros)] macro_rules! dollar_crate_exported { diff --git a/src/test/ui/inference/inference-variable-behind-raw-pointer.rs b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs index 513b15ed088d8..a90b268db8c95 100644 --- a/src/test/ui/inference/inference-variable-behind-raw-pointer.rs +++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // tests that the following code compiles, but produces a future-compatibility warning diff --git a/src/test/ui/issue-53912.rs b/src/test/ui/issue-53912.rs index d2347c3077cf3..4718aea0429c2 100644 --- a/src/test/ui/issue-53912.rs +++ b/src/test/ui/issue-53912.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/issues/issue-10396.rs b/src/test/ui/issues/issue-10396.rs index d8e9aec81806e..0781e5e3ed990 100644 --- a/src/test/ui/issues/issue-10396.rs +++ b/src/test/ui/issues/issue-10396.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[derive(Debug)] enum Foo<'s> { diff --git a/src/test/ui/issues/issue-10456.rs b/src/test/ui/issues/issue-10456.rs index 4b548362f4aff..7eac095de5da4 100644 --- a/src/test/ui/issues/issue-10456.rs +++ b/src/test/ui/issues/issue-10456.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 pub struct Foo; diff --git a/src/test/ui/issues/issue-10763.rs b/src/test/ui/issues/issue-10763.rs index f2d4c5b47d782..091a7c5296342 100644 --- a/src/test/ui/issues/issue-10763.rs +++ b/src/test/ui/issues/issue-10763.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-10853.rs b/src/test/ui/issues/issue-10853.rs index 0b74eaddcdd3a..c9de39feda691 100644 --- a/src/test/ui/issues/issue-10853.rs +++ b/src/test/ui/issues/issue-10853.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![deny(missing_docs)] diff --git a/src/test/ui/issues/issue-10902.rs b/src/test/ui/issues/issue-10902.rs index 5e7f8ed7fd5d2..d53ce9a1db86f 100644 --- a/src/test/ui/issues/issue-10902.rs +++ b/src/test/ui/issues/issue-10902.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-11384.rs b/src/test/ui/issues/issue-11384.rs index 59d85b175cf69..443c2be08bbd0 100644 --- a/src/test/ui/issues/issue-11384.rs +++ b/src/test/ui/issues/issue-11384.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Common { fn dummy(&self) { } } diff --git a/src/test/ui/issues/issue-11592.rs b/src/test/ui/issues/issue-11592.rs index e2028bd56f9bf..0298f83baf81c 100644 --- a/src/test/ui/issues/issue-11592.rs +++ b/src/test/ui/issues/issue-11592.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) //! Ensure the private trait Bar isn't complained about. #![deny(missing_docs)] diff --git a/src/test/ui/issues/issue-11612.rs b/src/test/ui/issues/issue-11612.rs index fd4fb2443cbe7..553648a5ebc2e 100644 --- a/src/test/ui/issues/issue-11612.rs +++ b/src/test/ui/issues/issue-11612.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // #11612 // We weren't updating the auto adjustments with all the resolved diff --git a/src/test/ui/issues/issue-11869.rs b/src/test/ui/issues/issue-11869.rs index e62879f1f29ea..a44094bfb2391 100644 --- a/src/test/ui/issues/issue-11869.rs +++ b/src/test/ui/issues/issue-11869.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-1251.rs b/src/test/ui/issues/issue-1251.rs index 84a14a8c09be6..63b5a4dd1b31a 100644 --- a/src/test/ui/issues/issue-1251.rs +++ b/src/test/ui/issues/issue-1251.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_attributes)] #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-12729.rs b/src/test/ui/issues/issue-12729.rs index c2572c78280eb..67c1bdc32ede9 100644 --- a/src/test/ui/issues/issue-12729.rs +++ b/src/test/ui/issues/issue-12729.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-13105.rs b/src/test/ui/issues/issue-13105.rs index 0e118043d5564..2410e2f136704 100644 --- a/src/test/ui/issues/issue-13105.rs +++ b/src/test/ui/issues/issue-13105.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Foo { diff --git a/src/test/ui/issues/issue-13167.rs b/src/test/ui/issues/issue-13167.rs index dcc25a446fad6..e04faabb7e8e0 100644 --- a/src/test/ui/issues/issue-13167.rs +++ b/src/test/ui/issues/issue-13167.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 use std::slice; diff --git a/src/test/ui/issues/issue-13214.rs b/src/test/ui/issues/issue-13214.rs index af2d95c5e4286..0015169b11798 100644 --- a/src/test/ui/issues/issue-13214.rs +++ b/src/test/ui/issues/issue-13214.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // defining static with struct that contains enum // with &'static str variant used to cause ICE diff --git a/src/test/ui/issues/issue-13405.rs b/src/test/ui/issues/issue-13405.rs index 32965cb0c6d8c..fb48abe26484a 100644 --- a/src/test/ui/issues/issue-13405.rs +++ b/src/test/ui/issues/issue-13405.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-13703.rs b/src/test/ui/issues/issue-13703.rs index 212fff7bcecd7..fe5458a7d7c07 100644 --- a/src/test/ui/issues/issue-13703.rs +++ b/src/test/ui/issues/issue-13703.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize } diff --git a/src/test/ui/issues/issue-13775.rs b/src/test/ui/issues/issue-13775.rs index 39e42dc2c0d5a..0359bb581d585 100644 --- a/src/test/ui/issues/issue-13775.rs +++ b/src/test/ui/issues/issue-13775.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Foo { diff --git a/src/test/ui/issues/issue-13837.rs b/src/test/ui/issues/issue-13837.rs index d475ce1d83319..06790fbd32457 100644 --- a/src/test/ui/issues/issue-13837.rs +++ b/src/test/ui/issues/issue-13837.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-14082.rs b/src/test/ui/issues/issue-14082.rs index 4849077c144e1..e5f1b492f275b 100644 --- a/src/test/ui/issues/issue-14082.rs +++ b/src/test/ui/issues/issue-14082.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![allow(unused_imports, dead_code)] diff --git a/src/test/ui/issues/issue-14254.rs b/src/test/ui/issues/issue-14254.rs index 3ad388dc2d790..8b04fa192ada1 100644 --- a/src/test/ui/issues/issue-14254.rs +++ b/src/test/ui/issues/issue-14254.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Foo: Sized { diff --git a/src/test/ui/issues/issue-14330.rs b/src/test/ui/issues/issue-14330.rs index d8f225eb07c24..be31fa5eabc59 100644 --- a/src/test/ui/issues/issue-14330.rs +++ b/src/test/ui/issues/issue-14330.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_imports)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-14837.rs b/src/test/ui/issues/issue-14837.rs index 54387804affeb..a276e27f9dcc4 100644 --- a/src/test/ui/issues/issue-14837.rs +++ b/src/test/ui/issues/issue-14837.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #[deny(dead_code)] diff --git a/src/test/ui/issues/issue-14901.rs b/src/test/ui/issues/issue-14901.rs index 9b89c1631df15..c164658331e93 100644 --- a/src/test/ui/issues/issue-14901.rs +++ b/src/test/ui/issues/issue-14901.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Reader {} enum Wrapper<'a> { diff --git a/src/test/ui/issues/issue-14933.rs b/src/test/ui/issues/issue-14933.rs index 9249ba3d6466e..f229c0f7c26cf 100644 --- a/src/test/ui/issues/issue-14933.rs +++ b/src/test/ui/issues/issue-14933.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 pub type BigRat = T; diff --git a/src/test/ui/issues/issue-14936.rs b/src/test/ui/issues/issue-14936.rs index bd3c99ad8d78b..809a1088992a0 100644 --- a/src/test/ui/issues/issue-14936.rs +++ b/src/test/ui/issues/issue-14936.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_macros)] #![allow(dead_code)] #![feature(asm)] diff --git a/src/test/ui/issues/issue-14959.rs b/src/test/ui/issues/issue-14959.rs index 60daaafbcc8bd..bd6c7a2bda9f0 100644 --- a/src/test/ui/issues/issue-14959.rs +++ b/src/test/ui/issues/issue-14959.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/src/test/ui/issues/issue-15108.rs b/src/test/ui/issues/issue-15108.rs index d2b56c0949d63..b8231ad4e8326 100644 --- a/src/test/ui/issues/issue-15108.rs +++ b/src/test/ui/issues/issue-15108.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 fn main() {} diff --git a/src/test/ui/issues/issue-15261.rs b/src/test/ui/issues/issue-15261.rs index 4119cb055c590..dd859475f9c8e 100644 --- a/src/test/ui/issues/issue-15261.rs +++ b/src/test/ui/issues/issue-15261.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-15689-2.rs b/src/test/ui/issues/issue-15689-2.rs index 4a1326113910e..1731a356ccd19 100644 --- a/src/test/ui/issues/issue-15689-2.rs +++ b/src/test/ui/issues/issue-15689-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-15735.rs b/src/test/ui/issues/issue-15735.rs index 20634cc388110..0da4d4a620bf9 100644 --- a/src/test/ui/issues/issue-15735.rs +++ b/src/test/ui/issues/issue-15735.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A<'a> { a: &'a i32, diff --git a/src/test/ui/issues/issue-16596.rs b/src/test/ui/issues/issue-16596.rs index 3aa6c20ec57ec..693dea436bb06 100644 --- a/src/test/ui/issues/issue-16596.rs +++ b/src/test/ui/issues/issue-16596.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait MatrixRow { fn dummy(&self) { }} diff --git a/src/test/ui/issues/issue-16668.rs b/src/test/ui/issues/issue-16668.rs index b570a2ced67bc..a898ab20a4887 100644 --- a/src/test/ui/issues/issue-16668.rs +++ b/src/test/ui/issues/issue-16668.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Parser<'a, I, O> { parse: Box Result + 'a> diff --git a/src/test/ui/issues/issue-17121.rs b/src/test/ui/issues/issue-17121.rs index 706350fc1e205..0f1d4f5410d57 100644 --- a/src/test/ui/issues/issue-17121.rs +++ b/src/test/ui/issues/issue-17121.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 // ignore-cloudabi no std::fs diff --git a/src/test/ui/issues/issue-17263.rs b/src/test/ui/issues/issue-17263.rs index dce30275ff354..f24acb7b304e6 100644 --- a/src/test/ui/issues/issue-17263.rs +++ b/src/test/ui/issues/issue-17263.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(box_syntax)] diff --git a/src/test/ui/issues/issue-17336.rs b/src/test/ui/issues/issue-17336.rs index e2c0e8b91ccea..830d799fb652f 100644 --- a/src/test/ui/issues/issue-17336.rs +++ b/src/test/ui/issues/issue-17336.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_must_use)] #[allow(dead_code)] fn check(a: &str) { diff --git a/src/test/ui/issues/issue-17450.rs b/src/test/ui/issues/issue-17450.rs index 70f33e3e66181..595e0a4d25c65 100644 --- a/src/test/ui/issues/issue-17450.rs +++ b/src/test/ui/issues/issue-17450.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, warnings)] static mut x: isize = 3; diff --git a/src/test/ui/issues/issue-17718-const-destructors.rs b/src/test/ui/issues/issue-17718-const-destructors.rs index 133420b688ec2..7ec025ec3af75 100644 --- a/src/test/ui/issues/issue-17718-const-destructors.rs +++ b/src/test/ui/issues/issue-17718-const-destructors.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A; impl Drop for A { diff --git a/src/test/ui/issues/issue-17732.rs b/src/test/ui/issues/issue-17732.rs index 7993bbb38bb4a..17135c191cafb 100644 --- a/src/test/ui/issues/issue-17732.rs +++ b/src/test/ui/issues/issue-17732.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-17746.rs b/src/test/ui/issues/issue-17746.rs index 45c5b858ecd17..847b2eb60bbb5 100644 --- a/src/test/ui/issues/issue-17746.rs +++ b/src/test/ui/issues/issue-17746.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Regression test for #17746 diff --git a/src/test/ui/issues/issue-17904.rs b/src/test/ui/issues/issue-17904.rs index 2fe54957b3c08..d916abb9c7384 100644 --- a/src/test/ui/issues/issue-17904.rs +++ b/src/test/ui/issues/issue-17904.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test that we can parse where clauses on various forms of tuple // structs. diff --git a/src/test/ui/issues/issue-18083.rs b/src/test/ui/issues/issue-18083.rs index c2cf2919ff0c5..f159ed4a0cecc 100644 --- a/src/test/ui/issues/issue-18083.rs +++ b/src/test/ui/issues/issue-18083.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_imports)] // These crossed imports should resolve fine, and not block on diff --git a/src/test/ui/issues/issue-18088.rs b/src/test/ui/issues/issue-18088.rs index 67000d9a6ec3f..06f259958f822 100644 --- a/src/test/ui/issues/issue-18088.rs +++ b/src/test/ui/issues/issue-18088.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Indexable: std::ops::Index { fn index2(&self, i: usize) -> &T { diff --git a/src/test/ui/issues/issue-18188.rs b/src/test/ui/issues/issue-18188.rs index 4d0c4464759c6..da10a8647bac6 100644 --- a/src/test/ui/issues/issue-18188.rs +++ b/src/test/ui/issues/issue-18188.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 pub trait Promisable: Send + Sync {} diff --git a/src/test/ui/issues/issue-1821.rs b/src/test/ui/issues/issue-1821.rs index 0177b70a69885..db97a507b689a 100644 --- a/src/test/ui/issues/issue-1821.rs +++ b/src/test/ui/issues/issue-1821.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-18446-2.rs b/src/test/ui/issues/issue-18446-2.rs index 3e04a914d4586..6b984c13da5d3 100644 --- a/src/test/ui/issues/issue-18446-2.rs +++ b/src/test/ui/issues/issue-18446-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test that methods in trait impls should override default methods. diff --git a/src/test/ui/issues/issue-1866.rs b/src/test/ui/issues/issue-1866.rs index 3de547bfe6fce..0223e2ebea926 100644 --- a/src/test/ui/issues/issue-1866.rs +++ b/src/test/ui/issues/issue-1866.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-18738.rs b/src/test/ui/issues/issue-18738.rs index c3bd022fa443c..ec4429234bc59 100644 --- a/src/test/ui/issues/issue-18738.rs +++ b/src/test/ui/issues/issue-18738.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { diff --git a/src/test/ui/issues/issue-18809.rs b/src/test/ui/issues/issue-18809.rs index fb31666b22eb5..9b8275f811999 100644 --- a/src/test/ui/issues/issue-18809.rs +++ b/src/test/ui/issues/issue-18809.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Tup { type T0; type T1; diff --git a/src/test/ui/issues/issue-18906.rs b/src/test/ui/issues/issue-18906.rs index 0b9625b1868ef..387fd41fb7ae7 100644 --- a/src/test/ui/issues/issue-18906.rs +++ b/src/test/ui/issues/issue-18906.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-18988.rs b/src/test/ui/issues/issue-18988.rs index 7fe662e907d73..6dbfd3a0a982a 100644 --- a/src/test/ui/issues/issue-18988.rs +++ b/src/test/ui/issues/issue-18988.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] pub trait Foo : Send { } diff --git a/src/test/ui/issues/issue-19037.rs b/src/test/ui/issues/issue-19037.rs index 4efc0719ffbb2..30497d3e94f58 100644 --- a/src/test/ui/issues/issue-19037.rs +++ b/src/test/ui/issues/issue-19037.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-19081.rs b/src/test/ui/issues/issue-19081.rs index b487cdd5c7574..0948cd3271b1c 100644 --- a/src/test/ui/issues/issue-19081.rs +++ b/src/test/ui/issues/issue-19081.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Hasher { type State; diff --git a/src/test/ui/issues/issue-19097.rs b/src/test/ui/issues/issue-19097.rs index 8055e10625157..c800e0bd12a08 100644 --- a/src/test/ui/issues/issue-19097.rs +++ b/src/test/ui/issues/issue-19097.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // regression test for #19097 diff --git a/src/test/ui/issues/issue-19098.rs b/src/test/ui/issues/issue-19098.rs index 690fe944097c0..37c0d7f05222b 100644 --- a/src/test/ui/issues/issue-19098.rs +++ b/src/test/ui/issues/issue-19098.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Handler { fn handle(&self, _: &mut String); } diff --git a/src/test/ui/issues/issue-19102.rs b/src/test/ui/issues/issue-19102.rs index 962cd8d3f6f54..76ed3efc4ed49 100644 --- a/src/test/ui/issues/issue-19102.rs +++ b/src/test/ui/issues/issue-19102.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_imports)] #![deny(unused_qualifications)] diff --git a/src/test/ui/issues/issue-19129-1.rs b/src/test/ui/issues/issue-19129-1.rs index 4be2cc6d1797b..e17ee053f33d8 100644 --- a/src/test/ui/issues/issue-19129-1.rs +++ b/src/test/ui/issues/issue-19129-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Trait { diff --git a/src/test/ui/issues/issue-19129-2.rs b/src/test/ui/issues/issue-19129-2.rs index d11ef8af709ef..30c64573a1532 100644 --- a/src/test/ui/issues/issue-19129-2.rs +++ b/src/test/ui/issues/issue-19129-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_variables)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-19398.rs b/src/test/ui/issues/issue-19398.rs index 5daa14b7cb7bb..28d266a1d61a2 100644 --- a/src/test/ui/issues/issue-19398.rs +++ b/src/test/ui/issues/issue-19398.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait T { diff --git a/src/test/ui/issues/issue-19404.rs b/src/test/ui/issues/issue-19404.rs index 59544393bae05..40c9fdac7b01f 100644 --- a/src/test/ui/issues/issue-19404.rs +++ b/src/test/ui/issues/issue-19404.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] use std::any::TypeId; diff --git a/src/test/ui/issues/issue-19479.rs b/src/test/ui/issues/issue-19479.rs index 8b78952a6e2b1..c134d85c7e93d 100644 --- a/src/test/ui/issues/issue-19479.rs +++ b/src/test/ui/issues/issue-19479.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Base { diff --git a/src/test/ui/issues/issue-19631.rs b/src/test/ui/issues/issue-19631.rs index 8c58331e581b7..015758dd6e1d2 100644 --- a/src/test/ui/issues/issue-19631.rs +++ b/src/test/ui/issues/issue-19631.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-19632.rs b/src/test/ui/issues/issue-19632.rs index b032b67c1ebd1..ddd87a9f6e978 100644 --- a/src/test/ui/issues/issue-19632.rs +++ b/src/test/ui/issues/issue-19632.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-19850.rs b/src/test/ui/issues/issue-19850.rs index fb64ef8940557..d51cf0cfcb980 100644 --- a/src/test/ui/issues/issue-19850.rs +++ b/src/test/ui/issues/issue-19850.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_variables)] // Test that `::Output` and `Self::Output` are accepted as type annotations in let // bindings diff --git a/src/test/ui/issues/issue-19982.rs b/src/test/ui/issues/issue-19982.rs index 6b5a4b2c10eda..fb88781ee283a 100644 --- a/src/test/ui/issues/issue-19982.rs +++ b/src/test/ui/issues/issue-19982.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(fn_traits, unboxed_closures)] diff --git a/src/test/ui/issues/issue-20009.rs b/src/test/ui/issues/issue-20009.rs index 6228d044ad11a..730f1a9a162a2 100644 --- a/src/test/ui/issues/issue-20009.rs +++ b/src/test/ui/issues/issue-20009.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Check that associated types are `Sized` // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-20091.rs b/src/test/ui/issues/issue-20091.rs index 4ea567d25ca53..68e0f65ca2382 100644 --- a/src/test/ui/issues/issue-20091.rs +++ b/src/test/ui/issues/issue-20091.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(stable_features)] // ignore-cloudabi no processes diff --git a/src/test/ui/issues/issue-20186.rs b/src/test/ui/issues/issue-20186.rs index 98d856e172a2c..28cbde772c51d 100644 --- a/src/test/ui/issues/issue-20186.rs +++ b/src/test/ui/issues/issue-20186.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] struct Foo; diff --git a/src/test/ui/issues/issue-20396.rs b/src/test/ui/issues/issue-20396.rs index 0e69b7f3d1e0c..5e0411b2cd259 100644 --- a/src/test/ui/issues/issue-20396.rs +++ b/src/test/ui/issues/issue-20396.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/src/test/ui/issues/issue-20414.rs b/src/test/ui/issues/issue-20414.rs index 1653a9da0045a..5c6929d45d199 100644 --- a/src/test/ui/issues/issue-20414.rs +++ b/src/test/ui/issues/issue-20414.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-20454.rs b/src/test/ui/issues/issue-20454.rs index d4920c0c75903..13ce1daf30a2a 100644 --- a/src/test/ui/issues/issue-20454.rs +++ b/src/test/ui/issues/issue-20454.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_must_use)] use std::thread; diff --git a/src/test/ui/issues/issue-2063-resource.rs b/src/test/ui/issues/issue-2063-resource.rs index 6ed3e027ffa48..ea4cbf2cedeb7 100644 --- a/src/test/ui/issues/issue-2063-resource.rs +++ b/src/test/ui/issues/issue-2063-resource.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-20644.rs b/src/test/ui/issues/issue-20644.rs index db32344864c46..bde65229ec286 100644 --- a/src/test/ui/issues/issue-20644.rs +++ b/src/test/ui/issues/issue-20644.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_imports)] #![allow(stable_features)] diff --git a/src/test/ui/issues/issue-20763-1.rs b/src/test/ui/issues/issue-20763-1.rs index c5b2852094591..0f0ac8f646203 100644 --- a/src/test/ui/issues/issue-20763-1.rs +++ b/src/test/ui/issues/issue-20763-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-20763-2.rs b/src/test/ui/issues/issue-20763-2.rs index cfa252b095e47..e3b566d050340 100644 --- a/src/test/ui/issues/issue-20763-2.rs +++ b/src/test/ui/issues/issue-20763-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-20797.rs b/src/test/ui/issues/issue-20797.rs index e504b4705daf2..bda7e8f818b15 100644 --- a/src/test/ui/issues/issue-20797.rs +++ b/src/test/ui/issues/issue-20797.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // ignore-cloudabi no std::fs // Regression test for #20797. diff --git a/src/test/ui/issues/issue-20825-2.rs b/src/test/ui/issues/issue-20825-2.rs index cceed54218669..7d72ef839eab7 100644 --- a/src/test/ui/issues/issue-20825-2.rs +++ b/src/test/ui/issues/issue-20825-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Subscriber { type Input; } diff --git a/src/test/ui/issues/issue-21140.rs b/src/test/ui/issues/issue-21140.rs index 86d4e63670f3b..92834bbb0e491 100644 --- a/src/test/ui/issues/issue-21140.rs +++ b/src/test/ui/issues/issue-21140.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Trait where Self::Out: std::fmt::Display { type Out; } diff --git a/src/test/ui/issues/issue-21174-2.rs b/src/test/ui/issues/issue-21174-2.rs index 145b062baf678..351a98d5c85b7 100644 --- a/src/test/ui/issues/issue-21174-2.rs +++ b/src/test/ui/issues/issue-21174-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] trait Trait<'a> { diff --git a/src/test/ui/issues/issue-21245.rs b/src/test/ui/issues/issue-21245.rs index edf482afc53d4..d0aa16bfb1645 100644 --- a/src/test/ui/issues/issue-21245.rs +++ b/src/test/ui/issues/issue-21245.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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 diff --git a/src/test/ui/issues/issue-21363.rs b/src/test/ui/issues/issue-21363.rs index 12efce9496efa..d5f1eec061d20 100644 --- a/src/test/ui/issues/issue-21363.rs +++ b/src/test/ui/issues/issue-21363.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #![no_implicit_prelude] diff --git a/src/test/ui/issues/issue-21402.rs b/src/test/ui/issues/issue-21402.rs index 518d3cfe5a660..21e0d58b5f4a3 100644 --- a/src/test/ui/issues/issue-21402.rs +++ b/src/test/ui/issues/issue-21402.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-21520.rs b/src/test/ui/issues/issue-21520.rs index 450448f1a1185..133bcc2360a22 100644 --- a/src/test/ui/issues/issue-21520.rs +++ b/src/test/ui/issues/issue-21520.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test that the requirement (in `Bar`) that `T::Bar : 'static` does // not wind up propagating to `T`. diff --git a/src/test/ui/issues/issue-21562.rs b/src/test/ui/issues/issue-21562.rs index e31316d0709b0..2f3ee7b749091 100644 --- a/src/test/ui/issues/issue-21562.rs +++ b/src/test/ui/issues/issue-21562.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-21622.rs b/src/test/ui/issues/issue-21622.rs index 2b80f2f36c5ad..4aae089943f5b 100644 --- a/src/test/ui/issues/issue-21622.rs +++ b/src/test/ui/issues/issue-21622.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/issues/issue-21634.rs b/src/test/ui/issues/issue-21634.rs index 8941bb1c24321..36b207bb2a481 100644 --- a/src/test/ui/issues/issue-21634.rs +++ b/src/test/ui/issues/issue-21634.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/src/test/ui/issues/issue-21726.rs b/src/test/ui/issues/issue-21726.rs index f2065976b35d0..1c8284c8295dc 100644 --- a/src/test/ui/issues/issue-21726.rs +++ b/src/test/ui/issues/issue-21726.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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 diff --git a/src/test/ui/issues/issue-21891.rs b/src/test/ui/issues/issue-21891.rs index 9b1e44c181759..de0aa2919cfbc 100644 --- a/src/test/ui/issues/issue-21891.rs +++ b/src/test/ui/issues/issue-21891.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-22066.rs b/src/test/ui/issues/issue-22066.rs index 8c0b664d78ad5..fbf31aa42437c 100644 --- a/src/test/ui/issues/issue-22066.rs +++ b/src/test/ui/issues/issue-22066.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait LineFormatter<'a> { type Iter: Iterator + 'a; fn iter(&'a self, line: &'a str) -> Self::Iter; diff --git a/src/test/ui/issues/issue-22356.rs b/src/test/ui/issues/issue-22356.rs index 3f3b1d3e5f1d9..ec4695e5e0ac5 100644 --- a/src/test/ui/issues/issue-22356.rs +++ b/src/test/ui/issues/issue-22356.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(type_alias_bounds)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-22375.rs b/src/test/ui/issues/issue-22375.rs index bae7b2bfab453..201aea3a05c00 100644 --- a/src/test/ui/issues/issue-22375.rs +++ b/src/test/ui/issues/issue-22375.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait A> {} fn main() {} diff --git a/src/test/ui/issues/issue-22471.rs b/src/test/ui/issues/issue-22471.rs index a22c7e6173e17..befccc19bf8ef 100644 --- a/src/test/ui/issues/issue-22471.rs +++ b/src/test/ui/issues/issue-22471.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(type_alias_bounds)] diff --git a/src/test/ui/issues/issue-22777.rs b/src/test/ui/issues/issue-22777.rs index f9b264623d6bb..81efb250dfa96 100644 --- a/src/test/ui/issues/issue-22777.rs +++ b/src/test/ui/issues/issue-22777.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test is reduced from libsyntax. 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. diff --git a/src/test/ui/issues/issue-22781.rs b/src/test/ui/issues/issue-22781.rs index a7b94c106a4c8..37f40aa042140 100644 --- a/src/test/ui/issues/issue-22781.rs +++ b/src/test/ui/issues/issue-22781.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_variables)] use std::collections::HashMap; use std::collections::hash_map::Entry::Vacant; diff --git a/src/test/ui/issues/issue-22814.rs b/src/test/ui/issues/issue-22814.rs index bcc7a8a5ae0a3..065e7edc67e07 100644 --- a/src/test/ui/issues/issue-22814.rs +++ b/src/test/ui/issues/issue-22814.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Test {} macro_rules! test { diff --git a/src/test/ui/issues/issue-22894.rs b/src/test/ui/issues/issue-22894.rs index f5b26de54f519..7b1513a10c0ef 100644 --- a/src/test/ui/issues/issue-22894.rs +++ b/src/test/ui/issues/issue-22894.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[allow(dead_code)] static X: &'static str = &*""; fn main() {} diff --git a/src/test/ui/issues/issue-2311-2.rs b/src/test/ui/issues/issue-2311-2.rs index 40cda23186a47..f735338fcdbc9 100644 --- a/src/test/ui/issues/issue-2311-2.rs +++ b/src/test/ui/issues/issue-2311-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-2311.rs b/src/test/ui/issues/issue-2311.rs index 07b9951e68d39..151ad4e26645b 100644 --- a/src/test/ui/issues/issue-2311.rs +++ b/src/test/ui/issues/issue-2311.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(non_camel_case_types)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-2312.rs b/src/test/ui/issues/issue-2312.rs index 1fc7b5a3f34c5..b445f9581b345 100644 --- a/src/test/ui/issues/issue-2312.rs +++ b/src/test/ui/issues/issue-2312.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-23406.rs b/src/test/ui/issues/issue-23406.rs index 9d77af0914f17..2e57b16e3c7f0 100644 --- a/src/test/ui/issues/issue-23406.rs +++ b/src/test/ui/issues/issue-23406.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Inner { type T; diff --git a/src/test/ui/issues/issue-23442.rs b/src/test/ui/issues/issue-23442.rs index c3b613a06cdfe..659e1e07942fe 100644 --- a/src/test/ui/issues/issue-23442.rs +++ b/src/test/ui/issues/issue-23442.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::marker::PhantomData; diff --git a/src/test/ui/issues/issue-23477.rs b/src/test/ui/issues/issue-23477.rs index f363e6a0f4730..b10b2e49616fb 100644 --- a/src/test/ui/issues/issue-23477.rs +++ b/src/test/ui/issues/issue-23477.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compiler-flags: -g pub struct Dst { diff --git a/src/test/ui/issues/issue-23550.rs b/src/test/ui/issues/issue-23550.rs index 370d5c5aa3ea5..fad0ad7eccaa4 100644 --- a/src/test/ui/issues/issue-23550.rs +++ b/src/test/ui/issues/issue-23550.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/src/test/ui/issues/issue-23649-3.rs b/src/test/ui/issues/issue-23649-3.rs index 718fe606b80de..febdc4256c757 100644 --- a/src/test/ui/issues/issue-23649-3.rs +++ b/src/test/ui/issues/issue-23649-3.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq)] struct Slice { slice: [u8] } diff --git a/src/test/ui/issues/issue-24085.rs b/src/test/ui/issues/issue-24085.rs index d06647762a9b8..dc2de922ff008 100644 --- a/src/test/ui/issues/issue-24085.rs +++ b/src/test/ui/issues/issue-24085.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-24161.rs b/src/test/ui/issues/issue-24161.rs index 99b09ba74d5d9..c5c8651d43bad 100644 --- a/src/test/ui/issues/issue-24161.rs +++ b/src/test/ui/issues/issue-24161.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[derive(Copy,Clone)] struct Functions { diff --git a/src/test/ui/issues/issue-24227.rs b/src/test/ui/issues/issue-24227.rs index 83e12caff6dd0..eaadaf7c449df 100644 --- a/src/test/ui/issues/issue-24227.rs +++ b/src/test/ui/issues/issue-24227.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This resulted in an ICE. Test for future-proofing // Issue #24227 diff --git a/src/test/ui/issues/issue-24338.rs b/src/test/ui/issues/issue-24338.rs index fafeff06426dd..09cc99f95077a 100644 --- a/src/test/ui/issues/issue-24338.rs +++ b/src/test/ui/issues/issue-24338.rs @@ -1,5 +1,5 @@ // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait DictLike<'a> { type ItemsIterator: Iterator; diff --git a/src/test/ui/issues/issue-24389.rs b/src/test/ui/issues/issue-24389.rs index da48a76e2007d..63d1687af5073 100644 --- a/src/test/ui/issues/issue-24389.rs +++ b/src/test/ui/issues/issue-24389.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Foo; diff --git a/src/test/ui/issues/issue-24434.rs b/src/test/ui/issues/issue-24434.rs index 2424a1c92cd64..b500b9d56dd83 100644 --- a/src/test/ui/issues/issue-24434.rs +++ b/src/test/ui/issues/issue-24434.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:--cfg set1 #![cfg_attr(set1, feature(rustc_attrs))] diff --git a/src/test/ui/issues/issue-2487-a.rs b/src/test/ui/issues/issue-2487-a.rs index 36e121ddb7ad9..a43933d20202d 100644 --- a/src/test/ui/issues/issue-2487-a.rs +++ b/src/test/ui/issues/issue-2487-a.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-2502.rs b/src/test/ui/issues/issue-2502.rs index 29b68c94c2e7c..9a2bbb82413f6 100644 --- a/src/test/ui/issues/issue-2502.rs +++ b/src/test/ui/issues/issue-2502.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/issues/issue-25180.rs b/src/test/ui/issues/issue-25180.rs index 297f403c05ee7..12f8f88a17034 100644 --- a/src/test/ui/issues/issue-25180.rs +++ b/src/test/ui/issues/issue-25180.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-25394.rs b/src/test/ui/issues/issue-25394.rs index d1638aa98a0b0..c41b554df142a 100644 --- a/src/test/ui/issues/issue-25394.rs +++ b/src/test/ui/issues/issue-25394.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[derive(Debug)] struct Row([T]); diff --git a/src/test/ui/issues/issue-25579.rs b/src/test/ui/issues/issue-25579.rs index 31ba102746b34..32b4b75b0809c 100644 --- a/src/test/ui/issues/issue-25579.rs +++ b/src/test/ui/issues/issue-25579.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) enum Sexpression { Num(()), diff --git a/src/test/ui/issues/issue-26095.rs b/src/test/ui/issues/issue-26095.rs index 707cf1df512c2..1e3cc902e56b2 100644 --- a/src/test/ui/issues/issue-26095.rs +++ b/src/test/ui/issues/issue-26095.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-2611-3.rs b/src/test/ui/issues/issue-2611-3.rs index 5d4b65628de82..7335d53f8a640 100644 --- a/src/test/ui/issues/issue-2611-3.rs +++ b/src/test/ui/issues/issue-2611-3.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Tests that impls are allowed to have looser, more permissive bounds // than the traits require. diff --git a/src/test/ui/issues/issue-26205.rs b/src/test/ui/issues/issue-26205.rs index 01b71652c0538..45ca998a831ef 100644 --- a/src/test/ui/issues/issue-26205.rs +++ b/src/test/ui/issues/issue-26205.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::ops::{Deref, DerefMut}; diff --git a/src/test/ui/issues/issue-26646.rs b/src/test/ui/issues/issue-26646.rs index 6aa5e03996b9d..d6f51ce9c99dc 100644 --- a/src/test/ui/issues/issue-26646.rs +++ b/src/test/ui/issues/issue-26646.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unused_attributes)] #[repr(C)] diff --git a/src/test/ui/issues/issue-26997.rs b/src/test/ui/issues/issue-26997.rs index dd48440720fda..a2b32a13678a5 100644 --- a/src/test/ui/issues/issue-26997.rs +++ b/src/test/ui/issues/issue-26997.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] pub struct Foo { x: isize, diff --git a/src/test/ui/issues/issue-27105.rs b/src/test/ui/issues/issue-27105.rs index 1aafa11768fd3..e7584d941ba6c 100644 --- a/src/test/ui/issues/issue-27105.rs +++ b/src/test/ui/issues/issue-27105.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::cell::RefCell; use std::rc::Rc; diff --git a/src/test/ui/issues/issue-27281.rs b/src/test/ui/issues/issue-27281.rs index 8403d9b450787..58b8f07bca6d8 100644 --- a/src/test/ui/issues/issue-27281.rs +++ b/src/test/ui/issues/issue-27281.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Trait<'a> { type T; type U; diff --git a/src/test/ui/issues/issue-2748-a.rs b/src/test/ui/issues/issue-2748-a.rs index 683a931cc3d5b..5f566e186eb20 100644 --- a/src/test/ui/issues/issue-2748-a.rs +++ b/src/test/ui/issues/issue-2748-a.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/src/test/ui/issues/issue-27583.rs b/src/test/ui/issues/issue-27583.rs index 763e9ebe24b22..9981f867bd00b 100644 --- a/src/test/ui/issues/issue-27583.rs +++ b/src/test/ui/issues/issue-27583.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-27889.rs b/src/test/ui/issues/issue-27889.rs index 22de7c7cfa537..bb5a186b457d9 100644 --- a/src/test/ui/issues/issue-27889.rs +++ b/src/test/ui/issues/issue-27889.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_assignments)] #![allow(unused_variables)] // Test that a field can have the same name in different variants diff --git a/src/test/ui/issues/issue-2804-2.rs b/src/test/ui/issues/issue-2804-2.rs index d5157420617d7..68933fc2e8a3b 100644 --- a/src/test/ui/issues/issue-2804-2.rs +++ b/src/test/ui/issues/issue-2804-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-28279.rs b/src/test/ui/issues/issue-28279.rs index fab91160a88be..e36a9551ab549 100644 --- a/src/test/ui/issues/issue-28279.rs +++ b/src/test/ui/issues/issue-28279.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::rc::Rc; diff --git a/src/test/ui/issues/issue-28561.rs b/src/test/ui/issues/issue-28561.rs index 9dcce9991f73c..cc4e63696e5f3 100644 --- a/src/test/ui/issues/issue-28561.rs +++ b/src/test/ui/issues/issue-28561.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] struct Array { f00: [T; 00], diff --git a/src/test/ui/issues/issue-28600.rs b/src/test/ui/issues/issue-28600.rs index 44a85924e3d54..05c4050b03a43 100644 --- a/src/test/ui/issues/issue-28600.rs +++ b/src/test/ui/issues/issue-28600.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // #28600 ICE: pub extern fn with parameter type &str inside struct impl struct Test; diff --git a/src/test/ui/issues/issue-28822.rs b/src/test/ui/issues/issue-28822.rs index 7381c348cd61a..2c0c01aa827ab 100644 --- a/src/test/ui/issues/issue-28822.rs +++ b/src/test/ui/issues/issue-28822.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] fn main() {} diff --git a/src/test/ui/issues/issue-28871.rs b/src/test/ui/issues/issue-28871.rs index b7e02b85878f2..43564dfcc46bf 100644 --- a/src/test/ui/issues/issue-28871.rs +++ b/src/test/ui/issues/issue-28871.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-28936.rs b/src/test/ui/issues/issue-28936.rs index 5365adf3e80de..9267491aafd9d 100644 --- a/src/test/ui/issues/issue-28936.rs +++ b/src/test/ui/issues/issue-28936.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub type Session = i32; pub struct StreamParser<'a, T> { _tokens: T, diff --git a/src/test/ui/issues/issue-28999.rs b/src/test/ui/issues/issue-28999.rs index 4f6fa412e8b93..888a8010a2f6b 100644 --- a/src/test/ui/issues/issue-28999.rs +++ b/src/test/ui/issues/issue-28999.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct Xyz<'a, V> { pub v: (V, &'a u32), } diff --git a/src/test/ui/issues/issue-29030.rs b/src/test/ui/issues/issue-29030.rs index 9ac7742e4f8db..f9e89840314d4 100644 --- a/src/test/ui/issues/issue-29030.rs +++ b/src/test/ui/issues/issue-29030.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[derive(Debug)] struct Message<'a, P: 'a = &'a [u8]> { diff --git a/src/test/ui/issues/issue-29037.rs b/src/test/ui/issues/issue-29037.rs index e0eb71f5de6ec..b1ca76be10d0b 100644 --- a/src/test/ui/issues/issue-29037.rs +++ b/src/test/ui/issues/issue-29037.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // This test ensures that each pointer type `P` is covariant in `X`. diff --git a/src/test/ui/issues/issue-2904.rs b/src/test/ui/issues/issue-2904.rs index 42f71a1b09615..36bc8002f99db 100644 --- a/src/test/ui/issues/issue-2904.rs +++ b/src/test/ui/issues/issue-2904.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/src/test/ui/issues/issue-29048.rs b/src/test/ui/issues/issue-29048.rs index 6c4b6183c3761..e3ccb0d6579d7 100644 --- a/src/test/ui/issues/issue-29048.rs +++ b/src/test/ui/issues/issue-29048.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct Chan; pub struct ChanSelect<'c, T> { chans: Vec<(&'c Chan, T)>, diff --git a/src/test/ui/issues/issue-29071.rs b/src/test/ui/issues/issue-29071.rs index 1ea4a54226c6c..7e016a715cd1f 100644 --- a/src/test/ui/issues/issue-29071.rs +++ b/src/test/ui/issues/issue-29071.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-29276.rs b/src/test/ui/issues/issue-29276.rs index 2a0358bc52ab0..2532dac977293 100644 --- a/src/test/ui/issues/issue-29276.rs +++ b/src/test/ui/issues/issue-29276.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct S([u8; { struct Z; 0 }]); diff --git a/src/test/ui/issues/issue-29516.rs b/src/test/ui/issues/issue-29516.rs index 8082694e15c02..8966730fd8739 100644 --- a/src/test/ui/issues/issue-29516.rs +++ b/src/test/ui/issues/issue-29516.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(optin_builtin_traits)] auto trait NotSame {} diff --git a/src/test/ui/issues/issue-29540.rs b/src/test/ui/issues/issue-29540.rs index b68205eda8615..e472f71aa7f25 100644 --- a/src/test/ui/issues/issue-29540.rs +++ b/src/test/ui/issues/issue-29540.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[derive(Debug)] pub struct Config { pub name: String, diff --git a/src/test/ui/issues/issue-29710.rs b/src/test/ui/issues/issue-29710.rs index 58907e78e4819..d4de756e56fa0 100644 --- a/src/test/ui/issues/issue-29710.rs +++ b/src/test/ui/issues/issue-29710.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unused_results)] #![allow(dead_code)] diff --git a/src/test/ui/issues/issue-29740.rs b/src/test/ui/issues/issue-29740.rs index f37d868ab7ebc..50a03d86acb58 100644 --- a/src/test/ui/issues/issue-29740.rs +++ b/src/test/ui/issues/issue-29740.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-29743.rs b/src/test/ui/issues/issue-29743.rs index 5bc3b0c537a77..2598b07490e95 100644 --- a/src/test/ui/issues/issue-29743.rs +++ b/src/test/ui/issues/issue-29743.rs @@ -1,5 +1,5 @@ // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let mut i = [1, 2, 3]; diff --git a/src/test/ui/issues/issue-31260.rs b/src/test/ui/issues/issue-31260.rs index f7e717c59ac02..608900301e0ef 100644 --- a/src/test/ui/issues/issue-31260.rs +++ b/src/test/ui/issues/issue-31260.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] pub struct Struct { pub field: K, diff --git a/src/test/ui/issues/issue-3149.rs b/src/test/ui/issues/issue-3149.rs index c9a6f537757d0..da3fe9ad6ec3e 100644 --- a/src/test/ui/issues/issue-3149.rs +++ b/src/test/ui/issues/issue-3149.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_snake_case)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-31597.rs b/src/test/ui/issues/issue-31597.rs index 3962f13fe9b38..1d28a91ea7e01 100644 --- a/src/test/ui/issues/issue-31597.rs +++ b/src/test/ui/issues/issue-31597.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Make { type Out; diff --git a/src/test/ui/issues/issue-32324.rs b/src/test/ui/issues/issue-32324.rs index 9abbe321604b4..eaad98d678537 100644 --- a/src/test/ui/issues/issue-32324.rs +++ b/src/test/ui/issues/issue-32324.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Resources { diff --git a/src/test/ui/issues/issue-33140-traitobject-crate.rs b/src/test/ui/issues/issue-33140-traitobject-crate.rs index 078f3f3dd2cd2..03567b20a8fa6 100644 --- a/src/test/ui/issues/issue-33140-traitobject-crate.rs +++ b/src/test/ui/issues/issue-33140-traitobject-crate.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(order_dependent_trait_objects)] diff --git a/src/test/ui/issues/issue-33264.rs b/src/test/ui/issues/issue-33264.rs index 51608b48be27c..e6370bc84deaf 100644 --- a/src/test/ui/issues/issue-33264.rs +++ b/src/test/ui/issues/issue-33264.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // only-x86_64 #![allow(dead_code, non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-33287.rs b/src/test/ui/issues/issue-33287.rs index cc47e58fcdc15..036a1e3768843 100644 --- a/src/test/ui/issues/issue-33287.rs +++ b/src/test/ui/issues/issue-33287.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] const A: [u32; 1] = [0]; diff --git a/src/test/ui/issues/issue-33903.rs b/src/test/ui/issues/issue-33903.rs index 4fdc8dda8b42c..6a8305dabebf8 100644 --- a/src/test/ui/issues/issue-33903.rs +++ b/src/test/ui/issues/issue-33903.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Issue 33903: // Built-in indexing should be used even when the index is not diff --git a/src/test/ui/issues/issue-34194.rs b/src/test/ui/issues/issue-34194.rs index b65de91d69b26..ea89e4cbdeb88 100644 --- a/src/test/ui/issues/issue-34194.rs +++ b/src/test/ui/issues/issue-34194.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A { diff --git a/src/test/ui/issues/issue-3424.rs b/src/test/ui/issues/issue-3424.rs index 19f9f13e14416..a8ff03e2a2481 100644 --- a/src/test/ui/issues/issue-3424.rs +++ b/src/test/ui/issues/issue-3424.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] // rustc --test ignores2.rs && ./ignores2 diff --git a/src/test/ui/issues/issue-34751.rs b/src/test/ui/issues/issue-34751.rs index cca06c573e087..a921cb50612dd 100644 --- a/src/test/ui/issues/issue-34751.rs +++ b/src/test/ui/issues/issue-34751.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // #34751 ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)' diff --git a/src/test/ui/issues/issue-34780.rs b/src/test/ui/issues/issue-34780.rs index bfe444e5d3fc0..3202ef6402162 100644 --- a/src/test/ui/issues/issue-34780.rs +++ b/src/test/ui/issues/issue-34780.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(stable_features)] #![feature(associated_consts)] diff --git a/src/test/ui/issues/issue-35376.rs b/src/test/ui/issues/issue-35376.rs index 2a80c9f05d84b..b415d6554058f 100644 --- a/src/test/ui/issues/issue-35376.rs +++ b/src/test/ui/issues/issue-35376.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(specialization)] fn main() {} diff --git a/src/test/ui/issues/issue-35546.rs b/src/test/ui/issues/issue-35546.rs index 500ba48e0b71c..e2f0f98d57b4f 100644 --- a/src/test/ui/issues/issue-35546.rs +++ b/src/test/ui/issues/issue-35546.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/issues/issue-3563-2.rs b/src/test/ui/issues/issue-3563-2.rs index 48f7c845d5e84..5ab668eed1899 100644 --- a/src/test/ui/issues/issue-3563-2.rs +++ b/src/test/ui/issues/issue-3563-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait Canvas { diff --git a/src/test/ui/issues/issue-36075.rs b/src/test/ui/issues/issue-36075.rs index c9ca2f71341ed..00c8cf1fb8aba 100644 --- a/src/test/ui/issues/issue-36075.rs +++ b/src/test/ui/issues/issue-36075.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait DeclarationParser { type Declaration; diff --git a/src/test/ui/issues/issue-3609.rs b/src/test/ui/issues/issue-3609.rs index 9bccb2a21e33c..e8fc073a15886 100644 --- a/src/test/ui/issues/issue-3609.rs +++ b/src/test/ui/issues/issue-3609.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/src/test/ui/issues/issue-36744-without-calls.rs b/src/test/ui/issues/issue-36744-without-calls.rs index 57d63e67f3c0b..4d03d9bbca6b6 100644 --- a/src/test/ui/issues/issue-36744-without-calls.rs +++ b/src/test/ui/issues/issue-36744-without-calls.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/issues/issue-37323.rs b/src/test/ui/issues/issue-37323.rs index a7cf0cd1bd53d..61c8029adf53b 100644 --- a/src/test/ui/issues/issue-37323.rs +++ b/src/test/ui/issues/issue-37323.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/src/test/ui/issues/issue-37598.rs b/src/test/ui/issues/issue-37598.rs index 209f797b15cd8..1bec3d340d665 100644 --- a/src/test/ui/issues/issue-37598.rs +++ b/src/test/ui/issues/issue-37598.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![feature(slice_patterns)] diff --git a/src/test/ui/issues/issue-37655.rs b/src/test/ui/issues/issue-37655.rs index bfc6406b921c0..fecff4e024606 100644 --- a/src/test/ui/issues/issue-37655.rs +++ b/src/test/ui/issues/issue-37655.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-37725.rs b/src/test/ui/issues/issue-37725.rs index a572781f092db..eefdc72f0c3b3 100644 --- a/src/test/ui/issues/issue-37725.rs +++ b/src/test/ui/issues/issue-37725.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Foo { fn foo(&self); diff --git a/src/test/ui/issues/issue-37733.rs b/src/test/ui/issues/issue-37733.rs index 2dcb0cd8cee81..c1df28331a548 100644 --- a/src/test/ui/issues/issue-37733.rs +++ b/src/test/ui/issues/issue-37733.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] type A = for<> fn(); diff --git a/src/test/ui/issues/issue-38727.rs b/src/test/ui/issues/issue-38727.rs index d9f32637a90d0..3c728e9def1e9 100644 --- a/src/test/ui/issues/issue-38727.rs +++ b/src/test/ui/issues/issue-38727.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #[repr(u64)] enum A { diff --git a/src/test/ui/issues/issue-3874.rs b/src/test/ui/issues/issue-3874.rs index 8a7eaf29539cb..b290da5208042 100644 --- a/src/test/ui/issues/issue-3874.rs +++ b/src/test/ui/issues/issue-3874.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-38875/issue-38875.rs b/src/test/ui/issues/issue-38875/issue-38875.rs index df321b8dcbbe7..68981eaf2b568 100644 --- a/src/test/ui/issues/issue-38875/issue-38875.rs +++ b/src/test/ui/issues/issue-38875/issue-38875.rs @@ -1,5 +1,5 @@ // aux-build:issue-38875-b.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) extern crate issue_38875_b; diff --git a/src/test/ui/issues/issue-3888-2.rs b/src/test/ui/issues/issue-3888-2.rs index 27d05b470becf..3d4b184ab6bc5 100644 --- a/src/test/ui/issues/issue-3888-2.rs +++ b/src/test/ui/issues/issue-3888-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-39089.rs b/src/test/ui/issues/issue-39089.rs index 77be9d2c76bdb..12ca9e1da0ffb 100644 --- a/src/test/ui/issues/issue-39089.rs +++ b/src/test/ui/issues/issue-39089.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] fn f Sized>() {} diff --git a/src/test/ui/issues/issue-39467.rs b/src/test/ui/issues/issue-39467.rs index 077e5cefd528f..86e67560008ea 100644 --- a/src/test/ui/issues/issue-39467.rs +++ b/src/test/ui/issues/issue-39467.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] macro_rules! expr { () => { () } } diff --git a/src/test/ui/issues/issue-3979-2.rs b/src/test/ui/issues/issue-3979-2.rs index eec8c85f276c7..f3fcfd2c8fbff 100644 --- a/src/test/ui/issues/issue-3979-2.rs +++ b/src/test/ui/issues/issue-3979-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 trait A { diff --git a/src/test/ui/issues/issue-3991.rs b/src/test/ui/issues/issue-3991.rs index bc63aae0b9eac..b8ff671bf38ae 100644 --- a/src/test/ui/issues/issue-3991.rs +++ b/src/test/ui/issues/issue-3991.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-39984.rs b/src/test/ui/issues/issue-39984.rs index 5018b1c62c770..613aad1a34f1f 100644 --- a/src/test/ui/issues/issue-39984.rs +++ b/src/test/ui/issues/issue-39984.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unreachable_code)] // Regression test for issue #39984. diff --git a/src/test/ui/issues/issue-40136.rs b/src/test/ui/issues/issue-40136.rs index 0849f54374b49..412ddafdd97ce 100644 --- a/src/test/ui/issues/issue-40136.rs +++ b/src/test/ui/issues/issue-40136.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] macro_rules! m { () => { 0 } } diff --git a/src/test/ui/issues/issue-4025.rs b/src/test/ui/issues/issue-4025.rs index fc036f3edd82a..6e009ba6eb444 100644 --- a/src/test/ui/issues/issue-4025.rs +++ b/src/test/ui/issues/issue-4025.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_mut)] /* diff --git a/src/test/ui/issues/issue-40510-2.rs b/src/test/ui/issues/issue-40510-2.rs index 2304badd17dbb..499fa8a04f207 100644 --- a/src/test/ui/issues/issue-40510-2.rs +++ b/src/test/ui/issues/issue-40510-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] fn f() { diff --git a/src/test/ui/issues/issue-40510-4.rs b/src/test/ui/issues/issue-40510-4.rs index 45cd4fd94ef8b..5fad7e4a62917 100644 --- a/src/test/ui/issues/issue-40510-4.rs +++ b/src/test/ui/issues/issue-40510-4.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] fn f() { diff --git a/src/test/ui/issues/issue-40962.rs b/src/test/ui/issues/issue-40962.rs index 50d9276e79a32..c051133cbed08 100644 --- a/src/test/ui/issues/issue-40962.rs +++ b/src/test/ui/issues/issue-40962.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) macro_rules! m { ($i:meta) => { #[derive($i)] diff --git a/src/test/ui/issues/issue-41272.rs b/src/test/ui/issues/issue-41272.rs index 4a43e11f47f2e..9cd2003628635 100644 --- a/src/test/ui/issues/issue-41272.rs +++ b/src/test/ui/issues/issue-41272.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Foo; diff --git a/src/test/ui/issues/issue-41298.rs b/src/test/ui/issues/issue-41298.rs index e8eeabaf3a9e8..c719664de0d06 100644 --- a/src/test/ui/issues/issue-41298.rs +++ b/src/test/ui/issues/issue-41298.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Function { t: T, f: F } diff --git a/src/test/ui/issues/issue-41628.rs b/src/test/ui/issues/issue-41628.rs index b837a1e23466f..92369fdcd4910 100644 --- a/src/test/ui/issues/issue-41628.rs +++ b/src/test/ui/issues/issue-41628.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(dead_code)] #[used] diff --git a/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs b/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs index 4dddc484d332c..6c6cec25a9a49 100644 --- a/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs +++ b/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-41998.rs b/src/test/ui/issues/issue-41998.rs index e54bc201c1db3..2f2842598fc08 100644 --- a/src/test/ui/issues/issue-41998.rs +++ b/src/test/ui/issues/issue-41998.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/src/test/ui/issues/issue-42467.rs b/src/test/ui/issues/issue-42467.rs index 9ad515bdf5a3a..f1a55169ffdfa 100644 --- a/src/test/ui/issues/issue-42467.rs +++ b/src/test/ui/issues/issue-42467.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Foo(T); diff --git a/src/test/ui/issues/issue-42956.rs b/src/test/ui/issues/issue-42956.rs index 34cb04657eba0..8cf0ae0030693 100644 --- a/src/test/ui/issues/issue-42956.rs +++ b/src/test/ui/issues/issue-42956.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(stable_features)] #![feature(associated_consts)] diff --git a/src/test/ui/issues/issue-43057.rs b/src/test/ui/issues/issue-43057.rs index 3ed64bba9046f..7e1d5036f37f1 100644 --- a/src/test/ui/issues/issue-43057.rs +++ b/src/test/ui/issues/issue-43057.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] macro_rules! column { diff --git a/src/test/ui/issues/issue-43357.rs b/src/test/ui/issues/issue-43357.rs index 6b8e7de85093e..3090e229b6dcc 100644 --- a/src/test/ui/issues/issue-43357.rs +++ b/src/test/ui/issues/issue-43357.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Trait { type Output; diff --git a/src/test/ui/issues/issue-43483.rs b/src/test/ui/issues/issue-43483.rs index a123ae4849661..f071d110f327e 100644 --- a/src/test/ui/issues/issue-43483.rs +++ b/src/test/ui/issues/issue-43483.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] trait VecN { diff --git a/src/test/ui/issues/issue-44005.rs b/src/test/ui/issues/issue-44005.rs index f6d1b7073a2b3..f6fe9fcbd89a3 100644 --- a/src/test/ui/issues/issue-44005.rs +++ b/src/test/ui/issues/issue-44005.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub trait Foo<'a> { type Bar; fn foo(&'a self) -> Self::Bar; diff --git a/src/test/ui/issues/issue-44056.rs b/src/test/ui/issues/issue-44056.rs index 8ed371485c214..42f30bf30239a 100644 --- a/src/test/ui/issues/issue-44056.rs +++ b/src/test/ui/issues/issue-44056.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // only-x86_64 // no-prefer-dynamic // compile-flags: -Ctarget-feature=+avx -Clto diff --git a/src/test/ui/issues/issue-44247.rs b/src/test/ui/issues/issue-44247.rs index b45d541f21255..ef244e03857bf 100644 --- a/src/test/ui/issues/issue-44247.rs +++ b/src/test/ui/issues/issue-44247.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait T { type X; diff --git a/src/test/ui/issues/issue-44373-2.rs b/src/test/ui/issues/issue-44373-2.rs index 18b2ce85125f2..7fdc4b1ee5b54 100644 --- a/src/test/ui/issues/issue-44373-2.rs +++ b/src/test/ui/issues/issue-44373-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Foo(bool); diff --git a/src/test/ui/issues/issue-44402.rs b/src/test/ui/issues/issue-44402.rs index 7a2eaac1fd214..29b7eb5ee49c7 100644 --- a/src/test/ui/issues/issue-44402.rs +++ b/src/test/ui/issues/issue-44402.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![feature(never_type)] #![feature(exhaustive_patterns)] diff --git a/src/test/ui/issues/issue-4464.rs b/src/test/ui/issues/issue-4464.rs index c20c1cad66909..13df61124829d 100644 --- a/src/test/ui/issues/issue-4464.rs +++ b/src/test/ui/issues/issue-4464.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-44730.rs b/src/test/ui/issues/issue-44730.rs index 7dae6c8123bd9..93f0445d3433e 100644 --- a/src/test/ui/issues/issue-44730.rs +++ b/src/test/ui/issues/issue-44730.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) //! dox #![deny(missing_docs)] diff --git a/src/test/ui/issues/issue-44851.rs b/src/test/ui/issues/issue-44851.rs index 697b4dcf42745..735678047a539 100644 --- a/src/test/ui/issues/issue-44851.rs +++ b/src/test/ui/issues/issue-44851.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) macro_rules! a { () => { "a" } } diff --git a/src/test/ui/issues/issue-45425.rs b/src/test/ui/issues/issue-45425.rs index a2ef85a2a02c9..99e018ba6c855 100644 --- a/src/test/ui/issues/issue-45425.rs +++ b/src/test/ui/issues/issue-45425.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::ops::Add; diff --git a/src/test/ui/issues/issue-46959.rs b/src/test/ui/issues/issue-46959.rs index e1147ac99ace6..86f1158c1985e 100644 --- a/src/test/ui/issues/issue-46959.rs +++ b/src/test/ui/issues/issue-46959.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(non_camel_case_types)] #[allow(dead_code)] diff --git a/src/test/ui/issues/issue-46964.rs b/src/test/ui/issues/issue-46964.rs index 4688c9b0a1fd0..9cf53973d870a 100644 --- a/src/test/ui/issues/issue-46964.rs +++ b/src/test/ui/issues/issue-46964.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod my_mod { #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct Name<'a> { diff --git a/src/test/ui/issues/issue-47094.rs b/src/test/ui/issues/issue-47094.rs index 6c78a3ba964b4..f17d4f88d9094 100644 --- a/src/test/ui/issues/issue-47094.rs +++ b/src/test/ui/issues/issue-47094.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[repr(C,u8)] enum Foo { diff --git a/src/test/ui/issues/issue-47309.rs b/src/test/ui/issues/issue-47309.rs index a9aeecb61b6a5..03092022d4d55 100644 --- a/src/test/ui/issues/issue-47309.rs +++ b/src/test/ui/issues/issue-47309.rs @@ -3,7 +3,7 @@ // See https://github.com/rust-lang/rust/issues/47309 // compile-flags:-Clink-dead-code -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type="rlib"] diff --git a/src/test/ui/issues/issue-47673.rs b/src/test/ui/issues/issue-47673.rs index 6d7b8f9cc1b0c..0d813e2fad2c8 100644 --- a/src/test/ui/issues/issue-47673.rs +++ b/src/test/ui/issues/issue-47673.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_imports)] use {{}, {}}; diff --git a/src/test/ui/issues/issue-47703-1.rs b/src/test/ui/issues/issue-47703-1.rs index 74323317f1956..95738828647f9 100644 --- a/src/test/ui/issues/issue-47703-1.rs +++ b/src/test/ui/issues/issue-47703-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct AtomicRefMut<'a> { value: &'a mut i32, diff --git a/src/test/ui/issues/issue-47703-tuple.rs b/src/test/ui/issues/issue-47703-tuple.rs index 377eeb67ae1b9..1b285f219dcbc 100644 --- a/src/test/ui/issues/issue-47703-tuple.rs +++ b/src/test/ui/issues/issue-47703-tuple.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct WithDrop; diff --git a/src/test/ui/issues/issue-47703.rs b/src/test/ui/issues/issue-47703.rs index 22f2a1f364d1d..dbf49c7621f67 100644 --- a/src/test/ui/issues/issue-47703.rs +++ b/src/test/ui/issues/issue-47703.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct MyStruct<'a> { field: &'a mut (), diff --git a/src/test/ui/issues/issue-47722.rs b/src/test/ui/issues/issue-47722.rs index cefc872668ceb..b3c344257b6a2 100644 --- a/src/test/ui/issues/issue-47722.rs +++ b/src/test/ui/issues/issue-47722.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Tests that automatic coercions from &mut T to *mut T // allow borrows of T to expire immediately - essentially, that diff --git a/src/test/ui/issues/issue-47789.rs b/src/test/ui/issues/issue-47789.rs index 334bd608add15..28671db09982f 100644 --- a/src/test/ui/issues/issue-47789.rs +++ b/src/test/ui/issues/issue-47789.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(non_upper_case_globals)] static mut x: &'static u32 = &0; diff --git a/src/test/ui/issues/issue-4830.rs b/src/test/ui/issues/issue-4830.rs index cf94094a7985f..3724bb6393ce6 100644 --- a/src/test/ui/issues/issue-4830.rs +++ b/src/test/ui/issues/issue-4830.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-48551.rs b/src/test/ui/issues/issue-48551.rs index b5dd673b0477d..903b2e2992963 100644 --- a/src/test/ui/issues/issue-48551.rs +++ b/src/test/ui/issues/issue-48551.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Regression test for #48551. Covers a case where duplicate candidates // arose during associated type projection. diff --git a/src/test/ui/issues/issue-49556.rs b/src/test/ui/issues/issue-49556.rs index 46d9e749aae23..d3c6d17f416ae 100644 --- a/src/test/ui/issues/issue-49556.rs +++ b/src/test/ui/issues/issue-49556.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn iter<'a>(data: &'a [usize]) -> impl Iterator + 'a { data.iter() .map( diff --git a/src/test/ui/issues/issue-49579.rs b/src/test/ui/issues/issue-49579.rs index dd7b9eeb8d54e..79cc107d4fec2 100644 --- a/src/test/ui/issues/issue-49579.rs +++ b/src/test/ui/issues/issue-49579.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // ignore-emscripten no i128 support fn fibs(n: u32) -> impl Iterator { diff --git a/src/test/ui/issues/issue-49934.rs b/src/test/ui/issues/issue-49934.rs index ad410f30c04d4..e75381afae9ae 100644 --- a/src/test/ui/issues/issue-49934.rs +++ b/src/test/ui/issues/issue-49934.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(stmt_expr_attributes)] #![warn(unused_attributes)] //~ NOTE lint level defined here diff --git a/src/test/ui/issues/issue-50187.rs b/src/test/ui/issues/issue-50187.rs index cda1c4d5faae6..f530c3853e38c 100644 --- a/src/test/ui/issues/issue-50187.rs +++ b/src/test/ui/issues/issue-50187.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(decl_macro)] diff --git a/src/test/ui/issues/issue-50411.rs b/src/test/ui/issues/issue-50411.rs index 1ba47d3b932ef..a32faa69841fd 100644 --- a/src/test/ui/issues/issue-50411.rs +++ b/src/test/ui/issues/issue-50411.rs @@ -4,7 +4,7 @@ // second time. Uncool. // compile-flags:-Zmir-opt-level=3 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _ = (0 .. 1).filter(|_| [1].iter().all(|_| true)).count(); diff --git a/src/test/ui/issues/issue-50471.rs b/src/test/ui/issues/issue-50471.rs index 6868d481962b5..e728e45e60bc2 100644 --- a/src/test/ui/issues/issue-50471.rs +++ b/src/test/ui/issues/issue-50471.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { assert!({false}); diff --git a/src/test/ui/issues/issue-50518.rs b/src/test/ui/issues/issue-50518.rs index d776d181b6268..653b52902d2b5 100644 --- a/src/test/ui/issues/issue-50518.rs +++ b/src/test/ui/issues/issue-50518.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::marker::PhantomData; struct Meta { diff --git a/src/test/ui/issues/issue-50761.rs b/src/test/ui/issues/issue-50761.rs index 70b4bc8b755aa..59d4f9afdaa01 100644 --- a/src/test/ui/issues/issue-50761.rs +++ b/src/test/ui/issues/issue-50761.rs @@ -1,6 +1,6 @@ // Confirm that we don't accidentally divide or mod by zero in llvm_type -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod a { pub trait A {} diff --git a/src/test/ui/issues/issue-50993.rs b/src/test/ui/issues/issue-50993.rs index 772c45dee11d7..b170e09d02d06 100644 --- a/src/test/ui/issues/issue-50993.rs +++ b/src/test/ui/issues/issue-50993.rs @@ -1,5 +1,5 @@ // compile-flags: --crate-type dylib --target thumbv7em-none-eabihf -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // error-pattern: dropping unsupported crate type `dylib` for target `thumbv7em-none-eabihf` #![feature(no_core)] diff --git a/src/test/ui/issues/issue-51655.rs b/src/test/ui/issues/issue-51655.rs index 989fcc041a097..c2ad60fd8cfad 100644 --- a/src/test/ui/issues/issue-51655.rs +++ b/src/test/ui/issues/issue-51655.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] const PATH_DOT: &[u8] = &[b'.']; diff --git a/src/test/ui/issues/issue-51947.rs b/src/test/ui/issues/issue-51947.rs index 7b79807e4d7ff..b5ebf156a2730 100644 --- a/src/test/ui/issues/issue-51947.rs +++ b/src/test/ui/issues/issue-51947.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "lib"] #![feature(linkage)] diff --git a/src/test/ui/issues/issue-52992.rs b/src/test/ui/issues/issue-52992.rs index c58656330e12b..727dd43d57454 100644 --- a/src/test/ui/issues/issue-52992.rs +++ b/src/test/ui/issues/issue-52992.rs @@ -2,7 +2,7 @@ // implied bounds was causing outlives relations that were not // properly handled. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/src/test/ui/issues/issue-53419.rs b/src/test/ui/issues/issue-53419.rs index bf6791734d4e2..64ac0b1c03b97 100644 --- a/src/test/ui/issues/issue-53419.rs +++ b/src/test/ui/issues/issue-53419.rs @@ -1,4 +1,4 @@ -//compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Foo { bar: dyn for<'r> Fn(usize, &'r dyn FnMut()) diff --git a/src/test/ui/issues/issue-5353.rs b/src/test/ui/issues/issue-5353.rs index 808b73ec72f75..cca17595051da 100644 --- a/src/test/ui/issues/issue-5353.rs +++ b/src/test/ui/issues/issue-5353.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-53568.rs b/src/test/ui/issues/issue-53568.rs index 4d3b3f80a97e5..7644810c94757 100644 --- a/src/test/ui/issues/issue-53568.rs +++ b/src/test/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". // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Future { type Item; diff --git a/src/test/ui/issues/issue-53675-a-test-called-panic.rs b/src/test/ui/issues/issue-53675-a-test-called-panic.rs index 8a35b36d46d64..b8dca96946a41 100644 --- a/src/test/ui/issues/issue-53675-a-test-called-panic.rs +++ b/src/test/ui/issues/issue-53675-a-test-called-panic.rs @@ -1,7 +1,7 @@ // rust-lang/rust#53675: At one point the compiler errored when a test // named `panic` used the `assert!` macro in expression position. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: --test mod in_expression_position { diff --git a/src/test/ui/issues/issue-54387.rs b/src/test/ui/issues/issue-54387.rs index ac1033add0ee4..7aee500744d8e 100644 --- a/src/test/ui/issues/issue-54387.rs +++ b/src/test/ui/issues/issue-54387.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct GstRc { _obj: *const (), diff --git a/src/test/ui/issues/issue-54521-1.rs b/src/test/ui/issues/issue-54521-1.rs index d6a14a6e11f67..9bda7635effc2 100644 --- a/src/test/ui/issues/issue-54521-1.rs +++ b/src/test/ui/issues/issue-54521-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test checks that the `remove extra angle brackets` error doesn't happen for some // potential edge-cases.. diff --git a/src/test/ui/issues/issue-54943-1.rs b/src/test/ui/issues/issue-54943-1.rs index 8d3a4e72de411..eca27819a409a 100644 --- a/src/test/ui/issues/issue-54943-1.rs +++ b/src/test/ui/issues/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn foo(_t: T) { } diff --git a/src/test/ui/issues/issue-54943-2.rs b/src/test/ui/issues/issue-54943-2.rs index 41ca7c1498265..c32f85dbe1a8c 100644 --- a/src/test/ui/issues/issue-54943-2.rs +++ b/src/test/ui/issues/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn foo(_t: T) { } diff --git a/src/test/ui/issues/issue-54943-3.rs b/src/test/ui/issues/issue-54943-3.rs index 185077bd684a8..a9cc99c79d01a 100644 --- a/src/test/ui/issues/issue-54943-3.rs +++ b/src/test/ui/issues/issue-54943-3.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/issues/issue-5500-1.rs b/src/test/ui/issues/issue-5500-1.rs index 56f5ce9901e68..edbbe33c66fcc 100644 --- a/src/test/ui/issues/issue-5500-1.rs +++ b/src/test/ui/issues/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). -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct TrieMapIterator<'a> { node: &'a usize diff --git a/src/test/ui/issues/issue-5572.rs b/src/test/ui/issues/issue-5572.rs index e5963a7c435f0..db26b0372a6cf 100644 --- a/src/test/ui/issues/issue-5572.rs +++ b/src/test/ui/issues/issue-5572.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-56128.rs b/src/test/ui/issues/issue-56128.rs index 3a3eccdc33ce8..32d87586cf4d2 100644 --- a/src/test/ui/issues/issue-56128.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod bar { pub(super) use self::baz::{x, y}; diff --git a/src/test/ui/issues/issue-56202.rs b/src/test/ui/issues/issue-56202.rs index bd222b7fe980e..6d6f23d2844a6 100644 --- a/src/test/ui/issues/issue-56202.rs +++ b/src/test/ui/issues/issue-56202.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait FooTrait {} diff --git a/src/test/ui/issues/issue-56411-aux.rs b/src/test/ui/issues/issue-56411-aux.rs index bd689e913aba6..6880a8a98d25e 100644 --- a/src/test/ui/issues/issue-56411-aux.rs +++ b/src/test/ui/issues/issue-56411-aux.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct T {} diff --git a/src/test/ui/issues/issue-57156.rs b/src/test/ui/issues/issue-57156.rs index f20b0f41c7fa5..b6cd8c927a279 100644 --- a/src/test/ui/issues/issue-57156.rs +++ b/src/test/ui/issues/issue-57156.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo { type Output; diff --git a/src/test/ui/issues/issue-57162.rs b/src/test/ui/issues/issue-57162.rs index abe0887e927b5..7ba2f9cea8410 100644 --- a/src/test/ui/issues/issue-57162.rs +++ b/src/test/ui/issues/issue-57162.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo {} impl Foo for dyn Send {} diff --git a/src/test/ui/issues/issue-57410-1.rs b/src/test/ui/issues/issue-57410-1.rs index dab77bd660ca0..c4247b3b11c2c 100644 --- a/src/test/ui/issues/issue-57410-1.rs +++ b/src/test/ui/issues/issue-57410-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Originally from #53925. // Tests that the `unreachable_pub` lint doesn't fire for `pub self::bar::Bar`. diff --git a/src/test/ui/issues/issue-57410.rs b/src/test/ui/issues/issue-57410.rs index 0d697e5619d24..de7ae4b3c0764 100644 --- a/src/test/ui/issues/issue-57410.rs +++ b/src/test/ui/issues/issue-57410.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Tests that the `unreachable_pub` lint doesn't fire for `pub self::imp::f`. diff --git a/src/test/ui/issues/issue-5754.rs b/src/test/ui/issues/issue-5754.rs index 78e8701335905..a629729d39501 100644 --- a/src/test/ui/issues/issue-5754.rs +++ b/src/test/ui/issues/issue-5754.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/src/test/ui/issues/issue-5884.rs b/src/test/ui/issues/issue-5884.rs index ad7067bb9b162..acb3e19765e66 100644 --- a/src/test/ui/issues/issue-5884.rs +++ b/src/test/ui/issues/issue-5884.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-5900.rs b/src/test/ui/issues/issue-5900.rs index 5ac7acc8e3980..850e67db629c1 100644 --- a/src/test/ui/issues/issue-5900.rs +++ b/src/test/ui/issues/issue-5900.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-5950.rs b/src/test/ui/issues/issue-5950.rs index 19e0cfc7f2703..5c2250e25fc83 100644 --- a/src/test/ui/issues/issue-5950.rs +++ b/src/test/ui/issues/issue-5950.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-60662.rs b/src/test/ui/issues/issue-60662.rs index fe4eaff742d62..dca1e5979effb 100644 --- a/src/test/ui/issues/issue-60662.rs +++ b/src/test/ui/issues/issue-60662.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z unpretty=hir #![feature(existential_type)] diff --git a/src/test/ui/issues/issue-60662.stdout b/src/test/ui/issues/issue-60662.stdout index 5acfdf9ed5342..139808974c6c3 100644 --- a/src/test/ui/issues/issue-60662.stdout +++ b/src/test/ui/issues/issue-60662.stdout @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z unpretty=hir #![feature(existential_type)] diff --git a/src/test/ui/issues/issue-6341.rs b/src/test/ui/issues/issue-6341.rs index 2b23ccd258643..2fb0fee60bac5 100644 --- a/src/test/ui/issues/issue-6341.rs +++ b/src/test/ui/issues/issue-6341.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 #[derive(PartialEq)] diff --git a/src/test/ui/issues/issue-6470.rs b/src/test/ui/issues/issue-6470.rs index 49a313f90de09..305f46c6d4ee9 100644 --- a/src/test/ui/issues/issue-6470.rs +++ b/src/test/ui/issues/issue-6470.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/src/test/ui/issues/issue-6557.rs b/src/test/ui/issues/issue-6557.rs index aa091ca594aab..70b301d3d9cbb 100644 --- a/src/test/ui/issues/issue-6557.rs +++ b/src/test/ui/issues/issue-6557.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-6898.rs b/src/test/ui/issues/issue-6898.rs index 608c0c80716a6..6bf20d71d1f1e 100644 --- a/src/test/ui/issues/issue-6898.rs +++ b/src/test/ui/issues/issue-6898.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // pretty-expanded FIXME #23616 use std::mem; diff --git a/src/test/ui/issues/issue-6991.rs b/src/test/ui/issues/issue-6991.rs index e835edea1134b..aae67637f2cbf 100644 --- a/src/test/ui/issues/issue-6991.rs +++ b/src/test/ui/issues/issue-6991.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-7268.rs b/src/test/ui/issues/issue-7268.rs index 0b94fabf385df..69901e97894c8 100644 --- a/src/test/ui/issues/issue-7268.rs +++ b/src/test/ui/issues/issue-7268.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-7607-2.rs b/src/test/ui/issues/issue-7607-2.rs index 8b5c8505d3ad7..e336e0b47b283 100644 --- a/src/test/ui/issues/issue-7607-2.rs +++ b/src/test/ui/issues/issue-7607-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs index 619256c787193..9570386730a7b 100644 --- a/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs +++ b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs index e4dafc073ab3b..653d002fa61b5 100644 --- a/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs +++ b/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-8398.rs b/src/test/ui/issues/issue-8398.rs index a65c667b08e45..5fe88854b39f4 100644 --- a/src/test/ui/issues/issue-8398.rs +++ b/src/test/ui/issues/issue-8398.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-8521.rs b/src/test/ui/issues/issue-8521.rs index 7007c8a3a98bc..02a0e14d55e62 100644 --- a/src/test/ui/issues/issue-8521.rs +++ b/src/test/ui/issues/issue-8521.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo1 {} trait A {} diff --git a/src/test/ui/issues/issue-8578.rs b/src/test/ui/issues/issue-8578.rs index 4cc21234796ae..6ffb721372a4e 100644 --- a/src/test/ui/issues/issue-8578.rs +++ b/src/test/ui/issues/issue-8578.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-9110.rs b/src/test/ui/issues/issue-9110.rs index 30acd61a34a09..f3bab42ee165f 100644 --- a/src/test/ui/issues/issue-9110.rs +++ b/src/test/ui/issues/issue-9110.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 #![allow(non_snake_case)] diff --git a/src/test/ui/issues/issue-9243.rs b/src/test/ui/issues/issue-9243.rs index e877dd6492214..78237421c982b 100644 --- a/src/test/ui/issues/issue-9243.rs +++ b/src/test/ui/issues/issue-9243.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Regression test for issue 9243 #![allow(non_upper_case_globals)] diff --git a/src/test/ui/issues/issue-9249.rs b/src/test/ui/issues/issue-9249.rs index e4e9c4597192e..b1f2bd7569a96 100644 --- a/src/test/ui/issues/issue-9249.rs +++ b/src/test/ui/issues/issue-9249.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/issues/issue-9719.rs b/src/test/ui/issues/issue-9719.rs index 1e38ab9c6c2a4..58eb32b111dd9 100644 --- a/src/test/ui/issues/issue-9719.rs +++ b/src/test/ui/issues/issue-9719.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/lint/command-line-lint-group-allow.rs b/src/test/ui/lint/command-line-lint-group-allow.rs index ac98724d03757..f26e157bc706e 100644 --- a/src/test/ui/lint/command-line-lint-group-allow.rs +++ b/src/test/ui/lint/command-line-lint-group-allow.rs @@ -1,5 +1,5 @@ // compile-flags: -A bad-style -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _InappropriateCamelCasing = true; diff --git a/src/test/ui/lint/command-line-lint-group-warn.rs b/src/test/ui/lint/command-line-lint-group-warn.rs index 73dd656f60cf4..d3a4201ba6070 100644 --- a/src/test/ui/lint/command-line-lint-group-warn.rs +++ b/src/test/ui/lint/command-line-lint-group-warn.rs @@ -1,5 +1,5 @@ // compile-flags: -W bad-style -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _InappropriateCamelCasing = true; diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed index d52c651ce38c8..9fce66a0a83cc 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.rs b/src/test/ui/lint/inclusive-range-pattern-syntax.rs index 5174a8b8b7e6e..f886e778b5938 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.rs +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.rs b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.rs index 7d3fd441ae5db..4cb35e907c8f9 100644 --- a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.rs +++ b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(box_syntax)] #![feature(box_patterns)] diff --git a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs index 8872c0047fda5..47063a7c26786 100644 --- a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs +++ b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_parens)] diff --git a/src/test/ui/lint/issue-54099-camel-case-underscore-types.rs b/src/test/ui/lint/issue-54099-camel-case-underscore-types.rs index e4be1edc5d7b5..3802e01a77556 100644 --- a/src/test/ui/lint/issue-54099-camel-case-underscore-types.rs +++ b/src/test/ui/lint/issue-54099-camel-case-underscore-types.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![forbid(non_camel_case_types)] #![allow(dead_code)] diff --git a/src/test/ui/lint/issue-54538-unused-parens-lint.rs b/src/test/ui/lint/issue-54538-unused-parens-lint.rs index 3a52996195c0d..eda9e2cdfaa2f 100644 --- a/src/test/ui/lint/issue-54538-unused-parens-lint.rs +++ b/src/test/ui/lint/issue-54538-unused-parens-lint.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(ellipsis_inclusive_range_patterns)] #![allow(unreachable_patterns)] diff --git a/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs b/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs index 8ca5af21630a2..95da4efa59041 100644 --- a/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs +++ b/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/lint/lint-non-camel-case-variant.rs b/src/test/ui/lint/lint-non-camel-case-variant.rs index 1f06b28398426..434e24c1d278c 100644 --- a/src/test/ui/lint/lint-non-camel-case-variant.rs +++ b/src/test/ui/lint/lint-non-camel-case-variant.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(non_camel_case_types)] diff --git a/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs b/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs index c2fdfb4fe421a..d025ee948546a 100644 --- a/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs +++ b/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // This is ok because we often use the trailing underscore to mean 'prime' diff --git a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs index 9a6487d254239..5bec82ce1a6f5 100644 --- a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs +++ b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode.rs b/src/test/ui/lint/lint-nonstandard-style-unicode.rs index a0b4130c3e92a..40f0a676381b4 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode.rs +++ b/src/test/ui/lint/lint-nonstandard-style-unicode.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] diff --git a/src/test/ui/lint/lint-output-format-2.rs b/src/test/ui/lint/lint-output-format-2.rs index c9b33f06e215a..32a41179965f3 100644 --- a/src/test/ui/lint/lint-output-format-2.rs +++ b/src/test/ui/lint/lint-output-format-2.rs @@ -1,7 +1,7 @@ // aux-build:lint_output_format.rs #![feature(unstable_test_feature)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) extern crate lint_output_format; use lint_output_format::{foo, bar}; diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs index a2031c2189ae1..652fd04bdf526 100644 --- a/src/test/ui/lint/lint-stability-deprecated.rs +++ b/src/test/ui/lint/lint-stability-deprecated.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:lint_stability.rs // aux-build:inherited_stability.rs // aux-build:stability_cfg1.rs diff --git a/src/test/ui/lint/lint-unknown-feature-default.rs b/src/test/ui/lint/lint-unknown-feature-default.rs index e04363faf4b60..aebc4f1808573 100644 --- a/src/test/ui/lint/lint-unknown-feature-default.rs +++ b/src/test/ui/lint/lint-unknown-feature-default.rs @@ -4,7 +4,7 @@ // FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { } diff --git a/src/test/ui/lint/lint-unknown-feature.rs b/src/test/ui/lint/lint-unknown-feature.rs index c372a980bed5e..93fa7a6e96e37 100644 --- a/src/test/ui/lint/lint-unknown-feature.rs +++ b/src/test/ui/lint/lint-unknown-feature.rs @@ -4,7 +4,7 @@ // FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/src/test/ui/lint/lints-in-foreign-macros.rs b/src/test/ui/lint/lints-in-foreign-macros.rs index adef2f9e7690f..e381c81453b10 100644 --- a/src/test/ui/lint/lints-in-foreign-macros.rs +++ b/src/test/ui/lint/lints-in-foreign-macros.rs @@ -1,5 +1,5 @@ // aux-build:lints-in-foreign-macros.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_imports)] //~ missing documentation for crate [missing_docs] #![warn(missing_docs)] diff --git a/src/test/ui/lint/must-use-ops.rs b/src/test/ui/lint/must-use-ops.rs index 60baa2349876c..d0adf6a875d3e 100644 --- a/src/test/ui/lint/must-use-ops.rs +++ b/src/test/ui/lint/must-use-ops.rs @@ -1,6 +1,6 @@ // Issue #50124 - Test warning for unused operator expressions -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/src/test/ui/lint/not_found.rs b/src/test/ui/lint/not_found.rs index 0b5a4eb785195..979a67b15583a 100644 --- a/src/test/ui/lint/not_found.rs +++ b/src/test/ui/lint/not_found.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // this tests the `unknown_lint` lint, especially the suggestions diff --git a/src/test/ui/lint/reasons.rs b/src/test/ui/lint/reasons.rs index eba91d92afb5b..5320987040afc 100644 --- a/src/test/ui/lint/reasons.rs +++ b/src/test/ui/lint/reasons.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(lint_reasons)] diff --git a/src/test/ui/lint/type-overflow.rs b/src/test/ui/lint/type-overflow.rs index 64e5951207379..c145bd256d8f2 100644 --- a/src/test/ui/lint/type-overflow.rs +++ b/src/test/ui/lint/type-overflow.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(overflowing_literals)] fn main() { diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.rs b/src/test/ui/lint/unreachable_pub-pub_crate.rs index 6739c7f096b59..27b437b22eb03 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.rs +++ b/src/test/ui/lint/unreachable_pub-pub_crate.rs @@ -4,7 +4,7 @@ // suggestions to use `crate` given when it is on). When that feature becomes // stable, this test can be deleted. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] diff --git a/src/test/ui/lint/unreachable_pub.rs b/src/test/ui/lint/unreachable_pub.rs index 12726b6ecae38..545281604ea50 100644 --- a/src/test/ui/lint/unreachable_pub.rs +++ b/src/test/ui/lint/unreachable_pub.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(crate_visibility_modifier)] diff --git a/src/test/ui/lint/unused_import_warning_issue_45268.rs b/src/test/ui/lint/unused_import_warning_issue_45268.rs index 0bd7751113593..68a5819c9c708 100644 --- a/src/test/ui/lint/unused_import_warning_issue_45268.rs +++ b/src/test/ui/lint/unused_import_warning_issue_45268.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_imports)] // Warning explanation here, it's OK diff --git a/src/test/ui/lint/unused_labels.rs b/src/test/ui/lint/unused_labels.rs index 26ab9fbe5c8f2..d234a2fb1a02c 100644 --- a/src/test/ui/lint/unused_labels.rs +++ b/src/test/ui/lint/unused_labels.rs @@ -2,7 +2,7 @@ // should also deal with the edge cases where a label is shadowed, // within nested loops -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(label_break_value)] #![warn(unused_labels)] diff --git a/src/test/ui/lint/unused_parens_json_suggestion.rs b/src/test/ui/lint/unused_parens_json_suggestion.rs index 4462c53152aca..185bfacea8046 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.rs +++ b/src/test/ui/lint/unused_parens_json_suggestion.rs @@ -1,5 +1,5 @@ // compile-flags: --error-format pretty-json -Zunstable-options -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // 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/src/test/ui/lint/unused_parens_json_suggestion.stderr b/src/test/ui/lint/unused_parens_json_suggestion.stderr index 07d96d5c48250..396395a17f732 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.stderr +++ b/src/test/ui/lint/unused_parens_json_suggestion.stderr @@ -8,8 +8,8 @@ "spans": [ { "file_name": "$DIR/unused_parens_json_suggestion.rs", - "byte_start": 576, - "byte_end": 589, + "byte_start": 611, + "byte_end": 624, "line_start": 15, "line_end": 15, "column_start": 14, @@ -36,8 +36,8 @@ "spans": [ { "file_name": "$DIR/unused_parens_json_suggestion.rs", - "byte_start": 422, - "byte_end": 435, + "byte_start": 457, + "byte_end": 470, "line_start": 10, "line_end": 10, "column_start": 9, @@ -66,8 +66,8 @@ "spans": [ { "file_name": "$DIR/unused_parens_json_suggestion.rs", - "byte_start": 576, - "byte_end": 589, + "byte_start": 611, + "byte_end": 624, "line_start": 15, "line_end": 15, "column_start": 14, diff --git a/src/test/ui/lint/use-redundant.rs b/src/test/ui/lint/use-redundant.rs index 328f8232bafa8..6ec2af068018b 100644 --- a/src/test/ui/lint/use-redundant.rs +++ b/src/test/ui/lint/use-redundant.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused_imports)] use crate::foo::Bar; //~ WARNING first import diff --git a/src/test/ui/loops/loops-reject-duplicate-labels-2.rs b/src/test/ui/loops/loops-reject-duplicate-labels-2.rs index 93f322ab36804..316ee64072de0 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels-2.rs +++ b/src/test/ui/loops/loops-reject-duplicate-labels-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // ignore-tidy-linelength diff --git a/src/test/ui/loops/loops-reject-duplicate-labels.rs b/src/test/ui/loops/loops-reject-duplicate-labels.rs index 27f9862f70da5..5ed8b2f416ecd 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels.rs +++ b/src/test/ui/loops/loops-reject-duplicate-labels.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // ignore-tidy-linelength diff --git a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs index 435ad3391a0d0..9047fbb95a2ea 100644 --- a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs +++ b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs @@ -1,7 +1,7 @@ // Issue #21633: reject duplicate loop labels in function bodies. // This is testing interaction between lifetime-params and labels. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, unused_variables)] diff --git a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs index 656ed6576e269..9bb6a253b7f4a 100644 --- a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs +++ b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, unused_variables)] diff --git a/src/test/ui/macros/macro-expanded-include/test.rs b/src/test/ui/macros/macro-expanded-include/test.rs index fe697db9fbed6..b8eb854b0b0f1 100644 --- a/src/test/ui/macros/macro-expanded-include/test.rs +++ b/src/test/ui/macros/macro-expanded-include/test.rs @@ -1,5 +1,5 @@ // ignore-emscripten no asm! support -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(asm)] #![allow(unused)] diff --git a/src/test/ui/macros/macro-path-prelude-pass.rs b/src/test/ui/macros/macro-path-prelude-pass.rs index 3d35d53f777db..8daa1c84f1dc3 100644 --- a/src/test/ui/macros/macro-path-prelude-pass.rs +++ b/src/test/ui/macros/macro-path-prelude-pass.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(extern_prelude)] diff --git a/src/test/ui/macros/macro-shadowing-relaxed.rs b/src/test/ui/macros/macro-shadowing-relaxed.rs index 2477226ce212a..b2a639218b994 100644 --- a/src/test/ui/macros/macro-shadowing-relaxed.rs +++ b/src/test/ui/macros/macro-shadowing-relaxed.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:macro-in-other-crate.rs #![feature(decl_macro)] diff --git a/src/test/ui/macros/macro-stmt-matchers.rs b/src/test/ui/macros/macro-stmt-matchers.rs index 6e53eb05121cc..a643e50e99557 100644 --- a/src/test/ui/macros/macro-stmt-matchers.rs +++ b/src/test/ui/macros/macro-stmt-matchers.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/src/test/ui/macros/macro-tt-matchers.rs b/src/test/ui/macros/macro-tt-matchers.rs index 17df72f36dbfe..2ee41b0880e18 100644 --- a/src/test/ui/macros/macro-tt-matchers.rs +++ b/src/test/ui/macros/macro-tt-matchers.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] macro_rules! foo { diff --git a/src/test/ui/macros/macro-use-scope.rs b/src/test/ui/macros/macro-use-scope.rs index 03d57d2229991..5e58fc9c1ede8 100644 --- a/src/test/ui/macros/macro-use-scope.rs +++ b/src/test/ui/macros/macro-use-scope.rs @@ -1,6 +1,6 @@ // aux-build:two_macros.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] fn f() { diff --git a/src/test/ui/macros/must-use-in-macro-55516.rs b/src/test/ui/macros/must-use-in-macro-55516.rs index a5de32e5d2a8b..4b6b65ec48b26 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.rs +++ b/src/test/ui/macros/must-use-in-macro-55516.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Wunused // make sure write!() can't hide its unused Result diff --git a/src/test/ui/macros/trace-macro.rs b/src/test/ui/macros/trace-macro.rs index efd658dd2b9a8..576120811dbc6 100644 --- a/src/test/ui/macros/trace-macro.rs +++ b/src/test/ui/macros/trace-macro.rs @@ -1,5 +1,5 @@ // compile-flags: -Z trace-macros -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { println!("Hello, World!"); diff --git a/src/test/ui/malformed/malformed-regressions.rs b/src/test/ui/malformed/malformed-regressions.rs index b5c992440d4dc..c1a9d04e6d5cb 100644 --- a/src/test/ui/malformed/malformed-regressions.rs +++ b/src/test/ui/malformed/malformed-regressions.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[doc] //~ WARN attribute must be of the form #[ignore()] //~ WARN attribute must be of the form diff --git a/src/test/ui/maybe-bounds-where-cpass.rs b/src/test/ui/maybe-bounds-where-cpass.rs index 860de200f6256..d4bc05f7cb421 100644 --- a/src/test/ui/maybe-bounds-where-cpass.rs +++ b/src/test/ui/maybe-bounds-where-cpass.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct S(*const T) where T: ?Sized; diff --git a/src/test/ui/methods/method-call-lifetime-args-subst-index.rs b/src/test/ui/methods/method-call-lifetime-args-subst-index.rs index 4ee09dcdf1965..8df58a3486eb0 100644 --- a/src/test/ui/methods/method-call-lifetime-args-subst-index.rs +++ b/src/test/ui/methods/method-call-lifetime-args-subst-index.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] struct S; diff --git a/src/test/ui/methods/method-trait-object-with-hrtb.rs b/src/test/ui/methods/method-trait-object-with-hrtb.rs index da2f13f5a2f8a..d1bee676c2f5c 100644 --- a/src/test/ui/methods/method-trait-object-with-hrtb.rs +++ b/src/test/ui/methods/method-trait-object-with-hrtb.rs @@ -1,4 +1,4 @@ -// compile-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/src/test/ui/missing/missing-semicolon-warning.rs b/src/test/ui/missing/missing-semicolon-warning.rs index 11204af702a1c..d962a52139eea 100644 --- a/src/test/ui/missing/missing-semicolon-warning.rs +++ b/src/test/ui/missing/missing-semicolon-warning.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] macro_rules! m { diff --git a/src/test/ui/never-assign-dead-code.rs b/src/test/ui/never-assign-dead-code.rs index 6b047c3506535..fd5fbc30611a9 100644 --- a/src/test/ui/never-assign-dead-code.rs +++ b/src/test/ui/never-assign-dead-code.rs @@ -1,7 +1,7 @@ // Test that an assignment of type ! makes the rest of the block dead code. #![feature(never_type)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused)] diff --git a/src/test/ui/never_transmute_never.rs b/src/test/ui/never_transmute_never.rs index ef78eaa2120cf..5bad756b8762f 100644 --- a/src/test/ui/never_transmute_never.rs +++ b/src/test/ui/never_transmute_never.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type="lib"] diff --git a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs index 8ed6554877eae..7679bf22e3cd4 100644 --- a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs +++ b/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Test that we propagate region relations from closures precisely when there is // more than one non-local lower bound. diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs index d1945f4864c9a..1df7c6114eeae 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs @@ -4,7 +4,7 @@ // regions is erased. // compile-flags:-Zborrowck=mir -Zverbose -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/constant.rs b/src/test/ui/nll/constant.rs index 2bc40fcb32783..b1ea2c906da88 100644 --- a/src/test/ui/nll/constant.rs +++ b/src/test/ui/nll/constant.rs @@ -2,7 +2,7 @@ // arbitrary types without ICEs. // compile-flags:-Zborrowck=mir -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) const HI: &str = "hi"; diff --git a/src/test/ui/nll/drop-may-dangle.rs b/src/test/ui/nll/drop-may-dangle.rs index 5c72225b11f0f..0f3d27d066560 100644 --- a/src/test/ui/nll/drop-may-dangle.rs +++ b/src/test/ui/nll/drop-may-dangle.rs @@ -3,7 +3,7 @@ // including) the call to `use_x`. The `else` branch is not included. // compile-flags:-Zborrowck=mir -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(dropck_eyepatch)] diff --git a/src/test/ui/nll/empty-type-predicate.rs b/src/test/ui/nll/empty-type-predicate.rs index 75431d40ce542..48073f8749e75 100644 --- a/src/test/ui/nll/empty-type-predicate.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait T {} fn f() where dyn T: {} diff --git a/src/test/ui/nll/extra-unused-mut.rs b/src/test/ui/nll/extra-unused-mut.rs index 6d0d6e16a6775..e9c8df46213b5 100644 --- a/src/test/ui/nll/extra-unused-mut.rs +++ b/src/test/ui/nll/extra-unused-mut.rs @@ -1,6 +1,6 @@ // extra unused mut lint tests for #51918 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(generators, nll)] #![deny(unused_mut)] diff --git a/src/test/ui/nll/generator-distinct-lifetime.rs b/src/test/ui/nll/generator-distinct-lifetime.rs index d479a61baa22b..1bd39db35d9aa 100644 --- a/src/test/ui/nll/generator-distinct-lifetime.rs +++ b/src/test/ui/nll/generator-distinct-lifetime.rs @@ -6,7 +6,7 @@ // over a yield -- because the data that is borrowed (`*x`) is not // stored on the stack. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn foo(x: &mut u32) { move || { diff --git a/src/test/ui/nll/issue-16223.rs b/src/test/ui/nll/issue-16223.rs index e75362750645c..c1205ba96ad69 100644 --- a/src/test/ui/nll/issue-16223.rs +++ b/src/test/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 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(box_patterns)] diff --git a/src/test/ui/nll/issue-21114-ebfull.rs b/src/test/ui/nll/issue-21114-ebfull.rs index 1fe4fffa324a6..5a5db1a17f3f4 100644 --- a/src/test/ui/nll/issue-21114-ebfull.rs +++ b/src/test/ui/nll/issue-21114-ebfull.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::collections::HashMap; use std::sync::Mutex; diff --git a/src/test/ui/nll/issue-21114-kixunil.rs b/src/test/ui/nll/issue-21114-kixunil.rs index 80a85293e5a5c..32c97a651c50f 100644 --- a/src/test/ui/nll/issue-21114-kixunil.rs +++ b/src/test/ui/nll/issue-21114-kixunil.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn from_stdin(min: u64) -> Vec { use std::io::BufRead; diff --git a/src/test/ui/nll/issue-22323-temp-destruction.rs b/src/test/ui/nll/issue-22323-temp-destruction.rs index 6357c3ccef1f8..1add91b1bd04a 100644 --- a/src/test/ui/nll/issue-22323-temp-destruction.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _s = construct().borrow().consume_borrowed(); diff --git a/src/test/ui/nll/issue-30104.rs b/src/test/ui/nll/issue-30104.rs index 27e519005f62b..3f4818a28c8d6 100644 --- a/src/test/ui/nll/issue-30104.rs +++ b/src/test/ui/nll/issue-30104.rs @@ -1,6 +1,6 @@ // Regression test for #30104 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::ops::{Deref, DerefMut}; diff --git a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs b/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs index 7e0ffd6cf3644..bffff65015850 100644 --- a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs +++ b/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/nll/issue-43058.rs b/src/test/ui/nll/issue-43058.rs index c50473511f116..8bf9028690fcd 100644 --- a/src/test/ui/nll/issue-43058.rs +++ b/src/test/ui/nll/issue-43058.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::borrow::Cow; diff --git a/src/test/ui/nll/issue-47022.rs b/src/test/ui/nll/issue-47022.rs index 3f8e0f5ad3d7a..ecd7071ecc783 100644 --- a/src/test/ui/nll/issue-47022.rs +++ b/src/test/ui/nll/issue-47022.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct LoadedObject { bodies: Vec, diff --git a/src/test/ui/nll/issue-50716-1.rs b/src/test/ui/nll/issue-50716-1.rs index ec992959a66ca..1e602f27247d7 100644 --- a/src/test/ui/nll/issue-50716-1.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Qey(Q); diff --git a/src/test/ui/nll/issue-51351.rs b/src/test/ui/nll/issue-51351.rs index b45477c7fb10d..efffe80aae45f 100644 --- a/src/test/ui/nll/issue-51351.rs +++ b/src/test/ui/nll/issue-51351.rs @@ -6,7 +6,7 @@ // of the closure, as they were not present in the closure's generic // declarations otherwise. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn creash<'a>() { let x: &'a () = &(); diff --git a/src/test/ui/nll/issue-52078.rs b/src/test/ui/nll/issue-52078.rs index 4b8e6c6807530..935bf8cda5e99 100644 --- a/src/test/ui/nll/issue-52078.rs +++ b/src/test/ui/nll/issue-52078.rs @@ -2,7 +2,7 @@ // between `'a` and `'b` below due to inference variables introduced // during the normalization process. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Drain<'a, T: 'a> { _marker: ::std::marker::PhantomData<&'a T>, diff --git a/src/test/ui/nll/issue-53119.rs b/src/test/ui/nll/issue-53119.rs index 7a47a77f6bb4c..f5400aaad8b45 100644 --- a/src/test/ui/nll/issue-53119.rs +++ b/src/test/ui/nll/issue-53119.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::ops::Deref; diff --git a/src/test/ui/nll/issue-53570.rs b/src/test/ui/nll/issue-53570.rs index 81c50edfed1a4..25c1929b227c8 100644 --- a/src/test/ui/nll/issue-53570.rs +++ b/src/test/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`. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::cell::{RefCell, Ref}; diff --git a/src/test/ui/nll/issue-55344.rs b/src/test/ui/nll/issue-55344.rs index 521d4d33d8633..a65635585dbb6 100644 --- a/src/test/ui/nll/issue-55344.rs +++ b/src/test/ui/nll/issue-55344.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unused_mut)] diff --git a/src/test/ui/nll/issue-55651.rs b/src/test/ui/nll/issue-55651.rs index 976098e40ad3d..73fce288f8bb6 100644 --- a/src/test/ui/nll/issue-55651.rs +++ b/src/test/ui/nll/issue-55651.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(untagged_unions)] diff --git a/src/test/ui/nll/issue-57280-1.rs b/src/test/ui/nll/issue-57280-1.rs index e02d6a0cb5a39..f9cea42e7c4cc 100644 --- a/src/test/ui/nll/issue-57280-1.rs +++ b/src/test/ui/nll/issue-57280-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo<'a> { const C: &'a u32; diff --git a/src/test/ui/nll/issue-57280.rs b/src/test/ui/nll/issue-57280.rs index 776a0d359cda6..65ca23cc88f6c 100644 --- a/src/test/ui/nll/issue-57280.rs +++ b/src/test/ui/nll/issue-57280.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo { const BLAH: &'static str; diff --git a/src/test/ui/nll/issue-61311-normalize.rs b/src/test/ui/nll/issue-61311-normalize.rs index 1164e9ef2d62f..9237c27f57ea8 100644 --- a/src/test/ui/nll/issue-61311-normalize.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct Unit; trait Obj {} diff --git a/src/test/ui/nll/issue-61320-normalize.rs b/src/test/ui/nll/issue-61320-normalize.rs index a36ccd36113b5..59bceed08f909 100644 --- a/src/test/ui/nll/issue-61320-normalize.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) pub struct AndThen where diff --git a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs b/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs index 3415c3eeabcdb..72212e9e70c0f 100644 --- a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs +++ b/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs @@ -1,5 +1,5 @@ // compile-flags: -Zborrowck=mir -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] diff --git a/src/test/ui/nll/projection-return.rs b/src/test/ui/nll/projection-return.rs index fdf3f59484172..5c340434691f1 100644 --- a/src/test/ui/nll/projection-return.rs +++ b/src/test/ui/nll/projection-return.rs @@ -1,5 +1,5 @@ // compile-flags:-Zborrowck=mir -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs index 23caa59b6b7bf..1bbc896c270a1 100644 --- a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs +++ b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs @@ -6,7 +6,7 @@ // another -- effectively, the single lifetime `'a` is just inferred // to be the intersection of the two distinct lifetimes. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:-Zno-leak-check #![feature(nll)] diff --git a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs index bac9e26588cae..4e8599b2e3fbe 100644 --- a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs +++ b/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs @@ -2,7 +2,7 @@ // function returning always its first argument can be upcast to one // that returns either first or second argument. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:-Zno-leak-check #![feature(nll)] diff --git a/src/test/ui/nll/relate_tys/issue-48071.rs b/src/test/ui/nll/relate_tys/issue-48071.rs index 72987629848c8..36cd57a1b2d34 100644 --- a/src/test/ui/nll/relate_tys/issue-48071.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Foo { fn foo(&self) { } diff --git a/src/test/ui/nll/ty-outlives/issue-53789-1.rs b/src/test/ui/nll/ty-outlives/issue-53789-1.rs index dc67c1a68aaf6..2293d7d4bbc0d 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-1.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-1.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::collections::BTreeMap; diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/src/test/ui/nll/ty-outlives/issue-53789-2.rs index 1b80be2eaff99..313b615fe8085 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-2.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::collections::BTreeMap; use std::ops::Range; diff --git a/src/test/ui/nll/ty-outlives/issue-55756.rs b/src/test/ui/nll/ty-outlives/issue-55756.rs index cda3915849e2d..147ea20348942 100644 --- a/src/test/ui/nll/ty-outlives/issue-55756.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type="lib"] diff --git a/src/test/ui/nll/ty-outlives/projection-body.rs b/src/test/ui/nll/ty-outlives/projection-body.rs index 2e105ece8b55c..148120d848bc0 100644 --- a/src/test/ui/nll/ty-outlives/projection-body.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait MyTrait<'a> { type Output; diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs index 452a8ea4f85d2..b9c9611e38c2c 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs @@ -3,7 +3,7 @@ // we don't even propagate constraints from the closures to the callers. // compile-flags:-Zborrowck=mir -Zverbose -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs index 7314766611121..4613dd29ef8f0 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs @@ -4,7 +4,7 @@ // // Regression test for #53121. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait MyTrait<'a> { type Output; diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs index 7c7d64a8cb4d3..89328c2ef1b33 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs @@ -4,7 +4,7 @@ // MyTrait<'a>>::Output: 'a` outlives `'a` (because the trait says // so). // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait MyTrait<'a> { type Output: 'a; diff --git a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs index f61f54f80a78b..27c3e89c1c376 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs @@ -1,5 +1,5 @@ // compile-flags:-Zborrowck=mir -Zverbose -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Test that we assume that universal types like `T` outlive the // function body. diff --git a/src/test/ui/nll/user-annotations/downcast-infer.rs b/src/test/ui/nll/user-annotations/downcast-infer.rs index 23b76bb196470..3efea7136307c 100644 --- a/src/test/ui/nll/user-annotations/downcast-infer.rs +++ b/src/test/ui/nll/user-annotations/downcast-infer.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Check that we don't try to downcast `_` when type-checking the annotation. fn main() { diff --git a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs b/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs index 6b9d30f5ab425..66b3110d2afd0 100644 --- a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs +++ b/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This test is reduced from a scenario pnkfelix encountered while // bootstrapping the compiler. diff --git a/src/test/ui/no-warn-on-field-replace-issue-34101.rs b/src/test/ui/no-warn-on-field-replace-issue-34101.rs index af6ccf35d538c..eb701b9184e6a 100644 --- a/src/test/ui/no-warn-on-field-replace-issue-34101.rs +++ b/src/test/ui/no-warn-on-field-replace-issue-34101.rs @@ -18,7 +18,7 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Foo(String); diff --git a/src/test/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs b/src/test/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs index 25a9c2ed98e04..af6585aadae66 100644 --- a/src/test/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs +++ b/src/test/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) mod x; diff --git a/src/test/ui/object-safety/object-safety-by-value-self.rs b/src/test/ui/object-safety/object-safety-by-value-self.rs index a8b1ddfaba7f1..c74a4d1cbbbfc 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(trivial_casts)] diff --git a/src/test/ui/object-safety/object-safety-phantom-fn.rs b/src/test/ui/object-safety/object-safety-phantom-fn.rs index 59ed12c78f026..3ffeb81c1cbe3 100644 --- a/src/test/ui/object-safety/object-safety-phantom-fn.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Baz { diff --git a/src/test/ui/panic_implementation-closures.rs b/src/test/ui/panic_implementation-closures.rs index 92c333b4092fc..b96125aa95260 100644 --- a/src/test/ui/panic_implementation-closures.rs +++ b/src/test/ui/panic_implementation-closures.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![no_std] diff --git a/src/test/ui/parser/bounds-obj-parens.rs b/src/test/ui/parser/bounds-obj-parens.rs index 1e0f9e40cdca6..ae8112b61c66f 100644 --- a/src/test/ui/parser/bounds-obj-parens.rs +++ b/src/test/ui/parser/bounds-obj-parens.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(bare_trait_objects)] diff --git a/src/test/ui/parser/impl-qpath.rs b/src/test/ui/parser/impl-qpath.rs index 78c41f481af5d..ab45649f4de49 100644 --- a/src/test/ui/parser/impl-qpath.rs +++ b/src/test/ui/parser/impl-qpath.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z parse-only impl <*const u8>::AssocTy {} // OK diff --git a/src/test/ui/parser/trailing-plus-in-bounds.rs b/src/test/ui/parser/trailing-plus-in-bounds.rs index 3213e06805371..33c30d7310877 100644 --- a/src/test/ui/parser/trailing-plus-in-bounds.rs +++ b/src/test/ui/parser/trailing-plus-in-bounds.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(box_syntax)] #![allow(bare_trait_objects)] diff --git a/src/test/ui/parser/trait-plusequal-splitting.rs b/src/test/ui/parser/trait-plusequal-splitting.rs index c655a15d268c1..26ac3ead6a5a6 100644 --- a/src/test/ui/parser/trait-plusequal-splitting.rs +++ b/src/test/ui/parser/trait-plusequal-splitting.rs @@ -1,6 +1,6 @@ // Fixes issue where `+` in generics weren't parsed if they were part of a `+=`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Whitespace { t: T } struct TokenSplit { t: T } diff --git a/src/test/ui/parser/underscore-suffix-for-string.rs b/src/test/ui/parser/underscore-suffix-for-string.rs index bcd0b24c7507f..dd0599b4ab363 100644 --- a/src/test/ui/parser/underscore-suffix-for-string.rs +++ b/src/test/ui/parser/underscore-suffix-for-string.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { let _ = "Foo"_; diff --git a/src/test/ui/print-fuel/print-fuel.rs b/src/test/ui/print-fuel/print-fuel.rs index 1bd392426695a..e443469544617 100644 --- a/src/test/ui/print-fuel/print-fuel.rs +++ b/src/test/ui/print-fuel/print-fuel.rs @@ -3,7 +3,7 @@ // (#55495: The --error-format is to sidestep an issue in our test harness) // compile-flags: --error-format human -Z print-fuel=foo -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct S1(u8, u16, u8); struct S2(u8, u16, u8); diff --git a/src/test/ui/print_type_sizes/anonymous.rs b/src/test/ui/print_type_sizes/anonymous.rs index 4d2a0e27fd1a9..b96348640fa15 100644 --- a/src/test/ui/print_type_sizes/anonymous.rs +++ b/src/test/ui/print_type_sizes/anonymous.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/generics.rs b/src/test/ui/print_type_sizes/generics.rs index ecfc03717db46..f165526dffa23 100644 --- a/src/test/ui/print_type_sizes/generics.rs +++ b/src/test/ui/print_type_sizes/generics.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/multiple_types.rs b/src/test/ui/print_type_sizes/multiple_types.rs index 1b1d817420132..4cb7ae03b5406 100644 --- a/src/test/ui/print_type_sizes/multiple_types.rs +++ b/src/test/ui/print_type_sizes/multiple_types.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/niche-filling.rs b/src/test/ui/print_type_sizes/niche-filling.rs index 98b506b1f0db1..d9845fd6d70cc 100644 --- a/src/test/ui/print_type_sizes/niche-filling.rs +++ b/src/test/ui/print_type_sizes/niche-filling.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/no_duplicates.rs b/src/test/ui/print_type_sizes/no_duplicates.rs index f1b8a28ae304b..4495a7770a760 100644 --- a/src/test/ui/print_type_sizes/no_duplicates.rs +++ b/src/test/ui/print_type_sizes/no_duplicates.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/packed.rs b/src/test/ui/print_type_sizes/packed.rs index a8d409a91a240..dce4a61ef337b 100644 --- a/src/test/ui/print_type_sizes/packed.rs +++ b/src/test/ui/print_type_sizes/packed.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/padding.rs b/src/test/ui/print_type_sizes/padding.rs index c6d927cb1e56e..1f894c5e252fa 100644 --- a/src/test/ui/print_type_sizes/padding.rs +++ b/src/test/ui/print_type_sizes/padding.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This file illustrates how padding is handled: alignment // requirements can lead to the introduction of padding, either before diff --git a/src/test/ui/print_type_sizes/repr-align.rs b/src/test/ui/print_type_sizes/repr-align.rs index 3b5248b6f7ebb..1e6f7ccca40f2 100644 --- a/src/test/ui/print_type_sizes/repr-align.rs +++ b/src/test/ui/print_type_sizes/repr-align.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/repr_int_c.rs b/src/test/ui/print_type_sizes/repr_int_c.rs index 6816bb71a0012..7aad2715bc073 100644 --- a/src/test/ui/print_type_sizes/repr_int_c.rs +++ b/src/test/ui/print_type_sizes/repr_int_c.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/uninhabited.rs b/src/test/ui/print_type_sizes/uninhabited.rs index c33965c4f53ea..ae4e492456af9 100644 --- a/src/test/ui/print_type_sizes/uninhabited.rs +++ b/src/test/ui/print_type_sizes/uninhabited.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-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/src/test/ui/print_type_sizes/variants.rs b/src/test/ui/print_type_sizes/variants.rs index aa2d25a3926a5..77e2b4befba7d 100644 --- a/src/test/ui/print_type_sizes/variants.rs +++ b/src/test/ui/print_type_sizes/variants.rs @@ -1,5 +1,5 @@ // compile-flags: -Z print-type-sizes -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // This file illustrates two things: // diff --git a/src/test/ui/privacy/issue-57264-1.rs b/src/test/ui/privacy/issue-57264-1.rs index dcffdc3d4ef87..5ef6a61fea174 100644 --- a/src/test/ui/privacy/issue-57264-1.rs +++ b/src/test/ui/privacy/issue-57264-1.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:issue-57264-1.rs extern crate issue_57264_1; diff --git a/src/test/ui/privacy/issue-57264-2.rs b/src/test/ui/privacy/issue-57264-2.rs index 79d0d2c7cd785..4d5c9cfa1d534 100644 --- a/src/test/ui/privacy/issue-57264-2.rs +++ b/src/test/ui/privacy/issue-57264-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:issue-57264-2.rs extern crate issue_57264_2; diff --git a/src/test/ui/privacy/private-in-public-existential.rs b/src/test/ui/privacy/private-in-public-existential.rs index 61c6130e47019..ef50875dcf678 100644 --- a/src/test/ui/privacy/private-in-public-existential.rs +++ b/src/test/ui/privacy/private-in-public-existential.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(existential_type)] #![deny(private_in_public)] diff --git a/src/test/ui/privacy/private-in-public-expr-pat.rs b/src/test/ui/privacy/private-in-public-expr-pat.rs index a3e53bdf45de3..5c9ecd13b0976 100644 --- a/src/test/ui/privacy/private-in-public-expr-pat.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct Priv1(usize); struct Priv2; diff --git a/src/test/ui/privacy/restricted/lookup-ignores-private.rs b/src/test/ui/privacy/restricted/lookup-ignores-private.rs index 419d521748c68..240ce1e2b03b6 100644 --- a/src/test/ui/privacy/restricted/lookup-ignores-private.rs +++ b/src/test/ui/privacy/restricted/lookup-ignores-private.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] mod foo { diff --git a/src/test/ui/proc-macro/attributes-included.rs b/src/test/ui/proc-macro/attributes-included.rs index 0ab17a1f3b312..4769607ff395d 100644 --- a/src/test/ui/proc-macro/attributes-included.rs +++ b/src/test/ui/proc-macro/attributes-included.rs @@ -1,5 +1,5 @@ // aux-build:attributes-included.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused)] diff --git a/src/test/ui/proc-macro/derive-helper-shadowed.rs b/src/test/ui/proc-macro/derive-helper-shadowed.rs index 0388e647b58aa..e299454e0fc73 100644 --- a/src/test/ui/proc-macro/derive-helper-shadowed.rs +++ b/src/test/ui/proc-macro/derive-helper-shadowed.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs // aux-build:derive-helper-shadowed-2.rs diff --git a/src/test/ui/proc-macro/derive-in-mod.rs b/src/test/ui/proc-macro/derive-in-mod.rs index e6b91324f95d0..8b5d4e9d09ce3 100644 --- a/src/test/ui/proc-macro/derive-in-mod.rs +++ b/src/test/ui/proc-macro/derive-in-mod.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs extern crate test_macros; diff --git a/src/test/ui/proc-macro/dollar-crate-issue-57089.rs b/src/test/ui/proc-macro/dollar-crate-issue-57089.rs index 2615db3e119f1..2495e72751bb0 100644 --- a/src/test/ui/proc-macro/dollar-crate-issue-57089.rs +++ b/src/test/ui/proc-macro/dollar-crate-issue-57089.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // aux-build:test-macros.rs diff --git a/src/test/ui/proc-macro/edition-imports-2018.rs b/src/test/ui/proc-macro/edition-imports-2018.rs index f8d6bc5e0785d..5a77cd4ef4f5a 100644 --- a/src/test/ui/proc-macro/edition-imports-2018.rs +++ b/src/test/ui/proc-macro/edition-imports-2018.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // aux-build:edition-imports-2015.rs diff --git a/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs index 25a2a37614778..a6e64e1b1b1bd 100644 --- a/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs +++ b/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 extern crate proc_macro; diff --git a/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs b/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs index 6d3e5ec198d85..2e20a3de6bf47 100644 --- a/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs +++ b/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs #[macro_use(Empty)] diff --git a/src/test/ui/proc-macro/issue-53481.rs b/src/test/ui/proc-macro/issue-53481.rs index 2fbde5fedb95b..ae10a3baa3e3a 100644 --- a/src/test/ui/proc-macro/issue-53481.rs +++ b/src/test/ui/proc-macro/issue-53481.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs #[macro_use] diff --git a/src/test/ui/proc-macro/macro-use-attr.rs b/src/test/ui/proc-macro/macro-use-attr.rs index d1b1430fb5d03..b101c09ed5424 100644 --- a/src/test/ui/proc-macro/macro-use-attr.rs +++ b/src/test/ui/proc-macro/macro-use-attr.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs #[macro_use] diff --git a/src/test/ui/proc-macro/macro-use-bang.rs b/src/test/ui/proc-macro/macro-use-bang.rs index d39c42267fb96..9d30f48846dba 100644 --- a/src/test/ui/proc-macro/macro-use-bang.rs +++ b/src/test/ui/proc-macro/macro-use-bang.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs #![feature(proc_macro_hygiene)] diff --git a/src/test/ui/proc-macro/no-missing-docs.rs b/src/test/ui/proc-macro/no-missing-docs.rs index e5a5f8beb4585..e1e8218582f6b 100644 --- a/src/test/ui/proc-macro/no-missing-docs.rs +++ b/src/test/ui/proc-macro/no-missing-docs.rs @@ -1,7 +1,7 @@ //! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs` //! warnings. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // force-host // no-prefer-dynamic diff --git a/src/test/ui/range/range_traits-4.rs b/src/test/ui/range/range_traits-4.rs index 52c706080f3c2..b8e88559b1518 100644 --- a/src/test/ui/range/range_traits-4.rs +++ b/src/test/ui/range/range_traits-4.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::ops::*; diff --git a/src/test/ui/range/range_traits-5.rs b/src/test/ui/range/range_traits-5.rs index a8c3e9b0d62c0..4aec7a4159a13 100644 --- a/src/test/ui/range/range_traits-5.rs +++ b/src/test/ui/range/range_traits-5.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::ops::*; diff --git a/src/test/ui/range/range_traits-7.rs b/src/test/ui/range/range_traits-7.rs index 548676063caf7..c7b310562d18e 100644 --- a/src/test/ui/range/range_traits-7.rs +++ b/src/test/ui/range/range_traits-7.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) use std::ops::*; diff --git a/src/test/ui/reachable/expr_andand.rs b/src/test/ui/reachable/expr_andand.rs index 173116ae357c5..d37eb0a3b843d 100644 --- a/src/test/ui/reachable/expr_andand.rs +++ b/src/test/ui/reachable/expr_andand.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/ui/reachable/expr_oror.rs b/src/test/ui/reachable/expr_oror.rs index ecfa072aa817d..e95062de4d732 100644 --- a/src/test/ui/reachable/expr_oror.rs +++ b/src/test/ui/reachable/expr_oror.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs b/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs index 5cbfe6ebebb7e..ee9e7a364b8c7 100644 --- a/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs +++ b/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs @@ -8,7 +8,7 @@ // follow the same lifetime-elision rules used elsehwere. See // rust-lang/rust#56537 -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs b/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs index d6b36af9bd6f3..49de70ae01365 100644 --- a/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct MySlice<'a, T:'a>(&'a mut [T]); diff --git a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs b/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs index deef9ab15b01e..4ce5daf384227 100644 --- a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Tr<'a, T> { fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b; diff --git a/src/test/ui/regions/region-object-lifetime-1.rs b/src/test/ui/regions/region-object-lifetime-1.rs index ab24eda2c2d96..e58bd31d9cbe9 100644 --- a/src/test/ui/regions/region-object-lifetime-1.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] trait Foo { diff --git a/src/test/ui/regions/region-object-lifetime-3.rs b/src/test/ui/regions/region-object-lifetime-3.rs index cda4834706176..c3c7c51767d3a 100644 --- a/src/test/ui/regions/region-object-lifetime-3.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] trait Foo { diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs index d407bee416f1f..dcad2e81a5488 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs +++ b/src/test/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`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs index c19fa98e91406..ff2e10804aec5 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs +++ b/src/test/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`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs index 7a19d17152cd4..3596bf7e8c2c4 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs +++ b/src/test/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`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs b/src/test/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs index 045d289149025..fc4d161840143 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-enum-region.rs b/src/test/ui/regions/regions-outlives-nominal-type-enum-region.rs index e087d65a5c7bc..d716cb9c55ba7 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-enum-region.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-enum-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs b/src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs index 20b391c263c26..39eb0842d3f6a 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -//compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-enum-type.rs b/src/test/ui/regions/regions-outlives-nominal-type-enum-type.rs index 7f84441903f5b..561cad790f00e 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-enum-type.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-enum-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs b/src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs index 07daa35a80981..e1287c34bac13 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-struct-region.rs b/src/test/ui/regions/regions-outlives-nominal-type-struct-region.rs index 59da5fb0dc7de..7f22ae23b8500 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-struct-region.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-struct-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs b/src/test/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs index 096069c0ca4af..367f7a3020157 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-nominal-type-struct-type.rs b/src/test/ui/regions/regions-outlives-nominal-type-struct-type.rs index 3c8c4a1ef52aa..f780275b684d1 100644 --- a/src/test/ui/regions/regions-outlives-nominal-type-struct-type.rs +++ b/src/test/ui/regions/regions-outlives-nominal-type-struct-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/regions/regions-outlives-projection-hrtype.rs b/src/test/ui/regions/regions-outlives-projection-hrtype.rs index a6e976ebf8c91..e7fe7b6c16d4f 100644 --- a/src/test/ui/regions/regions-outlives-projection-hrtype.rs +++ b/src/test/ui/regions/regions-outlives-projection-hrtype.rs @@ -5,7 +5,7 @@ // `'r` is bound, that leads to badness. This test checks that // everything works. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait TheTrait { diff --git a/src/test/ui/regions/regions-outlives-projection-trait-def.rs b/src/test/ui/regions/regions-outlives-projection-trait-def.rs index bad476d27794e..928ed4baaa030 100644 --- a/src/test/ui/regions/regions-outlives-projection-trait-def.rs +++ b/src/test/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`. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait SomeTrait<'a> { diff --git a/src/test/ui/regions/regions-outlives-scalar.rs b/src/test/ui/regions/regions-outlives-scalar.rs index ca012c4e1eda0..5d0ed9993800d 100644 --- a/src/test/ui/regions/regions-outlives-scalar.rs +++ b/src/test/ui/regions/regions-outlives-scalar.rs @@ -1,7 +1,7 @@ // Test that scalar values outlive all regions. // Rule OutlivesScalar from RFC 1214. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct Foo<'a> { diff --git a/src/test/ui/removing-extern-crate.fixed b/src/test/ui/removing-extern-crate.fixed index 71728e8a7313d..d2993dbc4a417 100644 --- a/src/test/ui/removing-extern-crate.fixed +++ b/src/test/ui/removing-extern-crate.fixed @@ -1,7 +1,7 @@ // edition:2018 // aux-build:removing-extern-crate.rs // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_idioms)] #![allow(unused_imports)] diff --git a/src/test/ui/removing-extern-crate.rs b/src/test/ui/removing-extern-crate.rs index b9cc1810e7cb5..22fdfc2b0ec9c 100644 --- a/src/test/ui/removing-extern-crate.rs +++ b/src/test/ui/removing-extern-crate.rs @@ -1,7 +1,7 @@ // edition:2018 // aux-build:removing-extern-crate.rs // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_idioms)] #![allow(unused_imports)] diff --git a/src/test/ui/resolve/issue-57523.rs b/src/test/ui/resolve/issue-57523.rs index c2a2f28254226..5dc467d97e2be 100644 --- a/src/test/ui/resolve/issue-57523.rs +++ b/src/test/ui/resolve/issue-57523.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct S(u8); diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs index 7b499af632ece..6e75977b5900e 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs +++ b/src/test/ui/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(bind_by_move_pattern_guards)] diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs index aca6aa5f0f867..40588ca331eba 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs @@ -1,6 +1,6 @@ #![feature(bind_by_move_pattern_guards)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct A { a: Box } diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs index 97061310d19e2..221b5cf6bfad8 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs @@ -1,5 +1,5 @@ // aux-build:uninhabited.rs -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs b/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs index 62f6e4463f936..dacaf489a9082 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:variants.rs extern crate variants; diff --git a/src/test/ui/rfc-2093-infer-outlives/issue-54467.rs b/src/test/ui/rfc-2093-infer-outlives/issue-54467.rs index 438923e29246c..b662685ae2435 100644 --- a/src/test/ui/rfc-2093-infer-outlives/issue-54467.rs +++ b/src/test/ui/rfc-2093-infer-outlives/issue-54467.rs @@ -6,7 +6,7 @@ // strange errors. This test ensures that we do not give compilation // errors. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait MyIterator<'a>: Iterator where Self::Item: 'a { } diff --git a/src/test/ui/rfc-2166-underscore-imports/basic.rs b/src/test/ui/rfc-2166-underscore-imports/basic.rs index 968da9c8d5681..4766d75c8f412 100644 --- a/src/test/ui/rfc-2166-underscore-imports/basic.rs +++ b/src/test/ui/rfc-2166-underscore-imports/basic.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:underscore-imports.rs #![warn(unused_imports, unused_extern_crates)] diff --git a/src/test/ui/rfc-2166-underscore-imports/duplicate.rs b/src/test/ui/rfc-2166-underscore-imports/duplicate.rs index 95f7cae0b87d2..3662a466ded14 100644 --- a/src/test/ui/rfc-2166-underscore-imports/duplicate.rs +++ b/src/test/ui/rfc-2166-underscore-imports/duplicate.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:duplicate.rs extern crate duplicate; diff --git a/src/test/ui/rfc-2166-underscore-imports/intercrate.rs b/src/test/ui/rfc-2166-underscore-imports/intercrate.rs index 8b5bb8b326097..1cccc67e9ab63 100644 --- a/src/test/ui/rfc-2166-underscore-imports/intercrate.rs +++ b/src/test/ui/rfc-2166-underscore-imports/intercrate.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:underscore-imports.rs extern crate underscore_imports; diff --git a/src/test/ui/rfc-2306/convert-id-const-with-gate.rs b/src/test/ui/rfc-2306/convert-id-const-with-gate.rs index a82feb961f7aa..762dfbe484396 100644 --- a/src/test/ui/rfc-2306/convert-id-const-with-gate.rs +++ b/src/test/ui/rfc-2306/convert-id-const-with-gate.rs @@ -1,6 +1,6 @@ // This test should pass since 'identity' is const fn. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) fn main() { const _FOO: u8 = ::std::convert::identity(42u8); diff --git a/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.rs b/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.rs index e66d46575664f..710fdd57ed7b3 100644 --- a/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.rs +++ b/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z unpretty=expanded fn main() { diff --git a/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.stdout b/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.stdout index a6b15f9bbf65d..c88f50c6813ec 100644 --- a/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.stdout +++ b/src/test/ui/rfc-2497-if-let-chains/ast-pretty-check.stdout @@ -4,7 +4,7 @@ use ::std::prelude::v1::*; #[macro_use] extern crate std; -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z unpretty=expanded fn main() { if let 0 = 1 { } } diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs b/src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs index c521d04fda562..e796e37bbaa45 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs @@ -1,5 +1,5 @@ // compile-flags: --cfg something -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(param_attrs)] diff --git a/src/test/ui/rfc1598-generic-associated-types/parse/in-trait-impl.rs b/src/test/ui/rfc1598-generic-associated-types/parse/in-trait-impl.rs index 589e5fcc00ead..9fc32d7cc55f0 100644 --- a/src/test/ui/rfc1598-generic-associated-types/parse/in-trait-impl.rs +++ b/src/test/ui/rfc1598-generic-associated-types/parse/in-trait-impl.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z parse-only #![feature(generic_associated_types)] diff --git a/src/test/ui/rfc1598-generic-associated-types/parse/in-trait.rs b/src/test/ui/rfc1598-generic-associated-types/parse/in-trait.rs index 7fa71e4dd1a55..7974ee9d39b19 100644 --- a/src/test/ui/rfc1598-generic-associated-types/parse/in-trait.rs +++ b/src/test/ui/rfc1598-generic-associated-types/parse/in-trait.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Z parse-only #![feature(generic_associated_types)] diff --git a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs index 82a7c2510e5d7..03492631cb7c8 100644 --- a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs +++ b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs @@ -3,7 +3,7 @@ //FIXME(#44265): The lifetime shadowing and type parameter shadowing // should cause an error. Now it compiles (erroneously) and this will be addressed // by a future PR. Then remove the following: -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) trait Shadow<'a> { type Bar<'a>; // Error: shadowed lifetime diff --git a/src/test/ui/rmeta-lib-pass.rs b/src/test/ui/rmeta-lib-pass.rs index 4ab4117dd6ccd..fdd0516e4d654 100644 --- a/src/test/ui/rmeta-lib-pass.rs +++ b/src/test/ui/rmeta-lib-pass.rs @@ -1,7 +1,7 @@ // compile-flags: --emit=metadata // aux-build:rmeta-rlib.rs // no-prefer-dynamic -// compile-pass +// 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/src/test/ui/rmeta-pass.rs b/src/test/ui/rmeta-pass.rs index 9c88de7a0330b..4f0db23f47dd9 100644 --- a/src/test/ui/rmeta-pass.rs +++ b/src/test/ui/rmeta-pass.rs @@ -1,7 +1,7 @@ // compile-flags: --emit=metadata // aux-build:rmeta-meta.rs // no-prefer-dynamic -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // Check that building a metadata crate works with a dependent, metadata-only // crate. diff --git a/src/test/ui/rmeta-priv-warn.rs b/src/test/ui/rmeta-priv-warn.rs index 823ce80623b6c..430c1f06f43ac 100644 --- a/src/test/ui/rmeta-priv-warn.rs +++ b/src/test/ui/rmeta-priv-warn.rs @@ -1,6 +1,6 @@ // compile-flags: --emit=metadata // no-prefer-dynamic -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/src/test/ui/rust-2018/edition-lint-paths-2018.rs b/src/test/ui/rust-2018/edition-lint-paths-2018.rs index 09b31beb77585..2005d8f4d7941 100644 --- a/src/test/ui/rust-2018/edition-lint-paths-2018.rs +++ b/src/test/ui/rust-2018/edition-lint-paths-2018.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags:--extern edition_lint_paths // aux-build:edition-lint-paths.rs diff --git a/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs b/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs index 323c6e105f503..950ad1f504681 100644 --- a/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs +++ b/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/src/test/ui/rust-2018/macro-use-warned-against.rs b/src/test/ui/rust-2018/macro-use-warned-against.rs index 368b8daf243ea..6cd54aa68aedd 100644 --- a/src/test/ui/rust-2018/macro-use-warned-against.rs +++ b/src/test/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 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(macro_use_extern_crate, unused)] diff --git a/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs b/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs index 3311ded553117..2d4cb6514ec2c 100644 --- a/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs +++ b/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // force-host // no-prefer-dynamic diff --git a/src/test/ui/rust-2018/remove-extern-crate.fixed b/src/test/ui/rust-2018/remove-extern-crate.fixed index 14575d18c236a..7ddd2f547f071 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.fixed +++ b/src/test/ui/rust-2018/remove-extern-crate.fixed @@ -1,6 +1,6 @@ // run-rustfix // edition:2018 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:remove-extern-crate.rs // compile-flags:--extern remove_extern_crate diff --git a/src/test/ui/rust-2018/remove-extern-crate.rs b/src/test/ui/rust-2018/remove-extern-crate.rs index 0ee85f34e40d9..298b16140264a 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.rs +++ b/src/test/ui/rust-2018/remove-extern-crate.rs @@ -1,6 +1,6 @@ // run-rustfix // edition:2018 -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:remove-extern-crate.rs // compile-flags:--extern remove_extern_crate diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed b/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed index f0ca24714ed48..7d136667b6dfb 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed @@ -2,7 +2,7 @@ // edition:2015 // run-rustfix // rustfix-only-machine-applicable -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rust_2018_preview)] #![warn(rust_2018_compatibility)] diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.rs b/src/test/ui/rust-2018/suggestions-not-always-applicable.rs index f0ca24714ed48..7d136667b6dfb 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.rs +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.rs @@ -2,7 +2,7 @@ // edition:2015 // run-rustfix // rustfix-only-machine-applicable -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rust_2018_preview)] #![warn(rust_2018_compatibility)] diff --git a/src/test/ui/rust-2018/try-ident.fixed b/src/test/ui/rust-2018/try-ident.fixed index 5af13934e844a..f86a401cdf939 100644 --- a/src/test/ui/rust-2018/try-ident.fixed +++ b/src/test/ui/rust-2018/try-ident.fixed @@ -1,5 +1,5 @@ // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_compatibility)] diff --git a/src/test/ui/rust-2018/try-ident.rs b/src/test/ui/rust-2018/try-ident.rs index faac13ab77912..6cc6aa12ff76e 100644 --- a/src/test/ui/rust-2018/try-ident.rs +++ b/src/test/ui/rust-2018/try-ident.rs @@ -1,5 +1,5 @@ // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_compatibility)] diff --git a/src/test/ui/rust-2018/try-macro.fixed b/src/test/ui/rust-2018/try-macro.fixed index c65f0fc30ef0a..7c1692fd7fb13 100644 --- a/src/test/ui/rust-2018/try-macro.fixed +++ b/src/test/ui/rust-2018/try-macro.fixed @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_compatibility)] #![allow(unused_variables)] diff --git a/src/test/ui/rust-2018/try-macro.rs b/src/test/ui/rust-2018/try-macro.rs index f435890a61dcb..2089d367be698 100644 --- a/src/test/ui/rust-2018/try-macro.rs +++ b/src/test/ui/rust-2018/try-macro.rs @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. // run-rustfix -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(rust_2018_compatibility)] #![allow(unused_variables)] diff --git a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs b/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs index 0c2da1884b758..c6525869b021a 100644 --- a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs +++ b/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 fn main() { diff --git a/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs b/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs index 5c3c753f9a785..9af520a07693b 100644 --- a/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs +++ b/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![feature(decl_macro)] diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs b/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs index 9ec3a64113116..446b2d05717b0 100644 --- a/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs +++ b/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags: --extern issue_56596_2 // aux-build:issue-56596-2.rs diff --git a/src/test/ui/rust-2018/uniform-paths/prelude.rs b/src/test/ui/rust-2018/uniform-paths/prelude.rs index 9a326b4c728bd..dca9587c5d369 100644 --- a/src/test/ui/rust-2018/uniform-paths/prelude.rs +++ b/src/test/ui/rust-2018/uniform-paths/prelude.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // Macro imported with `#[macro_use] extern crate` diff --git a/src/test/ui/save-analysis/emit-notifications.rs b/src/test/ui/save-analysis/emit-notifications.rs index ebc2717499843..e02f3ecc62923 100644 --- a/src/test/ui/save-analysis/emit-notifications.rs +++ b/src/test/ui/save-analysis/emit-notifications.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: -Zsave-analysis -Zemit-artifact-notifications // compile-flags: --crate-type rlib --error-format=json // ignore-pass diff --git a/src/test/ui/self/explicit-self-closures.rs b/src/test/ui/self/explicit-self-closures.rs index 1217823da116e..b409dfd7a1e08 100644 --- a/src/test/ui/self/explicit-self-closures.rs +++ b/src/test/ui/self/explicit-self-closures.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test to make sure that explicit self params work inside closures diff --git a/src/test/ui/self/self-in-typedefs.rs b/src/test/ui/self/self-in-typedefs.rs index e4fe7324ef3a6..73f23a9cc17cf 100644 --- a/src/test/ui/self/self-in-typedefs.rs +++ b/src/test/ui/self/self-in-typedefs.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(untagged_unions)] diff --git a/src/test/ui/self/self-type-param.rs b/src/test/ui/self/self-type-param.rs index 57e01caa692de..5eb8c3622e4bd 100644 --- a/src/test/ui/self/self-type-param.rs +++ b/src/test/ui/self/self-type-param.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-return.rs b/src/test/ui/single-use-lifetime/one-use-in-fn-return.rs index 92b25cbf58410..d9d7e66d0cae2 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-fn-return.rs +++ b/src/test/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.) -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] diff --git a/src/test/ui/single-use-lifetime/one-use-in-struct.rs b/src/test/ui/single-use-lifetime/one-use-in-struct.rs index 6c4d2a4a7ad41..7285324ef6300 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-struct.rs +++ b/src/test/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!) // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs b/src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs index 4cdf1530a927b..8efe806b6e6e2 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs b/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs index 375366e41c639..09b01d8b05bae 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs b/src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs index 63d03a2cf0a85..eb85a148e6040 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs b/src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs index d4a0d71713ccd..fd8c899f4fa6b 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs +++ b/src/test/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. // -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/src/test/ui/span/issue-24690.rs b/src/test/ui/span/issue-24690.rs index 82899fc896560..f51ea55d4e6b8 100644 --- a/src/test/ui/span/issue-24690.rs +++ b/src/test/ui/span/issue-24690.rs @@ -1,7 +1,7 @@ //! A test to ensure that helpful `note` messages aren't emitted more often //! than necessary. -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/span/macro-span-replacement.rs b/src/test/ui/span/macro-span-replacement.rs index c5998c1b40310..04c7ab0ea586f 100644 --- a/src/test/ui/span/macro-span-replacement.rs +++ b/src/test/ui/span/macro-span-replacement.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused)] diff --git a/src/test/ui/span/multispan-import-lint.rs b/src/test/ui/span/multispan-import-lint.rs index 753c3599975fd..a49c60e1277f3 100644 --- a/src/test/ui/span/multispan-import-lint.rs +++ b/src/test/ui/span/multispan-import-lint.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![warn(unused)] diff --git a/src/test/ui/static/static-extern-type.rs b/src/test/ui/static/static-extern-type.rs index 3666982b4e298..4fa48fa133be1 100644 --- a/src/test/ui/static/static-extern-type.rs +++ b/src/test/ui/static/static-extern-type.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(extern_types)] pub mod a { diff --git a/src/test/ui/static_sized_requirement.rs b/src/test/ui/static_sized_requirement.rs index 0ee0637232ca4..074280b7b6646 100644 --- a/src/test/ui/static_sized_requirement.rs +++ b/src/test/ui/static_sized_requirement.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(no_core, lang_items)] #![no_core] diff --git a/src/test/ui/suggestions/issue-57672.rs b/src/test/ui/suggestions/issue-57672.rs index 1773f72fc741c..0881a631f3a76 100644 --- a/src/test/ui/suggestions/issue-57672.rs +++ b/src/test/ui/suggestions/issue-57672.rs @@ -1,6 +1,6 @@ // aux-build:foo.rs // compile-flags:--extern foo -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // edition:2018 #![deny(unused_extern_crates)] diff --git a/src/test/ui/test-on-macro.rs b/src/test/ui/test-on-macro.rs index ad7424a1bbbb9..a238db6d71623 100644 --- a/src/test/ui/test-on-macro.rs +++ b/src/test/ui/test-on-macro.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags:--test #![deny(warnings)] diff --git a/src/test/ui/test-shadowing/test-cant-be-shadowed.rs b/src/test/ui/test-shadowing/test-cant-be-shadowed.rs index b1c2a000d4a58..831372d4506b3 100644 --- a/src/test/ui/test-shadowing/test-cant-be-shadowed.rs +++ b/src/test/ui/test-shadowing/test-cant-be-shadowed.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // aux-build:test_macro.rs // compile-flags:--test diff --git a/src/test/ui/test-should-panic-attr.rs b/src/test/ui/test-should-panic-attr.rs index f936dd5758747..9c38322fe96fd 100644 --- a/src/test/ui/test-should-panic-attr.rs +++ b/src/test/ui/test-should-panic-attr.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // compile-flags: --test #[test] diff --git a/src/test/ui/traits/conservative_impl_trait.rs b/src/test/ui/traits/conservative_impl_trait.rs index 964e21779d51b..4f25e57be566b 100644 --- a/src/test/ui/traits/conservative_impl_trait.rs +++ b/src/test/ui/traits/conservative_impl_trait.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // #39665 fn batches(n: &u32) -> impl Iterator { diff --git a/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs b/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs index 3dfcf03ce79da..284baa481497c 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs +++ b/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs @@ -1,4 +1,4 @@ -// compile-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/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs b/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs index 793d556d08ca2..d1b7bf6c2d766 100644 --- a/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs +++ b/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs @@ -1,4 +1,4 @@ -// compile-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/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs b/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs index 3e9f612a2afee..83dfe6664a505 100644 --- a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs +++ b/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs @@ -1,4 +1,4 @@ -// compile-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/src/test/ui/traits/trait-privacy.rs b/src/test/ui/traits/trait-privacy.rs index 6254157e25da3..17a2e05e99f2c 100644 --- a/src/test/ui/traits/trait-privacy.rs +++ b/src/test/ui/traits/trait-privacy.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] mod foo { pub use self::bar::T; diff --git a/src/test/ui/traits/trait-with-dst.rs b/src/test/ui/traits/trait-with-dst.rs index 86d6585bc6143..a3e3b31df922e 100644 --- a/src/test/ui/traits/trait-with-dst.rs +++ b/src/test/ui/traits/trait-with-dst.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // #55266 struct VTable { diff --git a/src/test/ui/traits/traits-issue-23003-overflow.rs b/src/test/ui/traits/traits-issue-23003-overflow.rs index 06aa698ddefd7..5538e0303ed12 100644 --- a/src/test/ui/traits/traits-issue-23003-overflow.rs +++ b/src/test/ui/traits/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::marker::PhantomData; diff --git a/src/test/ui/try-poll.rs b/src/test/ui/try-poll.rs index f63950ad5e905..d42e51c7405ba 100644 --- a/src/test/ui/try-poll.rs +++ b/src/test/ui/try-poll.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, unused)] diff --git a/src/test/ui/type-alias-enum-variants/issue-57866.rs b/src/test/ui/type-alias-enum-variants/issue-57866.rs index fa351ed51dd46..058b58e174c5a 100644 --- a/src/test/ui/type-alias-enum-variants/issue-57866.rs +++ b/src/test/ui/type-alias-enum-variants/issue-57866.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) enum Outer { A(T) diff --git a/src/test/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs b/src/test/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs index dfc618b164902..bff04daed0d58 100644 --- a/src/test/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs +++ b/src/test/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. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) enum Opt { N, diff --git a/src/test/ui/type/type-alias-bounds.rs b/src/test/ui/type/type-alias-bounds.rs index f3cc5becc6f74..06705a2ebf5dd 100644 --- a/src/test/ui/type/type-alias-bounds.rs +++ b/src/test/ui/type/type-alias-bounds.rs @@ -1,6 +1,6 @@ // Test `ignored_generic_bounds` lint warning about bounds in type aliases. -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::rc::Rc; diff --git a/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs b/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs index 9eed80ad886e0..710b7c9bbeefc 100644 --- a/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs +++ b/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be 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/src/test/ui/uninhabited/privately-uninhabited-dead-code.rs b/src/test/ui/uninhabited/privately-uninhabited-dead-code.rs index 9fe8a5c832c5a..f476704cd8af0 100644 --- a/src/test/ui/uninhabited/privately-uninhabited-dead-code.rs +++ b/src/test/ui/uninhabited/privately-uninhabited-dead-code.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![deny(unused_variables)] diff --git a/src/test/ui/union/union-const-eval.rs b/src/test/ui/union/union-const-eval.rs index 05e849a3bb617..90af8de447dfd 100644 --- a/src/test/ui/union/union-const-eval.rs +++ b/src/test/ui/union/union-const-eval.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(const_fn_union)] union U { diff --git a/src/test/ui/unreachable/unreachable-try-pattern.rs b/src/test/ui/unreachable/unreachable-try-pattern.rs index 6665c58e457f1..cbc5fcee2f035 100644 --- a/src/test/ui/unreachable/unreachable-try-pattern.rs +++ b/src/test/ui/unreachable/unreachable-try-pattern.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(never_type, exhaustive_patterns)] #![warn(unreachable_code)] #![warn(unreachable_patterns)] diff --git a/src/test/ui/unrestricted-attribute-tokens.rs b/src/test/ui/unrestricted-attribute-tokens.rs index b07ab96bce13f..e31bc91a00aad 100644 --- a/src/test/ui/unrestricted-attribute-tokens.rs +++ b/src/test/ui/unrestricted-attribute-tokens.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/src/test/ui/unsized-locals/unsized-index.rs b/src/test/ui/unsized-locals/unsized-index.rs index 2e6bd82bda302..19ad97a853e83 100644 --- a/src/test/ui/unsized-locals/unsized-index.rs +++ b/src/test/ui/unsized-locals/unsized-index.rs @@ -1,4 +1,4 @@ -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) // `std::ops::Index` has an `: ?Sized` bound on the `Idx` type param. This is // an accidental left-over from the times when it `Index` was by-reference. diff --git a/src/test/ui/variance/variance-use-contravariant-struct-2.rs b/src/test/ui/variance/variance-use-contravariant-struct-2.rs index 77bd2b79f8cbc..2113eb2addb9b 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-2.rs +++ b/src/test/ui/variance/variance-use-contravariant-struct-2.rs @@ -2,7 +2,7 @@ // they permit lifetimes to be approximated as expected. #![allow(dead_code)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(fn(T)); diff --git a/src/test/ui/variance/variance-use-covariant-struct-2.rs b/src/test/ui/variance/variance-use-covariant-struct-2.rs index cb8159d8a6848..ecd2204c991c6 100644 --- a/src/test/ui/variance/variance-use-covariant-struct-2.rs +++ b/src/test/ui/variance/variance-use-covariant-struct-2.rs @@ -2,7 +2,7 @@ // be shortened. #![allow(dead_code)] -// compile-pass +// build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(T); From 8d2f80bab308b7abe62fc6d817f12f21e66bfa53 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 1 Jul 2019 17:32:43 -0700 Subject: [PATCH 16/31] Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue #62088. --- src/libunwind/build.rs | 8 +++++--- src/libunwind/libunwind.rs | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs index 20280aa3c4130..e92c68f5b0c57 100644 --- a/src/libunwind/build.rs +++ b/src/libunwind/build.rs @@ -4,11 +4,13 @@ fn main() { println!("cargo:rerun-if-changed=build.rs"); let target = env::var("TARGET").expect("TARGET was not set"); - if cfg!(feature = "llvm-libunwind") && + // FIXME: the not(bootstrap) part is needed because of the issue addressed by #62286, + // and could be removed once that change is in beta. + if cfg!(all(not(bootstrap), feature = "llvm-libunwind")) && (target.contains("linux") || target.contains("fuchsia")) { // Build the unwinding from libunwind C/C++ source code. - #[cfg(feature = "llvm-libunwind")] + #[cfg(all(not(bootstrap), feature = "llvm-libunwind"))] llvm_libunwind::compile(); } else if target.contains("linux") { if target.contains("musl") { @@ -42,7 +44,7 @@ fn main() { } } -#[cfg(feature = "llvm-libunwind")] +#[cfg(all(not(bootstrap), feature = "llvm-libunwind"))] mod llvm_libunwind { use std::env; use std::path::Path; diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs index 5794e0b7683cb..7e640897af705 100644 --- a/src/libunwind/libunwind.rs +++ b/src/libunwind/libunwind.rs @@ -67,6 +67,8 @@ pub enum _Unwind_Context {} pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reason_Code, exception: *mut _Unwind_Exception); +#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"), + link(name = "unwind", kind = "static"))] extern "C" { #[unwind(allowed)] pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !; @@ -91,6 +93,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm } pub use _Unwind_Action::*; + #[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"), + link(name = "unwind", kind = "static"))] extern "C" { pub fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word; pub fn _Unwind_SetGR(ctx: *mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word); @@ -144,6 +148,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm pub const UNWIND_POINTER_REG: c_int = 12; pub const UNWIND_IP_REG: c_int = 15; + #[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"), + link(name = "unwind", kind = "static"))] extern "C" { fn _Unwind_VRS_Get(ctx: *mut _Unwind_Context, regclass: _Unwind_VRS_RegClass, @@ -206,6 +212,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm cfg_if::cfg_if! { if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] { // Not 32-bit iOS + #[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"), + link(name = "unwind", kind = "static"))] extern "C" { #[unwind(allowed)] pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code; @@ -215,6 +223,8 @@ if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] { } } else { // 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace() + #[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"), + link(name = "unwind", kind = "static"))] extern "C" { #[unwind(allowed)] pub fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception) -> _Unwind_Reason_Code; From 87e8613fd41e7a4237a146cbe49835bb88295df6 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 17:46:41 +0200 Subject: [PATCH 17/31] Remove needless lifetimes --- src/liballoc/collections/btree/map.rs | 8 ++++---- src/liballoc/collections/btree/node.rs | 2 +- src/liballoc/string.rs | 2 +- src/libcore/marker.rs | 2 +- src/libcore/ops/index.rs | 4 ++-- src/libproc_macro/bridge/scoped_cell.rs | 2 +- src/libstd/sync/mpsc/sync.rs | 2 +- src/libstd/sys/redox/ext/net.rs | 2 +- src/libstd/sys/unix/ext/net.rs | 2 +- src/libstd/sys/windows/mod.rs | 2 +- src/libstd/sys/windows/path.rs | 2 +- src/libstd/sys_common/io.rs | 2 +- src/libsyntax/attr/mod.rs | 6 +++--- src/libsyntax/ext/tt/macro_parser.rs | 2 +- src/libsyntax/util/parser_testing.rs | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 6b079fc87cc78..c610de3febffb 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -2004,7 +2004,7 @@ impl BTreeMap { /// assert_eq!(keys, [1, 2]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn keys<'a>(&'a self) -> Keys<'a, K, V> { + pub fn keys(&self) -> Keys<'_, K, V> { Keys { inner: self.iter() } } @@ -2025,7 +2025,7 @@ impl BTreeMap { /// assert_eq!(values, ["hello", "goodbye"]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn values<'a>(&'a self) -> Values<'a, K, V> { + pub fn values(&self) -> Values<'_, K, V> { Values { inner: self.iter() } } @@ -2529,8 +2529,8 @@ enum UnderflowResult<'a, K, V> { Stole(NodeRef, K, V, marker::Internal>), } -fn handle_underfull_node<'a, K, V>(node: NodeRef, K, V, marker::LeafOrInternal>) - -> UnderflowResult<'a, K, V> { +fn handle_underfull_node(node: NodeRef, K, V, marker::LeafOrInternal>) + -> UnderflowResult<'_, K, V> { let parent = if let Ok(parent) = node.ascend() { parent } else { diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 581c66c7086a5..7cf077d61d687 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -394,7 +394,7 @@ impl NodeRef { } /// Temporarily takes out another, immutable reference to the same node. - fn reborrow<'a>(&'a self) -> NodeRef, K, V, Type> { + fn reborrow(&self) -> NodeRef, K, V, Type> { NodeRef { height: self.height, node: self.node, diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 7f7722548f581..89d24a234e9bc 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -552,7 +552,7 @@ impl String { /// assert_eq!("Hello �World", output); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> Cow<'a, str> { + pub fn from_utf8_lossy(v: &[u8]) -> Cow<'_, str> { let mut iter = lossy::Utf8Lossy::from_bytes(v).chunks(); let (first_valid, first_broken) = if let Some(chunk) = iter.next() { diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index d9757d78dcebb..0eda2c3c8e9f3 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -498,7 +498,7 @@ macro_rules! impls{ /// # end: *const T, /// # phantom: PhantomData<&'a T>, /// # } -/// fn borrow_vec<'a, T>(vec: &'a Vec) -> Slice<'a, T> { +/// fn borrow_vec(vec: &Vec) -> Slice { /// let ptr = vec.as_ptr(); /// Slice { /// start: ptr, diff --git a/src/libcore/ops/index.rs b/src/libcore/ops/index.rs index 3158f58e95806..9cff474a76030 100644 --- a/src/libcore/ops/index.rs +++ b/src/libcore/ops/index.rs @@ -105,7 +105,7 @@ pub trait Index { /// impl Index for Balance { /// type Output = Weight; /// -/// fn index<'a>(&'a self, index: Side) -> &'a Self::Output { +/// fn index(&self, index: Side) -> &Self::Output { /// println!("Accessing {:?}-side of balance immutably", index); /// match index { /// Side::Left => &self.left, @@ -115,7 +115,7 @@ pub trait Index { /// } /// /// impl IndexMut for Balance { -/// fn index_mut<'a>(&'a mut self, index: Side) -> &'a mut Self::Output { +/// fn index_mut(&mut self, index: Side) -> &mut Self::Output { /// println!("Accessing {:?}-side of balance mutably", index); /// match index { /// Side::Left => &mut self.left, diff --git a/src/libproc_macro/bridge/scoped_cell.rs b/src/libproc_macro/bridge/scoped_cell.rs index 6f7965095b638..89fb707001589 100644 --- a/src/libproc_macro/bridge/scoped_cell.rs +++ b/src/libproc_macro/bridge/scoped_cell.rs @@ -74,7 +74,7 @@ impl ScopedCell { } /// Sets the value in `self` to `value` while running `f`. - pub fn set<'a, R>(&self, value: >::Out, f: impl FnOnce() -> R) -> R { + pub fn set(&self, value: >::Out, f: impl FnOnce() -> R) -> R { self.replace(value, |_| f()) } } diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index 3c4f8e077c922..a9c4c7345c284 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -140,7 +140,7 @@ fn wait_timeout_receiver<'a, 'b, T>(lock: &'a Mutex>, new_guard } -fn abort_selection<'a, T>(guard: &mut MutexGuard<'a , State>) -> bool { +fn abort_selection(guard: &mut MutexGuard<'_, State>) -> bool { match mem::replace(&mut guard.blocker, NoneBlocked) { NoneBlocked => true, BlockedSender(token) => { diff --git a/src/libstd/sys/redox/ext/net.rs b/src/libstd/sys/redox/ext/net.rs index b3ef5f3064c16..e25bab4ff6104 100644 --- a/src/libstd/sys/redox/ext/net.rs +++ b/src/libstd/sys/redox/ext/net.rs @@ -673,7 +673,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket_redox", since = "1.29.0")] - pub fn incoming<'a>(&'a self) -> Incoming<'a> { + pub fn incoming(&self) -> Incoming { Incoming { listener: self } } } diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 41090caee8459..a9b8bc6a96298 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -894,7 +894,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] - pub fn incoming<'a>(&'a self) -> Incoming<'a> { + pub fn incoming(&self) -> Incoming<'_> { Incoming { listener: self } } } diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 1cb5553912981..36fb1fb5ff68d 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -195,7 +195,7 @@ fn wide_char_to_multi_byte(code_page: u32, } } -pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { +pub fn truncate_utf16_at_nul(v: &[u16]) -> &[u16] { match v.iter().position(|c| *c == 0) { // don't include the 0 Some(i) => &v[..i], diff --git a/src/libstd/sys/windows/path.rs b/src/libstd/sys/windows/path.rs index f3178a5e9e690..322a17ee43d07 100644 --- a/src/libstd/sys/windows/path.rs +++ b/src/libstd/sys/windows/path.rs @@ -19,7 +19,7 @@ pub fn is_verbatim_sep(b: u8) -> bool { b == b'\\' } -pub fn parse_prefix<'a>(path: &'a OsStr) -> Option> { +pub fn parse_prefix(path: &OsStr) -> Option { use crate::path::Prefix::*; unsafe { // The unsafety here stems from converting between &OsStr and &[u8] diff --git a/src/libstd/sys_common/io.rs b/src/libstd/sys_common/io.rs index 44b0963302ddf..8789abe55c3d0 100644 --- a/src/libstd/sys_common/io.rs +++ b/src/libstd/sys_common/io.rs @@ -16,7 +16,7 @@ pub mod test { p.join(path) } - pub fn path<'a>(&'a self) -> &'a Path { + pub fn path(&self) -> &Path { let TempDir(ref p) = *self; p } diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 436620ae7293b..453b6ebf3c49d 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -440,12 +440,12 @@ pub fn contains_name(attrs: &[Attribute], name: Symbol) -> bool { }) } -pub fn find_by_name<'a>(attrs: &'a [Attribute], name: Symbol) -> Option<&'a Attribute> { +pub fn find_by_name(attrs: &[Attribute], name: Symbol) -> Option<&Attribute> { attrs.iter().find(|attr| attr.check_name(name)) } -pub fn filter_by_name<'a>(attrs: &'a [Attribute], name: Symbol) - -> impl Iterator { +pub fn filter_by_name(attrs: &[Attribute], name: Symbol) + -> impl Iterator { attrs.iter().filter(move |attr| attr.check_name(name)) } diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 92ce3779a3c81..fc8aa4793bc61 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -901,7 +901,7 @@ fn may_begin_with(token: &Token, name: Name) -> bool { /// # Returns /// /// The parsed non-terminal. -fn parse_nt<'a>(p: &mut Parser<'a>, sp: Span, name: Symbol) -> Nonterminal { +fn parse_nt(p: &mut Parser<'_>, sp: Span, name: Symbol) -> Nonterminal { if name == sym::tt { return token::NtTT(p.parse_token_tree()); } diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index 733c4f83e37d4..f037a09e9b4df 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -20,7 +20,7 @@ pub fn string_to_stream(source_str: String) -> TokenStream { } /// Map string to parser (via tts) -pub fn string_to_parser<'a>(ps: &'a ParseSess, source_str: String) -> Parser<'a> { +pub fn string_to_parser(ps: &ParseSess, source_str: String) -> Parser { new_parser_from_source_str(ps, PathBuf::from("bogofile").into(), source_str) } From 0477e072723438054ef8628ec33223cf94bacb69 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 18:12:39 +0200 Subject: [PATCH 18/31] Remove needless lifetimes --- src/librustc/hir/map/hir_id_validator.rs | 2 +- src/librustc/hir/map/mod.rs | 6 +++--- src/librustc/traits/coherence.rs | 10 +++++----- src/librustc/traits/error_reporting.rs | 2 +- src/librustc/traits/object_safety.rs | 2 +- src/librustc/traits/project.rs | 4 ++-- src/librustc/traits/util.rs | 2 +- src/librustc_codegen_ssa/traits/backend.rs | 2 +- src/librustc_codegen_ssa/traits/builder.rs | 2 +- src/librustc_mir/transform/add_retag.rs | 4 ++-- src/librustc_mir/transform/check_unsafety.rs | 14 +++++++------- src/librustc_mir/transform/dump_mir.rs | 4 ++-- src/librustc_mir/transform/generator.rs | 4 ++-- src/librustc_mir/transform/mod.rs | 12 ++++++------ src/librustc_mir/transform/qualify_consts.rs | 2 +- src/librustc_mir/transform/simplify.rs | 2 +- src/librustc_mir/transform/simplify_branches.rs | 2 +- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/librustc/hir/map/hir_id_validator.rs b/src/librustc/hir/map/hir_id_validator.rs index 60465c04ec62f..891a1956bc971 100644 --- a/src/librustc/hir/map/hir_id_validator.rs +++ b/src/librustc/hir/map/hir_id_validator.rs @@ -4,7 +4,7 @@ use crate::hir::itemlikevisit::ItemLikeVisitor; use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::sync::{Lock, ParallelIterator, par_iter}; -pub fn check_crate<'hir>(hir_map: &hir::map::Map<'hir>) { +pub fn check_crate(hir_map: &hir::map::Map<'_>) { hir_map.dep_graph.assert_ignored(); let errors = Lock::new(Vec::new()); diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index 3d591c9a1c6bd..037d04a5d8ed3 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -147,7 +147,7 @@ impl Forest { } } - pub fn krate<'hir>(&'hir self) -> &'hir Crate { + pub fn krate(&self) -> &Crate { self.dep_graph.read(DepNode::new_no_params(DepKind::Krate)); &self.krate } @@ -155,7 +155,7 @@ impl Forest { /// This is used internally in the dependency tracking system. /// Use the `krate` method to ensure your dependency on the /// crate is tracked. - pub fn untracked_krate<'hir>(&'hir self) -> &'hir Crate { + pub fn untracked_krate(&self) -> &Crate { &self.krate } } @@ -1085,7 +1085,7 @@ impl<'a> NodesMatchingSuffix<'a> { // If `id` itself is a mod named `m` with parent `p`, then // returns `Some(id, m, p)`. If `id` has no mod in its parent // chain, then returns `None`. - fn find_first_mod_parent<'a>(map: &'a Map<'_>, mut id: HirId) -> Option<(HirId, Name)> { + fn find_first_mod_parent(map: &Map<'_>, mut id: HirId) -> Option<(HirId, Name)> { loop { if let Node::Item(item) = map.find(id)? { if item_is_mod(&item) { diff --git a/src/librustc/traits/coherence.rs b/src/librustc/traits/coherence.rs index d8087af60acdf..b6f0addd77107 100644 --- a/src/librustc/traits/coherence.rs +++ b/src/librustc/traits/coherence.rs @@ -48,8 +48,8 @@ pub fn add_placeholder_note(err: &mut errors::DiagnosticBuilder<'_>) { /// If there are types that satisfy both impls, invokes `on_overlap` /// with a suitably-freshened `ImplHeader` with those types /// substituted. Otherwise, invokes `no_overlap`. -pub fn overlapping_impls<'tcx, F1, F2, R>( - tcx: TyCtxt<'tcx>, +pub fn overlapping_impls( + tcx: TyCtxt<'_>, impl1_def_id: DefId, impl2_def_id: DefId, intercrate_mode: IntercrateMode, @@ -247,10 +247,10 @@ pub enum OrphanCheckErr<'tcx> { /// /// 1. All type parameters in `Self` must be "covered" by some local type constructor. /// 2. Some local type must appear in `Self`. -pub fn orphan_check<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn orphan_check( + tcx: TyCtxt<'_>, impl_def_id: DefId, -) -> Result<(), OrphanCheckErr<'tcx>> { +) -> Result<(), OrphanCheckErr<'_>> { debug!("orphan_check({:?})", impl_def_id); // We only except this routine to be invoked on implementations diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index f54575ff8fc1d..d6cc68bcdab46 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -247,7 +247,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { fn fuzzy_match_tys(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> bool { /// returns the fuzzy category of a given type, or None /// if the type can be equated to any type. - fn type_category<'tcx>(t: Ty<'tcx>) -> Option { + fn type_category(t: Ty<'_>) -> Option { match t.sty { ty::Bool => Some(0), ty::Char => Some(1), diff --git a/src/librustc/traits/object_safety.rs b/src/librustc/traits/object_safety.rs index cfd5cfa897daf..37eff852abd01 100644 --- a/src/librustc/traits/object_safety.rs +++ b/src/librustc/traits/object_safety.rs @@ -702,6 +702,6 @@ impl<'tcx> TyCtxt<'tcx> { } } -pub(super) fn is_object_safe_provider<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId) -> bool { +pub(super) fn is_object_safe_provider(tcx: TyCtxt<'_>, trait_def_id: DefId) -> bool { tcx.object_safety_violations(trait_def_id).is_empty() } diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs index 8bd8f941fb3dd..20acf44340690 100644 --- a/src/librustc/traits/project.rs +++ b/src/librustc/traits/project.rs @@ -1509,8 +1509,8 @@ fn confirm_impl_candidate<'cx, 'tcx>( /// /// Based on the "projection mode", this lookup may in fact only examine the /// topmost impl. See the comments for `Reveal` for more details. -fn assoc_ty_def<'cx, 'tcx>( - selcx: &SelectionContext<'cx, 'tcx>, +fn assoc_ty_def( + selcx: &SelectionContext<'_, '_>, impl_def_id: DefId, assoc_ty_def_id: DefId, ) -> specialization_graph::NodeItem { diff --git a/src/librustc/traits/util.rs b/src/librustc/traits/util.rs index 2d295679be324..07d6f633143a2 100644 --- a/src/librustc/traits/util.rs +++ b/src/librustc/traits/util.rs @@ -417,7 +417,7 @@ pub struct SupertraitDefIds<'tcx> { visited: FxHashSet, } -pub fn supertrait_def_ids<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId) -> SupertraitDefIds<'tcx> { +pub fn supertrait_def_ids(tcx: TyCtxt<'_>, trait_def_id: DefId) -> SupertraitDefIds<'_> { SupertraitDefIds { tcx, stack: vec![trait_def_id], diff --git a/src/librustc_codegen_ssa/traits/backend.rs b/src/librustc_codegen_ssa/traits/backend.rs index 414871be6116e..9d5aaa7655db8 100644 --- a/src/librustc_codegen_ssa/traits/backend.rs +++ b/src/librustc_codegen_ssa/traits/backend.rs @@ -44,7 +44,7 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se mods: &mut Self::Module, kind: AllocatorKind, ); - fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString); + fn compile_codegen_unit(&self, tcx: TyCtxt<'_>, cgu_name: InternedString); // If find_features is true this won't access `sess.crate_types` by assuming // that `is_pie_binary` is false. When we discover LLVM target features // `sess.crate_types` is uninitialized so we cannot access it. diff --git a/src/librustc_codegen_ssa/traits/builder.rs b/src/librustc_codegen_ssa/traits/builder.rs index 1c80e614db8d5..3a144f0b0e0aa 100644 --- a/src/librustc_codegen_ssa/traits/builder.rs +++ b/src/librustc_codegen_ssa/traits/builder.rs @@ -36,7 +36,7 @@ pub trait BuilderMethods<'a, 'tcx>: { fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::Value, name: &'b str) -> Self; fn with_cx(cx: &'a Self::CodegenCx) -> Self; - fn build_sibling_block<'b>(&self, name: &'b str) -> Self; + fn build_sibling_block(&self, name: &str) -> Self; fn cx(&self) -> &Self::CodegenCx; fn llbb(&self) -> Self::BasicBlock; diff --git a/src/librustc_mir/transform/add_retag.rs b/src/librustc_mir/transform/add_retag.rs index e01017d7c9bdb..de5af0a46b534 100644 --- a/src/librustc_mir/transform/add_retag.rs +++ b/src/librustc_mir/transform/add_retag.rs @@ -14,8 +14,8 @@ pub struct AddRetag; /// after the assignment, we can be sure to obtain the same place value. /// (Concurrent accesses by other threads are no problem as these are anyway non-atomic /// copies. Data races are UB.) -fn is_stable<'tcx>( - place: &Place<'tcx>, +fn is_stable( + place: &Place<'_>, ) -> bool { use rustc::mir::Place::*; diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs index 24df3549be481..9898ba897734d 100644 --- a/src/librustc_mir/transform/check_unsafety.rs +++ b/src/librustc_mir/transform/check_unsafety.rs @@ -480,11 +480,11 @@ impl<'a, 'tcx> hir::intravisit::Visitor<'tcx> for UnusedUnsafeVisitor<'a> { } } -fn check_unused_unsafe<'a, 'tcx>( - tcx: TyCtxt<'tcx>, +fn check_unused_unsafe( + tcx: TyCtxt<'_>, def_id: DefId, used_unsafe: &FxHashSet, - unsafe_blocks: &'a mut Vec<(hir::HirId, bool)>, + unsafe_blocks: &mut Vec<(hir::HirId, bool)>, ) { let body_id = tcx.hir().as_local_hir_id(def_id).and_then(|hir_id| { @@ -506,7 +506,7 @@ fn check_unused_unsafe<'a, 'tcx>( hir::intravisit::Visitor::visit_body(&mut visitor, body); } -fn unsafety_check_result<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> UnsafetyCheckResult { +fn unsafety_check_result(tcx: TyCtxt<'_>, def_id: DefId) -> UnsafetyCheckResult { debug!("unsafety_violations({:?})", def_id); // N.B., this borrow is valid because all the consumers of @@ -545,7 +545,7 @@ fn unsafety_check_result<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> UnsafetyChec } } -fn unsafe_derive_on_repr_packed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +fn unsafe_derive_on_repr_packed(tcx: TyCtxt<'_>, def_id: DefId) { let lint_hir_id = tcx.hir().as_local_hir_id(def_id).unwrap_or_else(|| bug!("checking unsafety for non-local def id {:?}", def_id)); @@ -602,7 +602,7 @@ fn report_unused_unsafe(tcx: TyCtxt<'_>, used_unsafe: &FxHashSet, id db.emit(); } -fn builtin_derive_def_id<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option { +fn builtin_derive_def_id(tcx: TyCtxt<'_>, def_id: DefId) -> Option { debug!("builtin_derive_def_id({:?})", def_id); if let Some(impl_def_id) = tcx.impl_of_method(def_id) { if tcx.has_attr(impl_def_id, sym::automatically_derived) { @@ -618,7 +618,7 @@ fn builtin_derive_def_id<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option(tcx: TyCtxt<'tcx>, def_id: DefId) { +pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: DefId) { debug!("check_unsafety({:?})", def_id); // closures are handled by their parent fn. diff --git a/src/librustc_mir/transform/dump_mir.rs b/src/librustc_mir/transform/dump_mir.rs index 243820ba7d027..a6fb555f20bd0 100644 --- a/src/librustc_mir/transform/dump_mir.rs +++ b/src/librustc_mir/transform/dump_mir.rs @@ -14,7 +14,7 @@ use crate::util as mir_util; pub struct Marker(pub &'static str); impl MirPass for Marker { - fn name<'a>(&'a self) -> Cow<'a, str> { + fn name(&self) -> Cow<'_, str> { Cow::Borrowed(self.0) } @@ -52,7 +52,7 @@ pub fn on_mir_pass<'tcx>( } } -pub fn emit_mir<'tcx>(tcx: TyCtxt<'tcx>, outputs: &OutputFilenames) -> io::Result<()> { +pub fn emit_mir(tcx: TyCtxt<'_>, outputs: &OutputFilenames) -> io::Result<()> { let path = outputs.path(OutputType::Mir); let mut f = File::create(&path)?; mir_util::write_mir_pretty(tcx, None, &mut f)?; diff --git a/src/librustc_mir/transform/generator.rs b/src/librustc_mir/transform/generator.rs index 1acebede2e41b..2ed3f7d5c26e2 100644 --- a/src/librustc_mir/transform/generator.rs +++ b/src/librustc_mir/transform/generator.rs @@ -1028,14 +1028,14 @@ fn create_generator_resume_function<'tcx>( dump_mir(tcx, None, "generator_resume", &0, source, body, |_, _| Ok(()) ); } -fn source_info<'tcx>(body: &Body<'tcx>) -> SourceInfo { +fn source_info(body: &Body<'_>) -> SourceInfo { SourceInfo { span: body.span, scope: OUTERMOST_SOURCE_SCOPE, } } -fn insert_clean_drop<'tcx>(body: &mut Body<'tcx>) -> BasicBlock { +fn insert_clean_drop(body: &mut Body<'_>) -> BasicBlock { let return_block = insert_term_block(body, TerminatorKind::Return); // Create a block to destroy an unresumed generators. This can only destroy upvars. diff --git a/src/librustc_mir/transform/mod.rs b/src/librustc_mir/transform/mod.rs index 81d91dcd0a95f..7f43c4a3e89a1 100644 --- a/src/librustc_mir/transform/mod.rs +++ b/src/librustc_mir/transform/mod.rs @@ -50,13 +50,13 @@ pub(crate) fn provide(providers: &mut Providers<'_>) { }; } -fn is_mir_available<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn is_mir_available(tcx: TyCtxt<'_>, def_id: DefId) -> bool { tcx.mir_keys(def_id.krate).contains(&def_id) } /// Finds the full set of `DefId`s within the current crate that have /// MIR associated with them. -fn mir_keys<'tcx>(tcx: TyCtxt<'tcx>, krate: CrateNum) -> &'tcx DefIdSet { +fn mir_keys(tcx: TyCtxt<'_>, krate: CrateNum) -> &DefIdSet { assert_eq!(krate, LOCAL_CRATE); let mut set = DefIdSet::default(); @@ -94,7 +94,7 @@ fn mir_keys<'tcx>(tcx: TyCtxt<'tcx>, krate: CrateNum) -> &'tcx DefIdSet { tcx.arena.alloc(set) } -fn mir_built<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx Steal> { +fn mir_built(tcx: TyCtxt<'_>, def_id: DefId) -> &Steal> { let mir = build::mir_build(tcx, def_id); tcx.alloc_steal_mir(mir) } @@ -137,7 +137,7 @@ pub fn default_name() -> Cow<'static, str> { /// pass will be named after the type, and it will consist of a main /// loop that goes over each available MIR and applies `run_pass`. pub trait MirPass { - fn name<'a>(&'a self) -> Cow<'a, str> { + fn name(&self) -> Cow<'_, str> { default_name::() } @@ -192,7 +192,7 @@ pub fn run_passes( } } -fn mir_const<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx Steal> { +fn mir_const(tcx: TyCtxt<'_>, def_id: DefId) -> &Steal> { // Unsafety check uses the raw mir, so make sure it is run let _ = tcx.unsafety_check_result(def_id); @@ -223,7 +223,7 @@ fn mir_validated(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx Steal> { tcx.alloc_steal_mir(body) } -fn optimized_mir<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx Body<'tcx> { +fn optimized_mir(tcx: TyCtxt<'_>, def_id: DefId) -> &Body<'_> { if tcx.is_constructor(def_id) { // There's no reason to run all of the MIR passes on constructors when // we can just output the MIR we want directly. This also saves const diff --git a/src/librustc_mir/transform/qualify_consts.rs b/src/librustc_mir/transform/qualify_consts.rs index f082b5e5a046c..3e52d3ee9bbdf 100644 --- a/src/librustc_mir/transform/qualify_consts.rs +++ b/src/librustc_mir/transform/qualify_consts.rs @@ -1473,7 +1473,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn mir_const_qualif<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> (u8, &'tcx BitSet) { +fn mir_const_qualif(tcx: TyCtxt<'_>, def_id: DefId) -> (u8, &BitSet) { // N.B., this `borrow()` is guaranteed to be valid (i.e., the value // cannot yet be stolen), because `mir_validated()`, which steals // from `mir_const(), forces this query to execute before diff --git a/src/librustc_mir/transform/simplify.rs b/src/librustc_mir/transform/simplify.rs index f226f15c0096f..2eed9d453f233 100644 --- a/src/librustc_mir/transform/simplify.rs +++ b/src/librustc_mir/transform/simplify.rs @@ -53,7 +53,7 @@ pub fn simplify_cfg(body: &mut Body<'_>) { } impl MirPass for SimplifyCfg { - fn name<'a>(&'a self) -> Cow<'a, str> { + fn name(&self) -> Cow<'_, str> { Cow::Borrowed(&self.label) } diff --git a/src/librustc_mir/transform/simplify_branches.rs b/src/librustc_mir/transform/simplify_branches.rs index 0c63a8d9c96b1..f39c71ef42d71 100644 --- a/src/librustc_mir/transform/simplify_branches.rs +++ b/src/librustc_mir/transform/simplify_branches.rs @@ -15,7 +15,7 @@ impl SimplifyBranches { } impl MirPass for SimplifyBranches { - fn name<'a>(&'a self) -> Cow<'a, str> { + fn name(&self) -> Cow<'_, str> { Cow::Borrowed(&self.label) } From 6ae80cf23f744566f2822861291abcfcdc6af5ce Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 18:51:27 +0200 Subject: [PATCH 19/31] Remove needless lifetimes --- src/librustc/cfg/construct.rs | 2 +- src/librustc/cfg/mod.rs | 2 +- src/librustc/dep_graph/graph.rs | 2 +- src/librustc_borrowck/borrowck/check_loans.rs | 2 +- src/librustc_borrowck/borrowck/mod.rs | 4 +-- src/librustc_codegen_llvm/back/write.rs | 6 ++-- .../back/symbol_export.rs | 28 +++++++++---------- src/librustc_codegen_ssa/debuginfo/mod.rs | 2 +- src/librustc_data_structures/graph/mod.rs | 12 ++++---- .../graph/reference.rs | 8 +++--- src/librustc_data_structures/graph/test.rs | 8 +++--- src/librustc_mir/borrow_check/mod.rs | 2 +- .../borrow_check/nll/constraints/graph.rs | 6 ++-- src/librustc_mir/borrow_check/path_utils.rs | 2 +- src/librustc_mir/build/expr/category.rs | 2 +- src/librustc_mir/build/mod.rs | 10 +++---- src/librustdoc/clean/mod.rs | 10 +++---- src/libsyntax_ext/deriving/generic/mod.rs | 4 +-- src/libsyntax_ext/deriving/generic/ty.rs | 6 ++-- 19 files changed, 59 insertions(+), 59 deletions(-) diff --git a/src/librustc/cfg/construct.rs b/src/librustc/cfg/construct.rs index a7750edbb6f48..2932edd347af5 100644 --- a/src/librustc/cfg/construct.rs +++ b/src/librustc/cfg/construct.rs @@ -30,7 +30,7 @@ struct LoopScope { break_index: CFGIndex, // where to go on a `break` } -pub fn construct<'tcx>(tcx: TyCtxt<'tcx>, body: &hir::Body) -> CFG { +pub fn construct(tcx: TyCtxt<'_>, body: &hir::Body) -> CFG { let mut graph = graph::Graph::new(); let entry = graph.add_node(CFGNodeData::Entry); diff --git a/src/librustc/cfg/mod.rs b/src/librustc/cfg/mod.rs index db168d99a0801..88fc7fbfad51f 100644 --- a/src/librustc/cfg/mod.rs +++ b/src/librustc/cfg/mod.rs @@ -49,7 +49,7 @@ pub type CFGNode = graph::Node; pub type CFGEdge = graph::Edge; impl CFG { - pub fn new<'tcx>(tcx: TyCtxt<'tcx>, body: &hir::Body) -> CFG { + pub fn new(tcx: TyCtxt<'_>, body: &hir::Body) -> CFG { construct::construct(tcx, body) } diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 93c22c3e713c0..b8c6c1e372382 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -841,7 +841,7 @@ impl DepGraph { // // This method will only load queries that will end up in the disk cache. // Other queries will not be executed. - pub fn exec_cache_promotions<'tcx>(&self, tcx: TyCtxt<'tcx>) { + pub fn exec_cache_promotions(&self, tcx: TyCtxt<'_>) { let data = self.data.as_ref().unwrap(); for prev_index in data.colors.values.indices() { match data.colors.get(prev_index) { diff --git a/src/librustc_borrowck/borrowck/check_loans.rs b/src/librustc_borrowck/borrowck/check_loans.rs index 714b7c27200e3..a098cd1761236 100644 --- a/src/librustc_borrowck/borrowck/check_loans.rs +++ b/src/librustc_borrowck/borrowck/check_loans.rs @@ -354,7 +354,7 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> { cmt: &mc::cmt_<'tcx>, loan_region: ty::Region<'tcx>, borrow_span: Span) { - pub fn borrow_of_local_data<'tcx>(cmt: &mc::cmt_<'tcx>) -> bool { + pub fn borrow_of_local_data(cmt: &mc::cmt_<'_>) -> bool { match cmt.cat { // Borrows of static items is allowed Categorization::StaticItem => false, diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index 3c7f19f7fbf4f..8763a6bc066b3 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -53,7 +53,7 @@ pub struct LoanDataFlowOperator; pub type LoanDataFlow<'tcx> = DataFlowContext<'tcx, LoanDataFlowOperator>; -pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_crate(tcx: TyCtxt<'_>) { tcx.par_body_owners(|body_owner_def_id| { tcx.ensure().borrowck(body_owner_def_id); }); @@ -73,7 +73,7 @@ pub struct AnalysisData<'tcx> { pub move_data: move_data::FlowedMoveData<'tcx>, } -fn borrowck<'tcx>(tcx: TyCtxt<'tcx>, owner_def_id: DefId) -> &'tcx BorrowCheckResult { +fn borrowck(tcx: TyCtxt<'_>, owner_def_id: DefId) -> &BorrowCheckResult { assert!(tcx.use_ast_borrowck() || tcx.migrate_borrowck()); debug!("borrowck(body_owner_def_id={:?})", owner_def_id); diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 3638730707f3f..b135605cf02d7 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -239,9 +239,9 @@ impl<'a> Drop for DiagnosticHandlers<'a> { } } -unsafe extern "C" fn report_inline_asm<'a, 'b>(cgcx: &'a CodegenContext, - msg: &'b str, - cookie: c_uint) { +unsafe extern "C" fn report_inline_asm(cgcx: &CodegenContext, + msg: &str, + cookie: c_uint) { cgcx.diag_emitter.inline_asm_error(cookie as u32, msg.to_owned()); } diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index 3e0f030527f43..b64c9a60d9713 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -46,10 +46,10 @@ pub fn crates_export_threshold(crate_types: &[config::CrateType]) -> SymbolExpor } } -fn reachable_non_generics_provider<'tcx>( - tcx: TyCtxt<'tcx>, +fn reachable_non_generics_provider( + tcx: TyCtxt<'_>, cnum: CrateNum, -) -> &'tcx DefIdMap { +) -> &DefIdMap { assert_eq!(cnum, LOCAL_CRATE); if !tcx.sess.opts.output_types.should_codegen() { @@ -157,7 +157,7 @@ fn reachable_non_generics_provider<'tcx>( tcx.arena.alloc(reachable_non_generics) } -fn is_reachable_non_generic_provider_local<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn is_reachable_non_generic_provider_local(tcx: TyCtxt<'_>, def_id: DefId) -> bool { let export_threshold = threshold(tcx); if let Some(&level) = tcx.reachable_non_generics(def_id.krate).get(&def_id) { @@ -167,14 +167,14 @@ fn is_reachable_non_generic_provider_local<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefI } } -fn is_reachable_non_generic_provider_extern<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn is_reachable_non_generic_provider_extern(tcx: TyCtxt<'_>, def_id: DefId) -> bool { tcx.reachable_non_generics(def_id.krate).contains_key(&def_id) } -fn exported_symbols_provider_local<'tcx>( - tcx: TyCtxt<'tcx>, +fn exported_symbols_provider_local( + tcx: TyCtxt<'_>, cnum: CrateNum, -) -> Arc, SymbolExportLevel)>> { +) -> Arc, SymbolExportLevel)>> { assert_eq!(cnum, LOCAL_CRATE); if !tcx.sess.opts.output_types.should_codegen() { @@ -273,10 +273,10 @@ fn exported_symbols_provider_local<'tcx>( Arc::new(symbols) } -fn upstream_monomorphizations_provider<'tcx>( - tcx: TyCtxt<'tcx>, +fn upstream_monomorphizations_provider( + tcx: TyCtxt<'_>, cnum: CrateNum, -) -> &'tcx DefIdMap, CrateNum>> { +) -> &DefIdMap, CrateNum>> { debug_assert!(cnum == LOCAL_CRATE); let cnums = tcx.all_crate_nums(LOCAL_CRATE); @@ -322,10 +322,10 @@ fn upstream_monomorphizations_provider<'tcx>( tcx.arena.alloc(instances) } -fn upstream_monomorphizations_for_provider<'tcx>( - tcx: TyCtxt<'tcx>, +fn upstream_monomorphizations_for_provider( + tcx: TyCtxt<'_>, def_id: DefId, -) -> Option<&'tcx FxHashMap, CrateNum>> { +) -> Option<&FxHashMap, CrateNum>> { debug_assert!(!def_id.is_local()); tcx.upstream_monomorphizations(LOCAL_CRATE).get(&def_id) } diff --git a/src/librustc_codegen_ssa/debuginfo/mod.rs b/src/librustc_codegen_ssa/debuginfo/mod.rs index d60a2e0cb1358..c9b1c0260e8c3 100644 --- a/src/librustc_codegen_ssa/debuginfo/mod.rs +++ b/src/librustc_codegen_ssa/debuginfo/mod.rs @@ -10,7 +10,7 @@ pub enum FunctionDebugContext { } impl FunctionDebugContext { - pub fn get_ref<'a>(&'a self, span: Span) -> &'a FunctionDebugContextData { + pub fn get_ref(&self, span: Span) -> &FunctionDebugContextData { match *self { FunctionDebugContext::RegularContext(ref data) => data, FunctionDebugContext::DebugInfoDisabled => { diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs index 2787fa3c6b1e4..e59085a9e3a95 100644 --- a/src/librustc_data_structures/graph/mod.rs +++ b/src/librustc_data_structures/graph/mod.rs @@ -26,10 +26,10 @@ pub trait WithSuccessors: DirectedGraph where Self: for<'graph> GraphSuccessors<'graph, Item = ::Node>, { - fn successors<'graph>( - &'graph self, + fn successors( + &self, node: Self::Node, - ) -> >::Iter; + ) -> >::Iter; fn depth_first_search(&self, from: Self::Node) -> iterate::DepthFirstSearch<'_, Self> where @@ -48,10 +48,10 @@ pub trait WithPredecessors: DirectedGraph where Self: for<'graph> GraphPredecessors<'graph, Item = ::Node>, { - fn predecessors<'graph>( - &'graph self, + fn predecessors( + &self, node: Self::Node, - ) -> >::Iter; + ) -> >::Iter; } pub trait GraphPredecessors<'graph> { diff --git a/src/librustc_data_structures/graph/reference.rs b/src/librustc_data_structures/graph/reference.rs index 5ad2a71e1d732..9442bb3cdec3b 100644 --- a/src/librustc_data_structures/graph/reference.rs +++ b/src/librustc_data_structures/graph/reference.rs @@ -17,15 +17,15 @@ impl<'graph, G: WithStartNode> WithStartNode for &'graph G { } impl<'graph, G: WithSuccessors> WithSuccessors for &'graph G { - fn successors<'iter>(&'iter self, node: Self::Node) -> >::Iter { + fn successors(&self, node: Self::Node) -> >::Iter { (**self).successors(node) } } impl<'graph, G: WithPredecessors> WithPredecessors for &'graph G { - fn predecessors<'iter>(&'iter self, - node: Self::Node) - -> >::Iter { + fn predecessors(&self, + node: Self::Node) + -> >::Iter { (**self).predecessors(node) } } diff --git a/src/librustc_data_structures/graph/test.rs b/src/librustc_data_structures/graph/test.rs index b390c41957294..5ff0cbf58c797 100644 --- a/src/librustc_data_structures/graph/test.rs +++ b/src/librustc_data_structures/graph/test.rs @@ -51,15 +51,15 @@ impl WithNumNodes for TestGraph { } impl WithPredecessors for TestGraph { - fn predecessors<'graph>(&'graph self, - node: usize) - -> >::Iter { + fn predecessors(&self, + node: usize) + -> >::Iter { self.predecessors[&node].iter().cloned() } } impl WithSuccessors for TestGraph { - fn successors<'graph>(&'graph self, node: usize) -> >::Iter { + fn successors(&self, node: usize) -> ::Iter { self.successors[&node].iter().cloned() } } diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 4872440f5bd4a..0072fcb22f13e 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -87,7 +87,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn mir_borrowck<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> BorrowCheckResult<'tcx> { +fn mir_borrowck(tcx: TyCtxt<'_>, def_id: DefId) -> BorrowCheckResult<'_> { let input_body = tcx.mir_validated(def_id); debug!("run query mir_borrowck: {}", tcx.def_path_str(def_id)); diff --git a/src/librustc_mir/borrow_check/nll/constraints/graph.rs b/src/librustc_mir/borrow_check/nll/constraints/graph.rs index 1d9e6064c416b..b5630251e5830 100644 --- a/src/librustc_mir/borrow_check/nll/constraints/graph.rs +++ b/src/librustc_mir/borrow_check/nll/constraints/graph.rs @@ -234,10 +234,10 @@ impl<'s, D: ConstraintGraphDirecton> graph::WithNumNodes for RegionGraph<'s, D> } impl<'s, D: ConstraintGraphDirecton> graph::WithSuccessors for RegionGraph<'s, D> { - fn successors<'graph>( - &'graph self, + fn successors( + &self, node: Self::Node, - ) -> >::Iter { + ) -> >::Iter { self.outgoing_regions(node) } } diff --git a/src/librustc_mir/borrow_check/path_utils.rs b/src/librustc_mir/borrow_check/path_utils.rs index aa2b177e54ed8..538ac6881d90a 100644 --- a/src/librustc_mir/borrow_check/path_utils.rs +++ b/src/librustc_mir/borrow_check/path_utils.rs @@ -130,7 +130,7 @@ pub(super) fn is_active<'tcx>( /// Determines if a given borrow is borrowing local data /// This is called for all Yield statements on movable generators -pub(super) fn borrow_of_local_data<'tcx>(place: &Place<'tcx>) -> bool { +pub(super) fn borrow_of_local_data(place: &Place<'_>) -> bool { place.iterate(|place_base, place_projection| { match place_base { PlaceBase::Static(..) => return false, diff --git a/src/librustc_mir/build/expr/category.rs b/src/librustc_mir/build/expr/category.rs index 222ce6d1c968e..f679a00035d76 100644 --- a/src/librustc_mir/build/expr/category.rs +++ b/src/librustc_mir/build/expr/category.rs @@ -31,7 +31,7 @@ pub enum RvalueFunc { /// Determines the category for a given expression. Note that scope /// and paren expressions have no category. impl Category { - pub fn of<'tcx>(ek: &ExprKind<'tcx>) -> Option { + pub fn of(ek: &ExprKind<'_>) -> Option { match *ek { ExprKind::Scope { .. } => None, diff --git a/src/librustc_mir/build/mod.rs b/src/librustc_mir/build/mod.rs index ad970de466cfd..80a035d8287f4 100644 --- a/src/librustc_mir/build/mod.rs +++ b/src/librustc_mir/build/mod.rs @@ -22,7 +22,7 @@ use syntax_pos::Span; use super::lints; /// Construct the MIR for a given `DefId`. -pub fn mir_build<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Body<'tcx> { +pub fn mir_build(tcx: TyCtxt<'_>, def_id: DefId) -> Body<'_> { let id = tcx.hir().as_local_hir_id(def_id).unwrap(); // Figure out what primary body this item has. @@ -171,11 +171,11 @@ pub fn mir_build<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Body<'tcx> { /////////////////////////////////////////////////////////////////////////// // BuildMir -- walks a crate, looking for fn items and methods to build MIR from -fn liberated_closure_env_ty<'tcx>( - tcx: TyCtxt<'tcx>, +fn liberated_closure_env_ty( + tcx: TyCtxt<'_>, closure_expr_id: hir::HirId, body_id: hir::BodyId, -) -> Ty<'tcx> { +) -> Ty<'_> { let closure_ty = tcx.body_tables(body_id).node_type(closure_expr_id); let (closure_def_id, closure_substs) = match closure_ty.sty { @@ -485,7 +485,7 @@ macro_rules! unpack { }; } -fn should_abort_on_panic<'tcx>(tcx: TyCtxt<'tcx>, fn_def_id: DefId, abi: Abi) -> bool { +fn should_abort_on_panic(tcx: TyCtxt<'_>, fn_def_id: DefId, abi: Abi) -> bool { // Not callable from C, so we can safely unwind through these if abi == Abi::Rust || abi == Abi::RustCall { return false; } diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 3fe048a6986bb..dae72ebd52d33 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -392,7 +392,7 @@ impl fmt::Debug for Item { impl Item { /// Finds the `doc` attribute as a NameValue and returns the corresponding /// value found. - pub fn doc_value<'a>(&'a self) -> Option<&'a str> { + pub fn doc_value(&self) -> Option<&str> { self.attrs.doc_value() } /// Finds all `doc` attributes as NameValues and returns their corresponding values, joined @@ -699,11 +699,11 @@ impl<'a> Iterator for ListAttributesIter<'a> { pub trait AttributesExt { /// Finds an attribute as List and returns the list of attributes nested inside. - fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a>; + fn lists(&self, name: Symbol) -> ListAttributesIter<'_>; } impl AttributesExt for [ast::Attribute] { - fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a> { + fn lists(&self, name: Symbol) -> ListAttributesIter<'_> { ListAttributesIter { attrs: self.iter(), current_list: Vec::new().into_iter(), @@ -952,7 +952,7 @@ impl Attributes { /// Finds the `doc` attribute as a NameValue and returns the corresponding /// value found. - pub fn doc_value<'a>(&'a self) -> Option<&'a str> { + pub fn doc_value(&self) -> Option<&str> { self.doc_strings.first().map(|s| s.as_str()) } @@ -1037,7 +1037,7 @@ impl Hash for Attributes { } impl AttributesExt for Attributes { - fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a> { + fn lists(&self, name: Symbol) -> ListAttributesIter<'_> { self.other_attrs.lists(name) } } diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 444cf1263ce25..12482f7248e90 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -331,8 +331,8 @@ pub type CombineSubstructureFunc<'a> = pub type EnumNonMatchCollapsedFunc<'a> = Box, Span, (&[Ident], &[Ident]), &[P]) -> P + 'a>; -pub fn combine_substructure<'a>(f: CombineSubstructureFunc<'a>) - -> RefCell> { +pub fn combine_substructure(f: CombineSubstructureFunc<'_>) + -> RefCell> { RefCell::new(f) } diff --git a/src/libsyntax_ext/deriving/generic/ty.rs b/src/libsyntax_ext/deriving/generic/ty.rs index 90d826429da4d..02b02e9b83695 100644 --- a/src/libsyntax_ext/deriving/generic/ty.rs +++ b/src/libsyntax_ext/deriving/generic/ty.rs @@ -39,10 +39,10 @@ pub enum PathKind { } impl<'a> Path<'a> { - pub fn new<'r>(path: Vec<&'r str>) -> Path<'r> { + pub fn new(path: Vec<&str>) -> Path<'_> { Path::new_(path, None, Vec::new(), PathKind::Std) } - pub fn new_local<'r>(path: &'r str) -> Path<'r> { + pub fn new_local(path: &str) -> Path<'_> { Path::new_(vec![path], None, Vec::new(), PathKind::Local) } pub fn new_<'r>(path: Vec<&'r str>, @@ -117,7 +117,7 @@ pub enum Const { pub fn borrowed_ptrty<'r>() -> PtrTy<'r> { Borrowed(None, ast::Mutability::Immutable) } -pub fn borrowed<'r>(ty: Box>) -> Ty<'r> { +pub fn borrowed(ty: Box>) -> Ty<'_> { Ptr(ty, borrowed_ptrty()) } From d50a3a7b8696975a2a1116f8c4eb4673271ae968 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 20:05:14 +0200 Subject: [PATCH 20/31] Remove needless lifetimes --- src/librustc/hir/check_attr.rs | 2 +- src/librustc/infer/type_variable.rs | 2 +- .../graph/implementation/mod.rs | 6 +-- .../dataflow/impls/borrowed_locals.rs | 2 +- src/librustc_typeck/check/dropck.rs | 2 +- src/librustc_typeck/check/intrinsic.rs | 4 +- src/librustc_typeck/check/mod.rs | 50 +++++++++---------- src/librustc_typeck/check/wfcheck.rs | 30 +++++------ src/librustc_typeck/coherence/builtin.rs | 8 +-- .../coherence/inherent_impls.rs | 8 +-- .../coherence/inherent_impls_overlap.rs | 2 +- src/librustc_typeck/coherence/mod.rs | 8 +-- src/librustc_typeck/coherence/orphan.rs | 2 +- src/librustc_typeck/coherence/unsafety.rs | 2 +- src/librustdoc/html/render.rs | 2 +- src/librustdoc/html/toc.rs | 2 +- 16 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs index 4b84d56858cca..9160b8024ee45 100644 --- a/src/librustc/hir/check_attr.rs +++ b/src/librustc/hir/check_attr.rs @@ -347,7 +347,7 @@ fn is_c_like_enum(item: &hir::Item) -> bool { } } -fn check_mod_attrs<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_attrs(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module( module_def_id, &mut CheckAttrVisitor { tcx }.as_deep_visitor() diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index dcafb0f3976ff..e30e86998a8c6 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -115,7 +115,7 @@ impl<'tcx> TypeVariableTable<'tcx> { /// /// Note that this function does not return care whether /// `vid` has been unified with something else or not. - pub fn var_diverges<'a>(&'a self, vid: ty::TyVid) -> bool { + pub fn var_diverges(&self, vid: ty::TyVid) -> bool { self.values.get(vid.index as usize).diverging } diff --git a/src/librustc_data_structures/graph/implementation/mod.rs b/src/librustc_data_structures/graph/implementation/mod.rs index de4b1bcd0c2a1..d2699004c81d8 100644 --- a/src/librustc_data_structures/graph/implementation/mod.rs +++ b/src/librustc_data_structures/graph/implementation/mod.rs @@ -247,11 +247,11 @@ impl Graph { self.incoming_edges(target).sources() } - pub fn depth_traverse<'a>( - &'a self, + pub fn depth_traverse( + &self, start: NodeIndex, direction: Direction, - ) -> DepthFirstTraversal<'a, N, E> { + ) -> DepthFirstTraversal<'_, N, E> { DepthFirstTraversal::with_start_node(self, start, direction) } diff --git a/src/librustc_mir/dataflow/impls/borrowed_locals.rs b/src/librustc_mir/dataflow/impls/borrowed_locals.rs index 0f7f37f2db8b4..d94ebdbae24ae 100644 --- a/src/librustc_mir/dataflow/impls/borrowed_locals.rs +++ b/src/librustc_mir/dataflow/impls/borrowed_locals.rs @@ -92,7 +92,7 @@ struct BorrowedLocalsVisitor<'gk> { trans: &'gk mut GenKillSet, } -fn find_local<'tcx>(place: &Place<'tcx>) -> Option { +fn find_local(place: &Place<'_>) -> Option { place.iterate(|place_base, place_projection| { for proj in place_projection { if proj.elem == ProjectionElem::Deref { diff --git a/src/librustc_typeck/check/dropck.rs b/src/librustc_typeck/check/dropck.rs index a2621abf44d8d..c4c4e10a14cc0 100644 --- a/src/librustc_typeck/check/dropck.rs +++ b/src/librustc_typeck/check/dropck.rs @@ -29,7 +29,7 @@ use syntax_pos::Span; /// struct/enum definition for the nominal type itself (i.e. /// cannot do `struct S; impl Drop for S { ... }`). /// -pub fn check_drop_impl<'tcx>(tcx: TyCtxt<'tcx>, drop_impl_did: DefId) -> Result<(), ErrorReported> { +pub fn check_drop_impl(tcx: TyCtxt<'_>, drop_impl_did: DefId) -> Result<(), ErrorReported> { let dtor_self_type = tcx.type_of(drop_impl_did); let dtor_predicates = tcx.predicates_of(drop_impl_did); match dtor_self_type.sty { diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs index 8c2b8d1565f2f..9b1a891382209 100644 --- a/src/librustc_typeck/check/intrinsic.rs +++ b/src/librustc_typeck/check/intrinsic.rs @@ -79,7 +79,7 @@ pub fn intrisic_operation_unsafety(intrinsic: &str) -> hir::Unsafety { /// Remember to add all intrinsics here, in librustc_codegen_llvm/intrinsic.rs, /// and in libcore/intrinsics.rs -pub fn check_intrinsic_type<'tcx>(tcx: TyCtxt<'tcx>, it: &hir::ForeignItem) { +pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem) { let param = |n| tcx.mk_ty_param(n, InternedString::intern(&format!("P{}", n))); let name = it.ident.as_str(); @@ -385,7 +385,7 @@ pub fn check_intrinsic_type<'tcx>(tcx: TyCtxt<'tcx>, it: &hir::ForeignItem) { } /// Type-check `extern "platform-intrinsic" { ... }` functions. -pub fn check_platform_intrinsic_type<'tcx>(tcx: TyCtxt<'tcx>, it: &hir::ForeignItem) { +pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem) { let param = |n| { let name = InternedString::intern(&format!("P{}", n)); tcx.mk_ty_param(n, name) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index b0be37772af39..a68778ba804be 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -698,31 +698,31 @@ impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> { fn visit_impl_item(&mut self, _: &'tcx hir::ImplItem) { } } -pub fn check_wf_new<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_wf_new(tcx: TyCtxt<'_>) { let mut visit = wfcheck::CheckTypeWellFormedVisitor::new(tcx); tcx.hir().krate().par_visit_all_item_likes(&mut visit); } -fn check_mod_item_types<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_item_types(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module(module_def_id, &mut CheckItemTypesVisitor { tcx }); } -fn typeck_item_bodies<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) { +fn typeck_item_bodies(tcx: TyCtxt<'_>, crate_num: CrateNum) { debug_assert!(crate_num == LOCAL_CRATE); tcx.par_body_owners(|body_owner_def_id| { tcx.ensure().typeck_tables_of(body_owner_def_id); }); } -fn check_item_well_formed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { wfcheck::check_item_well_formed(tcx, def_id); } -fn check_trait_item_well_formed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +fn check_trait_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { wfcheck::check_trait_item(tcx, def_id); } -fn check_impl_item_well_formed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +fn check_impl_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { wfcheck::check_impl_item(tcx, def_id); } @@ -742,7 +742,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn adt_destructor<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option { +fn adt_destructor(tcx: TyCtxt<'_>, def_id: DefId) -> Option { tcx.calculate_dtor(def_id, &mut dropck::check_drop_impl) } @@ -755,10 +755,10 @@ fn adt_destructor<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option( - tcx: TyCtxt<'tcx>, +fn primary_body_of( + tcx: TyCtxt<'_>, id: hir::HirId, -) -> Option<(hir::BodyId, Option<&'tcx hir::FnDecl>)> { +) -> Option<(hir::BodyId, Option<&hir::FnDecl>)> { match tcx.hir().get(id) { Node::Item(item) => { match item.node { @@ -796,7 +796,7 @@ fn primary_body_of<'tcx>( } } -fn has_typeck_tables<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn has_typeck_tables(tcx: TyCtxt<'_>, def_id: DefId) -> bool { // Closures' tables come from their outermost function, // as they are part of the same "inference environment". let outer_def_id = tcx.closure_base_def_id(def_id); @@ -808,11 +808,11 @@ fn has_typeck_tables<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { primary_body_of(tcx, id).is_some() } -fn used_trait_imports<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx DefIdSet { +fn used_trait_imports(tcx: TyCtxt<'_>, def_id: DefId) -> &DefIdSet { &*tcx.typeck_tables_of(def_id).used_trait_imports } -fn typeck_tables_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::TypeckTables<'tcx> { +fn typeck_tables_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::TypeckTables<'_> { // Closures' tables come from their outermost function, // as they are part of the same "inference environment". let outer_def_id = tcx.closure_base_def_id(def_id); @@ -913,7 +913,7 @@ fn typeck_tables_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::TypeckT tables } -fn check_abi<'tcx>(tcx: TyCtxt<'tcx>, span: Span, abi: Abi) { +fn check_abi(tcx: TyCtxt<'_>, span: Span, abi: Abi) { if !tcx.sess.target.target.is_abi_supported(abi) { struct_span_err!(tcx.sess, span, E0570, "The ABI `{}` is not supported for the current target", abi).emit() @@ -1291,7 +1291,7 @@ fn check_fn<'a, 'tcx>( (fcx, gen_ty) } -fn check_struct<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) { +fn check_struct(tcx: TyCtxt<'_>, id: hir::HirId, span: Span) { let def_id = tcx.hir().local_def_id_from_hir_id(id); let def = tcx.adt_def(def_id); def.destructor(tcx); // force the destructor to be evaluated @@ -1305,7 +1305,7 @@ fn check_struct<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) { check_packed(tcx, span, def_id); } -fn check_union<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) { +fn check_union(tcx: TyCtxt<'_>, id: hir::HirId, span: Span) { let def_id = tcx.hir().local_def_id_from_hir_id(id); let def = tcx.adt_def(def_id); def.destructor(tcx); // force the destructor to be evaluated @@ -1467,14 +1467,14 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span) } } -fn check_on_unimplemented<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, item: &hir::Item) { +fn check_on_unimplemented(tcx: TyCtxt<'_>, trait_def_id: DefId, item: &hir::Item) { let item_def_id = tcx.hir().local_def_id_from_hir_id(item.hir_id); // an error would be reported if this fails. let _ = traits::OnUnimplementedDirective::of_item(tcx, trait_def_id, item_def_id); } -fn report_forbidden_specialization<'tcx>( - tcx: TyCtxt<'tcx>, +fn report_forbidden_specialization( + tcx: TyCtxt<'_>, impl_item: &hir::ImplItem, parent_impl: DefId, ) { @@ -1690,7 +1690,7 @@ fn check_impl_items_against_trait<'tcx>( /// Checks whether a type can be represented in memory. In particular, it /// identifies types that contain themselves without indirection through a /// pointer, which would mean their size is unbounded. -fn check_representable<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, item_def_id: DefId) -> bool { +fn check_representable(tcx: TyCtxt<'_>, sp: Span, item_def_id: DefId) -> bool { let rty = tcx.type_of(item_def_id); // Check that it is possible to represent this type. This call identifies @@ -1712,7 +1712,7 @@ fn check_representable<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, item_def_id: DefId) -> return true; } -pub fn check_simd<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) { +pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: DefId) { let t = tcx.type_of(def_id); if let ty::Adt(def, substs) = t.sty { if def.is_struct() { @@ -1741,7 +1741,7 @@ pub fn check_simd<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) { } } -fn check_packed<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) { +fn check_packed(tcx: TyCtxt<'_>, sp: Span, def_id: DefId) { let repr = tcx.adt_def(def_id).repr; if repr.packed() { for attr in tcx.get_attrs(def_id).iter() { @@ -1765,7 +1765,7 @@ fn check_packed<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) { } } -fn check_packed_inner<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, stack: &mut Vec) -> bool { +fn check_packed_inner(tcx: TyCtxt<'_>, def_id: DefId, stack: &mut Vec) -> bool { let t = tcx.type_of(def_id); if stack.contains(&def_id) { debug!("check_packed_inner: {:?} is recursive", t); @@ -1839,7 +1839,7 @@ fn bad_non_zero_sized_fields<'tcx>( err.emit(); } -fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) { +fn check_transparent(tcx: TyCtxt<'_>, sp: Span, def_id: DefId) { let adt = tcx.adt_def(def_id); if !adt.repr.transparent() { return; @@ -1988,7 +1988,7 @@ pub fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, vs: &'tcx [hir::Variant], i check_transparent(tcx, sp, def_id); } -fn report_unexpected_variant_res<'tcx>(tcx: TyCtxt<'tcx>, res: Res, span: Span, qpath: &QPath) { +fn report_unexpected_variant_res(tcx: TyCtxt<'_>, res: Res, span: Span, qpath: &QPath) { span_err!(tcx.sess, span, E0533, "expected unit struct/variant or constant, found {} `{}`", res.descr(), diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index d612d042f7f23..2c48bd8b4f026 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -68,7 +68,7 @@ impl<'tcx> CheckWfFcxBuilder<'tcx> { /// We do this check as a pre-pass before checking fn bodies because if these constraints are /// not included it frequently leads to confusing errors in fn bodies. So it's better to check /// the types first. -pub fn check_item_well_formed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +pub fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); let item = tcx.hir().expect_item(hir_id); @@ -156,7 +156,7 @@ pub fn check_item_well_formed<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { } } -pub fn check_trait_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +pub fn check_trait_item(tcx: TyCtxt<'_>, def_id: DefId) { let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); let trait_item = tcx.hir().expect_trait_item(hir_id); @@ -167,7 +167,7 @@ pub fn check_trait_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { check_associated_item(tcx, trait_item.hir_id, trait_item.span, method_sig); } -pub fn check_impl_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +pub fn check_impl_item(tcx: TyCtxt<'_>, def_id: DefId) { let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); let impl_item = tcx.hir().expect_impl_item(hir_id); @@ -178,8 +178,8 @@ pub fn check_impl_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { check_associated_item(tcx, impl_item.hir_id, impl_item.span, method_sig); } -fn check_associated_item<'tcx>( - tcx: TyCtxt<'tcx>, +fn check_associated_item( + tcx: TyCtxt<'_>, item_id: hir::HirId, span: Span, sig_if_method: Option<&hir::MethodSig>, @@ -231,7 +231,7 @@ fn for_item<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item) -> CheckWfFcxBuilder<'tcx for_id(tcx, item.hir_id, item.span) } -fn for_id<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) -> CheckWfFcxBuilder<'tcx> { +fn for_id(tcx: TyCtxt<'_>, id: hir::HirId, span: Span) -> CheckWfFcxBuilder<'_> { let def_id = tcx.hir().local_def_id_from_hir_id(id); CheckWfFcxBuilder { inherited: Inherited::build(tcx, def_id), @@ -317,7 +317,7 @@ fn check_type_defn<'tcx, F>( }); } -fn check_trait<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item) { +fn check_trait(tcx: TyCtxt<'_>, item: &hir::Item) { debug!("check_trait: {:?}", item.hir_id); let trait_def_id = tcx.hir().local_def_id_from_hir_id(item.hir_id); @@ -340,7 +340,7 @@ fn check_trait<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item) { }); } -fn check_item_fn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item) { +fn check_item_fn(tcx: TyCtxt<'_>, item: &hir::Item) { for_item(tcx, item).with_fcx(|fcx, tcx| { let def_id = fcx.tcx.hir().local_def_id_from_hir_id(item.hir_id); let sig = fcx.tcx.fn_sig(def_id); @@ -352,8 +352,8 @@ fn check_item_fn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item) { }) } -fn check_item_type<'tcx>( - tcx: TyCtxt<'tcx>, +fn check_item_type( + tcx: TyCtxt<'_>, item_id: hir::HirId, ty_span: Span, allow_foreign_ty: bool, @@ -980,7 +980,7 @@ fn check_variances_for_type_defn<'tcx>( } } -fn report_bivariance<'tcx>(tcx: TyCtxt<'tcx>, span: Span, param_name: ast::Name) { +fn report_bivariance(tcx: TyCtxt<'_>, span: Span, param_name: ast::Name) { let mut err = error_392(tcx, span, param_name); let suggested_marker_id = tcx.lang_items().phantom_data(); @@ -1023,7 +1023,7 @@ fn reject_shadowing_parameters(tcx: TyCtxt<'_>, def_id: DefId) { /// Feature gates RFC 2056 -- trivial bounds, checking for global bounds that /// aren't true. -fn check_false_global_bounds<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, span: Span, id: hir::HirId) { +fn check_false_global_bounds(fcx: &FnCtxt<'_, '_>, span: Span, id: hir::HirId) { let empty_env = ty::ParamEnv::empty(); let def_id = fcx.tcx.hir().local_def_id_from_hir_id(id); @@ -1135,11 +1135,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } -fn error_392<'tcx>( - tcx: TyCtxt<'tcx>, +fn error_392( + tcx: TyCtxt<'_>, span: Span, param_name: ast::Name, -) -> DiagnosticBuilder<'tcx> { +) -> DiagnosticBuilder<'_> { let mut err = struct_span_err!(tcx.sess, span, E0392, "parameter `{}` is never used", param_name); err.span_label(span, "unused parameter"); diff --git a/src/librustc_typeck/coherence/builtin.rs b/src/librustc_typeck/coherence/builtin.rs index 42deeaf31f427..68bdcbfe3fd95 100644 --- a/src/librustc_typeck/coherence/builtin.rs +++ b/src/librustc_typeck/coherence/builtin.rs @@ -17,7 +17,7 @@ use rustc::hir::def_id::DefId; use hir::Node; use rustc::hir::{self, ItemKind}; -pub fn check_trait<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId) { +pub fn check_trait(tcx: TyCtxt<'_>, trait_def_id: DefId) { Checker { tcx, trait_def_id } .check(tcx.lang_items().drop_trait(), visit_implementation_of_drop) .check(tcx.lang_items().copy_trait(), visit_implementation_of_copy) @@ -46,7 +46,7 @@ impl<'tcx> Checker<'tcx> { } } -fn visit_implementation_of_drop<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) { +fn visit_implementation_of_drop(tcx: TyCtxt<'_>, impl_did: DefId) { if let ty::Adt(..) = tcx.type_of(impl_did).sty { /* do nothing */ } else { @@ -74,7 +74,7 @@ fn visit_implementation_of_drop<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) { } } -fn visit_implementation_of_copy<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) { +fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: DefId) { debug!("visit_implementation_of_copy: impl_did={:?}", impl_did); let impl_hir_id = if let Some(n) = tcx.hir().as_local_hir_id(impl_did) { @@ -154,7 +154,7 @@ fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'tcx>, impl_did: DefId) { } } -fn visit_implementation_of_dispatch_from_dyn<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) { +fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: DefId) { debug!("visit_implementation_of_dispatch_from_dyn: impl_did={:?}", impl_did); if impl_did.is_local() { diff --git a/src/librustc_typeck/coherence/inherent_impls.rs b/src/librustc_typeck/coherence/inherent_impls.rs index 6088c03fc0681..f208c6a138d26 100644 --- a/src/librustc_typeck/coherence/inherent_impls.rs +++ b/src/librustc_typeck/coherence/inherent_impls.rs @@ -17,10 +17,10 @@ use syntax::ast; use syntax_pos::Span; /// On-demand query: yields a map containing all types mapped to their inherent impls. -pub fn crate_inherent_impls<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn crate_inherent_impls( + tcx: TyCtxt<'_>, crate_num: CrateNum, -) -> &'tcx CrateInherentImpls { +) -> &CrateInherentImpls { assert_eq!(crate_num, LOCAL_CRATE); let krate = tcx.hir().krate(); @@ -33,7 +33,7 @@ pub fn crate_inherent_impls<'tcx>( } /// On-demand query: yields a vector of the inherent impls for a specific type. -pub fn inherent_impls<'tcx>(tcx: TyCtxt<'tcx>, ty_def_id: DefId) -> &'tcx [DefId] { +pub fn inherent_impls(tcx: TyCtxt<'_>, ty_def_id: DefId) -> &[DefId] { assert!(ty_def_id.is_local()); // NB. Until we adopt the red-green dep-tracking algorithm (see diff --git a/src/librustc_typeck/coherence/inherent_impls_overlap.rs b/src/librustc_typeck/coherence/inherent_impls_overlap.rs index aae1b1777a30f..1785304fb1d48 100644 --- a/src/librustc_typeck/coherence/inherent_impls_overlap.rs +++ b/src/librustc_typeck/coherence/inherent_impls_overlap.rs @@ -5,7 +5,7 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::traits::{self, IntercrateMode}; use rustc::ty::TyCtxt; -pub fn crate_inherent_impls_overlap_check<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) { +pub fn crate_inherent_impls_overlap_check(tcx: TyCtxt<'_>, crate_num: CrateNum) { assert_eq!(crate_num, LOCAL_CRATE); let krate = tcx.hir().krate(); krate.visit_all_item_likes(&mut InherentOverlapChecker { tcx }); diff --git a/src/librustc_typeck/coherence/mod.rs b/src/librustc_typeck/coherence/mod.rs index 4336e861ce216..9b9789139b70f 100644 --- a/src/librustc_typeck/coherence/mod.rs +++ b/src/librustc_typeck/coherence/mod.rs @@ -18,7 +18,7 @@ mod inherent_impls_overlap; mod orphan; mod unsafety; -fn check_impl<'tcx>(tcx: TyCtxt<'tcx>, hir_id: HirId) { +fn check_impl(tcx: TyCtxt<'_>, hir_id: HirId) { let impl_def_id = tcx.hir().local_def_id_from_hir_id(hir_id); // If there are no traits, then this implementation must have a @@ -124,7 +124,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn coherent_trait<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) { let impls = tcx.hir().trait_impls(def_id); for &impl_id in impls { check_impl(tcx, impl_id); @@ -135,7 +135,7 @@ fn coherent_trait<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { builtin::check_trait(tcx, def_id); } -pub fn check_coherence<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_coherence(tcx: TyCtxt<'_>) { for &trait_def_id in tcx.hir().krate().trait_impls.keys() { tcx.ensure().coherent_trait(trait_def_id); } @@ -151,7 +151,7 @@ pub fn check_coherence<'tcx>(tcx: TyCtxt<'tcx>) { /// Overlap: no two impls for the same trait are implemented for the /// same type. Likewise, no two inherent impls for a given type /// constructor provide a method with the same name. -fn check_impl_overlap<'tcx>(tcx: TyCtxt<'tcx>, hir_id: HirId) { +fn check_impl_overlap(tcx: TyCtxt<'_>, hir_id: HirId) { let impl_def_id = tcx.hir().local_def_id_from_hir_id(hir_id); let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap(); let trait_def_id = trait_ref.def_id; diff --git a/src/librustc_typeck/coherence/orphan.rs b/src/librustc_typeck/coherence/orphan.rs index 4e6fcfe0593e2..2d0faecd8ee71 100644 --- a/src/librustc_typeck/coherence/orphan.rs +++ b/src/librustc_typeck/coherence/orphan.rs @@ -6,7 +6,7 @@ use rustc::ty::{self, TyCtxt}; use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::hir; -pub fn check<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check(tcx: TyCtxt<'_>) { let mut orphan = OrphanChecker { tcx }; tcx.hir().krate().visit_all_item_likes(&mut orphan); } diff --git a/src/librustc_typeck/coherence/unsafety.rs b/src/librustc_typeck/coherence/unsafety.rs index c41a0e1514e68..123d7c6123b89 100644 --- a/src/librustc_typeck/coherence/unsafety.rs +++ b/src/librustc_typeck/coherence/unsafety.rs @@ -5,7 +5,7 @@ use rustc::ty::TyCtxt; use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::hir::{self, Unsafety}; -pub fn check<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check(tcx: TyCtxt<'_>) { let mut unsafety = UnsafetyChecker { tcx }; tcx.hir().krate().visit_all_item_likes(&mut unsafety); } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2080637ecb402..8d3d79e4dce5a 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2541,7 +2541,7 @@ fn full_path(cx: &Context, item: &clean::Item) -> String { s } -fn shorter<'a>(s: Option<&'a str>) -> String { +fn shorter(s: Option<&str>) -> String { match s { Some(s) => s.lines() .skip_while(|s| s.chars().all(|c| c.is_whitespace())) diff --git a/src/librustdoc/html/toc.rs b/src/librustdoc/html/toc.rs index 2564c611e54e5..2da7aceae8bf4 100644 --- a/src/librustdoc/html/toc.rs +++ b/src/librustdoc/html/toc.rs @@ -119,7 +119,7 @@ impl TocBuilder { /// Push a level `level` heading into the appropriate place in the /// hierarchy, returning a string containing the section number in /// `..` format. - pub fn push<'a>(&'a mut self, level: u32, name: String, id: String) -> &'a str { + pub fn push(&mut self, level: u32, name: String, id: String) -> &str { assert!(level >= 1); // collapse all previous sections into their parents until we From ec711767a7ac6911faae85d4b9285d07d5ebf949 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 20:27:44 +0200 Subject: [PATCH 21/31] Remove needless lifetimes --- src/librustc_borrowck/dataflow.rs | 6 +- src/librustc_codegen_llvm/base.rs | 4 +- src/librustc_codegen_llvm/builder.rs | 2 +- src/librustc_codegen_llvm/lib.rs | 2 +- src/librustc_codegen_ssa/base.rs | 2 +- .../symbol_names_test.rs | 2 +- src/librustc_data_structures/bit_set.rs | 4 +- src/librustc_data_structures/fingerprint.rs | 2 +- src/librustc_driver/pretty.rs | 20 ++--- src/librustc_errors/emitter.rs | 2 +- src/librustc_errors/lib.rs | 84 +++++++++---------- src/librustc_incremental/assert_dep_graph.rs | 2 +- .../assert_module_sources.rs | 2 +- src/librustc_interface/passes.rs | 6 +- src/librustc_interface/proc_macro_decls.rs | 4 +- src/librustc_lint/lib.rs | 2 +- src/librustc_metadata/cstore_impl.rs | 4 +- src/librustc_metadata/encoder.rs | 4 +- src/librustc_metadata/foreign_modules.rs | 2 +- src/librustc_metadata/link_args.rs | 2 +- src/librustc_metadata/native_libs.rs | 2 +- src/librustc_mir/shim.rs | 2 +- src/librustc_passes/hir_stats.rs | 2 +- src/librustc_passes/layout_test.rs | 2 +- src/librustc_passes/loops.rs | 2 +- src/librustc_passes/rvalue_promotion.rs | 4 +- src/librustc_plugin/build.rs | 4 +- src/librustc_plugin/registry.rs | 2 +- src/librustc_privacy/lib.rs | 20 ++--- 29 files changed, 99 insertions(+), 99 deletions(-) diff --git a/src/librustc_borrowck/dataflow.rs b/src/librustc_borrowck/dataflow.rs index f5d311b35d738..dc7014d22ec4d 100644 --- a/src/librustc_borrowck/dataflow.rs +++ b/src/librustc_borrowck/dataflow.rs @@ -84,9 +84,9 @@ struct PropagationContext<'a, 'tcx, O> { changed: bool, } -fn get_cfg_indices<'a>(id: hir::ItemLocalId, - index: &'a FxHashMap>) - -> &'a [CFGIndex] { +fn get_cfg_indices(id: hir::ItemLocalId, + index: &FxHashMap>) + -> &[CFGIndex] { index.get(&id).map_or(&[], |v| &v[..]) } diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs index 04645dacfec58..21c19e167cfbe 100644 --- a/src/librustc_codegen_llvm/base.rs +++ b/src/librustc_codegen_llvm/base.rs @@ -123,8 +123,8 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'tcx>, cgu_name: InternedString) { submit_codegened_module_to_llvm(&LlvmCodegenBackend(()), tcx, module, cost); - fn module_codegen<'tcx>( - tcx: TyCtxt<'tcx>, + fn module_codegen( + tcx: TyCtxt<'_>, cgu_name: InternedString, ) -> ModuleCodegen { let cgu = tcx.codegen_unit(cgu_name); diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs index 0709368ad860e..f67c740b77748 100644 --- a/src/librustc_codegen_llvm/builder.rs +++ b/src/librustc_codegen_llvm/builder.rs @@ -144,7 +144,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { } } - fn build_sibling_block<'b>(&self, name: &'b str) -> Self { + fn build_sibling_block(&self, name: &str) -> Self { Builder::new_block(self.cx, self.llfn(), name) } diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 7283aa95b3027..e6630e1816570 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -124,7 +124,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend { ) { unsafe { allocator::codegen(tcx, mods, kind) } } - fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString) { + fn compile_codegen_unit(&self, tcx: TyCtxt<'_>, cgu_name: InternedString) { base::compile_codegen_unit(tcx, cgu_name); } fn target_machine_factory( diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index 47b383fddbc31..d06460fc85696 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -700,7 +700,7 @@ impl Drop for AbortCodegenOnDrop { } } -fn assert_and_save_dep_graph<'tcx>(tcx: TyCtxt<'tcx>) { +fn assert_and_save_dep_graph(tcx: TyCtxt<'_>) { time(tcx.sess, "assert dep graph", || ::rustc_incremental::assert_dep_graph(tcx)); diff --git a/src/librustc_codegen_utils/symbol_names_test.rs b/src/librustc_codegen_utils/symbol_names_test.rs index f48d1f2853c52..7ab29c5c4c3d0 100644 --- a/src/librustc_codegen_utils/symbol_names_test.rs +++ b/src/librustc_codegen_utils/symbol_names_test.rs @@ -11,7 +11,7 @@ use syntax::symbol::{Symbol, sym}; const SYMBOL_NAME: Symbol = sym::rustc_symbol_name; const DEF_PATH: Symbol = sym::rustc_def_path; -pub fn report_symbol_names<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn report_symbol_names(tcx: TyCtxt<'_>) { // if the `rustc_attrs` feature is not enabled, then the // attributes we are interested in cannot be present anyway, so // skip the walk. diff --git a/src/librustc_data_structures/bit_set.rs b/src/librustc_data_structures/bit_set.rs index 5d8388d89f5b3..1eb28bccbe382 100644 --- a/src/librustc_data_structures/bit_set.rs +++ b/src/librustc_data_structures/bit_set.rs @@ -168,7 +168,7 @@ impl BitSet { /// Iterates over the indices of set bits in a sorted order. #[inline] - pub fn iter<'a>(&'a self) -> BitIter<'a, T> { + pub fn iter(&self) -> BitIter<'_, T> { BitIter { cur: None, iter: self.words.iter().enumerate(), @@ -849,7 +849,7 @@ impl BitMatrix { /// Iterates through all the columns set to true in a given row of /// the matrix. - pub fn iter<'a>(&'a self, row: R) -> BitIter<'a, C> { + pub fn iter(&self, row: R) -> BitIter<'_, C> { assert!(row.index() < self.num_rows); let (start, end) = self.range(row); BitIter { diff --git a/src/librustc_data_structures/fingerprint.rs b/src/librustc_data_structures/fingerprint.rs index 7975c62b90fb6..3bea965ef3041 100644 --- a/src/librustc_data_structures/fingerprint.rs +++ b/src/librustc_data_structures/fingerprint.rs @@ -58,7 +58,7 @@ impl Fingerprint { Ok(()) } - pub fn decode_opaque<'a>(decoder: &mut Decoder<'a>) -> Result { + pub fn decode_opaque(decoder: &mut Decoder<'_>) -> Result { let mut bytes = [0; 16]; decoder.read_raw_bytes(&mut bytes)?; diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs index d92f3aafa1c7e..ff0c4ff548b71 100644 --- a/src/librustc_driver/pretty.rs +++ b/src/librustc_driver/pretty.rs @@ -188,7 +188,7 @@ impl PpSourceMode { _ => panic!("Should use call_with_pp_support_hir"), } } - fn call_with_pp_support_hir<'tcx, A, F>(&self, tcx: TyCtxt<'tcx>, f: F) -> A + fn call_with_pp_support_hir(&self, tcx: TyCtxt<'_>, f: F) -> A where F: FnOnce(&dyn HirPrinterSupport<'_>, &hir::Crate) -> A, { @@ -228,7 +228,7 @@ impl PpSourceMode { trait PrinterSupport: pprust::PpAnn { /// Provides a uniform interface for re-extracting a reference to a /// `Session` from a value that now owns it. - fn sess<'a>(&'a self) -> &'a Session; + fn sess(&self) -> &Session; /// Produces the pretty-print annotation object. /// @@ -240,7 +240,7 @@ trait PrinterSupport: pprust::PpAnn { trait HirPrinterSupport<'hir>: pprust_hir::PpAnn { /// Provides a uniform interface for re-extracting a reference to a /// `Session` from a value that now owns it. - fn sess<'a>(&'a self) -> &'a Session; + fn sess(&self) -> &Session; /// Provides a uniform interface for re-extracting a reference to an /// `hir_map::Map` from a value that now owns it. @@ -272,7 +272,7 @@ struct NoAnn<'hir> { } impl<'hir> PrinterSupport for NoAnn<'hir> { - fn sess<'a>(&'a self) -> &'a Session { + fn sess(&self) -> &Session { self.sess } @@ -282,7 +282,7 @@ impl<'hir> PrinterSupport for NoAnn<'hir> { } impl<'hir> HirPrinterSupport<'hir> for NoAnn<'hir> { - fn sess<'a>(&'a self) -> &'a Session { + fn sess(&self) -> &Session { self.sess } @@ -313,7 +313,7 @@ struct IdentifiedAnnotation<'hir> { } impl<'hir> PrinterSupport for IdentifiedAnnotation<'hir> { - fn sess<'a>(&'a self) -> &'a Session { + fn sess(&self) -> &Session { self.sess } @@ -360,7 +360,7 @@ impl<'hir> pprust::PpAnn for IdentifiedAnnotation<'hir> { } impl<'hir> HirPrinterSupport<'hir> for IdentifiedAnnotation<'hir> { - fn sess<'a>(&'a self) -> &'a Session { + fn sess(&self) -> &Session { self.sess } @@ -458,7 +458,7 @@ struct TypedAnnotation<'a, 'tcx> { } impl<'b, 'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'b, 'tcx> { - fn sess<'a>(&'a self) -> &'a Session { + fn sess(&self) -> &Session { &self.tcx.sess } @@ -866,8 +866,8 @@ pub fn print_after_hir_lowering<'tcx>( // analysis is performed. However, we want to call `phase_3_run_analysis_passes` // with a different callback than the standard driver, so that isn't easy. // Instead, we call that function ourselves. -fn print_with_analysis<'tcx>( - tcx: TyCtxt<'tcx>, +fn print_with_analysis( + tcx: TyCtxt<'_>, ppm: PpMode, uii: Option, ofile: Option<&Path>, diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index a2717ab7ad8a9..83a0fb486fd9a 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -1635,7 +1635,7 @@ impl Destination { } } - fn writable<'a>(&'a mut self) -> WritableDst<'a> { + fn writable(&mut self) -> WritableDst<'_> { match *self { Destination::Terminal(ref mut t) => WritableDst::Terminal(t), Destination::Buffered(ref mut t) => { diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 70bd25a9d5772..1ffee1cdf691f 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -438,14 +438,14 @@ impl Handler { self.err_count.store(0, SeqCst); } - pub fn struct_dummy<'a>(&'a self) -> DiagnosticBuilder<'a> { + pub fn struct_dummy(&self) -> DiagnosticBuilder<'_> { DiagnosticBuilder::new(self, Level::Cancelled, "") } - pub fn struct_span_warn<'a, S: Into>(&'a self, - sp: S, - msg: &str) - -> DiagnosticBuilder<'a> { + pub fn struct_span_warn>(&self, + sp: S, + msg: &str) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Warning, msg); result.set_span(sp); if !self.flags.can_emit_warnings { @@ -453,11 +453,11 @@ impl Handler { } result } - pub fn struct_span_warn_with_code<'a, S: Into>(&'a self, - sp: S, - msg: &str, - code: DiagnosticId) - -> DiagnosticBuilder<'a> { + pub fn struct_span_warn_with_code>(&self, + sp: S, + msg: &str, + code: DiagnosticId) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Warning, msg); result.set_span(sp); result.code(code); @@ -466,63 +466,63 @@ impl Handler { } result } - pub fn struct_warn<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_warn(&self, msg: &str) -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Warning, msg); if !self.flags.can_emit_warnings { result.cancel(); } result } - pub fn struct_span_err<'a, S: Into>(&'a self, - sp: S, - msg: &str) - -> DiagnosticBuilder<'a> { + pub fn struct_span_err>(&self, + sp: S, + msg: &str) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Error, msg); result.set_span(sp); result } - pub fn struct_span_err_with_code<'a, S: Into>(&'a self, - sp: S, - msg: &str, - code: DiagnosticId) - -> DiagnosticBuilder<'a> { + pub fn struct_span_err_with_code>(&self, + sp: S, + msg: &str, + code: DiagnosticId) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Error, msg); result.set_span(sp); result.code(code); result } // FIXME: This method should be removed (every error should have an associated error code). - pub fn struct_err<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_err(&self, msg: &str) -> DiagnosticBuilder<'_> { DiagnosticBuilder::new(self, Level::Error, msg) } - pub fn struct_err_with_code<'a>( - &'a self, + pub fn struct_err_with_code( + &self, msg: &str, code: DiagnosticId, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Error, msg); result.code(code); result } - pub fn struct_span_fatal<'a, S: Into>(&'a self, - sp: S, - msg: &str) - -> DiagnosticBuilder<'a> { + pub fn struct_span_fatal>(&self, + sp: S, + msg: &str) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Fatal, msg); result.set_span(sp); result } - pub fn struct_span_fatal_with_code<'a, S: Into>(&'a self, - sp: S, - msg: &str, - code: DiagnosticId) - -> DiagnosticBuilder<'a> { + pub fn struct_span_fatal_with_code>(&self, + sp: S, + msg: &str, + code: DiagnosticId) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Fatal, msg); result.set_span(sp); result.code(code); result } - pub fn struct_fatal<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_fatal(&self, msg: &str) -> DiagnosticBuilder<'_> { DiagnosticBuilder::new(self, Level::Fatal, msg) } @@ -563,10 +563,10 @@ impl Handler { pub fn span_err>(&self, sp: S, msg: &str) { self.emit(&sp.into(), msg, Error); } - pub fn mut_span_err<'a, S: Into>(&'a self, - sp: S, - msg: &str) - -> DiagnosticBuilder<'a> { + pub fn mut_span_err>(&self, + sp: S, + msg: &str) + -> DiagnosticBuilder<'_> { let mut result = DiagnosticBuilder::new(self, Level::Error, msg); result.set_span(sp); result @@ -605,10 +605,10 @@ impl Handler { pub fn span_note_without_error>(&self, sp: S, msg: &str) { self.emit(&sp.into(), msg, Note); } - pub fn span_note_diag<'a>(&'a self, - sp: Span, - msg: &str) - -> DiagnosticBuilder<'a> { + pub fn span_note_diag(&self, + sp: Span, + msg: &str) + -> DiagnosticBuilder<'_> { let mut db = DiagnosticBuilder::new(self, Note, msg); db.set_span(sp); db diff --git a/src/librustc_incremental/assert_dep_graph.rs b/src/librustc_incremental/assert_dep_graph.rs index a43347a2197c3..38dc6edaf6325 100644 --- a/src/librustc_incremental/assert_dep_graph.rs +++ b/src/librustc_incremental/assert_dep_graph.rs @@ -51,7 +51,7 @@ use std::io::Write; use syntax::ast; use syntax_pos::Span; -pub fn assert_dep_graph<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn assert_dep_graph(tcx: TyCtxt<'_>) { tcx.dep_graph.with_ignore(|| { if tcx.sess.opts.debugging_opts.dump_dep_graph { dump_graph(tcx); diff --git a/src/librustc_incremental/assert_module_sources.rs b/src/librustc_incremental/assert_module_sources.rs index f502d0475460e..046fdc72270db 100644 --- a/src/librustc_incremental/assert_module_sources.rs +++ b/src/librustc_incremental/assert_module_sources.rs @@ -35,7 +35,7 @@ const MODULE: Symbol = sym::module; const CFG: Symbol = sym::cfg; const KIND: Symbol = sym::kind; -pub fn assert_module_sources<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn assert_module_sources(tcx: TyCtxt<'_>) { tcx.dep_graph.with_ignore(|| { if tcx.sess.opts.incremental.is_none() { return; diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index c1b6e3409c915..d698728198130 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -878,7 +878,7 @@ pub fn create_global_ctxt( /// Runs the resolution, type-checking, region checking and other /// miscellaneous analysis passes on the crate. -fn analysis<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Result<()> { +fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> { assert_eq!(cnum, LOCAL_CRATE); let sess = tcx.sess; @@ -995,8 +995,8 @@ fn analysis<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Result<()> { Ok(()) } -fn encode_and_write_metadata<'tcx>( - tcx: TyCtxt<'tcx>, +fn encode_and_write_metadata( + tcx: TyCtxt<'_>, outputs: &OutputFilenames, ) -> (middle::cstore::EncodedMetadata, bool) { #[derive(PartialEq, Eq, PartialOrd, Ord)] diff --git a/src/librustc_interface/proc_macro_decls.rs b/src/librustc_interface/proc_macro_decls.rs index 9e1ef6b022d9b..d888c9e57d326 100644 --- a/src/librustc_interface/proc_macro_decls.rs +++ b/src/librustc_interface/proc_macro_decls.rs @@ -6,11 +6,11 @@ use rustc::ty::query::Providers; use syntax::attr; use syntax::symbol::sym; -pub fn find<'tcx>(tcx: TyCtxt<'tcx>) -> Option { +pub fn find(tcx: TyCtxt<'_>) -> Option { tcx.proc_macro_decls_static(LOCAL_CRATE) } -fn proc_macro_decls_static<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Option { +fn proc_macro_decls_static(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option { assert_eq!(cnum, LOCAL_CRATE); let mut finder = Finder { decls: None }; diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index d808a15982e37..4c6ceb14ca42a 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -74,7 +74,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn lint_mod<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn lint_mod(tcx: TyCtxt<'_>, module_def_id: DefId) { lint::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new()); } diff --git a/src/librustc_metadata/cstore_impl.rs b/src/librustc_metadata/cstore_impl.rs index 04a9c4e9a1a11..914084d7e9ece 100644 --- a/src/librustc_metadata/cstore_impl.rs +++ b/src/librustc_metadata/cstore_impl.rs @@ -250,7 +250,7 @@ provide! { <'tcx> tcx, def_id, other, cdata, exported_symbols => { Arc::new(cdata.exported_symbols(tcx)) } } -pub fn provide<'tcx>(providers: &mut Providers<'tcx>) { +pub fn provide(providers: &mut Providers<'_>) { // FIXME(#44234) - almost all of these queries have no sub-queries and // therefore no actual inputs, they're just reading tables calculated in // resolve! Does this work? Unsure! That's what the issue is about @@ -550,7 +550,7 @@ impl CrateStore for cstore::CStore { self.do_postorder_cnums_untracked() } - fn encode_metadata<'tcx>(&self, tcx: TyCtxt<'tcx>) -> EncodedMetadata { + fn encode_metadata(&self, tcx: TyCtxt<'_>) -> EncodedMetadata { encoder::encode_metadata(tcx) } diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index b52b6dfbb5e12..73c20ccad5abf 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -1863,7 +1863,7 @@ impl<'tcx, 'v> ItemLikeVisitor<'v> for ImplVisitor<'tcx> { // will allow us to slice the metadata to the precise length that we just // generated regardless of trailing bytes that end up in it. -pub fn encode_metadata<'tcx>(tcx: TyCtxt<'tcx>) -> EncodedMetadata { +pub fn encode_metadata(tcx: TyCtxt<'_>) -> EncodedMetadata { let mut encoder = opaque::Encoder::new(vec![]); encoder.emit_raw_bytes(METADATA_HEADER); @@ -1905,7 +1905,7 @@ pub fn encode_metadata<'tcx>(tcx: TyCtxt<'tcx>) -> EncodedMetadata { EncodedMetadata { raw_data: result } } -pub fn get_repr_options<'tcx>(tcx: TyCtxt<'tcx>, did: DefId) -> ReprOptions { +pub fn get_repr_options(tcx: TyCtxt<'_>, did: DefId) -> ReprOptions { let ty = tcx.type_of(did); match ty.sty { ty::Adt(ref def, _) => return def.repr, diff --git a/src/librustc_metadata/foreign_modules.rs b/src/librustc_metadata/foreign_modules.rs index 0ce103cfa40dc..b1f4dfffc7898 100644 --- a/src/librustc_metadata/foreign_modules.rs +++ b/src/librustc_metadata/foreign_modules.rs @@ -3,7 +3,7 @@ use rustc::hir; use rustc::middle::cstore::ForeignModule; use rustc::ty::TyCtxt; -pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> Vec { +pub fn collect(tcx: TyCtxt<'_>) -> Vec { let mut collector = Collector { tcx, modules: Vec::new(), diff --git a/src/librustc_metadata/link_args.rs b/src/librustc_metadata/link_args.rs index cd6270046faab..728fd004fcb69 100644 --- a/src/librustc_metadata/link_args.rs +++ b/src/librustc_metadata/link_args.rs @@ -4,7 +4,7 @@ use rustc::ty::TyCtxt; use rustc_target::spec::abi::Abi; use syntax::symbol::sym; -pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> Vec { +pub fn collect(tcx: TyCtxt<'_>) -> Vec { let mut collector = Collector { args: Vec::new(), }; diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs index 7b335b3b4832d..4a01d0e559af4 100644 --- a/src/librustc_metadata/native_libs.rs +++ b/src/librustc_metadata/native_libs.rs @@ -11,7 +11,7 @@ use syntax::feature_gate::{self, GateIssue}; use syntax::symbol::{Symbol, sym}; use syntax::{span_err, struct_span_err}; -pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> Vec { +pub fn collect(tcx: TyCtxt<'_>) -> Vec { let mut collector = Collector { tcx, libs: Vec::new(), diff --git a/src/librustc_mir/shim.rs b/src/librustc_mir/shim.rs index 7987095a33401..32b964dbadfa9 100644 --- a/src/librustc_mir/shim.rs +++ b/src/librustc_mir/shim.rs @@ -829,7 +829,7 @@ fn build_call_shim<'tcx>( body } -pub fn build_adt_ctor<'tcx>(tcx: TyCtxt<'tcx>, ctor_id: DefId) -> &'tcx Body<'tcx> { +pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> &Body<'_> { debug_assert!(tcx.is_constructor(ctor_id)); let span = tcx.hir().span_if_local(ctor_id) diff --git a/src/librustc_passes/hir_stats.rs b/src/librustc_passes/hir_stats.rs index 6936aedb9de80..e7f6abc410a32 100644 --- a/src/librustc_passes/hir_stats.rs +++ b/src/librustc_passes/hir_stats.rs @@ -38,7 +38,7 @@ pub fn print_hir_stats(krate: &hir::Crate) { collector.print("HIR STATS"); } -pub fn print_ast_stats<'v>(krate: &'v ast::Crate, title: &str) { +pub fn print_ast_stats(krate: &ast::Crate, title: &str) { let mut collector = StatCollector { krate: None, data: FxHashMap::default(), diff --git a/src/librustc_passes/layout_test.rs b/src/librustc_passes/layout_test.rs index 8f790d1328572..6b1ce578240e4 100644 --- a/src/librustc_passes/layout_test.rs +++ b/src/librustc_passes/layout_test.rs @@ -14,7 +14,7 @@ use rustc::ty::TyCtxt; use syntax::ast::Attribute; use syntax::symbol::sym; -pub fn test_layout<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn test_layout(tcx: TyCtxt<'_>) { if tcx.features().rustc_attrs { // if the `rustc_attrs` feature is not enabled, don't bother testing layout tcx.hir() diff --git a/src/librustc_passes/loops.rs b/src/librustc_passes/loops.rs index ed0a78b465276..616e6974110e6 100644 --- a/src/librustc_passes/loops.rs +++ b/src/librustc_passes/loops.rs @@ -45,7 +45,7 @@ struct CheckLoopVisitor<'a, 'hir> { cx: Context, } -fn check_mod_loops<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_loops(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module(module_def_id, &mut CheckLoopVisitor { sess: &tcx.sess, hir_map: &tcx.hir(), diff --git a/src/librustc_passes/rvalue_promotion.rs b/src/librustc_passes/rvalue_promotion.rs index bc1151974bb70..e14fa07fbbfe4 100644 --- a/src/librustc_passes/rvalue_promotion.rs +++ b/src/librustc_passes/rvalue_promotion.rs @@ -39,7 +39,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn const_is_rvalue_promotable_to_static<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn const_is_rvalue_promotable_to_static(tcx: TyCtxt<'_>, def_id: DefId) -> bool { assert!(def_id.is_local()); let hir_id = tcx.hir().as_local_hir_id(def_id) @@ -48,7 +48,7 @@ fn const_is_rvalue_promotable_to_static<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) tcx.rvalue_promotable_map(def_id).contains(&body_id.hir_id.local_id) } -fn rvalue_promotable_map<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ItemLocalSet { +fn rvalue_promotable_map(tcx: TyCtxt<'_>, def_id: DefId) -> &ItemLocalSet { let outer_def_id = tcx.closure_base_def_id(def_id); if outer_def_id != def_id { return tcx.rvalue_promotable_map(outer_def_id); diff --git a/src/librustc_plugin/build.rs b/src/librustc_plugin/build.rs index d3ac597160fd6..816e283a10460 100644 --- a/src/librustc_plugin/build.rs +++ b/src/librustc_plugin/build.rs @@ -30,11 +30,11 @@ impl<'v> ItemLikeVisitor<'v> for RegistrarFinder { } /// Finds the function marked with `#[plugin_registrar]`, if any. -pub fn find_plugin_registrar<'tcx>(tcx: TyCtxt<'tcx>) -> Option { +pub fn find_plugin_registrar(tcx: TyCtxt<'_>) -> Option { tcx.plugin_registrar_fn(LOCAL_CRATE) } -fn plugin_registrar_fn<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Option { +fn plugin_registrar_fn(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option { assert_eq!(cnum, LOCAL_CRATE); let mut finder = RegistrarFinder { registrars: Vec::new() }; diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin/registry.rs index 16d484e2a98f2..2fb65a6069372 100644 --- a/src/librustc_plugin/registry.rs +++ b/src/librustc_plugin/registry.rs @@ -77,7 +77,7 @@ impl<'a> Registry<'a> { /// /// Returns empty slice in case the plugin was loaded /// with `--extra-plugins` - pub fn args<'b>(&'b self) -> &'b [ast::NestedMetaItem] { + pub fn args(&self) -> &[ast::NestedMetaItem] { self.args_hidden.as_ref().map(|v| &v[..]).unwrap_or(&[]) } diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index 3e98200e53274..339021f511afd 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -337,7 +337,7 @@ fn item_tables<'a, 'tcx>( if tcx.has_typeck_tables(def_id) { tcx.typeck_tables_of(def_id) } else { empty_tables } } -fn min<'tcx>(vis1: ty::Visibility, vis2: ty::Visibility, tcx: TyCtxt<'tcx>) -> ty::Visibility { +fn min(vis1: ty::Visibility, vis2: ty::Visibility, tcx: TyCtxt<'_>) -> ty::Visibility { if vis1.is_at_least(vis2, tcx) { vis2 } else { vis1 } } @@ -384,14 +384,14 @@ impl<'a, 'tcx, VL: VisibilityLike> DefIdVisitor<'tcx> for FindMin<'a, 'tcx, VL> trait VisibilityLike: Sized { const MAX: Self; const SHALLOW: bool = false; - fn new_min<'a, 'tcx>(find: &FindMin<'a, 'tcx, Self>, def_id: DefId) -> Self; + fn new_min(find: &FindMin<'_, '_, Self>, def_id: DefId) -> Self; // Returns an over-approximation (`skip_assoc_tys` = true) of visibility due to // associated types for which we can't determine visibility precisely. - fn of_impl<'a, 'tcx>( + fn of_impl( hir_id: hir::HirId, - tcx: TyCtxt<'tcx>, - access_levels: &'a AccessLevels, + tcx: TyCtxt<'_>, + access_levels: &AccessLevels, ) -> Self { let mut find = FindMin { tcx, access_levels, min: Self::MAX }; let def_id = tcx.hir().local_def_id_from_hir_id(hir_id); @@ -404,7 +404,7 @@ trait VisibilityLike: Sized { } impl VisibilityLike for ty::Visibility { const MAX: Self = ty::Visibility::Public; - fn new_min<'a, 'tcx>(find: &FindMin<'a, 'tcx, Self>, def_id: DefId) -> Self { + fn new_min(find: &FindMin<'_, '_, Self>, def_id: DefId) -> Self { min(def_id_visibility(find.tcx, def_id).0, find.min, find.tcx) } } @@ -420,7 +420,7 @@ impl VisibilityLike for Option { // both "shallow" version of its self type and "shallow" version of its trait if it exists // (which require reaching the `DefId`s in them). const SHALLOW: bool = true; - fn new_min<'a, 'tcx>(find: &FindMin<'a, 'tcx, Self>, def_id: DefId) -> Self { + fn new_min(find: &FindMin<'_, '_, Self>, def_id: DefId) -> Self { cmp::min(if let Some(hir_id) = find.tcx.hir().as_local_hir_id(def_id) { find.access_levels.map.get(&hir_id).cloned() } else { @@ -1828,7 +1828,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn check_mod_privacy<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: DefId) { let empty_tables = ty::TypeckTables::empty(None); // Check privacy of names not checked in previous compilation stages. @@ -1855,7 +1855,7 @@ fn check_mod_privacy<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { intravisit::walk_mod(&mut visitor, module, hir_id); } -fn privacy_access_levels<'tcx>(tcx: TyCtxt<'tcx>, krate: CrateNum) -> &'tcx AccessLevels { +fn privacy_access_levels(tcx: TyCtxt<'_>, krate: CrateNum) -> &AccessLevels { assert_eq!(krate, LOCAL_CRATE); // Build up a set of all exported items in the AST. This is a set of all @@ -1879,7 +1879,7 @@ fn privacy_access_levels<'tcx>(tcx: TyCtxt<'tcx>, krate: CrateNum) -> &'tcx Acce tcx.arena.alloc(visitor.access_levels) } -fn check_private_in_public<'tcx>(tcx: TyCtxt<'tcx>, krate: CrateNum) { +fn check_private_in_public(tcx: TyCtxt<'_>, krate: CrateNum) { assert_eq!(krate, LOCAL_CRATE); let access_levels = tcx.privacy_access_levels(LOCAL_CRATE); From d28832dde96e7ed4e5124ce26f7ff03327925a56 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 21 Jun 2019 23:49:03 +0200 Subject: [PATCH 22/31] Remove needless lifetimes --- src/librustc/lint/mod.rs | 2 +- src/librustc/middle/cstore.rs | 2 +- src/librustc/middle/dead.rs | 4 +- src/librustc/middle/dependency_format.rs | 8 +-- src/librustc/middle/intrinsicck.rs | 2 +- src/librustc/middle/lib_features.rs | 2 +- src/librustc/middle/liveness.rs | 2 +- src/librustc/middle/reachable.rs | 6 +- src/librustc/middle/region.rs | 2 +- src/librustc/middle/resolve_lifetime.rs | 4 +- src/librustc/middle/stability.rs | 8 +-- src/librustc/mir/mod.rs | 12 ++-- src/librustc/session/config.rs | 6 +- src/librustc/session/mod.rs | 52 +++++++------- src/librustc/traits/specialize/mod.rs | 10 +-- src/librustc/ty/query/on_disk_cache.rs | 8 +-- src/librustc/ty/query/plumbing.rs | 2 +- src/librustc_codegen_ssa/mir/analyze.rs | 2 +- .../persist/dirty_clean.rs | 2 +- src/librustc_incremental/persist/load.rs | 4 +- src/librustc_incremental/persist/save.rs | 2 +- .../borrow_check/nll/region_infer/values.rs | 2 +- src/librustc_mir/build/matches/test.rs | 2 +- src/librustc_mir/hair/pattern/_match.rs | 2 +- src/librustc_mir/hair/pattern/check_match.rs | 4 +- src/librustc_mir/monomorphize/collector.rs | 14 ++-- src/librustc_mir/monomorphize/partitioning.rs | 6 +- src/librustc_mir/util/graphviz.rs | 4 +- src/librustc_mir/util/liveness.rs | 8 +-- src/librustc_mir/util/mod.rs | 2 +- src/librustc_resolve/lib.rs | 6 +- .../program_clauses/primitive.rs | 16 ++--- src/librustc_traits/dropck_outlives.rs | 8 +-- src/librustc_traits/lowering/environment.rs | 2 +- src/librustc_traits/lowering/mod.rs | 20 +++--- src/librustc_typeck/check/method/suggest.rs | 4 +- src/librustc_typeck/check_unused.rs | 4 +- src/librustc_typeck/collect.rs | 70 +++++++++---------- src/librustc_typeck/impl_wf_check.rs | 10 +-- src/librustc_typeck/lib.rs | 8 +-- src/librustc_typeck/outlives/mod.rs | 12 ++-- src/librustc_typeck/outlives/test.rs | 2 +- src/librustc_typeck/outlives/utils.rs | 2 +- src/librustc_typeck/variance/mod.rs | 4 +- src/librustc_typeck/variance/test.rs | 2 +- src/librustdoc/markdown.rs | 2 +- src/libserialize/json.rs | 4 +- src/libsyntax_ext/assert.rs | 2 +- 48 files changed, 182 insertions(+), 182 deletions(-) diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 309af4b72c127..59b08b832d272 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -765,7 +765,7 @@ pub fn maybe_lint_level_root(tcx: TyCtxt<'_>, id: hir::HirId) -> bool { attrs.iter().any(|attr| Level::from_symbol(attr.name_or_empty()).is_some()) } -fn lint_levels<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> &'tcx LintLevelMap { +fn lint_levels(tcx: TyCtxt<'_>, cnum: CrateNum) -> &LintLevelMap { assert_eq!(cnum, LOCAL_CRATE); let mut builder = LintLevelMapBuilder { levels: LintLevelSets::builder(tcx.sess), diff --git a/src/librustc/middle/cstore.rs b/src/librustc/middle/cstore.rs index 2e9e1ac582f81..5a580dfa420b3 100644 --- a/src/librustc/middle/cstore.rs +++ b/src/librustc/middle/cstore.rs @@ -211,7 +211,7 @@ pub trait CrateStore { fn crates_untracked(&self) -> Vec; // utility functions - fn encode_metadata<'tcx>(&self, tcx: TyCtxt<'tcx>) -> EncodedMetadata; + fn encode_metadata(&self, tcx: TyCtxt<'_>) -> EncodedMetadata; fn metadata_encoding_version(&self) -> &[u8]; } diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs index e02ee8943603a..e1889aa555f86 100644 --- a/src/librustc/middle/dead.rs +++ b/src/librustc/middle/dead.rs @@ -26,7 +26,7 @@ use syntax_pos; // explored. For example, if it's a live Node::Item that is a // function, then we should explore its block to check for codes that // may need to be marked as live. -fn should_explore<'tcx>(tcx: TyCtxt<'tcx>, hir_id: hir::HirId) -> bool { +fn should_explore(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool { match tcx.hir().find(hir_id) { Some(Node::Item(..)) | Some(Node::ImplItem(..)) | @@ -662,7 +662,7 @@ impl Visitor<'tcx> for DeadVisitor<'tcx> { } } -pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_crate(tcx: TyCtxt<'_>) { let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE); let krate = tcx.hir().krate(); let live_symbols = find_live(tcx, access_levels, krate); diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc/middle/dependency_format.rs index 879da6413e28a..96b99fe4cdce2 100644 --- a/src/librustc/middle/dependency_format.rs +++ b/src/librustc/middle/dependency_format.rs @@ -81,7 +81,7 @@ pub enum Linkage { Dynamic, } -pub fn calculate<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn calculate(tcx: TyCtxt<'_>) { let sess = &tcx.sess; let fmts = sess.crate_types.borrow().iter().map(|&ty| { let linkage = calculate_type(tcx, ty); @@ -92,7 +92,7 @@ pub fn calculate<'tcx>(tcx: TyCtxt<'tcx>) { sess.dependency_formats.set(fmts); } -fn calculate_type<'tcx>(tcx: TyCtxt<'tcx>, ty: config::CrateType) -> DependencyList { +fn calculate_type(tcx: TyCtxt<'_>, ty: config::CrateType) -> DependencyList { let sess = &tcx.sess; if !sess.opts.output_types.should_codegen() { @@ -267,7 +267,7 @@ fn add_library( } } -fn attempt_static<'tcx>(tcx: TyCtxt<'tcx>) -> Option { +fn attempt_static(tcx: TyCtxt<'_>) -> Option { let sess = &tcx.sess; let crates = cstore::used_crates(tcx, RequireStatic); if !crates.iter().by_ref().all(|&(_, ref p)| p.is_some()) { @@ -324,7 +324,7 @@ fn activate_injected_dep(injected: Option, // After the linkage for a crate has been determined we need to verify that // there's only going to be one allocator in the output. -fn verify_ok<'tcx>(tcx: TyCtxt<'tcx>, list: &[Linkage]) { +fn verify_ok(tcx: TyCtxt<'_>, list: &[Linkage]) { let sess = &tcx.sess; if list.len() == 0 { return diff --git a/src/librustc/middle/intrinsicck.rs b/src/librustc/middle/intrinsicck.rs index e8d68e0b7a7aa..1cc96c549e724 100644 --- a/src/librustc/middle/intrinsicck.rs +++ b/src/librustc/middle/intrinsicck.rs @@ -10,7 +10,7 @@ use syntax_pos::{Span, sym}; use crate::hir::intravisit::{self, Visitor, NestedVisitorMap}; use crate::hir; -fn check_mod_intrinsics<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_intrinsics(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module( module_def_id, &mut ItemVisitor { tcx }.as_deep_visitor() diff --git a/src/librustc/middle/lib_features.rs b/src/librustc/middle/lib_features.rs index 9c131ce63428b..694b0a9862960 100644 --- a/src/librustc/middle/lib_features.rs +++ b/src/librustc/middle/lib_features.rs @@ -142,7 +142,7 @@ impl Visitor<'tcx> for LibFeatureCollector<'tcx> { } } -pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> LibFeatures { +pub fn collect(tcx: TyCtxt<'_>) -> LibFeatures { let mut collector = LibFeatureCollector::new(tcx); intravisit::walk_crate(&mut collector, tcx.hir().krate()); collector.lib_features diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 7b69fe394fb2c..4c69f8bf28ca8 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -181,7 +181,7 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> { fn visit_arm(&mut self, a: &'tcx hir::Arm) { visit_arm(self, a); } } -fn check_mod_liveness<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_liveness(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module( module_def_id, &mut IrMaps::new(tcx, module_def_id).as_deep_visitor(), diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs index d607c35f8762b..6b26be34d7520 100644 --- a/src/librustc/middle/reachable.rs +++ b/src/librustc/middle/reachable.rs @@ -42,8 +42,8 @@ fn item_might_be_inlined(tcx: TyCtxt<'tcx>, item: &hir::Item, attrs: CodegenFnAt } } -fn method_might_be_inlined<'tcx>( - tcx: TyCtxt<'tcx>, +fn method_might_be_inlined( + tcx: TyCtxt<'_>, impl_item: &hir::ImplItem, impl_src: DefId, ) -> bool { @@ -391,7 +391,7 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a, 'tcx #[derive(Clone, HashStable)] pub struct ReachableSet(pub Lrc); -fn reachable_set<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> ReachableSet { +fn reachable_set(tcx: TyCtxt<'_>, crate_num: CrateNum) -> ReachableSet { debug_assert!(crate_num == LOCAL_CRATE); let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE); diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 114684b152402..67a4c2981a705 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -1446,7 +1446,7 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> { } } -fn region_scope_tree<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ScopeTree { +fn region_scope_tree(tcx: TyCtxt<'_>, def_id: DefId) -> &ScopeTree { let closure_base_def_id = tcx.closure_base_def_id(def_id); if closure_base_def_id != def_id { return tcx.region_scope_tree(closure_base_def_id); diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index 412346bab257e..4496f6fb90a7a 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -368,7 +368,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) { /// entire crate. You should not read the result of this query /// directly, but rather use `named_region_map`, `is_late_bound_map`, /// etc. -fn resolve_lifetimes<'tcx>(tcx: TyCtxt<'tcx>, for_krate: CrateNum) -> &'tcx ResolveLifetimes { +fn resolve_lifetimes(tcx: TyCtxt<'_>, for_krate: CrateNum) -> &ResolveLifetimes { assert_eq!(for_krate, LOCAL_CRATE); let named_region_map = krate(tcx); @@ -395,7 +395,7 @@ fn resolve_lifetimes<'tcx>(tcx: TyCtxt<'tcx>, for_krate: CrateNum) -> &'tcx Reso tcx.arena.alloc(rl) } -fn krate<'tcx>(tcx: TyCtxt<'tcx>) -> NamedRegionMap { +fn krate(tcx: TyCtxt<'_>) -> NamedRegionMap { let krate = tcx.hir().krate(); let mut map = NamedRegionMap { defs: Default::default(), diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index 38df4060652b7..101563d2d99ef 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -466,7 +466,7 @@ impl<'tcx> Index<'tcx> { /// Cross-references the feature names of unstable APIs with enabled /// features and possibly prints errors. -fn check_mod_unstable_api_usage<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_unstable_api_usage(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module(module_def_id, &mut Checker { tcx }.as_deep_visitor()); } @@ -836,7 +836,7 @@ impl<'tcx> TyCtxt<'tcx> { /// Given the list of enabled features that were not language features (i.e., that /// were expected to be library features), and the list of features used from /// libraries, identify activated features that don't exist and error about them. -pub fn check_unused_or_stable_features<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) { let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE); if tcx.stability().staged_api[&LOCAL_CRATE] { @@ -920,8 +920,8 @@ pub fn check_unused_or_stable_features<'tcx>(tcx: TyCtxt<'tcx>) { // don't lint about unused features. We should reenable this one day! } -fn unnecessary_stable_feature_lint<'tcx>( - tcx: TyCtxt<'tcx>, +fn unnecessary_stable_feature_lint( + tcx: TyCtxt<'_>, span: Span, feature: Symbol, since: Symbol, diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 9b1808c585ce7..59a032d53cfd6 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -2867,19 +2867,19 @@ impl<'tcx> graph::WithStartNode for Body<'tcx> { } impl<'tcx> graph::WithPredecessors for Body<'tcx> { - fn predecessors<'graph>( - &'graph self, + fn predecessors( + &self, node: Self::Node, - ) -> >::Iter { + ) -> >::Iter { self.predecessors_for(node).clone().into_iter() } } impl<'tcx> graph::WithSuccessors for Body<'tcx> { - fn successors<'graph>( - &'graph self, + fn successors( + &self, node: Self::Node, - ) -> >::Iter { + ) -> >::Iter { self.basic_blocks[node].terminator().successors().cloned() } } diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 9f033262850a1..82c53be3ec70f 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -269,11 +269,11 @@ impl OutputTypes { self.0.contains_key(key) } - pub fn keys<'a>(&'a self) -> BTreeMapKeysIter<'a, OutputType, Option> { + pub fn keys(&self) -> BTreeMapKeysIter<'_, OutputType, Option> { self.0.keys() } - pub fn values<'a>(&'a self) -> BTreeMapValuesIter<'a, OutputType, Option> { + pub fn values(&self) -> BTreeMapValuesIter<'_, OutputType, Option> { self.0.values() } @@ -316,7 +316,7 @@ impl Externs { self.0.get(key) } - pub fn iter<'a>(&'a self) -> BTreeMapIter<'a, String, ExternEntry> { + pub fn iter(&self) -> BTreeMapIter<'_, String, ExternEntry> { self.0.iter() } } diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 9486f353b3f96..3cbf0ee213ae3 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -215,66 +215,66 @@ impl Session { *self.crate_disambiguator.get() } - pub fn struct_span_warn<'a, S: Into>( - &'a self, + pub fn struct_span_warn>( + &self, sp: S, msg: &str, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_warn(sp, msg) } - pub fn struct_span_warn_with_code<'a, S: Into>( - &'a self, + pub fn struct_span_warn_with_code>( + &self, sp: S, msg: &str, code: DiagnosticId, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_warn_with_code(sp, msg, code) } - pub fn struct_warn<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_warn(&self, msg: &str) -> DiagnosticBuilder<'_> { self.diagnostic().struct_warn(msg) } - pub fn struct_span_err<'a, S: Into>( - &'a self, + pub fn struct_span_err>( + &self, sp: S, msg: &str, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_err(sp, msg) } - pub fn struct_span_err_with_code<'a, S: Into>( - &'a self, + pub fn struct_span_err_with_code>( + &self, sp: S, msg: &str, code: DiagnosticId, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_err_with_code(sp, msg, code) } // FIXME: This method should be removed (every error should have an associated error code). - pub fn struct_err<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_err(&self, msg: &str) -> DiagnosticBuilder<'_> { self.diagnostic().struct_err(msg) } - pub fn struct_err_with_code<'a>( - &'a self, + pub fn struct_err_with_code( + &self, msg: &str, code: DiagnosticId, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_err_with_code(msg, code) } - pub fn struct_span_fatal<'a, S: Into>( - &'a self, + pub fn struct_span_fatal>( + &self, sp: S, msg: &str, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_fatal(sp, msg) } - pub fn struct_span_fatal_with_code<'a, S: Into>( - &'a self, + pub fn struct_span_fatal_with_code>( + &self, sp: S, msg: &str, code: DiagnosticId, - ) -> DiagnosticBuilder<'a> { + ) -> DiagnosticBuilder<'_> { self.diagnostic().struct_span_fatal_with_code(sp, msg, code) } - pub fn struct_fatal<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> { + pub fn struct_fatal(&self, msg: &str) -> DiagnosticBuilder<'_> { self.diagnostic().struct_fatal(msg) } @@ -416,7 +416,7 @@ impl Session { pub fn next_node_id(&self) -> NodeId { self.reserve_node_ids(1) } - pub fn diagnostic<'a>(&'a self) -> &'a errors::Handler { + pub fn diagnostic(&self) -> &errors::Handler { &self.parse_sess.span_diagnostic } @@ -504,7 +504,7 @@ impl Session { ); } - pub fn source_map<'a>(&'a self) -> &'a source_map::SourceMap { + pub fn source_map(&self) -> &source_map::SourceMap { self.parse_sess.source_map() } pub fn verbose(&self) -> bool { diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs index 43bb4edd9b27d..f0389bb037ac5 100644 --- a/src/librustc/traits/specialize/mod.rs +++ b/src/librustc/traits/specialize/mod.rs @@ -145,8 +145,8 @@ pub fn find_associated_item<'tcx>( /// Specialization is determined by the sets of types to which the impls apply; /// `impl1` specializes `impl2` if it applies to a subset of the types `impl2` applies /// to. -pub(super) fn specializes<'tcx>( - tcx: TyCtxt<'tcx>, +pub(super) fn specializes( + tcx: TyCtxt<'_>, (impl1_def_id, impl2_def_id): (DefId, DefId), ) -> bool { debug!("specializes({:?}, {:?})", impl1_def_id, impl2_def_id); @@ -282,10 +282,10 @@ fn fulfill_implication<'a, 'tcx>( } // Query provider for `specialization_graph_of`. -pub(super) fn specialization_graph_provider<'tcx>( - tcx: TyCtxt<'tcx>, +pub(super) fn specialization_graph_provider( + tcx: TyCtxt<'_>, trait_id: DefId, -) -> &'tcx specialization_graph::Graph { +) -> &specialization_graph::Graph { let mut sg = specialization_graph::Graph::new(); let mut trait_impls = tcx.all_impls(trait_id); diff --git a/src/librustc/ty/query/on_disk_cache.rs b/src/librustc/ty/query/on_disk_cache.rs index 8b2183c42efd4..85153f99b1917 100644 --- a/src/librustc/ty/query/on_disk_cache.rs +++ b/src/librustc/ty/query/on_disk_cache.rs @@ -306,9 +306,9 @@ impl<'sess> OnDiskCache<'sess> { } /// Loads a diagnostic emitted during the previous compilation session. - pub fn load_diagnostics<'tcx>( + pub fn load_diagnostics( &self, - tcx: TyCtxt<'tcx>, + tcx: TyCtxt<'_>, dep_node_index: SerializedDepNodeIndex, ) -> Vec { let diagnostics: Option = self.load_indexed( @@ -335,9 +335,9 @@ impl<'sess> OnDiskCache<'sess> { /// Returns the cached query result if there is something in the cache for /// the given `SerializedDepNodeIndex`; otherwise returns `None`. - pub fn try_load_query_result<'tcx, T>( + pub fn try_load_query_result( &self, - tcx: TyCtxt<'tcx>, + tcx: TyCtxt<'_>, dep_node_index: SerializedDepNodeIndex, ) -> Option where diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 5a7d106700af2..0c9e31e1ff28e 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -1166,7 +1166,7 @@ macro_rules! define_provider_struct { /// then `force_from_dep_node()` should not fail for it. Otherwise, you can just /// add it to the "We don't have enough information to reconstruct..." group in /// the match below. -pub fn force_from_dep_node<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool { +pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool { use crate::dep_graph::RecoverKey; // We must avoid ever having to call force_from_dep_node() for a diff --git a/src/librustc_codegen_ssa/mir/analyze.rs b/src/librustc_codegen_ssa/mir/analyze.rs index 0289150a5e42a..2af9b448ef1eb 100644 --- a/src/librustc_codegen_ssa/mir/analyze.rs +++ b/src/librustc_codegen_ssa/mir/analyze.rs @@ -273,7 +273,7 @@ impl CleanupKind { } } -pub fn cleanup_kinds<'tcx>(mir: &mir::Body<'tcx>) -> IndexVec { +pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec { fn discover_masters<'tcx>(result: &mut IndexVec, mir: &mir::Body<'tcx>) { for (bb, data) in mir.basic_blocks().iter_enumerated() { diff --git a/src/librustc_incremental/persist/dirty_clean.rs b/src/librustc_incremental/persist/dirty_clean.rs index 5296ed0ffd0b8..1d83aa112a837 100644 --- a/src/librustc_incremental/persist/dirty_clean.rs +++ b/src/librustc_incremental/persist/dirty_clean.rs @@ -206,7 +206,7 @@ impl Assertion { } } -pub fn check_dirty_clean_annotations<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) { // can't add `#[rustc_dirty]` etc without opting in to this feature if !tcx.features().rustc_attrs { return; diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs index d9bcc0b2a83c7..90aefb0f32416 100644 --- a/src/librustc_incremental/persist/load.rs +++ b/src/librustc_incremental/persist/load.rs @@ -15,7 +15,7 @@ use super::fs::*; use super::file_format; use super::work_product; -pub fn dep_graph_tcx_init<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn dep_graph_tcx_init(tcx: TyCtxt<'_>) { if !tcx.dep_graph.is_fully_enabled() { return } @@ -192,7 +192,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture { })) } -pub fn load_query_result_cache<'sess>(sess: &'sess Session) -> OnDiskCache<'sess> { +pub fn load_query_result_cache(sess: &Session) -> OnDiskCache<'_> { if sess.opts.incremental.is_none() || !sess.opts.debugging_opts.incremental_queries { return OnDiskCache::new_empty(sess.source_map()); diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs index 49c79ec09f5e2..13e2c5d1c574d 100644 --- a/src/librustc_incremental/persist/save.rs +++ b/src/librustc_incremental/persist/save.rs @@ -15,7 +15,7 @@ use super::dirty_clean; use super::file_format; use super::work_product; -pub fn save_dep_graph<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn save_dep_graph(tcx: TyCtxt<'_>) { debug!("save_dep_graph()"); tcx.dep_graph.with_ignore(|| { let sess = tcx.sess; diff --git a/src/librustc_mir/borrow_check/nll/region_infer/values.rs b/src/librustc_mir/borrow_check/nll/region_infer/values.rs index cfd80cecca510..6f9f5707935ba 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/values.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/values.rs @@ -162,7 +162,7 @@ impl LivenessValues { } /// Iterate through each region that has a value in this set. - crate fn rows<'a>(&'a self) -> impl Iterator { + crate fn rows(&self) -> impl Iterator { self.points.rows() } diff --git a/src/librustc_mir/build/matches/test.rs b/src/librustc_mir/build/matches/test.rs index 95e2e52092a91..528dfbef6946a 100644 --- a/src/librustc_mir/build/matches/test.rs +++ b/src/librustc_mir/build/matches/test.rs @@ -826,6 +826,6 @@ impl Test<'_> { } } -fn is_switch_ty<'tcx>(ty: Ty<'tcx>) -> bool { +fn is_switch_ty(ty: Ty<'_>) -> bool { ty.is_integral() || ty.is_char() || ty.is_bool() } diff --git a/src/librustc_mir/hair/pattern/_match.rs b/src/librustc_mir/hair/pattern/_match.rs index fc2951895f3fe..d356194c00343 100644 --- a/src/librustc_mir/hair/pattern/_match.rs +++ b/src/librustc_mir/hair/pattern/_match.rs @@ -835,7 +835,7 @@ impl<'tcx> IntRange<'tcx> { fn from_ctor(tcx: TyCtxt<'tcx>, ctor: &Constructor<'tcx>) -> Option> { // Floating-point ranges are permitted and we don't want // to consider them when constructing integer ranges. - fn is_integral<'tcx>(ty: Ty<'tcx>) -> bool { + fn is_integral(ty: Ty<'_>) -> bool { match ty.sty { ty::Char | ty::Int(_) | ty::Uint(_) => true, _ => false, diff --git a/src/librustc_mir/hair/pattern/check_match.rs b/src/librustc_mir/hair/pattern/check_match.rs index ed850379af60b..e64bd439af43b 100644 --- a/src/librustc_mir/hair/pattern/check_match.rs +++ b/src/librustc_mir/hair/pattern/check_match.rs @@ -26,7 +26,7 @@ use std::slice; use syntax::ptr::P; use syntax_pos::{Span, DUMMY_SP, MultiSpan}; -pub(crate) fn check_match<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { +pub(crate) fn check_match(tcx: TyCtxt<'_>, def_id: DefId) { let body_id = if let Some(id) = tcx.hir().as_local_hir_id(def_id) { tcx.hir().body_owned_by(id) } else { @@ -43,7 +43,7 @@ pub(crate) fn check_match<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) { }.visit_body(tcx.hir().body(body_id)); } -fn create_e0004<'a>(sess: &'a Session, sp: Span, error_message: String) -> DiagnosticBuilder<'a> { +fn create_e0004(sess: &Session, sp: Span, error_message: String) -> DiagnosticBuilder<'_> { struct_span_err!(sess, sp, E0004, "{}", &error_message) } diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index bb2738d5aa4a3..097d76925c8eb 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -281,10 +281,10 @@ impl<'tcx> InliningMap<'tcx> { } } -pub fn collect_crate_mono_items<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn collect_crate_mono_items( + tcx: TyCtxt<'_>, mode: MonoItemCollectionMode, -) -> (FxHashSet>, InliningMap<'tcx>) { +) -> (FxHashSet>, InliningMap<'_>) { let roots = time(tcx.sess, "collecting roots", || { collect_roots(tcx, mode) }); @@ -315,7 +315,7 @@ pub fn collect_crate_mono_items<'tcx>( // Find all non-generic items by walking the HIR. These items serve as roots to // start monomorphizing from. -fn collect_roots<'tcx>(tcx: TyCtxt<'tcx>, mode: MonoItemCollectionMode) -> Vec> { +fn collect_roots(tcx: TyCtxt<'_>, mode: MonoItemCollectionMode) -> Vec> { debug!("Collecting roots"); let mut roots = Vec::new(); @@ -912,7 +912,7 @@ fn find_vtable_types_for_unsizing<'tcx>( } } -fn create_fn_mono_item<'tcx>(instance: Instance<'tcx>) -> MonoItem<'tcx> { +fn create_fn_mono_item(instance: Instance<'_>) -> MonoItem<'_> { debug!("create_fn_mono_item(instance={})", instance); MonoItem::Fn(instance) } @@ -1114,7 +1114,7 @@ impl RootCollector<'_, 'v> { } } -fn item_requires_monomorphization<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn item_requires_monomorphization(tcx: TyCtxt<'_>, def_id: DefId) -> bool { let generics = tcx.generics_of(def_id); generics.requires_monomorphization(tcx) } @@ -1243,7 +1243,7 @@ fn collect_neighbours<'tcx>( } } -fn def_id_to_string<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> String { +fn def_id_to_string(tcx: TyCtxt<'_>, def_id: DefId) -> String { let mut output = String::new(); let printer = DefPathBasedNames::new(tcx, false, false); printer.push_def_path(def_id, &mut output); diff --git a/src/librustc_mir/monomorphize/partitioning.rs b/src/librustc_mir/monomorphize/partitioning.rs index 32e4d4f437a78..a934c921d9257 100644 --- a/src/librustc_mir/monomorphize/partitioning.rs +++ b/src/librustc_mir/monomorphize/partitioning.rs @@ -839,10 +839,10 @@ where } } -fn collect_and_partition_mono_items<'tcx>( - tcx: TyCtxt<'tcx>, +fn collect_and_partition_mono_items( + tcx: TyCtxt<'_>, cnum: CrateNum, -) -> (Arc, Arc>>>) { +) -> (Arc, Arc>>>) { assert_eq!(cnum, LOCAL_CRATE); let collection_mode = match tcx.sess.opts.debugging_opts.print_mono_items { diff --git a/src/librustc_mir/util/graphviz.rs b/src/librustc_mir/util/graphviz.rs index 1d876d7bddb53..9d142d9b700b6 100644 --- a/src/librustc_mir/util/graphviz.rs +++ b/src/librustc_mir/util/graphviz.rs @@ -8,8 +8,8 @@ use std::io::{self, Write}; use super::pretty::dump_mir_def_ids; /// Write a graphviz DOT graph of a list of MIRs. -pub fn write_mir_graphviz<'tcx, W>( - tcx: TyCtxt<'tcx>, +pub fn write_mir_graphviz( + tcx: TyCtxt<'_>, single: Option, w: &mut W, ) -> io::Result<()> diff --git a/src/librustc_mir/util/liveness.rs b/src/librustc_mir/util/liveness.rs index 8ead571d9664d..b42eebc7ee3be 100644 --- a/src/librustc_mir/util/liveness.rs +++ b/src/librustc_mir/util/liveness.rs @@ -56,8 +56,8 @@ pub struct LivenessResult { /// Computes which local variables are live within the given function /// `mir`, including drops. -pub fn liveness_of_locals<'tcx>( - body: &Body<'tcx>, +pub fn liveness_of_locals( + body: &Body<'_>, ) -> LivenessResult { let num_live_vars = body.local_decls.len(); @@ -243,8 +243,8 @@ impl<'tcx> Visitor<'tcx> for DefsUsesVisitor } } -fn block<'tcx>( - b: &BasicBlockData<'tcx>, +fn block( + b: &BasicBlockData<'_>, locals: usize, ) -> DefsUses { let mut visitor = DefsUsesVisitor { diff --git a/src/librustc_mir/util/mod.rs b/src/librustc_mir/util/mod.rs index 719029dbaac77..fd2a5e452ce4b 100644 --- a/src/librustc_mir/util/mod.rs +++ b/src/librustc_mir/util/mod.rs @@ -21,7 +21,7 @@ pub use self::graphviz::{graphviz_safe_def_name, write_mir_graphviz}; pub use self::graphviz::write_node_label as write_graphviz_node_label; /// If possible, suggest replacing `ref` with `ref mut`. -pub fn suggest_ref_mut<'tcx>(tcx: TyCtxt<'tcx>, binding_span: Span) -> Option<(String)> { +pub fn suggest_ref_mut(tcx: TyCtxt<'_>, binding_span: Span) -> Option<(String)> { let hi_src = tcx.sess.source_map().span_to_snippet(binding_span).unwrap(); if hi_src.starts_with("ref") && hi_src["ref".len()..].starts_with(Pattern_White_Space) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index f4c23a023b104..77a976a54f434 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -198,9 +198,9 @@ enum ResolutionError<'a> { /// /// This takes the error provided, combines it with the span and any additional spans inside the /// error and emits it. -fn resolve_error<'sess, 'a>(resolver: &'sess Resolver<'_>, - span: Span, - resolution_error: ResolutionError<'a>) { +fn resolve_error(resolver: &Resolver<'_>, + span: Span, + resolution_error: ResolutionError<'_>) { resolve_struct_error(resolver, span, resolution_error).emit(); } diff --git a/src/librustc_traits/chalk_context/program_clauses/primitive.rs b/src/librustc_traits/chalk_context/program_clauses/primitive.rs index 8e4b9da6de268..6e8eed0f90725 100644 --- a/src/librustc_traits/chalk_context/program_clauses/primitive.rs +++ b/src/librustc_traits/chalk_context/program_clauses/primitive.rs @@ -15,7 +15,7 @@ use crate::lowering::Lower; use crate::generic_types; use std::iter; -crate fn wf_clause_for_raw_ptr<'tcx>(tcx: TyCtxt<'tcx>, mutbl: hir::Mutability) -> Clauses<'tcx> { +crate fn wf_clause_for_raw_ptr(tcx: TyCtxt<'_>, mutbl: hir::Mutability) -> Clauses<'_> { let ptr_ty = generic_types::raw_ptr(tcx, mutbl); let wf_clause = ProgramClause { @@ -29,13 +29,13 @@ crate fn wf_clause_for_raw_ptr<'tcx>(tcx: TyCtxt<'tcx>, mutbl: hir::Mutability) tcx.mk_clauses(iter::once(wf_clause)) } -crate fn wf_clause_for_fn_ptr<'tcx>( - tcx: TyCtxt<'tcx>, +crate fn wf_clause_for_fn_ptr( + tcx: TyCtxt<'_>, arity_and_output: usize, variadic: bool, unsafety: hir::Unsafety, abi: abi::Abi, -) -> Clauses<'tcx> { +) -> Clauses<'_> { let fn_ptr = generic_types::fn_ptr(tcx, arity_and_output, variadic, unsafety, abi); let wf_clause = ProgramClause { @@ -50,7 +50,7 @@ crate fn wf_clause_for_fn_ptr<'tcx>( tcx.mk_clauses(iter::once(wf_clause)) } -crate fn wf_clause_for_slice<'tcx>(tcx: TyCtxt<'tcx>) -> Clauses<'tcx> { +crate fn wf_clause_for_slice(tcx: TyCtxt<'_>) -> Clauses<'_> { let ty = generic_types::bound(tcx, 0); let slice_ty = tcx.mk_slice(ty); @@ -111,7 +111,7 @@ crate fn wf_clause_for_array<'tcx>( tcx.mk_clauses(iter::once(wf_clause)) } -crate fn wf_clause_for_tuple<'tcx>(tcx: TyCtxt<'tcx>, arity: usize) -> Clauses<'tcx> { +crate fn wf_clause_for_tuple(tcx: TyCtxt<'_>, arity: usize) -> Clauses<'_> { let type_list = generic_types::type_list(tcx, arity); let tuple_ty = tcx.mk_ty(ty::Tuple(type_list)); @@ -152,7 +152,7 @@ crate fn wf_clause_for_tuple<'tcx>(tcx: TyCtxt<'tcx>, arity: usize) -> Clauses<' tcx.mk_clauses(iter::once(wf_clause)) } -crate fn wf_clause_for_ref<'tcx>(tcx: TyCtxt<'tcx>, mutbl: hir::Mutability) -> Clauses<'tcx> { +crate fn wf_clause_for_ref(tcx: TyCtxt<'_>, mutbl: hir::Mutability) -> Clauses<'_> { let region = tcx.mk_region( ty::ReLateBound(ty::INNERMOST, ty::BoundRegion::BrAnon(0)) ); @@ -176,7 +176,7 @@ crate fn wf_clause_for_ref<'tcx>(tcx: TyCtxt<'tcx>, mutbl: hir::Mutability) -> C tcx.mk_clauses(iter::once(wf_clause)) } -crate fn wf_clause_for_fn_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses<'tcx> { +crate fn wf_clause_for_fn_def(tcx: TyCtxt<'_>, def_id: DefId) -> Clauses<'_> { let fn_def = generic_types::fn_def(tcx, def_id); let wf_clause = ProgramClause { diff --git a/src/librustc_traits/dropck_outlives.rs b/src/librustc_traits/dropck_outlives.rs index 3abd7e90cf10f..ecd888b606981 100644 --- a/src/librustc_traits/dropck_outlives.rs +++ b/src/librustc_traits/dropck_outlives.rs @@ -279,10 +279,10 @@ fn dtorck_constraint_for_ty<'tcx>( } /// Calculates the dtorck constraint for a type. -crate fn adt_dtorck_constraint<'tcx>( - tcx: TyCtxt<'tcx>, +crate fn adt_dtorck_constraint( + tcx: TyCtxt<'_>, def_id: DefId, -) -> Result, NoSolution> { +) -> Result, NoSolution> { let def = tcx.adt_def(def_id); let span = tcx.def_span(def_id); debug!("dtorck_constraint: {:?}", def); @@ -313,7 +313,7 @@ crate fn adt_dtorck_constraint<'tcx>( Ok(result) } -fn dedup_dtorck_constraint<'tcx>(c: &mut DtorckConstraint<'tcx>) { +fn dedup_dtorck_constraint(c: &mut DtorckConstraint<'_>) { let mut outlives = FxHashSet::default(); let mut dtorck_types = FxHashSet::default(); diff --git a/src/librustc_traits/lowering/environment.rs b/src/librustc_traits/lowering/environment.rs index 0173685583148..9ff685bb4ee8a 100644 --- a/src/librustc_traits/lowering/environment.rs +++ b/src/librustc_traits/lowering/environment.rs @@ -160,7 +160,7 @@ crate fn program_clauses_for_env<'tcx>( ); } -crate fn environment<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Environment<'tcx> { +crate fn environment(tcx: TyCtxt<'_>, def_id: DefId) -> Environment<'_> { use super::{Lower, IntoFromEnvGoal}; use rustc::hir::{Node, TraitItemKind, ImplItemKind, ItemKind, ForeignItemKind}; diff --git a/src/librustc_traits/lowering/mod.rs b/src/librustc_traits/lowering/mod.rs index 2a6613101614d..b0d9134c834d6 100644 --- a/src/librustc_traits/lowering/mod.rs +++ b/src/librustc_traits/lowering/mod.rs @@ -155,7 +155,7 @@ impl<'tcx> IntoWellFormedGoal for DomainGoal<'tcx> { } } -crate fn program_clauses_for<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses<'tcx> { +crate fn program_clauses_for(tcx: TyCtxt<'_>, def_id: DefId) -> Clauses<'_> { // FIXME(eddyb) this should only be using `def_kind`. match tcx.def_key(def_id).disambiguated_data.data { DefPathData::TypeNs(..) => match tcx.def_kind(def_id) { @@ -181,7 +181,7 @@ crate fn program_clauses_for<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses< } } -fn program_clauses_for_trait<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses<'tcx> { +fn program_clauses_for_trait(tcx: TyCtxt<'_>, def_id: DefId) -> Clauses<'_> { // `trait Trait where WC { .. } // P0 == Self` // Rule Implemented-From-Env (see rustc guide) @@ -337,7 +337,7 @@ fn program_clauses_for_impl(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses<'tcx> { tcx.mk_clauses(iter::once(Clause::ForAll(ty::Binder::bind(clause)))) } -pub fn program_clauses_for_type_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Clauses<'tcx> { +pub fn program_clauses_for_type_def(tcx: TyCtxt<'_>, def_id: DefId) -> Clauses<'_> { // Rule WellFormed-Type // // `struct Ty where WC1, ..., WCm` @@ -411,10 +411,10 @@ pub fn program_clauses_for_type_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> C tcx.mk_clauses(iter::once(well_formed_clause).chain(from_env_clauses)) } -pub fn program_clauses_for_associated_type_def<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn program_clauses_for_associated_type_def( + tcx: TyCtxt<'_>, item_id: DefId, -) -> Clauses<'tcx> { +) -> Clauses<'_> { // Rule ProjectionEq-Placeholder // // ``` @@ -549,10 +549,10 @@ pub fn program_clauses_for_associated_type_def<'tcx>( tcx.mk_clauses(clauses) } -pub fn program_clauses_for_associated_type_value<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn program_clauses_for_associated_type_value( + tcx: TyCtxt<'_>, item_id: DefId, -) -> Clauses<'tcx> { +) -> Clauses<'_> { // Rule Normalize-From-Impl (see rustc guide) // // ``` @@ -611,7 +611,7 @@ pub fn program_clauses_for_associated_type_value<'tcx>( tcx.mk_clauses(iter::once(normalize_clause)) } -pub fn dump_program_clauses<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn dump_program_clauses(tcx: TyCtxt<'_>) { if !tcx.features().rustc_attrs { return; } diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index fa1b07d2dcfcd..be00a6efe55ed 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -775,12 +775,12 @@ impl Ord for TraitInfo { } /// Retrieves all traits in this crate and any dependent crates. -pub fn all_traits<'tcx>(tcx: TyCtxt<'tcx>) -> Vec { +pub fn all_traits(tcx: TyCtxt<'_>) -> Vec { tcx.all_traits(LOCAL_CRATE).iter().map(|&def_id| TraitInfo { def_id }).collect() } /// Computes all traits in this crate and any dependent crates. -fn compute_all_traits<'tcx>(tcx: TyCtxt<'tcx>) -> Vec { +fn compute_all_traits(tcx: TyCtxt<'_>) -> Vec { use hir::itemlikevisit; let mut traits = vec![]; diff --git a/src/librustc_typeck/check_unused.rs b/src/librustc_typeck/check_unused.rs index 7e781eeec56a9..8614de1977085 100644 --- a/src/librustc_typeck/check_unused.rs +++ b/src/librustc_typeck/check_unused.rs @@ -13,7 +13,7 @@ use rustc::util::nodemap::DefIdSet; use rustc_data_structures::fx::FxHashMap; -pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn check_crate(tcx: TyCtxt<'_>) { let mut used_trait_imports = DefIdSet::default(); for &body_id in tcx.hir().krate().bodies.keys() { let item_def_id = tcx.hir().body_owner_def_id(body_id); @@ -70,7 +70,7 @@ impl CheckVisitor<'tcx> { } } -fn unused_crates_lint<'tcx>(tcx: TyCtxt<'tcx>) { +fn unused_crates_lint(tcx: TyCtxt<'_>) { let lint = lint::builtin::UNUSED_EXTERN_CRATES; // Collect first the crates that are completely unused. These we diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 87e1166b7c041..8b2f15aeabf3b 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -56,7 +56,7 @@ struct OnlySelfBounds(bool); /////////////////////////////////////////////////////////////////////////// // Main entry point -fn collect_mod_item_types<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn collect_mod_item_types(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module( module_def_id, &mut CollectItemTypesVisitor { tcx }.as_deep_visitor() @@ -253,10 +253,10 @@ impl AstConv<'tcx> for ItemCtxt<'tcx> { } } -fn type_param_predicates<'tcx>( - tcx: TyCtxt<'tcx>, +fn type_param_predicates( + tcx: TyCtxt<'_>, (item_def_id, def_id): (DefId, DefId), -) -> &'tcx ty::GenericPredicates<'tcx> { +) -> &ty::GenericPredicates<'_> { use rustc::hir::*; // In the AST, bounds can derive from two places. Either @@ -381,7 +381,7 @@ impl ItemCtxt<'tcx> { /// parameter with ID `param_id`. We use this so as to avoid running /// `ast_ty_to_ty`, because we want to avoid triggering an all-out /// conversion of the type to avoid inducing unnecessary cycles. -fn is_param<'tcx>(tcx: TyCtxt<'tcx>, ast_ty: &hir::Ty, param_id: hir::HirId) -> bool { +fn is_param(tcx: TyCtxt<'_>, ast_ty: &hir::Ty, param_id: hir::HirId) -> bool { if let hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) = ast_ty.node { match path.res { Res::SelfTy(Some(def_id), None) | Res::Def(DefKind::TyParam, def_id) => { @@ -394,7 +394,7 @@ fn is_param<'tcx>(tcx: TyCtxt<'tcx>, ast_ty: &hir::Ty, param_id: hir::HirId) -> } } -fn convert_item<'tcx>(tcx: TyCtxt<'tcx>, item_id: hir::HirId) { +fn convert_item(tcx: TyCtxt<'_>, item_id: hir::HirId) { let it = tcx.hir().expect_item(item_id); debug!("convert: item {} with id {}", it.ident, it.hir_id); let def_id = tcx.hir().local_def_id_from_hir_id(item_id); @@ -476,7 +476,7 @@ fn convert_item<'tcx>(tcx: TyCtxt<'tcx>, item_id: hir::HirId) { } } -fn convert_trait_item<'tcx>(tcx: TyCtxt<'tcx>, trait_item_id: hir::HirId) { +fn convert_trait_item(tcx: TyCtxt<'_>, trait_item_id: hir::HirId) { let trait_item = tcx.hir().expect_trait_item(trait_item_id); let def_id = tcx.hir().local_def_id_from_hir_id(trait_item.hir_id); tcx.generics_of(def_id); @@ -497,7 +497,7 @@ fn convert_trait_item<'tcx>(tcx: TyCtxt<'tcx>, trait_item_id: hir::HirId) { tcx.predicates_of(def_id); } -fn convert_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item_id: hir::HirId) { +fn convert_impl_item(tcx: TyCtxt<'_>, impl_item_id: hir::HirId) { let def_id = tcx.hir().local_def_id_from_hir_id(impl_item_id); tcx.generics_of(def_id); tcx.type_of(def_id); @@ -507,7 +507,7 @@ fn convert_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item_id: hir::HirId) { } } -fn convert_variant_ctor<'tcx>(tcx: TyCtxt<'tcx>, ctor_id: hir::HirId) { +fn convert_variant_ctor(tcx: TyCtxt<'_>, ctor_id: hir::HirId) { let def_id = tcx.hir().local_def_id_from_hir_id(ctor_id); tcx.generics_of(def_id); tcx.type_of(def_id); @@ -562,8 +562,8 @@ fn convert_enum_variant_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, variants: } } -fn convert_variant<'tcx>( - tcx: TyCtxt<'tcx>, +fn convert_variant( + tcx: TyCtxt<'_>, variant_did: Option, ctor_did: Option, ident: Ident, @@ -619,7 +619,7 @@ fn convert_variant<'tcx>( ) } -fn adt_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::AdtDef { +fn adt_def(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::AdtDef { use rustc::hir::*; let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); @@ -686,10 +686,10 @@ fn adt_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::AdtDef { /// Ensures that the super-predicates of the trait with a `DefId` /// of `trait_def_id` are converted and stored. This also ensures that /// the transitive super-predicates are converted. -fn super_predicates_of<'tcx>( - tcx: TyCtxt<'tcx>, +fn super_predicates_of( + tcx: TyCtxt<'_>, trait_def_id: DefId, -) -> &'tcx ty::GenericPredicates<'tcx> { +) -> &ty::GenericPredicates<'_> { debug!("super_predicates(trait_def_id={:?})", trait_def_id); let trait_hir_id = tcx.hir().as_local_hir_id(trait_def_id).unwrap(); @@ -740,7 +740,7 @@ fn super_predicates_of<'tcx>( }) } -fn trait_def<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::TraitDef { +fn trait_def(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::TraitDef { let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); let item = tcx.hir().expect_item(hir_id); @@ -879,7 +879,7 @@ fn has_late_bound_regions<'tcx>(tcx: TyCtxt<'tcx>, node: Node<'tcx>) -> Option(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::Generics { +fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::Generics { use rustc::hir::*; let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); @@ -1122,7 +1122,7 @@ fn generics_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::Generics { }) } -fn report_assoc_ty_on_inherent_impl<'tcx>(tcx: TyCtxt<'tcx>, span: Span) { +fn report_assoc_ty_on_inherent_impl(tcx: TyCtxt<'_>, span: Span) { span_err!( tcx.sess, span, @@ -1131,7 +1131,7 @@ fn report_assoc_ty_on_inherent_impl<'tcx>(tcx: TyCtxt<'tcx>, span: Span) { ); } -fn type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx> { +fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> { checked_type_of(tcx, def_id, true).unwrap() } @@ -1139,7 +1139,7 @@ fn type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx> { /// /// If you want to fail anyway, you can set the `fail` parameter to true, but in this case, /// you'd better just call [`type_of`] directly. -pub fn checked_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, fail: bool) -> Option> { +pub fn checked_type_of(tcx: TyCtxt<'_>, def_id: DefId, fail: bool) -> Option> { use rustc::hir::*; let hir_id = match tcx.hir().as_local_hir_id(def_id) { @@ -1464,7 +1464,7 @@ pub fn checked_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, fail: bool) -> Op }) } -fn find_existential_constraints<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx> { +fn find_existential_constraints(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> { use rustc::hir::{ImplItem, Item, TraitItem}; debug!("find_existential_constraints({:?})", def_id); @@ -1682,7 +1682,7 @@ fn find_existential_constraints<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'t } } -fn fn_sig<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> ty::PolyFnSig<'tcx> { +fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> { use rustc::hir::*; use rustc::hir::Node::*; @@ -1758,7 +1758,7 @@ fn fn_sig<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> ty::PolyFnSig<'tcx> { } } -fn impl_trait_ref<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option> { +fn impl_trait_ref(tcx: TyCtxt<'_>, def_id: DefId) -> Option> { let icx = ItemCtxt::new(tcx, def_id); let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); @@ -1773,7 +1773,7 @@ fn impl_trait_ref<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option(tcx: TyCtxt<'tcx>, def_id: DefId) -> hir::ImplPolarity { +fn impl_polarity(tcx: TyCtxt<'_>, def_id: DefId) -> hir::ImplPolarity { let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); match tcx.hir().expect_item(hir_id).node { hir::ItemKind::Impl(_, polarity, ..) => polarity, @@ -1804,10 +1804,10 @@ fn early_bound_lifetimes_from_generics<'a, 'tcx: 'a>( /// Returns a list of type predicates for the definition with ID `def_id`, including inferred /// lifetime constraints. This includes all predicates returned by `explicit_predicates_of`, plus /// inferred constraints concerning which regions outlive other regions. -fn predicates_defined_on<'tcx>( - tcx: TyCtxt<'tcx>, +fn predicates_defined_on( + tcx: TyCtxt<'_>, def_id: DefId, -) -> &'tcx ty::GenericPredicates<'tcx> { +) -> &ty::GenericPredicates<'_> { debug!("predicates_defined_on({:?})", def_id); let mut result = tcx.explicit_predicates_of(def_id); debug!( @@ -1834,7 +1834,7 @@ fn predicates_defined_on<'tcx>( /// Returns a list of all type predicates (explicit and implicit) for the definition with /// ID `def_id`. This includes all predicates returned by `predicates_defined_on`, plus /// `Self: Trait` predicates for traits. -fn predicates_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::GenericPredicates<'tcx> { +fn predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::GenericPredicates<'_> { let mut result = tcx.predicates_defined_on(def_id); if tcx.is_trait(def_id) { @@ -1861,10 +1861,10 @@ fn predicates_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::GenericPre /// Returns a list of user-specified type predicates for the definition with ID `def_id`. /// N.B., this does not include any implied/inferred constraints. -fn explicit_predicates_of<'tcx>( - tcx: TyCtxt<'tcx>, +fn explicit_predicates_of( + tcx: TyCtxt<'_>, def_id: DefId, -) -> &'tcx ty::GenericPredicates<'tcx> { +) -> &ty::GenericPredicates<'_> { use rustc::hir::*; use rustc_data_structures::fx::FxHashSet; @@ -2271,7 +2271,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>( fty } -fn is_foreign_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { +fn is_foreign_item(tcx: TyCtxt<'_>, def_id: DefId) -> bool { match tcx.hir().get_if_local(def_id) { Some(Node::ForeignItem(..)) => true, Some(_) => false, @@ -2279,7 +2279,7 @@ fn is_foreign_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool { } } -fn static_mutability<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option { +fn static_mutability(tcx: TyCtxt<'_>, def_id: DefId) -> Option { match tcx.hir().get_if_local(def_id) { Some(Node::Item(&hir::Item { node: hir::ItemKind::Static(_, mutbl, _), .. @@ -2387,7 +2387,7 @@ fn from_target_feature( } } -fn linkage_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Linkage { +fn linkage_by_name(tcx: TyCtxt<'_>, def_id: DefId, name: &str) -> Linkage { use rustc::mir::mono::Linkage::*; // Use the names from src/llvm/docs/LangRef.rst here. Most types are only @@ -2422,7 +2422,7 @@ fn linkage_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Linkag } } -fn codegen_fn_attrs<'tcx>(tcx: TyCtxt<'tcx>, id: DefId) -> CodegenFnAttrs { +fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs { let attrs = tcx.get_attrs(id); let mut codegen_fn_attrs = CodegenFnAttrs::new(); diff --git a/src/librustc_typeck/impl_wf_check.rs b/src/librustc_typeck/impl_wf_check.rs index b833d8555ee0a..08c7cbc389a67 100644 --- a/src/librustc_typeck/impl_wf_check.rs +++ b/src/librustc_typeck/impl_wf_check.rs @@ -49,7 +49,7 @@ use syntax_pos::Span; /// impl<'a> Trait for Bar { type X = &'a i32; } /// // ^ 'a is unused and appears in assoc type, error /// ``` -pub fn impl_wf_check<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn impl_wf_check(tcx: TyCtxt<'_>) { // We will tag this as part of the WF check -- logically, it is, // but it's one that we must perform earlier than the rest of // WfCheck. @@ -58,7 +58,7 @@ pub fn impl_wf_check<'tcx>(tcx: TyCtxt<'tcx>) { } } -fn check_mod_impl_wf<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) { +fn check_mod_impl_wf(tcx: TyCtxt<'_>, module_def_id: DefId) { tcx.hir().visit_item_likes_in_module( module_def_id, &mut ImplWfCheck { tcx } @@ -92,8 +92,8 @@ impl ItemLikeVisitor<'tcx> for ImplWfCheck<'tcx> { fn visit_impl_item(&mut self, _impl_item: &'tcx hir::ImplItem) { } } -fn enforce_impl_params_are_constrained<'tcx>( - tcx: TyCtxt<'tcx>, +fn enforce_impl_params_are_constrained( + tcx: TyCtxt<'_>, impl_def_id: DefId, impl_item_refs: &[hir::ImplItemRef], ) { @@ -183,7 +183,7 @@ fn report_unused_parameter(tcx: TyCtxt<'_>, span: Span, kind: &str, name: &str) } /// Enforce that we do not have two items in an impl with the same name. -fn enforce_impl_items_are_distinct<'tcx>(tcx: TyCtxt<'tcx>, impl_item_refs: &[hir::ImplItemRef]) { +fn enforce_impl_items_are_distinct(tcx: TyCtxt<'_>, impl_item_refs: &[hir::ImplItemRef]) { let mut seen_type_items = FxHashMap::default(); let mut seen_value_items = FxHashMap::default(); for impl_item_ref in impl_item_refs { diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 85ae55b2dd946..56c7544eaf57a 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -161,7 +161,7 @@ fn require_same_types<'tcx>( }) } -fn check_main_fn_ty<'tcx>(tcx: TyCtxt<'tcx>, main_def_id: DefId) { +fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) { let main_id = tcx.hir().as_local_hir_id(main_def_id).unwrap(); let main_span = tcx.def_span(main_def_id); let main_t = tcx.type_of(main_def_id); @@ -226,7 +226,7 @@ fn check_main_fn_ty<'tcx>(tcx: TyCtxt<'tcx>, main_def_id: DefId) { } } -fn check_start_fn_ty<'tcx>(tcx: TyCtxt<'tcx>, start_def_id: DefId) { +fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: DefId) { let start_id = tcx.hir().as_local_hir_id(start_def_id).unwrap(); let start_span = tcx.def_span(start_def_id); let start_t = tcx.type_of(start_def_id); @@ -283,7 +283,7 @@ fn check_start_fn_ty<'tcx>(tcx: TyCtxt<'tcx>, start_def_id: DefId) { } } -fn check_for_entry_fn<'tcx>(tcx: TyCtxt<'tcx>) { +fn check_for_entry_fn(tcx: TyCtxt<'_>) { match tcx.entry_fn(LOCAL_CRATE) { Some((def_id, EntryFnType::Main)) => check_main_fn_ty(tcx, def_id), Some((def_id, EntryFnType::Start)) => check_start_fn_ty(tcx, def_id), @@ -300,7 +300,7 @@ pub fn provide(providers: &mut Providers<'_>) { impl_wf_check::provide(providers); } -pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) -> Result<(), ErrorReported> { +pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorReported> { tcx.sess.profiler(|p| p.start_activity("type-check crate")); // this ensures that later parts of type checking can assume that items diff --git a/src/librustc_typeck/outlives/mod.rs b/src/librustc_typeck/outlives/mod.rs index 63e41e01fbff5..6b8f6fccd40d7 100644 --- a/src/librustc_typeck/outlives/mod.rs +++ b/src/librustc_typeck/outlives/mod.rs @@ -20,10 +20,10 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn inferred_outlives_of<'tcx>( - tcx: TyCtxt<'tcx>, +fn inferred_outlives_of( + tcx: TyCtxt<'_>, item_def_id: DefId, -) -> &'tcx [ty::Predicate<'tcx>] { +) -> &[ty::Predicate<'_>] { let id = tcx .hir() .as_local_hir_id(item_def_id) @@ -70,10 +70,10 @@ fn inferred_outlives_of<'tcx>( } } -fn inferred_outlives_crate<'tcx>( - tcx: TyCtxt<'tcx>, +fn inferred_outlives_crate( + tcx: TyCtxt<'_>, crate_num: CrateNum, -) -> &'tcx CratePredicatesMap<'tcx> { +) -> &CratePredicatesMap<'_> { assert_eq!(crate_num, LOCAL_CRATE); // Compute a map from each struct/enum/union S to the **explicit** diff --git a/src/librustc_typeck/outlives/test.rs b/src/librustc_typeck/outlives/test.rs index 4690cb9eada2e..5ddf95b0f80c2 100644 --- a/src/librustc_typeck/outlives/test.rs +++ b/src/librustc_typeck/outlives/test.rs @@ -3,7 +3,7 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::ty::TyCtxt; use syntax::symbol::sym; -pub fn test_inferred_outlives<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn test_inferred_outlives(tcx: TyCtxt<'_>) { tcx.hir() .krate() .visit_all_item_likes(&mut OutlivesTest { tcx }); diff --git a/src/librustc_typeck/outlives/utils.rs b/src/librustc_typeck/outlives/utils.rs index c6b0da3fe474c..783890da639f4 100644 --- a/src/librustc_typeck/outlives/utils.rs +++ b/src/librustc_typeck/outlives/utils.rs @@ -125,7 +125,7 @@ pub fn insert_outlives_predicate<'tcx>( } } -fn is_free_region<'tcx>(tcx: TyCtxt<'tcx>, region: Region<'_>) -> bool { +fn is_free_region(tcx: TyCtxt<'_>, region: Region<'_>) -> bool { // First, screen for regions that might appear in a type header. match region { // These correspond to `T: 'a` relationships: diff --git a/src/librustc_typeck/variance/mod.rs b/src/librustc_typeck/variance/mod.rs index 1a8871a3da9da..343d7ea656fbb 100644 --- a/src/librustc_typeck/variance/mod.rs +++ b/src/librustc_typeck/variance/mod.rs @@ -34,7 +34,7 @@ pub fn provide(providers: &mut Providers<'_>) { }; } -fn crate_variances<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> &'tcx CrateVariancesMap<'tcx> { +fn crate_variances(tcx: TyCtxt<'_>, crate_num: CrateNum) -> &CrateVariancesMap<'_> { assert_eq!(crate_num, LOCAL_CRATE); let mut arena = arena::TypedArena::default(); let terms_cx = terms::determine_parameters_to_be_inferred(tcx, &mut arena); @@ -42,7 +42,7 @@ fn crate_variances<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> &'tcx CrateV tcx.arena.alloc(solve::solve_constraints(constraints_cx)) } -fn variances_of<'tcx>(tcx: TyCtxt<'tcx>, item_def_id: DefId) -> &'tcx [ty::Variance] { +fn variances_of(tcx: TyCtxt<'_>, item_def_id: DefId) -> &[ty::Variance] { let id = tcx.hir().as_local_hir_id(item_def_id).expect("expected local def-id"); let unsupported = || { // Variance not relevant. diff --git a/src/librustc_typeck/variance/test.rs b/src/librustc_typeck/variance/test.rs index cefc200f5cba8..0c7ebc34e8f6d 100644 --- a/src/librustc_typeck/variance/test.rs +++ b/src/librustc_typeck/variance/test.rs @@ -3,7 +3,7 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::ty::TyCtxt; use syntax::symbol::sym; -pub fn test_variance<'tcx>(tcx: TyCtxt<'tcx>) { +pub fn test_variance(tcx: TyCtxt<'_>) { tcx.hir().krate().visit_all_item_likes(&mut VarianceTest { tcx }); } diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index b0a37ea9c8081..50a647f244db5 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -17,7 +17,7 @@ use crate::html::markdown::{ErrorCodes, IdMap, Markdown, MarkdownWithToc, find_t use crate::test::{TestOptions, Collector}; /// Separate any lines at the start of the file that begin with `# ` or `%`. -fn extract_leading_metadata<'a>(s: &'a str) -> (Vec<&'a str>, &'a str) { +fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) { let mut metadata = Vec::new(); let mut count = 0; diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index a7e7c09f9ae44..726306d60ce1e 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1031,7 +1031,7 @@ impl Json { /// If the Json value is an Object, returns the value associated with the provided key. /// Otherwise, returns None. - pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{ + pub fn find(&self, key: &str) -> Option<&Json> { match *self { Json::Object(ref map) => map.get(key), _ => None @@ -1052,7 +1052,7 @@ impl Json { /// If the Json value is an Object, performs a depth-first search until /// a value associated with the provided key is found. If no value is found /// or the Json value is not an Object, returns `None`. - pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> { + pub fn search(&self, key: &str) -> Option<&Json> { match self { &Json::Object(ref map) => { match map.get(key) { diff --git a/src/libsyntax_ext/assert.rs b/src/libsyntax_ext/assert.rs index 10d323ffb89f5..637614a18bcc3 100644 --- a/src/libsyntax_ext/assert.rs +++ b/src/libsyntax_ext/assert.rs @@ -131,7 +131,7 @@ fn parse_assert<'a>( Ok(Assert { cond_expr, custom_message }) } -fn parse_custom_message<'a>(parser: &mut Parser<'a>) -> Option { +fn parse_custom_message(parser: &mut Parser<'_>) -> Option { let ts = parser.parse_tokens(); if !ts.is_empty() { Some(ts) From 3cd4df70a58c73e22e0820f83b305f049b88f4db Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Sun, 23 Jun 2019 16:11:52 +0200 Subject: [PATCH 23/31] Add missing lifetime specifier --- src/librustc_data_structures/graph/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_data_structures/graph/test.rs b/src/librustc_data_structures/graph/test.rs index 5ff0cbf58c797..bc142144e930f 100644 --- a/src/librustc_data_structures/graph/test.rs +++ b/src/librustc_data_structures/graph/test.rs @@ -59,7 +59,7 @@ impl WithPredecessors for TestGraph { } impl WithSuccessors for TestGraph { - fn successors(&self, node: usize) -> ::Iter { + fn successors(&self, node: usize) -> >::Iter { self.successors[&node].iter().cloned() } } From 80f4c49c1b4c7e02fd1ea61e9c09a97fec362d7e Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Sun, 23 Jun 2019 20:05:36 +0200 Subject: [PATCH 24/31] Add missing lifetime specifier --- src/libstd/sys/windows/path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/sys/windows/path.rs b/src/libstd/sys/windows/path.rs index 322a17ee43d07..7eae28cb14fbc 100644 --- a/src/libstd/sys/windows/path.rs +++ b/src/libstd/sys/windows/path.rs @@ -19,7 +19,7 @@ pub fn is_verbatim_sep(b: u8) -> bool { b == b'\\' } -pub fn parse_prefix(path: &OsStr) -> Option { +pub fn parse_prefix(path: &OsStr) -> Option> { use crate::path::Prefix::*; unsafe { // The unsafety here stems from converting between &OsStr and &[u8] From b17cec509e21c6c99d1b3abe765f5c6cfe4b4e72 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Sun, 23 Jun 2019 22:32:23 +0200 Subject: [PATCH 25/31] Add missing lifetime specifier --- src/libsyntax/util/parser_testing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index f037a09e9b4df..f850960624ce7 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -20,7 +20,7 @@ pub fn string_to_stream(source_str: String) -> TokenStream { } /// Map string to parser (via tts) -pub fn string_to_parser(ps: &ParseSess, source_str: String) -> Parser { +pub fn string_to_parser(ps: &ParseSess, source_str: String) -> Parser<'_> { new_parser_from_source_str(ps, PathBuf::from("bogofile").into(), source_str) } From edcde7025c928de35e8635c6725b20ce91dc241d Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Mon, 24 Jun 2019 20:10:05 +0200 Subject: [PATCH 26/31] Add missing lifetime specifier --- src/libcore/marker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 0eda2c3c8e9f3..39c390b4df6d3 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -498,7 +498,7 @@ macro_rules! impls{ /// # end: *const T, /// # phantom: PhantomData<&'a T>, /// # } -/// fn borrow_vec(vec: &Vec) -> Slice { +/// fn borrow_vec(vec: &Vec) -> Slice<'_, T> { /// let ptr = vec.as_ptr(); /// Slice { /// start: ptr, From 88c515da0728a3a3738be6ffa96168d060243225 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Tue, 25 Jun 2019 19:36:30 +0200 Subject: [PATCH 27/31] Revert changes to the standard library Moved to its own PR --- src/liballoc/collections/btree/map.rs | 8 ++++---- src/liballoc/collections/btree/node.rs | 2 +- src/liballoc/string.rs | 2 +- src/libcore/marker.rs | 2 +- src/libcore/ops/index.rs | 4 ++-- src/librustdoc/clean/mod.rs | 10 +++++----- src/librustdoc/html/render.rs | 2 +- src/librustdoc/html/toc.rs | 2 +- src/librustdoc/markdown.rs | 2 +- src/libserialize/json.rs | 4 ++-- src/libstd/sync/mpsc/sync.rs | 2 +- src/libstd/sys/redox/ext/net.rs | 2 +- src/libstd/sys/unix/ext/net.rs | 2 +- src/libstd/sys/windows/mod.rs | 2 +- src/libstd/sys/windows/path.rs | 2 +- src/libstd/sys_common/io.rs | 2 +- 16 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index c610de3febffb..6b079fc87cc78 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -2004,7 +2004,7 @@ impl BTreeMap { /// assert_eq!(keys, [1, 2]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn keys(&self) -> Keys<'_, K, V> { + pub fn keys<'a>(&'a self) -> Keys<'a, K, V> { Keys { inner: self.iter() } } @@ -2025,7 +2025,7 @@ impl BTreeMap { /// assert_eq!(values, ["hello", "goodbye"]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn values(&self) -> Values<'_, K, V> { + pub fn values<'a>(&'a self) -> Values<'a, K, V> { Values { inner: self.iter() } } @@ -2529,8 +2529,8 @@ enum UnderflowResult<'a, K, V> { Stole(NodeRef, K, V, marker::Internal>), } -fn handle_underfull_node(node: NodeRef, K, V, marker::LeafOrInternal>) - -> UnderflowResult<'_, K, V> { +fn handle_underfull_node<'a, K, V>(node: NodeRef, K, V, marker::LeafOrInternal>) + -> UnderflowResult<'a, K, V> { let parent = if let Ok(parent) = node.ascend() { parent } else { diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 7cf077d61d687..581c66c7086a5 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -394,7 +394,7 @@ impl NodeRef { } /// Temporarily takes out another, immutable reference to the same node. - fn reborrow(&self) -> NodeRef, K, V, Type> { + fn reborrow<'a>(&'a self) -> NodeRef, K, V, Type> { NodeRef { height: self.height, node: self.node, diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 89d24a234e9bc..7f7722548f581 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -552,7 +552,7 @@ impl String { /// assert_eq!("Hello �World", output); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn from_utf8_lossy(v: &[u8]) -> Cow<'_, str> { + pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> Cow<'a, str> { let mut iter = lossy::Utf8Lossy::from_bytes(v).chunks(); let (first_valid, first_broken) = if let Some(chunk) = iter.next() { diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 39c390b4df6d3..d9757d78dcebb 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -498,7 +498,7 @@ macro_rules! impls{ /// # end: *const T, /// # phantom: PhantomData<&'a T>, /// # } -/// fn borrow_vec(vec: &Vec) -> Slice<'_, T> { +/// fn borrow_vec<'a, T>(vec: &'a Vec) -> Slice<'a, T> { /// let ptr = vec.as_ptr(); /// Slice { /// start: ptr, diff --git a/src/libcore/ops/index.rs b/src/libcore/ops/index.rs index 9cff474a76030..3158f58e95806 100644 --- a/src/libcore/ops/index.rs +++ b/src/libcore/ops/index.rs @@ -105,7 +105,7 @@ pub trait Index { /// impl Index for Balance { /// type Output = Weight; /// -/// fn index(&self, index: Side) -> &Self::Output { +/// fn index<'a>(&'a self, index: Side) -> &'a Self::Output { /// println!("Accessing {:?}-side of balance immutably", index); /// match index { /// Side::Left => &self.left, @@ -115,7 +115,7 @@ pub trait Index { /// } /// /// impl IndexMut for Balance { -/// fn index_mut(&mut self, index: Side) -> &mut Self::Output { +/// fn index_mut<'a>(&'a mut self, index: Side) -> &'a mut Self::Output { /// println!("Accessing {:?}-side of balance mutably", index); /// match index { /// Side::Left => &mut self.left, diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index dae72ebd52d33..3fe048a6986bb 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -392,7 +392,7 @@ impl fmt::Debug for Item { impl Item { /// Finds the `doc` attribute as a NameValue and returns the corresponding /// value found. - pub fn doc_value(&self) -> Option<&str> { + pub fn doc_value<'a>(&'a self) -> Option<&'a str> { self.attrs.doc_value() } /// Finds all `doc` attributes as NameValues and returns their corresponding values, joined @@ -699,11 +699,11 @@ impl<'a> Iterator for ListAttributesIter<'a> { pub trait AttributesExt { /// Finds an attribute as List and returns the list of attributes nested inside. - fn lists(&self, name: Symbol) -> ListAttributesIter<'_>; + fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a>; } impl AttributesExt for [ast::Attribute] { - fn lists(&self, name: Symbol) -> ListAttributesIter<'_> { + fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a> { ListAttributesIter { attrs: self.iter(), current_list: Vec::new().into_iter(), @@ -952,7 +952,7 @@ impl Attributes { /// Finds the `doc` attribute as a NameValue and returns the corresponding /// value found. - pub fn doc_value(&self) -> Option<&str> { + pub fn doc_value<'a>(&'a self) -> Option<&'a str> { self.doc_strings.first().map(|s| s.as_str()) } @@ -1037,7 +1037,7 @@ impl Hash for Attributes { } impl AttributesExt for Attributes { - fn lists(&self, name: Symbol) -> ListAttributesIter<'_> { + fn lists<'a>(&'a self, name: Symbol) -> ListAttributesIter<'a> { self.other_attrs.lists(name) } } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 8d3d79e4dce5a..2080637ecb402 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2541,7 +2541,7 @@ fn full_path(cx: &Context, item: &clean::Item) -> String { s } -fn shorter(s: Option<&str>) -> String { +fn shorter<'a>(s: Option<&'a str>) -> String { match s { Some(s) => s.lines() .skip_while(|s| s.chars().all(|c| c.is_whitespace())) diff --git a/src/librustdoc/html/toc.rs b/src/librustdoc/html/toc.rs index 2da7aceae8bf4..2564c611e54e5 100644 --- a/src/librustdoc/html/toc.rs +++ b/src/librustdoc/html/toc.rs @@ -119,7 +119,7 @@ impl TocBuilder { /// Push a level `level` heading into the appropriate place in the /// hierarchy, returning a string containing the section number in /// `..` format. - pub fn push(&mut self, level: u32, name: String, id: String) -> &str { + pub fn push<'a>(&'a mut self, level: u32, name: String, id: String) -> &'a str { assert!(level >= 1); // collapse all previous sections into their parents until we diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index 50a647f244db5..b0a37ea9c8081 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -17,7 +17,7 @@ use crate::html::markdown::{ErrorCodes, IdMap, Markdown, MarkdownWithToc, find_t use crate::test::{TestOptions, Collector}; /// Separate any lines at the start of the file that begin with `# ` or `%`. -fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) { +fn extract_leading_metadata<'a>(s: &'a str) -> (Vec<&'a str>, &'a str) { let mut metadata = Vec::new(); let mut count = 0; diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 726306d60ce1e..a7e7c09f9ae44 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1031,7 +1031,7 @@ impl Json { /// If the Json value is an Object, returns the value associated with the provided key. /// Otherwise, returns None. - pub fn find(&self, key: &str) -> Option<&Json> { + pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{ match *self { Json::Object(ref map) => map.get(key), _ => None @@ -1052,7 +1052,7 @@ impl Json { /// If the Json value is an Object, performs a depth-first search until /// a value associated with the provided key is found. If no value is found /// or the Json value is not an Object, returns `None`. - pub fn search(&self, key: &str) -> Option<&Json> { + pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> { match self { &Json::Object(ref map) => { match map.get(key) { diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index a9c4c7345c284..3c4f8e077c922 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -140,7 +140,7 @@ fn wait_timeout_receiver<'a, 'b, T>(lock: &'a Mutex>, new_guard } -fn abort_selection(guard: &mut MutexGuard<'_, State>) -> bool { +fn abort_selection<'a, T>(guard: &mut MutexGuard<'a , State>) -> bool { match mem::replace(&mut guard.blocker, NoneBlocked) { NoneBlocked => true, BlockedSender(token) => { diff --git a/src/libstd/sys/redox/ext/net.rs b/src/libstd/sys/redox/ext/net.rs index e25bab4ff6104..b3ef5f3064c16 100644 --- a/src/libstd/sys/redox/ext/net.rs +++ b/src/libstd/sys/redox/ext/net.rs @@ -673,7 +673,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket_redox", since = "1.29.0")] - pub fn incoming(&self) -> Incoming { + pub fn incoming<'a>(&'a self) -> Incoming<'a> { Incoming { listener: self } } } diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index a9b8bc6a96298..41090caee8459 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -894,7 +894,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] - pub fn incoming(&self) -> Incoming<'_> { + pub fn incoming<'a>(&'a self) -> Incoming<'a> { Incoming { listener: self } } } diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 36fb1fb5ff68d..1cb5553912981 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -195,7 +195,7 @@ fn wide_char_to_multi_byte(code_page: u32, } } -pub fn truncate_utf16_at_nul(v: &[u16]) -> &[u16] { +pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { match v.iter().position(|c| *c == 0) { // don't include the 0 Some(i) => &v[..i], diff --git a/src/libstd/sys/windows/path.rs b/src/libstd/sys/windows/path.rs index 7eae28cb14fbc..f3178a5e9e690 100644 --- a/src/libstd/sys/windows/path.rs +++ b/src/libstd/sys/windows/path.rs @@ -19,7 +19,7 @@ pub fn is_verbatim_sep(b: u8) -> bool { b == b'\\' } -pub fn parse_prefix(path: &OsStr) -> Option> { +pub fn parse_prefix<'a>(path: &'a OsStr) -> Option> { use crate::path::Prefix::*; unsafe { // The unsafety here stems from converting between &OsStr and &[u8] diff --git a/src/libstd/sys_common/io.rs b/src/libstd/sys_common/io.rs index 8789abe55c3d0..44b0963302ddf 100644 --- a/src/libstd/sys_common/io.rs +++ b/src/libstd/sys_common/io.rs @@ -16,7 +16,7 @@ pub mod test { p.join(path) } - pub fn path(&self) -> &Path { + pub fn path<'a>(&'a self) -> &'a Path { let TempDir(ref p) = *self; p } From b4712f0410f41004a772a493acf037ed59ca1481 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 3 Jul 2019 10:19:59 -0400 Subject: [PATCH 28/31] Fix bucket in CPU usage script --- src/etc/cpu-usage-over-time-plot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/cpu-usage-over-time-plot.sh b/src/etc/cpu-usage-over-time-plot.sh index 724a21c3fc269..0905789079a3e 100755 --- a/src/etc/cpu-usage-over-time-plot.sh +++ b/src/etc/cpu-usage-over-time-plot.sh @@ -16,7 +16,7 @@ set -ex -bucket=rust-lang-ci-evalazure +bucket=rust-lang-ci2 commit=$1 builder=$2 From c51802ac6087206e302bbded174d5ac9feabf2b7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 3 Jul 2019 20:17:05 +0300 Subject: [PATCH 29/31] simplify Option::get_or_insert --- src/libcore/option.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index eec4b149ddc78..41b6d53f76516 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -777,15 +777,7 @@ impl Option { #[inline] #[stable(feature = "option_entry", since = "1.20.0")] pub fn get_or_insert(&mut self, v: T) -> &mut T { - match *self { - None => *self = Some(v), - _ => (), - } - - match *self { - Some(ref mut v) => v, - None => unsafe { hint::unreachable_unchecked() }, - } + self.get_or_insert_with(|| v) } /// Inserts a value computed from `f` into the option if it is [`None`], then From 4dd5edc76ddf4ceebc1b2b4815028b04bb9cc21e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 3 Jul 2019 19:41:16 +0200 Subject: [PATCH 30/31] enable a few more tests in Miri and update the comment for others --- src/liballoc/tests/vec.rs | 1 - src/libcore/tests/fmt/mod.rs | 2 -- src/libcore/tests/ptr.rs | 5 ++--- src/libcore/tests/slice.rs | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs index 5ddac673c9ff1..e0c724f557b9d 100644 --- a/src/liballoc/tests/vec.rs +++ b/src/liballoc/tests/vec.rs @@ -761,7 +761,6 @@ fn from_into_inner() { it.next().unwrap(); let vec = it.collect::>(); assert_eq!(vec, [2, 3]); - #[cfg(not(miri))] // Miri does not support comparing dangling pointers assert!(ptr != vec.as_ptr()); } diff --git a/src/libcore/tests/fmt/mod.rs b/src/libcore/tests/fmt/mod.rs index df1deeaeb97b7..d86e21cf40b6e 100644 --- a/src/libcore/tests/fmt/mod.rs +++ b/src/libcore/tests/fmt/mod.rs @@ -3,7 +3,6 @@ mod float; mod num; #[test] -#[cfg(not(miri))] // Miri cannot print pointers fn test_format_flags() { // No residual flags left by pointer formatting let p = "".as_ptr(); @@ -13,7 +12,6 @@ fn test_format_flags() { } #[test] -#[cfg(not(miri))] // Miri cannot print pointers fn test_pointer_formats_data_pointer() { let b: &[u8] = b""; let s: &str = ""; diff --git a/src/libcore/tests/ptr.rs b/src/libcore/tests/ptr.rs index 03fe1fe5a7cf8..569b3197d09bd 100644 --- a/src/libcore/tests/ptr.rs +++ b/src/libcore/tests/ptr.rs @@ -253,7 +253,6 @@ fn test_unsized_nonnull() { #[test] #[allow(warnings)] -#[cfg(not(miri))] // Miri cannot hash pointers // Have a symbol for the test below. It doesn’t need to be an actual variadic function, match the // ABI, or even point to an actual executable code, because the function itself is never invoked. #[no_mangle] @@ -293,7 +292,7 @@ fn write_unaligned_drop() { } #[test] -#[cfg(not(miri))] // Miri cannot compute actual alignment of an allocation +#[cfg(not(miri))] // Miri does not compute a maximal `mid` for `align_offset` fn align_offset_zst() { // For pointers of stride = 0, the pointer is already aligned or it cannot be aligned at // all, because no amount of elements will align the pointer. @@ -308,7 +307,7 @@ fn align_offset_zst() { } #[test] -#[cfg(not(miri))] // Miri cannot compute actual alignment of an allocation +#[cfg(not(miri))] // Miri does not compute a maximal `mid` for `align_offset` fn align_offset_stride1() { // For pointers of stride = 1, the pointer can always be aligned. The offset is equal to // number of bytes. diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs index 03e65d2fe0b81..72161b632413f 100644 --- a/src/libcore/tests/slice.rs +++ b/src/libcore/tests/slice.rs @@ -1396,7 +1396,7 @@ pub mod memchr { } #[test] -#[cfg(not(miri))] // Miri cannot compute actual alignment of an allocation +#[cfg(not(miri))] // Miri does not compute a maximal `mid` for `align_offset` fn test_align_to_simple() { let bytes = [1u8, 2, 3, 4, 5, 6, 7]; let (prefix, aligned, suffix) = unsafe { bytes.align_to::() }; @@ -1420,7 +1420,7 @@ fn test_align_to_zst() { } #[test] -#[cfg(not(miri))] // Miri cannot compute actual alignment of an allocation +#[cfg(not(miri))] // Miri does not compute a maximal `mid` for `align_offset` fn test_align_to_non_trivial() { #[repr(align(8))] struct U64(u64, u64); #[repr(align(8))] struct U64U64U32(u64, u64, u32); From 6225607e67d9934bcb8ddd0ab74abe4ea974f178 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 3 Jul 2019 20:13:42 +0200 Subject: [PATCH 31/31] remove bogus example from drop_in_place --- src/libcore/ptr/mod.rs | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index fccb00d768cd8..da781d7e9feee 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -100,7 +100,11 @@ pub use unique::Unique; /// as the compiler doesn't need to prove that it's sound to elide the /// copy. /// +/// Unaligned values cannot be dropped in place, they must be copied to an aligned +/// location first using [`ptr::read_unaligned`]. +/// /// [`ptr::read`]: ../ptr/fn.read.html +/// [`ptr::read_unaligned`]: ../ptr/fn.read_unaligned.html /// /// # Safety /// @@ -108,8 +112,7 @@ pub use unique::Unique; /// /// * `to_drop` must be [valid] for reads. /// -/// * `to_drop` must be properly aligned. See the example below for how to drop -/// an unaligned pointer. +/// * `to_drop` must be properly aligned. /// /// Additionally, if `T` is not [`Copy`], using the pointed-to value after /// calling `drop_in_place` can cause undefined behavior. Note that `*to_drop = @@ -153,31 +156,6 @@ pub use unique::Unique; /// assert!(weak.upgrade().is_none()); /// ``` /// -/// Unaligned values cannot be dropped in place, they must be copied to an aligned -/// location first: -/// ``` -/// use std::ptr; -/// use std::mem::{self, MaybeUninit}; -/// -/// unsafe fn drop_after_copy(to_drop: *mut T) { -/// let mut copy: MaybeUninit = MaybeUninit::uninit(); -/// ptr::copy(to_drop, copy.as_mut_ptr(), 1); -/// drop(copy.assume_init()); -/// } -/// -/// #[repr(packed, C)] -/// struct Packed { -/// _padding: u8, -/// unaligned: Vec, -/// } -/// -/// let mut p = Packed { _padding: 0, unaligned: vec![42] }; -/// unsafe { -/// drop_after_copy(&mut p.unaligned as *mut _); -/// mem::forget(p); -/// } -/// ``` -/// /// Notice that the compiler performs this copy automatically when dropping packed structs, /// i.e., you do not usually have to worry about such issues unless you call `drop_in_place` /// manually.